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

github.com/jgraph/drawio.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Benson [draw.io] <david@jgraph.com>2021-08-31 20:40:28 +0300
committerDavid Benson [draw.io] <david@jgraph.com>2021-08-31 20:40:28 +0300
commit2e7e78d4523716bbbd265e998272df9122977763 (patch)
tree2d021b1e9b200a1e957abc96c2cbb44e3a82f105
parent501ab1e18d0afd141e4e95df3ab680b3672b2768 (diff)
15.0.4 releasev15.0.4
-rw-r--r--ChangeLog9
-rw-r--r--VERSION2
-rw-r--r--src/main/webapp/js/app.min.js1966
-rw-r--r--src/main/webapp/js/diagramly/Dialogs.js3
-rw-r--r--src/main/webapp/js/diagramly/Editor.js17
-rw-r--r--src/main/webapp/js/diagramly/EditorUi.js96
-rw-r--r--src/main/webapp/js/diagramly/Menus.js11
-rw-r--r--src/main/webapp/js/diagramly/Minimal.js48
-rw-r--r--src/main/webapp/js/diagramly/Pages.js4
-rw-r--r--src/main/webapp/js/export.js18
-rw-r--r--src/main/webapp/js/grapheditor/Editor.js88
-rw-r--r--src/main/webapp/js/grapheditor/Format.js2
-rw-r--r--src/main/webapp/js/viewer-static.min.js2166
-rw-r--r--src/main/webapp/js/viewer.min.js2166
-rw-r--r--src/main/webapp/mxgraph/mxClient.js4
-rw-r--r--src/main/webapp/service-worker.js2
-rw-r--r--src/main/webapp/service-worker.js.map2
17 files changed, 3383 insertions, 3221 deletions
diff --git a/ChangeLog b/ChangeLog
index 8d99d0f0..ca4ec775 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+31-AUG-2021: 15.0.4
+
+- Fixes offset for background pages
+- Fixes dash color for sketch theme in dark mode
+- Adds .drawio.xyz extension to embedded files
+- Adds includeDiagram config option
+- Adds app icon click handler, removes debug output
+- Adds support for background pages in PDF export
+
27-AUG-2021: 15.0.3
- Fixes missing background images in thumbnails
diff --git a/VERSION b/VERSION
index 1f231fc2..dbe8a10a 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-15.0.3 \ No newline at end of file
+15.0.4 \ No newline at end of file
diff --git a/src/main/webapp/js/app.min.js b/src/main/webapp/js/app.min.js
index 575aa82c..ff2e0360 100644
--- a/src/main/webapp/js/app.min.js
+++ b/src/main/webapp/js/app.min.js
@@ -234,7 +234,7 @@ null!=a&&(DRAWIO_GITLAB_ID=a);window.DRAWIO_LOG_URL=window.DRAWIO_LOG_URL||"";a=
if("1"==urlParams.offline||"1"==urlParams.demo||"1"==urlParams.stealth||"1"==urlParams.local||"1"==urlParams.lockdown)urlParams.picker="0",urlParams.gapi="0",urlParams.db="0",urlParams.od="0",urlParams.gh="0",urlParams.gl="0",urlParams.tr="0";
"se.diagrams.net"==window.location.hostname&&(urlParams.db="0",urlParams.od="0",urlParams.gh="0",urlParams.gl="0",urlParams.tr="0",urlParams.plugins="0",urlParams.mode="google",urlParams.lockdown="1",window.DRAWIO_GOOGLE_APP_ID=window.DRAWIO_GOOGLE_APP_ID||"184079235871",window.DRAWIO_GOOGLE_CLIENT_ID=window.DRAWIO_GOOGLE_CLIENT_ID||"184079235871-pjf5nn0lff27lk8qf0770gmffiv9gt61.apps.googleusercontent.com");"trello"==urlParams.mode&&(urlParams.tr="1");
"embed.diagrams.net"==window.location.hostname&&(urlParams.embed="1");(null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.open&&(window.location.hash=urlParams.open);window.urlParams=window.urlParams||{};window.MAX_REQUEST_SIZE=window.MAX_REQUEST_SIZE||10485760;window.MAX_AREA=window.MAX_AREA||225E6;window.EXPORT_URL=window.EXPORT_URL||"/export";window.SAVE_URL=window.SAVE_URL||"/save";window.OPEN_URL=window.OPEN_URL||"/open";window.RESOURCES_PATH=window.RESOURCES_PATH||"resources";window.RESOURCE_BASE=window.RESOURCE_BASE||window.RESOURCES_PATH+"/grapheditor";window.STENCIL_PATH=window.STENCIL_PATH||"stencils";window.IMAGE_PATH=window.IMAGE_PATH||"images";
-window.STYLE_PATH=window.STYLE_PATH||"styles";window.CSS_PATH=window.CSS_PATH||"styles";window.OPEN_FORM=window.OPEN_FORM||"open.html";window.mxBasePath=window.mxBasePath||"mxgraph";window.mxImageBasePath=window.mxImageBasePath||"mxgraph/images";window.mxLanguage=window.mxLanguage||urlParams.lang;window.mxLanguages=window.mxLanguages||["de","se"];var mxClient={VERSION:"15.0.3",IS_IE:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE"),IS_IE11:null!=navigator.userAgent&&!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:null!=navigator.userAgent&&!!navigator.userAgent.match(/Edge\//),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&0>navigator.userAgent.indexOf("Edge/"),
+window.STYLE_PATH=window.STYLE_PATH||"styles";window.CSS_PATH=window.CSS_PATH||"styles";window.OPEN_FORM=window.OPEN_FORM||"open.html";window.mxBasePath=window.mxBasePath||"mxgraph";window.mxImageBasePath=window.mxImageBasePath||"mxgraph/images";window.mxLanguage=window.mxLanguage||urlParams.lang;window.mxLanguages=window.mxLanguages||["de","se"];var mxClient={VERSION:"15.0.4",IS_IE:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE"),IS_IE11:null!=navigator.userAgent&&!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:null!=navigator.userAgent&&!!navigator.userAgent.match(/Edge\//),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&0>navigator.userAgent.indexOf("Edge/"),
IS_OP:null!=navigator.userAgent&&(0<=navigator.userAgent.indexOf("Opera/")||0<=navigator.userAgent.indexOf("OPR/")),IS_OT:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Presto/")&&0>navigator.userAgent.indexOf("Presto/2.4.")&&0>navigator.userAgent.indexOf("Presto/2.3.")&&0>navigator.userAgent.indexOf("Presto/2.2.")&&0>navigator.userAgent.indexOf("Presto/2.1.")&&0>navigator.userAgent.indexOf("Presto/2.0.")&&0>navigator.userAgent.indexOf("Presto/1."),IS_SF:/Apple Computer, Inc/.test(navigator.vendor),
IS_ANDROID:0<=navigator.appVersion.indexOf("Android"),IS_IOS:/iP(hone|od|ad)/.test(navigator.platform),IS_GC:/Google Inc/.test(navigator.vendor),IS_CHROMEAPP:null!=window.chrome&&null!=chrome.app&&null!=chrome.app.runtime,IS_FF:"undefined"!==typeof InstallTrigger,IS_MT:0<=navigator.userAgent.indexOf("Firefox/")&&0>navigator.userAgent.indexOf("Firefox/1.")&&0>navigator.userAgent.indexOf("Firefox/2.")||0<=navigator.userAgent.indexOf("Iceweasel/")&&0>navigator.userAgent.indexOf("Iceweasel/1.")&&0>navigator.userAgent.indexOf("Iceweasel/2.")||
0<=navigator.userAgent.indexOf("SeaMonkey/")&&0>navigator.userAgent.indexOf("SeaMonkey/1.")||0<=navigator.userAgent.indexOf("Iceape/")&&0>navigator.userAgent.indexOf("Iceape/1."),IS_SVG:"MICROSOFT INTERNET EXPLORER"!=navigator.appName.toUpperCase(),NO_FO:!document.createElementNS||"[object SVGForeignObjectElement]"!=document.createElementNS("http://www.w3.org/2000/svg","foreignObject")||0<=navigator.userAgent.indexOf("Opera/"),IS_WIN:0<navigator.appVersion.indexOf("Win"),IS_MAC:0<navigator.appVersion.indexOf("Mac"),
@@ -1070,7 +1070,7 @@ q=g.isEventsEnabled();g.setEventsEnabled(!1);var r=this.graph.isEnabled();this.g
null;try{var B=[this.getRoot()];a=new mxTemporaryCellStates(g,c,B,null,mxUtils.bind(this,function(a){return this.getLinkForCellState(a)}))}finally{if(mxClient.IS_IE)g.overlayPane.innerHTML="",g.canvas.style.overflow="hidden",g.canvas.style.position="relative",g.canvas.style.top=this.marginTop+"px",g.canvas.style.width=f.width+"px",g.canvas.style.height=f.height+"px";else for(c=e.firstChild;null!=c;)B=c.nextSibling,b=c.nodeName.toLowerCase(),"svg"==b?(c.style.overflow="hidden",c.style.position="relative",
c.style.top=this.marginTop+"px",c.setAttribute("width",f.width),c.setAttribute("height",f.height),c.style.width="",c.style.height=""):"default"!=c.style.cursor&&"div"!=b&&c.parentNode.removeChild(c),c=B;this.printBackgroundImage&&(e=e.getElementsByTagName("svg"),0<e.length&&(e[0].style.position="absolute"));g.overlayPane.parentNode.removeChild(g.overlayPane);this.graph.setEnabled(r);this.graph.container=d;this.graph.cellRenderer.redraw=u;g.canvas=k;g.backgroundPane=l;g.drawPane=m;g.overlayPane=n;
g.translate=t;a.destroy();g.setEventsEnabled(q)}};mxPrintPreview.prototype.getLinkForCellState=function(a){return this.graph.getLinkForCell(a.cell)};
-mxPrintPreview.prototype.insertBackgroundImage=function(a,b,c){var d=this.graph.backgroundImage;if(null!=d){var e=document.createElement("img");e.style.position="absolute";e.style.marginLeft=Math.round(b*this.scale)+"px";e.style.marginTop=Math.round(c*this.scale)+"px";e.setAttribute("width",Math.round(this.scale*d.width));e.setAttribute("height",Math.round(this.scale*d.height));e.src=d.src;a.insertBefore(e,a.firstChild)}};mxPrintPreview.prototype.getCoverPages=function(){return null};
+mxPrintPreview.prototype.insertBackgroundImage=function(a,b,c){var d=this.graph.backgroundImage;if(null!=d){var e=document.createElement("img");e.style.position="absolute";e.style.marginLeft=Math.round((b+d.x)*this.scale)+"px";e.style.marginTop=Math.round((c+d.y)*this.scale)+"px";e.setAttribute("width",Math.round(d.width*this.scale));e.setAttribute("height",Math.round(d.height*this.scale));e.src=d.src;a.insertBefore(e,a.firstChild)}};mxPrintPreview.prototype.getCoverPages=function(){return null};
mxPrintPreview.prototype.getAppendices=function(){return null};mxPrintPreview.prototype.print=function(a){a=this.open(a);null!=a&&a.print()};mxPrintPreview.prototype.close=function(){null!=this.wnd&&(this.wnd.close(),this.wnd=null)};function mxStylesheet(){this.styles={};this.putDefaultVertexStyle(this.createDefaultVertexStyle());this.putDefaultEdgeStyle(this.createDefaultEdgeStyle())}
mxStylesheet.prototype.createDefaultVertexStyle=function(){var a={};a[mxConstants.STYLE_SHAPE]=mxConstants.SHAPE_RECTANGLE;a[mxConstants.STYLE_PERIMETER]=mxPerimeter.RectanglePerimeter;a[mxConstants.STYLE_VERTICAL_ALIGN]=mxConstants.ALIGN_MIDDLE;a[mxConstants.STYLE_ALIGN]=mxConstants.ALIGN_CENTER;a[mxConstants.STYLE_FILLCOLOR]="#C3D9FF";a[mxConstants.STYLE_STROKECOLOR]="#6482B9";a[mxConstants.STYLE_FONTCOLOR]="#774400";return a};
mxStylesheet.prototype.createDefaultEdgeStyle=function(){var a={};a[mxConstants.STYLE_SHAPE]=mxConstants.SHAPE_CONNECTOR;a[mxConstants.STYLE_ENDARROW]=mxConstants.ARROW_CLASSIC;a[mxConstants.STYLE_VERTICAL_ALIGN]=mxConstants.ALIGN_MIDDLE;a[mxConstants.STYLE_ALIGN]=mxConstants.ALIGN_CENTER;a[mxConstants.STYLE_STROKECOLOR]="#6482B9";a[mxConstants.STYLE_FONTCOLOR]="#446299";return a};mxStylesheet.prototype.putDefaultVertexStyle=function(a){this.putCellStyle("defaultVertex",a)};
@@ -2077,8 +2077,8 @@ 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(a,c){b.undoableEditHappened(c.getProperty("edit"))};var c=mxUtils.bind(this,function(a,b){this.undoListener.apply(this,arguments)});a.getModel().addListener(mxEvent.UNDO,c);a.getView().addListener(mxEvent.UNDO,c);c=function(b,c){var d=a.getSelectionCellsForChanges(c.getProperty("edit").changes,function(a){return!(a instanceof mxChildChange)});if(0<d.length){a.getModel();for(var e=[],h=0;h<
-d.length;h++)null!=a.view.getState(d[h])&&e.push(d[h]);a.setSelectionCells(e)}};b.addListener(mxEvent.UNDO,c);b.addListener(mxEvent.REDO,c);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()};
+Editor.prototype.createUndoManager=function(){var a=this.graph,b=new mxUndoManager;this.undoListener=function(a,c){b.undoableEditHappened(c.getProperty("edit"))};var c=mxUtils.bind(this,function(a,b){this.undoListener.apply(this,arguments)});a.getModel().addListener(mxEvent.UNDO,c);a.getView().addListener(mxEvent.UNDO,c);c=function(b,c){var e=a.getSelectionCellsForChanges(c.getProperty("edit").changes,function(a){return!(a instanceof mxChildChange)});if(0<e.length){a.getModel();for(var d=[],h=0;h<
+e.length;h++)null!=a.view.getState(e[h])&&d.push(e[h]);a.setSelectionCells(d)}};b.addListener(mxEvent.UNDO,c);b.addListener(mxEvent.REDO,c);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,c,e,d,f,k,h,g,l,m){var p=g?57:0,n=c,r=e,t=g?0:64,v=mxUtils.getDocumentSize();null!=window.innerHeight&&(v.height=window.innerHeight);var u=v.height,x=Math.max(1,Math.round((v.width-c-t)/2)),y=Math.max(1,Math.round((u-e-a.footerHeight)/3));b.style.maxHeight="100%";c=null!=document.body?Math.min(c,document.body.scrollWidth-t):c;e=Math.min(e,u-t);0<a.dialogs.length&&(this.zIndex+=2*a.dialogs.length);null==this.bg&&(this.bg=a.createDiv("background"),this.bg.style.position="absolute",
this.bg.style.background=Dialog.backdropColor,this.bg.style.height=u+"px",this.bg.style.right="0px",this.bg.style.zIndex=this.zIndex-2,mxUtils.setOpacity(this.bg,this.bgOpacity));v=mxUtils.getDocumentScrollOrigin(document);this.bg.style.left=v.x+"px";this.bg.style.top=v.y+"px";x+=v.x;y+=v.y;d&&document.body.appendChild(this.bg);var B=a.createDiv(g?"geTransDialog":"geDialog");d=this.getPosition(x,y,c,e);x=d.x;y=d.y;B.style.width=c+"px";B.style.height=e+"px";B.style.left=x+"px";B.style.top=y+"px";B.style.zIndex=
@@ -2124,17 +2124,18 @@ E(a,!0)});E();return{set:function(a){c=a;d(null,null,!0)},get:function(){return
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,c,e,d,f,k,h,g,l,m,p){g=null!=g?g:!0;var n,r,t=document.createElement("table"),v=document.createElement("tbody");t.style.marginTop="8px";n=document.createElement("tr");r=document.createElement("td");r.style.whiteSpace="nowrap";r.style.fontSize="10pt";r.style.width=m?"80px":"120px";mxUtils.write(r,(d||mxResources.get("filename"))+":");n.appendChild(r);var u=document.createElement("input");u.setAttribute("value",b||"");u.style.marginLeft="4px";u.style.width=null!=p?p+
-"px":"180px";var x=mxUtils.button(c,function(){if(null==f||f(u.value))g&&a.hideDialog(),e(u.value)});x.className="geBtn gePrimaryBtn";this.init=function(){if(null!=d||null==k)if(u.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?u.select():document.execCommand("selectAll",!1,null),Graph.fileSupport){var a=t.parentNode;if(null!=a){var b=null;mxEvent.addListener(a,"dragleave",function(a){null!=b&&(b.style.backgroundColor="",b=null);a.stopPropagation();a.preventDefault()});mxEvent.addListener(a,
-"dragover",mxUtils.bind(this,function(a){null==b&&(!mxClient.IS_IE||10<document.documentMode)&&(b=u,b.style.backgroundColor="#ebf2f9");a.stopPropagation();a.preventDefault()}));mxEvent.addListener(a,"drop",mxUtils.bind(this,function(a){null!=b&&(b.style.backgroundColor="",b=null);0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")&&(u.value=decodeURIComponent(a.dataTransfer.getData("text/uri-list")),x.click());a.stopPropagation();a.preventDefault()}))}}};r=document.createElement("td");r.style.whiteSpace=
-"nowrap";r.appendChild(u);n.appendChild(r);if(null!=d||null==k)v.appendChild(n),null!=m&&(null!=a.editor.diagramFileTypes&&(n=FilenameDialog.createFileTypes(a,u,a.editor.diagramFileTypes),n.style.marginLeft="6px",n.style.width="74px",r.appendChild(n),u.style.width=null!=p?p-40+"px":"140px"),r.appendChild(FilenameDialog.createTypeHint(a,u,m)));null!=k&&(n=document.createElement("tr"),r=document.createElement("td"),r.colSpan=2,r.appendChild(k),n.appendChild(r),v.appendChild(n));n=document.createElement("tr");
-r=document.createElement("td");r.colSpan=2;r.style.paddingTop="20px";r.style.whiteSpace="nowrap";r.setAttribute("align","right");m=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog();null!=l&&l()});m.className="geBtn";a.editor.cancelFirst&&r.appendChild(m);null!=h&&(p=mxUtils.button(mxResources.get("help"),function(){a.editor.graph.openLink(h)}),p.className="geBtn",r.appendChild(p));mxEvent.addListener(u,"keypress",function(a){13==a.keyCode&&x.click()});r.appendChild(x);a.editor.cancelFirst||
-r.appendChild(m);n.appendChild(r);v.appendChild(n);t.appendChild(v);this.container=t};FilenameDialog.filenameHelpLink=null;
-FilenameDialog.createTypeHint=function(a,b,c){var e=document.createElement("img");e.style.cssText="vertical-align:top;height:16px;width:16px;margin-left:4px;background-repeat:no-repeat;background-position:center bottom;cursor:pointer;";mxUtils.setOpacity(e,70);var d=function(){e.setAttribute("src",Editor.helpImage);e.setAttribute("title",mxResources.get("help"));for(var a=0;a<c.length;a++)if(0<c[a].ext.length&&b.value.toLowerCase().substring(b.value.length-c[a].ext.length-1)=="."+c[a].ext){e.setAttribute("src",
-mxClient.imageBasePath+"/warning.png");e.setAttribute("title",mxResources.get(c[a].title));break}};mxEvent.addListener(b,"keyup",d);mxEvent.addListener(b,"change",d);mxEvent.addListener(e,"click",function(b){var c=e.getAttribute("title");e.getAttribute("src")==Editor.helpImage?a.editor.graph.openLink(FilenameDialog.filenameHelpLink):""!=c&&a.showError(null,c,mxResources.get("help"),function(){a.editor.graph.openLink(FilenameDialog.filenameHelpLink)},null,mxResources.get("ok"),null,null,null,340,90);
-mxEvent.consume(b)});d();return e};
-FilenameDialog.createFileTypes=function(a,b,c){var e=document.createElement("select");for(a=0;a<c.length;a++){var d=document.createElement("option");d.setAttribute("value",a);mxUtils.write(d,mxResources.get(c[a].description)+" (."+c[a].extension+")");e.appendChild(d)}mxEvent.addListener(e,"change",function(a){a=c[e.value].extension;var d=b.value.lastIndexOf(".");0<d?(a=c[e.value].extension,b.value=b.value.substring(0,d+1)+a):b.value=b.value+"."+a;"createEvent"in document?(a=document.createEvent("HTMLEvents"),
-a.initEvent("change",!1,!0),b.dispatchEvent(a)):b.fireEvent("onchange")});a=function(a){var d=b.value.lastIndexOf(".");a=0;if(0<d)for(var d=b.value.toLowerCase().substring(d+1),f=0;f<c.length;f++)if(d==c[f].extension){a=f;break}e.value=a};mxEvent.addListener(b,"change",a);mxEvent.addListener(b,"keyup",a);a();return e};
+var FilenameDialog=function(a,b,c,e,d,f,k,h,g,l,m,p){g=null!=g?g:!0;var n,r,t=document.createElement("table"),v=document.createElement("tbody");t.style.position="absolute";t.style.top="30px";t.style.left="20px";n=document.createElement("tr");r=document.createElement("td");r.style.whiteSpace="nowrap";r.style.maxWidth="100px";r.style.textOverflow="ellipsis";r.style.fontSize="10pt";mxUtils.write(r,(d||mxResources.get("filename"))+":");n.appendChild(r);var u=document.createElement("input");u.setAttribute("value",
+b||"");u.style.marginLeft="4px";u.style.width=null!=p?p+"px":"180px";var x=mxUtils.button(c,function(){if(null==f||f(u.value))g&&a.hideDialog(),e(u.value)});x.className="geBtn gePrimaryBtn";this.init=function(){if(null!=d||null==k)if(u.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?u.select():document.execCommand("selectAll",!1,null),Graph.fileSupport){var a=t.parentNode;if(null!=a){var b=null;mxEvent.addListener(a,"dragleave",function(a){null!=b&&(b.style.backgroundColor="",b=null);
+a.stopPropagation();a.preventDefault()});mxEvent.addListener(a,"dragover",mxUtils.bind(this,function(a){null==b&&(!mxClient.IS_IE||10<document.documentMode)&&(b=u,b.style.backgroundColor="#ebf2f9");a.stopPropagation();a.preventDefault()}));mxEvent.addListener(a,"drop",mxUtils.bind(this,function(a){null!=b&&(b.style.backgroundColor="",b=null);0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")&&(u.value=decodeURIComponent(a.dataTransfer.getData("text/uri-list")),x.click());a.stopPropagation();
+a.preventDefault()}))}}};r=document.createElement("td");r.style.whiteSpace="nowrap";r.appendChild(u);n.appendChild(r);if(null!=d||null==k)v.appendChild(n),null!=m&&(r.appendChild(FilenameDialog.createTypeHint(a,u,m)),null!=a.editor.diagramFileTypes&&(n=document.createElement("tr"),r=document.createElement("td"),r.style.whiteSpace="nowrap",r.style.maxWidth="100px",r.style.textOverflow="ellipsis",r.style.fontSize="10pt",mxUtils.write(r,mxResources.get("type")+":"),n.appendChild(r),r=document.createElement("td"),
+r.style.whiteSpace="nowrap",n.appendChild(r),b=FilenameDialog.createFileTypes(a,u,a.editor.diagramFileTypes),b.style.marginLeft="4px",b.style.width="198px",r.appendChild(b),u.style.width=null!=p?p-40+"px":"190px",n.appendChild(r),v.appendChild(n)));null!=k&&(n=document.createElement("tr"),r=document.createElement("td"),r.colSpan=2,r.appendChild(k),n.appendChild(r),v.appendChild(n));n=document.createElement("tr");r=document.createElement("td");r.colSpan=2;r.style.paddingTop=null!=m?"12px":"20px";r.style.whiteSpace=
+"nowrap";r.setAttribute("align","right");m=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog();null!=l&&l()});m.className="geBtn";a.editor.cancelFirst&&r.appendChild(m);null!=h&&(p=mxUtils.button(mxResources.get("help"),function(){a.editor.graph.openLink(h)}),p.className="geBtn",r.appendChild(p));mxEvent.addListener(u,"keypress",function(a){13==a.keyCode&&x.click()});r.appendChild(x);a.editor.cancelFirst||r.appendChild(m);n.appendChild(r);v.appendChild(n);t.appendChild(v);this.container=
+t};FilenameDialog.filenameHelpLink=null;
+FilenameDialog.createTypeHint=function(a,b,c){var e=document.createElement("img");e.style.backgroundPosition="center bottom";e.style.backgroundRepeat="no-repeat";e.style.margin="2px 0 0 4px";e.style.verticalAlign="top";e.style.cursor="pointer";e.style.height="16px";e.style.width="16px";mxUtils.setOpacity(e,70);var d=function(){e.setAttribute("src",Editor.helpImage);e.setAttribute("title",mxResources.get("help"));for(var a=0;a<c.length;a++)if(0<c[a].ext.length&&b.value.toLowerCase().substring(b.value.length-
+c[a].ext.length-1)=="."+c[a].ext){e.setAttribute("title",mxResources.get(c[a].title));break}};mxEvent.addListener(b,"keyup",d);mxEvent.addListener(b,"change",d);mxEvent.addListener(e,"click",function(b){var c=e.getAttribute("title");e.getAttribute("src")==Editor.helpImage?a.editor.graph.openLink(FilenameDialog.filenameHelpLink):""!=c&&a.showError(null,c,mxResources.get("help"),function(){a.editor.graph.openLink(FilenameDialog.filenameHelpLink)},null,mxResources.get("ok"),null,null,null,340,90);mxEvent.consume(b)});
+d();return e};
+FilenameDialog.createFileTypes=function(a,b,c){var e=document.createElement("select");for(a=0;a<c.length;a++){var d=document.createElement("option");d.setAttribute("value",a);mxUtils.write(d,mxResources.get(c[a].description)+" (."+c[a].extension+")");e.appendChild(d)}mxEvent.addListener(e,"change",function(a){a=c[e.value].extension;var d=b.value.lastIndexOf(".drawio."),d=0<d?d:b.value.lastIndexOf(".");"drawio"!=a&&(a="drawio."+a);b.value=0<d?b.value.substring(0,d+1)+a:b.value+"."+a;"createEvent"in
+document?(a=document.createEvent("HTMLEvents"),a.initEvent("change",!1,!0),b.dispatchEvent(a)):b.fireEvent("onchange")});a=function(a){a=b.value.toLowerCase();for(var d=0,f=0;f<c.length;f++){var g=c[f].extension,l=null;"drawio"!=g&&(l=g,g=".drawio."+g);if(a.substring(a.length-g.length-1)=="."+g||null!=l&&a.substring(a.length-l.length-1)=="."+l){d=f;break}}e.value=d};mxEvent.addListener(b,"change",a);mxEvent.addListener(b,"keyup",a);a();return e};
(function(){mxGraphView.prototype.validateBackgroundPage=function(){var a=this.graph;if(null!=a.container&&!a.transparentBackground){if(a.pageVisible){var b=this.getBackgroundPageBounds();if(null==this.backgroundPageShape){for(var c=a.container.firstChild;null!=c&&c.nodeType!=mxConstants.NODETYPE_ELEMENT;)c=c.nextSibling;null!=c&&(this.backgroundPageShape=this.createBackgroundPageShape(b),this.backgroundPageShape.scale=1,this.backgroundPageShape.isShadow=!0,this.backgroundPageShape.dialect=mxConstants.DIALECT_STRICTHTML,
this.backgroundPageShape.init(a.container),c.style.position="absolute",a.container.insertBefore(this.backgroundPageShape.node,c),this.backgroundPageShape.redraw(),this.backgroundPageShape.node.className="geBackgroundPage",mxEvent.addListener(this.backgroundPageShape.node,"dblclick",mxUtils.bind(this,function(b){a.dblClick(b)})),mxEvent.addGestureListeners(this.backgroundPageShape.node,mxUtils.bind(this,function(b){a.fireMouseEvent(mxEvent.MOUSE_DOWN,new mxMouseEvent(b))}),mxUtils.bind(this,function(b){null!=
a.tooltipHandler&&a.tooltipHandler.isHideOnHover()&&a.tooltipHandler.hide();a.isMouseDown&&!mxEvent.isConsumed(b)&&a.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(b))}),mxUtils.bind(this,function(b){a.fireMouseEvent(mxEvent.MOUSE_UP,new mxMouseEvent(b))})))}else this.backgroundPageShape.scale=1,this.backgroundPageShape.bounds=b,this.backgroundPageShape.redraw()}else null!=this.backgroundPageShape&&(this.backgroundPageShape.destroy(),this.backgroundPageShape=null);this.validateBackgroundStyles()}};
@@ -2939,10 +2940,10 @@ BaseFormatPanel.prototype.createOption=function(a,b,c,e,d){var f=document.create
BaseFormatPanel.prototype.createCellOption=function(a,b,c,e,d,f,k,h,g){var l=this.editorUi,m=l.editor.graph,p=this;e=null!=e?"null"==e?null:e:1;d=null!=d?"null"==d?null:d:0;var n=null!=g?m.getCommonStyle(g):this.format.getSelectionState().style;return this.createOption(a,function(){return mxUtils.getValue(n,b,c)!=d},function(a){h&&m.stopEditing();if(null!=k)k.funct();else{m.getModel().beginUpdate();try{var c=null!=g?g:p.format.getSelectionState().cells;a=a?e:d;m.setCellStyles(b,a,c);null!=f&&f(c,
a);l.fireEvent(new mxEventObject("styleChanged","keys",[b],"values",[a],"cells",c))}finally{m.getModel().endUpdate()}}},{install:function(a){this.listener=function(){a(mxUtils.getValue(n,b,c)!=d)};m.getModel().addListener(mxEvent.CHANGE,this.listener)},destroy:function(){m.getModel().removeListener(this.listener)}})};
BaseFormatPanel.prototype.createColorOption=function(a,b,c,e,d,f,k){var h=document.createElement("div");h.style.padding="6px 0px 1px 0px";h.style.whiteSpace="nowrap";h.style.overflow="hidden";h.style.width="200px";h.style.height="18px";var g=document.createElement("input");g.setAttribute("type","checkbox");g.style.margin="0px 6px 0px 0px";k||h.appendChild(g);var l=document.createElement("span");mxUtils.write(l,a);h.appendChild(l);var m=b(),p=!1,n=null,r=function(a,d,h){if(!p){var l="null"==e?null:
-e;p=!0;a=/(^#?[a-zA-Z0-9]*$)/.test(a)?a:l;n.innerHTML='<div style="width:36px;height:12px;margin:3px;border:1px solid black;background-color:'+mxUtils.htmlEntities(null!=a&&a!=mxConstants.NONE?a:l)+';"></div>';null!=a&&a!=mxConstants.NONE&&1<a.length&&"string"===typeof a&&(l="#"==a.charAt(0)?a.substring(1).toUpperCase():a,l=ColorDialog.prototype.colorNames[l],n.setAttribute("title",null!=l?l+" (Shift+Click for Color Picker)":"Shift+Click for Color Picker"));null!=a&&a!=mxConstants.NONE?(g.setAttribute("checked",
+e;p=!0;a=/(^#?[a-zA-Z0-9]*$)/.test(a)?a:l;n.innerHTML='<div style="width:36px;height:12px;margin:3px;border:1px solid black;background-color:'+mxUtils.htmlEntities(null!=a&&a!=mxConstants.NONE?a:l)+';"></div>';null!=a&&a!=mxConstants.NONE&&1<a.length&&"string"===typeof a&&(l="#"==a.charAt(0)?a.substring(1).toUpperCase():a,l=ColorDialog.prototype.colorNames[l],n.setAttribute("title",null!=l?l+" (Shift+Click for Color Dropper)":"Shift+Click for Color Dropper"));null!=a&&a!=mxConstants.NONE?(g.setAttribute("checked",
"checked"),g.defaultChecked=!0,g.checked=!0):(g.removeAttribute("checked"),g.defaultChecked=!1,g.checked=!1);n.style.display=g.checked||k?"":"none";null!=f&&f("null"==a?null:a);d||(m=a,(h||k||b()!=m)&&c("null"==m?null:m));p=!1}},t=document.createElement("input");t.setAttribute("type","color");t.style.visibility="hidden";t.style.width="0px";t.style.height="0px";t.style.border="none";h.appendChild(t);n=mxUtils.button("",mxUtils.bind(this,function(a){!mxEvent.isShiftDown(a)||mxClient.IS_IE||mxClient.IS_IE11?
-this.editorUi.pickColor(m,function(a){r(a,null,!0)}):(t.value=m,t.click(),mxEvent.addListener(t,"input",function(){r(t.value,null,!0)}));mxEvent.consume(a)}));n.style.position="absolute";n.style.marginTop="-4px";n.style.right="20px";n.style.height="22px";n.className="geColorBtn";n.style.display=g.checked||k?"":"none";h.appendChild(n);a=null!=m&&"#"==m.charAt(0)?m.substring(1).toUpperCase():m;a=ColorDialog.prototype.colorNames[a];n.setAttribute("title",null!=a?a+" (Shift+Click for Color Picker)":"Shift+Click for Color Picker");
-mxEvent.addListener(h,"click",function(a){a=mxEvent.getSource(a);if(a==g||"INPUT"!=a.nodeName)a!=g&&(g.checked=!g.checked),g.checked||null==m||m==mxConstants.NONE||e==mxConstants.NONE||(e=m),r(g.checked?e:mxConstants.NONE)});r(m,!0);null!=d&&(d.install(r),this.listeners.push(d));return h};
+this.editorUi.pickColor(m,function(a){r(a,null,!0)}):(t.value=m,t.click(),mxEvent.addListener(t,"input",function(){r(t.value,null,!0)}));mxEvent.consume(a)}));n.style.position="absolute";n.style.marginTop="-4px";n.style.right="20px";n.style.height="22px";n.className="geColorBtn";n.style.display=g.checked||k?"":"none";h.appendChild(n);a=null!=m&&"#"==m.charAt(0)?m.substring(1).toUpperCase():m;a=ColorDialog.prototype.colorNames[a];n.setAttribute("title",null!=a?a+" (Shift+Click for Color Dropper)":
+"Shift+Click for Color Dropper");mxEvent.addListener(h,"click",function(a){a=mxEvent.getSource(a);if(a==g||"INPUT"!=a.nodeName)a!=g&&(g.checked=!g.checked),g.checked||null==m||m==mxConstants.NONE||e==mxConstants.NONE||(e=m),r(g.checked?e:mxConstants.NONE)});r(m,!0);null!=d&&(d.install(r),this.listeners.push(d));return h};
BaseFormatPanel.prototype.createCellColorOption=function(a,b,c,e,d){var f=this.editorUi,k=f.editor.graph,h=this;return this.createColorOption(a,function(){var a=k.view.getState(h.format.getSelectionState().cells[0]);return null!=a?mxUtils.getValue(a.style,b,null):null},function(a){k.getModel().beginUpdate();try{var c=h.format.getSelectionState().cells;k.setCellStyles(b,a,c);null!=d&&d(a);f.fireEvent(new mxEventObject("styleChanged","keys",[b],"values",[a],"cells",c))}finally{k.getModel().endUpdate()}},
c||mxConstants.NONE,{install:function(a){this.listener=function(){var c=k.view.getState(h.format.getSelectionState().cells[0]);null!=c&&a(mxUtils.getValue(c.style,b,null))};k.getModel().addListener(mxEvent.CHANGE,this.listener)},destroy:function(){k.getModel().removeListener(this.listener)}},e)};
BaseFormatPanel.prototype.addArrow=function(a,b){b=null!=b?b:10;var c=document.createElement("div");c.style.display="inline-block";c.style.padding="6px";c.style.paddingRight="4px";var e=10-b;2==e?c.style.paddingTop="6px":0<e?c.style.paddingTop=6-e+"px":c.style.marginTop="-2px";c.style.height=b+"px";c.style.borderLeft="1px solid #a0a0a0";c.innerHTML='<img border="0" src="'+(mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAHBJREFUeNpidHB2ZyAGsACxDRBPIKCuA6TwCBB/h2rABu4A8SYmKCcXiP/iUFgAxL9gCi8A8SwsirZCMQMTkmANEH9E4v+CmsaArvAdyNFI/FlQ92EoBIE+qCRIUz168DBgsU4OqhinQpgHMABAgAEALY4XLIsJ20oAAAAASUVORK5CYII=":
@@ -9759,26 +9760,26 @@ DrawioFile=function(a,d){mxEventSource.call(this);this.ui=a;this.shadowData=this
DrawioFile.prototype.allChangesSavedKey="allChangesSaved";DrawioFile.prototype.savingSpinnerKey="saving";DrawioFile.prototype.savingStatusKey="saving";DrawioFile.prototype.autosaveDelay=1500;DrawioFile.prototype.maxAutosaveDelay=3E4;DrawioFile.prototype.optimisticSyncDelay=300;DrawioFile.prototype.autosaveThread=null;DrawioFile.prototype.lastAutosave=null;DrawioFile.prototype.lastSaved=null;DrawioFile.prototype.lastChanged=null;DrawioFile.prototype.opened=null;DrawioFile.prototype.modified=!1;
DrawioFile.prototype.shadowModified=!1;DrawioFile.prototype.data=null;DrawioFile.prototype.shadowData=null;DrawioFile.prototype.shadowPages=null;DrawioFile.prototype.changeListenerEnabled=!0;DrawioFile.prototype.lastAutosaveRevision=null;DrawioFile.prototype.maxAutosaveRevisionDelay=3E5;DrawioFile.prototype.inConflictState=!1;DrawioFile.prototype.invalidChecksum=!1;DrawioFile.prototype.errorReportsEnabled=!1;DrawioFile.prototype.ageStart=null;
DrawioFile.prototype.getSize=function(){return null!=this.data?this.data.length:0};DrawioFile.prototype.synchronizeFile=function(a,d){this.savingFile?null!=d&&d({message:mxResources.get("busy")}):null!=this.sync?this.sync.fileChanged(a,d):this.updateFile(a,d)};
-DrawioFile.prototype.updateFile=function(a,d,c,b){null!=c&&c()||(this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=d&&d():this.getLatestVersion(mxUtils.bind(this,function(f){try{null!=c&&c()||(this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=d&&d():null!=f?this.mergeFile(f,a,d,b):this.reloadFile(a,d))}catch(g){null!=d&&d(g)}}),d))};
-DrawioFile.prototype.mergeFile=function(a,d,c,b){var f=!0;try{this.stats.fileMerged++;var g=null!=this.shadowPages?this.shadowPages:this.ui.getPagesForNode(mxUtils.parseXml(this.shadowData).documentElement),m=this.ui.getPagesForNode(mxUtils.parseXml(a.data).documentElement);if(null!=m&&0<m.length){this.shadowPages=m;this.backupPatch=this.isModified()?this.ui.diffPages(g,this.ui.pages):null;var e=[this.ui.diffPages(null!=b?b:g,this.shadowPages)];if(!this.ignorePatches(e)){var k=this.ui.patchPages(g,
-e[0]);b={};var l=this.ui.getHashValueForPages(k,b),g={},n=this.ui.getHashValueForPages(this.shadowPages,g);"1"==urlParams.test&&EditorUi.debug("File.mergeFile",[this],"backup",this.backupPatch,"patches",e,"checksum",n==l,l);if(null!=l&&l!=n){var p=this.compressReportData(this.getAnonymizedXmlForPages(m)),q=this.compressReportData(this.getAnonymizedXmlForPages(k)),u=this.ui.hashValue(a.getCurrentEtag()),t=this.ui.hashValue(this.getCurrentEtag());this.checksumError(c,e,"Shadow Details: "+JSON.stringify(b)+
-"\nChecksum: "+l+"\nCurrent: "+n+"\nCurrent Details: "+JSON.stringify(g)+"\nFrom: "+u+"\nTo: "+t+"\n\nFile Data:\n"+p+"\nPatched Shadow:\n"+q,null,"mergeFile");return}this.patch(e,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null)}}else throw f=!1,Error(mxResources.get("notADiagramFile"));this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(a.getDescriptor());this.descriptorChanged();this.backupPatch=null;null!=d&&d()}catch(y){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();
-null!=c&&c(y);try{if(f)if(this.errorReportsEnabled)this.sendErrorReport("Error in mergeFile",null,y);else{var v=this.getCurrentUser(),z=null!=v?v.id:"unknown";EditorUi.logError("Error in mergeFile",null,this.getMode()+"."+this.getId(),z,y)}}catch(x){}}};
-DrawioFile.prototype.getAnonymizedXmlForPages=function(a){var d=new mxCodec(mxUtils.createXmlDocument()),c=d.document.createElement("mxfile");if(null!=a)for(var b=0;b<a.length;b++){var f=d.encode(new mxGraphModel(a[b].root));"1"!=urlParams.dev&&(f=this.ui.anonymizeNode(f,!0));f.setAttribute("id",a[b].getId());a[b].viewState&&this.ui.editor.graph.saveViewState(a[b].viewState,f,!0);c.appendChild(f)}return mxUtils.getPrettyXml(c)};
+DrawioFile.prototype.updateFile=function(a,d,c,b){null!=c&&c()||(this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=d&&d():this.getLatestVersion(mxUtils.bind(this,function(g){try{null!=c&&c()||(this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=d&&d():null!=g?this.mergeFile(g,a,d,b):this.reloadFile(a,d))}catch(f){null!=d&&d(f)}}),d))};
+DrawioFile.prototype.mergeFile=function(a,d,c,b){var g=!0;try{this.stats.fileMerged++;var f=null!=this.shadowPages?this.shadowPages:this.ui.getPagesForNode(mxUtils.parseXml(this.shadowData).documentElement),m=this.ui.getPagesForNode(mxUtils.parseXml(a.data).documentElement);if(null!=m&&0<m.length){this.shadowPages=m;this.backupPatch=this.isModified()?this.ui.diffPages(f,this.ui.pages):null;var e=[this.ui.diffPages(null!=b?b:f,this.shadowPages)];if(!this.ignorePatches(e)){var k=this.ui.patchPages(f,
+e[0]);b={};var l=this.ui.getHashValueForPages(k,b),f={},n=this.ui.getHashValueForPages(this.shadowPages,f);"1"==urlParams.test&&EditorUi.debug("File.mergeFile",[this],"backup",this.backupPatch,"patches",e,"checksum",n==l,l);if(null!=l&&l!=n){var p=this.compressReportData(this.getAnonymizedXmlForPages(m)),q=this.compressReportData(this.getAnonymizedXmlForPages(k)),u=this.ui.hashValue(a.getCurrentEtag()),t=this.ui.hashValue(this.getCurrentEtag());this.checksumError(c,e,"Shadow Details: "+JSON.stringify(b)+
+"\nChecksum: "+l+"\nCurrent: "+n+"\nCurrent Details: "+JSON.stringify(f)+"\nFrom: "+u+"\nTo: "+t+"\n\nFile Data:\n"+p+"\nPatched Shadow:\n"+q,null,"mergeFile");return}this.patch(e,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null)}}else throw g=!1,Error(mxResources.get("notADiagramFile"));this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(a.getDescriptor());this.descriptorChanged();this.backupPatch=null;null!=d&&d()}catch(y){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();
+null!=c&&c(y);try{if(g)if(this.errorReportsEnabled)this.sendErrorReport("Error in mergeFile",null,y);else{var v=this.getCurrentUser(),z=null!=v?v.id:"unknown";EditorUi.logError("Error in mergeFile",null,this.getMode()+"."+this.getId(),z,y)}}catch(x){}}};
+DrawioFile.prototype.getAnonymizedXmlForPages=function(a){var d=new mxCodec(mxUtils.createXmlDocument()),c=d.document.createElement("mxfile");if(null!=a)for(var b=0;b<a.length;b++){var g=d.encode(new mxGraphModel(a[b].root));"1"!=urlParams.dev&&(g=this.ui.anonymizeNode(g,!0));g.setAttribute("id",a[b].getId());a[b].viewState&&this.ui.editor.graph.saveViewState(a[b].viewState,g,!0);c.appendChild(g)}return mxUtils.getPrettyXml(c)};
DrawioFile.prototype.compressReportData=function(a,d,c){d=null!=d?d:1E4;null!=c&&null!=a&&a.length>c?a=a.substring(0,c)+"[...]":null!=a&&a.length>d&&(a=Graph.compress(a)+"\n");return a};
-DrawioFile.prototype.checksumError=function(a,d,c,b,f){this.stats.checksumErrors++;this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=this.sync&&this.sync.updateOnlineState();null!=a&&a();try{if(this.errorReportsEnabled){if(null!=d)for(a=0;a<d.length;a++)this.ui.anonymizePatch(d[a]);var g=mxUtils.bind(this,function(a){var e=this.compressReportData(JSON.stringify(d,null,2));a=null!=a?this.compressReportData(this.getAnonymizedXmlForPages(this.ui.getPagesForNode(mxUtils.parseXml(a.data).documentElement)),
-25E3):"n/a";this.sendErrorReport("Checksum Error in "+f+" "+this.getHash(),(null!=c?c:"")+"\n\nPatches:\n"+e+(null!=a?"\n\nRemote:\n"+a:""),null,7E4)});null==b?g(null):this.getLatestVersion(mxUtils.bind(this,function(a){null!=a&&a.getCurrentEtag()==b?g(a):g(null)}),function(){})}else{var m=this.getCurrentUser(),e=null!=m?m.id:"unknown";EditorUi.logError("Checksum Error in "+f+" "+this.getId(),null,this.getMode()+"."+this.getId(),"user_"+e+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync"));
-try{EditorUi.logEvent({category:"CHECKSUM-ERROR-SYNC-FILE-"+this.getHash(),action:f,label:"user_"+e+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")})}catch(k){}}}catch(k){}};
-DrawioFile.prototype.sendErrorReport=function(a,d,c,b){try{var f=this.compressReportData(this.getAnonymizedXmlForPages(this.shadowPages),25E3),g=this.compressReportData(this.getAnonymizedXmlForPages(this.ui.pages),25E3),m=this.getCurrentUser(),e=null!=m?this.ui.hashValue(m.id):"unknown",k=null!=this.sync?"-client_"+this.sync.clientId:"-nosync",l=this.getTitle(),n=l.lastIndexOf("."),m="xml";0<n&&(m=l.substring(n));var p=null!=c?c.stack:Error().stack;EditorUi.sendReport(a+" "+(new Date).toISOString()+
+DrawioFile.prototype.checksumError=function(a,d,c,b,g){this.stats.checksumErrors++;this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=this.sync&&this.sync.updateOnlineState();null!=a&&a();try{if(this.errorReportsEnabled){if(null!=d)for(a=0;a<d.length;a++)this.ui.anonymizePatch(d[a]);var f=mxUtils.bind(this,function(a){var e=this.compressReportData(JSON.stringify(d,null,2));a=null!=a?this.compressReportData(this.getAnonymizedXmlForPages(this.ui.getPagesForNode(mxUtils.parseXml(a.data).documentElement)),
+25E3):"n/a";this.sendErrorReport("Checksum Error in "+g+" "+this.getHash(),(null!=c?c:"")+"\n\nPatches:\n"+e+(null!=a?"\n\nRemote:\n"+a:""),null,7E4)});null==b?f(null):this.getLatestVersion(mxUtils.bind(this,function(a){null!=a&&a.getCurrentEtag()==b?f(a):f(null)}),function(){})}else{var m=this.getCurrentUser(),e=null!=m?m.id:"unknown";EditorUi.logError("Checksum Error in "+g+" "+this.getId(),null,this.getMode()+"."+this.getId(),"user_"+e+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync"));
+try{EditorUi.logEvent({category:"CHECKSUM-ERROR-SYNC-FILE-"+this.getHash(),action:g,label:"user_"+e+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")})}catch(k){}}}catch(k){}};
+DrawioFile.prototype.sendErrorReport=function(a,d,c,b){try{var g=this.compressReportData(this.getAnonymizedXmlForPages(this.shadowPages),25E3),f=this.compressReportData(this.getAnonymizedXmlForPages(this.ui.pages),25E3),m=this.getCurrentUser(),e=null!=m?this.ui.hashValue(m.id):"unknown",k=null!=this.sync?"-client_"+this.sync.clientId:"-nosync",l=this.getTitle(),n=l.lastIndexOf("."),m="xml";0<n&&(m=l.substring(n));var p=null!=c?c.stack:Error().stack;EditorUi.sendReport(a+" "+(new Date).toISOString()+
":\n\nAppVersion="+navigator.appVersion+"\nFile="+this.ui.hashValue(this.getId())+" ("+this.getMode()+")"+(this.isModified()?" modified":"")+"\nSize/Type="+this.getSize()+" ("+m+")\nUser="+e+k+"\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!=c?"\n\nError: "+c.message:"")+"\n\nStack:\n"+p+"\n\nShadow:\n"+f+"\n\nData:\n"+g,b)}catch(q){}};
-DrawioFile.prototype.reloadFile=function(a,d){try{this.ui.spinner.stop();var c=mxUtils.bind(this,function(){this.stats.fileReloaded++;var b=this.ui.editor.graph.getViewState(),c=this.ui.editor.graph.getSelectionCells(),d=this.ui.currentPage;this.ui.loadFile(this.getHash(),!0,null,mxUtils.bind(this,function(){if(null==this.ui.fileLoadedError){this.ui.restoreViewState(d,b,c);null!=this.backupPatch&&this.patch([this.backupPatch]);var g=this.ui.getCurrentFile();null!=g&&(g.stats=this.stats);null!=a&&
+"")+(null!=c?"\n\nError: "+c.message:"")+"\n\nStack:\n"+p+"\n\nShadow:\n"+g+"\n\nData:\n"+f,b)}catch(q){}};
+DrawioFile.prototype.reloadFile=function(a,d){try{this.ui.spinner.stop();var c=mxUtils.bind(this,function(){this.stats.fileReloaded++;var b=this.ui.editor.graph.getViewState(),c=this.ui.editor.graph.getSelectionCells(),d=this.ui.currentPage;this.ui.loadFile(this.getHash(),!0,null,mxUtils.bind(this,function(){if(null==this.ui.fileLoadedError){this.ui.restoreViewState(d,b,c);null!=this.backupPatch&&this.patch([this.backupPatch]);var f=this.ui.getCurrentFile();null!=f&&(f.stats=this.stats);null!=a&&
a()}}),!0)});this.isModified()&&null==this.backupPatch?this.ui.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){this.handleFileSuccess("manual"==DrawioFile.SYNC)}),c,mxResources.get("cancel"),mxResources.get("discardChanges")):c()}catch(b){null!=d&&d(b)}};DrawioFile.prototype.copyFile=function(a,d){this.ui.editor.editAsNew(this.ui.getFileData(!0),this.ui.getCopyFilename(this))};
DrawioFile.prototype.ignorePatches=function(a){for(var d=!0,c=0;c<a.length&&d;c++)d=d&&0==Object.keys(a[c]).length;return d};
-DrawioFile.prototype.patch=function(a,d,c){var b=this.ui.editor.undoManager,f=b.history.slice(),g=b.indexOfNextAdd,m=this.ui.editor.graph;m.container.style.visibility="hidden";var e=this.changeListenerEnabled;this.changeListenerEnabled=c;var k=m.foldingEnabled,l=m.mathEnabled,n=m.cellRenderer.redraw;m.cellRenderer.redraw=function(a){a.view.graph.isEditing(a.cell)&&(a.view.graph.scrollCellToVisible(a.cell),a.view.graph.cellEditor.resize());n.apply(this,arguments)};m.model.beginUpdate();try{for(var p=
-0;p<a.length;p++)this.ui.pages=this.ui.patchPages(this.ui.pages,a[p],!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{m.container.style.visibility="";m.model.endUpdate();m.cellRenderer.redraw=n;this.changeListenerEnabled=e;c||(b.history=f,b.indexOfNextAdd=g,b.fireEvent(new mxEventObject(mxEvent.CLEAR)));if(null==this.ui.currentPage||this.ui.currentPage.needsUpdate)l!=
+DrawioFile.prototype.patch=function(a,d,c){var b=this.ui.editor.undoManager,g=b.history.slice(),f=b.indexOfNextAdd,m=this.ui.editor.graph;m.container.style.visibility="hidden";var e=this.changeListenerEnabled;this.changeListenerEnabled=c;var k=m.foldingEnabled,l=m.mathEnabled,n=m.cellRenderer.redraw;m.cellRenderer.redraw=function(a){a.view.graph.isEditing(a.cell)&&(a.view.graph.scrollCellToVisible(a.cell),a.view.graph.cellEditor.resize());n.apply(this,arguments)};m.model.beginUpdate();try{for(var p=
+0;p<a.length;p++)this.ui.pages=this.ui.patchPages(this.ui.pages,a[p],!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{m.container.style.visibility="";m.model.endUpdate();m.cellRenderer.redraw=n;this.changeListenerEnabled=e;c||(b.history=g,b.indexOfNextAdd=f,b.fireEvent(new mxEventObject(mxEvent.CLEAR)));if(null==this.ui.currentPage||this.ui.currentPage.needsUpdate)l!=
m.mathEnabled?(this.ui.editor.updateGraphComponents(),m.refresh()):(k!=m.foldingEnabled?m.view.revalidate():m.view.validate(),m.sizeDidChange());this.ui.updateTabContainer();this.ui.editor.fireEvent(new mxEventObject("pagesPatched","patches",a))}};
-DrawioFile.prototype.save=function(a,d,c,b,f,g){try{if(this.isEditable())if(!f&&this.invalidChecksum)if(null!=c)c({message:mxResources.get("checksum")});else throw Error(mxResources.get("checksum"));else this.updateFileData(),this.clearAutosave(),null!=d&&d();else if(null!=c)c({message:mxResources.get("readOnly")});else throw Error(mxResources.get("readOnly"));}catch(m){if(null!=c)c(m);else throw m;}};
+DrawioFile.prototype.save=function(a,d,c,b,g,f){try{if(this.isEditable())if(!g&&this.invalidChecksum)if(null!=c)c({message:mxResources.get("checksum")});else throw Error(mxResources.get("checksum"));else this.updateFileData(),this.clearAutosave(),null!=d&&d();else if(null!=c)c({message:mxResources.get("readOnly")});else throw Error(mxResources.get("readOnly"));}catch(m){if(null!=c)c(m);else throw m;}};
DrawioFile.prototype.updateFileData=function(){this.setData(this.ui.getFileData(null,null,null,null,null,null,null,null,this,!this.isCompressed()))};DrawioFile.prototype.isCompressedStorage=function(){return!0};DrawioFile.prototype.isCompressed=function(){var a=null!=this.ui.fileNode?this.ui.fileNode.getAttribute("compressed"):null;return null!=a?"false"!=a:this.isCompressedStorage()&&Editor.compressXml};DrawioFile.prototype.saveAs=function(a,d,c){};DrawioFile.prototype.saveFile=function(a,d,c,b){};
DrawioFile.prototype.getPublicUrl=function(a){a(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(a){this.shadowModified=a};DrawioFile.prototype.setModified=function(a){this.shadowModified=this.modified=a};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(a,d,c){};DrawioFile.prototype.isMovable=function(){return!1};DrawioFile.prototype.isTrashed=function(){return!1};DrawioFile.prototype.move=function(a,d,c){};DrawioFile.prototype.share=function(){this.ui.alert(mxResources.get("sharingAvailable"),null,380)};DrawioFile.prototype.getHash=function(){return""};
@@ -9804,172 +9805,172 @@ DrawioFile.prototype.showRefreshDialog=function(a,d,c){null==c&&(c=mxResources.g
d)}),null,mxResources.get("synchronize"),mxUtils.bind(this,function(){this.reloadFile(a,d)}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.ui.hideDialog()}),360,150))};
DrawioFile.prototype.showCopyDialog=function(a,d,c){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(a,d)}),null,mxResources.get("overwrite"),c,mxResources.get("cancel"),mxUtils.bind(this,function(){this.ui.hideDialog()}),360,150)};
DrawioFile.prototype.showConflictDialog=function(a,d){this.ui.showError(mxResources.get("externalChanges"),mxResources.get("fileChangedSyncDialog"),mxResources.get("overwrite"),a,null,mxResources.get("synchronize"),d,mxResources.get("cancel"),mxUtils.bind(this,function(){this.ui.hideDialog();this.handleFileError(null,!1)}),340,150)};
-DrawioFile.prototype.redirectToNewApp=function(a,d){this.ui.spinner.stop();if(!this.redirectDialogShowing){this.redirectDialogShowing=!0;var c=window.location.protocol+"//"+window.location.host+"/"+this.ui.getSearch("create title mode url drive splash state".split(" "))+"#"+this.getHash(),b=mxResources.get("redirectToNewApp");null!=d&&(b+=" ("+d+")");var f=mxUtils.bind(this,function(){var b=mxUtils.bind(this,function(){this.redirectDialogShowing=!1;window.location.href==c?window.location.reload():
-window.location.href=c});null==a&&this.isModified()?this.ui.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){this.redirectDialogShowing=!1}),b,mxResources.get("cancel"),mxResources.get("discardChanges")):b()});null!=a?this.isModified()?this.ui.confirm(b,mxUtils.bind(this,function(){this.redirectDialogShowing=!1;a()}),f,mxResources.get("cancel"),mxResources.get("discardChanges")):this.ui.confirm(b,f,mxUtils.bind(this,function(){this.redirectDialogShowing=!1;a()})):this.ui.alert(mxResources.get("redirectToNewApp"),
-f)}};DrawioFile.prototype.handleFileSuccess=function(a){this.ui.spinner.stop();this.ui.getCurrentFile()==this&&(this.isModified()?this.fileChanged():a?(this.isTrashed()?this.addAllSavedStatus(mxUtils.htmlEntities(mxResources.get(this.allChangesSavedKey))+" ("+mxUtils.htmlEntities(mxResources.get("fileMovedToTrash"))+")"):this.addAllSavedStatus(),null!=this.sync&&(this.sync.resetUpdateStatusThread(),this.sync.remoteFileChanged&&(this.sync.remoteFileChanged=!1,this.sync.fileChangedNotify()))):this.ui.editor.setStatus(""))};
+DrawioFile.prototype.redirectToNewApp=function(a,d){this.ui.spinner.stop();if(!this.redirectDialogShowing){this.redirectDialogShowing=!0;var c=window.location.protocol+"//"+window.location.host+"/"+this.ui.getSearch("create title mode url drive splash state".split(" "))+"#"+this.getHash(),b=mxResources.get("redirectToNewApp");null!=d&&(b+=" ("+d+")");var g=mxUtils.bind(this,function(){var b=mxUtils.bind(this,function(){this.redirectDialogShowing=!1;window.location.href==c?window.location.reload():
+window.location.href=c});null==a&&this.isModified()?this.ui.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){this.redirectDialogShowing=!1}),b,mxResources.get("cancel"),mxResources.get("discardChanges")):b()});null!=a?this.isModified()?this.ui.confirm(b,mxUtils.bind(this,function(){this.redirectDialogShowing=!1;a()}),g,mxResources.get("cancel"),mxResources.get("discardChanges")):this.ui.confirm(b,g,mxUtils.bind(this,function(){this.redirectDialogShowing=!1;a()})):this.ui.alert(mxResources.get("redirectToNewApp"),
+g)}};DrawioFile.prototype.handleFileSuccess=function(a){this.ui.spinner.stop();this.ui.getCurrentFile()==this&&(this.isModified()?this.fileChanged():a?(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(a,d){this.ui.spinner.stop();if(this.ui.getCurrentFile()==this)if(this.inConflictState)this.handleConflictError(a,d);else if(this.isModified()&&this.addUnsavedStatus(a),d)this.ui.handleError(a,null!=a?mxResources.get("errorSavingFile"):null);else if(!this.isModified()){var c=this.getErrorMessage(a);null!=c&&60<c.length&&(c=c.substring(0,60)+"...");this.ui.editor.setStatus('<div class="geStatusAlert" style="cursor:pointer;overflow:hidden;">'+mxUtils.htmlEntities(mxResources.get("error"))+
(null!=c?" ("+mxUtils.htmlEntities(c)+")":"")+"</div>")}};
-DrawioFile.prototype.handleConflictError=function(a,d){var c=mxUtils.bind(this,function(){this.handleFileSuccess(!0)}),b=mxUtils.bind(this,function(a){this.handleFileError(a,!0)}),f=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get(this.savingSpinnerKey))&&(this.ui.editor.setStatus(""),this.save(!0,c,b,null,!0,this.constructor!=GitHubFile&&this.constructor!=GitLabFile||null==a?null:a.commitMessage))}),g=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,
-mxResources.get("updatingDocument"))&&this.synchronizeFile(mxUtils.bind(this,function(){this.ui.spinner.stop();this.ui.spinner.spin(document.body,mxResources.get(this.savingSpinnerKey))&&this.save(!0,c,b,null,null,this.constructor!=GitHubFile&&this.constructor!=GitLabFile||null==a?null:a.commitMessage)}),b)});"none"==DrawioFile.SYNC?this.showCopyDialog(c,b,f):this.invalidChecksum?this.showRefreshDialog(c,b,this.getErrorMessage(a)):d?this.showConflictDialog(f,g):this.addConflictStatus(mxUtils.bind(this,
+DrawioFile.prototype.handleConflictError=function(a,d){var c=mxUtils.bind(this,function(){this.handleFileSuccess(!0)}),b=mxUtils.bind(this,function(a){this.handleFileError(a,!0)}),g=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get(this.savingSpinnerKey))&&(this.ui.editor.setStatus(""),this.save(!0,c,b,null,!0,this.constructor!=GitHubFile&&this.constructor!=GitLabFile||null==a?null:a.commitMessage))}),f=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,c,b,null,null,this.constructor!=GitHubFile&&this.constructor!=GitLabFile||null==a?null:a.commitMessage)}),b)});"none"==DrawioFile.SYNC?this.showCopyDialog(c,b,g):this.invalidChecksum?this.showRefreshDialog(c,b,this.getErrorMessage(a)):d?this.showConflictDialog(g,f):this.addConflictStatus(mxUtils.bind(this,
function(){this.ui.editor.setStatus(mxUtils.htmlEntities(mxResources.get("updatingDocument")));this.synchronizeFile(c,b)}),this.getErrorMessage(a))};DrawioFile.prototype.getErrorMessage=function(a){var d=null!=a?null!=a.error?a.error.message:a.message:null;null==d&&null!=a&&a.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(){this.lastChanged=new Date;this.setModified(!0);this.isAutosave()?(null!=this.savingStatusKey&&this.addAllSavedStatus(mxUtils.htmlEntities(mxResources.get(this.savingStatusKey))+"..."),this.ui.scheduleSanityCheck(),null==this.ageStart&&(this.ageStart=new Date),this.sendFileChanges(),this.autosave(this.autosaveDelay,this.maxAutosaveDelay,mxUtils.bind(this,function(a){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(a){this.handleFileError(a)}))):(this.ageStart=null,this.isAutosaveOptional()&&this.ui.editor.autosave||this.inConflictState||this.addUnsavedStatus())};DrawioFile.prototype.isOptimisticSync=function(){return!1};
DrawioFile.prototype.createSecret=function(a){var d=Editor.guid(32);null==this.sync||this.isOptimisticSync()?a(d):this.sync.createToken(d,mxUtils.bind(this,function(c){a(d,c)}),mxUtils.bind(this,function(){a(d)}))};DrawioFile.prototype.fileSaving=function(){null!=this.sync&&this.isOptimisticSync()&&this.sync.fileSaving();"1"==urlParams.test&&EditorUi.debug("DrawioFile.fileSaving",[this])};
DrawioFile.prototype.sendFileChanges=function(){try{null!=this.p2pCollab&&null!=this.sync&&(this.updateFileData(),this.sync.sendFileChanges(this.ui.getPagesForNode(mxUtils.parseXml(this.getData()).documentElement),this.desc),"1"==urlParams.test&&EditorUi.debug("DrawioFile.sendFileChanges",[this]))}catch(a){console.log(a)}};
-DrawioFile.prototype.fileSaved=function(a,d,c,b,f){this.lastSaved=new Date;this.ageStart=null;try{this.stats.saved++,this.invalidChecksum=this.inConflictState=!1,null==this.sync||this.isOptimisticSync()?(this.shadowData=a,this.shadowPages=null,null!=this.sync&&(this.sync.lastModified=this.getLastModifiedDate(),this.sync.resetUpdateStatusThread()),null!=c&&c()):this.sync.fileSaved(this.ui.getPagesForNode(mxUtils.parseXml(a).documentElement),d,c,b,f)}catch(e){this.invalidChecksum=this.inConflictState=
-!0;this.descriptorChanged();null!=b&&b(e);try{if(this.errorReportsEnabled)this.sendErrorReport("Error in fileSaved",null,e);else{var g=this.getCurrentUser(),m=null!=g?g.id:"unknown";EditorUi.logError("Error in fileSaved",null,this.getMode()+"."+this.getId(),m,e)}}catch(k){}}"1"==urlParams.test&&EditorUi.debug("DrawioFile.fileSaved",[this])};
-DrawioFile.prototype.autosave=function(a,d,c,b){null==this.lastAutosave&&(this.lastAutosave=Date.now());a=Date.now()-this.lastAutosave<d?a:0;this.clearAutosave();var f=window.setTimeout(mxUtils.bind(this,function(){this.lastAutosave=null;this.autosaveThread==f&&(this.autosaveThread=null);if(this.isModified()&&this.isAutosaveNow()){var a=this.isAutosaveRevision();a&&(this.lastAutosaveRevision=(new Date).getTime());this.save(a,mxUtils.bind(this,function(a){this.autosaveCompleted();null!=c&&c(a)}),mxUtils.bind(this,
-function(a){null!=b&&b(a)}))}else this.isModified()||this.ui.editor.setStatus(""),null!=c&&c(null)}),a);this.autosaveThread=f};DrawioFile.prototype.isAutosaveNow=function(){return!0};DrawioFile.prototype.autosaveCompleted=function(){};DrawioFile.prototype.clearAutosave=function(){null!=this.autosaveThread&&(window.clearTimeout(this.autosaveThread),this.autosaveThread=null)};
+DrawioFile.prototype.fileSaved=function(a,d,c,b,g){this.lastSaved=new Date;this.ageStart=null;try{this.stats.saved++,this.invalidChecksum=this.inConflictState=!1,null==this.sync||this.isOptimisticSync()?(this.shadowData=a,this.shadowPages=null,null!=this.sync&&(this.sync.lastModified=this.getLastModifiedDate(),this.sync.resetUpdateStatusThread()),null!=c&&c()):this.sync.fileSaved(this.ui.getPagesForNode(mxUtils.parseXml(a).documentElement),d,c,b,g)}catch(e){this.invalidChecksum=this.inConflictState=
+!0;this.descriptorChanged();null!=b&&b(e);try{if(this.errorReportsEnabled)this.sendErrorReport("Error in fileSaved",null,e);else{var f=this.getCurrentUser(),m=null!=f?f.id:"unknown";EditorUi.logError("Error in fileSaved",null,this.getMode()+"."+this.getId(),m,e)}}catch(k){}}"1"==urlParams.test&&EditorUi.debug("DrawioFile.fileSaved",[this])};
+DrawioFile.prototype.autosave=function(a,d,c,b){null==this.lastAutosave&&(this.lastAutosave=Date.now());a=Date.now()-this.lastAutosave<d?a:0;this.clearAutosave();var g=window.setTimeout(mxUtils.bind(this,function(){this.lastAutosave=null;this.autosaveThread==g&&(this.autosaveThread=null);if(this.isModified()&&this.isAutosaveNow()){var a=this.isAutosaveRevision();a&&(this.lastAutosaveRevision=(new Date).getTime());this.save(a,mxUtils.bind(this,function(a){this.autosaveCompleted();null!=c&&c(a)}),mxUtils.bind(this,
+function(a){null!=b&&b(a)}))}else this.isModified()||this.ui.editor.setStatus(""),null!=c&&c(null)}),a);this.autosaveThread=g};DrawioFile.prototype.isAutosaveNow=function(){return!0};DrawioFile.prototype.autosaveCompleted=function(){};DrawioFile.prototype.clearAutosave=function(){null!=this.autosaveThread&&(window.clearTimeout(this.autosaveThread),this.autosaveThread=null)};
DrawioFile.prototype.isAutosaveRevision=function(){var a=(new Date).getTime();return null==this.lastAutosaveRevision||a-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(a){this.updateFileData();this.stats.closed++;this.isAutosave()&&this.isModified()&&this.save(this.isAutosaveRevision(),null,null,a);this.destroy()};DrawioFile.prototype.hasSameExtension=function(a,d){if(null!=a&&null!=d){var c=a.lastIndexOf("."),b=0<c?a.substring(c):"",c=d.lastIndexOf(".");return b===(0<c?d.substring(c):"")}return a==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(a,d){a([])};DrawioFile.prototype.addComment=function(a,d,c){d(Date.now())};DrawioFile.prototype.canReplyToReplies=function(){return!0};DrawioFile.prototype.canComment=function(){return!0};DrawioFile.prototype.newComment=function(a,d){return new DrawioComment(this,null,a,Date.now(),Date.now(),!1,d)};LocalFile=function(a,d,c,b,f,g){DrawioFile.call(this,a,d);this.title=c;this.mode=b?null:App.MODE_DEVICE;this.fileHandle=f;this.desc=g};mxUtils.extend(LocalFile,DrawioFile);LocalFile.prototype.isAutosave=function(){return null!=this.fileHandle&&!this.invalidFileHandle&&DrawioFile.prototype.isAutosave.apply(this,arguments)};LocalFile.prototype.isAutosaveOptional=function(){return null!=this.fileHandle};LocalFile.prototype.getMode=function(){return this.mode};LocalFile.prototype.getTitle=function(){return this.title};
+DrawioFile.prototype.commentsRefreshNeeded=function(){return!0};DrawioFile.prototype.commentsSaveNeeded=function(){return!1};DrawioFile.prototype.getComments=function(a,d){a([])};DrawioFile.prototype.addComment=function(a,d,c){d(Date.now())};DrawioFile.prototype.canReplyToReplies=function(){return!0};DrawioFile.prototype.canComment=function(){return!0};DrawioFile.prototype.newComment=function(a,d){return new DrawioComment(this,null,a,Date.now(),Date.now(),!1,d)};LocalFile=function(a,d,c,b,g,f){DrawioFile.call(this,a,d);this.title=c;this.mode=b?null:App.MODE_DEVICE;this.fileHandle=g;this.desc=f};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(a,d,c){this.saveAs(this.title,d,c)};LocalFile.prototype.saveAs=function(a,d,c){this.saveFile(a,!1,d,c)};LocalFile.prototype.saveAs=function(a,d,c){this.saveFile(a,!1,d,c)};LocalFile.prototype.getDescriptor=function(){return this.desc};LocalFile.prototype.setDescriptor=function(a){this.desc=a};
LocalFile.prototype.getLatestVersion=function(a,d){null==this.fileHandle?a(null):this.ui.loadFileSystemEntry(this.fileHandle,a,d)};
-LocalFile.prototype.saveFile=function(a,d,c,b,f){a!=this.title&&(this.desc=this.fileHandle=null);this.title=a;f||this.updateFileData();var g=this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle());this.setShadowModified(!1);var m=this.getData(),e=mxUtils.bind(this,function(){this.setModified(this.getShadowModified());this.contentChanged();null!=c&&c()}),k=mxUtils.bind(this,function(c){if(null!=this.fileHandle){if(!this.savingFile){this.savingFileTime=new Date;this.savingFile=!0;var d=mxUtils.bind(this,
-function(a){this.savingFile=!1;null!=b&&b({error:a})});this.saveDraft();this.fileHandle.createWritable().then(mxUtils.bind(this,function(a){this.fileHandle.getFile().then(mxUtils.bind(this,function(b){this.invalidFileHandle=null;this.desc.lastModified==b.lastModified?a.write(g?this.ui.base64ToBlob(c,"image/png"):c).then(mxUtils.bind(this,function(){a.close().then(mxUtils.bind(this,function(){this.fileHandle.getFile().then(mxUtils.bind(this,function(a){try{var b=this.desc;this.savingFile=!1;this.desc=
-a;this.fileSaved(m,b,e,d);this.removeDraft()}catch(z){d(z)}}),d)}),d)}),d):(this.inConflictState=!0,d())}),mxUtils.bind(this,function(a){this.invalidFileHandle=!0;d(a)}))}),d)}}else{if(this.ui.isOfflineApp()||this.ui.isLocalFileSave())this.ui.doSaveLocalFile(c,a,g?"image/png":"text/xml",g);else if(c.length<MAX_REQUEST_SIZE){var k=a.lastIndexOf("."),k=0<k?a.substring(k+1):"xml";(new mxXmlRequest(SAVE_URL,"format="+k+"&xml="+encodeURIComponent(c)+"&filename="+encodeURIComponent(a)+(g?"&binary=1":""))).simulate(document,
-"_blank")}else this.ui.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(c)}));e()}});g?(d=this.ui.getPngFileProperties(this.ui.fileNode),this.ui.getEmbeddedPng(mxUtils.bind(this,function(a){k(a)}),b,this.ui.getCurrentFile()!=this?m:null,d.scale,d.border)):k(m)};LocalFile.prototype.rename=function(a,d,c){this.title=a;this.descriptorChanged();null!=d&&d()};
+LocalFile.prototype.saveFile=function(a,d,c,b,g){a!=this.title&&(this.desc=this.fileHandle=null);this.title=a;g||this.updateFileData();var f=this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle());this.setShadowModified(!1);var m=this.getData(),e=mxUtils.bind(this,function(){this.setModified(this.getShadowModified());this.contentChanged();null!=c&&c()}),k=mxUtils.bind(this,function(c){if(null!=this.fileHandle){if(!this.savingFile){this.savingFileTime=new Date;this.savingFile=!0;var d=mxUtils.bind(this,
+function(a){this.savingFile=!1;null!=b&&b({error:a})});this.saveDraft();this.fileHandle.createWritable().then(mxUtils.bind(this,function(a){this.fileHandle.getFile().then(mxUtils.bind(this,function(b){this.invalidFileHandle=null;this.desc.lastModified==b.lastModified?a.write(f?this.ui.base64ToBlob(c,"image/png"):c).then(mxUtils.bind(this,function(){a.close().then(mxUtils.bind(this,function(){this.fileHandle.getFile().then(mxUtils.bind(this,function(a){try{var b=this.desc;this.savingFile=!1;this.desc=
+a;this.fileSaved(m,b,e,d);this.removeDraft()}catch(z){d(z)}}),d)}),d)}),d):(this.inConflictState=!0,d())}),mxUtils.bind(this,function(a){this.invalidFileHandle=!0;d(a)}))}),d)}}else{if(this.ui.isOfflineApp()||this.ui.isLocalFileSave())this.ui.doSaveLocalFile(c,a,f?"image/png":"text/xml",f);else if(c.length<MAX_REQUEST_SIZE){var k=a.lastIndexOf("."),k=0<k?a.substring(k+1):"xml";(new mxXmlRequest(SAVE_URL,"format="+k+"&xml="+encodeURIComponent(c)+"&filename="+encodeURIComponent(a)+(f?"&binary=1":""))).simulate(document,
+"_blank")}else this.ui.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(c)}));e()}});f?(d=this.ui.getPngFileProperties(this.ui.fileNode),this.ui.getEmbeddedPng(mxUtils.bind(this,function(a){k(a)}),b,this.ui.getCurrentFile()!=this?m:null,d.scale,d.border)):k(m)};LocalFile.prototype.rename=function(a,d,c){this.title=a;this.descriptorChanged();null!=d&&d()};
LocalFile.prototype.open=function(){this.ui.setFileData(this.getData());this.installListeners()};LocalLibrary=function(a,d,c){LocalFile.call(this,a,d,c)};mxUtils.extend(LocalLibrary,LocalFile);LocalLibrary.prototype.getHash=function(){return"F"+this.getTitle()};LocalLibrary.prototype.isAutosave=function(){return!1};LocalLibrary.prototype.saveAs=function(a,d,c){this.saveFile(a,!1,d,c)};LocalLibrary.prototype.updateFileData=function(){};LocalLibrary.prototype.open=function(){};StorageFile=function(a,d,c){DrawioFile.call(this,a,d);this.title=c};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(a,d,c){this.saveAs(this.getTitle(),d,c)};StorageFile.prototype.saveAs=function(a,d,c){DrawioFile.prototype.save.apply(this,arguments);this.saveFile(a,!1,d,c)};
-StorageFile.insertFile=function(a,d,c,b,f){var g=mxUtils.bind(this,function(g){var e=function(){var e=new StorageFile(a,c,d);e.saveFile(d,!1,function(){b(e)},f)};g?a.confirm(mxResources.get("replaceIt",[d]),e,f):e()});StorageFile.getFileContent(a,d,function(a){g(null!=a)},function(){g(!1)})};StorageFile.getFileContent=function(a,d,c,b){a.getDatabaseItem(d,function(a){c(null!=a?a.data:null)},mxUtils.bind(this,function(){null==a.database?a.getLocalData(d,c):null!=b&&b()}),"files")};
+StorageFile.insertFile=function(a,d,c,b,g){var f=mxUtils.bind(this,function(f){var e=function(){var e=new StorageFile(a,c,d);e.saveFile(d,!1,function(){b(e)},g)};f?a.confirm(mxResources.get("replaceIt",[d]),e,g):e()});StorageFile.getFileContent(a,d,function(a){f(null!=a)},function(){f(!1)})};StorageFile.getFileContent=function(a,d,c,b){a.getDatabaseItem(d,function(a){c(null!=a?a.data:null)},mxUtils.bind(this,function(){null==a.database?a.getLocalData(d,c):null!=b&&b()}),"files")};
StorageFile.getFileInfo=function(a,d,c,b){a.getDatabaseItem(d,function(a){c(a)},mxUtils.bind(this,function(){null==a.database?a.getLocalData(d,function(a){c(null!=a?{title:d}:null)}):null!=b&&b()}),"filesInfo")};
-StorageFile.prototype.saveFile=function(a,d,c,b){if(this.isEditable()){var f=mxUtils.bind(this,function(){this.isRenamable()&&(this.title=a);try{var d=mxUtils.bind(this,function(){this.setModified(!1);this.contentChanged();null!=c&&c()}),f=this.getData();this.ui.setDatabaseItem(null,[{title:this.title,size:f.length,lastModified:Date.now(),type:this.type},{title:this.title,data:f}],d,mxUtils.bind(this,function(){null==this.ui.database?this.ui.setLocalData(this.title,f,d):null!=b&&b()}),["filesInfo",
-"files"])}catch(e){null!=b&&b(e)}});this.isRenamable()&&"."==a.charAt(0)&&null!=b?b({message:mxResources.get("invalidName")}):StorageFile.getFileInfo(this.ui,a,mxUtils.bind(this,function(c){this.isRenamable()&&this.getTitle()!=a&&null!=c?this.ui.confirm(mxResources.get("replaceIt",[a]),f,b):f()}),b)}else null!=c&&c()};
-StorageFile.prototype.rename=function(a,d,c){var b=this.getTitle();b!=a?StorageFile.getFileInfo(this.ui,a,mxUtils.bind(this,function(f){var g=mxUtils.bind(this,function(){this.title=a;this.hasSameExtension(b,a)||this.setData(this.ui.getFileData());this.saveFile(a,!1,mxUtils.bind(this,function(){this.ui.removeLocalData(b,d)}),c)});null!=f?this.ui.confirm(mxResources.get("replaceIt",[a]),g,c):g()}),c):d()};StorageFile.prototype.open=function(){DrawioFile.prototype.open.apply(this,arguments);this.saveFile(this.getTitle())};
+StorageFile.prototype.saveFile=function(a,d,c,b){if(this.isEditable()){var g=mxUtils.bind(this,function(){this.isRenamable()&&(this.title=a);try{var d=mxUtils.bind(this,function(){this.setModified(!1);this.contentChanged();null!=c&&c()}),g=this.getData();this.ui.setDatabaseItem(null,[{title:this.title,size:g.length,lastModified:Date.now(),type:this.type},{title:this.title,data:g}],d,mxUtils.bind(this,function(){null==this.ui.database?this.ui.setLocalData(this.title,g,d):null!=b&&b()}),["filesInfo",
+"files"])}catch(e){null!=b&&b(e)}});this.isRenamable()&&"."==a.charAt(0)&&null!=b?b({message:mxResources.get("invalidName")}):StorageFile.getFileInfo(this.ui,a,mxUtils.bind(this,function(c){this.isRenamable()&&this.getTitle()!=a&&null!=c?this.ui.confirm(mxResources.get("replaceIt",[a]),g,b):g()}),b)}else null!=c&&c()};
+StorageFile.prototype.rename=function(a,d,c){var b=this.getTitle();b!=a?StorageFile.getFileInfo(this.ui,a,mxUtils.bind(this,function(g){var f=mxUtils.bind(this,function(){this.title=a;this.hasSameExtension(b,a)||this.setData(this.ui.getFileData());this.saveFile(a,!1,mxUtils.bind(this,function(){this.ui.removeLocalData(b,d)}),c)});null!=g?this.ui.confirm(mxResources.get("replaceIt",[a]),f,c):f()}),c):d()};StorageFile.prototype.open=function(){DrawioFile.prototype.open.apply(this,arguments);this.saveFile(this.getTitle())};
StorageFile.prototype.getLatestVersion=function(a,d){StorageFile.getFileContent(this.ui,this.title,mxUtils.bind(this,function(c){a(new StorageFile(this.ui,c,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(a){for(var d=[],c=0;c<localStorage.length;c++){var b=localStorage.key(c),f=localStorage.getItem(b);if(0<b.length&&"."!=b.charAt(0)&&0<f.length){var g=(null==a||"F"==a)&&("<mxfile "===f.substring(0,8)||"<?xml"===f.substring(0,5)||"\x3c!--[if IE]>"===f.substring(0,12)),m=(null==a||"L"==a)&&"<mxlibrary>"===f.substring(0,11);(g||m)&&d.push({title:b,type:g?"F":"L",size:f.length,lastModified:Date.now()})}}return d};
-StorageFile.migrate=function(a){var d=StorageFile.listLocalStorageFiles();d.push({title:".scratchpad",type:"L"});var c=a.transaction(["files","filesInfo"],"readwrite");a=c.objectStore("files");for(var c=c.objectStore("filesInfo"),b=0;b<d.length;b++){var f=d[b],g=localStorage.getItem(f.title);a.add({title:f.title,data:g});c.add(f)}};
-StorageFile.listFiles=function(a,d,c,b){a.getDatabaseItems(function(a){var b=[];if(null!=a)for(var f=0;f<a.length;f++)"."==a[f].title.charAt(0)||null!=d&&a[f].type!=d||b.push(a[f]);c(b)},function(){null==a.database?c(StorageFile.listLocalStorageFiles(d)):null!=b&&b()},"filesInfo")};StorageFile.deleteFile=function(a,d,c,b){a.removeDatabaseItem([d,d],c,function(){null==a.database?(localStorage.removeItem(d),c()):null!=b&&b()},["files","filesInfo"])};StorageLibrary=function(a,d,c){StorageFile.call(this,a,d,c)};mxUtils.extend(StorageLibrary,StorageFile);StorageLibrary.prototype.type="L";StorageLibrary.prototype.isAutosave=function(){return!0};StorageLibrary.prototype.saveAs=function(a,d,c){this.saveFile(a,!1,d,c)};StorageLibrary.prototype.getHash=function(){return"L"+encodeURIComponent(this.title)};StorageLibrary.prototype.getTitle=function(){return".scratchpad"==this.title?mxResources.get("scratchpad"):this.title};
+StorageFile.listLocalStorageFiles=function(a){for(var d=[],c=0;c<localStorage.length;c++){var b=localStorage.key(c),g=localStorage.getItem(b);if(0<b.length&&"."!=b.charAt(0)&&0<g.length){var f=(null==a||"F"==a)&&("<mxfile "===g.substring(0,8)||"<?xml"===g.substring(0,5)||"\x3c!--[if IE]>"===g.substring(0,12)),m=(null==a||"L"==a)&&"<mxlibrary>"===g.substring(0,11);(f||m)&&d.push({title:b,type:f?"F":"L",size:g.length,lastModified:Date.now()})}}return d};
+StorageFile.migrate=function(a){var d=StorageFile.listLocalStorageFiles();d.push({title:".scratchpad",type:"L"});var c=a.transaction(["files","filesInfo"],"readwrite");a=c.objectStore("files");for(var c=c.objectStore("filesInfo"),b=0;b<d.length;b++){var g=d[b],f=localStorage.getItem(g.title);a.add({title:g.title,data:f});c.add(g)}};
+StorageFile.listFiles=function(a,d,c,b){a.getDatabaseItems(function(a){var b=[];if(null!=a)for(var g=0;g<a.length;g++)"."==a[g].title.charAt(0)||null!=d&&a[g].type!=d||b.push(a[g]);c(b)},function(){null==a.database?c(StorageFile.listLocalStorageFiles(d)):null!=b&&b()},"filesInfo")};StorageFile.deleteFile=function(a,d,c,b){a.removeDatabaseItem([d,d],c,function(){null==a.database?(localStorage.removeItem(d),c()):null!=b&&b()},["files","filesInfo"])};StorageLibrary=function(a,d,c){StorageFile.call(this,a,d,c)};mxUtils.extend(StorageLibrary,StorageFile);StorageLibrary.prototype.type="L";StorageLibrary.prototype.isAutosave=function(){return!0};StorageLibrary.prototype.saveAs=function(a,d,c){this.saveFile(a,!1,d,c)};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(a,d,c){return".scratchpad"!=this.title};StorageLibrary.prototype.open=function(){};RemoteFile=function(a,d,c){DrawioFile.call(this,a,d);this.title=c;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(a,d,c){RemoteFile.call(this,a,d,c.title);this.libObj=c};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(a,d,c){};
RemoteLibrary.prototype.saveAs=function(a,d,c){};RemoteLibrary.prototype.updateFileData=function(){};RemoteLibrary.prototype.open=function(){};UrlLibrary=function(a,d,c){StorageFile.call(this,a,d,c);a=c;d=a.lastIndexOf("/");0<=d&&(a=a.substring(d+1));this.fname=a};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(a,d,c){return!1};UrlLibrary.prototype.saveAs=function(a,d,c){};UrlLibrary.prototype.open=function(){};EmbedFile=function(a,d,c){DrawioFile.call(this,a,d);this.desc=c||{};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(a,d,c){function b(b,g,f,n,v,z){function p(){mxEvent.addListener(q,"click",null!=z?z:function(){f!=App.MODE_GOOGLE||a.isDriveDomain()?f==App.MODE_GOOGLE&&a.spinner.spin(document.body,mxResources.get("authorizing"))?a.drive.checkToken(mxUtils.bind(this,function(){a.spinner.stop();a.setMode(f,!0);d()})):f==App.MODE_ONEDRIVE&&a.spinner.spin(document.body,mxResources.get("authorizing"))?a.oneDrive.checkToken(mxUtils.bind(this,function(){a.spinner.stop();a.setMode(f,!0);d()})):
-(a.setMode(f,!0),d()):window.location.hostname=DriveClient.prototype.newAppHostname})}e++;++m>c&&(mxUtils.br(k),m=1);var q=document.createElement("a");q.style.overflow="hidden";q.style.display="inline-block";q.className="geBaseButton";q.style.boxSizing="border-box";q.style.fontSize="11px";q.style.position="relative";q.style.margin="4px";q.style.marginTop="8px";q.style.marginBottom="0px";q.style.padding="8px 10px 8px 10px";q.style.width="88px";q.style.height="100px";q.style.whiteSpace="nowrap";q.setAttribute("title",
-g);var u=document.createElement("div");u.style.textOverflow="ellipsis";u.style.overflow="hidden";u.style.position="absolute";u.style.bottom="8px";u.style.left="0px";u.style.right="0px";mxUtils.write(u,g);q.appendChild(u);if(null!=b){var t=document.createElement("img");t.setAttribute("src",b);t.setAttribute("border","0");t.setAttribute("align","absmiddle");t.style.width="60px";t.style.height="60px";t.style.paddingBottom="6px";q.appendChild(t)}else u.style.paddingTop="5px",u.style.whiteSpace="normal",
+var StorageDialog=function(a,d,c){function b(b,f,g,n,v,z){function p(){mxEvent.addListener(q,"click",null!=z?z:function(){g!=App.MODE_GOOGLE||a.isDriveDomain()?g==App.MODE_GOOGLE&&a.spinner.spin(document.body,mxResources.get("authorizing"))?a.drive.checkToken(mxUtils.bind(this,function(){a.spinner.stop();a.setMode(g,!0);d()})):g==App.MODE_ONEDRIVE&&a.spinner.spin(document.body,mxResources.get("authorizing"))?a.oneDrive.checkToken(mxUtils.bind(this,function(){a.spinner.stop();a.setMode(g,!0);d()})):
+(a.setMode(g,!0),d()):window.location.hostname=DriveClient.prototype.newAppHostname})}e++;++m>c&&(mxUtils.br(k),m=1);var q=document.createElement("a");q.style.overflow="hidden";q.style.display="inline-block";q.className="geBaseButton";q.style.boxSizing="border-box";q.style.fontSize="11px";q.style.position="relative";q.style.margin="4px";q.style.marginTop="8px";q.style.marginBottom="0px";q.style.padding="8px 10px 8px 10px";q.style.width="88px";q.style.height="100px";q.style.whiteSpace="nowrap";q.setAttribute("title",
+f);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,f);q.appendChild(u);if(null!=b){var t=document.createElement("img");t.setAttribute("src",b);t.setAttribute("border","0");t.setAttribute("align","absmiddle");t.style.width="60px";t.style.height="60px";t.style.paddingBottom="6px";q.appendChild(t)}else u.style.paddingTop="5px",u.style.whiteSpace="normal",
mxClient.IS_IOS?(q.style.padding="0px 10px 20px 10px",q.style.top="6px"):mxClient.IS_FF&&(u.style.paddingTop="0px",u.style.marginTop="-2px");if(null!=v)for(b=0;b<v.length;b++)mxUtils.br(u),mxUtils.write(u,v[b]);if(null!=n&&null==a[n]){t.style.visibility="hidden";mxUtils.setOpacity(u,10);var C=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});C.spin(q);var D=window.setTimeout(function(){null==
-a[n]&&(C.stop(),q.style.display="none")},3E4);a.addListener("clientLoaded",mxUtils.bind(this,function(e,b){null!=a[n]&&b.getProperty("client")==a[n]&&(window.clearTimeout(D),mxUtils.setOpacity(u,100),t.style.visibility="",C.stop(),p(),"drive"==n&&null!=l.parentNode&&l.parentNode.removeChild(l))}))}else p();k.appendChild(q)}c=null!=c?c:2;var f=document.createElement("div");f.style.textAlign="center";f.style.whiteSpace="nowrap";f.style.paddingTop="0px";f.style.paddingBottom="20px";var g=document.createElement("div");
-g.style.border="1px solid #d3d3d3";g.style.borderWidth="1px 0px 1px 0px";g.style.padding="10px 0px 20px 0px";var m=0,e=0,k=document.createElement("div");k.style.paddingTop="2px";g.appendChild(k);var l=document.createElement("p"),n=document.createElement("p");n.style.cssText="font-size:22px;padding:4px 0 16px 0;margin:0;color:gray;";mxUtils.write(n,mxResources.get("saveDiagramsTo")+":");f.appendChild(n);f.appendChild(g);m=0;"function"===typeof window.DriveClient&&b(IMAGE_PATH+"/google-drive-logo.svg",
+a[n]&&(C.stop(),q.style.display="none")},3E4);a.addListener("clientLoaded",mxUtils.bind(this,function(e,b){null!=a[n]&&b.getProperty("client")==a[n]&&(window.clearTimeout(D),mxUtils.setOpacity(u,100),t.style.visibility="",C.stop(),p(),"drive"==n&&null!=l.parentNode&&l.parentNode.removeChild(l))}))}else p();k.appendChild(q)}c=null!=c?c:2;var g=document.createElement("div");g.style.textAlign="center";g.style.whiteSpace="nowrap";g.style.paddingTop="0px";g.style.paddingBottom="20px";var f=document.createElement("div");
+f.style.border="1px solid #d3d3d3";f.style.borderWidth="1px 0px 1px 0px";f.style.padding="10px 0px 20px 0px";var m=0,e=0,k=document.createElement("div");k.style.paddingTop="2px";f.appendChild(k);var l=document.createElement("p"),n=document.createElement("p");n.style.cssText="font-size:22px;padding:4px 0 16px 0;margin:0;color:gray;";mxUtils.write(n,mxResources.get("saveDiagramsTo")+":");g.appendChild(n);g.appendChild(f);m=0;"function"===typeof window.DriveClient&&b(IMAGE_PATH+"/google-drive-logo.svg",
mxResources.get("googleDrive"),App.MODE_GOOGLE,"drive");"function"===typeof window.OneDriveClient&&b(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),App.MODE_ONEDRIVE,"oneDrive");b(IMAGE_PATH+"/osa_drive-harddisk.png",mxResources.get("device"),App.MODE_DEVICE);!isLocalStorage||"1"!=urlParams.browser&&"1"!=urlParams.offline||b(IMAGE_PATH+"/osa_database.png",mxResources.get("browser"),App.MODE_BROWSER);"function"===typeof window.DropboxClient&&b(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),
-App.MODE_DROPBOX,"dropbox");null!=a.gitHub&&b(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),App.MODE_GITHUB,"gitHub");null!=a.gitLab&&b(IMAGE_PATH+"/gitlab-logo.svg",mxResources.get("gitlab"),App.MODE_GITLAB,"gitLab");6>e&&null!=a.notion&&b(IMAGE_PATH+"/notion-logo.svg",mxResources.get("notion"),App.MODE_NOTION,"notion");g=document.createElement("span");g.style.cssText="position:absolute;cursor:pointer;bottom:27px;color:gray;userSelect:none;text-align:center;left:50%;";mxUtils.setPrefixedStyle(g.style,
-"transform","translate(-50%,0)");mxUtils.write(g,mxResources.get("decideLater"));mxEvent.addListener(g,"click",function(){a.hideDialog();var e=Editor.useLocalStorage;a.createFile(a.defaultFilename,null,null,null,null,null,null,!0);Editor.useLocalStorage=e});f.appendChild(g);mxClient.IS_SVG&&isLocalStorage&&"0"!=urlParams.gapi&&(null==document.documentMode||10<=document.documentMode)&&window.setTimeout(function(){null==a.drive&&(l.style.padding="7px",l.style.fontSize="9pt",l.style.marginTop="-14px",
-l.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>",f.appendChild(l))},5E3);this.container=f},SplashDialog=function(a){var d=document.createElement("div");d.style.textAlign="center";if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp){var c=
-a.addLanguageMenu(d,!0);null!=c&&(c.style.bottom="19px")}a.getServiceCount();var b=document.createElement("img");b.setAttribute("border","0");b.setAttribute("align","absmiddle");b.style.width="32px";b.style.height="32px";b.style.marginRight="8px";b.style.marginTop="-4px";var f=document.createElement("div");f.style.margin="8px 0px 0px 0px";f.style.padding="18px 0px 24px 0px";c="";a.mode==App.MODE_GOOGLE?(b.src=IMAGE_PATH+"/google-drive-logo.svg",c=mxResources.get("googleDrive")):a.mode==App.MODE_DROPBOX?
+App.MODE_DROPBOX,"dropbox");null!=a.gitHub&&b(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),App.MODE_GITHUB,"gitHub");null!=a.gitLab&&b(IMAGE_PATH+"/gitlab-logo.svg",mxResources.get("gitlab"),App.MODE_GITLAB,"gitLab");6>e&&null!=a.notion&&b(IMAGE_PATH+"/notion-logo.svg",mxResources.get("notion"),App.MODE_NOTION,"notion");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("decideLater"));mxEvent.addListener(f,"click",function(){a.hideDialog();var e=Editor.useLocalStorage;a.createFile(a.defaultFilename,null,null,null,null,null,null,!0);Editor.useLocalStorage=e});g.appendChild(f);mxClient.IS_SVG&&isLocalStorage&&"0"!=urlParams.gapi&&(null==document.documentMode||10<=document.documentMode)&&window.setTimeout(function(){null==a.drive&&(l.style.padding="7px",l.style.fontSize="9pt",l.style.marginTop="-14px",
+l.innerHTML='<a style="background-color:#dcdcdc;padding:6px;color:black;text-decoration:none;" href="https://desk.draw.io/a/solutions/articles/16000074659" target="_blank"><img border="0" src="'+mxGraph.prototype.warningImage.src+'" align="absmiddle" style="margin-top:-4px"> '+mxResources.get("googleDriveMissingClickHere")+"</a>",g.appendChild(l))},5E3);this.container=g},SplashDialog=function(a){var d=document.createElement("div");d.style.textAlign="center";if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp){var c=
+a.addLanguageMenu(d,!0);null!=c&&(c.style.bottom="19px")}a.getServiceCount();var b=document.createElement("img");b.setAttribute("border","0");b.setAttribute("align","absmiddle");b.style.width="32px";b.style.height="32px";b.style.marginRight="8px";b.style.marginTop="-4px";var g=document.createElement("div");g.style.margin="8px 0px 0px 0px";g.style.padding="18px 0px 24px 0px";c="";a.mode==App.MODE_GOOGLE?(b.src=IMAGE_PATH+"/google-drive-logo.svg",c=mxResources.get("googleDrive")):a.mode==App.MODE_DROPBOX?
(b.src=IMAGE_PATH+"/dropbox-logo.svg",c=mxResources.get("dropbox")):a.mode==App.MODE_ONEDRIVE?(b.src=IMAGE_PATH+"/onedrive-logo.svg",c=mxResources.get("oneDrive")):a.mode==App.MODE_GITHUB?(b.src=IMAGE_PATH+"/github-logo.svg",c=mxResources.get("github")):a.mode==App.MODE_GITLAB?(b.src=IMAGE_PATH+"/gitlab-logo.svg",c=mxResources.get("gitlab")):a.mode==App.MODE_NOTION?(b.src=IMAGE_PATH+"/notion-logo.svg",c=mxResources.get("notion")):a.mode==App.MODE_BROWSER?(b.src=IMAGE_PATH+"/osa_database.png",c=mxResources.get("browser")):
-a.mode==App.MODE_TRELLO?(b.src=IMAGE_PATH+"/trello-logo.svg",c=mxResources.get("trello")):(b.src=IMAGE_PATH+"/osa_drive-harddisk.png",f.style.paddingBottom="10px",f.style.paddingTop="30px",c=mxResources.get("device"));var g=document.createElement("button");g.className="geBigButton";g.style.marginBottom="8px";g.style.fontSize="18px";g.style.padding="10px";g.style.width="340px";if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)f.style.padding="42px 0px 56px 0px",g.style.marginBottom="12px";else{f.style.border=
-"1px solid #d3d3d3";f.style.borderWidth="1px 0px 1px 0px";var m=document.createElement("table"),e=document.createElement("tbody"),k=document.createElement("tr"),l=document.createElement("td"),n=document.createElement("td");m.setAttribute("align","center");l.appendChild(b);b=document.createElement("div");b.style.fontSize="22px";b.style.paddingBottom="6px";b.style.color="gray";mxUtils.write(b,c);n.style.textAlign="left";n.appendChild(b);k.appendChild(l);k.appendChild(n);e.appendChild(k);m.appendChild(e);
-d.appendChild(m);c=document.createElement("span");c.style.cssText="position:absolute;cursor:pointer;bottom:27px;color:gray;userSelect:none;text-align:center;left:50%;";mxUtils.setPrefixedStyle(c.style,"transform","translate(-50%,0)");mxUtils.write(c,mxResources.get("changeStorage"));mxEvent.addListener(c,"click",function(){a.hideDialog(!1);a.setMode(null);a.clearMode();a.showSplash(!0)});d.appendChild(c)}mxUtils.write(g,mxResources.get("createNewDiagram"));mxEvent.addListener(g,"click",function(){a.hideDialog();
-a.actions.get("new").funct()});f.appendChild(g);mxUtils.br(f);g=document.createElement("button");g.className="geBigButton";g.style.marginBottom="22px";g.style.fontSize="18px";g.style.padding="10px";g.style.width="340px";mxUtils.write(g,mxResources.get("openExistingDiagram"));mxEvent.addListener(g,"click",function(){a.actions.get("open").funct()});f.appendChild(g);a.mode==App.MODE_GOOGLE?mxResources.get("googleDrive"):a.mode==App.MODE_DROPBOX?mxResources.get("dropbox"):a.mode==App.MODE_ONEDRIVE?mxResources.get("oneDrive"):
-a.mode==App.MODE_GITHUB?mxResources.get("github"):a.mode==App.MODE_GITLAB?mxResources.get("gitlab"):a.mode==App.MODE_NOTION?mxResources.get("notion"):a.mode==App.MODE_TRELLO?mxResources.get("trello"):a.mode==App.MODE_DEVICE?mxResources.get("device"):a.mode==App.MODE_BROWSER&&mxResources.get("browser");if(!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp)if(c=function(e){g.style.marginBottom="24px";var b=document.createElement("a");b.style.display="inline-block";b.style.color="gray";b.style.cursor="pointer";
-b.style.marginTop="6px";mxUtils.write(b,mxResources.get("signOut"));g.style.marginBottom="16px";f.style.paddingBottom="18px";mxEvent.addListener(b,"click",function(){a.confirm(mxResources.get("areYouSure"),function(){e()})});f.appendChild(b)},a.mode==App.MODE_GOOGLE&&null!=a.drive){var p=a.drive.getUsersList();if(0<p.length){b=document.createElement("span");b.style.marginTop="6px";mxUtils.write(b,mxResources.get("changeUser")+":");g.style.marginBottom="16px";f.style.paddingBottom="18px";f.appendChild(b);
+a.mode==App.MODE_TRELLO?(b.src=IMAGE_PATH+"/trello-logo.svg",c=mxResources.get("trello")):(b.src=IMAGE_PATH+"/osa_drive-harddisk.png",g.style.paddingBottom="10px",g.style.paddingTop="30px",c=mxResources.get("device"));var f=document.createElement("button");f.className="geBigButton";f.style.marginBottom="8px";f.style.fontSize="18px";f.style.padding="10px";f.style.width="340px";if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)g.style.padding="42px 0px 56px 0px",f.style.marginBottom="12px";else{g.style.border=
+"1px solid #d3d3d3";g.style.borderWidth="1px 0px 1px 0px";var m=document.createElement("table"),e=document.createElement("tbody"),k=document.createElement("tr"),l=document.createElement("td"),n=document.createElement("td");m.setAttribute("align","center");l.appendChild(b);b=document.createElement("div");b.style.fontSize="22px";b.style.paddingBottom="6px";b.style.color="gray";mxUtils.write(b,c);n.style.textAlign="left";n.appendChild(b);k.appendChild(l);k.appendChild(n);e.appendChild(k);m.appendChild(e);
+d.appendChild(m);c=document.createElement("span");c.style.cssText="position:absolute;cursor:pointer;bottom:27px;color:gray;userSelect:none;text-align:center;left:50%;";mxUtils.setPrefixedStyle(c.style,"transform","translate(-50%,0)");mxUtils.write(c,mxResources.get("changeStorage"));mxEvent.addListener(c,"click",function(){a.hideDialog(!1);a.setMode(null);a.clearMode();a.showSplash(!0)});d.appendChild(c)}mxUtils.write(f,mxResources.get("createNewDiagram"));mxEvent.addListener(f,"click",function(){a.hideDialog();
+a.actions.get("new").funct()});g.appendChild(f);mxUtils.br(g);f=document.createElement("button");f.className="geBigButton";f.style.marginBottom="22px";f.style.fontSize="18px";f.style.padding="10px";f.style.width="340px";mxUtils.write(f,mxResources.get("openExistingDiagram"));mxEvent.addListener(f,"click",function(){a.actions.get("open").funct()});g.appendChild(f);a.mode==App.MODE_GOOGLE?mxResources.get("googleDrive"):a.mode==App.MODE_DROPBOX?mxResources.get("dropbox"):a.mode==App.MODE_ONEDRIVE?mxResources.get("oneDrive"):
+a.mode==App.MODE_GITHUB?mxResources.get("github"):a.mode==App.MODE_GITLAB?mxResources.get("gitlab"):a.mode==App.MODE_NOTION?mxResources.get("notion"):a.mode==App.MODE_TRELLO?mxResources.get("trello"):a.mode==App.MODE_DEVICE?mxResources.get("device"):a.mode==App.MODE_BROWSER&&mxResources.get("browser");if(!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp)if(c=function(e){f.style.marginBottom="24px";var b=document.createElement("a");b.style.display="inline-block";b.style.color="gray";b.style.cursor="pointer";
+b.style.marginTop="6px";mxUtils.write(b,mxResources.get("signOut"));f.style.marginBottom="16px";g.style.paddingBottom="18px";mxEvent.addListener(b,"click",function(){a.confirm(mxResources.get("areYouSure"),function(){e()})});g.appendChild(b)},a.mode==App.MODE_GOOGLE&&null!=a.drive){var p=a.drive.getUsersList();if(0<p.length){b=document.createElement("span");b.style.marginTop="6px";mxUtils.write(b,mxResources.get("changeUser")+":");f.style.marginBottom="16px";g.style.paddingBottom="18px";g.appendChild(b);
var q=document.createElement("select");q.style.marginLeft="4px";q.style.width="140px";for(c=0;c<p.length;c++)m=document.createElement("option"),mxUtils.write(m,p[c].displayName),m.value=c,q.appendChild(m),m=document.createElement("option"),m.innerHTML="&nbsp;&nbsp;&nbsp;",mxUtils.write(m,"<"+p[c].email+">"),m.setAttribute("disabled","disabled"),q.appendChild(m);m=document.createElement("option");mxUtils.write(m,mxResources.get("addAccount"));m.value=p.length;q.appendChild(m);mxEvent.addListener(q,
-"change",function(){var e=q.value,b=p.length!=e;b&&a.drive.setUser(p[e]);a.drive.authorize(b,function(){a.setMode(App.MODE_GOOGLE);a.hideDialog();a.showSplash()},function(e){a.handleError(e,null,function(){a.hideDialog();a.showSplash()})},!0)});f.appendChild(q)}else c(function(){a.drive.logout()})}else a.mode!=App.MODE_ONEDRIVE||null==a.oneDrive||a.oneDrive.noLogout?a.mode==App.MODE_GITHUB&&null!=a.gitHub?c(function(){a.gitHub.logout();a.openLink("https://www.github.com/logout")}):a.mode==App.MODE_GITLAB&&
-null!=a.gitLab?c(function(){a.gitLab.logout();a.openLink(DRAWIO_GITLAB_URL+"/users/sign_out")}):a.mode==App.MODE_NOTION&&null!=a.notion?c(function(){a.notion.logout()}):a.mode==App.MODE_TRELLO&&null!=a.trello?a.trello.isAuthorized()&&c(function(){a.trello.logout()}):a.mode==App.MODE_DROPBOX&&null!=a.dropbox&&c(function(){a.dropbox.logout();a.openLink("https://www.dropbox.com/logout")}):c(function(){a.oneDrive.logout()});d.appendChild(f);this.container=d},EmbedDialog=function(a,d,c,b,f,g,m,e,k){m=
-null!=m?m:"Check out the diagram I made using @drawio";b=document.createElement("div");var l=/^https?:\/\//.test(d)||/^mailto:\/\//.test(d);null!=g?mxUtils.write(b,g):mxUtils.write(b,mxResources.get(5E5>d.length?l?"link":"mainEmbedNotice":"preview")+":");mxUtils.br(b);g=document.createElement("div");g.style.position="absolute";g.style.top="30px";g.style.right="30px";g.style.color="gray";mxUtils.write(g,a.formatFileSize(d.length));b.appendChild(g);var n=document.createElement("textarea");n.setAttribute("autocomplete",
+"change",function(){var e=q.value,b=p.length!=e;b&&a.drive.setUser(p[e]);a.drive.authorize(b,function(){a.setMode(App.MODE_GOOGLE);a.hideDialog();a.showSplash()},function(e){a.handleError(e,null,function(){a.hideDialog();a.showSplash()})},!0)});g.appendChild(q)}else c(function(){a.drive.logout()})}else a.mode!=App.MODE_ONEDRIVE||null==a.oneDrive||a.oneDrive.noLogout?a.mode==App.MODE_GITHUB&&null!=a.gitHub?c(function(){a.gitHub.logout();a.openLink("https://www.github.com/logout")}):a.mode==App.MODE_GITLAB&&
+null!=a.gitLab?c(function(){a.gitLab.logout();a.openLink(DRAWIO_GITLAB_URL+"/users/sign_out")}):a.mode==App.MODE_NOTION&&null!=a.notion?c(function(){a.notion.logout()}):a.mode==App.MODE_TRELLO&&null!=a.trello?a.trello.isAuthorized()&&c(function(){a.trello.logout()}):a.mode==App.MODE_DROPBOX&&null!=a.dropbox&&c(function(){a.dropbox.logout();a.openLink("https://www.dropbox.com/logout")}):c(function(){a.oneDrive.logout()});d.appendChild(g);this.container=d},EmbedDialog=function(a,d,c,b,g,f,m,e,k){m=
+null!=m?m:"Check out the diagram I made using @drawio";b=document.createElement("div");var l=/^https?:\/\//.test(d)||/^mailto:\/\//.test(d);null!=f?mxUtils.write(b,f):mxUtils.write(b,mxResources.get(5E5>d.length?l?"link":"mainEmbedNotice":"preview")+":");mxUtils.br(b);f=document.createElement("div");f.style.position="absolute";f.style.top="30px";f.style.right="30px";f.style.color="gray";mxUtils.write(f,a.formatFileSize(d.length));b.appendChild(f);var n=document.createElement("textarea");n.setAttribute("autocomplete",
"off");n.setAttribute("autocorrect","off");n.setAttribute("autocapitalize","off");n.setAttribute("spellcheck","false");n.style.fontFamily="monospace";n.style.wordBreak="break-all";n.style.marginTop="10px";n.style.resize="none";n.style.height="150px";n.style.width="440px";n.style.border="1px solid gray";n.value=mxResources.get("updatingDocument");b.appendChild(n);mxUtils.br(b);this.init=function(){window.setTimeout(function(){5E5>d.length?(n.value=d,n.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?
-n.select():document.execCommand("selectAll",!1,null)):(n.setAttribute("readonly","true"),n.value=mxResources.get("tooLargeUseDownload"))},0)};g=document.createElement("div");g.style.position="absolute";g.style.bottom="36px";g.style.right="32px";var p=null;!EmbedDialog.showPreviewOption||mxClient.IS_CHROMEAPP&&!l||navigator.standalone||!(l||mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode))||(p=mxUtils.button(null!=e?e:mxResources.get(5E5>d.length?"preview":"openInNewWindow"),
-function(){var e=5E5>d.length?n.value:d;if(null!=f)f(e);else if(l)try{var b=a.openLink(e);null!=b&&(null==c||0<c)&&window.setTimeout(mxUtils.bind(this,function(){try{null!=b&&null!=b.location.href&&b.location.href.substring(0,8)!=e.substring(0,8)&&(b.close(),a.handleError({message:mxResources.get("drawingTooLarge")}))}catch(z){}}),c||500)}catch(z){a.handleError({message:z.message||mxResources.get("drawingTooLarge")})}else{var k=window.open(),k=null!=k?k.document:null;null!=k?(k.writeln("<html><head><title>"+
-encodeURIComponent(mxResources.get("preview"))+'</title><meta charset="utf-8"></head><body>'+d+"</body></html>"),k.close()):a.handleError({message:mxResources.get("errorUpdatingPreview")})}}),p.className="geBtn",g.appendChild(p));if(!l||7500<d.length)e=mxUtils.button(mxResources.get("download"),function(){a.hideDialog();a.saveData(null!=k?k:"embed.txt","txt",d,"text/plain")}),e.className="geBtn",g.appendChild(e);if(l&&(!a.isOffline()||mxClient.IS_CHROMEAPP)){if(51200>d.length){var q=mxUtils.button("",
+n.select():document.execCommand("selectAll",!1,null)):(n.setAttribute("readonly","true"),n.value=mxResources.get("tooLargeUseDownload"))},0)};f=document.createElement("div");f.style.position="absolute";f.style.bottom="36px";f.style.right="32px";var p=null;!EmbedDialog.showPreviewOption||mxClient.IS_CHROMEAPP&&!l||navigator.standalone||!(l||mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode))||(p=mxUtils.button(null!=e?e:mxResources.get(5E5>d.length?"preview":"openInNewWindow"),
+function(){var e=5E5>d.length?n.value:d;if(null!=g)g(e);else if(l)try{var b=a.openLink(e);null!=b&&(null==c||0<c)&&window.setTimeout(mxUtils.bind(this,function(){try{null!=b&&null!=b.location.href&&b.location.href.substring(0,8)!=e.substring(0,8)&&(b.close(),a.handleError({message:mxResources.get("drawingTooLarge")}))}catch(z){}}),c||500)}catch(z){a.handleError({message:z.message||mxResources.get("drawingTooLarge")})}else{var k=window.open(),k=null!=k?k.document:null;null!=k?(k.writeln("<html><head><title>"+
+encodeURIComponent(mxResources.get("preview"))+'</title><meta charset="utf-8"></head><body>'+d+"</body></html>"),k.close()):a.handleError({message:mxResources.get("errorUpdatingPreview")})}}),p.className="geBtn",f.appendChild(p));if(!l||7500<d.length)e=mxUtils.button(mxResources.get("download"),function(){a.hideDialog();a.saveData(null!=k?k:"embed.txt","txt",d,"text/plain")}),e.className="geBtn",f.appendChild(e);if(l&&(!a.isOffline()||mxClient.IS_CHROMEAPP)){if(51200>d.length){var q=mxUtils.button("",
function(){try{var e="https://www.facebook.com/sharer.php?p[url]="+encodeURIComponent(n.value);a.openLink(e)}catch(t){a.handleError({message:t.message||mxResources.get("drawingTooLarge")})}});e=document.createElement("img");e.setAttribute("src",Editor.facebookImage);e.setAttribute("width","18");e.setAttribute("height","18");e.setAttribute("border","0");q.appendChild(e);q.setAttribute("title",mxResources.get("facebook")+" ("+a.formatFileSize(51200)+" max)");q.style.verticalAlign="bottom";q.style.paddingTop=
-"4px";q.style.minWidth="46px";q.className="geBtn";g.appendChild(q)}7168>d.length&&(q=mxUtils.button("",function(){try{var e="https://twitter.com/intent/tweet?text="+encodeURIComponent(m)+"&url="+encodeURIComponent(n.value);a.openLink(e)}catch(t){a.handleError({message:t.message||mxResources.get("drawingTooLarge")})}}),e=document.createElement("img"),e.setAttribute("src",Editor.tweetImage),e.setAttribute("width","18"),e.setAttribute("height","18"),e.setAttribute("border","0"),e.style.marginBottom=
-"5px",q.appendChild(e),q.setAttribute("title",mxResources.get("twitter")+" ("+a.formatFileSize(7168)+" max)"),q.style.verticalAlign="bottom",q.style.paddingTop="4px",q.style.minWidth="46px",q.className="geBtn",g.appendChild(q))}e=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});g.appendChild(e);q=mxUtils.button(mxResources.get("copy"),function(){n.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?n.select():document.execCommand("selectAll",!1,null);document.execCommand("copy");
-a.alert(mxResources.get("copiedToClipboard"))});5E5>d.length?mxClient.IS_SF||null!=document.documentMode?e.className="geBtn gePrimaryBtn":(g.appendChild(q),q.className="geBtn gePrimaryBtn",e.className="geBtn"):(g.appendChild(p),e.className="geBtn",p.className="geBtn gePrimaryBtn");b.appendChild(g);this.container=b};EmbedDialog.showPreviewOption=!0;
+"4px";q.style.minWidth="46px";q.className="geBtn";f.appendChild(q)}7168>d.length&&(q=mxUtils.button("",function(){try{var e="https://twitter.com/intent/tweet?text="+encodeURIComponent(m)+"&url="+encodeURIComponent(n.value);a.openLink(e)}catch(t){a.handleError({message:t.message||mxResources.get("drawingTooLarge")})}}),e=document.createElement("img"),e.setAttribute("src",Editor.tweetImage),e.setAttribute("width","18"),e.setAttribute("height","18"),e.setAttribute("border","0"),e.style.marginBottom=
+"5px",q.appendChild(e),q.setAttribute("title",mxResources.get("twitter")+" ("+a.formatFileSize(7168)+" max)"),q.style.verticalAlign="bottom",q.style.paddingTop="4px",q.style.minWidth="46px",q.className="geBtn",f.appendChild(q))}e=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});f.appendChild(e);q=mxUtils.button(mxResources.get("copy"),function(){n.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?n.select():document.execCommand("selectAll",!1,null);document.execCommand("copy");
+a.alert(mxResources.get("copiedToClipboard"))});5E5>d.length?mxClient.IS_SF||null!=document.documentMode?e.className="geBtn gePrimaryBtn":(f.appendChild(q),q.className="geBtn gePrimaryBtn",e.className="geBtn"):(f.appendChild(p),e.className="geBtn",p.className="geBtn gePrimaryBtn");b.appendChild(f);this.container=b};EmbedDialog.showPreviewOption=!0;
var GoogleSitesDialog=function(a,d){function c(){var a=null!=D&&null!=D.getTitle()?D.getTitle():this.defaultFilename;if(B.checked&&""!=q.value){var e="https://www.draw.io/gadget.xml?type=4&diagram="+encodeURIComponent(mxUtils.htmlEntities(q.value));null!=a&&(e+="&title="+encodeURIComponent(a));0<C.length&&(e+="&s="+C);""!=u.value&&"0"!=u.value&&(e+="&border="+u.value);""!=p.value&&(e+="&height="+p.value);e+="&pan="+(t.checked?"1":"0");e+="&zoom="+(v.checked?"1":"0");e+="&fit="+(A.checked?"1":"0");
-e+="&resize="+(x.checked?"1":"0");e+="&x0="+Number(n.value);e+="&y0="+k;f.mathEnabled&&(e+="&math=1");y.checked?e+="&edit=_blank":z.checked&&(e+="&edit="+encodeURIComponent(mxUtils.htmlEntities(window.location.href)));l.value=e}else D.constructor==DriveFile||D.constructor==DropboxFile?(e="https://www.draw.io/gadget.xml?embed=0&diagram=",""!=q.value?e+=encodeURIComponent(mxUtils.htmlEntities(q.value))+"&type=3":(e+=D.getHash().substring(1),e=D.constructor==DropboxFile?e+"&type=2":e+"&type=1"),null!=
-a&&(e+="&title="+encodeURIComponent(a)),""!=p.value&&(a=parseInt(p.value)+parseInt(n.value),e+="&height="+a),l.value=e):l.value=""}var b=document.createElement("div"),f=a.editor.graph,g=f.getGraphBounds(),m=f.view.scale,e=Math.floor(g.x/m-f.view.translate.x),k=Math.floor(g.y/m-f.view.translate.y);mxUtils.write(b,mxResources.get("googleGadget")+":");mxUtils.br(b);var l=document.createElement("input");l.setAttribute("type","text");l.style.marginBottom="8px";l.style.marginTop="2px";l.style.width="410px";
+e+="&resize="+(x.checked?"1":"0");e+="&x0="+Number(n.value);e+="&y0="+k;g.mathEnabled&&(e+="&math=1");y.checked?e+="&edit=_blank":z.checked&&(e+="&edit="+encodeURIComponent(mxUtils.htmlEntities(window.location.href)));l.value=e}else D.constructor==DriveFile||D.constructor==DropboxFile?(e="https://www.draw.io/gadget.xml?embed=0&diagram=",""!=q.value?e+=encodeURIComponent(mxUtils.htmlEntities(q.value))+"&type=3":(e+=D.getHash().substring(1),e=D.constructor==DropboxFile?e+"&type=2":e+"&type=1"),null!=
+a&&(e+="&title="+encodeURIComponent(a)),""!=p.value&&(a=parseInt(p.value)+parseInt(n.value),e+="&height="+a),l.value=e):l.value=""}var b=document.createElement("div"),g=a.editor.graph,f=g.getGraphBounds(),m=g.view.scale,e=Math.floor(f.x/m-g.view.translate.x),k=Math.floor(f.y/m-g.view.translate.y);mxUtils.write(b,mxResources.get("googleGadget")+":");mxUtils.br(b);var l=document.createElement("input");l.setAttribute("type","text");l.style.marginBottom="8px";l.style.marginTop="2px";l.style.width="410px";
b.appendChild(l);mxUtils.br(b);this.init=function(){l.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?l.select():document.execCommand("selectAll",!1,null)};mxUtils.write(b,mxResources.get("top")+":");var n=document.createElement("input");n.setAttribute("type","text");n.setAttribute("size","4");n.style.marginRight="16px";n.style.marginLeft="4px";n.value=e;b.appendChild(n);mxUtils.write(b,mxResources.get("height")+":");var p=document.createElement("input");p.setAttribute("type","text");
-p.setAttribute("size","4");p.style.marginLeft="4px";p.value=Math.ceil(g.height/m);b.appendChild(p);mxUtils.br(b);g=document.createElement("hr");g.setAttribute("size","1");g.style.marginBottom="16px";g.style.marginTop="16px";b.appendChild(g);mxUtils.write(b,mxResources.get("publicDiagramUrl")+":");mxUtils.br(b);var q=document.createElement("input");q.setAttribute("type","text");q.setAttribute("size","28");q.style.marginBottom="8px";q.style.marginTop="2px";q.style.width="410px";q.value=d||"";b.appendChild(q);
+p.setAttribute("size","4");p.style.marginLeft="4px";p.value=Math.ceil(f.height/m);b.appendChild(p);mxUtils.br(b);f=document.createElement("hr");f.setAttribute("size","1");f.style.marginBottom="16px";f.style.marginTop="16px";b.appendChild(f);mxUtils.write(b,mxResources.get("publicDiagramUrl")+":");mxUtils.br(b);var q=document.createElement("input");q.setAttribute("type","text");q.setAttribute("size","28");q.style.marginBottom="8px";q.style.marginTop="2px";q.style.width="410px";q.value=d||"";b.appendChild(q);
mxUtils.br(b);mxUtils.write(b,mxResources.get("borderWidth")+":");var u=document.createElement("input");u.setAttribute("type","text");u.setAttribute("size","3");u.style.marginBottom="8px";u.style.marginLeft="4px";u.value="0";b.appendChild(u);mxUtils.br(b);var t=document.createElement("input");t.setAttribute("type","checkbox");t.setAttribute("checked","checked");t.defaultChecked=!0;t.style.marginLeft="16px";b.appendChild(t);mxUtils.write(b,mxResources.get("pan")+" ");var v=document.createElement("input");
v.setAttribute("type","checkbox");v.setAttribute("checked","checked");v.defaultChecked=!0;v.style.marginLeft="8px";b.appendChild(v);mxUtils.write(b,mxResources.get("zoom")+" ");var z=document.createElement("input");z.setAttribute("type","checkbox");z.style.marginLeft="8px";z.setAttribute("title",window.location.href);b.appendChild(z);mxUtils.write(b,mxResources.get("edit")+" ");var y=document.createElement("input");y.setAttribute("type","checkbox");y.style.marginLeft="8px";b.appendChild(y);mxUtils.write(b,
mxResources.get("asNew")+" ");mxUtils.br(b);var x=document.createElement("input");x.setAttribute("type","checkbox");x.setAttribute("checked","checked");x.defaultChecked=!0;x.style.marginLeft="16px";b.appendChild(x);mxUtils.write(b,mxResources.get("resize")+" ");var A=document.createElement("input");A.setAttribute("type","checkbox");A.style.marginLeft="8px";b.appendChild(A);mxUtils.write(b,mxResources.get("fit")+" ");var B=document.createElement("input");B.setAttribute("type","checkbox");B.style.marginLeft=
"8px";b.appendChild(B);mxUtils.write(b,mxResources.get("embed")+" ");var C=a.getBasenames().join(";"),D=a.getCurrentFile();mxEvent.addListener(t,"change",c);mxEvent.addListener(v,"change",c);mxEvent.addListener(x,"change",c);mxEvent.addListener(A,"change",c);mxEvent.addListener(z,"change",c);mxEvent.addListener(y,"change",c);mxEvent.addListener(B,"change",c);mxEvent.addListener(p,"change",c);mxEvent.addListener(n,"change",c);mxEvent.addListener(u,"change",c);mxEvent.addListener(q,"change",c);c();
-mxEvent.addListener(l,"click",function(){l.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?l.select():document.execCommand("selectAll",!1,null)});g=document.createElement("div");g.style.paddingTop="12px";g.style.textAlign="right";m=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});m.className="geBtn gePrimaryBtn";g.appendChild(m);b.appendChild(g);this.container=b},CreateGraphDialog=function(a,d,c){var b=document.createElement("div");b.style.textAlign="right";this.init=
-function(){var d=document.createElement("div");d.style.position="relative";d.style.border="1px solid gray";d.style.width="100%";d.style.height="360px";d.style.overflow="hidden";d.style.marginBottom="16px";mxEvent.disableContextMenu(d);b.appendChild(d);var g=new Graph(d);g.setCellsCloneable(!0);g.setPanning(!0);g.setAllowDanglingEdges(!1);g.connectionHandler.select=!1;g.view.setTranslate(20,20);g.border=20;g.panningHandler.useLeftButtonForPanning=!0;var m="curved=1;";g.cellRenderer.installCellOverlayListeners=
-function(a,e,b){mxCellRenderer.prototype.installCellOverlayListeners.apply(this,arguments);mxEvent.addListener(b.node,mxClient.IS_POINTER?"pointerdown":"mousedown",function(b){e.fireEvent(new mxEventObject("pointerdown","event",b,"state",a))});!mxClient.IS_POINTER&&mxClient.IS_TOUCH&&mxEvent.addListener(b.node,"touchstart",function(b){e.fireEvent(new mxEventObject("pointerdown","event",b,"state",a))})};g.getAllConnectionConstraints=function(){return null};g.connectionHandler.marker.highlight.keepOnTop=
-!1;g.connectionHandler.createEdgeState=function(a){a=g.createEdge(null,null,null,null,null,m);return new mxCellState(this.graph.view,a,this.graph.getCellStyle(a))};var e=g.getDefaultParent(),k=mxUtils.bind(this,function(a){var b=new mxCellOverlay(this.connectImage,"Add outgoing");b.cursor="hand";b.addListener(mxEvent.CLICK,function(b,c){g.connectionHandler.reset();g.clearSelection();var d=g.getCellGeometry(a),l;p(function(){l=g.insertVertex(e,null,"Entry",d.x,d.y,80,30,"rounded=1;");k(l);g.view.refresh(l);
-g.insertEdge(e,null,"",a,l,m)},function(){g.scrollCellToVisible(l)})});b.addListener("pointerdown",function(a,e){var b=e.getProperty("event"),c=e.getProperty("state");g.popupMenuHandler.hideMenu();g.stopEditing(!1);var d=mxUtils.convertPoint(g.container,mxEvent.getClientX(b),mxEvent.getClientY(b));g.connectionHandler.start(c,d.x,d.y);g.isMouseDown=!0;g.isMouseTrigger=mxEvent.isMouseEvent(b);mxEvent.consume(b)});g.addCellOverlay(a,b)});g.getModel().beginUpdate();var l;try{l=g.insertVertex(e,null,"Start",
-0,0,80,30,"ellipse"),k(l)}finally{g.getModel().endUpdate()}var n;"horizontalTree"==c?(n=new mxCompactTreeLayout(g),n.edgeRouting=!1,n.levelDistance=30,m="edgeStyle=elbowEdgeStyle;elbow=horizontal;"):"verticalTree"==c?(n=new mxCompactTreeLayout(g,!1),n.edgeRouting=!1,n.levelDistance=30,m="edgeStyle=elbowEdgeStyle;elbow=vertical;"):"radialTree"==c?(n=new mxRadialTreeLayout(g,!1),n.edgeRouting=!1,n.levelDistance=80):"verticalFlow"==c?n=new mxHierarchicalLayout(g,mxConstants.DIRECTION_NORTH):"horizontalFlow"==
-c?n=new mxHierarchicalLayout(g,mxConstants.DIRECTION_WEST):"organic"==c?(n=new mxFastOrganicLayout(g,!1),n.forceConstant=80):"circle"==c&&(n=new mxCircleLayout(g));if(null!=n){var p=function(a,e){g.getModel().beginUpdate();try{null!=a&&a(),n.execute(g.getDefaultParent(),l)}catch(x){throw x;}finally{var b=new mxMorphing(g);b.addListener(mxEvent.DONE,mxUtils.bind(this,function(){g.getModel().endUpdate();null!=e&&e()}));b.startAnimation()}},q=mxEdgeHandler.prototype.connect;mxEdgeHandler.prototype.connect=
-function(a,e,b,c,d){q.apply(this,arguments);p()};g.resizeCell=function(){mxGraph.prototype.resizeCell.apply(this,arguments);p()};g.connectionHandler.addListener(mxEvent.CONNECT,function(){p()})}var u=mxUtils.button(mxResources.get("close"),function(){a.confirm(mxResources.get("areYouSure"),function(){null!=d.parentNode&&(g.destroy(),d.parentNode.removeChild(d));a.hideDialog()})});u.className="geBtn";a.editor.cancelFirst&&b.appendChild(u);var t=mxUtils.button(mxResources.get("insert"),function(e){g.clearCellOverlays();
-var b=g.getModel().getChildren(g.getDefaultParent());e=mxEvent.isAltDown(e)?a.editor.graph.getFreeInsertPoint():a.editor.graph.getCenterInsertPoint(g.getBoundingBoxFromGeometry(b,!0));b=a.editor.graph.importCells(b,e.x,e.y);e=a.editor.graph.view;var c=e.getBounds(b);c.x-=e.translate.x;c.y-=e.translate.y;a.editor.graph.scrollRectToVisible(c);a.editor.graph.setSelectionCells(b);null!=d.parentNode&&(g.destroy(),d.parentNode.removeChild(d));a.hideDialog()});b.appendChild(t);t.className="geBtn gePrimaryBtn";
+mxEvent.addListener(l,"click",function(){l.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?l.select():document.execCommand("selectAll",!1,null)});f=document.createElement("div");f.style.paddingTop="12px";f.style.textAlign="right";m=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});m.className="geBtn gePrimaryBtn";f.appendChild(m);b.appendChild(f);this.container=b},CreateGraphDialog=function(a,d,c){var b=document.createElement("div");b.style.textAlign="right";this.init=
+function(){var d=document.createElement("div");d.style.position="relative";d.style.border="1px solid gray";d.style.width="100%";d.style.height="360px";d.style.overflow="hidden";d.style.marginBottom="16px";mxEvent.disableContextMenu(d);b.appendChild(d);var f=new Graph(d);f.setCellsCloneable(!0);f.setPanning(!0);f.setAllowDanglingEdges(!1);f.connectionHandler.select=!1;f.view.setTranslate(20,20);f.border=20;f.panningHandler.useLeftButtonForPanning=!0;var m="curved=1;";f.cellRenderer.installCellOverlayListeners=
+function(a,e,b){mxCellRenderer.prototype.installCellOverlayListeners.apply(this,arguments);mxEvent.addListener(b.node,mxClient.IS_POINTER?"pointerdown":"mousedown",function(b){e.fireEvent(new mxEventObject("pointerdown","event",b,"state",a))});!mxClient.IS_POINTER&&mxClient.IS_TOUCH&&mxEvent.addListener(b.node,"touchstart",function(b){e.fireEvent(new mxEventObject("pointerdown","event",b,"state",a))})};f.getAllConnectionConstraints=function(){return null};f.connectionHandler.marker.highlight.keepOnTop=
+!1;f.connectionHandler.createEdgeState=function(a){a=f.createEdge(null,null,null,null,null,m);return new mxCellState(this.graph.view,a,this.graph.getCellStyle(a))};var e=f.getDefaultParent(),k=mxUtils.bind(this,function(a){var b=new mxCellOverlay(this.connectImage,"Add outgoing");b.cursor="hand";b.addListener(mxEvent.CLICK,function(b,c){f.connectionHandler.reset();f.clearSelection();var d=f.getCellGeometry(a),l;p(function(){l=f.insertVertex(e,null,"Entry",d.x,d.y,80,30,"rounded=1;");k(l);f.view.refresh(l);
+f.insertEdge(e,null,"",a,l,m)},function(){f.scrollCellToVisible(l)})});b.addListener("pointerdown",function(a,e){var b=e.getProperty("event"),c=e.getProperty("state");f.popupMenuHandler.hideMenu();f.stopEditing(!1);var d=mxUtils.convertPoint(f.container,mxEvent.getClientX(b),mxEvent.getClientY(b));f.connectionHandler.start(c,d.x,d.y);f.isMouseDown=!0;f.isMouseTrigger=mxEvent.isMouseEvent(b);mxEvent.consume(b)});f.addCellOverlay(a,b)});f.getModel().beginUpdate();var l;try{l=f.insertVertex(e,null,"Start",
+0,0,80,30,"ellipse"),k(l)}finally{f.getModel().endUpdate()}var n;"horizontalTree"==c?(n=new mxCompactTreeLayout(f),n.edgeRouting=!1,n.levelDistance=30,m="edgeStyle=elbowEdgeStyle;elbow=horizontal;"):"verticalTree"==c?(n=new mxCompactTreeLayout(f,!1),n.edgeRouting=!1,n.levelDistance=30,m="edgeStyle=elbowEdgeStyle;elbow=vertical;"):"radialTree"==c?(n=new mxRadialTreeLayout(f,!1),n.edgeRouting=!1,n.levelDistance=80):"verticalFlow"==c?n=new mxHierarchicalLayout(f,mxConstants.DIRECTION_NORTH):"horizontalFlow"==
+c?n=new mxHierarchicalLayout(f,mxConstants.DIRECTION_WEST):"organic"==c?(n=new mxFastOrganicLayout(f,!1),n.forceConstant=80):"circle"==c&&(n=new mxCircleLayout(f));if(null!=n){var p=function(a,e){f.getModel().beginUpdate();try{null!=a&&a(),n.execute(f.getDefaultParent(),l)}catch(x){throw x;}finally{var b=new mxMorphing(f);b.addListener(mxEvent.DONE,mxUtils.bind(this,function(){f.getModel().endUpdate();null!=e&&e()}));b.startAnimation()}},q=mxEdgeHandler.prototype.connect;mxEdgeHandler.prototype.connect=
+function(a,e,b,c,d){q.apply(this,arguments);p()};f.resizeCell=function(){mxGraph.prototype.resizeCell.apply(this,arguments);p()};f.connectionHandler.addListener(mxEvent.CONNECT,function(){p()})}var u=mxUtils.button(mxResources.get("close"),function(){a.confirm(mxResources.get("areYouSure"),function(){null!=d.parentNode&&(f.destroy(),d.parentNode.removeChild(d));a.hideDialog()})});u.className="geBtn";a.editor.cancelFirst&&b.appendChild(u);var t=mxUtils.button(mxResources.get("insert"),function(e){f.clearCellOverlays();
+var b=f.getModel().getChildren(f.getDefaultParent());e=mxEvent.isAltDown(e)?a.editor.graph.getFreeInsertPoint():a.editor.graph.getCenterInsertPoint(f.getBoundingBoxFromGeometry(b,!0));b=a.editor.graph.importCells(b,e.x,e.y);e=a.editor.graph.view;var c=e.getBounds(b);c.x-=e.translate.x;c.y-=e.translate.y;a.editor.graph.scrollRectToVisible(c);a.editor.graph.setSelectionCells(b);null!=d.parentNode&&(f.destroy(),d.parentNode.removeChild(d));a.hideDialog()});b.appendChild(t);t.className="geBtn gePrimaryBtn";
a.editor.cancelFirst||b.appendChild(u)};this.container=b};
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(a,d,c){var b=document.createElement("div");b.style.whiteSpace="nowrap";var f=document.createElement("h2");mxUtils.write(f,mxResources.get("backgroundImage"));f.style.marginTop="0px";b.appendChild(f);var g=null!=c&&null!=c.originalSrc,f=!1,m=document.createElement("input");m.style.cssText="margin-right:8px;margin-bottom:8px;";m.setAttribute("value","url");m.setAttribute("type","radio");m.setAttribute("name","geBackgroundImageDialogOption");var e=document.createElement("input");
-e.style.cssText="margin-right:8px;margin-bottom:8px;";e.setAttribute("value","url");e.setAttribute("type","radio");e.setAttribute("name","geBackgroundImageDialogOption");var k=document.createElement("input");k.setAttribute("type","text");k.style.marginBottom="8px";k.style.width="320px";k.value=g||null==c?"":c.src;var l=document.createElement("select");l.style.width="320px";for(var n=0;n<a.pages.length;n++){var p=document.createElement("option");mxUtils.write(p,a.pages[n].getName()||mxResources.get("pageWithNumber",
-[n+1]));p.setAttribute("value","data:page/id,"+a.pages[n].getId());null!=c&&c.originalSrc==p.getAttribute("value")&&(p.setAttribute("selected","selected"),f=!0);l.appendChild(p)}var q=!1,u=!1,t=function(b,c){q||null!=b&&u||(e.checked?null!=c&&c(l.value):""==k.value||a.isOffline()?(v.value="",z.value="",null!=c&&c("")):(k.value=mxUtils.trim(k.value),a.loadImage(k.value,function(a){v.value=a.width;z.value=a.height;null!=c&&c(k.value)},function(){a.showError(mxResources.get("error"),mxResources.get("fileNotFound"),
-mxResources.get("ok"));v.value="";z.value="";null!=c&&c(null)})))};this.init=function(){g?l.focus():k.focus();mxEvent.addListener(l,"focus",function(){m.removeAttribute("checked");e.setAttribute("checked","checked");e.checked=!0});mxEvent.addListener(k,"focus",function(){e.removeAttribute("checked");m.setAttribute("checked","checked");m.checked=!0});if(Graph.fileSupport){k.setAttribute("placeholder",mxResources.get("dragImagesHere"));var c=b.parentNode,d=null;mxEvent.addListener(c,"dragleave",function(a){null!=
+var BackgroundImageDialog=function(a,d,c){var b=document.createElement("div");b.style.whiteSpace="nowrap";var g=document.createElement("h2");mxUtils.write(g,mxResources.get("backgroundImage"));g.style.marginTop="0px";b.appendChild(g);var f=null!=c&&null!=c.originalSrc,g=!1,m=document.createElement("input");m.style.cssText="margin-right:8px;margin-bottom:8px;";m.setAttribute("value","url");m.setAttribute("type","radio");m.setAttribute("name","geBackgroundImageDialogOption");var e=document.createElement("input");
+e.style.cssText="margin-right:8px;margin-bottom:8px;";e.setAttribute("value","url");e.setAttribute("type","radio");e.setAttribute("name","geBackgroundImageDialogOption");var k=document.createElement("input");k.setAttribute("type","text");k.style.marginBottom="8px";k.style.width="320px";k.value=f||null==c?"":c.src;var l=document.createElement("select");l.style.width="320px";for(var n=0;n<a.pages.length;n++){var p=document.createElement("option");mxUtils.write(p,a.pages[n].getName()||mxResources.get("pageWithNumber",
+[n+1]));p.setAttribute("value","data:page/id,"+a.pages[n].getId());null!=c&&c.originalSrc==p.getAttribute("value")&&(p.setAttribute("selected","selected"),g=!0);l.appendChild(p)}var q=!1,u=!1,t=function(b,c){q||null!=b&&u||(e.checked?null!=c&&c(l.value):""==k.value||a.isOffline()?(v.value="",z.value="",null!=c&&c("")):(k.value=mxUtils.trim(k.value),a.loadImage(k.value,function(a){v.value=a.width;z.value=a.height;null!=c&&c(k.value)},function(){a.showError(mxResources.get("error"),mxResources.get("fileNotFound"),
+mxResources.get("ok"));v.value="";z.value="";null!=c&&c(null)})))};this.init=function(){f?l.focus():k.focus();mxEvent.addListener(l,"focus",function(){m.removeAttribute("checked");e.setAttribute("checked","checked");e.checked=!0});mxEvent.addListener(k,"focus",function(){e.removeAttribute("checked");m.setAttribute("checked","checked");m.checked=!0});if(Graph.fileSupport){k.setAttribute("placeholder",mxResources.get("dragImagesHere"));var c=b.parentNode,d=null;mxEvent.addListener(c,"dragleave",function(a){null!=
d&&(d.parentNode.removeChild(d),d=null);a.stopPropagation();a.preventDefault()});mxEvent.addListener(c,"dragover",mxUtils.bind(this,function(e){null==d&&(!mxClient.IS_IE||10<document.documentMode)&&(d=a.highlightElement(c));e.stopPropagation();e.preventDefault()}));mxEvent.addListener(c,"drop",mxUtils.bind(this,function(e){null!=d&&(d.parentNode.removeChild(d),d=null);if(0<e.dataTransfer.files.length)a.importFiles(e.dataTransfer.files,0,0,a.maxBackgroundSize,function(a,e,b,c,d,l){k.value=a;t()},function(){},
function(a){return"image/"==a.type.substring(0,6)},function(a){for(var e=0;e<a.length;e++)a[e]()},!0,a.maxBackgroundBytes,a.maxBackgroundBytes,!0);else if(0<=mxUtils.indexOf(e.dataTransfer.types,"text/uri-list")){var b=e.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(b)&&(k.value=decodeURIComponent(b),t())}e.stopPropagation();e.preventDefault()}),!1)}};b.appendChild(m);b.appendChild(k);mxUtils.br(b);n=document.createElement("span");n.style.marginLeft="30px";mxUtils.write(n,
-mxResources.get("width")+":");b.appendChild(n);var v=document.createElement("input");v.setAttribute("type","text");v.style.width="60px";v.style.marginLeft="8px";v.style.marginRight="16px";v.value=null==c||g?"":c.width;b.appendChild(v);mxUtils.write(b,mxResources.get("height")+":");var z=document.createElement("input");z.setAttribute("type","text");z.style.width="60px";z.style.marginLeft="8px";z.style.marginRight="16px";z.value=null==c||g?"":c.height;b.appendChild(z);mxUtils.br(b);mxUtils.br(b);mxEvent.addListener(k,
-"change",t);ImageDialog.filePicked=function(a){a.action==google.picker.Action.PICKED&&null!=a.docs[0].thumbnails&&(a=a.docs[0].thumbnails[a.docs[0].thumbnails.length-1],null!=a&&(k.value=a.url,t()));k.focus()};b.appendChild(e);b.appendChild(l);mxUtils.br(b);g?(e.setAttribute("checked","checked"),e.checked=!0):(m.setAttribute("checked","checked"),m.checked=!0);if(!f&&e.checked){var y=document.createElement("option");mxUtils.write(y,mxResources.get("pageNotFound"));y.setAttribute("disabled","disabled");
-y.setAttribute("selected","selected");y.setAttribute("value","pageNotFound");l.appendChild(y);mxEvent.addListener(l,"change",function(){null==y.parentNode||y.selected||y.parentNode.removeChild(y)})}c=document.createElement("div");c.style.marginTop="30px";c.style.textAlign="right";f=mxUtils.button(mxResources.get("reset"),function(){k.value="";v.value="";z.value="";m.checked=!0;q=!1});mxEvent.addGestureListeners(f,function(){q=!0});f.className="geBtn";f.width="100";c.appendChild(f);f=mxUtils.button(mxResources.get("cancel"),
-function(){q=!0;a.hideDialog()});f.className="geBtn";a.editor.cancelFirst&&c.appendChild(f);applyBtn=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();t(null,function(a){d(""!=a&&null!=a?new mxImage(a,v.value,z.value):null,null==a)})});mxEvent.addGestureListeners(applyBtn,function(){u=!0});applyBtn.className="geBtn gePrimaryBtn";c.appendChild(applyBtn);a.editor.cancelFirst||c.appendChild(f);b.appendChild(c);this.container=b},ParseDialog=function(a,d,c){function b(e,b,c){var d=e.split("\n");
-if("plantUmlPng"==b||"plantUmlSvg"==b||"plantUmlTxt"==b){if(a.spinner.spin(document.body,mxResources.get("inserting"))){var k=function(e,b,d,k,f){g=mxEvent.isAltDown(c)?g:l.getCenterInsertPoint(new mxRectangle(0,0,k,f));var n=null;l.getModel().beginUpdate();try{n="txt"==b?a.insertAsPreText(d,g.x,g.y):l.insertVertex(null,null,null,g.x,g.y,k,f,"shape=image;noLabel=1;verticalAlign=top;aspect=fixed;imageAspect=0;image="+a.convertDataUri(d)+";"),l.setAttributeForCell(n,"plantUmlData",JSON.stringify({data:e,
-format:b},null,2))}finally{l.getModel().endUpdate()}null!=n&&(l.setSelectionCell(n),l.scrollCellToVisible(n))},l=a.editor.graph,f="plantUmlTxt"==b?"txt":"plantUmlPng"==b?"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"==f?window.setTimeout(function(){a.spinner.stop();k(e,f,"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiBjb250ZW50U2NyaXB0VHlwZT0iYXBwbGljYXRpb24vZWNtYXNjcmlwdCIgY29udGVudFN0eWxlVHlwZT0idGV4dC9jc3MiIGhlaWdodD0iMjEycHgiIHByZXNlcnZlQXNwZWN0UmF0aW89Im5vbmUiIHN0eWxlPSJ3aWR0aDoyOTVweDtoZWlnaHQ6MjEycHg7IiB2ZXJzaW9uPSIxLjEiIHZpZXdCb3g9IjAgMCAyOTUgMjEyIiB3aWR0aD0iMjk1cHgiIHpvb21BbmRQYW49Im1hZ25pZnkiPjxkZWZzLz48Zz48bGluZSBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsgc3Ryb2tlLWRhc2hhcnJheTogNS4wLDUuMDsiIHgxPSIzMSIgeDI9IjMxIiB5MT0iMzQuNDg4MyIgeTI9IjE3MS43MzA1Ii8+PGxpbmUgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjA7IHN0cm9rZS1kYXNoYXJyYXk6IDUuMCw1LjA7IiB4MT0iMjY0LjUiIHgyPSIyNjQuNSIgeTE9IjM0LjQ4ODMiIHkyPSIxNzEuNzMwNSIvPjxyZWN0IGZpbGw9IiNGRUZFQ0UiIGhlaWdodD0iMzAuNDg4MyIgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjU7IiB3aWR0aD0iNDciIHg9IjgiIHk9IjMiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNCIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIzMyIgeD0iMTUiIHk9IjIzLjUzNTIiPkFsaWNlPC90ZXh0PjxyZWN0IGZpbGw9IiNGRUZFQ0UiIGhlaWdodD0iMzAuNDg4MyIgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjU7IiB3aWR0aD0iNDciIHg9IjgiIHk9IjE3MC43MzA1Ii8+PHRleHQgZmlsbD0iIzAwMDAwMCIgZm9udC1mYW1pbHk9InNhbnMtc2VyaWYiIGZvbnQtc2l6ZT0iMTQiIGxlbmd0aEFkanVzdD0ic3BhY2luZ0FuZEdseXBocyIgdGV4dExlbmd0aD0iMzMiIHg9IjE1IiB5PSIxOTEuMjY1NiI+QWxpY2U8L3RleHQ+PHJlY3QgZmlsbD0iI0ZFRkVDRSIgaGVpZ2h0PSIzMC40ODgzIiBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuNTsiIHdpZHRoPSI0MCIgeD0iMjQ0LjUiIHk9IjMiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNCIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIyNiIgeD0iMjUxLjUiIHk9IjIzLjUzNTIiPkJvYjwvdGV4dD48cmVjdCBmaWxsPSIjRkVGRUNFIiBoZWlnaHQ9IjMwLjQ4ODMiIHN0eWxlPSJzdHJva2U6ICNBODAwMzY7IHN0cm9rZS13aWR0aDogMS41OyIgd2lkdGg9IjQwIiB4PSIyNDQuNSIgeT0iMTcwLjczMDUiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNCIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIyNiIgeD0iMjUxLjUiIHk9IjE5MS4yNjU2Ij5Cb2I8L3RleHQ+PHBvbHlnb24gZmlsbD0iI0E4MDAzNiIgcG9pbnRzPSIyNTIuNSw2MS43OTg4LDI2Mi41LDY1Ljc5ODgsMjUyLjUsNjkuNzk4OCwyNTYuNSw2NS43OTg4IiBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsiLz48bGluZSBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsiIHgxPSIzMS41IiB4Mj0iMjU4LjUiIHkxPSI2NS43OTg4IiB5Mj0iNjUuNzk4OCIvPjx0ZXh0IGZpbGw9IiMwMDAwMDAiIGZvbnQtZmFtaWx5PSJzYW5zLXNlcmlmIiBmb250LXNpemU9IjEzIiBsZW5ndGhBZGp1c3Q9InNwYWNpbmdBbmRHbHlwaHMiIHRleHRMZW5ndGg9IjE0NyIgeD0iMzguNSIgeT0iNjEuMDU2NiI+QXV0aGVudGljYXRpb24gUmVxdWVzdDwvdGV4dD48cG9seWdvbiBmaWxsPSIjQTgwMDM2IiBwb2ludHM9IjQyLjUsOTEuMTA5NCwzMi41LDk1LjEwOTQsNDIuNSw5OS4xMDk0LDM4LjUsOTUuMTA5NCIgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjA7Ii8+PGxpbmUgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjA7IHN0cm9rZS1kYXNoYXJyYXk6IDIuMCwyLjA7IiB4MT0iMzYuNSIgeDI9IjI2My41IiB5MT0iOTUuMTA5NCIgeTI9Ijk1LjEwOTQiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxMyIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIxNTciIHg9IjQ4LjUiIHk9IjkwLjM2NzIiPkF1dGhlbnRpY2F0aW9uIFJlc3BvbnNlPC90ZXh0Pjxwb2x5Z29uIGZpbGw9IiNBODAwMzYiIHBvaW50cz0iMjUyLjUsMTIwLjQxOTksMjYyLjUsMTI0LjQxOTksMjUyLjUsMTI4LjQxOTksMjU2LjUsMTI0LjQxOTkiIHN0eWxlPSJzdHJva2U6ICNBODAwMzY7IHN0cm9rZS13aWR0aDogMS4wOyIvPjxsaW5lIHN0eWxlPSJzdHJva2U6ICNBODAwMzY7IHN0cm9rZS13aWR0aDogMS4wOyIgeDE9IjMxLjUiIHgyPSIyNTguNSIgeTE9IjEyNC40MTk5IiB5Mj0iMTI0LjQxOTkiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxMyIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIxOTkiIHg9IjM4LjUiIHk9IjExOS42Nzc3Ij5Bbm90aGVyIGF1dGhlbnRpY2F0aW9uIFJlcXVlc3Q8L3RleHQ+PHBvbHlnb24gZmlsbD0iI0E4MDAzNiIgcG9pbnRzPSI0Mi41LDE0OS43MzA1LDMyLjUsMTUzLjczMDUsNDIuNSwxNTcuNzMwNSwzOC41LDE1My43MzA1IiBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsiLz48bGluZSBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsgc3Ryb2tlLWRhc2hhcnJheTogMi4wLDIuMDsiIHgxPSIzNi41IiB4Mj0iMjYzLjUiIHkxPSIxNTMuNzMwNSIgeTI9IjE1My43MzA1Ii8+PHRleHQgZmlsbD0iIzAwMDAwMCIgZm9udC1mYW1pbHk9InNhbnMtc2VyaWYiIGZvbnQtc2l6ZT0iMTMiIGxlbmd0aEFkanVzdD0ic3BhY2luZ0FuZEdseXBocyIgdGV4dExlbmd0aD0iMjA5IiB4PSI0OC41IiB5PSIxNDguOTg4MyI+QW5vdGhlciBhdXRoZW50aWNhdGlvbiBSZXNwb25zZTwvdGV4dD48IS0tTUQ1PVs3ZjNlNGQwYzkwMWVmZGJjNTdlYjQ0MjQ5YTNiODE5N10KQHN0YXJ0dW1sDQpza2lucGFyYW0gc2hhZG93aW5nIGZhbHNlDQpBbGljZSAtPiBCb2I6IEF1dGhlbnRpY2F0aW9uIFJlcXVlc3QNCkJvYiAtIC0+IEFsaWNlOiBBdXRoZW50aWNhdGlvbiBSZXNwb25zZQ0KDQpBbGljZSAtPiBCb2I6IEFub3RoZXIgYXV0aGVudGljYXRpb24gUmVxdWVzdA0KQWxpY2UgPC0gLSBCb2I6IEFub3RoZXIgYXV0aGVudGljYXRpb24gUmVzcG9uc2UNCkBlbmR1bWwNCgpQbGFudFVNTCB2ZXJzaW9uIDEuMjAyMC4wMihTdW4gTWFyIDAxIDA0OjIyOjA3IENTVCAyMDIwKQooTUlUIHNvdXJjZSBkaXN0cmlidXRpb24pCkphdmEgUnVudGltZTogT3BlbkpESyBSdW50aW1lIEVudmlyb25tZW50CkpWTTogT3BlbkpESyA2NC1CaXQgU2VydmVyIFZNCkphdmEgVmVyc2lvbjogMTIrMzMKT3BlcmF0aW5nIFN5c3RlbTogTWFjIE9TIFgKRGVmYXVsdCBFbmNvZGluZzogVVRGLTgKTGFuZ3VhZ2U6IGVuCkNvdW50cnk6IFVTCi0tPjwvZz48L3N2Zz4=",
-295,212)},200):a.generatePlantUmlImage(e,f,function(b,c,d){a.spinner.stop();k(e,f,b,c,d)},function(b){a.handleError(b)})}}else if("mermaid"==b)a.spinner.spin(document.body,mxResources.get("inserting"))&&(l=a.editor.graph,a.generateMermaidImage(e,f,function(b,d,k){g=mxEvent.isAltDown(c)?g:l.getCenterInsertPoint(new mxRectangle(0,0,d,k));a.spinner.stop();var f=null;l.getModel().beginUpdate();try{f=l.insertVertex(null,null,null,g.x,g.y,d,k,"shape=image;noLabel=1;verticalAlign=top;imageAspect=1;image="+
-b+";"),l.setAttributeForCell(f,"mermaidData",JSON.stringify({data:e,config:EditorUi.defaultMermaidConfig},null,2))}finally{l.getModel().endUpdate()}null!=f&&(l.setSelectionCell(f),l.scrollCellToVisible(f))},function(b){a.handleError(b)}));else if("table"==b){var n=null,p=[],q=0;for(b=0;b<d.length;b++){var m=mxUtils.trim(d[b]);if("create table"==m.substring(0,12).toLowerCase())m=mxUtils.trim(m.substring(12)),"("==m.charAt(m.length-1)&&(m=mxUtils.trim(m.substring(0,m.length-1))),n=new mxCell(m,new mxGeometry(q,
+mxResources.get("width")+":");b.appendChild(n);var v=document.createElement("input");v.setAttribute("type","text");v.style.width="60px";v.style.marginLeft="8px";v.style.marginRight="16px";v.value=null==c||f?"":c.width;b.appendChild(v);mxUtils.write(b,mxResources.get("height")+":");var z=document.createElement("input");z.setAttribute("type","text");z.style.width="60px";z.style.marginLeft="8px";z.style.marginRight="16px";z.value=null==c||f?"":c.height;b.appendChild(z);mxUtils.br(b);mxUtils.br(b);mxEvent.addListener(k,
+"change",t);ImageDialog.filePicked=function(a){a.action==google.picker.Action.PICKED&&null!=a.docs[0].thumbnails&&(a=a.docs[0].thumbnails[a.docs[0].thumbnails.length-1],null!=a&&(k.value=a.url,t()));k.focus()};b.appendChild(e);b.appendChild(l);mxUtils.br(b);f?(e.setAttribute("checked","checked"),e.checked=!0):(m.setAttribute("checked","checked"),m.checked=!0);if(!g&&e.checked){var y=document.createElement("option");mxUtils.write(y,mxResources.get("pageNotFound"));y.setAttribute("disabled","disabled");
+y.setAttribute("selected","selected");y.setAttribute("value","pageNotFound");l.appendChild(y);mxEvent.addListener(l,"change",function(){null==y.parentNode||y.selected||y.parentNode.removeChild(y)})}c=document.createElement("div");c.style.marginTop="30px";c.style.textAlign="right";g=mxUtils.button(mxResources.get("reset"),function(){k.value="";v.value="";z.value="";m.checked=!0;q=!1});mxEvent.addGestureListeners(g,function(){q=!0});g.className="geBtn";g.width="100";c.appendChild(g);g=mxUtils.button(mxResources.get("cancel"),
+function(){q=!0;a.hideDialog()});g.className="geBtn";a.editor.cancelFirst&&c.appendChild(g);applyBtn=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();t(null,function(a){d(""!=a&&null!=a?new mxImage(a,v.value,z.value):null,null==a)})});mxEvent.addGestureListeners(applyBtn,function(){u=!0});applyBtn.className="geBtn gePrimaryBtn";c.appendChild(applyBtn);a.editor.cancelFirst||c.appendChild(g);b.appendChild(c);this.container=b},ParseDialog=function(a,d,c){function b(e,b,c){var d=e.split("\n");
+if("plantUmlPng"==b||"plantUmlSvg"==b||"plantUmlTxt"==b){if(a.spinner.spin(document.body,mxResources.get("inserting"))){var k=function(e,b,d,k,g){f=mxEvent.isAltDown(c)?f:l.getCenterInsertPoint(new mxRectangle(0,0,k,g));var n=null;l.getModel().beginUpdate();try{n="txt"==b?a.insertAsPreText(d,f.x,f.y):l.insertVertex(null,null,null,f.x,f.y,k,g,"shape=image;noLabel=1;verticalAlign=top;aspect=fixed;imageAspect=0;image="+a.convertDataUri(d)+";"),l.setAttributeForCell(n,"plantUmlData",JSON.stringify({data:e,
+format:b},null,2))}finally{l.getModel().endUpdate()}null!=n&&(l.setSelectionCell(n),l.scrollCellToVisible(n))},l=a.editor.graph,g="plantUmlTxt"==b?"txt":"plantUmlPng"==b?"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"==g?window.setTimeout(function(){a.spinner.stop();k(e,g,"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiBjb250ZW50U2NyaXB0VHlwZT0iYXBwbGljYXRpb24vZWNtYXNjcmlwdCIgY29udGVudFN0eWxlVHlwZT0idGV4dC9jc3MiIGhlaWdodD0iMjEycHgiIHByZXNlcnZlQXNwZWN0UmF0aW89Im5vbmUiIHN0eWxlPSJ3aWR0aDoyOTVweDtoZWlnaHQ6MjEycHg7IiB2ZXJzaW9uPSIxLjEiIHZpZXdCb3g9IjAgMCAyOTUgMjEyIiB3aWR0aD0iMjk1cHgiIHpvb21BbmRQYW49Im1hZ25pZnkiPjxkZWZzLz48Zz48bGluZSBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsgc3Ryb2tlLWRhc2hhcnJheTogNS4wLDUuMDsiIHgxPSIzMSIgeDI9IjMxIiB5MT0iMzQuNDg4MyIgeTI9IjE3MS43MzA1Ii8+PGxpbmUgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjA7IHN0cm9rZS1kYXNoYXJyYXk6IDUuMCw1LjA7IiB4MT0iMjY0LjUiIHgyPSIyNjQuNSIgeTE9IjM0LjQ4ODMiIHkyPSIxNzEuNzMwNSIvPjxyZWN0IGZpbGw9IiNGRUZFQ0UiIGhlaWdodD0iMzAuNDg4MyIgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjU7IiB3aWR0aD0iNDciIHg9IjgiIHk9IjMiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNCIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIzMyIgeD0iMTUiIHk9IjIzLjUzNTIiPkFsaWNlPC90ZXh0PjxyZWN0IGZpbGw9IiNGRUZFQ0UiIGhlaWdodD0iMzAuNDg4MyIgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjU7IiB3aWR0aD0iNDciIHg9IjgiIHk9IjE3MC43MzA1Ii8+PHRleHQgZmlsbD0iIzAwMDAwMCIgZm9udC1mYW1pbHk9InNhbnMtc2VyaWYiIGZvbnQtc2l6ZT0iMTQiIGxlbmd0aEFkanVzdD0ic3BhY2luZ0FuZEdseXBocyIgdGV4dExlbmd0aD0iMzMiIHg9IjE1IiB5PSIxOTEuMjY1NiI+QWxpY2U8L3RleHQ+PHJlY3QgZmlsbD0iI0ZFRkVDRSIgaGVpZ2h0PSIzMC40ODgzIiBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuNTsiIHdpZHRoPSI0MCIgeD0iMjQ0LjUiIHk9IjMiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNCIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIyNiIgeD0iMjUxLjUiIHk9IjIzLjUzNTIiPkJvYjwvdGV4dD48cmVjdCBmaWxsPSIjRkVGRUNFIiBoZWlnaHQ9IjMwLjQ4ODMiIHN0eWxlPSJzdHJva2U6ICNBODAwMzY7IHN0cm9rZS13aWR0aDogMS41OyIgd2lkdGg9IjQwIiB4PSIyNDQuNSIgeT0iMTcwLjczMDUiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNCIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIyNiIgeD0iMjUxLjUiIHk9IjE5MS4yNjU2Ij5Cb2I8L3RleHQ+PHBvbHlnb24gZmlsbD0iI0E4MDAzNiIgcG9pbnRzPSIyNTIuNSw2MS43OTg4LDI2Mi41LDY1Ljc5ODgsMjUyLjUsNjkuNzk4OCwyNTYuNSw2NS43OTg4IiBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsiLz48bGluZSBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsiIHgxPSIzMS41IiB4Mj0iMjU4LjUiIHkxPSI2NS43OTg4IiB5Mj0iNjUuNzk4OCIvPjx0ZXh0IGZpbGw9IiMwMDAwMDAiIGZvbnQtZmFtaWx5PSJzYW5zLXNlcmlmIiBmb250LXNpemU9IjEzIiBsZW5ndGhBZGp1c3Q9InNwYWNpbmdBbmRHbHlwaHMiIHRleHRMZW5ndGg9IjE0NyIgeD0iMzguNSIgeT0iNjEuMDU2NiI+QXV0aGVudGljYXRpb24gUmVxdWVzdDwvdGV4dD48cG9seWdvbiBmaWxsPSIjQTgwMDM2IiBwb2ludHM9IjQyLjUsOTEuMTA5NCwzMi41LDk1LjEwOTQsNDIuNSw5OS4xMDk0LDM4LjUsOTUuMTA5NCIgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjA7Ii8+PGxpbmUgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjA7IHN0cm9rZS1kYXNoYXJyYXk6IDIuMCwyLjA7IiB4MT0iMzYuNSIgeDI9IjI2My41IiB5MT0iOTUuMTA5NCIgeTI9Ijk1LjEwOTQiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxMyIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIxNTciIHg9IjQ4LjUiIHk9IjkwLjM2NzIiPkF1dGhlbnRpY2F0aW9uIFJlc3BvbnNlPC90ZXh0Pjxwb2x5Z29uIGZpbGw9IiNBODAwMzYiIHBvaW50cz0iMjUyLjUsMTIwLjQxOTksMjYyLjUsMTI0LjQxOTksMjUyLjUsMTI4LjQxOTksMjU2LjUsMTI0LjQxOTkiIHN0eWxlPSJzdHJva2U6ICNBODAwMzY7IHN0cm9rZS13aWR0aDogMS4wOyIvPjxsaW5lIHN0eWxlPSJzdHJva2U6ICNBODAwMzY7IHN0cm9rZS13aWR0aDogMS4wOyIgeDE9IjMxLjUiIHgyPSIyNTguNSIgeTE9IjEyNC40MTk5IiB5Mj0iMTI0LjQxOTkiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxMyIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIxOTkiIHg9IjM4LjUiIHk9IjExOS42Nzc3Ij5Bbm90aGVyIGF1dGhlbnRpY2F0aW9uIFJlcXVlc3Q8L3RleHQ+PHBvbHlnb24gZmlsbD0iI0E4MDAzNiIgcG9pbnRzPSI0Mi41LDE0OS43MzA1LDMyLjUsMTUzLjczMDUsNDIuNSwxNTcuNzMwNSwzOC41LDE1My43MzA1IiBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsiLz48bGluZSBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsgc3Ryb2tlLWRhc2hhcnJheTogMi4wLDIuMDsiIHgxPSIzNi41IiB4Mj0iMjYzLjUiIHkxPSIxNTMuNzMwNSIgeTI9IjE1My43MzA1Ii8+PHRleHQgZmlsbD0iIzAwMDAwMCIgZm9udC1mYW1pbHk9InNhbnMtc2VyaWYiIGZvbnQtc2l6ZT0iMTMiIGxlbmd0aEFkanVzdD0ic3BhY2luZ0FuZEdseXBocyIgdGV4dExlbmd0aD0iMjA5IiB4PSI0OC41IiB5PSIxNDguOTg4MyI+QW5vdGhlciBhdXRoZW50aWNhdGlvbiBSZXNwb25zZTwvdGV4dD48IS0tTUQ1PVs3ZjNlNGQwYzkwMWVmZGJjNTdlYjQ0MjQ5YTNiODE5N10KQHN0YXJ0dW1sDQpza2lucGFyYW0gc2hhZG93aW5nIGZhbHNlDQpBbGljZSAtPiBCb2I6IEF1dGhlbnRpY2F0aW9uIFJlcXVlc3QNCkJvYiAtIC0+IEFsaWNlOiBBdXRoZW50aWNhdGlvbiBSZXNwb25zZQ0KDQpBbGljZSAtPiBCb2I6IEFub3RoZXIgYXV0aGVudGljYXRpb24gUmVxdWVzdA0KQWxpY2UgPC0gLSBCb2I6IEFub3RoZXIgYXV0aGVudGljYXRpb24gUmVzcG9uc2UNCkBlbmR1bWwNCgpQbGFudFVNTCB2ZXJzaW9uIDEuMjAyMC4wMihTdW4gTWFyIDAxIDA0OjIyOjA3IENTVCAyMDIwKQooTUlUIHNvdXJjZSBkaXN0cmlidXRpb24pCkphdmEgUnVudGltZTogT3BlbkpESyBSdW50aW1lIEVudmlyb25tZW50CkpWTTogT3BlbkpESyA2NC1CaXQgU2VydmVyIFZNCkphdmEgVmVyc2lvbjogMTIrMzMKT3BlcmF0aW5nIFN5c3RlbTogTWFjIE9TIFgKRGVmYXVsdCBFbmNvZGluZzogVVRGLTgKTGFuZ3VhZ2U6IGVuCkNvdW50cnk6IFVTCi0tPjwvZz48L3N2Zz4=",
+295,212)},200):a.generatePlantUmlImage(e,g,function(b,c,d){a.spinner.stop();k(e,g,b,c,d)},function(b){a.handleError(b)})}}else if("mermaid"==b)a.spinner.spin(document.body,mxResources.get("inserting"))&&(l=a.editor.graph,a.generateMermaidImage(e,g,function(b,d,k){f=mxEvent.isAltDown(c)?f:l.getCenterInsertPoint(new mxRectangle(0,0,d,k));a.spinner.stop();var g=null;l.getModel().beginUpdate();try{g=l.insertVertex(null,null,null,f.x,f.y,d,k,"shape=image;noLabel=1;verticalAlign=top;imageAspect=1;image="+
+b+";"),l.setAttributeForCell(g,"mermaidData",JSON.stringify({data:e,config:EditorUi.defaultMermaidConfig},null,2))}finally{l.getModel().endUpdate()}null!=g&&(l.setSelectionCell(g),l.scrollCellToVisible(g))},function(b){a.handleError(b)}));else if("table"==b){var n=null,p=[],q=0;for(b=0;b<d.length;b++){var m=mxUtils.trim(d[b]);if("create table"==m.substring(0,12).toLowerCase())m=mxUtils.trim(m.substring(12)),"("==m.charAt(m.length-1)&&(m=mxUtils.trim(m.substring(0,m.length-1))),n=new mxCell(m,new mxGeometry(q,
0,160,40),"shape=table;startSize=30;container=1;collapsible=1;childLayout=tableLayout;fixedRows=1;rowLines=0;fontStyle=1;align=center;resizeLast=1;"),n.vertex=!0,p.push(n),m=a.editor.graph.getPreferredSizeForCell(t),null!=m&&(n.geometry.width=m.width+10);else if(null!=n&&")"==m.charAt(0))q+=n.geometry.width+40,n=null;else if("("!=m&&null!=n&&(m=m.substring(0,","==m.charAt(m.length-1)?m.length-1:m.length),"primary key"!=m.substring(0,11).toLowerCase())){var u=m.toLowerCase().indexOf("primary key"),
m=m.replace(/primary key/i,""),t=new mxCell("",new mxGeometry(0,0,160,30),"shape=partialRectangle;collapsible=0;dropTarget=0;pointerEvents=0;fillColor=none;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;top=0;left=0;right=0;bottom="+(0<u?"1":"0")+";");t.vertex=!0;var F=new mxCell(0<u?"PK":"",new mxGeometry(0,0,30,30),"shape=partialRectangle;overflow=hidden;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;"+(0<u?"fontStyle=1;":""));F.vertex=!0;t.insert(F);m=new mxCell(m,new mxGeometry(30,
-0,130,30),"shape=partialRectangle;overflow=hidden;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;align=left;spacingLeft=6;"+(0<u?"fontStyle=5;":""));m.vertex=!0;t.insert(m);m=a.editor.graph.getPreferredSizeForCell(m);null!=m&&n.geometry.width<m.width+30&&(n.geometry.width=Math.min(320,Math.max(n.geometry.width,m.width+30)));n.insert(t);n.geometry.height+=30}}0<p.length&&(l=a.editor.graph,g=mxEvent.isAltDown(c)?g:l.getCenterInsertPoint(l.getBoundingBoxFromGeometry(p,!0)),l.setSelectionCells(l.importCells(p,
-g.x,g.y)),l.scrollCellToVisible(l.getSelectionCell()))}else if("list"==b){if(0<d.length){l=a.editor.graph;t=null;p=[];for(b=n=0;b<d.length;b++)";"!=d[b].charAt(0)&&(0==d[b].length?t=null:null==t?(t=new mxCell(d[b],new mxGeometry(n,0,160,30),"swimlane;fontStyle=1;childLayout=stackLayout;horizontal=1;startSize=26;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;"),t.vertex=!0,p.push(t),m=l.getPreferredSizeForCell(t),null!=m&&t.geometry.width<m.width+10&&(t.geometry.width=
+0,130,30),"shape=partialRectangle;overflow=hidden;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;align=left;spacingLeft=6;"+(0<u?"fontStyle=5;":""));m.vertex=!0;t.insert(m);m=a.editor.graph.getPreferredSizeForCell(m);null!=m&&n.geometry.width<m.width+30&&(n.geometry.width=Math.min(320,Math.max(n.geometry.width,m.width+30)));n.insert(t);n.geometry.height+=30}}0<p.length&&(l=a.editor.graph,f=mxEvent.isAltDown(c)?f:l.getCenterInsertPoint(l.getBoundingBoxFromGeometry(p,!0)),l.setSelectionCells(l.importCells(p,
+f.x,f.y)),l.scrollCellToVisible(l.getSelectionCell()))}else if("list"==b){if(0<d.length){l=a.editor.graph;t=null;p=[];for(b=n=0;b<d.length;b++)";"!=d[b].charAt(0)&&(0==d[b].length?t=null:null==t?(t=new mxCell(d[b],new mxGeometry(n,0,160,30),"swimlane;fontStyle=1;childLayout=stackLayout;horizontal=1;startSize=26;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;"),t.vertex=!0,p.push(t),m=l.getPreferredSizeForCell(t),null!=m&&t.geometry.width<m.width+10&&(t.geometry.width=
m.width+10),n+=t.geometry.width+40):"--"==d[b]?(m=new mxCell("",new mxGeometry(0,0,40,8),"line;strokeWidth=1;fillColor=none;align=left;verticalAlign=middle;spacingTop=-1;spacingLeft=3;spacingRight=3;rotatable=0;labelPosition=right;points=[];portConstraint=eastwest;"),m.vertex=!0,t.geometry.height+=m.geometry.height,t.insert(m)):0<d[b].length&&(q=new mxCell(d[b],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;"),
-q.vertex=!0,m=l.getPreferredSizeForCell(q),null!=m&&q.geometry.width<m.width&&(q.geometry.width=m.width),t.geometry.width=Math.max(t.geometry.width,q.geometry.width),t.geometry.height+=q.geometry.height,t.insert(q)));if(0<p.length){g=mxEvent.isAltDown(c)?g:l.getCenterInsertPoint(l.getBoundingBoxFromGeometry(p,!0));l.getModel().beginUpdate();try{p=l.importCells(p,g.x,g.y);m=[];for(b=0;b<p.length;b++)m.push(p[b]),m=m.concat(p[b].children);l.fireEvent(new mxEventObject("cellsInserted","cells",m))}finally{l.getModel().endUpdate()}l.setSelectionCells(p);
-l.scrollCellToVisible(l.getSelectionCell())}}}else{var t=function(a){var b=K[a];null==b&&(b=new mxCell(a,new mxGeometry(0,0,80,30),"whiteSpace=wrap;html=1;"),b.vertex=!0,K[a]=b,p.push(b));return b},K={},p=[];for(b=0;b<d.length;b++)if(";"!=d[b].charAt(0)){var M=d[b].split("->");2<=M.length&&(u=t(M[0]),F=t(M[M.length-1]),M=new mxCell(2<M.length?M[1]:"",new mxGeometry),M.edge=!0,u.insertEdge(M,!0),F.insertEdge(M,!1),p.push(M))}if(0<p.length){d=document.createElement("div");d.style.visibility="hidden";
+q.vertex=!0,m=l.getPreferredSizeForCell(q),null!=m&&q.geometry.width<m.width&&(q.geometry.width=m.width),t.geometry.width=Math.max(t.geometry.width,q.geometry.width),t.geometry.height+=q.geometry.height,t.insert(q)));if(0<p.length){f=mxEvent.isAltDown(c)?f:l.getCenterInsertPoint(l.getBoundingBoxFromGeometry(p,!0));l.getModel().beginUpdate();try{p=l.importCells(p,f.x,f.y);m=[];for(b=0;b<p.length;b++)m.push(p[b]),m=m.concat(p[b].children);l.fireEvent(new mxEventObject("cellsInserted","cells",m))}finally{l.getModel().endUpdate()}l.setSelectionCells(p);
+l.scrollCellToVisible(l.getSelectionCell())}}}else{var t=function(a){var b=J[a];null==b&&(b=new mxCell(a,new mxGeometry(0,0,80,30),"whiteSpace=wrap;html=1;"),b.vertex=!0,J[a]=b,p.push(b));return b},J={},p=[];for(b=0;b<d.length;b++)if(";"!=d[b].charAt(0)){var M=d[b].split("->");2<=M.length&&(u=t(M[0]),F=t(M[M.length-1]),M=new mxCell(2<M.length?M[1]:"",new mxGeometry),M.edge=!0,u.insertEdge(M,!0),F.insertEdge(M,!1),p.push(M))}if(0<p.length){d=document.createElement("div");d.style.visibility="hidden";
document.body.appendChild(d);l=new Graph(d);l.getModel().beginUpdate();try{p=l.importCells(p);for(b=0;b<p.length;b++)l.getModel().isVertex(p[b])&&(m=l.getPreferredSizeForCell(p[b]),p[b].geometry.width=Math.max(p[b].geometry.width,m.width),p[b].geometry.height=Math.max(p[b].geometry.height,m.height));n=new mxFastOrganicLayout(l);n.disableEdgeStyle=!1;n.forceConstant=120;n.execute(l.getDefaultParent());q=new mxParallelEdgeLayout(l);q.spacing=20;q.execute(l.getDefaultParent())}finally{l.getModel().endUpdate()}l.clearCellOverlays();
-m=[];a.editor.graph.getModel().beginUpdate();try{p=l.getModel().getChildren(l.getDefaultParent()),g=mxEvent.isAltDown(c)?g:a.editor.graph.getCenterInsertPoint(l.getBoundingBoxFromGeometry(p,!0)),m=a.editor.graph.importCells(p,g.x,g.y),a.editor.graph.fireEvent(new mxEventObject("cellsInserted","cells",m))}finally{a.editor.graph.getModel().endUpdate()}a.editor.graph.setSelectionCells(m);a.editor.graph.scrollCellToVisible(a.editor.graph.getSelectionCell());l.destroy();d.parentNode.removeChild(d)}}}function f(){return"list"==
+m=[];a.editor.graph.getModel().beginUpdate();try{p=l.getModel().getChildren(l.getDefaultParent()),f=mxEvent.isAltDown(c)?f:a.editor.graph.getCenterInsertPoint(l.getBoundingBoxFromGeometry(p,!0)),m=a.editor.graph.importCells(p,f.x,f.y),a.editor.graph.fireEvent(new mxEventObject("cellsInserted","cells",m))}finally{a.editor.graph.getModel().endUpdate()}a.editor.graph.setSelectionCells(m);a.editor.graph.scrollCellToVisible(a.editor.graph.getSelectionCell());l.destroy();d.parentNode.removeChild(d)}}}function g(){return"list"==
e.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"==e.value?"graph TD;\n A--\x3eB;\n A--\x3eC;\n B--\x3eD;\n C--\x3eD;":"table"==e.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"==e.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"==e.value||"plantUmlTxt"==e.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 g=a.editor.graph.getFreeInsertPoint();d=document.createElement("div");d.style.textAlign="right";var m=document.createElement("textarea");m.style.resize="none";m.style.width="100%";m.style.height="354px";m.style.marginBottom="16px";var e=document.createElement("select");if("formatSql"==c||"mermaid"==c)e.style.display="none";var k=document.createElement("option");k.setAttribute("value","list");mxUtils.write(k,mxResources.get("list"));"plantUml"!=c&&e.appendChild(k);
+";Example:\na->b\nb->edge label->c\nc->a\n"}var f=a.editor.graph.getFreeInsertPoint();d=document.createElement("div");d.style.textAlign="right";var m=document.createElement("textarea");m.style.resize="none";m.style.width="100%";m.style.height="354px";m.style.marginBottom="16px";var e=document.createElement("select");if("formatSql"==c||"mermaid"==c)e.style.display="none";var k=document.createElement("option");k.setAttribute("value","list");mxUtils.write(k,mxResources.get("list"));"plantUml"!=c&&e.appendChild(k);
null!=c&&"fromText"!=c||k.setAttribute("selected","selected");k=document.createElement("option");k.setAttribute("value","table");mxUtils.write(k,mxResources.get("formatSql"));"formatSql"==c&&(e.appendChild(k),k.setAttribute("selected","selected"));k=document.createElement("option");k.setAttribute("value","mermaid");mxUtils.write(k,mxResources.get("formatSql"));"mermaid"==c&&(e.appendChild(k),k.setAttribute("selected","selected"));k=document.createElement("option");k.setAttribute("value","diagram");
mxUtils.write(k,mxResources.get("diagram"));"plantUml"!=c&&e.appendChild(k);k=document.createElement("option");k.setAttribute("value","plantUmlSvg");mxUtils.write(k,mxResources.get("plantUml")+" ("+mxResources.get("formatSvg")+")");"plantUml"==c&&k.setAttribute("selected","selected");var l=document.createElement("option");l.setAttribute("value","plantUmlPng");mxUtils.write(l,mxResources.get("plantUml")+" ("+mxResources.get("formatPng")+")");var n=document.createElement("option");n.setAttribute("value",
-"plantUmlTxt");mxUtils.write(n,mxResources.get("plantUml")+" ("+mxResources.get("text")+")");EditorUi.enablePlantUml&&Graph.fileSupport&&!a.isOffline()&&"plantUml"==c&&(e.appendChild(k),e.appendChild(l),e.appendChild(n));var p=f();m.value=p;d.appendChild(m);this.init=function(){m.focus()};Graph.fileSupport&&(m.addEventListener("dragover",function(a){a.stopPropagation();a.preventDefault()},!1),m.addEventListener("drop",function(a){a.stopPropagation();a.preventDefault();if(0<a.dataTransfer.files.length){a=
-a.dataTransfer.files[0];var b=new FileReader;b.onload=function(a){m.value=a.target.result};b.readAsText(a)}},!1));d.appendChild(e);mxEvent.addListener(e,"change",function(){var a=f();if(0==m.value.length||m.value==p)p=a,m.value=p});a.isOffline()||"mermaid"!=c&&"plantUml"!=c||(k=mxUtils.button(mxResources.get("help"),function(){a.openLink("mermaid"==c?"https://mermaid-js.github.io/mermaid/#/":"https://plantuml.com/")}),k.className="geBtn",d.appendChild(k));k=mxUtils.button(mxResources.get("close"),
-function(){m.value==p?a.hideDialog():a.confirm(mxResources.get("areYouSure"),function(){a.hideDialog()})});k.className="geBtn";a.editor.cancelFirst&&d.appendChild(k);l=mxUtils.button(mxResources.get("insert"),function(c){a.hideDialog();b(m.value,e.value,c)});d.appendChild(l);l.className="geBtn gePrimaryBtn";a.editor.cancelFirst||d.appendChild(k);this.container=d},NewDialog=function(a,d,c,b,f,g,m,e,k,l,n,p,q,u,t,v,z,y){function x(a){null!=a&&(na=S=a?135:140);a=!0;if(null!=ia)for(;M<ia.length&&(a||
-0!=mxUtils.mod(M,30));){var b=ia[M++],b=C(b.url,b.libs,b.title,b.tooltip?b.tooltip:b.title,b.select,b.imgUrl,b.info,b.onClick,b.preview,b.noImg,b.clibs);a&&b.click();a=!1}}function A(){if(Y&&null!=u)c||a.hideDialog(),u(Y,ba,K.value);else if(b)c||a.hideDialog(),b(X,K.value,ga,ha);else{var e=K.value;null!=e&&0<e.length&&a.pickFolder(a.mode,function(b){a.createFile(e,X,null!=ha&&0<ha.length?ha:null,null,function(){a.hideDialog()},null,b,null,null!=ea&&0<ea.length?ea:null)},a.mode!=App.MODE_GOOGLE||null==
-a.stateArg||null==a.stateArg.folderId)}}function B(a,b,c,d,l,g,f){null!=Z&&(Z.style.backgroundColor="transparent",Z.style.border="1px solid transparent");I.removeAttribute("disabled");X=b;ha=c;ea=g;Z=a;Y=d;ga=f;ba=l;Z.style.backgroundColor=e;Z.style.border=k}function C(b,e,c,d,k,l,g,f,n,p,q){function m(b,e){if(null==N){var c=b,c=/^https?:\/\//.test(c)&&!a.editor.isCorsEnabledForUrl(c)?PROXY_URL+"?url="+encodeURIComponent(c):TEMPLATE_PATH+"/"+c;mxUtils.get(c,mxUtils.bind(this,function(a){200<=a.getStatus()&&
-299>=a.getStatus()&&(N=a.getText());e(N)}))}else e(N)}function x(e,d,k){if(null!=e&&mxUtils.isAncestorNode(document.body,t)){e=mxUtils.parseXml(e);e=Editor.parseDiagramNode(e.documentElement);var l=new mxCodec(e.ownerDocument),f=new mxGraphModel;l.decode(e,f);e=f.root.getChildAt(0).children;a.sidebar.createTooltip(t,e,Math.min((window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)-80,1E3),Math.min((window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight)-
-80,800),null!=c?mxResources.get(c,null,c):null,!0,new mxPoint(d,k),!0,function(){V=null!=a.sidebar.tooltip&&"none"!=a.sidebar.tooltip.style.display;B(t,null,null,b,g,q)},!0)}}function u(e,c){null==b||H||a.sidebar.currentElt==t?a.sidebar.hideTooltip():(a.sidebar.hideTooltip(),a.sidebar.currentElt=t,H=!0,m(b,function(b){H&&a.sidebar.currentElt==t&&x(b,mxEvent.getClientX(e),mxEvent.getClientY(e));H=!1}))}var t=document.createElement("div");t.className="geTemplate";t.style.position="relative";t.style.height=
-na+"px";t.style.width=S+"px";var N=null;Editor.isDarkMode()&&(t.style.filter="invert(100%)");null!=c?t.setAttribute("title",mxResources.get(c,null,c)):null!=d&&0<d.length&&t.setAttribute("title",d);var H=!1;if(null!=l){t.style.display="inline-flex";t.style.justifyContent="center";t.style.alignItems="center";k=document.createElement("img");k.setAttribute("src",l);k.setAttribute("alt",d);k.style.maxWidth=na+"px";k.style.maxHeight=S+"px";var v=l.replace(".drawio.xml","").replace(".drawio","").replace(".xml",
-"");t.appendChild(k);k.onerror=function(){this.src!=v?this.src=v:(this.src=Editor.errorImage,this.onerror=null)};mxEvent.addGestureListeners(t,mxUtils.bind(this,function(a){B(t,null,null,b,g,q)}),null,null);mxEvent.addListener(t,"dblclick",function(a){A();mxEvent.consume(a)})}else if(!p&&null!=b&&0<b.length){var z=function(a){I.setAttribute("disabled","disabled");t.style.backgroundColor="transparent";t.style.border="1px solid transparent";J.spin(O);m(b,function(b){J.stop();null!=b&&(B(t,b,e,null,
+"plantUmlTxt");mxUtils.write(n,mxResources.get("plantUml")+" ("+mxResources.get("text")+")");EditorUi.enablePlantUml&&Graph.fileSupport&&!a.isOffline()&&"plantUml"==c&&(e.appendChild(k),e.appendChild(l),e.appendChild(n));var p=g();m.value=p;d.appendChild(m);this.init=function(){m.focus()};Graph.fileSupport&&(m.addEventListener("dragover",function(a){a.stopPropagation();a.preventDefault()},!1),m.addEventListener("drop",function(a){a.stopPropagation();a.preventDefault();if(0<a.dataTransfer.files.length){a=
+a.dataTransfer.files[0];var b=new FileReader;b.onload=function(a){m.value=a.target.result};b.readAsText(a)}},!1));d.appendChild(e);mxEvent.addListener(e,"change",function(){var a=g();if(0==m.value.length||m.value==p)p=a,m.value=p});a.isOffline()||"mermaid"!=c&&"plantUml"!=c||(k=mxUtils.button(mxResources.get("help"),function(){a.openLink("mermaid"==c?"https://mermaid-js.github.io/mermaid/#/":"https://plantuml.com/")}),k.className="geBtn",d.appendChild(k));k=mxUtils.button(mxResources.get("close"),
+function(){m.value==p?a.hideDialog():a.confirm(mxResources.get("areYouSure"),function(){a.hideDialog()})});k.className="geBtn";a.editor.cancelFirst&&d.appendChild(k);l=mxUtils.button(mxResources.get("insert"),function(c){a.hideDialog();b(m.value,e.value,c)});d.appendChild(l);l.className="geBtn gePrimaryBtn";a.editor.cancelFirst||d.appendChild(k);this.container=d},NewDialog=function(a,d,c,b,g,f,m,e,k,l,n,p,q,u,t,v,z,y){function x(a){null!=a&&(na=S=a?135:140);a=!0;if(null!=ia)for(;M<ia.length&&(a||
+0!=mxUtils.mod(M,30));){var b=ia[M++],b=C(b.url,b.libs,b.title,b.tooltip?b.tooltip:b.title,b.select,b.imgUrl,b.info,b.onClick,b.preview,b.noImg,b.clibs);a&&b.click();a=!1}}function A(){if(Y&&null!=u)c||a.hideDialog(),u(Y,ba,J.value);else if(b)c||a.hideDialog(),b(X,J.value,ga,ha);else{var e=J.value;null!=e&&0<e.length&&a.pickFolder(a.mode,function(b){a.createFile(e,X,null!=ha&&0<ha.length?ha:null,null,function(){a.hideDialog()},null,b,null,null!=ea&&0<ea.length?ea:null)},a.mode!=App.MODE_GOOGLE||null==
+a.stateArg||null==a.stateArg.folderId)}}function B(a,b,c,d,l,f,g){null!=Z&&(Z.style.backgroundColor="transparent",Z.style.border="1px solid transparent");I.removeAttribute("disabled");X=b;ha=c;ea=f;Z=a;Y=d;ga=g;ba=l;Z.style.backgroundColor=e;Z.style.border=k}function C(b,e,c,d,k,l,f,g,n,p,q){function m(b,e){if(null==H){var c=b,c=/^https?:\/\//.test(c)&&!a.editor.isCorsEnabledForUrl(c)?PROXY_URL+"?url="+encodeURIComponent(c):TEMPLATE_PATH+"/"+c;mxUtils.get(c,mxUtils.bind(this,function(a){200<=a.getStatus()&&
+299>=a.getStatus()&&(H=a.getText());e(H)}))}else e(H)}function x(e,d,k){if(null!=e&&mxUtils.isAncestorNode(document.body,t)){e=mxUtils.parseXml(e);e=Editor.parseDiagramNode(e.documentElement);var l=new mxCodec(e.ownerDocument),g=new mxGraphModel;l.decode(e,g);e=g.root.getChildAt(0).children;a.sidebar.createTooltip(t,e,Math.min((window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)-80,1E3),Math.min((window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight)-
+80,800),null!=c?mxResources.get(c,null,c):null,!0,new mxPoint(d,k),!0,function(){E=null!=a.sidebar.tooltip&&"none"!=a.sidebar.tooltip.style.display;B(t,null,null,b,f,q)},!0)}}function u(e,c){null==b||z||a.sidebar.currentElt==t?a.sidebar.hideTooltip():(a.sidebar.hideTooltip(),a.sidebar.currentElt=t,z=!0,m(b,function(b){z&&a.sidebar.currentElt==t&&x(b,mxEvent.getClientX(e),mxEvent.getClientY(e));z=!1}))}var t=document.createElement("div");t.className="geTemplate";t.style.position="relative";t.style.height=
+na+"px";t.style.width=S+"px";var H=null;Editor.isDarkMode()&&(t.style.filter="invert(100%)");null!=c?t.setAttribute("title",mxResources.get(c,null,c)):null!=d&&0<d.length&&t.setAttribute("title",d);var z=!1;if(null!=l){t.style.display="inline-flex";t.style.justifyContent="center";t.style.alignItems="center";k=document.createElement("img");k.setAttribute("src",l);k.setAttribute("alt",d);k.style.maxWidth=na+"px";k.style.maxHeight=S+"px";var v=l.replace(".drawio.xml","").replace(".drawio","").replace(".xml",
+"");t.appendChild(k);k.onerror=function(){this.src!=v?this.src=v:(this.src=Editor.errorImage,this.onerror=null)};mxEvent.addGestureListeners(t,mxUtils.bind(this,function(a){B(t,null,null,b,f,q)}),null,null);mxEvent.addListener(t,"dblclick",function(a){A();mxEvent.consume(a)})}else if(!p&&null!=b&&0<b.length){var N=function(a){I.setAttribute("disabled","disabled");t.style.backgroundColor="transparent";t.style.border="1px solid transparent";K.spin(O);m(b,function(b){K.stop();null!=b&&(B(t,b,e,null,
null,q,R),a&&A())})};d=n||TEMPLATE_PATH+"/"+b.substring(0,b.length-4)+".png";t.style.backgroundImage="url("+d+")";t.style.backgroundPosition="center center";t.style.backgroundRepeat="no-repeat";null!=c&&(t.innerHTML='<table width="100%" height="100%" style="line-height:1.3em;'+(Editor.isDarkMode()?"":"background:rgba(255,255,255,0.85);")+'border:inherit;"><tr><td align="center" valign="middle"><span style="display:inline-block;padding:4px 8px 4px 8px;user-select:none;border-radius:3px;background:rgba(255,255,255,0.85);overflow:hidden;text-overflow:ellipsis;max-width:'+
-(na-34)+'px;">'+mxUtils.htmlEntities(mxResources.get(c,null,c))+"</span></td></tr></table>");mxEvent.addGestureListeners(t,mxUtils.bind(this,function(a){z()}),null,null);mxEvent.addListener(t,"dblclick",function(a){z(!0);mxEvent.consume(a)})}else t.innerHTML='<table width="100%" height="100%" style="line-height:1.3em;"><tr><td align="center" valign="middle"><span style="display:inline-block;padding:4px 8px 4px 8px;user-select:none;border-radius:3px;background:#ffffff;overflow:hidden;text-overflow:ellipsis;max-width:'+
-(na-34)+'px;">'+mxUtils.htmlEntities(mxResources.get(c,null,c))+"</span></td></tr></table>",k&&B(t),mxEvent.addGestureListeners(t,mxUtils.bind(this,function(a){B(t,null,null,b,g)}),null,null),null!=f?mxEvent.addListener(t,"click",f):(mxEvent.addListener(t,"click",function(a){B(t,null,null,b,g)}),mxEvent.addListener(t,"dblclick",function(a){A();mxEvent.consume(a)}));if(null!=b){var E=document.createElement("img");E.setAttribute("src",Sidebar.prototype.searchImage);E.setAttribute("title",mxResources.get("preview"));
-E.className="geActiveButton";E.style.position="absolute";E.style.cursor="default";E.style.padding="8px";E.style.right="0px";E.style.top="0px";t.appendChild(E);var V=!1;mxEvent.addGestureListeners(E,mxUtils.bind(this,function(b){V=a.sidebar.currentElt==t}),null,null);mxEvent.addListener(E,"click",mxUtils.bind(this,function(a){V||u(a,E);mxEvent.consume(a)}))}O.appendChild(t);return t}function D(){function a(a,b){var e=mxResources.get(a);null==e&&(e=a.substring(0,1).toUpperCase()+a.substring(1));18<
+(na-34)+'px;">'+mxUtils.htmlEntities(mxResources.get(c,null,c))+"</span></td></tr></table>");mxEvent.addGestureListeners(t,mxUtils.bind(this,function(a){N()}),null,null);mxEvent.addListener(t,"dblclick",function(a){N(!0);mxEvent.consume(a)})}else t.innerHTML='<table width="100%" height="100%" style="line-height:1.3em;"><tr><td align="center" valign="middle"><span style="display:inline-block;padding:4px 8px 4px 8px;user-select:none;border-radius:3px;background:#ffffff;overflow:hidden;text-overflow:ellipsis;max-width:'+
+(na-34)+'px;">'+mxUtils.htmlEntities(mxResources.get(c,null,c))+"</span></td></tr></table>",k&&B(t),mxEvent.addGestureListeners(t,mxUtils.bind(this,function(a){B(t,null,null,b,f)}),null,null),null!=g?mxEvent.addListener(t,"click",g):(mxEvent.addListener(t,"click",function(a){B(t,null,null,b,f)}),mxEvent.addListener(t,"dblclick",function(a){A();mxEvent.consume(a)}));if(null!=b){var V=document.createElement("img");V.setAttribute("src",Sidebar.prototype.searchImage);V.setAttribute("title",mxResources.get("preview"));
+V.className="geActiveButton";V.style.position="absolute";V.style.cursor="default";V.style.padding="8px";V.style.right="0px";V.style.top="0px";t.appendChild(V);var E=!1;mxEvent.addGestureListeners(V,mxUtils.bind(this,function(b){E=a.sidebar.currentElt==t}),null,null);mxEvent.addListener(V,"click",mxUtils.bind(this,function(a){E||u(a,V);mxEvent.consume(a)}))}O.appendChild(t);return t}function D(){function a(a,b){var e=mxResources.get(a);null==e&&(e=a.substring(0,1).toUpperCase()+a.substring(1));18<
e.length&&(e=e.substring(0,18)+"&hellip;");return e+" ("+b.length+")"}function b(a,b,e){mxEvent.addListener(b,"click",function(){ka!=b&&(ka.style.backgroundColor="",ka=b,ka.style.backgroundColor=m,O.scrollTop=0,O.innerHTML="",M=0,ia=e?ca[a][e]:aa[a],H=null,x(!1))})}oa&&(oa=!1,mxEvent.addListener(O,"scroll",function(a){O.scrollTop+O.clientHeight>=O.scrollHeight&&(x(),mxEvent.consume(a))}));if(0<qa){var e=document.createElement("div");e.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;";
mxUtils.write(e,mxResources.get("custom"));ja.appendChild(e);for(var c in da){var d=document.createElement("div"),k=c,e=da[c];18<k.length&&(k=k.substring(0,18)+"&hellip;");d.style.cssText="display:block;cursor:pointer;padding:6px;white-space:nowrap;margin-bottom:-1px;overflow:hidden;text-overflow:ellipsis;user-select:none;";d.setAttribute("title",k+" ("+e.length+")");mxUtils.write(d,d.getAttribute("title"));null!=l&&(d.style.padding=l);ja.appendChild(d);(function(a,b){mxEvent.addListener(d,"click",
-function(){ka!=b&&(ka.style.backgroundColor="",ka=b,ka.style.backgroundColor=m,O.scrollTop=0,O.innerHTML="",M=0,ia=da[a],H=null,x(!1))})})(c,d)}e=document.createElement("div");e.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;";mxUtils.write(e,"draw.io");ja.appendChild(e)}for(c in aa){var k=ca[c],g=d=document.createElement(k?"ul":"div"),e=aa[c],f=a(c,e);if(null!=k){var n=document.createElement("li"),p=document.createElement("div");p.className="geTempTreeCaret";
-p.setAttribute("title",f);mxUtils.write(p,f);g=p;n.appendChild(p);f=document.createElement("ul");f.className="geTempTreeNested";f.style.visibility="hidden";for(var q in k){var I=document.createElement("li"),u=a(q,k[q]);I.setAttribute("title",u);mxUtils.write(I,u);b(c,I,q);f.appendChild(I)}n.appendChild(f);d.className="geTempTree";d.appendChild(n);(function(a,b){mxEvent.addListener(b,"click",function(){a.style.visibility="visible";a.classList.toggle("geTempTreeActive");a.classList.toggle("geTempTreeNested")&&
-setTimeout(function(){a.style.visibility="hidden"},550);b.classList.toggle("geTempTreeCaret-down")})})(f,p)}else d.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;",d.setAttribute("title",f),mxUtils.write(d,f);null!=l&&(d.style.padding=l);ja.appendChild(d);null==ka&&0<e.length&&(ka=d,ka.style.backgroundColor=m,ia=e);b(c,g)}x(!1)}c=null!=c?c:!0;f=null!=f?f:!1;m=null!=m?m:"#ebf2f9";
+function(){ka!=b&&(ka.style.backgroundColor="",ka=b,ka.style.backgroundColor=m,O.scrollTop=0,O.innerHTML="",M=0,ia=da[a],H=null,x(!1))})})(c,d)}e=document.createElement("div");e.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;";mxUtils.write(e,"draw.io");ja.appendChild(e)}for(c in aa){var k=ca[c],f=d=document.createElement(k?"ul":"div"),e=aa[c],g=a(c,e);if(null!=k){var n=document.createElement("li"),p=document.createElement("div");p.className="geTempTreeCaret";
+p.setAttribute("title",g);mxUtils.write(p,g);f=p;n.appendChild(p);g=document.createElement("ul");g.className="geTempTreeNested";g.style.visibility="hidden";for(var q in k){var I=document.createElement("li"),u=a(q,k[q]);I.setAttribute("title",u);mxUtils.write(I,u);b(c,I,q);g.appendChild(I)}n.appendChild(g);d.className="geTempTree";d.appendChild(n);(function(a,b){mxEvent.addListener(b,"click",function(){a.style.visibility="visible";a.classList.toggle("geTempTreeActive");a.classList.toggle("geTempTreeNested")&&
+setTimeout(function(){a.style.visibility="hidden"},550);b.classList.toggle("geTempTreeCaret-down")})})(g,p)}else d.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;",d.setAttribute("title",g),mxUtils.write(d,g);null!=l&&(d.style.padding=l);ja.appendChild(d);null==ka&&0<e.length&&(ka=d,ka.style.backgroundColor=m,ia=e);b(c,f)}x(!1)}c=null!=c?c:!0;g=null!=g?g:!1;m=null!=m?m:"#ebf2f9";
e=null!=e?e:Editor.isDarkMode()?"#a2a2a2":"#e6eff8";k=null!=k?k:Editor.isDarkMode()?"1px dashed #00a8ff":"1px solid #ccd9ea";n=null!=n?n:EditorUi.templateFile;var G=document.createElement("div");G.style.userSelect="none";G.style.height="100%";var E=document.createElement("div");E.style.whiteSpace="nowrap";E.style.height="46px";c&&G.appendChild(E);var F=document.createElement("img");F.setAttribute("border","0");F.setAttribute("align","absmiddle");F.style.width="40px";F.style.height="40px";F.style.marginRight=
"10px";F.style.paddingBottom="4px";F.src=a.mode==App.MODE_GOOGLE?IMAGE_PATH+"/google-drive-logo.svg":a.mode==App.MODE_DROPBOX?IMAGE_PATH+"/dropbox-logo.svg":a.mode==App.MODE_ONEDRIVE?IMAGE_PATH+"/onedrive-logo.svg":a.mode==App.MODE_GITHUB?IMAGE_PATH+"/github-logo.svg":a.mode==App.MODE_GITLAB?IMAGE_PATH+"/gitlab-logo.svg":a.mode==App.MODE_NOTION?IMAGE_PATH+"/notion-logo.svg":a.mode==App.MODE_TRELLO?IMAGE_PATH+"/trello-logo.svg":a.mode==App.MODE_BROWSER?IMAGE_PATH+"/osa_database.png":IMAGE_PATH+"/osa_drive-harddisk.png";
!d&&c&&E.appendChild(F);c&&mxUtils.write(E,(null==a.mode||a.mode==App.MODE_GOOGLE||a.mode==App.MODE_BROWSER?mxResources.get("diagramName"):mxResources.get("filename"))+":");F=".drawio";a.mode==App.MODE_GOOGLE&&null!=a.drive?F=a.drive.extension:a.mode==App.MODE_DROPBOX&&null!=a.dropbox?F=a.dropbox.extension:a.mode==App.MODE_ONEDRIVE&&null!=a.oneDrive?F=a.oneDrive.extension:a.mode==App.MODE_GITHUB&&null!=a.gitHub?F=a.gitHub.extension:a.mode==App.MODE_GITLAB&&null!=a.gitLab?F=a.gitLab.extension:a.mode==
-App.MODE_NOTION&&null!=a.notion?F=a.notion.extension:a.mode==App.MODE_TRELLO&&null!=a.trello&&(F=a.trello.extension);var K=document.createElement("input");K.setAttribute("value",a.defaultFilename+F);K.style.marginLeft="10px";K.style.width=d?"144px":"244px";this.init=function(){c&&(K.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?K.select():document.execCommand("selectAll",!1,null));null!=O.parentNode&&null!=O.parentNode.parentNode&&mxEvent.addGestureListeners(O.parentNode.parentNode,
-mxUtils.bind(this,function(b){a.sidebar.hideTooltip()}),null,null)};c&&(E.appendChild(K),y?K.style.width=d?"350px":"450px":(null!=a.editor.diagramFileTypes&&(y=FilenameDialog.createFileTypes(a,K,a.editor.diagramFileTypes),y.style.marginLeft="6px",y.style.width=d?"80px":"180px",E.appendChild(y)),null!=a.editor.fileExtensions&&(y=FilenameDialog.createTypeHint(a,K,a.editor.fileExtensions),y.style.marginTop="12px",E.appendChild(y))));var E=!1,M=0,J=new Spinner({lines:12,length:10,width:5,radius:10,rotate:0,
+App.MODE_NOTION&&null!=a.notion?F=a.notion.extension:a.mode==App.MODE_TRELLO&&null!=a.trello&&(F=a.trello.extension);var J=document.createElement("input");J.setAttribute("value",a.defaultFilename+F);J.style.marginLeft="10px";J.style.width=d?"144px":"244px";this.init=function(){c&&(J.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?J.select():document.execCommand("selectAll",!1,null));null!=O.parentNode&&null!=O.parentNode.parentNode&&mxEvent.addGestureListeners(O.parentNode.parentNode,
+mxUtils.bind(this,function(b){a.sidebar.hideTooltip()}),null,null)};c&&(E.appendChild(J),y?J.style.width=d?"350px":"450px":(null!=a.editor.diagramFileTypes&&(y=FilenameDialog.createFileTypes(a,J,a.editor.diagramFileTypes),y.style.marginLeft="6px",y.style.width=d?"80px":"180px",E.appendChild(y)),null!=a.editor.fileExtensions&&(y=FilenameDialog.createTypeHint(a,J,a.editor.fileExtensions),y.style.marginTop="12px",E.appendChild(y))));var E=!1,M=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}),I=mxUtils.button(v||mxResources.get("create"),function(){I.setAttribute("disabled","disabled");A();I.removeAttribute("disabled")});I.className="geBtn gePrimaryBtn";if(p||q){var N=[],H=null,L=null,V=null,U=function(a){I.setAttribute("disabled","disabled");for(var b=0;b<N.length;b++)N[b].className=b==a?"geBtn gePrimaryBtn":"geBtn"},E=!0;v=document.createElement("div");v.style.whiteSpace="nowrap";v.style.height="30px";G.appendChild(v);
-y=mxUtils.button(mxResources.get("Templates",null,"Templates"),function(){ja.style.display="";Q.style.display="";O.style.left="160px";U(0);O.scrollTop=0;O.innerHTML="";M=0;H!=ia&&(ia=H,aa=L,qa=V,ja.innerHTML="",D(),H=null)});N.push(y);v.appendChild(y);var P=function(a){ja.style.display="none";Q.style.display="none";O.style.left="30px";U(a?-1:1);null==H&&(H=ia);O.scrollTop=0;O.innerHTML="";J.spin(O);var b=function(a,b,e){M=0;J.stop();ia=a;e=e||{};var c=0,d;for(d in e)c+=e[d].length;if(b)O.innerHTML=
+y=mxUtils.button(mxResources.get("Templates",null,"Templates"),function(){ja.style.display="";Q.style.display="";O.style.left="160px";U(0);O.scrollTop=0;O.innerHTML="";M=0;H!=ia&&(ia=H,aa=L,qa=V,ja.innerHTML="",D(),H=null)});N.push(y);v.appendChild(y);var P=function(a){ja.style.display="none";Q.style.display="none";O.style.left="30px";U(a?-1:1);null==H&&(H=ia);O.scrollTop=0;O.innerHTML="";K.spin(O);var b=function(a,b,e){M=0;K.stop();ia=a;e=e||{};var c=0,d;for(d in e)c+=e[d].length;if(b)O.innerHTML=
b;else if(0==a.length&&0==c)O.innerHTML=mxUtils.htmlEntities(mxResources.get("noDiagrams",null,"No Diagrams Found"));else if(O.innerHTML="",0<c){ja.style.display="";O.style.left="160px";ja.innerHTML="";qa=0;aa={"draw.io":a};for(d in e)aa[d]=e[d];D()}else x(!0)};a?q(W.value,b):p(b)};p&&(y=mxUtils.button(mxResources.get("Recent",null,"Recent"),function(){P()}),v.appendChild(y),N.push(y));if(q){y=document.createElement("span");y.style.marginLeft="10px";y.innerHTML=mxUtils.htmlEntities(mxResources.get("search")+
":");v.appendChild(y);var W=document.createElement("input");W.style.marginRight="10px";W.style.marginLeft="10px";W.style.width="220px";mxEvent.addListener(W,"keypress",function(a){13==a.keyCode&&P(!0)});v.appendChild(W);y=mxUtils.button(mxResources.get("search"),function(){P(!0)});y.className="geBtn";v.appendChild(y)}U(0)}var ha=null,ea=null,X=null,Z=null,Y=null,ga=null,ba=null,O=document.createElement("div");O.style.border="1px solid #d3d3d3";O.style.position="absolute";O.style.left="160px";O.style.right=
"34px";v=(c?72:40)+(E?30:0);O.style.top=v+"px";O.style.bottom="68px";O.style.margin="6px 0 0 -1px";O.style.padding="6px";O.style.overflow="auto";var Q=document.createElement("div");Q.style.cssText="position:absolute;left:30px;width:128px;top:"+v+"px;height:22px;margin-top: 6px;white-space: nowrap";var ma=document.createElement("input");ma.style.cssText="width:105px;height:16px;border:1px solid #d3d3d3;padding: 3px 20px 3px 3px;font-size: 12px";ma.setAttribute("placeholder",mxResources.get("search"));
ma.setAttribute("type","text");Q.appendChild(ma);var T=document.createElement("img"),fa="undefined"!=typeof Sidebar?Sidebar.prototype.searchImage:IMAGE_PATH+"/search.png";T.setAttribute("src",fa);T.setAttribute("title",mxResources.get("search"));T.style.position="relative";T.style.left="-18px";T.style.top="1px";T.style.background="url('"+a.editor.transparentImage+"')";Q.appendChild(T);mxEvent.addListener(T,"click",function(){T.getAttribute("src")==Dialog.prototype.closeImage&&(T.setAttribute("src",
-fa),T.setAttribute("title",mxResources.get("search")),ma.value="",null!=pa&&(pa.click(),pa=null));ma.focus()});mxEvent.addListener(ma,"keydown",mxUtils.bind(this,function(a){if(13==a.keyCode){var b=ma.value;if(""==b)null!=pa&&(pa.click(),pa=null);else{if(null==NewDialog.tagsList[n]){var e={},c;for(c in aa)for(var d=aa[c],k=0;k<d.length;k++){var l=d[k];if(null!=l.tags)for(var g=l.tags.toLowerCase().split(";"),f=0;f<g.length;f++)null==e[g[f]]&&(e[g[f]]=[]),e[g[f]].push(l)}NewDialog.tagsList[n]=e}var p=
-b.toLowerCase().split(" "),e=NewDialog.tagsList[n];if(0<qa&&null==e.__tagsList__){for(c in da)for(d=da[c],k=0;k<d.length;k++)for(l=d[k],g=l.title.split(" "),g.push(c),f=0;f<g.length;f++){var q=g[f].toLowerCase();null==e[q]&&(e[q]=[]);e[q].push(l)}e.__tagsList__=!0}c=[];d={};for(k=g=0;k<p.length;k++)if(0<p[k].length){var q=e[p[k]],m={};c=[];if(null!=q)for(f=0;f<q.length;f++)l=q[f],0==g==(null==d[l.url])&&(m[l.url]=!0,c.push(l));d=m;g++}O.scrollTop=0;O.innerHTML="";M=0;e=document.createElement("div");
+fa),T.setAttribute("title",mxResources.get("search")),ma.value="",null!=pa&&(pa.click(),pa=null));ma.focus()});mxEvent.addListener(ma,"keydown",mxUtils.bind(this,function(a){if(13==a.keyCode){var b=ma.value;if(""==b)null!=pa&&(pa.click(),pa=null);else{if(null==NewDialog.tagsList[n]){var e={},c;for(c in aa)for(var d=aa[c],k=0;k<d.length;k++){var l=d[k];if(null!=l.tags)for(var f=l.tags.toLowerCase().split(";"),g=0;g<f.length;g++)null==e[f[g]]&&(e[f[g]]=[]),e[f[g]].push(l)}NewDialog.tagsList[n]=e}var p=
+b.toLowerCase().split(" "),e=NewDialog.tagsList[n];if(0<qa&&null==e.__tagsList__){for(c in da)for(d=da[c],k=0;k<d.length;k++)for(l=d[k],f=l.title.split(" "),f.push(c),g=0;g<f.length;g++){var q=f[g].toLowerCase();null==e[q]&&(e[q]=[]);e[q].push(l)}e.__tagsList__=!0}c=[];d={};for(k=f=0;k<p.length;k++)if(0<p[k].length){var q=e[p[k]],m={};c=[];if(null!=q)for(g=0;g<q.length;g++)l=q[g],0==f==(null==d[l.url])&&(m[l.url]=!0,c.push(l));d=m;f++}O.scrollTop=0;O.innerHTML="";M=0;e=document.createElement("div");
e.style.cssText="border: 1px solid #D3D3D3; padding: 6px; background: #F5F5F5;";mxUtils.write(e,mxResources.get(0==c.length?"noResultsFor":"resultsFor",[b]));O.appendChild(e);null!=ka&&null==pa&&(ka.style.backgroundColor="",pa=ka,ka=e);ia=c;H=null;x(!1)}mxEvent.consume(a)}}));mxEvent.addListener(ma,"keyup",mxUtils.bind(this,function(a){""==ma.value?(T.setAttribute("src",fa),T.setAttribute("title",mxResources.get("search"))):(T.setAttribute("src",Dialog.prototype.closeImage),T.setAttribute("title",
mxResources.get("reset")))}));v+=23;var ja=document.createElement("div");ja.style.cssText="position:absolute;left:30px;width:128px;top:"+v+"px;bottom:68px;margin-top:6px;overflow:auto;border:1px solid #d3d3d3;";mxEvent.addListener(O,"scroll",function(){a.sidebar.hideTooltip()});var na=140,S=140,aa={},ca={},da={},qa=0,oa=!0,ka=null,pa=null;aa.basic=[{title:"blankDiagram",select:!0}];var ia=aa.basic;if(!d){var ra=function(){mxUtils.get(R,function(a){if(!wa){wa=!0;a=a.getXml().documentElement.firstChild;
for(var b={};null!=a;){if("undefined"!==typeof a.getAttribute)if("clibs"==a.nodeName){for(var e=a.getAttribute("name"),c=a.getElementsByTagName("add"),d=[],k=0;k<c.length;k++)d.push(encodeURIComponent(mxUtils.getTextContent(c[k])));null!=e&&0<d.length&&(b[e]=d.join(";"))}else if(d=a.getAttribute("url"),null!=d){c=a.getAttribute("section");e=a.getAttribute("subsection");if(null==c&&(k=d.indexOf("/"),c=d.substring(0,k),null==e)){var l=d.indexOf("/",k+1);-1<l&&(e=d.substring(k+1,l))}k=aa[c];null==k&&
-(k=[],aa[c]=k);d=a.getAttribute("clibs");null!=b[d]&&(d=b[d]);d={url:a.getAttribute("url"),libs:a.getAttribute("libs"),title:a.getAttribute("title"),tooltip:a.getAttribute("name")||a.getAttribute("url"),preview:a.getAttribute("preview"),clibs:d,tags:a.getAttribute("tags")};k.push(d);null!=e&&(k=ca[c],null==k&&(k={},ca[c]=k),c=k[e],null==c&&(c=[],k[e]=c),c.push(d))}a=a.nextSibling}J.stop();D()}})};G.appendChild(Q);G.appendChild(ja);G.appendChild(O);var wa=!1,R=n;/^https?:\/\//.test(R)&&!a.editor.isCorsEnabledForUrl(R)&&
-(R=PROXY_URL+"?url="+encodeURIComponent(R));J.spin(O);null!=z?z(function(a,b){da=a;V=qa=b;ra()},ra):ra();L=aa}mxEvent.addListener(K,"keypress",function(b){a.dialog.container.firstChild==G&&13==b.keyCode&&A()});z=document.createElement("div");z.style.marginTop=d?"4px":"16px";z.style.textAlign="right";z.style.position="absolute";z.style.left="40px";z.style.bottom="24px";z.style.right="40px";d||a.isOffline()||!c||null!=b||f||(v=mxUtils.button(mxResources.get("help"),function(){a.openLink("https://support.draw.io/display/DO/Creating+and+Opening+Files")}),
-v.className="geBtn",z.appendChild(v));v=mxUtils.button(mxResources.get("cancel"),function(){null!=g&&g();a.hideDialog(!0)});v.className="geBtn";!a.editor.cancelFirst||f&&null==g||z.appendChild(v);d||"1"==urlParams.embed||f||(d=mxUtils.button(mxResources.get("fromTemplateUrl"),function(){var b=new FilenameDialog(a,"",mxResources.get("create"),function(b){null!=b&&0<b.length&&(b=a.getUrl(window.location.pathname+"?mode="+a.mode+"&title="+encodeURIComponent(K.value)+"&create="+encodeURIComponent(b)),
+(k=[],aa[c]=k);d=a.getAttribute("clibs");null!=b[d]&&(d=b[d]);d={url:a.getAttribute("url"),libs:a.getAttribute("libs"),title:a.getAttribute("title"),tooltip:a.getAttribute("name")||a.getAttribute("url"),preview:a.getAttribute("preview"),clibs:d,tags:a.getAttribute("tags")};k.push(d);null!=e&&(k=ca[c],null==k&&(k={},ca[c]=k),c=k[e],null==c&&(c=[],k[e]=c),c.push(d))}a=a.nextSibling}K.stop();D()}})};G.appendChild(Q);G.appendChild(ja);G.appendChild(O);var wa=!1,R=n;/^https?:\/\//.test(R)&&!a.editor.isCorsEnabledForUrl(R)&&
+(R=PROXY_URL+"?url="+encodeURIComponent(R));K.spin(O);null!=z?z(function(a,b){da=a;V=qa=b;ra()},ra):ra();L=aa}mxEvent.addListener(J,"keypress",function(b){a.dialog.container.firstChild==G&&13==b.keyCode&&A()});z=document.createElement("div");z.style.marginTop=d?"4px":"16px";z.style.textAlign="right";z.style.position="absolute";z.style.left="40px";z.style.bottom="24px";z.style.right="40px";d||a.isOffline()||!c||null!=b||g||(v=mxUtils.button(mxResources.get("help"),function(){a.openLink("https://support.draw.io/display/DO/Creating+and+Opening+Files")}),
+v.className="geBtn",z.appendChild(v));v=mxUtils.button(mxResources.get("cancel"),function(){null!=f&&f();a.hideDialog(!0)});v.className="geBtn";!a.editor.cancelFirst||g&&null==f||z.appendChild(v);d||"1"==urlParams.embed||g||(d=mxUtils.button(mxResources.get("fromTemplateUrl"),function(){var b=new FilenameDialog(a,"",mxResources.get("create"),function(b){null!=b&&0<b.length&&(b=a.getUrl(window.location.pathname+"?mode="+a.mode+"&title="+encodeURIComponent(J.value)+"&create="+encodeURIComponent(b)),
null==a.getCurrentFile()?window.location.href=b:window.openWindow(b))},mxResources.get("url"));a.showDialog(b.container,300,80,!0,!0);b.init()}),d.className="geBtn",z.appendChild(d));Graph.fileSupport&&t&&(t=mxUtils.button(mxResources.get("import"),function(){if(null==a.newDlgFileInputElt){var b=document.createElement("input");b.setAttribute("multiple","multiple");b.setAttribute("type","file");mxEvent.addListener(b,"change",function(e){a.openFiles(b.files,!0);b.value=""});b.style.display="none";document.body.appendChild(b);
-a.newDlgFileInputElt=b}a.newDlgFileInputElt.click()}),t.className="geBtn",z.appendChild(t));z.appendChild(I);a.editor.cancelFirst||null!=b||f&&null==g||z.appendChild(v);G.appendChild(z);this.container=G};NewDialog.tagsList={};
-var CreateDialog=function(a,d,c,b,f,g,m,e,k,l,n,p,q,u,t,v,z){function y(b,e,c,k){function l(){mxEvent.addListener(g,"click",function(){var b=c;if(m){var e=B.value,k=e.lastIndexOf(".");if(0>d.lastIndexOf(".")&&0>k){var b=null!=b?b:E.value,l="";b==App.MODE_GOOGLE?l=a.drive.extension:b==App.MODE_GITHUB?l=a.gitHub.extension:b==App.MODE_GITLAB?l=a.gitLab.extension:b==App.MODE_NOTION?l=a.notion.extension:b==App.MODE_TRELLO?l=a.trello.extension:b==App.MODE_DROPBOX?l=a.dropbox.extension:b==App.MODE_ONEDRIVE?
-l=a.oneDrive.extension:b==App.MODE_DEVICE&&(l=".drawio");0<=k&&(e=e.substring(0,k));B.value=e+l}}x(c)})}var g=document.createElement("a");g.style.overflow="hidden";var f=document.createElement("img");f.src=b;f.setAttribute("border","0");f.setAttribute("align","absmiddle");f.style.width="60px";f.style.height="60px";f.style.paddingBottom="6px";g.style.display="inline-block";g.className="geBaseButton";g.style.position="relative";g.style.margin="4px";g.style.padding="8px 8px 10px 8px";g.style.whiteSpace=
-"nowrap";g.appendChild(f);g.style.color="gray";g.style.fontSize="11px";var n=document.createElement("div");g.appendChild(n);mxUtils.write(n,e);if(null!=k&&null==a[k]){f.style.visibility="hidden";mxUtils.setOpacity(n,10);var q=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});q.spin(g);var u=window.setTimeout(function(){null==a[k]&&(q.stop(),g.style.display="none")},3E4);a.addListener("clientLoaded",mxUtils.bind(this,
-function(){null!=a[k]&&(window.clearTimeout(u),mxUtils.setOpacity(n,100),f.style.visibility="",q.stop(),l())}))}else l();D.appendChild(g);++G==p&&(mxUtils.br(D),G=0)}function x(b){var e=B.value;if(null==b||null!=e&&0<e.length)z&&a.hideDialog(),c(e,b,B)}m=null!=m?m:!0;e=null!=e?e:!0;p=null!=p?p:4;z=null!=z?z:!0;g=document.createElement("div");g.style.whiteSpace="nowrap";null==b&&a.addLanguageMenu(g);var A=document.createElement("h2");mxUtils.write(A,f||mxResources.get("create"));A.style.marginTop=
-"0px";A.style.marginBottom="24px";g.appendChild(A);mxUtils.write(g,mxResources.get("filename")+":");var B=document.createElement("input");B.setAttribute("value",d);B.style.width="200px";B.style.marginLeft="10px";B.style.marginBottom="20px";B.style.maxWidth="70%";this.init=function(){B.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?B.select():document.execCommand("selectAll",!1,null)};g.appendChild(B);null!=v&&(null!=a.editor.diagramFileTypes&&(f=FilenameDialog.createFileTypes(a,
-B,a.editor.diagramFileTypes),f.style.marginLeft="6px",f.style.width="80px",g.appendChild(f)),g.appendChild(FilenameDialog.createTypeHint(a,B,v)));v=null;if(null!=q&&null!=u&&"image/"==u.substring(0,6)&&("image/svg"!=u.substring(0,9)||mxClient.IS_SVG)){B.style.width="160px";f=document.createElement("img");var C=t?q:btoa(unescape(encodeURIComponent(q)));f.setAttribute("src","data:"+u+";base64,"+C);f.style.position="absolute";f.style.top="70px";f.style.right="100px";f.style.maxWidth="120px";f.style.maxHeight=
-"80px";mxUtils.setPrefixedStyle(f.style,"transform","translate(50%,-50%)");g.appendChild(f);mxClient.IS_FF||null==navigator.clipboard||"image/png"!=u||(v=mxUtils.button(mxResources.get("copy"),function(b){b=a.base64ToBlob(C,"image/png");b=new ClipboardItem({"image/png":b,"text/html":new Blob(['<img src="data:'+u+";base64,"+C+'">'],{type:"text/html"})});navigator.clipboard.write([b]).then(mxUtils.bind(this,function(){a.alert(mxResources.get("copiedToClipboard"))}))["catch"](mxUtils.bind(this,function(b){a.handleError(b)}))}),
-v.style.marginTop="6px",v.className="geBtn");k&&Editor.popupsAllowed&&(f.style.cursor="pointer",mxEvent.addGestureListeners(f,null,null,function(a){mxEvent.isPopupTrigger(a)||x("_blank")}))}mxUtils.br(g);var D=document.createElement("div");D.style.textAlign="center";var G=0;D.style.marginTop="6px";g.appendChild(D);var E=document.createElement("select");E.style.marginLeft="10px";a.isOfflineApp()||a.isOffline()||("function"===typeof window.DriveClient&&(q=document.createElement("option"),q.setAttribute("value",
+a.newDlgFileInputElt=b}a.newDlgFileInputElt.click()}),t.className="geBtn",z.appendChild(t));z.appendChild(I);a.editor.cancelFirst||null!=b||g&&null==f||z.appendChild(v);G.appendChild(z);this.container=G};NewDialog.tagsList={};
+var CreateDialog=function(a,d,c,b,g,f,m,e,k,l,n,p,q,u,t,v,z){function y(b,e,c,k){function l(){mxEvent.addListener(f,"click",function(){var b=c;if(m){var e=B.value,k=e.lastIndexOf(".");if(0>d.lastIndexOf(".")&&0>k){var b=null!=b?b:E.value,l="";b==App.MODE_GOOGLE?l=a.drive.extension:b==App.MODE_GITHUB?l=a.gitHub.extension:b==App.MODE_GITLAB?l=a.gitLab.extension:b==App.MODE_NOTION?l=a.notion.extension:b==App.MODE_TRELLO?l=a.trello.extension:b==App.MODE_DROPBOX?l=a.dropbox.extension:b==App.MODE_ONEDRIVE?
+l=a.oneDrive.extension:b==App.MODE_DEVICE&&(l=".drawio");0<=k&&(e=e.substring(0,k));B.value=e+l}}x(c)})}var f=document.createElement("a");f.style.overflow="hidden";var g=document.createElement("img");g.src=b;g.setAttribute("border","0");g.setAttribute("align","absmiddle");g.style.width="60px";g.style.height="60px";g.style.paddingBottom="6px";f.style.display="inline-block";f.className="geBaseButton";f.style.position="relative";f.style.margin="4px";f.style.padding="8px 8px 10px 8px";f.style.whiteSpace=
+"nowrap";f.appendChild(g);f.style.color="gray";f.style.fontSize="11px";var n=document.createElement("div");f.appendChild(n);mxUtils.write(n,e);if(null!=k&&null==a[k]){g.style.visibility="hidden";mxUtils.setOpacity(n,10);var q=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});q.spin(f);var u=window.setTimeout(function(){null==a[k]&&(q.stop(),f.style.display="none")},3E4);a.addListener("clientLoaded",mxUtils.bind(this,
+function(){null!=a[k]&&(window.clearTimeout(u),mxUtils.setOpacity(n,100),g.style.visibility="",q.stop(),l())}))}else l();D.appendChild(f);++G==p&&(mxUtils.br(D),G=0)}function x(b){var e=B.value;if(null==b||null!=e&&0<e.length)z&&a.hideDialog(),c(e,b,B)}m=null!=m?m:!0;e=null!=e?e:!0;p=null!=p?p:4;z=null!=z?z:!0;f=document.createElement("div");f.style.whiteSpace="nowrap";null==b&&a.addLanguageMenu(f);var A=document.createElement("h2");mxUtils.write(A,g||mxResources.get("create"));A.style.marginTop=
+"0px";A.style.marginBottom="24px";f.appendChild(A);mxUtils.write(f,mxResources.get("filename")+":");var B=document.createElement("input");B.setAttribute("value",d);B.style.width="200px";B.style.marginLeft="10px";B.style.marginBottom="20px";B.style.maxWidth="70%";this.init=function(){B.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?B.select():document.execCommand("selectAll",!1,null)};f.appendChild(B);null!=v&&(null!=a.editor.diagramFileTypes&&(g=FilenameDialog.createFileTypes(a,
+B,a.editor.diagramFileTypes),g.style.marginLeft="6px",g.style.width="80px",f.appendChild(g)),f.appendChild(FilenameDialog.createTypeHint(a,B,v)));v=null;if(null!=q&&null!=u&&"image/"==u.substring(0,6)&&("image/svg"!=u.substring(0,9)||mxClient.IS_SVG)){B.style.width="160px";g=document.createElement("img");var C=t?q:btoa(unescape(encodeURIComponent(q)));g.setAttribute("src","data:"+u+";base64,"+C);g.style.position="absolute";g.style.top="70px";g.style.right="100px";g.style.maxWidth="120px";g.style.maxHeight=
+"80px";mxUtils.setPrefixedStyle(g.style,"transform","translate(50%,-50%)");f.appendChild(g);mxClient.IS_FF||null==navigator.clipboard||"image/png"!=u||(v=mxUtils.button(mxResources.get("copy"),function(b){b=a.base64ToBlob(C,"image/png");b=new ClipboardItem({"image/png":b,"text/html":new Blob(['<img src="data:'+u+";base64,"+C+'">'],{type:"text/html"})});navigator.clipboard.write([b]).then(mxUtils.bind(this,function(){a.alert(mxResources.get("copiedToClipboard"))}))["catch"](mxUtils.bind(this,function(b){a.handleError(b)}))}),
+v.style.marginTop="6px",v.className="geBtn");k&&Editor.popupsAllowed&&(g.style.cursor="pointer",mxEvent.addGestureListeners(g,null,null,function(a){mxEvent.isPopupTrigger(a)||x("_blank")}))}mxUtils.br(f);var D=document.createElement("div");D.style.textAlign="center";var G=0;D.style.marginTop="6px";f.appendChild(D);var E=document.createElement("select");E.style.marginLeft="10px";a.isOfflineApp()||a.isOffline()||("function"===typeof window.DriveClient&&(q=document.createElement("option"),q.setAttribute("value",
App.MODE_GOOGLE),mxUtils.write(q,mxResources.get("googleDrive")),E.appendChild(q),y(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googleDrive"),App.MODE_GOOGLE,"drive")),"function"===typeof window.OneDriveClient&&(q=document.createElement("option"),q.setAttribute("value",App.MODE_ONEDRIVE),mxUtils.write(q,mxResources.get("oneDrive")),E.appendChild(q),a.mode==App.MODE_ONEDRIVE&&q.setAttribute("selected","selected"),y(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),App.MODE_ONEDRIVE,
"oneDrive")),"function"===typeof window.DropboxClient&&(q=document.createElement("option"),q.setAttribute("value",App.MODE_DROPBOX),mxUtils.write(q,mxResources.get("dropbox")),E.appendChild(q),a.mode==App.MODE_DROPBOX&&q.setAttribute("selected","selected"),y(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),App.MODE_DROPBOX,"dropbox")),null!=a.gitHub&&(q=document.createElement("option"),q.setAttribute("value",App.MODE_GITHUB),mxUtils.write(q,mxResources.get("github")),E.appendChild(q),y(IMAGE_PATH+
"/github-logo.svg",mxResources.get("github"),App.MODE_GITHUB,"gitHub")),null!=a.gitLab&&(q=document.createElement("option"),q.setAttribute("value",App.MODE_GITLAB),mxUtils.write(q,mxResources.get("gitlab")),E.appendChild(q),y(IMAGE_PATH+"/gitlab-logo.svg",mxResources.get("gitlab"),App.MODE_GITLAB,"gitLab")),null!=a.notion&&(q=document.createElement("option"),q.setAttribute("value",App.MODE_NOTION),mxUtils.write(q,mxResources.get("notion")),E.appendChild(q),y(IMAGE_PATH+"/notion-logo.svg",mxResources.get("notion"),
@@ -9977,207 +9978,207 @@ App.MODE_NOTION,"notion")),"function"===typeof window.TrelloClient&&(q=document.
a.mode!=App.MODE_DEVICE&&e||q.setAttribute("selected","selected"),n&&y(IMAGE_PATH+"/osa_drive-harddisk.png",mxResources.get("device"),App.MODE_DEVICE));e&&isLocalStorage&&"0"!=urlParams.browser&&(e=document.createElement("option"),e.setAttribute("value",App.MODE_BROWSER),mxUtils.write(e,mxResources.get("browser")),E.appendChild(e),a.mode==App.MODE_BROWSER&&e.setAttribute("selected","selected"),y(IMAGE_PATH+"/osa_database.png",mxResources.get("browser"),App.MODE_BROWSER));e=document.createElement("div");
e.style.marginTop="26px";e.style.textAlign="center";null!=l&&(n=mxUtils.button(mxResources.get("help"),function(){a.openLink(l)}),n.className="geBtn",e.appendChild(n));n=mxUtils.button(mxResources.get(null!=b?"close":"cancel"),function(){null!=b?b():(a.fileLoaded(null),a.hideDialog(),window.close(),window.location.href=a.getUrl())});n.className="geBtn";a.editor.cancelFirst&&null==b&&e.appendChild(n);null==b&&(q=mxUtils.button(mxResources.get("decideLater"),function(){x(null)}),q.className="geBtn",
e.appendChild(q));k&&Editor.popupsAllowed&&(k=mxUtils.button(mxResources.get("openInNewWindow"),function(){x("_blank")}),k.className="geBtn",e.appendChild(k));CreateDialog.showDownloadButton&&(k=mxUtils.button(mxResources.get("download"),function(){x("download")}),k.className="geBtn",e.appendChild(k),null!=v&&(k.style.marginTop="6px",e.style.marginTop="6px"));null!=v&&(mxUtils.br(e),e.appendChild(v));a.editor.cancelFirst&&null==b||e.appendChild(n);mxEvent.addListener(B,"keypress",function(b){13==
-b.keyCode?x(App.MODE_DEVICE):27==b.keyCode&&(a.fileLoaded(null),a.hideDialog(),window.close())});g.appendChild(e);this.container=g};CreateDialog.showDownloadButton=!0;
-var PopupDialog=function(a,d,c,b,f){f=null!=f?f:!0;var g=document.createElement("div");g.style.textAlign="left";mxUtils.write(g,mxResources.get("fileOpenLocation"));mxUtils.br(g);mxUtils.br(g);var m=mxUtils.button(mxResources.get("openInThisWindow"),function(){f&&a.hideDialog();null!=b&&b()});m.className="geBtn";m.style.marginBottom="8px";m.style.width="280px";g.appendChild(m);mxUtils.br(g);var e=mxUtils.button(mxResources.get("openInNewWindow"),function(){f&&a.hideDialog();null!=c&&c();a.openLink(d,
-null,!0)});e.className="geBtn gePrimaryBtn";e.style.width=m.style.width;g.appendChild(e);mxUtils.br(g);mxUtils.br(g);mxUtils.write(g,mxResources.get("allowPopups"));this.container=g},ImageDialog=function(a,d,c,b,f,g){g=null!=g?g:!0;var m=a.editor.graph,e=document.createElement("div");mxUtils.write(e,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=
+b.keyCode?x(App.MODE_DEVICE):27==b.keyCode&&(a.fileLoaded(null),a.hideDialog(),window.close())});f.appendChild(e);this.container=f};CreateDialog.showDownloadButton=!0;
+var PopupDialog=function(a,d,c,b,g){g=null!=g?g:!0;var f=document.createElement("div");f.style.textAlign="left";mxUtils.write(f,mxResources.get("fileOpenLocation"));mxUtils.br(f);mxUtils.br(f);var m=mxUtils.button(mxResources.get("openInThisWindow"),function(){g&&a.hideDialog();null!=b&&b()});m.className="geBtn";m.style.marginBottom="8px";m.style.width="280px";f.appendChild(m);mxUtils.br(f);var e=mxUtils.button(mxResources.get("openInNewWindow"),function(){g&&a.hideDialog();null!=c&&c();a.openLink(d,
+null,!0)});e.className="geBtn gePrimaryBtn";e.style.width=m.style.width;f.appendChild(e);mxUtils.br(f);mxUtils.br(f);mxUtils.write(f,mxResources.get("allowPopups"));this.container=f},ImageDialog=function(a,d,c,b,g,f){f=null!=f?f:!0;var m=a.editor.graph,e=document.createElement("div");mxUtils.write(e,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 k=document.createElement("input");k.setAttribute("value",c);k.setAttribute("type","text");k.setAttribute("spellcheck","false");k.setAttribute("autocorrect","off");k.setAttribute("autocomplete","off");k.setAttribute("autocapitalize","off");k.style.marginTop="6px";k.style.width=(Graph.fileSupport?460:340)-20+"px";k.style.backgroundImage="url('"+Dialog.prototype.clearImage+"')";k.style.backgroundRepeat="no-repeat";k.style.backgroundPosition="100% 50%";k.style.paddingRight=
"14px";c=document.createElement("div");c.setAttribute("title",mxResources.get("reset"));c.style.position="relative";c.style.left="-16px";c.style.width="12px";c.style.height="14px";c.style.cursor="pointer";c.style.display="inline-block";c.style.top="3px";c.style.background="url('"+a.editor.transparentImage+"')";mxEvent.addListener(c,"click",function(){k.value="";k.focus()});d.appendChild(k);d.appendChild(c);e.appendChild(d);var l=function(e,c,d,k){var l="data:"==e.substring(0,5);!a.isOffline()||l&&
-"undefined"===typeof chrome?0<e.length&&a.spinner.spin(document.body,mxResources.get("inserting"))?a.loadImage(e,function(l){a.spinner.stop();a.hideDialog();var f=!1===k?1:null!=c&&null!=d?Math.max(c/l.width,d/l.height):Math.min(1,Math.min(520/l.width,520/l.height));g&&(e=a.convertDataUri(e));b(e,Math.round(Number(l.width)*f),Math.round(Number(l.height)*f))},function(){a.spinner.stop();b(null);a.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"))}):(a.hideDialog(),
-b(e)):(e=a.convertDataUri(e),c=null==c?120:c,d=null==d?100:d,a.hideDialog(),b(e,c,d))},n=function(e,c){if(null!=e){var d=f?null:m.getModel().getGeometry(m.getSelectionCell());null!=d?l(e,d.width,d.height,c):l(e,null,null,c)}else a.hideDialog(),b(null)};this.init=function(){k.focus();if(Graph.fileSupport){k.setAttribute("placeholder",mxResources.get("dragImagesHere"));var b=e.parentNode,c=null;mxEvent.addListener(b,"dragleave",function(a){null!=c&&(c.parentNode.removeChild(c),c=null);a.stopPropagation();
-a.preventDefault()});mxEvent.addListener(b,"dragover",mxUtils.bind(this,function(e){null==c&&(!mxClient.IS_IE||10<document.documentMode)&&(c=a.highlightElement(b));e.stopPropagation();e.preventDefault()}));mxEvent.addListener(b,"drop",mxUtils.bind(this,function(b){null!=c&&(c.parentNode.removeChild(c),c=null);if(0<b.dataTransfer.files.length)a.importFiles(b.dataTransfer.files,0,0,a.maxImageSize,function(a,b,e,c,d,k,l,g){n(a,g)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var b=
+"undefined"===typeof chrome?0<e.length&&a.spinner.spin(document.body,mxResources.get("inserting"))?a.loadImage(e,function(l){a.spinner.stop();a.hideDialog();var g=!1===k?1:null!=c&&null!=d?Math.max(c/l.width,d/l.height):Math.min(1,Math.min(520/l.width,520/l.height));f&&(e=a.convertDataUri(e));b(e,Math.round(Number(l.width)*g),Math.round(Number(l.height)*g))},function(){a.spinner.stop();b(null);a.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"))}):(a.hideDialog(),
+b(e)):(e=a.convertDataUri(e),c=null==c?120:c,d=null==d?100:d,a.hideDialog(),b(e,c,d))},n=function(e,c){if(null!=e){var d=g?null:m.getModel().getGeometry(m.getSelectionCell());null!=d?l(e,d.width,d.height,c):l(e,null,null,c)}else a.hideDialog(),b(null)};this.init=function(){k.focus();if(Graph.fileSupport){k.setAttribute("placeholder",mxResources.get("dragImagesHere"));var b=e.parentNode,c=null;mxEvent.addListener(b,"dragleave",function(a){null!=c&&(c.parentNode.removeChild(c),c=null);a.stopPropagation();
+a.preventDefault()});mxEvent.addListener(b,"dragover",mxUtils.bind(this,function(e){null==c&&(!mxClient.IS_IE||10<document.documentMode)&&(c=a.highlightElement(b));e.stopPropagation();e.preventDefault()}));mxEvent.addListener(b,"drop",mxUtils.bind(this,function(b){null!=c&&(c.parentNode.removeChild(c),c=null);if(0<b.dataTransfer.files.length)a.importFiles(b.dataTransfer.files,0,0,a.maxImageSize,function(a,b,e,c,d,k,l,f){n(a,f)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var b=
0;b<a.length;b++)a[b]()},!mxEvent.isControlDown(b),null,null,!0);else if(0<=mxUtils.indexOf(b.dataTransfer.types,"text/uri-list")){var e=b.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)($|\?)/i.test(e)&&n(decodeURIComponent(e))}b.stopPropagation();b.preventDefault()}),!1)}};c=document.createElement("div");c.style.marginTop="14px";c.style.textAlign="center";d=mxUtils.button(mxResources.get("cancel"),function(){a.spinner.stop();a.hideDialog()});d.className="geBtn";a.editor.cancelFirst&&
c.appendChild(d);ImageDialog.filePicked=function(a){a.action==google.picker.Action.PICKED&&null!=a.docs[0].thumbnails&&(a=a.docs[0].thumbnails[a.docs[0].thumbnails.length-1],null!=a&&(k.value=a.url));k.focus()};if(Graph.fileSupport){if(null==a.imgDlgFileInputElt){var p=document.createElement("input");p.setAttribute("multiple","multiple");p.setAttribute("type","file");mxEvent.addListener(p,"change",function(b){null!=p.files&&(a.importFiles(p.files,0,0,a.maxImageSize,function(a,b,e,c,d,k){n(a)},function(){},
function(a){return"image/"==a.type.substring(0,6)},function(a){for(var b=0;b<a.length;b++)a[b]()},!0),p.type="",p.type="file",p.value="")});p.style.display="none";document.body.appendChild(p);a.imgDlgFileInputElt=p}var q=mxUtils.button(mxResources.get("open"),function(){a.imgDlgFileInputElt.click()});q.className="geBtn";c.appendChild(q)}document.createElement("canvas").getContext&&"data:image/"==k.value.substring(0,11)&&"data:image/svg"!=k.value.substring(0,14)&&(q=mxUtils.button(mxResources.get("crop"),
function(){var b=new CropImageDialog(a,k.value,function(a){k.value=a});a.showDialog(b.container,300,380,!0,!0);b.init()}),q.className="geBtn",c.appendChild(q));mxEvent.addListener(k,"keypress",function(a){13==a.keyCode&&n(k.value)});q=mxUtils.button(mxResources.get("apply"),function(){n(k.value)});q.className="geBtn gePrimaryBtn";c.appendChild(q);a.editor.cancelFirst||c.appendChild(d);Graph.fileSupport&&(c.style.marginTop="120px",e.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",e.style.backgroundPosition=
-"center 65%",e.style.backgroundRepeat="no-repeat",d=document.createElement("div"),d.style.position="absolute",d.style.width="420px",d.style.top="58%",d.style.textAlign="center",d.style.fontSize="18px",d.style.color="#a0c3ff",mxUtils.write(d,mxResources.get("dragImagesHere")),e.appendChild(d));e.appendChild(c);this.container=e},LinkDialog=function(a,d,c,b,f,g,m){function e(a,b,e){e=mxUtils.button("",e);e.className="geBtn";e.setAttribute("title",b);b=document.createElement("img");b.style.height="26px";
+"center 65%",e.style.backgroundRepeat="no-repeat",d=document.createElement("div"),d.style.position="absolute",d.style.width="420px",d.style.top="58%",d.style.textAlign="center",d.style.fontSize="18px",d.style.color="#a0c3ff",mxUtils.write(d,mxResources.get("dragImagesHere")),e.appendChild(d));e.appendChild(c);this.container=e},LinkDialog=function(a,d,c,b,g,f,m){function e(a,b,e){e=mxUtils.button("",e);e.className="geBtn";e.setAttribute("title",b);b=document.createElement("img");b.style.height="26px";
b.style.width="26px";b.setAttribute("src",a);e.style.minWidth="42px";e.style.verticalAlign="middle";e.appendChild(b);x.appendChild(e)}var k=document.createElement("div");mxUtils.write(k,mxResources.get("editLink")+":");var l=document.createElement("div");l.className="geTitle";l.style.backgroundColor="transparent";l.style.borderColor="transparent";l.style.whiteSpace="nowrap";l.style.textOverflow="clip";l.style.cursor="default";l.style.paddingRight="20px";var n=document.createElement("input");n.setAttribute("placeholder",
-mxResources.get("dragUrlsHere"));n.setAttribute("type","text");n.style.marginTop="6px";n.style.width="100%";n.style.boxSizing="border-box";n.style.backgroundImage="url('"+Dialog.prototype.clearImage+"')";n.style.backgroundRepeat="no-repeat";n.style.backgroundPosition="100% 50%";n.style.paddingRight="14px";var p=document.createElement("div");p.setAttribute("title",mxResources.get("reset"));p.style.position="relative";p.style.left="-16px";p.style.width="12px";p.style.height="14px";p.style.cursor="pointer";
-p.style.display="inline-block";p.style.top="3px";p.style.background="url('"+a.editor.transparentImage+"')";mxEvent.addListener(p,"click",function(){n.value="";n.focus()});var q=document.createElement("input");q.style.cssText="margin-right:8px;margin-bottom:8px;";q.setAttribute("value","url");q.setAttribute("type","radio");q.setAttribute("name","geLinkDialogOption");var u=document.createElement("input");u.style.cssText="margin-right:8px;margin-bottom:8px;";u.setAttribute("value","url");u.setAttribute("type",
-"radio");u.setAttribute("name","geLinkDialogOption");var t=document.createElement("select");t.style.width="100%";var v=document.createElement("input");v.setAttribute("type","checkbox");v.style.margin="0 6p 0 6px";null!=m&&(v.setAttribute("checked","checked"),v.defaultChecked=!0);m=null!=m?m:"_blank";v.setAttribute("title",m);g&&(n.style.width="340px");if(f&&null!=a.pages){null!=d&&Graph.isPageLink(d)?(u.setAttribute("checked","checked"),u.defaultChecked=!0):(n.setAttribute("value",d),q.setAttribute("checked",
-"checked"),q.defaultChecked=!0);l.appendChild(q);l.appendChild(n);l.appendChild(p);g&&(l.appendChild(v),mxUtils.write(l,mxResources.get("openInNewWindow")));mxUtils.br(l);l.appendChild(u);f=!1;for(g=0;g<a.pages.length;g++)p=document.createElement("option"),mxUtils.write(p,a.pages[g].getName()||mxResources.get("pageWithNumber",[g+1])),p.setAttribute("value","data:page/id,"+a.pages[g].getId()),d==p.getAttribute("value")&&(p.setAttribute("selected","selected"),f=!0),t.appendChild(p);if(!f&&u.checked){var z=
-document.createElement("option");mxUtils.write(z,mxResources.get("pageNotFound"));z.setAttribute("disabled","disabled");z.setAttribute("selected","selected");z.setAttribute("value","pageNotFound");t.appendChild(z);mxEvent.addListener(t,"change",function(){null==z.parentNode||z.selected||z.parentNode.removeChild(z)})}l.appendChild(t)}else n.setAttribute("value",d),l.appendChild(n),l.appendChild(p);k.appendChild(l);var y=mxUtils.button(c,function(){a.hideDialog();b(u.checked?"pageNotFound"!==t.value?
-t.value:d:n.value,LinkDialog.selectedDocs,v.checked?m:null)});y.style.verticalAlign="middle";y.className="geBtn gePrimaryBtn";this.init=function(){u.checked?t.focus():(n.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?n.select():document.execCommand("selectAll",!1,null));mxEvent.addListener(t,"focus",function(){q.removeAttribute("checked");u.setAttribute("checked","checked");u.checked=!0});mxEvent.addListener(n,"focus",function(){u.removeAttribute("checked");q.setAttribute("checked",
-"checked");q.checked=!0});if(Graph.fileSupport){var b=k.parentNode,e=null;mxEvent.addListener(b,"dragleave",function(a){null!=e&&(e.parentNode.removeChild(e),e=null);a.stopPropagation();a.preventDefault()});mxEvent.addListener(b,"dragover",mxUtils.bind(this,function(c){null==e&&(!mxClient.IS_IE||10<document.documentMode)&&(e=a.highlightElement(b));c.stopPropagation();c.preventDefault()}));mxEvent.addListener(b,"drop",mxUtils.bind(this,function(a){null!=e&&(e.parentNode.removeChild(e),e=null);0<=mxUtils.indexOf(a.dataTransfer.types,
-"text/uri-list")&&(n.value=decodeURIComponent(a.dataTransfer.getData("text/uri-list")),q.setAttribute("checked","checked"),q.checked=!0,y.click());a.stopPropagation();a.preventDefault()}),!1)}};var x=document.createElement("div");x.style.marginTop="20px";x.style.textAlign="center";c=mxUtils.button(mxResources.get("help"),function(){a.openLink("https://www.diagrams.net/doc/faq/custom-links")});c.style.verticalAlign="middle";c.className="geBtn";x.appendChild(c);a.isOffline()&&!mxClient.IS_CHROMEAPP&&
-(c.style.display="none");c=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});c.style.verticalAlign="middle";c.className="geBtn";a.editor.cancelFirst&&x.appendChild(c);LinkDialog.selectedDocs=null;LinkDialog.filePicked=function(a){if(a.action==google.picker.Action.PICKED){LinkDialog.selectedDocs=a.docs;var b=a.docs[0].url;"application/mxe"==a.docs[0].mimeType||null!=a.docs[0].mimeType&&"application/vnd.jgraph."==a.docs[0].mimeType.substring(0,23)?b="https://www.draw.io/#G"+a.docs[0].id:
-"application/vnd.google-apps.folder"==a.docs[0].mimeType&&(b="https://drive.google.com/#folders/"+a.docs[0].id);n.value=b;n.focus()}else LinkDialog.selectedDocs=null;n.focus()};"undefined"!=typeof google&&"undefined"!=typeof google.picker&&null!=a.drive&&e(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googlePlus"),function(){a.spinner.spin(document.body,mxResources.get("authorizing"))&&a.drive.checkToken(mxUtils.bind(this,function(){a.spinner.stop();if(null==a.linkPicker){var b=a.drive.createLinkPicker();
-a.linkPicker=b.setCallback(function(a){LinkDialog.filePicked(a)}).build()}a.linkPicker.setVisible(!0)}))});"undefined"!=typeof Dropbox&&"undefined"!=typeof Dropbox.choose&&e(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),function(){Dropbox.choose({linkType:"direct",cancel:function(){},success:function(a){n.value=a[0].link;n.focus()}})});null!=a.oneDrive&&e(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),function(){a.oneDrive.pickFile(function(a,b){n.value=b.value[0].webUrl;
-n.focus()})});null!=a.gitHub&&e(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),function(){a.gitHub.pickFile(function(a){if(null!=a){a=a.split("/");var b=a[0],e=a[1],c=a[2];a=a.slice(3,a.length).join("/");n.value="https://github.com/"+b+"/"+e+"/blob/"+c+"/"+a;n.focus()}})});null!=a.gitLab&&e(IMAGE_PATH+"/gitlab-logo.svg",mxResources.get("gitlab"),function(){a.gitLab.pickFile(function(a){if(null!=a){a=a.split("/");var b=a[0],e=a[1],c=a[2];a=a.slice(3,a.length).join("/");n.value=DRAWIO_GITLAB_URL+
-"/"+b+"/"+e+"/blob/"+c+"/"+a;n.focus()}})});mxEvent.addListener(n,"keypress",function(e){13==e.keyCode&&(a.hideDialog(),b(u.checked?t.value:n.value,LinkDialog.selectedDocs))});x.appendChild(y);a.editor.cancelFirst||x.appendChild(c);k.appendChild(x);this.container=k},FeedbackDialog=function(a,d,c,b){var f=document.createElement("div"),g=document.createElement("div");mxUtils.write(g,mxResources.get("sendYourFeedback"));g.style.fontSize="18px";g.style.marginBottom="18px";f.appendChild(g);g=document.createElement("div");
-mxUtils.write(g,mxResources.get("yourEmailAddress")+(c?"":" ("+mxResources.get("required")+")"));f.appendChild(g);var m=document.createElement("input");m.setAttribute("type","text");m.style.marginTop="6px";m.style.width="600px";var e=mxUtils.button(mxResources.get("sendMessage"),function(){var e=n.value+(l.checked?"\nDiagram:\n"+(null!=b?b:mxUtils.getXml(a.getXmlFileData())):"")+"\nuserAgent:\n"+navigator.userAgent+"\nappVersion:\n"+navigator.appVersion+"\nappName:\n"+navigator.appName+"\nplatform:\n"+
-navigator.platform;e.length>FeedbackDialog.maxAttachmentSize?a.alert(mxResources.get("drawingTooLarge")):(a.hideDialog(),a.spinner.spin(document.body)&&mxUtils.post(null!=FeedbackDialog.feedbackUrl?FeedbackDialog.feedbackUrl:"/email","email="+encodeURIComponent(m.value)+"&version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&body="+encodeURIComponent((null!=d?d:"Feedback")+":\n"+e),function(b){a.spinner.stop();200<=b.getStatus()&&299>=b.getStatus()?a.alert(mxResources.get("feedbackSent")):
-a.alert(mxResources.get("errorSendingFeedback"))},function(){a.spinner.stop();a.alert(mxResources.get("errorSendingFeedback"))}))});e.className="geBtn gePrimaryBtn";if(!c){e.setAttribute("disabled","disabled");var k=/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;mxEvent.addListener(m,"change",function(){0<m.value.length&&0<k.test(m.value)?e.removeAttribute("disabled"):e.setAttribute("disabled",
-"disabled")});mxEvent.addListener(m,"keyup",function(){0<m.value.length&&k.test(m.value)?e.removeAttribute("disabled"):e.setAttribute("disabled","disabled")})}f.appendChild(m);this.init=function(){m.focus()};var l=document.createElement("input");l.setAttribute("type","checkbox");l.setAttribute("checked","checked");l.defaultChecked=!0;c=document.createElement("p");c.style.marginTop="14px";c.appendChild(l);g=document.createElement("span");mxUtils.write(g," "+mxResources.get("includeCopyOfMyDiagram"));
-c.appendChild(g);mxEvent.addListener(g,"click",function(a){l.checked=!l.checked;mxEvent.consume(a)});f.appendChild(c);g=document.createElement("div");mxUtils.write(g,mxResources.get("feedback"));f.appendChild(g);var n=document.createElement("textarea");n.style.resize="none";n.style.width="600px";n.style.height="140px";n.style.marginTop="6px";n.setAttribute("placeholder",mxResources.get("comments"));f.appendChild(n);c=document.createElement("div");c.style.marginTop="26px";c.style.textAlign="right";
-g=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});g.className="geBtn";a.editor.cancelFirst?(c.appendChild(g),c.appendChild(e)):(c.appendChild(e),c.appendChild(g));f.appendChild(c);this.container=f};FeedbackDialog.maxAttachmentSize=1E6;
-var RevisionDialog=function(a,d,c){var b=document.createElement("div"),f=document.createElement("h3");f.style.marginTop="0px";mxUtils.write(f,mxResources.get("revisionHistory"));b.appendChild(f);f=document.createElement("div");f.style.position="absolute";f.style.overflow="auto";f.style.width="170px";f.style.height="378px";b.appendChild(f);var g=document.createElement("div");g.style.position="absolute";g.style.border="1px solid lightGray";g.style.left="199px";g.style.width="470px";g.style.height="376px";
-g.style.overflow="hidden";var m=document.createElement("div");m.style.cssText="position:absolute;left:0;right:0;top:0;bottom:20px;text-align:center;transform:translate(0,50%);pointer-events:none;";g.appendChild(m);mxEvent.disableContextMenu(g);b.appendChild(g);var e=new Graph(g);e.setTooltips(!1);e.setEnabled(!1);e.setPanning(!0);e.panningHandler.ignoreCell=!0;e.panningHandler.useLeftButtonForPanning=!0;e.minFitScale=null;e.maxFitScale=null;e.centerZoom=!0;var k=0,l=null,n=0,p=e.getGlobalVariable;
+mxResources.get("dragUrlsHere"));n.setAttribute("type","text");n.style.marginTop="6px";n.style.width="100%";n.style.boxSizing="border-box";n.style.backgroundImage="url('"+Dialog.prototype.clearImage+"')";n.style.backgroundRepeat="no-repeat";n.style.backgroundPosition="100% 50%";n.style.paddingRight="14px";n.style.marginBottom="4px";var p=document.createElement("div");p.setAttribute("title",mxResources.get("reset"));p.style.position="relative";p.style.left="-16px";p.style.width="12px";p.style.height=
+"14px";p.style.cursor="pointer";p.style.display="inline-block";p.style.top="3px";p.style.background="url('"+a.editor.transparentImage+"')";mxEvent.addListener(p,"click",function(){n.value="";n.focus()});var q=document.createElement("input");q.style.cssText="margin-right:8px;margin-bottom:8px;";q.setAttribute("value","url");q.setAttribute("type","radio");q.setAttribute("name","geLinkDialogOption");var u=document.createElement("input");u.style.cssText="margin-right:8px;margin-bottom:8px;";u.setAttribute("value",
+"url");u.setAttribute("type","radio");u.setAttribute("name","geLinkDialogOption");var t=document.createElement("select");t.style.width="100%";var v=document.createElement("input");v.setAttribute("type","checkbox");v.style.margin="0 6p 0 6px";null!=m&&(v.setAttribute("checked","checked"),v.defaultChecked=!0);m=null!=m?m:"_blank";v.setAttribute("title",m);f&&(n.style.width="340px");if(g&&null!=a.pages){null!=d&&Graph.isPageLink(d)?(u.setAttribute("checked","checked"),u.defaultChecked=!0):(n.setAttribute("value",
+d),q.setAttribute("checked","checked"),q.defaultChecked=!0);l.appendChild(q);l.appendChild(n);l.appendChild(p);f&&(l.appendChild(v),mxUtils.write(l,mxResources.get("openInNewWindow")));mxUtils.br(l);l.appendChild(u);g=!1;for(f=0;f<a.pages.length;f++)p=document.createElement("option"),mxUtils.write(p,a.pages[f].getName()||mxResources.get("pageWithNumber",[f+1])),p.setAttribute("value","data:page/id,"+a.pages[f].getId()),d==p.getAttribute("value")&&(p.setAttribute("selected","selected"),g=!0),t.appendChild(p);
+if(!g&&u.checked){var z=document.createElement("option");mxUtils.write(z,mxResources.get("pageNotFound"));z.setAttribute("disabled","disabled");z.setAttribute("selected","selected");z.setAttribute("value","pageNotFound");t.appendChild(z);mxEvent.addListener(t,"change",function(){null==z.parentNode||z.selected||z.parentNode.removeChild(z)})}l.appendChild(t)}else n.setAttribute("value",d),l.appendChild(n),l.appendChild(p);k.appendChild(l);var y=mxUtils.button(c,function(){a.hideDialog();b(u.checked?
+"pageNotFound"!==t.value?t.value:d:n.value,LinkDialog.selectedDocs,v.checked?m:null)});y.style.verticalAlign="middle";y.className="geBtn gePrimaryBtn";this.init=function(){u.checked?t.focus():(n.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?n.select():document.execCommand("selectAll",!1,null));mxEvent.addListener(t,"focus",function(){q.removeAttribute("checked");u.setAttribute("checked","checked");u.checked=!0});mxEvent.addListener(n,"focus",function(){u.removeAttribute("checked");
+q.setAttribute("checked","checked");q.checked=!0});if(Graph.fileSupport){var b=k.parentNode,e=null;mxEvent.addListener(b,"dragleave",function(a){null!=e&&(e.parentNode.removeChild(e),e=null);a.stopPropagation();a.preventDefault()});mxEvent.addListener(b,"dragover",mxUtils.bind(this,function(c){null==e&&(!mxClient.IS_IE||10<document.documentMode)&&(e=a.highlightElement(b));c.stopPropagation();c.preventDefault()}));mxEvent.addListener(b,"drop",mxUtils.bind(this,function(a){null!=e&&(e.parentNode.removeChild(e),
+e=null);0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")&&(n.value=decodeURIComponent(a.dataTransfer.getData("text/uri-list")),q.setAttribute("checked","checked"),q.checked=!0,y.click());a.stopPropagation();a.preventDefault()}),!1)}};var x=document.createElement("div");x.style.marginTop="18px";x.style.textAlign="center";c=mxUtils.button(mxResources.get("help"),function(){a.openLink("https://www.diagrams.net/doc/faq/custom-links")});c.style.verticalAlign="middle";c.className="geBtn";x.appendChild(c);
+a.isOffline()&&!mxClient.IS_CHROMEAPP&&(c.style.display="none");c=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});c.style.verticalAlign="middle";c.className="geBtn";a.editor.cancelFirst&&x.appendChild(c);LinkDialog.selectedDocs=null;LinkDialog.filePicked=function(a){if(a.action==google.picker.Action.PICKED){LinkDialog.selectedDocs=a.docs;var b=a.docs[0].url;"application/mxe"==a.docs[0].mimeType||null!=a.docs[0].mimeType&&"application/vnd.jgraph."==a.docs[0].mimeType.substring(0,
+23)?b="https://www.draw.io/#G"+a.docs[0].id:"application/vnd.google-apps.folder"==a.docs[0].mimeType&&(b="https://drive.google.com/#folders/"+a.docs[0].id);n.value=b;n.focus()}else LinkDialog.selectedDocs=null;n.focus()};"undefined"!=typeof google&&"undefined"!=typeof google.picker&&null!=a.drive&&e(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googlePlus"),function(){a.spinner.spin(document.body,mxResources.get("authorizing"))&&a.drive.checkToken(mxUtils.bind(this,function(){a.spinner.stop();
+if(null==a.linkPicker){var b=a.drive.createLinkPicker();a.linkPicker=b.setCallback(function(a){LinkDialog.filePicked(a)}).build()}a.linkPicker.setVisible(!0)}))});"undefined"!=typeof Dropbox&&"undefined"!=typeof Dropbox.choose&&e(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),function(){Dropbox.choose({linkType:"direct",cancel:function(){},success:function(a){n.value=a[0].link;n.focus()}})});null!=a.oneDrive&&e(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),function(){a.oneDrive.pickFile(function(a,
+b){n.value=b.value[0].webUrl;n.focus()})});null!=a.gitHub&&e(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),function(){a.gitHub.pickFile(function(a){if(null!=a){a=a.split("/");var b=a[0],e=a[1],c=a[2];a=a.slice(3,a.length).join("/");n.value="https://github.com/"+b+"/"+e+"/blob/"+c+"/"+a;n.focus()}})});null!=a.gitLab&&e(IMAGE_PATH+"/gitlab-logo.svg",mxResources.get("gitlab"),function(){a.gitLab.pickFile(function(a){if(null!=a){a=a.split("/");var b=a[0],e=a[1],c=a[2];a=a.slice(3,a.length).join("/");
+n.value=DRAWIO_GITLAB_URL+"/"+b+"/"+e+"/blob/"+c+"/"+a;n.focus()}})});mxEvent.addListener(n,"keypress",function(e){13==e.keyCode&&(a.hideDialog(),b(u.checked?t.value:n.value,LinkDialog.selectedDocs))});x.appendChild(y);a.editor.cancelFirst||x.appendChild(c);k.appendChild(x);this.container=k},FeedbackDialog=function(a,d,c,b){var g=document.createElement("div"),f=document.createElement("div");mxUtils.write(f,mxResources.get("sendYourFeedback"));f.style.fontSize="18px";f.style.marginBottom="18px";g.appendChild(f);
+f=document.createElement("div");mxUtils.write(f,mxResources.get("yourEmailAddress")+(c?"":" ("+mxResources.get("required")+")"));g.appendChild(f);var m=document.createElement("input");m.setAttribute("type","text");m.style.marginTop="6px";m.style.width="600px";var e=mxUtils.button(mxResources.get("sendMessage"),function(){var e=n.value+(l.checked?"\nDiagram:\n"+(null!=b?b:mxUtils.getXml(a.getXmlFileData())):"")+"\nuserAgent:\n"+navigator.userAgent+"\nappVersion:\n"+navigator.appVersion+"\nappName:\n"+
+navigator.appName+"\nplatform:\n"+navigator.platform;e.length>FeedbackDialog.maxAttachmentSize?a.alert(mxResources.get("drawingTooLarge")):(a.hideDialog(),a.spinner.spin(document.body)&&mxUtils.post(null!=FeedbackDialog.feedbackUrl?FeedbackDialog.feedbackUrl:"/email","email="+encodeURIComponent(m.value)+"&version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&body="+encodeURIComponent((null!=d?d:"Feedback")+":\n"+e),function(b){a.spinner.stop();200<=b.getStatus()&&
+299>=b.getStatus()?a.alert(mxResources.get("feedbackSent")):a.alert(mxResources.get("errorSendingFeedback"))},function(){a.spinner.stop();a.alert(mxResources.get("errorSendingFeedback"))}))});e.className="geBtn gePrimaryBtn";if(!c){e.setAttribute("disabled","disabled");var k=/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;mxEvent.addListener(m,"change",function(){0<m.value.length&&0<k.test(m.value)?
+e.removeAttribute("disabled"):e.setAttribute("disabled","disabled")});mxEvent.addListener(m,"keyup",function(){0<m.value.length&&k.test(m.value)?e.removeAttribute("disabled"):e.setAttribute("disabled","disabled")})}g.appendChild(m);this.init=function(){m.focus()};var l=document.createElement("input");l.setAttribute("type","checkbox");l.setAttribute("checked","checked");l.defaultChecked=!0;c=document.createElement("p");c.style.marginTop="14px";c.appendChild(l);f=document.createElement("span");mxUtils.write(f,
+" "+mxResources.get("includeCopyOfMyDiagram"));c.appendChild(f);mxEvent.addListener(f,"click",function(a){l.checked=!l.checked;mxEvent.consume(a)});g.appendChild(c);f=document.createElement("div");mxUtils.write(f,mxResources.get("feedback"));g.appendChild(f);var n=document.createElement("textarea");n.style.resize="none";n.style.width="600px";n.style.height="140px";n.style.marginTop="6px";n.setAttribute("placeholder",mxResources.get("comments"));g.appendChild(n);c=document.createElement("div");c.style.marginTop=
+"26px";c.style.textAlign="right";f=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});f.className="geBtn";a.editor.cancelFirst?(c.appendChild(f),c.appendChild(e)):(c.appendChild(e),c.appendChild(f));g.appendChild(c);this.container=g};FeedbackDialog.maxAttachmentSize=1E6;
+var RevisionDialog=function(a,d,c){var b=document.createElement("div"),g=document.createElement("h3");g.style.marginTop="0px";mxUtils.write(g,mxResources.get("revisionHistory"));b.appendChild(g);g=document.createElement("div");g.style.position="absolute";g.style.overflow="auto";g.style.width="170px";g.style.height="378px";b.appendChild(g);var f=document.createElement("div");f.style.position="absolute";f.style.border="1px solid lightGray";f.style.left="199px";f.style.width="470px";f.style.height="376px";
+f.style.overflow="hidden";var m=document.createElement("div");m.style.cssText="position:absolute;left:0;right:0;top:0;bottom:20px;text-align:center;transform:translate(0,50%);pointer-events:none;";f.appendChild(m);mxEvent.disableContextMenu(f);b.appendChild(f);var e=new Graph(f);e.setTooltips(!1);e.setEnabled(!1);e.setPanning(!0);e.panningHandler.ignoreCell=!0;e.panningHandler.useLeftButtonForPanning=!0;e.minFitScale=null;e.maxFitScale=null;e.centerZoom=!0;var k=0,l=null,n=0,p=e.getGlobalVariable;
e.getGlobalVariable=function(a){return"page"==a&&null!=l&&null!=l[n]?l[n].getAttribute("name"):"pagenumber"==a?n+1:"pagecount"==a?null!=l?l.length:1:p.apply(this,arguments)};e.getLinkForCell=function(){return null};Editor.MathJaxRender&&e.addListener(mxEvent.SIZE,mxUtils.bind(this,function(b,c){a.editor.graph.mathEnabled&&Editor.MathJaxRender(e.container)}));for(var q={lines:11,length:15,width:6,radius:10,corners:1,rotate:0,direction:1,color:Editor.isDarkMode()?"#c0c0c0":"#000",speed:1.4,trail:60,
shadow:!1,hwaccel:!1,className:"spinner",zIndex:2E9,top:"50%",left:"50%"},u=new Spinner(q),t=a.getCurrentFile(),v=a.getXmlFileData(!0,!1,!0).getElementsByTagName("diagram"),z={},q=0;q<v.length;q++)z[v[q].getAttribute("id")]=v[q];var y=null,x=null,A=null,B=null,C=mxUtils.button("",function(){null!=A&&e.zoomIn()});C.className="geSprite geSprite-zoomin";C.setAttribute("title",mxResources.get("zoomIn"));C.style.outline="none";C.style.border="none";C.style.margin="2px";C.setAttribute("disabled","disabled");
mxUtils.setOpacity(C,20);var D=mxUtils.button("",function(){null!=A&&e.zoomOut()});D.className="geSprite geSprite-zoomout";D.setAttribute("title",mxResources.get("zoomOut"));D.style.outline="none";D.style.border="none";D.style.margin="2px";D.setAttribute("disabled","disabled");mxUtils.setOpacity(D,20);var G=mxUtils.button("",function(){null!=A&&(e.maxFitScale=8,e.fit(8),e.center())});G.className="geSprite geSprite-fit";G.setAttribute("title",mxResources.get("fit"));G.style.outline="none";G.style.border=
"none";G.style.margin="2px";G.setAttribute("disabled","disabled");mxUtils.setOpacity(G,20);var E=mxUtils.button("",function(){null!=A&&(e.zoomActual(),e.center())});E.className="geSprite geSprite-actualsize";E.setAttribute("title",mxResources.get("actualSize"));E.style.outline="none";E.style.border="none";E.style.margin="2px";E.setAttribute("disabled","disabled");mxUtils.setOpacity(E,20);var F=mxUtils.button("",function(){});F.className="geSprite geSprite-middle";F.setAttribute("title",mxResources.get("compare"));
-F.style.outline="none";F.style.border="none";F.style.margin="2px";mxUtils.setOpacity(F,60);var K=g.cloneNode(!1);K.style.pointerEvent="none";g.parentNode.appendChild(K);var M=new Graph(K);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(F,function(a){a=z[l[k].getAttribute("id")];mxUtils.setOpacity(F,20);m.innerHTML="";null==a?mxUtils.write(m,
-mxResources.get("pageNotFound")):(J.style.display="none",g.style.display="none",K.style.display="",K.style.backgroundColor=g.style.backgroundColor,a=Editor.parseDiagramNode(a),(new mxCodec(a.ownerDocument)).decode(a,M.getModel()),M.view.scaleAndTranslate(e.view.scale,e.view.translate.x,e.view.translate.y))},null,function(){mxUtils.setOpacity(F,60);m.innerHTML="";"none"==g.style.display&&(J.style.display="",g.style.display="",K.style.display="none")});var J=document.createElement("div");J.style.position=
-"absolute";J.style.textAlign="right";J.style.color="gray";J.style.marginTop="10px";J.style.backgroundColor="transparent";J.style.top="440px";J.style.right="32px";J.style.maxWidth="380px";J.style.cursor="default";var I=mxUtils.button(mxResources.get("download"),function(){if(null!=A){var b=mxUtils.getXml(A.documentElement),e=a.getBaseFilename()+".drawio";a.isLocalFileSave()?a.saveLocalFile(b,e,"text/xml"):(b="undefined"===typeof pako?"&xml="+encodeURIComponent(b):"&data="+encodeURIComponent(Graph.compress(b)),
+F.style.outline="none";F.style.border="none";F.style.margin="2px";mxUtils.setOpacity(F,60);var J=f.cloneNode(!1);J.style.pointerEvent="none";f.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(F,function(a){a=z[l[k].getAttribute("id")];mxUtils.setOpacity(F,20);m.innerHTML="";null==a?mxUtils.write(m,
+mxResources.get("pageNotFound")):(K.style.display="none",f.style.display="none",J.style.display="",J.style.backgroundColor=f.style.backgroundColor,a=Editor.parseDiagramNode(a),(new mxCodec(a.ownerDocument)).decode(a,M.getModel()),M.view.scaleAndTranslate(e.view.scale,e.view.translate.x,e.view.translate.y))},null,function(){mxUtils.setOpacity(F,60);m.innerHTML="";"none"==f.style.display&&(K.style.display="",f.style.display="",J.style.display="none")});var K=document.createElement("div");K.style.position=
+"absolute";K.style.textAlign="right";K.style.color="gray";K.style.marginTop="10px";K.style.backgroundColor="transparent";K.style.top="440px";K.style.right="32px";K.style.maxWidth="380px";K.style.cursor="default";var I=mxUtils.button(mxResources.get("download"),function(){if(null!=A){var b=mxUtils.getXml(A.documentElement),e=a.getBaseFilename()+".drawio";a.isLocalFileSave()?a.saveLocalFile(b,e,"text/xml"):(b="undefined"===typeof pako?"&xml="+encodeURIComponent(b):"&data="+encodeURIComponent(Graph.compress(b)),
(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(e)+"&format=xml"+b)).simulate(document,"_blank"))}});I.className="geBtn";I.setAttribute("disabled","disabled");var N=mxUtils.button(mxResources.get("restore"),function(b){null!=A&&null!=B&&(mxEvent.isShiftDown(b)?null!=A&&(b=a.getPagesForNode(A.documentElement),b=a.diffPages(a.pages,b),b=new TextareaDialog(a,mxResources.get("compare"),JSON.stringify(b,null,2),function(b){if(0<b.length)try{a.confirm(mxResources.get("areYouSure"),function(){t.patch([JSON.parse(b)],
null,!0);a.hideDialog();a.hideDialog()})}catch(ba){a.handleError(ba)}},null,null,null,null,null,!0,null,mxResources.get("merge")),b.textarea.style.width="600px",b.textarea.style.height="380px",a.showDialog(b.container,620,460,!0,!0),b.init()):a.confirm(mxResources.get("areYouSure"),function(){null!=c?c(B):a.spinner.spin(document.body,mxResources.get("restoring"))&&t.save(!0,function(b){a.spinner.stop();a.replaceFileData(B);a.hideDialog()},function(b){a.spinner.stop();a.editor.setStatus("");a.handleError(b,
null!=b?mxResources.get("errorSavingFile"):null)})}))});N.className="geBtn";N.setAttribute("disabled","disabled");N.setAttribute("title","Shift+Click for Diff");var H=document.createElement("select");H.setAttribute("disabled","disabled");H.style.maxWidth="80px";H.style.position="relative";H.style.top="-2px";H.style.verticalAlign="bottom";H.style.marginRight="6px";H.style.display="none";var L=null;mxEvent.addListener(H,"change",function(a){null!=L&&(L(a),mxEvent.consume(a))});var V=mxUtils.button(mxResources.get("edit"),
function(){null!=A&&(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(mxUtils.getXml(A.documentElement)),a.openLink(a.getUrl(),null,!0))});V.className="geBtn";V.setAttribute("disabled","disabled");null!=c&&(V.style.display="none");var U=mxUtils.button(mxResources.get("show"),function(){null!=x&&a.openLink(x.getUrl(H.selectedIndex))});U.className="geBtn gePrimaryBtn";U.setAttribute("disabled","disabled");null!=c&&(U.style.display="none",N.className="geBtn gePrimaryBtn");
-v=document.createElement("div");v.style.position="absolute";v.style.top="482px";v.style.width="640px";v.style.textAlign="right";var P=document.createElement("div");P.className="geToolbarContainer";P.style.backgroundColor="transparent";P.style.padding="2px";P.style.border="none";P.style.left="199px";P.style.top="442px";var W=null;if(null!=d&&0<d.length){g.style.cursor="move";var ha=document.createElement("table");ha.style.border="1px solid lightGray";ha.style.borderCollapse="collapse";ha.style.borderSpacing=
-"0px";ha.style.width="100%";var ea=document.createElement("tbody"),X=(new Date).toDateString();null!=a.currentPage&&null!=a.pages&&(k=mxUtils.indexOf(a.pages,a.currentPage));for(q=d.length-1;0<=q;q--){var Z=function(b){var c=new Date(b.modifiedDate),f=null;if(0<=c.getTime()){var p=function(d){u.stop();m.innerHTML="";var p=mxUtils.parseXml(d),q=a.editor.extractGraphModel(p.documentElement,!0);if(null!=q){var x=function(a){null!=a&&(a=z(Editor.parseDiagramNode(a)));return a},z=function(a){var b=a.getAttribute("background");
-if(null==b||""==b||b==mxConstants.NONE)b=e.defaultPageBackgroundColor;g.style.backgroundColor=b;(new mxCodec(a.ownerDocument)).decode(a,e.getModel());e.maxFitScale=1;e.fit(8);e.center();return a};H.style.display="none";H.innerHTML="";A=p;B=d;l=parseSelectFunction=null;n=0;if("mxfile"==q.nodeName){p=q.getElementsByTagName("diagram");l=[];for(d=0;d<p.length;d++)l.push(p[d]);n=Math.min(k,l.length-1);0<l.length&&x(l[n]);if(1<l.length)for(H.removeAttribute("disabled"),H.style.display="",d=0;d<l.length;d++)p=
-document.createElement("option"),mxUtils.write(p,l[d].getAttribute("name")||mxResources.get("pageWithNumber",[d+1])),p.setAttribute("value",d),d==n&&p.setAttribute("selected","selected"),H.appendChild(p);L=function(){try{var b=parseInt(H.value);n=k=b;x(l[b])}catch(aa){H.value=k,a.handleError(aa)}}}else z(q);d=b.lastModifyingUserName;null!=d&&20<d.length&&(d=d.substring(0,20)+"...");J.innerHTML="";mxUtils.write(J,(null!=d?d+" ":"")+c.toLocaleDateString()+" "+c.toLocaleTimeString());J.setAttribute("title",
-f.getAttribute("title"));C.removeAttribute("disabled");D.removeAttribute("disabled");G.removeAttribute("disabled");E.removeAttribute("disabled");F.removeAttribute("disabled");null!=t&&t.isRestricted()||(a.editor.graph.isEnabled()&&N.removeAttribute("disabled"),I.removeAttribute("disabled"),U.removeAttribute("disabled"),V.removeAttribute("disabled"));mxUtils.setOpacity(C,60);mxUtils.setOpacity(D,60);mxUtils.setOpacity(G,60);mxUtils.setOpacity(E,60);mxUtils.setOpacity(F,60)}else H.style.display="none",
-H.innerHTML="",J.innerHTML="",mxUtils.write(J,mxResources.get("errorLoadingFile")),mxUtils.write(m,mxResources.get("errorLoadingFile"))},f=document.createElement("tr");f.style.borderBottom="1px solid lightGray";f.style.fontSize="12px";f.style.cursor="pointer";var q=document.createElement("td");q.style.padding="6px";q.style.whiteSpace="nowrap";b==d[d.length-1]?mxUtils.write(q,mxResources.get("current")):c.toDateString()===X?mxUtils.write(q,c.toLocaleTimeString()):mxUtils.write(q,c.toLocaleDateString()+
-" "+c.toLocaleTimeString());f.appendChild(q);f.setAttribute("title",c.toLocaleDateString()+" "+c.toLocaleTimeString()+(null!=b.fileSize?" "+a.formatFileSize(parseInt(b.fileSize)):"")+(null!=b.lastModifyingUserName?" "+b.lastModifyingUserName:""));mxEvent.addListener(f,"click",function(a){x!=b&&(u.stop(),null!=y&&(y.style.backgroundColor=""),x=b,y=f,y.style.backgroundColor=Editor.isDarkMode()?"#000000":"#ebf2f9",B=A=null,J.removeAttribute("title"),J.innerHTML=mxUtils.htmlEntities(mxResources.get("loading")+
-"..."),g.style.backgroundColor=e.defaultPageBackgroundColor,m.innerHTML="",e.getModel().clear(),N.setAttribute("disabled","disabled"),I.setAttribute("disabled","disabled"),C.setAttribute("disabled","disabled"),D.setAttribute("disabled","disabled"),E.setAttribute("disabled","disabled"),G.setAttribute("disabled","disabled"),F.setAttribute("disabled","disabled"),V.setAttribute("disabled","disabled"),U.setAttribute("disabled","disabled"),H.setAttribute("disabled","disabled"),mxUtils.setOpacity(C,20),
-mxUtils.setOpacity(D,20),mxUtils.setOpacity(G,20),mxUtils.setOpacity(E,20),mxUtils.setOpacity(F,20),u.spin(g),b.getXml(function(a){if(x==b)try{p(a)}catch(fa){J.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+": "+fa.message)}},function(a){u.stop();H.style.display="none";H.innerHTML="";J.innerHTML="";mxUtils.write(J,mxResources.get("errorLoadingFile"));mxUtils.write(m,mxResources.get("errorLoadingFile"))}),mxEvent.consume(a))});mxEvent.addListener(f,"dblclick",function(a){U.click();window.getSelection?
-window.getSelection().removeAllRanges():document.selection&&document.selection.empty();mxEvent.consume(a)},!1);ea.appendChild(f)}return f}(d[q]);null!=Z&&q==d.length-1&&(W=Z)}ha.appendChild(ea);f.appendChild(ha)}else null==t||null==a.drive&&t.constructor==window.DriveFile||null==a.dropbox&&t.constructor==window.DropboxFile?(g.style.display="none",P.style.display="none",mxUtils.write(f,mxResources.get("notAvailable"))):(g.style.display="none",P.style.display="none",mxUtils.write(f,mxResources.get("noRevisions")));
-this.init=function(){null!=W&&W.click()};f=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});f.className="geBtn";P.appendChild(H);P.appendChild(C);P.appendChild(D);P.appendChild(E);P.appendChild(G);P.appendChild(F);a.editor.cancelFirst?(v.appendChild(f),v.appendChild(I),v.appendChild(V),v.appendChild(N),v.appendChild(U)):(v.appendChild(I),v.appendChild(V),v.appendChild(N),v.appendChild(U),v.appendChild(f));b.appendChild(v);b.appendChild(P);b.appendChild(J);this.container=b},DraftDialog=
-function(a,d,c,b,f,g,m,e,k){var l=document.createElement("div"),n=document.createElement("div");n.style.marginTop="0px";n.style.whiteSpace="nowrap";n.style.overflow="auto";n.style.lineHeight="normal";mxUtils.write(n,d);l.appendChild(n);var p=document.createElement("select"),q=mxUtils.bind(this,function(){x=mxUtils.parseXml(k[p.value].data);A=a.editor.extractGraphModel(x.documentElement,!0);B=0;this.init()});if(null!=k){p.style.marginLeft="4px";for(d=0;d<k.length;d++){var u=document.createElement("option");
+v=document.createElement("div");v.style.position="absolute";v.style.top="482px";v.style.width="640px";v.style.textAlign="right";var P=document.createElement("div");P.className="geToolbarContainer";P.style.backgroundColor="transparent";P.style.padding="2px";P.style.border="none";P.style.left="199px";P.style.top="442px";var W=null;if(null!=d&&0<d.length){f.style.cursor="move";var ha=document.createElement("table");ha.style.border="1px solid lightGray";ha.style.borderCollapse="collapse";ha.style.borderSpacing=
+"0px";ha.style.width="100%";var ea=document.createElement("tbody"),X=(new Date).toDateString();null!=a.currentPage&&null!=a.pages&&(k=mxUtils.indexOf(a.pages,a.currentPage));for(q=d.length-1;0<=q;q--){var Z=function(b){var c=new Date(b.modifiedDate),g=null;if(0<=c.getTime()){var p=function(d){u.stop();m.innerHTML="";var p=mxUtils.parseXml(d),q=a.editor.extractGraphModel(p.documentElement,!0);if(null!=q){var x=function(a){null!=a&&(a=z(Editor.parseDiagramNode(a)));return a},z=function(a){var b=a.getAttribute("background");
+if(null==b||""==b||b==mxConstants.NONE)b=e.defaultPageBackgroundColor;f.style.backgroundColor=b;(new mxCodec(a.ownerDocument)).decode(a,e.getModel());e.maxFitScale=1;e.fit(8);e.center();return a};H.style.display="none";H.innerHTML="";A=p;B=d;l=parseSelectFunction=null;n=0;if("mxfile"==q.nodeName){p=q.getElementsByTagName("diagram");l=[];for(d=0;d<p.length;d++)l.push(p[d]);n=Math.min(k,l.length-1);0<l.length&&x(l[n]);if(1<l.length)for(H.removeAttribute("disabled"),H.style.display="",d=0;d<l.length;d++)p=
+document.createElement("option"),mxUtils.write(p,l[d].getAttribute("name")||mxResources.get("pageWithNumber",[d+1])),p.setAttribute("value",d),d==n&&p.setAttribute("selected","selected"),H.appendChild(p);L=function(){try{var b=parseInt(H.value);n=k=b;x(l[b])}catch(aa){H.value=k,a.handleError(aa)}}}else z(q);d=b.lastModifyingUserName;null!=d&&20<d.length&&(d=d.substring(0,20)+"...");K.innerHTML="";mxUtils.write(K,(null!=d?d+" ":"")+c.toLocaleDateString()+" "+c.toLocaleTimeString());K.setAttribute("title",
+g.getAttribute("title"));C.removeAttribute("disabled");D.removeAttribute("disabled");G.removeAttribute("disabled");E.removeAttribute("disabled");F.removeAttribute("disabled");null!=t&&t.isRestricted()||(a.editor.graph.isEnabled()&&N.removeAttribute("disabled"),I.removeAttribute("disabled"),U.removeAttribute("disabled"),V.removeAttribute("disabled"));mxUtils.setOpacity(C,60);mxUtils.setOpacity(D,60);mxUtils.setOpacity(G,60);mxUtils.setOpacity(E,60);mxUtils.setOpacity(F,60)}else H.style.display="none",
+H.innerHTML="",K.innerHTML="",mxUtils.write(K,mxResources.get("errorLoadingFile")),mxUtils.write(m,mxResources.get("errorLoadingFile"))},g=document.createElement("tr");g.style.borderBottom="1px solid lightGray";g.style.fontSize="12px";g.style.cursor="pointer";var q=document.createElement("td");q.style.padding="6px";q.style.whiteSpace="nowrap";b==d[d.length-1]?mxUtils.write(q,mxResources.get("current")):c.toDateString()===X?mxUtils.write(q,c.toLocaleTimeString()):mxUtils.write(q,c.toLocaleDateString()+
+" "+c.toLocaleTimeString());g.appendChild(q);g.setAttribute("title",c.toLocaleDateString()+" "+c.toLocaleTimeString()+(null!=b.fileSize?" "+a.formatFileSize(parseInt(b.fileSize)):"")+(null!=b.lastModifyingUserName?" "+b.lastModifyingUserName:""));mxEvent.addListener(g,"click",function(a){x!=b&&(u.stop(),null!=y&&(y.style.backgroundColor=""),x=b,y=g,y.style.backgroundColor=Editor.isDarkMode()?"#000000":"#ebf2f9",B=A=null,K.removeAttribute("title"),K.innerHTML=mxUtils.htmlEntities(mxResources.get("loading")+
+"..."),f.style.backgroundColor=e.defaultPageBackgroundColor,m.innerHTML="",e.getModel().clear(),N.setAttribute("disabled","disabled"),I.setAttribute("disabled","disabled"),C.setAttribute("disabled","disabled"),D.setAttribute("disabled","disabled"),E.setAttribute("disabled","disabled"),G.setAttribute("disabled","disabled"),F.setAttribute("disabled","disabled"),V.setAttribute("disabled","disabled"),U.setAttribute("disabled","disabled"),H.setAttribute("disabled","disabled"),mxUtils.setOpacity(C,20),
+mxUtils.setOpacity(D,20),mxUtils.setOpacity(G,20),mxUtils.setOpacity(E,20),mxUtils.setOpacity(F,20),u.spin(f),b.getXml(function(a){if(x==b)try{p(a)}catch(fa){K.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+": "+fa.message)}},function(a){u.stop();H.style.display="none";H.innerHTML="";K.innerHTML="";mxUtils.write(K,mxResources.get("errorLoadingFile"));mxUtils.write(m,mxResources.get("errorLoadingFile"))}),mxEvent.consume(a))});mxEvent.addListener(g,"dblclick",function(a){U.click();window.getSelection?
+window.getSelection().removeAllRanges():document.selection&&document.selection.empty();mxEvent.consume(a)},!1);ea.appendChild(g)}return g}(d[q]);null!=Z&&q==d.length-1&&(W=Z)}ha.appendChild(ea);g.appendChild(ha)}else null==t||null==a.drive&&t.constructor==window.DriveFile||null==a.dropbox&&t.constructor==window.DropboxFile?(f.style.display="none",P.style.display="none",mxUtils.write(g,mxResources.get("notAvailable"))):(f.style.display="none",P.style.display="none",mxUtils.write(g,mxResources.get("noRevisions")));
+this.init=function(){null!=W&&W.click()};g=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});g.className="geBtn";P.appendChild(H);P.appendChild(C);P.appendChild(D);P.appendChild(E);P.appendChild(G);P.appendChild(F);a.editor.cancelFirst?(v.appendChild(g),v.appendChild(I),v.appendChild(V),v.appendChild(N),v.appendChild(U)):(v.appendChild(I),v.appendChild(V),v.appendChild(N),v.appendChild(U),v.appendChild(g));b.appendChild(v);b.appendChild(P);b.appendChild(K);this.container=b},DraftDialog=
+function(a,d,c,b,g,f,m,e,k){var l=document.createElement("div"),n=document.createElement("div");n.style.marginTop="0px";n.style.whiteSpace="nowrap";n.style.overflow="auto";n.style.lineHeight="normal";mxUtils.write(n,d);l.appendChild(n);var p=document.createElement("select"),q=mxUtils.bind(this,function(){x=mxUtils.parseXml(k[p.value].data);A=a.editor.extractGraphModel(x.documentElement,!0);B=0;this.init()});if(null!=k){p.style.marginLeft="4px";for(d=0;d<k.length;d++){var u=document.createElement("option");
u.setAttribute("value",d);var t=new Date(k[d].created),v=new Date(k[d].modified);mxUtils.write(u,t.toLocaleDateString()+" "+t.toLocaleTimeString()+" - "+(t.toDateString(),v.toDateString(),v.toLocaleDateString())+" "+v.toLocaleTimeString());p.appendChild(u)}n.appendChild(p);mxEvent.addListener(p,"change",q)}null==c&&(c=k[0].data);var z=document.createElement("div");z.style.position="absolute";z.style.border="1px solid lightGray";z.style.marginTop="10px";z.style.left="40px";z.style.right="40px";z.style.top=
"46px";z.style.bottom="74px";z.style.overflow="hidden";mxEvent.disableContextMenu(z);l.appendChild(z);var y=new Graph(z);y.setEnabled(!1);y.setPanning(!0);y.panningHandler.ignoreCell=!0;y.panningHandler.useLeftButtonForPanning=!0;y.minFitScale=null;y.maxFitScale=null;y.centerZoom=!0;var x=mxUtils.parseXml(c),A=a.editor.extractGraphModel(x.documentElement,!0),B=0,C=null,D=y.getGlobalVariable;y.getGlobalVariable=function(a){return"page"==a&&null!=C&&null!=C[B]?C[B].getAttribute("name"):"pagenumber"==
a?B+1:"pagecount"==a?null!=C?C.length:1:D.apply(this,arguments)};y.getLinkForCell=function(){return null};c=mxUtils.button("",function(){y.zoomIn()});c.className="geSprite geSprite-zoomin";c.setAttribute("title",mxResources.get("zoomIn"));c.style.outline="none";c.style.border="none";c.style.margin="2px";mxUtils.setOpacity(c,60);n=mxUtils.button("",function(){y.zoomOut()});n.className="geSprite geSprite-zoomout";n.setAttribute("title",mxResources.get("zoomOut"));n.style.outline="none";n.style.border=
"none";n.style.margin="2px";mxUtils.setOpacity(n,60);d=mxUtils.button("",function(){y.maxFitScale=8;y.fit(8);y.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);u=mxUtils.button("",function(){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";mxUtils.setOpacity(u,60);m=mxUtils.button(m||mxResources.get("discard"),function(){f.apply(this,[p.value,mxUtils.bind(this,function(){null!=p.parentNode&&(p.options[p.selectedIndex].parentNode.removeChild(p.options[p.selectedIndex]),0<p.options.length?(p.value=p.options[0].value,q()):a.hideDialog(!0))})])});m.className="geBtn";var G=document.createElement("select");G.style.maxWidth="80px";G.style.position="relative";G.style.top="-2px";G.style.verticalAlign="bottom";G.style.marginRight="6px";
-G.style.display="none";g=mxUtils.button(g||mxResources.get("edit"),function(){b.apply(this,[p.value])});g.className="geBtn gePrimaryBtn";t=document.createElement("div");t.style.position="absolute";t.style.bottom="30px";t.style.right="40px";t.style.textAlign="right";v=document.createElement("div");v.className="geToolbarContainer";v.style.cssText="box-shadow:none !important;background-color:transparent;padding:2px;border-style:none !important;bottom:30px;";this.init=function(){function a(a){if(null!=
+"2px";mxUtils.setOpacity(u,60);m=mxUtils.button(m||mxResources.get("discard"),function(){g.apply(this,[p.value,mxUtils.bind(this,function(){null!=p.parentNode&&(p.options[p.selectedIndex].parentNode.removeChild(p.options[p.selectedIndex]),0<p.options.length?(p.value=p.options[0].value,q()):a.hideDialog(!0))})])});m.className="geBtn";var G=document.createElement("select");G.style.maxWidth="80px";G.style.position="relative";G.style.top="-2px";G.style.verticalAlign="bottom";G.style.marginRight="6px";
+G.style.display="none";f=mxUtils.button(f||mxResources.get("edit"),function(){b.apply(this,[p.value])});f.className="geBtn gePrimaryBtn";t=document.createElement("div");t.style.position="absolute";t.style.bottom="30px";t.style.right="40px";t.style.textAlign="right";v=document.createElement("div");v.className="geToolbarContainer";v.style.cssText="box-shadow:none !important;background-color:transparent;padding:2px;border-style:none !important;bottom:30px;";this.init=function(){function a(a){if(null!=
a){var b=a.getAttribute("background");if(null==b||""==b||b==mxConstants.NONE)b=Editor.isDarkMode()?"transparent":"#ffffff";z.style.backgroundColor=b;(new mxCodec(a.ownerDocument)).decode(a,y.getModel());y.maxFitScale=1;y.fit(8);y.center()}return a}function b(b){null!=b&&(b=a(Editor.parseDiagramNode(b)));return b}mxEvent.addListener(G,"change",function(a){B=parseInt(G.value);b(C[B]);mxEvent.consume(a)});if("mxfile"==A.nodeName){var e=A.getElementsByTagName("diagram");C=[];for(var c=0;c<e.length;c++)C.push(e[c]);
0<C.length&&b(C[B]);G.innerHTML="";if(1<C.length)for(G.style.display="",c=0;c<C.length;c++)e=document.createElement("option"),mxUtils.write(e,C[c].getAttribute("name")||mxResources.get("pageWithNumber",[c+1])),e.setAttribute("value",c),c==B&&e.setAttribute("selected","selected"),G.appendChild(e);else G.style.display="none"}else a(A)};v.appendChild(G);v.appendChild(c);v.appendChild(n);v.appendChild(u);v.appendChild(d);c=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog(!0)});c.className=
-"geBtn";e=null!=e?mxUtils.button(mxResources.get("ignore"),e):null;null!=e&&(e.className="geBtn");a.editor.cancelFirst?(t.appendChild(c),null!=e&&t.appendChild(e),t.appendChild(m),t.appendChild(g)):(t.appendChild(g),t.appendChild(m),null!=e&&t.appendChild(e),t.appendChild(c));l.appendChild(t);l.appendChild(v);this.container=l},FindWindow=function(a,d,c,b,f,g){function m(a,b,e,c){if("object"===typeof b.value&&null!=b.value.attributes){b=b.value.attributes;for(var d=0;d<b.length;d++)if("label"!=b[d].nodeName){var k=
+"geBtn";e=null!=e?mxUtils.button(mxResources.get("ignore"),e):null;null!=e&&(e.className="geBtn");a.editor.cancelFirst?(t.appendChild(c),null!=e&&t.appendChild(e),t.appendChild(m),t.appendChild(f)):(t.appendChild(f),t.appendChild(m),null!=e&&t.appendChild(e),t.appendChild(c));l.appendChild(t);l.appendChild(v);this.container=l},FindWindow=function(a,d,c,b,g,f){function m(a,b,e,c){if("object"===typeof b.value&&null!=b.value.attributes){b=b.value.attributes;for(var d=0;d<b.length;d++)if("label"!=b[d].nodeName){var k=
mxUtils.trim(b[d].nodeValue.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();if(null==a&&(c&&0<=k.indexOf(e)||!c&&k.substring(0,e.length)===e)||null!=a&&a.test(k))return!0}}return!1}function e(){u&&C.value?(I.removeAttribute("disabled"),N.removeAttribute("disabled")):(I.setAttribute("disabled","disabled"),N.setAttribute("disabled","disabled"));C.value&&B.value?H.removeAttribute("disabled"):H.setAttribute("disabled","disabled")}function k(b,c,d){M.innerHTML="";var l=n.model.getDescendants(n.model.getRoot()),
-f=B.value.toLowerCase(),x=D.checked?new RegExp(f):null,I=null;v=null;p!=f&&(p=f,q=null,t=!1);var A=null==q;if(0<f.length){if(t){t=!1;for(var H,N=0;N<a.pages.length;N++)if(a.currentPage==a.pages[N]){H=N;break}b=(H+1)%a.pages.length;q=null;do t=!1,l=a.pages[b],n=a.createTemporaryGraph(n.getStylesheet()),a.updatePageRoot(l),n.model.setRoot(l.root),b=(b+1)%a.pages.length;while(!k(!0,c,d)&&b!=H);q&&(q=null,d?a.editor.graph.model.execute(new SelectPage(a,l)):a.selectPage(l));t=!1;n=a.editor.graph;return k(!0,
-c,d)}for(N=0;N<l.length;N++){H=n.view.getState(l[N]);c&&null!=x&&(A=A||H==q);if(null!=H&&null!=H.cell.value&&(A||null==I)&&(n.model.isVertex(H.cell)||n.model.isEdge(H.cell))){null!=H.style&&"1"==H.style.html?(E.innerHTML=n.sanitizeHtml(n.getLabel(H.cell)),label=mxUtils.extractTextWithWhitespace([E])):label=n.getLabel(H.cell);label=mxUtils.trim(label.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();var V=0;c&&g&&null!=x&&H==q&&(label=label.substr(z),V=z);var y=""==C.value,L=y;if(null==x&&(L&&
-0<=label.indexOf(f)||!L&&label.substring(0,f.length)===f||y&&m(x,H.cell,f,L))||null!=x&&(x.test(label)||y&&m(x,H.cell,f,L)))if(g&&(null!=x?(y=label.match(x),v=y[0].toLowerCase(),z=V+y.index+v.length):(v=f,z=v.length)),A){I=H;break}else null==I&&(I=H)}A=A||H==q}}if(null!=I){if(N==l.length&&G.checked)return q=null,t=!0,k(!0,c,d);q=I;n.scrollCellToVisible(q.cell);n.isEnabled()&&!n.isCellLocked(q.cell)?d||n.getSelectionCell()==q.cell&&1==n.getSelectionCount()||n.setSelectionCell(q.cell):n.highlightCell(q.cell)}else{if(!b&&
-G.checked)return t=!0,k(!0,c,d);n.isEnabled()&&!d&&n.clearSelection()}u=null!=I;g&&!b&&e();return 0==f.length||null!=I}var l=a.actions.get("findReplace"),n=a.editor.graph,p=null,q=null,u=!1,t=!1,v=null,z=0,y=1,x=document.createElement("div");x.style.userSelect="none";x.style.overflow="hidden";x.style.padding="10px";x.style.height="100%";var A=g?"260px":"200px",B=document.createElement("input");B.setAttribute("placeholder",mxResources.get("find"));B.setAttribute("type","text");B.style.marginTop="4px";
-B.style.marginBottom="6px";B.style.width=A;B.style.fontSize="12px";B.style.borderRadius="4px";B.style.padding="6px";x.appendChild(B);mxUtils.br(x);var C;g&&(C=document.createElement("input"),C.setAttribute("placeholder",mxResources.get("replaceWith")),C.setAttribute("type","text"),C.style.marginTop="4px",C.style.marginBottom="6px",C.style.width=A,C.style.fontSize="12px",C.style.borderRadius="4px",C.style.padding="6px",x.appendChild(C),mxUtils.br(x),mxEvent.addListener(C,"input",e));var D=document.createElement("input");
+g=B.value.toLowerCase(),x=D.checked?new RegExp(g):null,I=null;v=null;p!=g&&(p=g,q=null,t=!1);var A=null==q;if(0<g.length){if(t){t=!1;for(var H,N=0;N<a.pages.length;N++)if(a.currentPage==a.pages[N]){H=N;break}b=(H+1)%a.pages.length;q=null;do t=!1,l=a.pages[b],n=a.createTemporaryGraph(n.getStylesheet()),a.updatePageRoot(l),n.model.setRoot(l.root),b=(b+1)%a.pages.length;while(!k(!0,c,d)&&b!=H);q&&(q=null,d?a.editor.graph.model.execute(new SelectPage(a,l)):a.selectPage(l));t=!1;n=a.editor.graph;return k(!0,
+c,d)}for(N=0;N<l.length;N++){H=n.view.getState(l[N]);c&&null!=x&&(A=A||H==q);if(null!=H&&null!=H.cell.value&&(A||null==I)&&(n.model.isVertex(H.cell)||n.model.isEdge(H.cell))){null!=H.style&&"1"==H.style.html?(E.innerHTML=n.sanitizeHtml(n.getLabel(H.cell)),label=mxUtils.extractTextWithWhitespace([E])):label=n.getLabel(H.cell);label=mxUtils.trim(label.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();var V=0;c&&f&&null!=x&&H==q&&(label=label.substr(z),V=z);var y=""==C.value,L=y;if(null==x&&(L&&
+0<=label.indexOf(g)||!L&&label.substring(0,g.length)===g||y&&m(x,H.cell,g,L))||null!=x&&(x.test(label)||y&&m(x,H.cell,g,L)))if(f&&(null!=x?(y=label.match(x),v=y[0].toLowerCase(),z=V+y.index+v.length):(v=g,z=v.length)),A){I=H;break}else null==I&&(I=H)}A=A||H==q}}if(null!=I){if(N==l.length&&G.checked)return q=null,t=!0,k(!0,c,d);q=I;n.scrollCellToVisible(q.cell);n.isEnabled()&&!n.isCellLocked(q.cell)?d||n.getSelectionCell()==q.cell&&1==n.getSelectionCount()||n.setSelectionCell(q.cell):n.highlightCell(q.cell)}else{if(!b&&
+G.checked)return t=!0,k(!0,c,d);n.isEnabled()&&!d&&n.clearSelection()}u=null!=I;f&&!b&&e();return 0==g.length||null!=I}var l=a.actions.get("findReplace"),n=a.editor.graph,p=null,q=null,u=!1,t=!1,v=null,z=0,y=1,x=document.createElement("div");x.style.userSelect="none";x.style.overflow="hidden";x.style.padding="10px";x.style.height="100%";var A=f?"260px":"200px",B=document.createElement("input");B.setAttribute("placeholder",mxResources.get("find"));B.setAttribute("type","text");B.style.marginTop="4px";
+B.style.marginBottom="6px";B.style.width=A;B.style.fontSize="12px";B.style.borderRadius="4px";B.style.padding="6px";x.appendChild(B);mxUtils.br(x);var C;f&&(C=document.createElement("input"),C.setAttribute("placeholder",mxResources.get("replaceWith")),C.setAttribute("type","text"),C.style.marginTop="4px",C.style.marginBottom="6px",C.style.width=A,C.style.fontSize="12px",C.style.borderRadius="4px",C.style.padding="6px",x.appendChild(C),mxUtils.br(x),mxEvent.addListener(C,"input",e));var D=document.createElement("input");
D.setAttribute("id","geFindWinRegExChck");D.setAttribute("type","checkbox");D.style.marginRight="4px";x.appendChild(D);A=document.createElement("label");A.setAttribute("for","geFindWinRegExChck");x.appendChild(A);mxUtils.write(A,mxResources.get("regularExpression"));x.appendChild(A);A=a.menus.createHelpLink("https://www.diagrams.net/doc/faq/find-shapes");A.style.position="relative";A.style.marginLeft="6px";A.style.top="-1px";x.appendChild(A);mxUtils.br(x);var G=document.createElement("input");G.setAttribute("id",
"geFindWinAllPagesChck");G.setAttribute("type","checkbox");G.style.marginRight="4px";x.appendChild(G);A=document.createElement("label");A.setAttribute("for","geFindWinAllPagesChck");x.appendChild(A);mxUtils.write(A,mxResources.get("allPages"));x.appendChild(A);var E=document.createElement("div");mxUtils.br(x);A=document.createElement("div");A.style.left="0px";A.style.right="0px";A.style.marginTop="6px";A.style.padding="0 6px 0 6px";A.style.textAlign="center";x.appendChild(A);var F=mxUtils.button(mxResources.get("reset"),
-function(){M.innerHTML="";B.value="";B.style.backgroundColor="";g&&(C.value="",e());p=q=null;t=!1;B.focus()});F.setAttribute("title",mxResources.get("reset"));F.style["float"]="none";F.style.width="120px";F.style.marginTop="6px";F.style.marginLeft="8px";F.style.overflow="hidden";F.style.textOverflow="ellipsis";F.className="geBtn";g||A.appendChild(F);var K=mxUtils.button(mxResources.get("find"),function(){try{B.style.backgroundColor=k()?"":Editor.isDarkMode()?"#ff0000":"#ffcfcf"}catch(V){a.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";A.appendChild(K);var M=document.createElement("div");M.style.marginTop="10px";if(g){var J=function(a,b,e,c,d){if(null==d||"1"!=d.html)return c=a.toLowerCase().indexOf(b,c),0>c?a:a.substr(0,c)+e+a.substr(c+b.length);var k=a;b=mxUtils.htmlEntities(b);d=[];for(var l=
--1;-1<(l=a.indexOf("<",l+1));)d.push(l);l=a.match(/<[^>]*>/g);a=a.replace(/<[^>]*>/g,"");c=a.toLowerCase().indexOf(b,c);if(0>c)return k;k=c+b.length;e=mxUtils.htmlEntities(e);a=a.substr(0,c)+e+a.substr(k);for(var f=0,g=0;g<d.length;g++){if(d[g]-f<c)a=a.substr(0,d[g])+l[g]+a.substr(d[g]);else{var n=d[g]-f<k?c+f:d[g]+(e.length-b.length);a=a.substr(0,n)+l[g]+a.substr(n)}f+=l[g].length}return a},I=mxUtils.button(mxResources.get("replFind"),function(){try{if(null!=v&&null!=q&&C.value){var b=q.cell,e=n.getLabel(b);
-n.isCellEditable(b)&&n.model.setValue(b,J(e,v,C.value,z-v.length,n.getCurrentCellStyle(b)));B.style.backgroundColor=k(!1,!0)?"":Editor.isDarkMode()?"#ff0000":"#ffcfcf"}}catch(P){a.handleError(P)}});I.setAttribute("title",mxResources.get("replFind"));I.style["float"]="none";I.style.width="120px";I.style.marginTop="6px";I.style.marginLeft="8px";I.style.overflow="hidden";I.style.textOverflow="ellipsis";I.className="geBtn gePrimaryBtn";I.setAttribute("disabled","disabled");A.appendChild(I);mxUtils.br(A);
-var N=mxUtils.button(mxResources.get("replace"),function(){try{if(null!=v&&null!=q&&C.value){var b=q.cell,e=n.getLabel(b);n.model.setValue(b,J(e,v,C.value,z-v.length,n.getCurrentCellStyle(b)));I.setAttribute("disabled","disabled");N.setAttribute("disabled","disabled")}}catch(P){a.handleError(P)}});N.setAttribute("title",mxResources.get("replace"));N.style["float"]="none";N.style.width="120px";N.style.marginTop="6px";N.style.marginLeft="8px";N.style.overflow="hidden";N.style.textOverflow="ellipsis";
-N.className="geBtn gePrimaryBtn";N.setAttribute("disabled","disabled");A.appendChild(N);var H=mxUtils.button(mxResources.get("replaceAll"),function(){M.innerHTML="";if(C.value){var b=a.currentPage,e=a.editor.graph.getSelectionCells();a.editor.graph.rendering=!1;n.getModel().beginUpdate();try{for(var c=0,d={};k(!1,!0,!0)&&100>c;){var l=q.cell,g=n.getLabel(l),f=d[l.id];if(f&&f.replAllMrk==y&&f.replAllPos>=z)break;d[l.id]={replAllMrk:y,replAllPos:z};n.isCellEditable(l)&&(n.model.setValue(l,J(g,v,C.value,
+function(){M.innerHTML="";B.value="";B.style.backgroundColor="";f&&(C.value="",e());p=q=null;t=!1;B.focus()});F.setAttribute("title",mxResources.get("reset"));F.style["float"]="none";F.style.width="120px";F.style.marginTop="6px";F.style.marginLeft="8px";F.style.overflow="hidden";F.style.textOverflow="ellipsis";F.className="geBtn";f||A.appendChild(F);var J=mxUtils.button(mxResources.get("find"),function(){try{B.style.backgroundColor=k()?"":Editor.isDarkMode()?"#ff0000":"#ffcfcf"}catch(V){a.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";A.appendChild(J);var M=document.createElement("div");M.style.marginTop="10px";if(f){var K=function(a,b,e,c,d){if(null==d||"1"!=d.html)return c=a.toLowerCase().indexOf(b,c),0>c?a:a.substr(0,c)+e+a.substr(c+b.length);var k=a;b=mxUtils.htmlEntities(b);d=[];for(var l=
+-1;-1<(l=a.indexOf("<",l+1));)d.push(l);l=a.match(/<[^>]*>/g);a=a.replace(/<[^>]*>/g,"");c=a.toLowerCase().indexOf(b,c);if(0>c)return k;k=c+b.length;e=mxUtils.htmlEntities(e);a=a.substr(0,c)+e+a.substr(k);for(var g=0,f=0;f<d.length;f++){if(d[f]-g<c)a=a.substr(0,d[f])+l[f]+a.substr(d[f]);else{var n=d[f]-g<k?c+g:d[f]+(e.length-b.length);a=a.substr(0,n)+l[f]+a.substr(n)}g+=l[f].length}return a},I=mxUtils.button(mxResources.get("replFind"),function(){try{if(null!=v&&null!=q&&C.value){var b=q.cell,e=n.getLabel(b);
+n.isCellEditable(b)&&n.model.setValue(b,K(e,v,C.value,z-v.length,n.getCurrentCellStyle(b)));B.style.backgroundColor=k(!1,!0)?"":Editor.isDarkMode()?"#ff0000":"#ffcfcf"}}catch(P){a.handleError(P)}});I.setAttribute("title",mxResources.get("replFind"));I.style["float"]="none";I.style.width="120px";I.style.marginTop="6px";I.style.marginLeft="8px";I.style.overflow="hidden";I.style.textOverflow="ellipsis";I.className="geBtn gePrimaryBtn";I.setAttribute("disabled","disabled");A.appendChild(I);mxUtils.br(A);
+var N=mxUtils.button(mxResources.get("replace"),function(){try{if(null!=v&&null!=q&&C.value){var b=q.cell,e=n.getLabel(b);n.model.setValue(b,K(e,v,C.value,z-v.length,n.getCurrentCellStyle(b)));I.setAttribute("disabled","disabled");N.setAttribute("disabled","disabled")}}catch(P){a.handleError(P)}});N.setAttribute("title",mxResources.get("replace"));N.style["float"]="none";N.style.width="120px";N.style.marginTop="6px";N.style.marginLeft="8px";N.style.overflow="hidden";N.style.textOverflow="ellipsis";
+N.className="geBtn gePrimaryBtn";N.setAttribute("disabled","disabled");A.appendChild(N);var H=mxUtils.button(mxResources.get("replaceAll"),function(){M.innerHTML="";if(C.value){var b=a.currentPage,e=a.editor.graph.getSelectionCells();a.editor.graph.rendering=!1;n.getModel().beginUpdate();try{for(var c=0,d={};k(!1,!0,!0)&&100>c;){var l=q.cell,g=n.getLabel(l),f=d[l.id];if(f&&f.replAllMrk==y&&f.replAllPos>=z)break;d[l.id]={replAllMrk:y,replAllPos:z};n.isCellEditable(l)&&(n.model.setValue(l,K(g,v,C.value,
z-v.length,n.getCurrentCellStyle(l))),c++)}b!=a.currentPage&&a.editor.graph.model.execute(new SelectPage(a,b));mxUtils.write(M,mxResources.get("matchesRepl",[c]))}catch(Z){a.handleError(Z)}finally{n.getModel().endUpdate(),a.editor.graph.setSelectionCells(e),a.editor.graph.rendering=!0}y++}});H.setAttribute("title",mxResources.get("replaceAll"));H.style["float"]="none";H.style.width="120px";H.style.marginTop="6px";H.style.marginLeft="8px";H.style.overflow="hidden";H.style.textOverflow="ellipsis";H.className=
"geBtn gePrimaryBtn";H.setAttribute("disabled","disabled");A.appendChild(H);mxUtils.br(A);A.appendChild(F);F=mxUtils.button(mxResources.get("close"),mxUtils.bind(this,function(){this.window.setVisible(!1)}));F.setAttribute("title",mxResources.get("close"));F.style["float"]="none";F.style.width="120px";F.style.marginTop="6px";F.style.marginLeft="8px";F.style.overflow="hidden";F.style.textOverflow="ellipsis";F.className="geBtn";A.appendChild(F);mxUtils.br(A);A.appendChild(M)}else F.style.width="90px",
-K.style.width="90px";mxEvent.addListener(B,"keyup",function(a){if(91==a.keyCode||93==a.keyCode||17==a.keyCode)mxEvent.consume(a);else if(27==a.keyCode)l.funct();else if(p!=B.value.toLowerCase()||13==a.keyCode)try{B.style.backgroundColor=k()?"":Editor.isDarkMode()?"#ff0000":"#ffcfcf"}catch(U){B.style.backgroundColor=Editor.isDarkMode()?"#ff0000":"#ffcfcf"}});mxEvent.addListener(x,"keydown",function(b){70==b.keyCode&&a.keyHandler.isControlDown(b)&&!mxEvent.isShiftDown(b)&&(l.funct(),mxEvent.consume(b))});
-this.window=new mxWindow(mxResources.get("find")+(g?"/"+mxResources.get("replace"):""),x,d,c,b,f,!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()?(B.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?B.select():document.execCommand("selectAll",!1,null),null!=a.pages&&1<a.pages.length?G.removeAttribute("disabled"):
+J.style.width="90px";mxEvent.addListener(B,"keyup",function(a){if(91==a.keyCode||93==a.keyCode||17==a.keyCode)mxEvent.consume(a);else if(27==a.keyCode)l.funct();else if(p!=B.value.toLowerCase()||13==a.keyCode)try{B.style.backgroundColor=k()?"":Editor.isDarkMode()?"#ff0000":"#ffcfcf"}catch(U){B.style.backgroundColor=Editor.isDarkMode()?"#ff0000":"#ffcfcf"}});mxEvent.addListener(x,"keydown",function(b){70==b.keyCode&&a.keyHandler.isControlDown(b)&&!mxEvent.isShiftDown(b)&&(l.funct(),mxEvent.consume(b))});
+this.window=new mxWindow(mxResources.get("find")+(f?"/"+mxResources.get("replace"):""),x,d,c,b,g,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!1);this.window.setClosable(!0);this.window.addListener("show",mxUtils.bind(this,function(){this.window.fit();this.window.isVisible()?(B.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?B.select():document.execCommand("selectAll",!1,null),null!=a.pages&&1<a.pages.length?G.removeAttribute("disabled"):
(G.checked=!1,G.setAttribute("disabled","disabled"))):n.container.focus()}));this.window.setLocation=function(a,b){var e=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;a=Math.max(0,Math.min(a,(window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth)-this.table.clientWidth));b=Math.max(0,Math.min(b,e-this.table.clientHeight-("1"==urlParams.sketch?3:48)));this.getX()==a&&this.getY()==b||mxWindow.prototype.setLocation.apply(this,arguments)};
-var L=mxUtils.bind(this,function(){var a=this.window.getX(),b=this.window.getY();this.window.setLocation(a,b)});mxEvent.addListener(window,"resize",L);this.destroy=function(){mxEvent.removeListener(window,"resize",L);this.window.destroy()}},FreehandWindow=function(a,d,c,b,f){var g=a.editor.graph;a=document.createElement("div");a.style.textAlign="center";a.style.userSelect="none";a.style.overflow="hidden";a.style.height="100%";var m=mxUtils.button(mxResources.get("startDrawing"),function(){g.freehand.isDrawing()?
-g.freehand.stopDrawing():g.freehand.startDrawing()});m.setAttribute("title",mxResources.get("startDrawing"));m.style.marginTop="10px";m.style.width="90%";m.style.boxSizing="border-box";m.style.overflow="hidden";m.style.textOverflow="ellipsis";m.style.textAlign="center";m.className="geBtn gePrimaryBtn";a.appendChild(m);this.window=new mxWindow(mxResources.get("freehand"),a,d,c,b,f,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!1);this.window.setClosable(!0);
-g.addListener("freehandStateChanged",mxUtils.bind(this,function(){m.innerHTML="";mxUtils.write(m,mxResources.get(g.freehand.isDrawing()?"stopDrawing":"startDrawing"));m.setAttribute("title",mxResources.get(g.freehand.isDrawing()?"stopDrawing":"startDrawing"));m.className="geBtn"+(g.freehand.isDrawing()?"":" gePrimaryBtn")}));this.window.addListener("show",mxUtils.bind(this,function(){this.window.fit()}));this.window.addListener("hide",mxUtils.bind(this,function(){g.freehand.isDrawing()&&g.freehand.stopDrawing()}));
+var L=mxUtils.bind(this,function(){var a=this.window.getX(),b=this.window.getY();this.window.setLocation(a,b)});mxEvent.addListener(window,"resize",L);this.destroy=function(){mxEvent.removeListener(window,"resize",L);this.window.destroy()}},FreehandWindow=function(a,d,c,b,g){var f=a.editor.graph;a=document.createElement("div");a.style.textAlign="center";a.style.userSelect="none";a.style.overflow="hidden";a.style.height="100%";var m=mxUtils.button(mxResources.get("startDrawing"),function(){f.freehand.isDrawing()?
+f.freehand.stopDrawing():f.freehand.startDrawing()});m.setAttribute("title",mxResources.get("startDrawing"));m.style.marginTop="10px";m.style.width="90%";m.style.boxSizing="border-box";m.style.overflow="hidden";m.style.textOverflow="ellipsis";m.style.textAlign="center";m.className="geBtn gePrimaryBtn";a.appendChild(m);this.window=new mxWindow(mxResources.get("freehand"),a,d,c,b,g,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!1);this.window.setClosable(!0);
+f.addListener("freehandStateChanged",mxUtils.bind(this,function(){m.innerHTML="";mxUtils.write(m,mxResources.get(f.freehand.isDrawing()?"stopDrawing":"startDrawing"));m.setAttribute("title",mxResources.get(f.freehand.isDrawing()?"stopDrawing":"startDrawing"));m.className="geBtn"+(f.freehand.isDrawing()?"":" gePrimaryBtn")}));this.window.addListener("show",mxUtils.bind(this,function(){this.window.fit()}));this.window.addListener("hide",mxUtils.bind(this,function(){f.freehand.isDrawing()&&f.freehand.stopDrawing()}));
this.window.setLocation=function(a,b){var e=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;a=Math.max(0,Math.min(a,(window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth)-this.table.clientWidth));b=Math.max(0,Math.min(b,e-this.table.clientHeight-("1"==urlParams.sketch?3:48)));this.getX()==a&&this.getY()==b||mxWindow.prototype.setLocation.apply(this,arguments)};var e=mxUtils.bind(this,function(){var a=this.window.getX(),b=this.window.getY();
-this.window.setLocation(a,b)});mxEvent.addListener(window,"resize",e);this.destroy=function(){mxEvent.removeListener(window,"resize",e);this.window.destroy()}},TagsWindow=function(a,d,c,b,f){var g=a.editor.graph,m="tags",e=document.createElement("div");e.style.userSelect="none";e.style.overflow="hidden";e.style.padding="10px";e.style.height="100%";var k=document.createElement("input");k.setAttribute("placeholder",mxResources.get("allTags"));k.setAttribute("type","text");k.style.marginTop="4px";k.style.width=
+this.window.setLocation(a,b)});mxEvent.addListener(window,"resize",e);this.destroy=function(){mxEvent.removeListener(window,"resize",e);this.window.destroy()}},TagsWindow=function(a,d,c,b,g){var f=a.editor.graph,m="tags",e=document.createElement("div");e.style.userSelect="none";e.style.overflow="hidden";e.style.padding="10px";e.style.height="100%";var k=document.createElement("input");k.setAttribute("placeholder",mxResources.get("allTags"));k.setAttribute("type","text");k.style.marginTop="4px";k.style.width=
"260px";k.style.fontSize="12px";k.style.borderRadius="4px";k.style.padding="6px";e.appendChild(k);if(!a.isOffline()||mxClient.IS_CHROMEAPP){k.style.width="240px";var l=a.menus.createHelpLink("https://www.diagrams.net/doc/faq/tags");l.firstChild.style.marginBottom="6px";l.style.marginLeft="6px";e.appendChild(l)}mxEvent.addListener(k,"dblclick",function(){var b=new FilenameDialog(a,m,mxResources.get("ok"),mxUtils.bind(this,function(a){null!=a&&0<a.length&&(m=a)}),mxResources.get("enterPropertyName"));
-a.showDialog(b.container,300,80,!0,!0);b.init()});k.setAttribute("title",mxResources.get("doubleClickChangeProperty"));mxUtils.br(e);l=mxUtils.button(mxResources.get("hide"),function(){var a=g.getCellsForTags(k.value.split(" "),void 0,m,!0);g.setCellsVisible(a,!1)});l.setAttribute("title",mxResources.get("hide"));l.style.marginTop="8px";l.style.marginRight="4px";l.className="geBtn";e.appendChild(l);l=mxUtils.button(mxResources.get("show"),function(){var a=g.getCellsForTags(k.value.split(" "),void 0,
-m,!0);g.setCellsVisible(a,!0);if(g.isEnabled()){for(var b=[],e=0;e<a.length;e++)g.isCellLocked(a[e])||!g.model.isVertex(a[e])&&!g.model.isEdge(a[e])||b.push(a[e]);g.setSelectionCells(b)}else for(e=0;e<a.length;e++)g.highlightCell(a[e])});l.setAttribute("title",mxResources.get("show"));l.style.marginTop="8px";l.style.marginRight="4px";l.className="geBtn";e.appendChild(l);var n=a.actions.get("tags"),l=mxUtils.button(mxResources.get("close"),function(){n.funct()});l.setAttribute("title",mxResources.get("close")+
-" (Enter/Esc)");l.style.marginTop="8px";l.className="geBtn gePrimaryBtn";e.appendChild(l);mxEvent.addListener(k,"keyup",function(a){13!=a.keyCode&&27!=a.keyCode||n.funct()});this.window=new mxWindow(mxResources.get("tags"),e,d,c,b,f,!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()?(k.focus(),mxClient.IS_GC||mxClient.IS_FF||
-5<=document.documentMode?k.select():document.execCommand("selectAll",!1,null)):g.container.focus()}));this.window.setLocation=function(a,b){var e=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;a=Math.max(0,Math.min(a,(window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth)-this.table.clientWidth));b=Math.max(0,Math.min(b,e-this.table.clientHeight-("1"==urlParams.sketch?3:48)));this.getX()==a&&this.getY()==b||mxWindow.prototype.setLocation.apply(this,
-arguments)};var p=mxUtils.bind(this,function(){var a=this.window.getX(),b=this.window.getY();this.window.setLocation(a,b)});mxEvent.addListener(window,"resize",p);this.destroy=function(){mxEvent.removeListener(window,"resize",p);this.window.destroy()}},AuthDialog=function(a,d,c,b){var f=document.createElement("div");f.style.textAlign="center";var g=document.createElement("p");g.style.fontSize="16pt";g.style.padding="0px";g.style.margin="0px";g.style.color="gray";mxUtils.write(g,mxResources.get("authorizationRequired"));
+a.showDialog(b.container,300,80,!0,!0);b.init()});k.setAttribute("title",mxResources.get("doubleClickChangeProperty"));mxUtils.br(e);l=mxUtils.button(mxResources.get("hide"),function(){var a=f.getCellsForTags(k.value.split(" "),void 0,m,!0);f.setCellsVisible(a,!1)});l.setAttribute("title",mxResources.get("hide"));l.style.marginTop="8px";l.style.marginRight="4px";l.className="geBtn";e.appendChild(l);l=mxUtils.button(mxResources.get("show"),function(){var a=f.getCellsForTags(k.value.split(" "),void 0,
+m,!0);f.setCellsVisible(a,!0);if(f.isEnabled()){for(var b=[],e=0;e<a.length;e++)f.isCellLocked(a[e])||!f.model.isVertex(a[e])&&!f.model.isEdge(a[e])||b.push(a[e]);f.setSelectionCells(b)}else for(e=0;e<a.length;e++)f.highlightCell(a[e])});l.setAttribute("title",mxResources.get("show"));l.style.marginTop="8px";l.style.marginRight="4px";l.className="geBtn";e.appendChild(l);var n=a.actions.get("tags"),l=mxUtils.button(mxResources.get("close"),function(){n.funct()});l.setAttribute("title",mxResources.get("close")+
+" (Enter/Esc)");l.style.marginTop="8px";l.className="geBtn gePrimaryBtn";e.appendChild(l);mxEvent.addListener(k,"keyup",function(a){13!=a.keyCode&&27!=a.keyCode||n.funct()});this.window=new mxWindow(mxResources.get("tags"),e,d,c,b,g,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!1);this.window.setClosable(!0);this.window.addListener("show",mxUtils.bind(this,function(){this.window.fit();this.window.isVisible()?(k.focus(),mxClient.IS_GC||mxClient.IS_FF||
+5<=document.documentMode?k.select():document.execCommand("selectAll",!1,null)):f.container.focus()}));this.window.setLocation=function(a,b){var e=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;a=Math.max(0,Math.min(a,(window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth)-this.table.clientWidth));b=Math.max(0,Math.min(b,e-this.table.clientHeight-("1"==urlParams.sketch?3:48)));this.getX()==a&&this.getY()==b||mxWindow.prototype.setLocation.apply(this,
+arguments)};var p=mxUtils.bind(this,function(){var a=this.window.getX(),b=this.window.getY();this.window.setLocation(a,b)});mxEvent.addListener(window,"resize",p);this.destroy=function(){mxEvent.removeListener(window,"resize",p);this.window.destroy()}},AuthDialog=function(a,d,c,b){var g=document.createElement("div");g.style.textAlign="center";var f=document.createElement("p");f.style.fontSize="16pt";f.style.padding="0px";f.style.margin="0px";f.style.color="gray";mxUtils.write(f,mxResources.get("authorizationRequired"));
var m="Unknown",e=document.createElement("img");e.setAttribute("border","0");e.setAttribute("align","absmiddle");e.style.marginRight="10px";d==a.drive?(m=mxResources.get("googleDrive"),e.src=IMAGE_PATH+"/google-drive-logo-white.svg"):d==a.dropbox?(m=mxResources.get("dropbox"),e.src=IMAGE_PATH+"/dropbox-logo-white.svg"):d==a.oneDrive?(m=mxResources.get("oneDrive"),e.src=IMAGE_PATH+"/onedrive-logo-white.svg"):d==a.gitHub?(m=mxResources.get("github"),e.src=IMAGE_PATH+"/github-logo-white.svg"):d==a.gitLab?
(m=mxResources.get("gitlab"),e.src=IMAGE_PATH+"/gitlab-logo.svg",e.style.width="32px"):d==a.notion?(m=mxResources.get("notion"),e.src=IMAGE_PATH+"/notion-logo-white.svg",e.style.width="32px"):d==a.trello&&(m=mxResources.get("trello"),e.src=IMAGE_PATH+"/trello-logo-white.svg");a=document.createElement("p");mxUtils.write(a,mxResources.get("authorizeThisAppIn",[m]));var k=document.createElement("input");k.setAttribute("type","checkbox");m=mxUtils.button(mxResources.get("authorize"),function(){b(k.checked)});
-m.insertBefore(e,m.firstChild);m.style.marginTop="6px";m.className="geBigButton";m.style.fontSize="18px";m.style.padding="14px";f.appendChild(g);f.appendChild(a);f.appendChild(m);c&&(c=document.createElement("p"),c.style.marginTop="20px",c.appendChild(k),g=document.createElement("span"),mxUtils.write(g," "+mxResources.get("rememberMe")),c.appendChild(g),f.appendChild(c),k.checked=!0,k.defaultChecked=!0,mxEvent.addListener(g,"click",function(a){k.checked=!k.checked;mxEvent.consume(a)}));this.container=
-f},MoreShapesDialog=function(a,d,c){c=null!=c?c:a.sidebar.entries;var b=document.createElement("div"),f=[];if(null!=a.sidebar.customEntries)for(var g=0;g<a.sidebar.customEntries.length;g++){for(var m=a.sidebar.customEntries[g],e={title:a.getResource(m.title),entries:[]},k=0;k<m.entries.length;k++){var l=m.entries[k];e.entries.push({id:l.id,title:a.getResource(l.title),desc:a.getResource(l.desc),image:l.preview})}f.push(e)}for(g=0;g<c.length;g++)if(null==a.sidebar.enabledLibraries)f.push(c[g]);else{e=
-{title:c[g].title,entries:[]};for(k=0;k<c[g].entries.length;k++)0<=mxUtils.indexOf(a.sidebar.enabledLibraries,c[g].entries[k].id)&&e.entries.push(c[g].entries[k]);0<e.entries.length&&f.push(e)}c=f;if(d){g=mxUtils.bind(this,function(b){for(var e=0;e<b.length;e++)(function(b){var c=t.cloneNode(!1);c.style.fontWeight="bold";c.style.backgroundColor=Editor.isDarkMode()?"#505759":"#e5e5e5";c.style.padding="6px 0px 6px 20px";mxUtils.write(c,b.title);n.appendChild(c);for(var d=0;d<b.entries.length;d++)(function(b){var c=
+m.insertBefore(e,m.firstChild);m.style.marginTop="6px";m.className="geBigButton";m.style.fontSize="18px";m.style.padding="14px";g.appendChild(f);g.appendChild(a);g.appendChild(m);c&&(c=document.createElement("p"),c.style.marginTop="20px",c.appendChild(k),f=document.createElement("span"),mxUtils.write(f," "+mxResources.get("rememberMe")),c.appendChild(f),g.appendChild(c),k.checked=!0,k.defaultChecked=!0,mxEvent.addListener(f,"click",function(a){k.checked=!k.checked;mxEvent.consume(a)}));this.container=
+g},MoreShapesDialog=function(a,d,c){c=null!=c?c:a.sidebar.entries;var b=document.createElement("div"),g=[];if(null!=a.sidebar.customEntries)for(var f=0;f<a.sidebar.customEntries.length;f++){for(var m=a.sidebar.customEntries[f],e={title:a.getResource(m.title),entries:[]},k=0;k<m.entries.length;k++){var l=m.entries[k];e.entries.push({id:l.id,title:a.getResource(l.title),desc:a.getResource(l.desc),image:l.preview})}g.push(e)}for(f=0;f<c.length;f++)if(null==a.sidebar.enabledLibraries)g.push(c[f]);else{e=
+{title:c[f].title,entries:[]};for(k=0;k<c[f].entries.length;k++)0<=mxUtils.indexOf(a.sidebar.enabledLibraries,c[f].entries[k].id)&&e.entries.push(c[f].entries[k]);0<e.entries.length&&g.push(e)}c=g;if(d){f=mxUtils.bind(this,function(b){for(var e=0;e<b.length;e++)(function(b){var c=t.cloneNode(!1);c.style.fontWeight="bold";c.style.backgroundColor=Editor.isDarkMode()?"#505759":"#e5e5e5";c.style.padding="6px 0px 6px 20px";mxUtils.write(c,b.title);n.appendChild(c);for(var d=0;d<b.entries.length;d++)(function(b){var c=
t.cloneNode(!1);c.style.cursor="pointer";c.style.padding="4px 0px 4px 20px";c.style.whiteSpace="nowrap";c.style.overflow="hidden";c.style.textOverflow="ellipsis";c.setAttribute("title",b.title+" ("+b.id+")");var k=document.createElement("input");k.setAttribute("type","checkbox");k.checked=a.sidebar.isEntryVisible(b.id);k.defaultChecked=k.checked;c.appendChild(k);mxUtils.write(c," "+b.title);n.appendChild(c);var l=function(a){if(null==a||"INPUT"!=mxEvent.getSource(a).nodeName){p.style.textAlign="center";
p.style.padding="0px";p.style.color="";p.innerHTML="";if(null!=b.desc){var e=document.createElement("pre");e.style.boxSizing="border-box";e.style.fontFamily="inherit";e.style.margin="20px";e.style.right="0px";e.style.textAlign="left";mxUtils.write(e,b.desc);p.appendChild(e)}null!=b.imageCallback?b.imageCallback(p):null!=b.image?p.innerHTML+='<img border="0" src="'+b.image+'"/>':null==b.desc&&(p.style.padding="20px",p.style.color="rgb(179, 179, 179)",mxUtils.write(p,mxResources.get("noPreview")));
null!=q&&(q.style.backgroundColor="");q=c;q.style.backgroundColor=Editor.isDarkMode()?"#000000":"#ebf2f9";null!=a&&mxEvent.consume(a)}};mxEvent.addListener(c,"click",l);mxEvent.addListener(c,"dblclick",function(a){k.checked=!k.checked;mxEvent.consume(a)});u.push(function(){return k.checked?b.id:null});0==e&&0==d&&l()})(b.entries[d])})(b[e])});k=document.createElement("div");k.className="geDialogTitle";mxUtils.write(k,mxResources.get("shapes"));k.style.position="absolute";k.style.top="0px";k.style.left=
"0px";k.style.lineHeight="40px";k.style.height="40px";k.style.right="0px";var n=document.createElement("div"),p=document.createElement("div");n.style.position="absolute";n.style.top="40px";n.style.left="0px";n.style.width="202px";n.style.bottom="60px";n.style.overflow="auto";p.style.position="absolute";p.style.left="202px";p.style.right="0px";p.style.top="40px";p.style.bottom="60px";p.style.overflow="auto";p.style.borderLeft="1px solid rgb(211, 211, 211)";p.style.textAlign="center";var q=null,u=[],
-t=document.createElement("div");t.style.position="relative";t.style.left="0px";t.style.right="0px";g(c);b.style.padding="30px";b.appendChild(k);b.appendChild(n);b.appendChild(p);c=document.createElement("div");c.className="geDialogFooter";c.style.position="absolute";c.style.paddingRight="16px";c.style.color="gray";c.style.left="0px";c.style.right="0px";c.style.bottom="0px";c.style.height="60px";c.style.lineHeight="52px";var v=document.createElement("input");v.setAttribute("type","checkbox");if(isLocalStorage||
-mxClient.IS_CHROMEAPP)g=document.createElement("span"),g.style.paddingRight="20px",g.appendChild(v),mxUtils.write(g," "+mxResources.get("rememberThisSetting")),v.checked=!0,v.defaultChecked=!0,mxEvent.addListener(g,"click",function(a){mxEvent.getSource(a)!=v&&(v.checked=!v.checked,mxEvent.consume(a))}),c.appendChild(g);g=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});g.className="geBtn";k=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();for(var b=[],e=0;e<u.length;e++){var c=
-u[e].apply(this,arguments);null!=c&&b.push(c)}a.sidebar.showEntries(b.join(";"),v.checked,!0)});k.className="geBtn gePrimaryBtn"}else{var z=document.createElement("table"),g=document.createElement("tbody");b.style.height="100%";b.style.overflow="auto";k=document.createElement("tr");z.style.width="100%";d=document.createElement("td");var f=document.createElement("td"),m=document.createElement("td"),y=mxUtils.bind(this,function(b,e,c){var d=document.createElement("input");d.type="checkbox";z.appendChild(d);
-d.checked=a.sidebar.isEntryVisible(c);var k=document.createElement("span");mxUtils.write(k,e);e=document.createElement("div");e.style.display="block";e.appendChild(d);e.appendChild(k);mxEvent.addListener(k,"click",function(a){d.checked=!d.checked;mxEvent.consume(a)});b.appendChild(e);return function(){return d.checked?c:null}});k.appendChild(d);k.appendChild(f);k.appendChild(m);g.appendChild(k);z.appendChild(g);for(var u=[],x=0,g=0;g<c.length;g++)for(k=0;k<c[g].entries.length;k++)x++;for(var A=[d,
-f,m],B=0,g=0;g<c.length;g++)(function(a){for(var b=0;b<a.entries.length;b++){var e=a.entries[b];u.push(y(A[Math.floor(B/(x/3))],e.title,e.id));B++}})(c[g]);b.appendChild(z);c=document.createElement("div");c.style.marginTop="18px";c.style.textAlign="center";v=document.createElement("input");isLocalStorage&&(v.setAttribute("type","checkbox"),v.checked=!0,v.defaultChecked=!0,c.appendChild(v),g=document.createElement("span"),mxUtils.write(g," "+mxResources.get("rememberThisSetting")),c.appendChild(g),
-mxEvent.addListener(g,"click",function(a){v.checked=!v.checked;mxEvent.consume(a)}));b.appendChild(c);g=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});g.className="geBtn";k=mxUtils.button(mxResources.get("apply"),function(){for(var b=["search"],e=0;e<u.length;e++){var c=u[e].apply(this,arguments);null!=c&&b.push(c)}a.sidebar.showEntries(0<b.length?b.join(";"):"",v.checked);a.hideDialog()});k.className="geBtn gePrimaryBtn";c=document.createElement("div");c.style.marginTop="26px";
-c.style.textAlign="right"}a.editor.cancelFirst?(c.appendChild(g),c.appendChild(k)):(c.appendChild(k),c.appendChild(g));b.appendChild(c);this.container=b},PluginsDialog=function(a,d,c){function b(){if(0==m.length)g.innerHTML=mxUtils.htmlEntities(mxResources.get("noPlugins"));else{g.innerHTML="";for(var e=0;e<m.length;e++){var d=document.createElement("span");d.style.whiteSpace="nowrap";var k=document.createElement("span");k.className="geSprite geSprite-delete";k.style.position="relative";k.style.cursor=
-"pointer";k.style.top="5px";k.style.marginRight="4px";k.style.display="inline-block";d.appendChild(k);mxUtils.write(d,m[e]);g.appendChild(d);mxUtils.br(g);mxEvent.addListener(k,"click",function(e){return function(){a.confirm(mxResources.get("delete")+' "'+m[e]+'"?',function(){null!=c&&c(m[e]);m.splice(e,1);b()})}}(e))}}}var f=document.createElement("div"),g=document.createElement("div");g.style.height="120px";g.style.overflow="auto";var m=mxSettings.getPlugins().slice();f.appendChild(g);b();var e=
+t=document.createElement("div");t.style.position="relative";t.style.left="0px";t.style.right="0px";f(c);b.style.padding="30px";b.appendChild(k);b.appendChild(n);b.appendChild(p);c=document.createElement("div");c.className="geDialogFooter";c.style.position="absolute";c.style.paddingRight="16px";c.style.color="gray";c.style.left="0px";c.style.right="0px";c.style.bottom="0px";c.style.height="60px";c.style.lineHeight="52px";var v=document.createElement("input");v.setAttribute("type","checkbox");if(isLocalStorage||
+mxClient.IS_CHROMEAPP)f=document.createElement("span"),f.style.paddingRight="20px",f.appendChild(v),mxUtils.write(f," "+mxResources.get("rememberThisSetting")),v.checked=!0,v.defaultChecked=!0,mxEvent.addListener(f,"click",function(a){mxEvent.getSource(a)!=v&&(v.checked=!v.checked,mxEvent.consume(a))}),c.appendChild(f);f=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});f.className="geBtn";k=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();for(var b=[],e=0;e<u.length;e++){var c=
+u[e].apply(this,arguments);null!=c&&b.push(c)}a.sidebar.showEntries(b.join(";"),v.checked,!0)});k.className="geBtn gePrimaryBtn"}else{var z=document.createElement("table"),f=document.createElement("tbody");b.style.height="100%";b.style.overflow="auto";k=document.createElement("tr");z.style.width="100%";d=document.createElement("td");var g=document.createElement("td"),m=document.createElement("td"),y=mxUtils.bind(this,function(b,e,c){var d=document.createElement("input");d.type="checkbox";z.appendChild(d);
+d.checked=a.sidebar.isEntryVisible(c);var k=document.createElement("span");mxUtils.write(k,e);e=document.createElement("div");e.style.display="block";e.appendChild(d);e.appendChild(k);mxEvent.addListener(k,"click",function(a){d.checked=!d.checked;mxEvent.consume(a)});b.appendChild(e);return function(){return d.checked?c:null}});k.appendChild(d);k.appendChild(g);k.appendChild(m);f.appendChild(k);z.appendChild(f);for(var u=[],x=0,f=0;f<c.length;f++)for(k=0;k<c[f].entries.length;k++)x++;for(var A=[d,
+g,m],B=0,f=0;f<c.length;f++)(function(a){for(var b=0;b<a.entries.length;b++){var e=a.entries[b];u.push(y(A[Math.floor(B/(x/3))],e.title,e.id));B++}})(c[f]);b.appendChild(z);c=document.createElement("div");c.style.marginTop="18px";c.style.textAlign="center";v=document.createElement("input");isLocalStorage&&(v.setAttribute("type","checkbox"),v.checked=!0,v.defaultChecked=!0,c.appendChild(v),f=document.createElement("span"),mxUtils.write(f," "+mxResources.get("rememberThisSetting")),c.appendChild(f),
+mxEvent.addListener(f,"click",function(a){v.checked=!v.checked;mxEvent.consume(a)}));b.appendChild(c);f=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});f.className="geBtn";k=mxUtils.button(mxResources.get("apply"),function(){for(var b=["search"],e=0;e<u.length;e++){var c=u[e].apply(this,arguments);null!=c&&b.push(c)}a.sidebar.showEntries(0<b.length?b.join(";"):"",v.checked);a.hideDialog()});k.className="geBtn gePrimaryBtn";c=document.createElement("div");c.style.marginTop="26px";
+c.style.textAlign="right"}a.editor.cancelFirst?(c.appendChild(f),c.appendChild(k)):(c.appendChild(k),c.appendChild(f));b.appendChild(c);this.container=b},PluginsDialog=function(a,d,c){function b(){if(0==m.length)f.innerHTML=mxUtils.htmlEntities(mxResources.get("noPlugins"));else{f.innerHTML="";for(var e=0;e<m.length;e++){var d=document.createElement("span");d.style.whiteSpace="nowrap";var k=document.createElement("span");k.className="geSprite geSprite-delete";k.style.position="relative";k.style.cursor=
+"pointer";k.style.top="5px";k.style.marginRight="4px";k.style.display="inline-block";d.appendChild(k);mxUtils.write(d,m[e]);f.appendChild(d);mxUtils.br(f);mxEvent.addListener(k,"click",function(e){return function(){a.confirm(mxResources.get("delete")+' "'+m[e]+'"?',function(){null!=c&&c(m[e]);m.splice(e,1);b()})}}(e))}}}var g=document.createElement("div"),f=document.createElement("div");f.style.height="120px";f.style.overflow="auto";var m=mxSettings.getPlugins().slice();g.appendChild(f);b();var e=
mxUtils.button(mxResources.get("add")+"...",null!=d?function(){d(function(a){a&&0>mxUtils.indexOf(m,a)&&m.push(a);b()})}:function(){var e=document.createElement("div"),c=document.createElement("span");c.style.marginTop="6px";mxUtils.write(c,mxResources.get("builtinPlugins")+": ");e.appendChild(c);var d=document.createElement("select");d.style.width="150px";for(c=0;c<App.publicPlugin.length;c++){var k=document.createElement("option");mxUtils.write(k,App.publicPlugin[c]);k.value=App.publicPlugin[c];
d.appendChild(k)}e.appendChild(d);mxUtils.br(e);mxUtils.br(e);c=mxUtils.button(mxResources.get("custom")+"...",function(){var e=new FilenameDialog(a,"",mxResources.get("add"),function(e){a.hideDialog();if(null!=e&&0<e.length){e=e.split(";");for(var c=0;c<e.length;c++){var d=e[c],k=App.pluginRegistry[d];null!=k&&(d=k);0<d.length&&0>mxUtils.indexOf(m,d)&&m.push(d)}b()}},mxResources.get("enterValue")+" ("+mxResources.get("url")+")");a.showDialog(e.container,300,80,!0,!0);e.init()});c.className="geBtn";
e=new CustomDialog(a,e,mxUtils.bind(this,function(){var a=App.pluginRegistry[d.value];0>mxUtils.indexOf(m,a)&&(m.push(a),b())}),null,null,null,c);a.showDialog(e.container,300,80,!0,!0)});e.className="geBtn";var k=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});k.className="geBtn";var l=mxUtils.button(mxResources.get("apply"),function(){mxSettings.setPlugins(m);mxSettings.save();a.hideDialog();a.alert(mxResources.get("restartForChangeRequired"))});l.className="geBtn gePrimaryBtn";
-var n=document.createElement("div");n.style.marginTop="14px";n.style.textAlign="right";var p=mxUtils.button(mxResources.get("help"),function(){a.openLink("https://www.diagrams.net/doc/faq/plugins")});p.className="geBtn";a.isOffline()&&!mxClient.IS_CHROMEAPP&&(p.style.display="none");n.appendChild(p);a.editor.cancelFirst?(n.appendChild(k),n.appendChild(e),n.appendChild(l)):(n.appendChild(e),n.appendChild(l),n.appendChild(k));f.appendChild(n);this.container=f},CropImageDialog=function(a,d,c){function b(a){null!=
-m&&m.destroy();m=a?new Croppie(g,{viewport:{width:150,height:150,type:"circle"},enableExif:!0,showZoomer:!1,enableResize:!1,enableOrientation:!0}):new Croppie(g,{viewport:{width:150,height:150,type:"square"},enableExif:!0,showZoomer:!1,enableResize:!0,enableOrientation:!0});m.bind({url:d})}var f=document.createElement("div"),g=document.createElement("div");g.style.width="300px";g.style.height="300px";f.appendChild(g);var m=null;this.init=function(){b()};var e=document.createElement("input");e.setAttribute("type",
-"checkbox");e.setAttribute("id","croppieCircle");e.style.margin="5px";f.appendChild(e);var k=document.createElement("label");k.setAttribute("for","croppieCircle");mxUtils.write(k,mxResources.get("circle"));f.appendChild(k);var l,n,p,q,k=document.createElement("div");l=document.createElement("button");n=document.createElement("button");k.appendChild(l);k.appendChild(n);p=document.createElement("i");q=document.createElement("i");l.appendChild(p);n.appendChild(q);k.className="cr-rotate-controls";k.style["float"]=
-"right";k.style.position="inherit";l.className="cr-rotate-l";n.className="cr-rotate-r";f.appendChild(k);l.addEventListener("click",function(){m.rotate(-90)});n.addEventListener("click",function(){m.rotate(90)});mxEvent.addListener(e,"change",function(){b(this.checked)});e=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});e.className="geBtn";k=mxUtils.button(mxResources.get("apply"),function(){m.result({type:"base64",size:"original"}).then(function(b){c(b);a.hideDialog()})});k.className=
-"geBtn gePrimaryBtn";l=document.createElement("div");l.style.marginTop="20px";l.style.textAlign="right";a.editor.cancelFirst?(l.appendChild(e),l.appendChild(k)):(l.appendChild(k),l.appendChild(e));f.appendChild(l);this.container=f},EditGeometryDialog=function(a,d){var c=a.editor.graph,b=1==d.length?c.getCellGeometry(d[0]):null,f=document.createElement("div"),g=document.createElement("table"),m=document.createElement("tbody"),e=document.createElement("tr"),k=document.createElement("td"),l=document.createElement("td");
-g.style.paddingLeft="6px";mxUtils.write(k,mxResources.get("relative")+":");var n=document.createElement("input");n.setAttribute("type","checkbox");null!=b&&b.relative&&(n.setAttribute("checked","checked"),n.defaultChecked=!0);this.init=function(){n.focus()};l.appendChild(n);e.appendChild(k);e.appendChild(l);m.appendChild(e);e=document.createElement("tr");k=document.createElement("td");l=document.createElement("td");mxUtils.write(k,mxResources.get("left")+":");var p=document.createElement("input");
+var n=document.createElement("div");n.style.marginTop="14px";n.style.textAlign="right";var p=mxUtils.button(mxResources.get("help"),function(){a.openLink("https://www.diagrams.net/doc/faq/plugins")});p.className="geBtn";a.isOffline()&&!mxClient.IS_CHROMEAPP&&(p.style.display="none");n.appendChild(p);a.editor.cancelFirst?(n.appendChild(k),n.appendChild(e),n.appendChild(l)):(n.appendChild(e),n.appendChild(l),n.appendChild(k));g.appendChild(n);this.container=g},CropImageDialog=function(a,d,c){function b(a){null!=
+m&&m.destroy();m=a?new Croppie(f,{viewport:{width:150,height:150,type:"circle"},enableExif:!0,showZoomer:!1,enableResize:!1,enableOrientation:!0}):new Croppie(f,{viewport:{width:150,height:150,type:"square"},enableExif:!0,showZoomer:!1,enableResize:!0,enableOrientation:!0});m.bind({url:d})}var g=document.createElement("div"),f=document.createElement("div");f.style.width="300px";f.style.height="300px";g.appendChild(f);var m=null;this.init=function(){b()};var e=document.createElement("input");e.setAttribute("type",
+"checkbox");e.setAttribute("id","croppieCircle");e.style.margin="5px";g.appendChild(e);var k=document.createElement("label");k.setAttribute("for","croppieCircle");mxUtils.write(k,mxResources.get("circle"));g.appendChild(k);var l,n,p,q,k=document.createElement("div");l=document.createElement("button");n=document.createElement("button");k.appendChild(l);k.appendChild(n);p=document.createElement("i");q=document.createElement("i");l.appendChild(p);n.appendChild(q);k.className="cr-rotate-controls";k.style["float"]=
+"right";k.style.position="inherit";l.className="cr-rotate-l";n.className="cr-rotate-r";g.appendChild(k);l.addEventListener("click",function(){m.rotate(-90)});n.addEventListener("click",function(){m.rotate(90)});mxEvent.addListener(e,"change",function(){b(this.checked)});e=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});e.className="geBtn";k=mxUtils.button(mxResources.get("apply"),function(){m.result({type:"base64",size:"original"}).then(function(b){c(b);a.hideDialog()})});k.className=
+"geBtn gePrimaryBtn";l=document.createElement("div");l.style.marginTop="20px";l.style.textAlign="right";a.editor.cancelFirst?(l.appendChild(e),l.appendChild(k)):(l.appendChild(k),l.appendChild(e));g.appendChild(l);this.container=g},EditGeometryDialog=function(a,d){var c=a.editor.graph,b=1==d.length?c.getCellGeometry(d[0]):null,g=document.createElement("div"),f=document.createElement("table"),m=document.createElement("tbody"),e=document.createElement("tr"),k=document.createElement("td"),l=document.createElement("td");
+f.style.paddingLeft="6px";mxUtils.write(k,mxResources.get("relative")+":");var n=document.createElement("input");n.setAttribute("type","checkbox");null!=b&&b.relative&&(n.setAttribute("checked","checked"),n.defaultChecked=!0);this.init=function(){n.focus()};l.appendChild(n);e.appendChild(k);e.appendChild(l);m.appendChild(e);e=document.createElement("tr");k=document.createElement("td");l=document.createElement("td");mxUtils.write(k,mxResources.get("left")+":");var p=document.createElement("input");
p.setAttribute("type","text");p.style.width="100px";p.value=null!=b?b.x:"";l.appendChild(p);e.appendChild(k);e.appendChild(l);m.appendChild(e);e=document.createElement("tr");k=document.createElement("td");l=document.createElement("td");mxUtils.write(k,mxResources.get("top")+":");var q=document.createElement("input");q.setAttribute("type","text");q.style.width="100px";q.value=null!=b?b.y:"";l.appendChild(q);e.appendChild(k);e.appendChild(l);m.appendChild(e);e=document.createElement("tr");k=document.createElement("td");
l=document.createElement("td");mxUtils.write(k,mxResources.get("dx")+":");var u=document.createElement("input");u.setAttribute("type","text");u.style.width="100px";u.value=null!=b&&null!=b.offset?b.offset.x:"";l.appendChild(u);e.appendChild(k);e.appendChild(l);m.appendChild(e);e=document.createElement("tr");k=document.createElement("td");l=document.createElement("td");mxUtils.write(k,mxResources.get("dy")+":");var t=document.createElement("input");t.setAttribute("type","text");t.style.width="100px";
t.value=null!=b&&null!=b.offset?b.offset.y:"";l.appendChild(t);e.appendChild(k);e.appendChild(l);m.appendChild(e);e=document.createElement("tr");k=document.createElement("td");l=document.createElement("td");mxUtils.write(k,mxResources.get("width")+":");var v=document.createElement("input");v.setAttribute("type","text");v.style.width="100px";v.value=null!=b?b.width:"";l.appendChild(v);e.appendChild(k);e.appendChild(l);m.appendChild(e);e=document.createElement("tr");k=document.createElement("td");l=
document.createElement("td");mxUtils.write(k,mxResources.get("height")+":");var z=document.createElement("input");z.setAttribute("type","text");z.style.width="100px";z.value=null!=b?b.height:"";l.appendChild(z);e.appendChild(k);e.appendChild(l);m.appendChild(e);e=document.createElement("tr");k=document.createElement("td");l=document.createElement("td");mxUtils.write(k,mxResources.get("rotation")+":");var y=document.createElement("input");y.setAttribute("type","text");y.style.width="100px";y.value=
-1==d.length?mxUtils.getValue(c.getCellStyle(d[0]),mxConstants.STYLE_ROTATION,0):"";l.appendChild(y);e.appendChild(k);e.appendChild(l);m.appendChild(e);g.appendChild(m);f.appendChild(g);b=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});b.className="geBtn";var x=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();c.getModel().beginUpdate();try{for(var b=0;b<d.length;b++){var e=c.getCellGeometry(d[b]);null!=e&&(e=e.clone(),c.isCellMovable(d[b])&&(e.relative=n.checked,
+1==d.length?mxUtils.getValue(c.getCellStyle(d[0]),mxConstants.STYLE_ROTATION,0):"";l.appendChild(y);e.appendChild(k);e.appendChild(l);m.appendChild(e);f.appendChild(m);g.appendChild(f);b=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});b.className="geBtn";var x=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();c.getModel().beginUpdate();try{for(var b=0;b<d.length;b++){var e=c.getCellGeometry(d[b]);null!=e&&(e=e.clone(),c.isCellMovable(d[b])&&(e.relative=n.checked,
0<mxUtils.trim(p.value).length&&(e.x=Number(p.value)),0<mxUtils.trim(q.value).length&&(e.y=Number(q.value)),0<mxUtils.trim(u.value).length&&(null==e.offset&&(e.offset=new mxPoint),e.offset.x=Number(u.value)),0<mxUtils.trim(t.value).length&&(null==e.offset&&(e.offset=new mxPoint),e.offset.y=Number(t.value))),c.isCellResizable(d[b])&&(0<mxUtils.trim(v.value).length&&(e.width=Number(v.value)),0<mxUtils.trim(z.value).length&&(e.height=Number(z.value))),c.getModel().setGeometry(d[b],e));0<mxUtils.trim(y.value).length&&
-c.setCellStyles(mxConstants.STYLE_ROTATION,Number(y.value),[d[b]])}}finally{c.getModel().endUpdate()}});x.className="geBtn gePrimaryBtn";mxEvent.addListener(f,"keypress",function(a){13==a.keyCode&&x.click()});g=document.createElement("div");g.style.marginTop="20px";g.style.textAlign="right";a.editor.cancelFirst?(g.appendChild(b),g.appendChild(x)):(g.appendChild(x),g.appendChild(b));f.appendChild(g);this.container=f},LibraryDialog=function(a,d,c,b,f,g){function m(a){for(a=document.elementFromPoint(a.clientX,
-a.clientY);null!=a&&a.parentNode!=u;)a=a.parentNode;var b=null;if(null!=a)for(var e=u.firstChild,b=0;null!=e&&e!=a;)e=e.nextSibling,b++;return b}function e(b,c,d,k,l,f,g,p,q){try{if(a.spinner.stop(),null==c||"image/"==c.substring(0,6))if(null==b&&null!=g||null==v[b]){var I=function(){D.innerHTML="";D.style.cursor="pointer";D.style.whiteSpace="nowrap";D.style.textOverflow="ellipsis";mxUtils.write(D,null!=K.title&&0<K.title.length?K.title:mxResources.get("untitled"));D.style.color=null==K.title||0==
-K.title.length?"#d0d0d0":""};u.style.backgroundImage="";t.style.display="none";var H=l,N=f;if(l>a.maxImageSize||f>a.maxImageSize){var E=Math.min(1,Math.min(a.maxImageSize/Math.max(1,l)),a.maxImageSize/Math.max(1,f));l*=E;f*=E}H>N?(N=Math.round(100*N/H),H=100):(H=Math.round(100*H/N),N=100);var y=document.createElement("div");y.setAttribute("draggable","true");y.style.display="inline-block";y.style.position="relative";y.style.cursor="move";mxUtils.setPrefixedStyle(y.style,"transition","transform .1s ease-in-out");
-if(null!=b){var G=document.createElement("img");G.setAttribute("src",A.convert(b));G.style.width=H+"px";G.style.height=N+"px";G.style.margin="10px";G.style.paddingBottom=Math.floor((100-N)/2)+"px";G.style.paddingLeft=Math.floor((100-H)/2)+"px";y.appendChild(G)}else if(null!=g){var J=a.stringToCells(Graph.decompress(g.xml));0<J.length&&(a.sidebar.createThumb(J,100,100,y,null,!0,!1),y.firstChild.style.display="inline-block",y.firstChild.style.cursor="")}var C=document.createElement("img");C.setAttribute("src",
+c.setCellStyles(mxConstants.STYLE_ROTATION,Number(y.value),[d[b]])}}finally{c.getModel().endUpdate()}});x.className="geBtn gePrimaryBtn";mxEvent.addListener(g,"keypress",function(a){13==a.keyCode&&x.click()});f=document.createElement("div");f.style.marginTop="20px";f.style.textAlign="right";a.editor.cancelFirst?(f.appendChild(b),f.appendChild(x)):(f.appendChild(x),f.appendChild(b));g.appendChild(f);this.container=g},LibraryDialog=function(a,d,c,b,g,f){function m(a){for(a=document.elementFromPoint(a.clientX,
+a.clientY);null!=a&&a.parentNode!=u;)a=a.parentNode;var b=null;if(null!=a)for(var e=u.firstChild,b=0;null!=e&&e!=a;)e=e.nextSibling,b++;return b}function e(b,c,d,k,l,g,f,p,q){try{if(a.spinner.stop(),null==c||"image/"==c.substring(0,6))if(null==b&&null!=f||null==v[b]){var I=function(){D.innerHTML="";D.style.cursor="pointer";D.style.whiteSpace="nowrap";D.style.textOverflow="ellipsis";mxUtils.write(D,null!=J.title&&0<J.title.length?J.title:mxResources.get("untitled"));D.style.color=null==J.title||0==
+J.title.length?"#d0d0d0":""};u.style.backgroundImage="";t.style.display="none";var H=l,N=g;if(l>a.maxImageSize||g>a.maxImageSize){var E=Math.min(1,Math.min(a.maxImageSize/Math.max(1,l)),a.maxImageSize/Math.max(1,g));l*=E;g*=E}H>N?(N=Math.round(100*N/H),H=100):(H=Math.round(100*H/N),N=100);var y=document.createElement("div");y.setAttribute("draggable","true");y.style.display="inline-block";y.style.position="relative";y.style.cursor="move";mxUtils.setPrefixedStyle(y.style,"transition","transform .1s ease-in-out");
+if(null!=b){var G=document.createElement("img");G.setAttribute("src",A.convert(b));G.style.width=H+"px";G.style.height=N+"px";G.style.margin="10px";G.style.paddingBottom=Math.floor((100-N)/2)+"px";G.style.paddingLeft=Math.floor((100-H)/2)+"px";y.appendChild(G)}else if(null!=f){var K=a.stringToCells(Graph.decompress(f.xml));0<K.length&&(a.sidebar.createThumb(K,100,100,y,null,!0,!1),y.firstChild.style.display="inline-block",y.firstChild.style.cursor="")}var C=document.createElement("img");C.setAttribute("src",
Editor.closeImage);C.setAttribute("border","0");C.setAttribute("title",mxResources.get("delete"));C.setAttribute("align","top");C.style.paddingTop="4px";C.style.position="absolute";C.style.marginLeft="-12px";C.style.zIndex="1";C.style.cursor="pointer";mxEvent.addListener(C,"dragstart",function(a){mxEvent.consume(a)});(function(a,b,e){mxEvent.addListener(C,"click",function(c){v[b]=null;for(var d=0;d<n.length;d++)if(null!=n[d].data&&n[d].data==b||null!=n[d].xml&&null!=e&&n[d].xml==e.xml){n.splice(d,
-1);break}y.parentNode.removeChild(a);0==n.length&&(u.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",t.style.display="");mxEvent.consume(c)});mxEvent.addListener(C,"dblclick",function(a){mxEvent.consume(a)})})(y,b,g);y.appendChild(C);y.style.marginBottom="30px";var D=document.createElement("div");D.style.position="absolute";D.style.boxSizing="border-box";D.style.bottom="-18px";D.style.left="10px";D.style.right="10px";D.style.backgroundColor=Editor.isDarkMode()?"#2a2a2a":"#ffffff";D.style.overflow=
-"hidden";D.style.textAlign="center";var K=null;null!=b?(K={data:b,w:l,h:f,title:q},null!=p&&(K.aspect=p),v[b]=G,n.push(K)):null!=g&&(g.aspect="fixed",n.push(g),K=g);mxEvent.addListener(D,"keydown",function(a){13==a.keyCode&&null!=x&&(x(),x=null,mxEvent.consume(a))});I();y.appendChild(D);mxEvent.addListener(D,"mousedown",function(a){"true"!=D.getAttribute("contentEditable")&&mxEvent.consume(a)});J=function(b){if(mxClient.IS_IOS||mxClient.IS_FF||!(null==document.documentMode||9<document.documentMode)){var e=
-new FilenameDialog(a,K.title||"",mxResources.get("ok"),function(a){null!=a&&(K.title=a,I())},mxResources.get("enterValue"));a.showDialog(e.container,300,80,!0,!0);e.init();mxEvent.consume(b)}else if("true"!=D.getAttribute("contentEditable")){null!=x&&(x(),x=null);if(null==K.title||0==K.title.length)D.innerHTML="";D.style.textOverflow="";D.style.whiteSpace="";D.style.cursor="text";D.style.color="";D.setAttribute("contentEditable","true");mxUtils.setPrefixedStyle(D.style,"user-select","text");D.focus();
-document.execCommand("selectAll",!1,null);x=function(){D.removeAttribute("contentEditable");D.style.cursor="pointer";K.title=D.innerHTML;I()};mxEvent.consume(b)}};mxEvent.addListener(D,"click",J);mxEvent.addListener(y,"dblclick",J);u.appendChild(y);mxEvent.addListener(y,"dragstart",function(a){null==b&&null!=g&&(C.style.visibility="hidden",D.style.visibility="hidden");mxClient.IS_FF&&null!=g.xml&&a.dataTransfer.setData("Text",g.xml);z=m(a);mxClient.IS_GC&&(y.style.opacity="0.9");window.setTimeout(function(){mxUtils.setPrefixedStyle(y.style,
+1);break}y.parentNode.removeChild(a);0==n.length&&(u.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",t.style.display="");mxEvent.consume(c)});mxEvent.addListener(C,"dblclick",function(a){mxEvent.consume(a)})})(y,b,f);y.appendChild(C);y.style.marginBottom="30px";var D=document.createElement("div");D.style.position="absolute";D.style.boxSizing="border-box";D.style.bottom="-18px";D.style.left="10px";D.style.right="10px";D.style.backgroundColor=Editor.isDarkMode()?"#2a2a2a":"#ffffff";D.style.overflow=
+"hidden";D.style.textAlign="center";var J=null;null!=b?(J={data:b,w:l,h:g,title:q},null!=p&&(J.aspect=p),v[b]=G,n.push(J)):null!=f&&(f.aspect="fixed",n.push(f),J=f);mxEvent.addListener(D,"keydown",function(a){13==a.keyCode&&null!=x&&(x(),x=null,mxEvent.consume(a))});I();y.appendChild(D);mxEvent.addListener(D,"mousedown",function(a){"true"!=D.getAttribute("contentEditable")&&mxEvent.consume(a)});K=function(b){if(mxClient.IS_IOS||mxClient.IS_FF||!(null==document.documentMode||9<document.documentMode)){var e=
+new FilenameDialog(a,J.title||"",mxResources.get("ok"),function(a){null!=a&&(J.title=a,I())},mxResources.get("enterValue"));a.showDialog(e.container,300,80,!0,!0);e.init();mxEvent.consume(b)}else if("true"!=D.getAttribute("contentEditable")){null!=x&&(x(),x=null);if(null==J.title||0==J.title.length)D.innerHTML="";D.style.textOverflow="";D.style.whiteSpace="";D.style.cursor="text";D.style.color="";D.setAttribute("contentEditable","true");mxUtils.setPrefixedStyle(D.style,"user-select","text");D.focus();
+document.execCommand("selectAll",!1,null);x=function(){D.removeAttribute("contentEditable");D.style.cursor="pointer";J.title=D.innerHTML;I()};mxEvent.consume(b)}};mxEvent.addListener(D,"click",K);mxEvent.addListener(y,"dblclick",K);u.appendChild(y);mxEvent.addListener(y,"dragstart",function(a){null==b&&null!=f&&(C.style.visibility="hidden",D.style.visibility="hidden");mxClient.IS_FF&&null!=f.xml&&a.dataTransfer.setData("Text",f.xml);z=m(a);mxClient.IS_GC&&(y.style.opacity="0.9");window.setTimeout(function(){mxUtils.setPrefixedStyle(y.style,
"transform","scale(0.5,0.5)");mxUtils.setOpacity(y,30);C.style.visibility="";D.style.visibility=""},0)});mxEvent.addListener(y,"dragend",function(a){"hidden"==C.style.visibility&&(C.style.visibility="",D.style.visibility="");z=null;mxUtils.setOpacity(y,100);mxUtils.setPrefixedStyle(y.style,"transform",null)})}else B||(B=!0,a.handleError({message:mxResources.get("fileExists")}));else{l=!1;try{if(H=mxUtils.parseXml(b),"mxlibrary"==H.documentElement.nodeName){N=JSON.parse(mxUtils.getTextContent(H.documentElement));
-if(null!=N&&0<N.length)for(var F=0;F<N.length;F++)null!=N[F].xml?e(null,null,0,0,0,0,N[F]):e(N[F].data,null,0,0,N[F].w,N[F].h,null,"fixed",N[F].title);l=!0}else if("mxfile"==H.documentElement.nodeName){for(var M=H.documentElement.getElementsByTagName("diagram"),F=0;F<M.length;F++){var N=mxUtils.getTextContent(M[F]),J=a.stringToCells(Graph.decompress(N)),O=a.editor.graph.getBoundingBoxFromGeometry(J);e(null,null,0,0,0,0,{xml:N,w:O.width,h:O.height})}l=!0}}catch(Q){}l||(a.spinner.stop(),a.handleError({message:mxResources.get("errorLoadingFile")}))}}catch(Q){}return null}
+if(null!=N&&0<N.length)for(var F=0;F<N.length;F++)null!=N[F].xml?e(null,null,0,0,0,0,N[F]):e(N[F].data,null,0,0,N[F].w,N[F].h,null,"fixed",N[F].title);l=!0}else if("mxfile"==H.documentElement.nodeName){for(var M=H.documentElement.getElementsByTagName("diagram"),F=0;F<M.length;F++){var N=mxUtils.getTextContent(M[F]),K=a.stringToCells(Graph.decompress(N)),O=a.editor.graph.getBoundingBoxFromGeometry(K);e(null,null,0,0,0,0,{xml:N,w:O.width,h:O.height})}l=!0}}catch(Q){}l||(a.spinner.stop(),a.handleError({message:mxResources.get("errorLoadingFile")}))}}catch(Q){}return null}
function k(a){a.dataTransfer.dropEffect=null!=z?"move":"copy";a.stopPropagation();a.preventDefault()}function l(b){b.stopPropagation();b.preventDefault();B=!1;y=m(b);if(null!=z)null!=y&&y<u.children.length?(n.splice(y>z?y-1:y,0,n.splice(z,1)[0]),u.insertBefore(u.children[z],u.children[y])):(n.push(n.splice(z,1)[0]),u.appendChild(u.children[z]));else if(0<b.dataTransfer.files.length)a.importFiles(b.dataTransfer.files,0,0,a.maxImageSize,C(b));else if(0<=mxUtils.indexOf(b.dataTransfer.types,"text/uri-list")){var c=
decodeURIComponent(b.dataTransfer.getData("text/uri-list"));(/(\.jpg)($|\?)/i.test(c)||/(\.png)($|\?)/i.test(c)||/(\.gif)($|\?)/i.test(c)||/(\.svg)($|\?)/i.test(c))&&a.loadImage(c,function(a){e(c,null,0,0,a.width,a.height);u.scrollTop=u.scrollHeight})}b.stopPropagation();b.preventDefault()}var n=[];c=document.createElement("div");c.style.height="100%";var p=document.createElement("div");p.style.whiteSpace="nowrap";p.style.height="40px";c.appendChild(p);mxUtils.write(p,mxResources.get("filename")+
-":");null==d&&(d=a.defaultLibraryName+".xml");var q=document.createElement("input");q.setAttribute("value",d);q.style.marginRight="20px";q.style.marginLeft="10px";q.style.width="500px";null==f||f.isRenamable()||q.setAttribute("disabled","true");this.init=function(){if(null==f||f.isRenamable())q.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?q.select():document.execCommand("selectAll",!1,null)};p.appendChild(q);var u=document.createElement("div");u.style.borderWidth="1px 0px 1px 0px";
+":");null==d&&(d=a.defaultLibraryName+".xml");var q=document.createElement("input");q.setAttribute("value",d);q.style.marginRight="20px";q.style.marginLeft="10px";q.style.width="500px";null==g||g.isRenamable()||q.setAttribute("disabled","true");this.init=function(){if(null==g||g.isRenamable())q.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?q.select():document.execCommand("selectAll",!1,null)};p.appendChild(q);var u=document.createElement("div");u.style.borderWidth="1px 0px 1px 0px";
u.style.borderColor="#d3d3d3";u.style.borderStyle="solid";u.style.marginTop="6px";u.style.overflow="auto";u.style.height="340px";u.style.backgroundPosition="center center";u.style.backgroundRepeat="no-repeat";0==n.length&&Graph.fileSupport&&(u.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')");var t=document.createElement("div");t.style.position="absolute";t.style.width="640px";t.style.top="260px";t.style.textAlign="center";t.style.fontSize="22px";t.style.color="#a0c3ff";mxUtils.write(t,
mxResources.get("dragImagesHere"));c.appendChild(t);var v={},z=null,y=null,x=null;d=function(a){"true"!=mxEvent.getSource(a).getAttribute("contentEditable")&&null!=x&&(x(),x=null,mxEvent.consume(a))};mxEvent.addListener(u,"mousedown",d);mxEvent.addListener(u,"pointerdown",d);mxEvent.addListener(u,"touchstart",d);var A=new mxUrlConverter,B=!1;if(null!=b)for(d=0;d<b.length;d++)p=b[d],e(p.data,null,0,0,p.w,p.h,p,p.aspect,p.title);mxEvent.addListener(u,"dragleave",function(a){t.style.cursor="";for(var b=
-mxEvent.getSource(a);null!=b;){if(b==u||b==t){a.stopPropagation();a.preventDefault();break}b=b.parentNode}});var C=function(b){return function(c,d,k,l,g,f,n,p,m){null!=m&&(/(\.v(dx|sdx?))($|\?)/i.test(m.name)||/(\.vs(x|sx?))($|\?)/i.test(m.name))?a.importVisio(m,mxUtils.bind(this,function(a){e(a,d,k,l,g,f,n,"fixed",mxEvent.isAltDown(b)?null:n.substring(0,n.lastIndexOf(".")).replace(/_/g," "))})):null!=m&&!a.isOffline()&&(new XMLHttpRequest).upload&&a.isRemoteFileFormat(c,m.name)?a.parseFile(m,mxUtils.bind(this,
-function(c){4==c.readyState&&(a.spinner.stop(),200<=c.status&&299>=c.status&&(e(c.responseText,d,k,l,g,f,n,"fixed",mxEvent.isAltDown(b)?null:n.substring(0,n.lastIndexOf(".")).replace(/_/g," ")),u.scrollTop=u.scrollHeight))})):(e(c,d,k,l,g,f,n,"fixed",mxEvent.isAltDown(b)?null:n.substring(0,n.lastIndexOf(".")).replace(/_/g," ")),u.scrollTop=u.scrollHeight)}};mxEvent.addListener(u,"dragover",k);mxEvent.addListener(u,"drop",l);mxEvent.addListener(t,"dragover",k);mxEvent.addListener(t,"drop",l);c.appendChild(u);
-b=document.createElement("div");b.style.textAlign="right";b.style.marginTop="20px";d=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog(!0)});d.setAttribute("id","btnCancel");d.className="geBtn";a.editor.cancelFirst&&b.appendChild(d);"draw.io"!=a.getServiceName()||null==f||f.constructor!=DriveLibrary&&f.constructor!=GitHubLibrary||(p=mxUtils.button(mxResources.get("link"),function(){a.spinner.spin(document.body,mxResources.get("loading"))&&f.getPublicUrl(function(b){a.spinner.stop();
-if(null!=b){var e=a.getSearch("create title mode url drive splash state clibs ui".split(" ")),e=e+((0==e.length?"?":"&")+"splash=0&clibs=U"+encodeURIComponent(b));b=new EmbedDialog(a,window.location.protocol+"//"+window.location.host+"/"+e,null,null,null,null,"Check out the library I made using @drawio");a.showDialog(b.container,440,240,!0);b.init()}else f.constructor==DriveLibrary?a.showError(mxResources.get("error"),mxResources.get("diagramIsNotPublic"),mxResources.get("share"),mxUtils.bind(this,
-function(){a.drive.showPermissions(f.getId())}),null,mxResources.get("ok"),mxUtils.bind(this,function(){})):a.handleError({message:mxResources.get("diagramIsNotPublic")})})}),p.className="geBtn",b.appendChild(p));p=mxUtils.button(mxResources.get("export"),function(){var b=a.createLibraryDataFromImages(n),e=q.value;/(\.xml)$/i.test(e)||(e+=".xml");a.isLocalFileSave()?a.saveLocalFile(b,e,"text/xml",null,null,!0,null,"xml"):(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(e)+"&format=xml&xml="+
-encodeURIComponent(b))).simulate(document,"_blank")});p.setAttribute("id","btnDownload");p.className="geBtn";b.appendChild(p);if(Graph.fileSupport){if(null==a.libDlgFileInputElt){var D=document.createElement("input");D.setAttribute("multiple","multiple");D.setAttribute("type","file");mxEvent.addListener(D,"change",function(b){B=!1;a.importFiles(D.files,0,0,a.maxImageSize,function(a,e,c,d,k,l,g,f,n){null!=D.files&&(C(b)(a,e,c,d,k,l,g,f,n),D.type="",D.type="file",D.value="")});u.scrollTop=u.scrollHeight});
+mxEvent.getSource(a);null!=b;){if(b==u||b==t){a.stopPropagation();a.preventDefault();break}b=b.parentNode}});var C=function(b){return function(c,d,k,l,f,g,n,p,q){null!=q&&(/(\.v(dx|sdx?))($|\?)/i.test(q.name)||/(\.vs(x|sx?))($|\?)/i.test(q.name))?a.importVisio(q,mxUtils.bind(this,function(a){e(a,d,k,l,f,g,n,"fixed",mxEvent.isAltDown(b)?null:n.substring(0,n.lastIndexOf(".")).replace(/_/g," "))})):null!=q&&!a.isOffline()&&(new XMLHttpRequest).upload&&a.isRemoteFileFormat(c,q.name)?a.parseFile(q,mxUtils.bind(this,
+function(c){4==c.readyState&&(a.spinner.stop(),200<=c.status&&299>=c.status&&(e(c.responseText,d,k,l,f,g,n,"fixed",mxEvent.isAltDown(b)?null:n.substring(0,n.lastIndexOf(".")).replace(/_/g," ")),u.scrollTop=u.scrollHeight))})):(e(c,d,k,l,f,g,n,"fixed",mxEvent.isAltDown(b)?null:n.substring(0,n.lastIndexOf(".")).replace(/_/g," ")),u.scrollTop=u.scrollHeight)}};mxEvent.addListener(u,"dragover",k);mxEvent.addListener(u,"drop",l);mxEvent.addListener(t,"dragover",k);mxEvent.addListener(t,"drop",l);c.appendChild(u);
+b=document.createElement("div");b.style.textAlign="right";b.style.marginTop="20px";d=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog(!0)});d.setAttribute("id","btnCancel");d.className="geBtn";a.editor.cancelFirst&&b.appendChild(d);"draw.io"!=a.getServiceName()||null==g||g.constructor!=DriveLibrary&&g.constructor!=GitHubLibrary||(p=mxUtils.button(mxResources.get("link"),function(){a.spinner.spin(document.body,mxResources.get("loading"))&&g.getPublicUrl(function(b){a.spinner.stop();
+if(null!=b){var e=a.getSearch("create title mode url drive splash state clibs ui".split(" ")),e=e+((0==e.length?"?":"&")+"splash=0&clibs=U"+encodeURIComponent(b));b=new EmbedDialog(a,window.location.protocol+"//"+window.location.host+"/"+e,null,null,null,null,"Check out the library I made using @drawio");a.showDialog(b.container,440,240,!0);b.init()}else g.constructor==DriveLibrary?a.showError(mxResources.get("error"),mxResources.get("diagramIsNotPublic"),mxResources.get("share"),mxUtils.bind(this,
+function(){a.drive.showPermissions(g.getId())}),null,mxResources.get("ok"),mxUtils.bind(this,function(){})):a.handleError({message:mxResources.get("diagramIsNotPublic")})})}),p.className="geBtn",b.appendChild(p));p=mxUtils.button(mxResources.get("export"),function(){var b=a.createLibraryDataFromImages(n),e=q.value;/(\.xml)$/i.test(e)||(e+=".xml");a.isLocalFileSave()?a.saveLocalFile(b,e,"text/xml",null,null,!0,null,"xml"):(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(e)+"&format=xml&xml="+
+encodeURIComponent(b))).simulate(document,"_blank")});p.setAttribute("id","btnDownload");p.className="geBtn";b.appendChild(p);if(Graph.fileSupport){if(null==a.libDlgFileInputElt){var D=document.createElement("input");D.setAttribute("multiple","multiple");D.setAttribute("type","file");mxEvent.addListener(D,"change",function(b){B=!1;a.importFiles(D.files,0,0,a.maxImageSize,function(a,e,c,d,k,l,f,g,n){null!=D.files&&(C(b)(a,e,c,d,k,l,f,g,n),D.type="",D.type="file",D.value="")});u.scrollTop=u.scrollHeight});
D.style.display="none";document.body.appendChild(D);a.libDlgFileInputElt=D}p=mxUtils.button(mxResources.get("import"),function(){null!=x&&(x(),x=null);a.libDlgFileInputElt.click()});p.setAttribute("id","btnAddImage");p.className="geBtn";b.appendChild(p)}p=mxUtils.button(mxResources.get("addImages"),function(){null!=x&&(x(),x=null);a.showImageDialog(mxResources.get("addImageUrl"),"",function(a,b,c){B=!1;if(null!=a){if("data:image/"==a.substring(0,11)){var d=a.indexOf(",");0<d&&(a=a.substring(0,d)+
-";base64,"+a.substring(d+1))}e(a,null,0,0,b,c);u.scrollTop=u.scrollHeight}})});p.setAttribute("id","btnAddImageUrl");p.className="geBtn";b.appendChild(p);this.saveBtnClickHandler=function(b,e,c,d){a.saveLibrary(b,e,c,d)};p=mxUtils.button(mxResources.get("save"),mxUtils.bind(this,function(){null!=x&&(x(),x=null);this.saveBtnClickHandler(q.value,n,f,g)}));p.setAttribute("id","btnSave");p.className="geBtn gePrimaryBtn";b.appendChild(p);a.editor.cancelFirst||b.appendChild(d);c.appendChild(b);this.container=
-c},EditShapeDialog=function(a,d,c,b,f){b=null!=b?b:300;f=null!=f?f:120;var g,m,e=document.createElement("table"),k=document.createElement("tbody");e.style.cellPadding="4px";g=document.createElement("tr");m=document.createElement("td");m.setAttribute("colspan","2");m.style.fontSize="10pt";mxUtils.write(m,c);g.appendChild(m);k.appendChild(g);g=document.createElement("tr");m=document.createElement("td");var l=document.createElement("textarea");l.style.outline="none";l.style.resize="none";l.style.width=
-b-200+"px";l.style.height=f+"px";this.textarea=l;this.init=function(){l.focus();l.scrollTop=0};m.appendChild(l);g.appendChild(m);m=document.createElement("td");c=document.createElement("div");c.style.position="relative";c.style.border="1px solid gray";c.style.top="6px";c.style.width="200px";c.style.height=f+4+"px";c.style.overflow="hidden";c.style.marginBottom="16px";mxEvent.disableContextMenu(c);m.appendChild(c);var n=new Graph(c);n.setEnabled(!1);var p=a.editor.graph.cloneCell(d);n.addCells([p]);
-c=n.view.getState(p);var q="";null!=c.shape&&null!=c.shape.stencil&&(q=mxUtils.getPrettyXml(c.shape.stencil.desc));mxUtils.write(l,q||"");c=n.getGraphBounds();f=Math.min(160/c.width,(f-40)/c.height);n.view.scaleAndTranslate(f,20/f-c.x,20/f-c.y);g.appendChild(m);k.appendChild(g);g=document.createElement("tr");m=document.createElement("td");m.setAttribute("colspan","2");m.style.paddingTop="2px";m.style.whiteSpace="nowrap";m.setAttribute("align","right");a.isOffline()||(f=mxUtils.button(mxResources.get("help"),
-function(){a.openLink("https://www.diagrams.net/doc/faq/shape-complex-create-edit")}),f.className="geBtn",m.appendChild(f));f=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});f.className="geBtn";a.editor.cancelFirst&&m.appendChild(f);var u=function(b,e,c){var d=l.value,k=mxUtils.parseXml(d),d=mxUtils.getPrettyXml(k.documentElement),k=k.documentElement.getElementsByTagName("parsererror");if(null!=k&&0<k.length)a.showError(mxResources.get("error"),mxResources.get("containsValidationErrors"),
-mxResources.get("ok"));else if(c&&a.hideDialog(),k=!b.model.contains(e),!c||k||d!=q){d=Graph.compress(d);b.getModel().beginUpdate();try{if(k){var g=a.editor.graph.getFreeInsertPoint();e.geometry.x=g.x;e.geometry.y=g.y;b.addCell(e)}b.setCellStyles(mxConstants.STYLE_SHAPE,"stencil("+d+")",[e])}catch(B){throw B;}finally{b.getModel().endUpdate()}k&&(b.setSelectionCell(e),b.scrollCellToVisible(e))}};c=mxUtils.button(mxResources.get("preview"),function(){u(n,p,!1)});c.className="geBtn";m.appendChild(c);
-c=mxUtils.button(mxResources.get("apply"),function(){u(a.editor.graph,d,!0)});c.className="geBtn gePrimaryBtn";m.appendChild(c);a.editor.cancelFirst||m.appendChild(f);g.appendChild(m);k.appendChild(g);e.appendChild(k);this.container=e},CustomDialog=function(a,d,c,b,f,g,m,e,k,l){var n=document.createElement("div");n.appendChild(d);d=document.createElement("div");d.style.marginTop="16px";d.style.textAlign="center";null!=m&&d.appendChild(m);a.isOffline()||null==g||(m=mxUtils.button(mxResources.get("help"),
-function(){a.openLink(g)}),m.className="geBtn",d.appendChild(m));k=mxUtils.button(k||mxResources.get("cancel"),function(){a.hideDialog();null!=b&&b()});k.className="geBtn";e&&(k.style.display="none");a.editor.cancelFirst&&d.appendChild(k);f=mxUtils.button(f||mxResources.get("ok"),mxUtils.bind(this,function(){l||a.hideDialog(null,null,this.container);if(null!=c){var b=c();if("string"===typeof b){a.showError(mxResources.get("error"),b);return}}l&&a.hideDialog(null,null,this.container)}));d.appendChild(f);
-f.className="geBtn gePrimaryBtn";a.editor.cancelFirst||d.appendChild(k);n.appendChild(d);this.cancelBtn=k;this.okButton=f;this.container=n},TemplatesDialog=function(a,d,c,b,f,g,m,e,k,l,n,p,q,u,t){function v(a){ka.innerHTML=mxUtils.htmlEntities(a);ka.style.display="block";setTimeout(function(){ka.style.display="none"},4E3)}function z(){null!=U&&(U.style.fontWeight="normal",U.style.textDecoration="none",P=U,U=null)}function y(a,b,e,c,d,k,l){if(-1<a.className.indexOf("geTempDlgRadioBtnActive"))return!1;
-a.className+=" geTempDlgRadioBtnActive";H.querySelector(".geTempDlgRadioBtn[data-id="+c+"]").className="geTempDlgRadioBtn "+(l?"geTempDlgRadioBtnLarge":"geTempDlgRadioBtnSmall");H.querySelector("."+b).src="/images/"+e+"-sel.svg";H.querySelector("."+d).src="/images/"+k+".svg";return!0}function x(b,e,c,d){function l(b,e){if(null==f){var c=b,c=/^https?:\/\//.test(c)&&!a.editor.isCorsEnabledForUrl(c)?PROXY_URL+"?url="+encodeURIComponent(c):TEMPLATE_PATH+"/"+c;mxUtils.get(c,mxUtils.bind(this,function(a){200<=
-a.getStatus()&&299>=a.getStatus()&&(f=a.getText());e(f)}))}else e(f)}function g(c,d,k){if(null!=c&&mxUtils.isAncestorNode(document.body,e)&&(c=mxUtils.parseXml(c),c=Editor.extractGraphModel(c.documentElement,!0),null!=c)){"mxfile"==c.nodeName&&(c=Editor.parseDiagramNode(c.getElementsByTagName("diagram")[0]));var l=new mxCodec(c.ownerDocument),g=new mxGraphModel;l.decode(c,g);c=g.root.getChildAt(0).children||[];a.sidebar.createTooltip(e,c,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!=b.title?mxResources.get(b.title,null,b.title):null,!0,new mxPoint(d,k),!0,null,!0);var f=document.createElement("div");f.className="geTempDlgDialogMask";H.appendChild(f);var n=a.sidebar.hideTooltip;a.sidebar.hideTooltip=function(){f&&(H.removeChild(f),f=null,n.apply(this,arguments),a.sidebar.hideTooltip=n)};mxEvent.addListener(f,"click",function(){a.sidebar.hideTooltip()})}}
-var f=null;if(ia||a.sidebar.currentElt==e)a.sidebar.hideTooltip();else{var n=function(b){ia&&a.sidebar.currentElt==e&&g(b,mxEvent.getClientX(d),mxEvent.getClientY(d));ia=!1;c.src="/images/icon-search.svg"};a.sidebar.hideTooltip();a.sidebar.currentElt=e;ia=!0;c.src="/images/aui-wait.gif";b.isExt?k(b,n,function(){v(mxResources.get("cantLoadPrev"));ia=!1;c.src="/images/icon-search.svg"}):l(b.url,n)}}function A(a,b,e){if(null!=W){for(var c=W.className.split(" "),d=0;d<c.length;d++)if(-1<c[d].indexOf("Active")){c.splice(d,
-1);break}W.className=c.join(" ")}null!=a?(W=a,W.className+=" "+b,ha=e,da.className="geTempDlgCreateBtn"):(ha=W=null,da.className="geTempDlgCreateBtn geTempDlgBtnDisabled")}function B(b,e){if(null!=ha){var c=function(b){m.isExternal?k(m,function(a){g(a,b)},f):m.url?mxUtils.get(TEMPLATE_PATH+"/"+m.url,mxUtils.bind(this,function(a){200<=a.getStatus()&&299>=a.getStatus()?g(a.getText(),b):f()})):g(a.emptyDiagramXml,b)},g=function(b,c){t||a.hideDialog(!0);d(b,c,m,e)},f=function(){v(mxResources.get("cannotLoad"));
-n()},n=function(){ha=m;da.className="geTempDlgCreateBtn";e&&(qa.className="geTempDlgOpenBtn")},m=ha;ha=null;"boolean"!==typeof e&&(e=m.isExternal&&p);if(1==b)l(m.url,m);else if(e)qa.className="geTempDlgOpenBtn geTempDlgBtnDisabled geTempDlgBtnBusy",c();else{da.className="geTempDlgCreateBtn geTempDlgBtnDisabled geTempDlgBtnBusy";var q=null==a.mode||a.mode==App.MODE_GOOGLE||a.mode==App.MODE_BROWSER?mxResources.get("diagramName"):mxResources.get("filename"),q=new FilenameDialog(a,a.defaultFilename+".drawio",
-mxResources.get("ok"),c,q,function(a){var b=null!=a&&0<a.length;return b&&t?(c(a),!1):b},null,null,null,n,u?null:[]);a.showDialog(q.container,350,80,!0,!0);q.init()}}}function C(a){da.innerHTML=mxUtils.htmlEntities(mxResources.get(Q||a?"create":"copy"));a=a?"none":"";p&&(qa.style.display=a);for(var b=H.querySelectorAll(".geTempDlgLinkToDiagram"),e=0;e<b.length;e++)b[e].style.display=a}function D(b,e,c,d,k){k||(T.innerHTML="",A(),Y=b,ga=d);var l=null;if(c){l=document.createElement("table");l.className=
-"geTempDlgDiagramsListGrid";var g=document.createElement("tr"),f=document.createElement("th");f.style.width="50%";f.innerHTML=mxUtils.htmlEntities(mxResources.get("diagram"));g.appendChild(f);f=document.createElement("th");f.style.width="25%";f.innerHTML=mxUtils.htmlEntities(mxResources.get("changedBy"));g.appendChild(f);f=document.createElement("th");f.style.width="25%";f.innerHTML=mxUtils.htmlEntities(mxResources.get("lastModifiedOn"));g.appendChild(f);l.appendChild(g);T.appendChild(l)}for(g=0;g<
-b.length;g++){b[g].isExternal=!e;var n=b[g].url,p=(f=mxUtils.htmlEntities(e?mxResources.get(b[g].title,null,b[g].title):b[g].title))||b[g].url,m=b[g].imgUrl,q=mxUtils.htmlEntities(b[g].changedBy||""),I="";b[g].lastModifiedOn&&(I=a.timeSince(new Date(b[g].lastModifiedOn)),null==I&&(I=mxResources.get("lessThanAMinute")),I=mxUtils.htmlEntities(mxResources.get("timeAgo",[I],"{1} ago")));m||(m=TEMPLATE_PATH+"/"+n.substring(0,n.length-4)+".png");n=c?50:15;null!=f&&f.length>n&&(f=f.substring(0,n)+"&hellip;");
-if(c){var u=document.createElement("tr"),m=document.createElement("td"),t=document.createElement("img");t.src="/images/icon-search.svg";t.className="geTempDlgDiagramListPreviewBtn";t.setAttribute("title",mxResources.get("preview"));k||m.appendChild(t);p=document.createElement("span");p.className="geTempDlgDiagramTitle";p.innerHTML=f;m.appendChild(p);u.appendChild(m);m=document.createElement("td");m.innerHTML=q;u.appendChild(m);m=document.createElement("td");m.innerHTML=I;u.appendChild(m);l.appendChild(u);
-null==W&&(C(e),A(u,"geTempDlgDiagramsListGridActive",b[g]));(function(a,b,c){mxEvent.addListener(u,"click",function(){W!=b&&(C(e),A(b,"geTempDlgDiagramsListGridActive",a))});mxEvent.addListener(u,"dblclick",B);mxEvent.addListener(t,"click",function(e){x(a,b,c,e)})})(b[g],u,t)}else{var H=document.createElement("div");H.className="geTempDlgDiagramTile";H.setAttribute("title",p);null==W&&(C(e),A(H,"geTempDlgDiagramTileActive",b[g]));q=document.createElement("div");q.className="geTempDlgDiagramTileImg geTempDlgDiagramTileImgLoading";
-var N=document.createElement("img");N.style.display="none";(function(a,b,e){N.onload=function(){b.className="geTempDlgDiagramTileImg";a.style.display=""};N.onerror=function(){this.src!=e?this.src=e:b.className="geTempDlgDiagramTileImg geTempDlgDiagramTileImgError"}})(N,q,m?m.replace(".drawio.xml","").replace(".drawio","").replace(".xml",""):"");N.src=m;q.appendChild(N);H.appendChild(q);q=document.createElement("div");q.className="geTempDlgDiagramTileLbl";q.innerHTML=null!=f?f:"";H.appendChild(q);
-t=document.createElement("img");t.src="/images/icon-search.svg";t.className="geTempDlgDiagramPreviewBtn";t.setAttribute("title",mxResources.get("preview"));k||H.appendChild(t);(function(a,b,c){mxEvent.addListener(H,"click",function(){W!=b&&(C(e),A(b,"geTempDlgDiagramTileActive",a))});mxEvent.addListener(H,"dblclick",B);mxEvent.addListener(t,"click",function(e){x(a,b,c,e)})})(b[g],H,t);T.appendChild(H)}}for(var z in d)b=d[z],0<b.length&&(k=document.createElement("div"),k.className="geTempDlgImportCat",
-k.innerHTML=mxResources.get(z,null,z),T.appendChild(k),D(b,e,c,null,!0))}function G(a,b){ca.innerHTML="";A();for(var e=Math.floor(ca.offsetWidth/150)-1,c=!b&&a.length>e?e:a.length,d=0;d<c;d++){var k=a[d];k.isCategory=!0;var l=document.createElement("div"),g=mxResources.get(k.title);null==g&&(g=k.title.substring(0,1).toUpperCase()+k.title.substring(1));l.className="geTempDlgNewDiagramCatItem";l.setAttribute("title",g);g=mxUtils.htmlEntities(g);15<g.length&&(g=g.substring(0,15)+"&hellip;");null==W&&
-(C(!0),A(l,"geTempDlgNewDiagramCatItemActive",k));var f=document.createElement("div");f.className="geTempDlgNewDiagramCatItemImg";var n=document.createElement("img");n.src=NEW_DIAGRAM_CATS_PATH+"/"+k.img;f.appendChild(n);l.appendChild(f);f=document.createElement("div");f.className="geTempDlgNewDiagramCatItemLbl";f.innerHTML=g;l.appendChild(f);ca.appendChild(l);(function(a,b){mxEvent.addListener(l,"click",function(){W!=b&&(C(!0),A(b,"geTempDlgNewDiagramCatItemActive",a))});mxEvent.addListener(l,"dblclick",
-B)})(k,l)}l=document.createElement("div");l.className="geTempDlgNewDiagramCatItem";g=mxResources.get("showAllTemps");l.setAttribute("title",g);f=document.createElement("div");f.className="geTempDlgNewDiagramCatItemImg";f.innerHTML="...";f.style.fontSize="32px";l.appendChild(f);f=document.createElement("div");f.className="geTempDlgNewDiagramCatItemLbl";f.innerHTML=g;l.appendChild(f);ca.appendChild(l);mxEvent.addListener(l,"click",function(){function a(){var e=b.querySelector(".geTemplateDrawioCatLink");
+";base64,"+a.substring(d+1))}e(a,null,0,0,b,c);u.scrollTop=u.scrollHeight}})});p.setAttribute("id","btnAddImageUrl");p.className="geBtn";b.appendChild(p);this.saveBtnClickHandler=function(b,e,c,d){a.saveLibrary(b,e,c,d)};p=mxUtils.button(mxResources.get("save"),mxUtils.bind(this,function(){null!=x&&(x(),x=null);this.saveBtnClickHandler(q.value,n,g,f)}));p.setAttribute("id","btnSave");p.className="geBtn gePrimaryBtn";b.appendChild(p);a.editor.cancelFirst||b.appendChild(d);c.appendChild(b);this.container=
+c},EditShapeDialog=function(a,d,c,b,g){b=null!=b?b:300;g=null!=g?g:120;var f,m,e=document.createElement("table"),k=document.createElement("tbody");e.style.cellPadding="4px";f=document.createElement("tr");m=document.createElement("td");m.setAttribute("colspan","2");m.style.fontSize="10pt";mxUtils.write(m,c);f.appendChild(m);k.appendChild(f);f=document.createElement("tr");m=document.createElement("td");var l=document.createElement("textarea");l.style.outline="none";l.style.resize="none";l.style.width=
+b-200+"px";l.style.height=g+"px";this.textarea=l;this.init=function(){l.focus();l.scrollTop=0};m.appendChild(l);f.appendChild(m);m=document.createElement("td");c=document.createElement("div");c.style.position="relative";c.style.border="1px solid gray";c.style.top="6px";c.style.width="200px";c.style.height=g+4+"px";c.style.overflow="hidden";c.style.marginBottom="16px";mxEvent.disableContextMenu(c);m.appendChild(c);var n=new Graph(c);n.setEnabled(!1);var p=a.editor.graph.cloneCell(d);n.addCells([p]);
+c=n.view.getState(p);var q="";null!=c.shape&&null!=c.shape.stencil&&(q=mxUtils.getPrettyXml(c.shape.stencil.desc));mxUtils.write(l,q||"");c=n.getGraphBounds();g=Math.min(160/c.width,(g-40)/c.height);n.view.scaleAndTranslate(g,20/g-c.x,20/g-c.y);f.appendChild(m);k.appendChild(f);f=document.createElement("tr");m=document.createElement("td");m.setAttribute("colspan","2");m.style.paddingTop="2px";m.style.whiteSpace="nowrap";m.setAttribute("align","right");a.isOffline()||(g=mxUtils.button(mxResources.get("help"),
+function(){a.openLink("https://www.diagrams.net/doc/faq/shape-complex-create-edit")}),g.className="geBtn",m.appendChild(g));g=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});g.className="geBtn";a.editor.cancelFirst&&m.appendChild(g);var u=function(b,e,c){var d=l.value,k=mxUtils.parseXml(d),d=mxUtils.getPrettyXml(k.documentElement),k=k.documentElement.getElementsByTagName("parsererror");if(null!=k&&0<k.length)a.showError(mxResources.get("error"),mxResources.get("containsValidationErrors"),
+mxResources.get("ok"));else if(c&&a.hideDialog(),k=!b.model.contains(e),!c||k||d!=q){d=Graph.compress(d);b.getModel().beginUpdate();try{if(k){var f=a.editor.graph.getFreeInsertPoint();e.geometry.x=f.x;e.geometry.y=f.y;b.addCell(e)}b.setCellStyles(mxConstants.STYLE_SHAPE,"stencil("+d+")",[e])}catch(B){throw B;}finally{b.getModel().endUpdate()}k&&(b.setSelectionCell(e),b.scrollCellToVisible(e))}};c=mxUtils.button(mxResources.get("preview"),function(){u(n,p,!1)});c.className="geBtn";m.appendChild(c);
+c=mxUtils.button(mxResources.get("apply"),function(){u(a.editor.graph,d,!0)});c.className="geBtn gePrimaryBtn";m.appendChild(c);a.editor.cancelFirst||m.appendChild(g);f.appendChild(m);k.appendChild(f);e.appendChild(k);this.container=e},CustomDialog=function(a,d,c,b,g,f,m,e,k,l){var n=document.createElement("div");n.appendChild(d);d=document.createElement("div");d.style.marginTop="16px";d.style.textAlign="center";null!=m&&d.appendChild(m);a.isOffline()||null==f||(m=mxUtils.button(mxResources.get("help"),
+function(){a.openLink(f)}),m.className="geBtn",d.appendChild(m));k=mxUtils.button(k||mxResources.get("cancel"),function(){a.hideDialog();null!=b&&b()});k.className="geBtn";e&&(k.style.display="none");a.editor.cancelFirst&&d.appendChild(k);g=mxUtils.button(g||mxResources.get("ok"),mxUtils.bind(this,function(){l||a.hideDialog(null,null,this.container);if(null!=c){var b=c();if("string"===typeof b){a.showError(mxResources.get("error"),b);return}}l&&a.hideDialog(null,null,this.container)}));d.appendChild(g);
+g.className="geBtn gePrimaryBtn";a.editor.cancelFirst||d.appendChild(k);n.appendChild(d);this.cancelBtn=k;this.okButton=g;this.container=n},TemplatesDialog=function(a,d,c,b,g,f,m,e,k,l,n,p,q,u,t){function v(a){ka.innerHTML=mxUtils.htmlEntities(a);ka.style.display="block";setTimeout(function(){ka.style.display="none"},4E3)}function z(){null!=U&&(U.style.fontWeight="normal",U.style.textDecoration="none",P=U,U=null)}function y(a,b,e,c,d,k,l){if(-1<a.className.indexOf("geTempDlgRadioBtnActive"))return!1;
+a.className+=" geTempDlgRadioBtnActive";H.querySelector(".geTempDlgRadioBtn[data-id="+c+"]").className="geTempDlgRadioBtn "+(l?"geTempDlgRadioBtnLarge":"geTempDlgRadioBtnSmall");H.querySelector("."+b).src="/images/"+e+"-sel.svg";H.querySelector("."+d).src="/images/"+k+".svg";return!0}function x(b,e,c,d){function l(b,e){if(null==g){var c=b,c=/^https?:\/\//.test(c)&&!a.editor.isCorsEnabledForUrl(c)?PROXY_URL+"?url="+encodeURIComponent(c):TEMPLATE_PATH+"/"+c;mxUtils.get(c,mxUtils.bind(this,function(a){200<=
+a.getStatus()&&299>=a.getStatus()&&(g=a.getText());e(g)}))}else e(g)}function f(c,d,k){if(null!=c&&mxUtils.isAncestorNode(document.body,e)&&(c=mxUtils.parseXml(c),c=Editor.extractGraphModel(c.documentElement,!0),null!=c)){"mxfile"==c.nodeName&&(c=Editor.parseDiagramNode(c.getElementsByTagName("diagram")[0]));var l=new mxCodec(c.ownerDocument),f=new mxGraphModel;l.decode(c,f);c=f.root.getChildAt(0).children||[];a.sidebar.createTooltip(e,c,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!=b.title?mxResources.get(b.title,null,b.title):null,!0,new mxPoint(d,k),!0,null,!0);var g=document.createElement("div");g.className="geTempDlgDialogMask";H.appendChild(g);var n=a.sidebar.hideTooltip;a.sidebar.hideTooltip=function(){g&&(H.removeChild(g),g=null,n.apply(this,arguments),a.sidebar.hideTooltip=n)};mxEvent.addListener(g,"click",function(){a.sidebar.hideTooltip()})}}
+var g=null;if(ia||a.sidebar.currentElt==e)a.sidebar.hideTooltip();else{var n=function(b){ia&&a.sidebar.currentElt==e&&f(b,mxEvent.getClientX(d),mxEvent.getClientY(d));ia=!1;c.src="/images/icon-search.svg"};a.sidebar.hideTooltip();a.sidebar.currentElt=e;ia=!0;c.src="/images/aui-wait.gif";b.isExt?k(b,n,function(){v(mxResources.get("cantLoadPrev"));ia=!1;c.src="/images/icon-search.svg"}):l(b.url,n)}}function A(a,b,e){if(null!=W){for(var c=W.className.split(" "),d=0;d<c.length;d++)if(-1<c[d].indexOf("Active")){c.splice(d,
+1);break}W.className=c.join(" ")}null!=a?(W=a,W.className+=" "+b,ha=e,da.className="geTempDlgCreateBtn"):(ha=W=null,da.className="geTempDlgCreateBtn geTempDlgBtnDisabled")}function B(b,e){if(null!=ha){var c=function(b){q.isExternal?k(q,function(a){f(a,b)},g):q.url?mxUtils.get(TEMPLATE_PATH+"/"+q.url,mxUtils.bind(this,function(a){200<=a.getStatus()&&299>=a.getStatus()?f(a.getText(),b):g()})):f(a.emptyDiagramXml,b)},f=function(b,c){t||a.hideDialog(!0);d(b,c,q,e)},g=function(){v(mxResources.get("cannotLoad"));
+n()},n=function(){ha=q;da.className="geTempDlgCreateBtn";e&&(qa.className="geTempDlgOpenBtn")},q=ha;ha=null;"boolean"!==typeof e&&(e=q.isExternal&&p);if(1==b)l(q.url,q);else if(e)qa.className="geTempDlgOpenBtn geTempDlgBtnDisabled geTempDlgBtnBusy",c();else{da.className="geTempDlgCreateBtn geTempDlgBtnDisabled geTempDlgBtnBusy";var m=null==a.mode||a.mode==App.MODE_GOOGLE||a.mode==App.MODE_BROWSER?mxResources.get("diagramName"):mxResources.get("filename"),m=new FilenameDialog(a,a.defaultFilename+".drawio",
+mxResources.get("ok"),c,m,function(a){var b=null!=a&&0<a.length;return b&&t?(c(a),!1):b},null,null,null,n,u?null:[]);a.showDialog(m.container,350,80,!0,!0);m.init()}}}function C(a){da.innerHTML=mxUtils.htmlEntities(mxResources.get(Q||a?"create":"copy"));a=a?"none":"";p&&(qa.style.display=a);for(var b=H.querySelectorAll(".geTempDlgLinkToDiagram"),e=0;e<b.length;e++)b[e].style.display=a}function D(b,e,c,d,k){k||(T.innerHTML="",A(),Y=b,ga=d);var l=null;if(c){l=document.createElement("table");l.className=
+"geTempDlgDiagramsListGrid";var f=document.createElement("tr"),g=document.createElement("th");g.style.width="50%";g.innerHTML=mxUtils.htmlEntities(mxResources.get("diagram"));f.appendChild(g);g=document.createElement("th");g.style.width="25%";g.innerHTML=mxUtils.htmlEntities(mxResources.get("changedBy"));f.appendChild(g);g=document.createElement("th");g.style.width="25%";g.innerHTML=mxUtils.htmlEntities(mxResources.get("lastModifiedOn"));f.appendChild(g);l.appendChild(f);T.appendChild(l)}for(f=0;f<
+b.length;f++){b[f].isExternal=!e;var n=b[f].url,p=(g=mxUtils.htmlEntities(e?mxResources.get(b[f].title,null,b[f].title):b[f].title))||b[f].url,q=b[f].imgUrl,m=mxUtils.htmlEntities(b[f].changedBy||""),I="";b[f].lastModifiedOn&&(I=a.timeSince(new Date(b[f].lastModifiedOn)),null==I&&(I=mxResources.get("lessThanAMinute")),I=mxUtils.htmlEntities(mxResources.get("timeAgo",[I],"{1} ago")));q||(q=TEMPLATE_PATH+"/"+n.substring(0,n.length-4)+".png");n=c?50:15;null!=g&&g.length>n&&(g=g.substring(0,n)+"&hellip;");
+if(c){var u=document.createElement("tr"),q=document.createElement("td"),t=document.createElement("img");t.src="/images/icon-search.svg";t.className="geTempDlgDiagramListPreviewBtn";t.setAttribute("title",mxResources.get("preview"));k||q.appendChild(t);p=document.createElement("span");p.className="geTempDlgDiagramTitle";p.innerHTML=g;q.appendChild(p);u.appendChild(q);q=document.createElement("td");q.innerHTML=m;u.appendChild(q);q=document.createElement("td");q.innerHTML=I;u.appendChild(q);l.appendChild(u);
+null==W&&(C(e),A(u,"geTempDlgDiagramsListGridActive",b[f]));(function(a,b,c){mxEvent.addListener(u,"click",function(){W!=b&&(C(e),A(b,"geTempDlgDiagramsListGridActive",a))});mxEvent.addListener(u,"dblclick",B);mxEvent.addListener(t,"click",function(e){x(a,b,c,e)})})(b[f],u,t)}else{var H=document.createElement("div");H.className="geTempDlgDiagramTile";H.setAttribute("title",p);null==W&&(C(e),A(H,"geTempDlgDiagramTileActive",b[f]));m=document.createElement("div");m.className="geTempDlgDiagramTileImg geTempDlgDiagramTileImgLoading";
+var z=document.createElement("img");z.style.display="none";(function(a,b,e){z.onload=function(){b.className="geTempDlgDiagramTileImg";a.style.display=""};z.onerror=function(){this.src!=e?this.src=e:b.className="geTempDlgDiagramTileImg geTempDlgDiagramTileImgError"}})(z,m,q?q.replace(".drawio.xml","").replace(".drawio","").replace(".xml",""):"");z.src=q;m.appendChild(z);H.appendChild(m);m=document.createElement("div");m.className="geTempDlgDiagramTileLbl";m.innerHTML=null!=g?g:"";H.appendChild(m);
+t=document.createElement("img");t.src="/images/icon-search.svg";t.className="geTempDlgDiagramPreviewBtn";t.setAttribute("title",mxResources.get("preview"));k||H.appendChild(t);(function(a,b,c){mxEvent.addListener(H,"click",function(){W!=b&&(C(e),A(b,"geTempDlgDiagramTileActive",a))});mxEvent.addListener(H,"dblclick",B);mxEvent.addListener(t,"click",function(e){x(a,b,c,e)})})(b[f],H,t);T.appendChild(H)}}for(var N in d)b=d[N],0<b.length&&(k=document.createElement("div"),k.className="geTempDlgImportCat",
+k.innerHTML=mxResources.get(N,null,N),T.appendChild(k),D(b,e,c,null,!0))}function G(a,b){ca.innerHTML="";A();for(var e=Math.floor(ca.offsetWidth/150)-1,c=!b&&a.length>e?e:a.length,d=0;d<c;d++){var k=a[d];k.isCategory=!0;var l=document.createElement("div"),f=mxResources.get(k.title);null==f&&(f=k.title.substring(0,1).toUpperCase()+k.title.substring(1));l.className="geTempDlgNewDiagramCatItem";l.setAttribute("title",f);f=mxUtils.htmlEntities(f);15<f.length&&(f=f.substring(0,15)+"&hellip;");null==W&&
+(C(!0),A(l,"geTempDlgNewDiagramCatItemActive",k));var g=document.createElement("div");g.className="geTempDlgNewDiagramCatItemImg";var n=document.createElement("img");n.src=NEW_DIAGRAM_CATS_PATH+"/"+k.img;g.appendChild(n);l.appendChild(g);g=document.createElement("div");g.className="geTempDlgNewDiagramCatItemLbl";g.innerHTML=f;l.appendChild(g);ca.appendChild(l);(function(a,b){mxEvent.addListener(l,"click",function(){W!=b&&(C(!0),A(b,"geTempDlgNewDiagramCatItemActive",a))});mxEvent.addListener(l,"dblclick",
+B)})(k,l)}l=document.createElement("div");l.className="geTempDlgNewDiagramCatItem";f=mxResources.get("showAllTemps");l.setAttribute("title",f);g=document.createElement("div");g.className="geTempDlgNewDiagramCatItemImg";g.innerHTML="...";g.style.fontSize="32px";l.appendChild(g);g=document.createElement("div");g.className="geTempDlgNewDiagramCatItemLbl";g.innerHTML=f;l.appendChild(g);ca.appendChild(l);mxEvent.addListener(l,"click",function(){function a(){var e=b.querySelector(".geTemplateDrawioCatLink");
null!=e?e.click():setTimeout(a,200)}Q=!0;var b=H.querySelector(".geTemplatesList");b.style.display="block";na.style.width="";oa.style.display="";oa.value="";ba=null;a()});ma.style.display=a.length<=e?"none":""}function E(a,b,e){function c(a,b){var e=mxResources.get(a);null==e&&(e=a.substring(0,1).toUpperCase()+a.substring(1));var c=e+" ("+b.length+")",d=e=mxUtils.htmlEntities(e);15<e.length&&(e=e.substring(0,15)+"&hellip;");return{lbl:e+" ("+b.length+")",fullLbl:c,lblOnly:d}}function d(e,c,d,k,l){mxEvent.addListener(d,
"click",function(){U!=d&&(null!=U?(U.style.fontWeight="normal",U.style.textDecoration="none"):(aa.style.display="none",S.style.minHeight="100%"),U=d,U.style.fontWeight="bold",U.style.textDecoration="underline",na.scrollTop=0,L&&(V=!0),fa.innerHTML=c,ja.style.display="none",D(l?b[e]:k?ta[e][k]:a[e],l?!1:!0))})}var k=H.querySelector(".geTemplatesList");if(0<e){e=document.createElement("div");e.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;margin-top: 10px;";
mxUtils.write(e,mxResources.get("custom"));k.appendChild(e);for(var l in b){e=document.createElement("div");var f=b[l],f=c(l,f);e.className="geTemplateCatLink";e.setAttribute("title",f.fullLbl);e.innerHTML=f.lbl;k.appendChild(e);d(l,f.lblOnly,e,null,!0)}e=document.createElement("div");e.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;margin-top: 10px;";mxUtils.write(e,"draw.io");k.appendChild(e)}for(l in a){var g=ta[l],n=e=document.createElement(g?"ul":
-"div"),f=a[l],f=c(l,f);if(null!=g){var p=document.createElement("li"),m=document.createElement("div");m.className="geTempTreeCaret geTemplateCatLink geTemplateDrawioCatLink";m.style.padding="0";m.setAttribute("title",f.fullLbl);m.innerHTML=f.lbl;n=m;p.appendChild(m);var q=document.createElement("ul");q.className="geTempTreeNested";q.style.visibility="hidden";for(var x in g){var I=document.createElement("li"),u=c(x,g[x]);I.setAttribute("title",u.fullLbl);I.innerHTML=u.lbl;I.className="geTemplateCatLink";
-I.style.padding="0";I.style.margin="0";d(l,u.lblOnly,I,x);q.appendChild(I)}p.appendChild(q);e.className="geTempTree";e.appendChild(p);(function(a,b){mxEvent.addListener(b,"click",function(){for(var e=a.querySelectorAll("li"),c=0;c<e.length;c++)e[c].style.margin="";a.style.visibility="visible";a.classList.toggle("geTempTreeActive");a.classList.toggle("geTempTreeNested")&&setTimeout(function(){for(var b=0;b<e.length;b++)e[b].style.margin="0";a.style.visibility="hidden"},250);b.classList.toggle("geTempTreeCaret-down")})})(q,
-m)}else e.className="geTemplateCatLink geTemplateDrawioCatLink",e.setAttribute("title",f.fullLbl),e.innerHTML=f.lbl;k.appendChild(e);d(l,f.lblOnly,n)}}function F(){mxUtils.get(b,function(a){if(!ra){ra=!0;a=a.getXml().documentElement.firstChild;for(var b={};null!=a;){if("undefined"!==typeof a.getAttribute)if("clibs"==a.nodeName){for(var e=a.getAttribute("name"),c=a.getElementsByTagName("add"),d=[],k=0;k<c.length;k++)d.push(encodeURIComponent(mxUtils.getTextContent(c[k])));null!=e&&0<d.length&&(b[e]=
+"div"),f=a[l],f=c(l,f);if(null!=g){var p=document.createElement("li"),q=document.createElement("div");q.className="geTempTreeCaret geTemplateCatLink geTemplateDrawioCatLink";q.style.padding="0";q.setAttribute("title",f.fullLbl);q.innerHTML=f.lbl;n=q;p.appendChild(q);var m=document.createElement("ul");m.className="geTempTreeNested";m.style.visibility="hidden";for(var x in g){var I=document.createElement("li"),u=c(x,g[x]);I.setAttribute("title",u.fullLbl);I.innerHTML=u.lbl;I.className="geTemplateCatLink";
+I.style.padding="0";I.style.margin="0";d(l,u.lblOnly,I,x);m.appendChild(I)}p.appendChild(m);e.className="geTempTree";e.appendChild(p);(function(a,b){mxEvent.addListener(b,"click",function(){for(var e=a.querySelectorAll("li"),c=0;c<e.length;c++)e[c].style.margin="";a.style.visibility="visible";a.classList.toggle("geTempTreeActive");a.classList.toggle("geTempTreeNested")&&setTimeout(function(){for(var b=0;b<e.length;b++)e[b].style.margin="0";a.style.visibility="hidden"},250);b.classList.toggle("geTempTreeCaret-down")})})(m,
+q)}else e.className="geTemplateCatLink geTemplateDrawioCatLink",e.setAttribute("title",f.fullLbl),e.innerHTML=f.lbl;k.appendChild(e);d(l,f.lblOnly,n)}}function F(){mxUtils.get(b,function(a){if(!ra){ra=!0;a=a.getXml().documentElement.firstChild;for(var b={};null!=a;){if("undefined"!==typeof a.getAttribute)if("clibs"==a.nodeName){for(var e=a.getAttribute("name"),c=a.getElementsByTagName("add"),d=[],k=0;k<c.length;k++)d.push(encodeURIComponent(mxUtils.getTextContent(c[k])));null!=e&&0<d.length&&(b[e]=
d.join(";"))}else if(d=a.getAttribute("url"),null!=d){c=a.getAttribute("section");e=a.getAttribute("subsection");if(null==c&&(k=d.indexOf("/"),c=d.substring(0,k),null==e)){var l=d.indexOf("/",k+1);-1<l&&(e=d.substring(k+1,l))}k=R[c];null==k&&(va++,k=[],R[c]=k);d=a.getAttribute("clibs");null!=b[d]&&(d=b[d]);d={url:a.getAttribute("url"),libs:a.getAttribute("libs"),title:a.getAttribute("title")||a.getAttribute("name"),preview:a.getAttribute("preview"),clibs:d,tags:a.getAttribute("tags")};k.push(d);null!=
-e&&(k=ta[c],null==k&&(k={},ta[c]=k),c=k[e],null==c&&(c=[],k[e]=c),c.push(d))}a=a.nextSibling}E(R,la,ya)}})}function K(a){m&&(na.scrollTop=0,T.innerHTML="",pa.spin(T),V=!1,L=!0,fa.innerHTML=mxUtils.htmlEntities(mxResources.get("recentDiag")),ba=null,m(xa,function(){v(mxResources.get("cannotLoad"));xa([])},a?null:g))}function M(a){if(""==a)null!=P&&(P.click(),P=null);else{if(null==TemplatesDialog.tagsList[b]){var e={},c;for(c in R)for(var d=R[c],k=0;k<d.length;k++){var l=d[k];if(null!=l.tags)for(var f=
-l.tags.toLowerCase().split(";"),g=0;g<f.length;g++)null==e[f[g]]&&(e[f[g]]=[]),e[f[g]].push(l)}TemplatesDialog.tagsList[b]=e}var n=a.toLowerCase().split(" "),e=TemplatesDialog.tagsList[b];if(0<ya&&null==e.__tagsList__){for(c in la)for(d=la[c],k=0;k<d.length;k++)for(l=d[k],f=l.title.split(" "),f.push(c),g=0;g<f.length;g++){var p=f[g].toLowerCase();null==e[p]&&(e[p]=[]);e[p].push(l)}e.__tagsList__=!0}c=[];d={};for(k=f=0;k<n.length;k++)if(0<n[k].length){var p=e[n[k]],m={};c=[];if(null!=p)for(g=0;g<p.length;g++)l=
-p[g],0==f==(null==d[l.url])&&(m[l.url]=!0,c.push(l));d=m;f++}0==c.length?fa.innerHTML=mxResources.get("noResultsFor",[a]):D(c,!0)}}function J(a){if(ba!=a||X!=O)z(),na.scrollTop=0,T.innerHTML="",fa.innerHTML=mxUtils.htmlEntities(mxResources.get("searchResults"))+' "'+mxUtils.htmlEntities(a)+'"',sa=null,Q?M(a):e&&(a?(pa.spin(T),V=!1,L=!0,e(a,xa,function(){v(mxResources.get("searchFailed"));xa([])},X?null:g)):K(X)),ba=a,O=X}function I(a){null!=sa&&clearTimeout(sa);13==a.keyCode?J(oa.value):sa=setTimeout(function(){J(oa.value)},
+e&&(k=ta[c],null==k&&(k={},ta[c]=k),c=k[e],null==c&&(c=[],k[e]=c),c.push(d))}a=a.nextSibling}E(R,la,ya)}})}function J(a){m&&(na.scrollTop=0,T.innerHTML="",pa.spin(T),V=!1,L=!0,fa.innerHTML=mxUtils.htmlEntities(mxResources.get("recentDiag")),ba=null,m(xa,function(){v(mxResources.get("cannotLoad"));xa([])},a?null:f))}function M(a){if(""==a)null!=P&&(P.click(),P=null);else{if(null==TemplatesDialog.tagsList[b]){var e={},c;for(c in R)for(var d=R[c],k=0;k<d.length;k++){var l=d[k];if(null!=l.tags)for(var f=
+l.tags.toLowerCase().split(";"),g=0;g<f.length;g++)null==e[f[g]]&&(e[f[g]]=[]),e[f[g]].push(l)}TemplatesDialog.tagsList[b]=e}var n=a.toLowerCase().split(" "),e=TemplatesDialog.tagsList[b];if(0<ya&&null==e.__tagsList__){for(c in la)for(d=la[c],k=0;k<d.length;k++)for(l=d[k],f=l.title.split(" "),f.push(c),g=0;g<f.length;g++){var p=f[g].toLowerCase();null==e[p]&&(e[p]=[]);e[p].push(l)}e.__tagsList__=!0}c=[];d={};for(k=f=0;k<n.length;k++)if(0<n[k].length){var p=e[n[k]],q={};c=[];if(null!=p)for(g=0;g<p.length;g++)l=
+p[g],0==f==(null==d[l.url])&&(q[l.url]=!0,c.push(l));d=q;f++}0==c.length?fa.innerHTML=mxResources.get("noResultsFor",[a]):D(c,!0)}}function K(a){if(ba!=a||X!=O)z(),na.scrollTop=0,T.innerHTML="",fa.innerHTML=mxUtils.htmlEntities(mxResources.get("searchResults"))+' "'+mxUtils.htmlEntities(a)+'"',sa=null,Q?M(a):e&&(a?(pa.spin(T),V=!1,L=!0,e(a,xa,function(){v(mxResources.get("searchFailed"));xa([])},X?null:f)):J(X)),ba=a,O=X}function I(a){null!=sa&&clearTimeout(sa);13==a.keyCode?K(oa.value):sa=setTimeout(function(){K(oa.value)},
1E3)}var N='<div class="geTempDlgHeader"><img src="/images/draw.io-logo.svg" class="geTempDlgHeaderLogo"><input type="search" class="geTempDlgSearchBox" '+(e?"":'style="display: none"')+' placeholder="'+mxResources.get("search")+'"></div><div class="geTemplatesList" style="display: none"><div class="geTempDlgBack">&lt; '+mxResources.get("back")+'</div><div class="geTempDlgHLine"></div><div class="geTemplatesLbl">'+mxResources.get("templates")+'</div></div><div class="geTempDlgContent" style="width: 100%"><div class="geTempDlgNewDiagramCat"><div class="geTempDlgNewDiagramCatLbl">'+
mxResources.get("newDiagram")+'</div><div class="geTempDlgNewDiagramCatList"></div><div class="geTempDlgNewDiagramCatFooter"><div class="geTempDlgShowAllBtn">'+mxResources.get("showMore")+'</div></div></div><div class="geTempDlgDiagramsList"><div class="geTempDlgDiagramsListHeader"><div class="geTempDlgDiagramsListTitle"></div><div class="geTempDlgDiagramsListBtns"><div class="geTempDlgRadioBtn geTempDlgRadioBtnLarge" data-id="myDiagramsBtn"><img src="/images/my-diagrams.svg" class="geTempDlgMyDiagramsBtnImg"> <span>'+
mxResources.get("myDiagrams")+'</span></div><div class="geTempDlgRadioBtn geTempDlgRadioBtnLarge geTempDlgRadioBtnActive" data-id="allDiagramsBtn"><img src="/images/all-diagrams-sel.svg" class="geTempDlgAllDiagramsBtnImg"> <span>'+mxResources.get("allDiagrams")+'</span></div><div class="geTempDlgSpacer"> </div><div class="geTempDlgRadioBtn geTempDlgRadioBtnSmall geTempDlgRadioBtnActive" data-id="tilesBtn"><img src="/images/tiles-sel.svg" class="geTempDlgTilesBtnImg"></div><div class="geTempDlgRadioBtn geTempDlgRadioBtnSmall" data-id="listBtn"><img src="/images/list.svg" class="geTempDlgListBtnImg"></div></div></div><div class="geTempDlgDiagramsTiles"></div></div></div><br style="clear:both;"/><div class="geTempDlgFooter"><div class="geTempDlgErrMsg"></div>'+
(q?'<span class="geTempDlgLinkToDiagram geTempDlgLinkToDiagramHint">'+mxResources.get("linkToDiagramHint")+'</span><button class="geTempDlgLinkToDiagram geTempDlgLinkToDiagramBtn">'+mxResources.get("linkToDiagram")+"</button>":"")+(p?'<div class="geTempDlgOpenBtn">'+mxResources.get("open")+"</div>":"")+'<div class="geTempDlgCreateBtn">'+mxResources.get("create")+'</div><div class="geTempDlgCancelBtn">'+mxResources.get("cancel")+"</div></div>",H=document.createElement("div");H.innerHTML=N;H.className=
-"geTemplateDlg";this.container=H;b=null!=b?b:TEMPLATE_PATH+"/index.xml";f=null!=f?f:NEW_DIAGRAM_CATS_PATH+"/index.xml";var L=!1,V=!1,U=null,P=null,W=null,ha=null,ea=!1,X=!0,Z=!1,Y=[],ga=null,ba,O,Q=!1,ma=H.querySelector(".geTempDlgShowAllBtn"),T=H.querySelector(".geTempDlgDiagramsTiles"),fa=H.querySelector(".geTempDlgDiagramsListTitle"),ja=H.querySelector(".geTempDlgDiagramsListBtns"),na=H.querySelector(".geTempDlgContent"),S=H.querySelector(".geTempDlgDiagramsList"),aa=H.querySelector(".geTempDlgNewDiagramCat"),
+"geTemplateDlg";this.container=H;b=null!=b?b:TEMPLATE_PATH+"/index.xml";g=null!=g?g:NEW_DIAGRAM_CATS_PATH+"/index.xml";var L=!1,V=!1,U=null,P=null,W=null,ha=null,ea=!1,X=!0,Z=!1,Y=[],ga=null,ba,O,Q=!1,ma=H.querySelector(".geTempDlgShowAllBtn"),T=H.querySelector(".geTempDlgDiagramsTiles"),fa=H.querySelector(".geTempDlgDiagramsListTitle"),ja=H.querySelector(".geTempDlgDiagramsListBtns"),na=H.querySelector(".geTempDlgContent"),S=H.querySelector(".geTempDlgDiagramsList"),aa=H.querySelector(".geTempDlgNewDiagramCat"),
ca=H.querySelector(".geTempDlgNewDiagramCatList"),da=H.querySelector(".geTempDlgCreateBtn"),qa=H.querySelector(".geTempDlgOpenBtn"),oa=H.querySelector(".geTempDlgSearchBox"),ka=H.querySelector(".geTempDlgErrMsg"),pa=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(H.querySelector(".geTempDlgBack"),"click",function(){z();Q=!1;H.querySelector(".geTemplatesList").style.display="none";na.style.width=
-"100%";aa.style.display="";S.style.minHeight="calc(100% - 280px)";oa.style.display=e?"":"none";oa.value="";ba=null;K(X)});mxEvent.addListener(H.querySelector(".geTempDlgRadioBtn[data-id=allDiagramsBtn]"),"click",function(){y(this,"geTempDlgAllDiagramsBtnImg","all-diagrams","myDiagramsBtn","geTempDlgMyDiagramsBtnImg","my-diagrams",!0)&&(X=!0,null==ba?K(X):J(ba))});mxEvent.addListener(H.querySelector(".geTempDlgRadioBtn[data-id=myDiagramsBtn]"),"click",function(){y(this,"geTempDlgMyDiagramsBtnImg",
-"my-diagrams","allDiagramsBtn","geTempDlgAllDiagramsBtnImg","all-diagrams",!0)&&(X=!1,null==ba?K(X):J(ba))});mxEvent.addListener(H.querySelector(".geTempDlgRadioBtn[data-id=listBtn]"),"click",function(){y(this,"geTempDlgListBtnImg","list","tilesBtn","geTempDlgTilesBtnImg","tiles",!1)&&(Z=!0,D(Y,!1,Z,ga))});mxEvent.addListener(H.querySelector(".geTempDlgRadioBtn[data-id=tilesBtn]"),"click",function(){y(this,"geTempDlgTilesBtnImg","tiles","listBtn","geTempDlgListBtnImg","list",!1)&&(Z=!1,D(Y,!1,Z,ga))});
-var ia=!1;mxEvent.addListener(ma,"click",function(){ea?(aa.style.height="280px",ca.style.height="190px",ma.innerHTML=mxUtils.htmlEntities(mxResources.get("showMore")),G(ua)):(aa.style.height="440px",ca.style.height="355px",ma.innerHTML=mxUtils.htmlEntities(mxResources.get("showLess")),G(ua,!0));ea=!ea});var ra=!1,wa=!1,R={},ta={},la={},ua=[],va=1,ya=0;null!=n?n(function(a,b){la=a;ya=b;F()},F):F();mxUtils.get(f,function(a){if(!wa){wa=!0;for(a=a.getXml().documentElement.firstChild;null!=a;)"undefined"!==
-typeof a.getAttribute&&null!=a.getAttribute("title")&&ua.push({img:a.getAttribute("img"),libs:a.getAttribute("libs"),clibs:a.getAttribute("clibs"),title:a.getAttribute("title")}),a=a.nextSibling;G(ua)}});var xa=function(a,b,e){ja.style.display="";pa.stop();L=!1;if(V)V=!1;else if(b)T.innerHTML=b;else{e=e||{};b=0;for(var c in e)b+=e[c].length;0==a.length&&0==b?T.innerHTML=mxUtils.htmlEntities(mxResources.get("noDiagrams")):D(a,!1,Z,0==b?null:e)}};K(X);var sa=null;mxEvent.addListener(oa,"keyup",I);mxEvent.addListener(oa,
+"100%";aa.style.display="";S.style.minHeight="calc(100% - 280px)";oa.style.display=e?"":"none";oa.value="";ba=null;J(X)});mxEvent.addListener(H.querySelector(".geTempDlgRadioBtn[data-id=allDiagramsBtn]"),"click",function(){y(this,"geTempDlgAllDiagramsBtnImg","all-diagrams","myDiagramsBtn","geTempDlgMyDiagramsBtnImg","my-diagrams",!0)&&(X=!0,null==ba?J(X):K(ba))});mxEvent.addListener(H.querySelector(".geTempDlgRadioBtn[data-id=myDiagramsBtn]"),"click",function(){y(this,"geTempDlgMyDiagramsBtnImg",
+"my-diagrams","allDiagramsBtn","geTempDlgAllDiagramsBtnImg","all-diagrams",!0)&&(X=!1,null==ba?J(X):K(ba))});mxEvent.addListener(H.querySelector(".geTempDlgRadioBtn[data-id=listBtn]"),"click",function(){y(this,"geTempDlgListBtnImg","list","tilesBtn","geTempDlgTilesBtnImg","tiles",!1)&&(Z=!0,D(Y,!1,Z,ga))});mxEvent.addListener(H.querySelector(".geTempDlgRadioBtn[data-id=tilesBtn]"),"click",function(){y(this,"geTempDlgTilesBtnImg","tiles","listBtn","geTempDlgListBtnImg","list",!1)&&(Z=!1,D(Y,!1,Z,ga))});
+var ia=!1;mxEvent.addListener(ma,"click",function(){ea?(aa.style.height="280px",ca.style.height="190px",ma.innerHTML=mxUtils.htmlEntities(mxResources.get("showMore")),G(ua)):(aa.style.height="440px",ca.style.height="355px",ma.innerHTML=mxUtils.htmlEntities(mxResources.get("showLess")),G(ua,!0));ea=!ea});var ra=!1,wa=!1,R={},ta={},la={},ua=[],va=1,ya=0;null!=n?n(function(a,b){la=a;ya=b;F()},F):F();mxUtils.get(g,function(a){if(!wa){wa=!0;for(a=a.getXml().documentElement.firstChild;null!=a;)"undefined"!==
+typeof a.getAttribute&&null!=a.getAttribute("title")&&ua.push({img:a.getAttribute("img"),libs:a.getAttribute("libs"),clibs:a.getAttribute("clibs"),title:a.getAttribute("title")}),a=a.nextSibling;G(ua)}});var xa=function(a,b,e){ja.style.display="";pa.stop();L=!1;if(V)V=!1;else if(b)T.innerHTML=b;else{e=e||{};b=0;for(var c in e)b+=e[c].length;0==a.length&&0==b?T.innerHTML=mxUtils.htmlEntities(mxResources.get("noDiagrams")):D(a,!1,Z,0==b?null:e)}};J(X);var sa=null;mxEvent.addListener(oa,"keyup",I);mxEvent.addListener(oa,
"search",I);mxEvent.addListener(oa,"input",I);mxEvent.addListener(da,"click",function(a){B(!1,!1)});p&&mxEvent.addListener(qa,"click",function(a){B(!1,!0)});q&&mxEvent.addListener(H.querySelector(".geTempDlgLinkToDiagramBtn"),"click",function(a){B(!0)});mxEvent.addListener(H.querySelector(".geTempDlgCancelBtn"),"click",function(){null!=c&&c();t||a.hideDialog(!0)})};TemplatesDialog.tagsList={};
-var BtnDialog=function(a,d,c,b){var f=document.createElement("div");f.style.textAlign="center";var g=document.createElement("p");g.style.fontSize="16pt";g.style.padding="0px";g.style.margin="0px";g.style.color="gray";mxUtils.write(g,mxResources.get("done"));var m="Unknown",e=document.createElement("img");e.setAttribute("border","0");e.setAttribute("align","absmiddle");e.style.marginRight="10px";d==a.drive?(m=mxResources.get("googleDrive"),e.src=IMAGE_PATH+"/google-drive-logo-white.svg"):d==a.dropbox?
+var BtnDialog=function(a,d,c,b){var g=document.createElement("div");g.style.textAlign="center";var f=document.createElement("p");f.style.fontSize="16pt";f.style.padding="0px";f.style.margin="0px";f.style.color="gray";mxUtils.write(f,mxResources.get("done"));var m="Unknown",e=document.createElement("img");e.setAttribute("border","0");e.setAttribute("align","absmiddle");e.style.marginRight="10px";d==a.drive?(m=mxResources.get("googleDrive"),e.src=IMAGE_PATH+"/google-drive-logo-white.svg"):d==a.dropbox?
(m=mxResources.get("dropbox"),e.src=IMAGE_PATH+"/dropbox-logo-white.svg"):d==a.oneDrive?(m=mxResources.get("oneDrive"),e.src=IMAGE_PATH+"/onedrive-logo-white.svg"):d==a.gitHub?(m=mxResources.get("github"),e.src=IMAGE_PATH+"/github-logo-white.svg"):d==a.gitLab?(m=mxResources.get("gitlab"),e.src=IMAGE_PATH+"/gitlab-logo.svg"):d==a.notion?(m=mxResources.get("notion"),e.src=IMAGE_PATH+"/notion-logo.svg"):d==a.trello&&(m=mxResources.get("trello"),e.src=IMAGE_PATH+"/trello-logo-white.svg");a=document.createElement("p");
-mxUtils.write(a,mxResources.get("authorizedIn",[m],"You are now authorized in {1}"));c=mxUtils.button(c,b);c.insertBefore(e,c.firstChild);c.style.marginTop="6px";c.className="geBigButton";c.style.fontSize="18px";c.style.padding="14px";f.appendChild(g);f.appendChild(a);f.appendChild(c);this.container=f},FontDialog=function(a,d,c,b,f){function g(a){this.style.border="";13==a.keyCode&&x.click()}var m,e,k,l=document.createElement("table"),n=document.createElement("tbody");l.style.marginTop="8px";m=document.createElement("tr");
+mxUtils.write(a,mxResources.get("authorizedIn",[m],"You are now authorized in {1}"));c=mxUtils.button(c,b);c.insertBefore(e,c.firstChild);c.style.marginTop="6px";c.className="geBigButton";c.style.fontSize="18px";c.style.padding="14px";g.appendChild(f);g.appendChild(a);g.appendChild(c);this.container=g},FontDialog=function(a,d,c,b,g){function f(a){this.style.border="";13==a.keyCode&&x.click()}var m,e,k,l=document.createElement("table"),n=document.createElement("tbody");l.style.marginTop="8px";m=document.createElement("tr");
e=document.createElement("td");e.colSpan=2;e.style.whiteSpace="nowrap";e.style.fontSize="10pt";e.style.fontWeight="bold";var p=document.createElement("input");p.style.cssText="margin-right:8px;margin-bottom:8px;";p.setAttribute("value","sysfonts");p.setAttribute("type","radio");p.setAttribute("name","current-fontdialog");p.setAttribute("id","fontdialog-sysfonts");e.appendChild(p);k=document.createElement("label");k.setAttribute("for","fontdialog-sysfonts");mxUtils.write(k,mxResources.get("sysFonts",
null,"System Fonts"));e.appendChild(k);m.appendChild(e);n.appendChild(m);m=document.createElement("tr");e=document.createElement("td");e.style.whiteSpace="nowrap";e.style.fontSize="10pt";e.style.width="120px";e.style.paddingLeft="15px";mxUtils.write(e,mxResources.get("fontname",null,"Font Name")+":");m.appendChild(e);var q=document.createElement("input");"s"==b&&q.setAttribute("value",d);q.style.marginLeft="4px";q.style.width="250px";q.className="dlg_fontName_s";e=document.createElement("td");e.appendChild(q);
m.appendChild(e);n.appendChild(m);m=document.createElement("tr");e=document.createElement("td");e.colSpan=2;e.style.whiteSpace="nowrap";e.style.fontSize="10pt";e.style.fontWeight="bold";var u=document.createElement("input");u.style.cssText="margin-right:8px;margin-bottom:8px;";u.setAttribute("value","googlefonts");u.setAttribute("type","radio");u.setAttribute("name","current-fontdialog");u.setAttribute("id","fontdialog-googlefonts");e.appendChild(u);k=document.createElement("label");k.setAttribute("for",
@@ -10186,25 +10187,25 @@ m.appendChild(e);n.appendChild(m);m=document.createElement("tr");e=document.crea
v.style.cssText="margin-right:8px;margin-bottom:8px;";v.setAttribute("value","webfonts");v.setAttribute("type","radio");v.setAttribute("name","current-fontdialog");v.setAttribute("id","fontdialog-webfonts");e.appendChild(v);k=document.createElement("label");k.setAttribute("for","fontdialog-webfonts");mxUtils.write(k,mxResources.get("webfonts",null,"Web Fonts"));e.appendChild(k);m.appendChild(e);n.appendChild(m);m=document.createElement("tr");e=document.createElement("td");e.style.whiteSpace="nowrap";
e.style.fontSize="10pt";e.style.width="120px";e.style.paddingLeft="15px";mxUtils.write(e,mxResources.get("fontname",null,"Font Name")+":");m.appendChild(e);var z=document.createElement("input");"w"==b&&z.setAttribute("value",d);z.style.marginLeft="4px";z.style.width="250px";z.className="dlg_fontName_w";e=document.createElement("td");e.appendChild(z);m.appendChild(e);n.appendChild(m);m=document.createElement("tr");e=document.createElement("td");e.style.whiteSpace="nowrap";e.style.fontSize="10pt";e.style.width=
"120px";e.style.paddingLeft="15px";mxUtils.write(e,mxResources.get("fontUrl",null,"Font URL")+":");m.appendChild(e);var y=document.createElement("input");y.setAttribute("value",c||"");y.style.marginLeft="4px";y.style.width="250px";y.className="dlg_fontUrl";e=document.createElement("td");e.appendChild(y);m.appendChild(e);n.appendChild(m);this.init=function(){var a=q;"g"==b?a=t:"w"==b&&(a=z);a.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?a.select():document.execCommand("selectAll",
-!1,null)};m=document.createElement("tr");e=document.createElement("td");e.colSpan=2;e.style.paddingTop="20px";e.style.whiteSpace="nowrap";e.setAttribute("align","right");a.isOffline()||(d=mxUtils.button(mxResources.get("help"),function(){a.openLink("https://www.diagrams.net/blog/external-fonts")}),d.className="geBtn",e.appendChild(d));d=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog();f()});d.className="geBtn";a.editor.cancelFirst&&e.appendChild(d);var x=mxUtils.button(mxResources.get("apply"),
-function(){var b,e,c;p.checked?(b=q.value,c="s"):u.checked?(b=t.value,e=Editor.GOOGLE_FONTS+encodeURIComponent(b).replace(/%20/g,"+"),c="g"):v.checked&&(b=z.value,e=y.value,c="w");var d;d=e;var k=c,g=/(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/;null==b||0==b.length?(l.querySelector(".dlg_fontName_"+k).style.border="1px solid red",d=!1):"w"!=k||g.test(d)?d=!0:(l.querySelector(".dlg_fontUrl").style.border="1px solid red",d=!1);d&&(f(b,e,c),a.hideDialog())});x.className=
-"geBtn gePrimaryBtn";mxEvent.addListener(q,"keypress",g);mxEvent.addListener(t,"keypress",g);mxEvent.addListener(z,"keypress",g);mxEvent.addListener(y,"keypress",g);mxEvent.addListener(q,"focus",function(){p.setAttribute("checked","checked");p.checked=!0});mxEvent.addListener(t,"focus",function(){u.setAttribute("checked","checked");u.checked=!0});mxEvent.addListener(z,"focus",function(){v.setAttribute("checked","checked");v.checked=!0});mxEvent.addListener(y,"focus",function(){v.setAttribute("checked",
+!1,null)};m=document.createElement("tr");e=document.createElement("td");e.colSpan=2;e.style.paddingTop="20px";e.style.whiteSpace="nowrap";e.setAttribute("align","right");a.isOffline()||(d=mxUtils.button(mxResources.get("help"),function(){a.openLink("https://www.diagrams.net/blog/external-fonts")}),d.className="geBtn",e.appendChild(d));d=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog();g()});d.className="geBtn";a.editor.cancelFirst&&e.appendChild(d);var x=mxUtils.button(mxResources.get("apply"),
+function(){var b,e,c;p.checked?(b=q.value,c="s"):u.checked?(b=t.value,e=Editor.GOOGLE_FONTS+encodeURIComponent(b).replace(/%20/g,"+"),c="g"):v.checked&&(b=z.value,e=y.value,c="w");var d;d=e;var k=c,f=/(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/;null==b||0==b.length?(l.querySelector(".dlg_fontName_"+k).style.border="1px solid red",d=!1):"w"!=k||f.test(d)?d=!0:(l.querySelector(".dlg_fontUrl").style.border="1px solid red",d=!1);d&&(g(b,e,c),a.hideDialog())});x.className=
+"geBtn gePrimaryBtn";mxEvent.addListener(q,"keypress",f);mxEvent.addListener(t,"keypress",f);mxEvent.addListener(z,"keypress",f);mxEvent.addListener(y,"keypress",f);mxEvent.addListener(q,"focus",function(){p.setAttribute("checked","checked");p.checked=!0});mxEvent.addListener(t,"focus",function(){u.setAttribute("checked","checked");u.checked=!0});mxEvent.addListener(z,"focus",function(){v.setAttribute("checked","checked");v.checked=!0});mxEvent.addListener(y,"focus",function(){v.setAttribute("checked",
"checked");v.checked=!0});e.appendChild(x);a.editor.cancelFirst||e.appendChild(d);m.appendChild(e);n.appendChild(m);l.appendChild(n);this.container=l};
-function AspectDialog(a,d,c,b,f){this.aspect={pageId:d||(a.pages?a.pages[0].getId():null),layerIds:c||[]};d=document.createElement("div");var g=document.createElement("h5");g.style.margin="0 0 10px";mxUtils.write(g,mxResources.get("pages"));d.appendChild(g);c=document.createElement("div");c.className="geAspectDlgList";d.appendChild(c);g=document.createElement("h5");g.style.margin="0 0 10px";mxUtils.write(g,mxResources.get("layers"));d.appendChild(g);g=document.createElement("div");g.className="geAspectDlgList";
-d.appendChild(g);this.pagesContainer=c;this.layersContainer=g;this.ui=a;c=document.createElement("div");c.style.marginTop="16px";c.style.textAlign="center";g=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog();null!=f&&f()});g.className="geBtn";a.editor.cancelFirst&&c.appendChild(g);var m=mxUtils.button(mxResources.get("ok"),mxUtils.bind(this,function(){a.hideDialog();b({pageId:this.selectedPage,layerIds:Object.keys(this.selectedLayers)})}));c.appendChild(m);m.className="geBtn gePrimaryBtn";
-a.editor.cancelFirst||c.appendChild(g);m.setAttribute("disabled","disabled");this.okBtn=m;d.appendChild(c);this.container=d}AspectDialog.prototype.init=function(){var a=this.ui.getFileData(!0);if(this.ui.pages)for(a=0;a<this.ui.pages.length;a++){var d=this.ui.updatePageRoot(this.ui.pages[a]);this.createPageItem(d.getId(),d.getName(),d.node)}else this.createPageItem("1","Page-1",mxUtils.parseXml(a).documentElement)};
-AspectDialog.prototype.createViewer=function(a,d,c){mxEvent.disableContextMenu(a);a.style.userSelect="none";var b=new Graph(a);b.setTooltips(!1);b.setEnabled(!1);b.setPanning(!1);b.minFitScale=null;b.maxFitScale=null;b.centerZoom=!0;d="mxGraphModel"==d.nodeName?d:Editor.parseDiagramNode(d);if(null!=d){var f=d.getAttribute("background");if(null==f||""==f||f==mxConstants.NONE)f="#ffffff";a.style.backgroundColor=f;f=new mxCodec(d.ownerDocument);a=b.getModel();f.decode(d,a);d=a.getChildCount(a.root);
-for(var f=null==c,g=0;g<d;g++){var m=a.getChildAt(a.root,g);a.setVisible(m,f||c==m.id)}b.maxFitScale=1;b.fit(0);b.center()}return b};
-AspectDialog.prototype.createPageItem=function(a,d,c){var b=document.createElement("div");b.className="geAspectDlgListItem";b.setAttribute("data-page-id",a);b.innerHTML='<div style="max-width: 100%; max-height: 100%;"></div><div class="geAspectDlgListItemText">'+mxUtils.htmlEntities(d)+"</div>";this.pagesContainer.appendChild(b);var f=this.createViewer(b.childNodes[0],c);d=mxUtils.bind(this,function(){null!=this.selectedItem&&(this.selectedItem.className="geAspectDlgListItem");this.selectedItem=b;
-this.selectedPage=a;b.className+=" geAspectDlgListItemSelected";this.layersContainer.innerHTML="";this.selectedLayers={};this.okBtn.setAttribute("disabled","disabled");for(var d=f.model,d=d.getChildCells(d.getRoot()),m=0;m<d.length;m++)this.createLayerItem(d[m],a,f,c)});mxEvent.addListener(b,"click",d);this.aspect.pageId==a&&d()};
-AspectDialog.prototype.createLayerItem=function(a,d,c,b){d=c.convertValueToString(a)||mxResources.get("background")||"Background";var f=document.createElement("div");f.setAttribute("data-layer-id",a.id);f.className="geAspectDlgListItem";f.innerHTML='<div style="max-width: 100%; max-height: 100%;"></div><div class="geAspectDlgListItemText">'+mxUtils.htmlEntities(d)+"</div>";this.layersContainer.appendChild(f);this.createViewer(f.childNodes[0],b,a.id);b=mxUtils.bind(this,function(){0<=f.className.indexOf("geAspectDlgListItemSelected")?
-(f.className="geAspectDlgListItem",delete this.selectedLayers[a.id],0==Object.keys(this.selectedLayers).length&&this.okBtn.setAttribute("disabled","disabled")):(f.className+=" geAspectDlgListItemSelected",this.selectedLayers[a.id]=!0,this.okBtn.removeAttribute("disabled"))});mxEvent.addListener(f,"click",b);-1!=this.aspect.layerIds.indexOf(a.id)&&b()};
-var FilePropertiesDialog=function(a){var d,c,b=document.createElement("table"),f=document.createElement("tbody");b.style.width="100%";b.style.marginTop="8px";var g=a.getCurrentFile();d=null!=g&&null!=g.getTitle()?g.getTitle():this.editorUi.defaultFilename;c=null;if(/(\.png)$/i.test(d)){var m=1,e=0;d=a.fileNode;null!=d&&(d.hasAttribute("scale")&&(m=parseFloat(d.getAttribute("scale"))),d.hasAttribute("border")&&(e=parseInt(d.getAttribute("border"))));d=document.createElement("tr");c=document.createElement("td");
-c.style.whiteSpace="nowrap";c.style.fontSize="10pt";c.style.width="120px";mxUtils.write(c,mxResources.get("zoom")+":");d.appendChild(c);var k=document.createElement("input");k.setAttribute("value",100*m+"%");k.style.marginLeft="4px";k.style.width="180px";c=document.createElement("td");c.style.whiteSpace="nowrap";c.appendChild(k);d.appendChild(c);f.appendChild(d);d=document.createElement("tr");c=document.createElement("td");c.style.whiteSpace="nowrap";c.style.fontSize="10pt";c.style.width="120px";
-mxUtils.write(c,mxResources.get("borderWidth")+":");d.appendChild(c);var l=document.createElement("input");l.setAttribute("value",e);l.style.marginLeft="4px";l.style.width="180px";c=document.createElement("td");c.style.whiteSpace="nowrap";c.appendChild(l);d.appendChild(c);f.appendChild(d);this.init=function(){k.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?k.select():document.execCommand("selectAll",!1,null)};c=function(){null!=a.fileNode&&(a.fileNode.setAttribute("scale",Math.max(0,
-parseInt(k.value)/100)),a.fileNode.setAttribute("border",Math.max(0,parseInt(l.value))),null!=g&&g.fileChanged());a.hideDialog()}}else{m=null!=g?g.isCompressed():Editor.compressXml;d=document.createElement("tr");c=document.createElement("td");c.style.whiteSpace="nowrap";c.style.fontSize="10pt";c.style.width="120px";mxUtils.write(c,mxResources.get("compressed")+":");d.appendChild(c);var n=document.createElement("input");n.setAttribute("type","checkbox");m&&(n.setAttribute("checked","checked"),n.defaultChecked=
-!0);c=document.createElement("td");c.style.whiteSpace="nowrap";c.appendChild(n);d.appendChild(c);f.appendChild(d);this.init=function(){n.focus()};c=function(){null!=a.fileNode&&(a.fileNode.setAttribute("compressed",n.checked?"true":"false"),null!=g&&g.fileChanged());a.hideDialog()}}m=mxUtils.button(mxResources.get("apply"),c);m.className="geBtn gePrimaryBtn";d=document.createElement("tr");c=document.createElement("td");c.colSpan=2;c.style.paddingTop="20px";c.style.whiteSpace="nowrap";c.setAttribute("align",
-"right");e=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});e.className="geBtn";a.editor.cancelFirst&&c.appendChild(e);c.appendChild(m);a.editor.cancelFirst||c.appendChild(e);d.appendChild(c);f.appendChild(d);b.appendChild(f);this.container=b};(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"},
+function AspectDialog(a,d,c,b,g){this.aspect={pageId:d||(a.pages?a.pages[0].getId():null),layerIds:c||[]};d=document.createElement("div");var f=document.createElement("h5");f.style.margin="0 0 10px";mxUtils.write(f,mxResources.get("pages"));d.appendChild(f);c=document.createElement("div");c.className="geAspectDlgList";d.appendChild(c);f=document.createElement("h5");f.style.margin="0 0 10px";mxUtils.write(f,mxResources.get("layers"));d.appendChild(f);f=document.createElement("div");f.className="geAspectDlgList";
+d.appendChild(f);this.pagesContainer=c;this.layersContainer=f;this.ui=a;c=document.createElement("div");c.style.marginTop="16px";c.style.textAlign="center";f=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog();null!=g&&g()});f.className="geBtn";a.editor.cancelFirst&&c.appendChild(f);var m=mxUtils.button(mxResources.get("ok"),mxUtils.bind(this,function(){a.hideDialog();b({pageId:this.selectedPage,layerIds:Object.keys(this.selectedLayers)})}));c.appendChild(m);m.className="geBtn gePrimaryBtn";
+a.editor.cancelFirst||c.appendChild(f);m.setAttribute("disabled","disabled");this.okBtn=m;d.appendChild(c);this.container=d}AspectDialog.prototype.init=function(){var a=this.ui.getFileData(!0);if(this.ui.pages)for(a=0;a<this.ui.pages.length;a++){var d=this.ui.updatePageRoot(this.ui.pages[a]);this.createPageItem(d.getId(),d.getName(),d.node)}else this.createPageItem("1","Page-1",mxUtils.parseXml(a).documentElement)};
+AspectDialog.prototype.createViewer=function(a,d,c){mxEvent.disableContextMenu(a);a.style.userSelect="none";var b=new Graph(a);b.setTooltips(!1);b.setEnabled(!1);b.setPanning(!1);b.minFitScale=null;b.maxFitScale=null;b.centerZoom=!0;d="mxGraphModel"==d.nodeName?d:Editor.parseDiagramNode(d);if(null!=d){var g=d.getAttribute("background");if(null==g||""==g||g==mxConstants.NONE)g="#ffffff";a.style.backgroundColor=g;g=new mxCodec(d.ownerDocument);a=b.getModel();g.decode(d,a);d=a.getChildCount(a.root);
+for(var g=null==c,f=0;f<d;f++){var m=a.getChildAt(a.root,f);a.setVisible(m,g||c==m.id)}b.maxFitScale=1;b.fit(0);b.center()}return b};
+AspectDialog.prototype.createPageItem=function(a,d,c){var b=document.createElement("div");b.className="geAspectDlgListItem";b.setAttribute("data-page-id",a);b.innerHTML='<div style="max-width: 100%; max-height: 100%;"></div><div class="geAspectDlgListItemText">'+mxUtils.htmlEntities(d)+"</div>";this.pagesContainer.appendChild(b);var g=this.createViewer(b.childNodes[0],c);d=mxUtils.bind(this,function(){null!=this.selectedItem&&(this.selectedItem.className="geAspectDlgListItem");this.selectedItem=b;
+this.selectedPage=a;b.className+=" geAspectDlgListItemSelected";this.layersContainer.innerHTML="";this.selectedLayers={};this.okBtn.setAttribute("disabled","disabled");for(var d=g.model,d=d.getChildCells(d.getRoot()),m=0;m<d.length;m++)this.createLayerItem(d[m],a,g,c)});mxEvent.addListener(b,"click",d);this.aspect.pageId==a&&d()};
+AspectDialog.prototype.createLayerItem=function(a,d,c,b){d=c.convertValueToString(a)||mxResources.get("background")||"Background";var g=document.createElement("div");g.setAttribute("data-layer-id",a.id);g.className="geAspectDlgListItem";g.innerHTML='<div style="max-width: 100%; max-height: 100%;"></div><div class="geAspectDlgListItemText">'+mxUtils.htmlEntities(d)+"</div>";this.layersContainer.appendChild(g);this.createViewer(g.childNodes[0],b,a.id);b=mxUtils.bind(this,function(){0<=g.className.indexOf("geAspectDlgListItemSelected")?
+(g.className="geAspectDlgListItem",delete this.selectedLayers[a.id],0==Object.keys(this.selectedLayers).length&&this.okBtn.setAttribute("disabled","disabled")):(g.className+=" geAspectDlgListItemSelected",this.selectedLayers[a.id]=!0,this.okBtn.removeAttribute("disabled"))});mxEvent.addListener(g,"click",b);-1!=this.aspect.layerIds.indexOf(a.id)&&b()};
+var FilePropertiesDialog=function(a){var d,c,b=document.createElement("table"),g=document.createElement("tbody");b.style.width="100%";b.style.marginTop="8px";var f=a.getCurrentFile();d=null!=f&&null!=f.getTitle()?f.getTitle():this.editorUi.defaultFilename;c=null;if(/(\.png)$/i.test(d)){var m=1,e=0;d=a.fileNode;null!=d&&(d.hasAttribute("scale")&&(m=parseFloat(d.getAttribute("scale"))),d.hasAttribute("border")&&(e=parseInt(d.getAttribute("border"))));d=document.createElement("tr");c=document.createElement("td");
+c.style.whiteSpace="nowrap";c.style.fontSize="10pt";c.style.width="120px";mxUtils.write(c,mxResources.get("zoom")+":");d.appendChild(c);var k=document.createElement("input");k.setAttribute("value",100*m+"%");k.style.marginLeft="4px";k.style.width="180px";c=document.createElement("td");c.style.whiteSpace="nowrap";c.appendChild(k);d.appendChild(c);g.appendChild(d);d=document.createElement("tr");c=document.createElement("td");c.style.whiteSpace="nowrap";c.style.fontSize="10pt";c.style.width="120px";
+mxUtils.write(c,mxResources.get("borderWidth")+":");d.appendChild(c);var l=document.createElement("input");l.setAttribute("value",e);l.style.marginLeft="4px";l.style.width="180px";c=document.createElement("td");c.style.whiteSpace="nowrap";c.appendChild(l);d.appendChild(c);g.appendChild(d);this.init=function(){k.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?k.select():document.execCommand("selectAll",!1,null)};c=function(){null!=a.fileNode&&(a.fileNode.setAttribute("scale",Math.max(0,
+parseInt(k.value)/100)),a.fileNode.setAttribute("border",Math.max(0,parseInt(l.value))),null!=f&&f.fileChanged());a.hideDialog()}}else{m=null!=f?f.isCompressed():Editor.compressXml;d=document.createElement("tr");c=document.createElement("td");c.style.whiteSpace="nowrap";c.style.fontSize="10pt";c.style.width="120px";mxUtils.write(c,mxResources.get("compressed")+":");d.appendChild(c);var n=document.createElement("input");n.setAttribute("type","checkbox");m&&(n.setAttribute("checked","checked"),n.defaultChecked=
+!0);c=document.createElement("td");c.style.whiteSpace="nowrap";c.appendChild(n);d.appendChild(c);g.appendChild(d);this.init=function(){n.focus()};c=function(){null!=a.fileNode&&(a.fileNode.setAttribute("compressed",n.checked?"true":"false"),null!=f&&f.fileChanged());a.hideDialog()}}m=mxUtils.button(mxResources.get("apply"),c);m.className="geBtn gePrimaryBtn";d=document.createElement("tr");c=document.createElement("td");c.colSpan=2;c.style.paddingTop="20px";c.style.whiteSpace="nowrap";c.setAttribute("align",
+"right");e=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});e.className="geBtn";a.editor.cancelFirst&&c.appendChild(e);c.appendChild(m);a.editor.cancelFirst||c.appendChild(e);d.appendChild(c);g.appendChild(d);b.appendChild(g);this.container=b};(function(){"undefined"!==typeof html4&&(html4.ATTRIBS["span::data-lucid-content"]=0,html4.ATTRIBS["span::data-lucid-type"]=0,html4.ATTRIBS["font::data-font-src"]=0);Editor.prototype.appName="diagrams.net";Editor.prototype.diagramFileTypes=[{description:"diagramXmlDesc",extension:"drawio",mimeType:"text/xml"},{description:"diagramPngDesc",extension:"png",mimeType:"image/png"},{description:"diagramSvgDesc",extension:"svg",mimeType:"image/svg"},{description:"diagramHtmlDesc",extension:"html",mimeType:"text/html"},
{description:"diagramXmlDesc",extension:"xml",mimeType:"text/xml"}];Editor.prototype.libraryFileTypes=[{description:"Library (.drawiolib, .xml)",extensions:["drawiolib","xml"]}];Editor.prototype.fileExtensions=[{ext:"html",title:"filetypeHtml"},{ext:"png",title:"filetypePng"},{ext:"svg",title:"filetypeSvg"}];Editor.styles=[{},{commonStyle:{fontColor:"#5C5C5C",strokeColor:"#006658",fillColor:"#21C0A5"}},{commonStyle:{fontColor:"#095C86",strokeColor:"#AF45ED",fillColor:"#F694C1"},edgeStyle:{strokeColor:"#60E696"}},
{commonStyle:{fontColor:"#46495D",strokeColor:"#788AA3",fillColor:"#B2C9AB"}},{commonStyle:{fontColor:"#5AA9E6",strokeColor:"#FF6392",fillColor:"#FFE45E"}},{commonStyle:{fontColor:"#1D3557",strokeColor:"#457B9D",fillColor:"#A8DADC"},graph:{background:"#F1FAEE"}},{commonStyle:{fontColor:"#393C56",strokeColor:"#E07A5F",fillColor:"#F2CC8F"},graph:{background:"#F4F1DE",gridColor:"#D4D0C0"}},{commonStyle:{fontColor:"#143642",strokeColor:"#0F8B8D",fillColor:"#FAE5C7"},edgeStyle:{strokeColor:"#A8201A"},
graph:{background:"#DAD2D8",gridColor:"#ABA4A9"}},{commonStyle:{fontColor:"#FEFAE0",strokeColor:"#DDA15E",fillColor:"#BC6C25"},graph:{background:"#283618",gridColor:"#48632C"}},{commonStyle:{fontColor:"#E4FDE1",strokeColor:"#028090",fillColor:"#F45B69"},graph:{background:"#114B5F",gridColor:"#0B3240"}},{},{vertexStyle:{strokeColor:"#D0CEE2",fillColor:"#FAD9D5"},edgeStyle:{strokeColor:"#09555B"},commonStyle:{fontColor:"#1A1A1A"}},{vertexStyle:{strokeColor:"#BAC8D3",fillColor:"#09555B",fontColor:"#EEEEEE"},
@@ -10224,28 +10225,28 @@ Editor.tweetImage=IMAGE_PATH+"/tweet.png";Editor.facebookImage=IMAGE_PATH+"/face
IMAGE_PATH+"/img-hi-res.png";Editor.loResImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAAA+CAMAAACLMWy1AAAAS1BMVEVAQEAAAAA1NTVBQUFDQ0NDQ0NFRUVERERBQUFBQUFBQUFAQEBBQUFBQUFCQkJCQkJCQkJBQUFCQkJDQ0NDQ0NCQkJCQkJCQkJGRkb5/XqTAAAAGXRSTlP+AAWODlASCsesX+Lc2LyWe3pwa1tCPjohjSJfoAAAAI1JREFUWMPt1MkKhTAMRuG0anvneXr/J71nUypKcdqI/N8yhLMKMZE1CahnClDQzMPB44ED3EgeCubgDWnWQMHpwTtKwTe+UHD4sJ94wbUEHHFGhILlYDeSnsQeabeCgsPBgB0MOZZ9oGA5GJFiJSfUULAfjLjARrhCwX7wh2YCDwVbwZkUBKqFFJRN+wOcwSgR2sREcgAAAABJRU5ErkJggg==":
IMAGE_PATH+"/img-lo-res.png";Editor.cameraLargeImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAAlwSFlzAAALEwAACxMBAJqcGAAAAVlpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IlhNUCBDb3JlIDUuNC4wIj4KICAgPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4KICAgICAgPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIKICAgICAgICAgICAgeG1sbnM6dGlmZj0iaHR0cDovL25zLmFkb2JlLmNvbS90aWZmLzEuMC8iPgogICAgICAgICA8dGlmZjpPcmllbnRhdGlvbj4xPC90aWZmOk9yaWVudGF0aW9uPgogICAgICA8L3JkZjpEZXNjcmlwdGlvbj4KICAgPC9yZGY6UkRGPgo8L3g6eG1wbWV0YT4KTMInWQAAA/BJREFUWAnFl0uIjWEYx885buPSuGwmSYwtwsY1ikKSNYNclmQnadgrZSPlsnBLSlaGBdNYKY0Vdi4L4zYzIqxGxmXG//d+7//0+uY7nWMiT/2/53mf+3v7vnNKpf9M5UbrDw8Pj4m+wzmeT1FBUS6Xf+YNox6reMONukijMXUTM3NmI75PyXcJPwRWg5kS7xysDLNmfEUxpx2rceNE50IlYjyRklcLf0prY+x4BTqfmx3ZUHQaO9ISGngYq38V/1EH+ECPa+QaK1u1kVBQirDMChiS3CTeIkwWvghtwhKBpZ8g1CO2B99FynVU/KowSRgQ3mlrBsVZ1awmQlS0SGbfXglfBPbdRGMm5O8RXg2P835pDCvzWjghTHETcLpZLHwS8kTCtBEK1SN83Egam8YxyVZqc+Do5qkwS+gT9grNwkUBG6cbsG/gs3BTuC/0ChCxq4QtwgzBMdwUZBPyN4Ftfi4sYPZHktbOSRlIuutRP5jYj0ueZp88xyYcS/zZoiLyQT1IA/cTj7eSlwnrhI+JnkQbCwo2Sx/2M7VJt17wdhVtgxvrpoFnAuSAbJQ97biZAlKxBfD9wgOhV+BgIR/AZtJ4kwD5PGSj7OmmekjWEy0oAQHAS3+KpBpzXqYK3UItopHpSRMno2N+cm7gDYnfRCcr3QBqriMHLJDkeyhFfiG5aVbK+8rhtP9M6QcIEJHX5Fp9NMAyQlYiu+OOJNlODCIXyka/P23bncTdiC7OydC1+v1Bsb+5r84DK8S3Rdmf5cRUFW3bXtWUSt1Rdk6G4SyJV2o1YId+vNUxr+x5yCJiapFtcxQzLjrxboGcMxvFJwEOKnLwjIbkx/sdSmeSaUY++SwTAxV+4DJT7RVwkbk46gNCsifIItuy0e9PF33Cb4homhN5YRyzL5q5V2VNkv98kqgoGTo3YF9CnMM5Y5rItFfvBSi9JulVXOgI+VwIntkt+SaZ6weQfcovJf7zpTfl86P/wAF7Fz18NeKwmvAWCaX0Z/uMHQr42ZxvR/Rxcw5xM+9J/CJq8w2gduDhmDgso/QrBH47dEXQ1IqczyHpIOfIRtnTtV7SwO1oKXKkU3fbToFGSDHtMWcaH1WBuVYnDbRFi99iqSMySdzxXckrazUh23KBVYGIcfNBkTxca0e4ATJ0KukGYVBgr/MnlhPOtQq/ksUfCbzh+EFCjtnCUoHfjhA/OsiTv2HcEvJMELp0VakZDliTmriTdPivxU4VmEhtPrGV+KJhO7ZKt0doFZh1fgZSBWIW2AGEHwg3BUWOnKtH+suqdw07tYMfglCrWPD5mw9qVYuniaXkT0OtWaSuo5LJTY1RBf+roF9X5+y/5qU+DAAAAABJRU5ErkJggg==";
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.errorImage="data:image/gif;base64,R0lGODlhEAAQAPcAAADGAIQAAISEhP8AAP///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////yH5BAEAAAAALAAAAAAQABAAAAhoAAEIFBigYMGBCAkGGMCQ4cGECxtKHBAAYUQCEzFSHLiQgMeGHjEGEAAg4oCQJz86LCkxpEqHAkwyRClxpEyXGmGaREmTIsmOL1GO/DkzI0yOE2sKIMlRJsWhCQHENDiUaVSpS5cmDAgAOw==";
-Editor.configurationKey=".configuration";Editor.settingsKey=".drawio-config";Editor.defaultCustomLibraries=[];Editor.enableCustomLibraries=!0;Editor.enableCustomProperties=!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.compressXml=!0;Editor.globalVars=null;Editor.shadowOptionEnabled=!mxClient.IS_SF;Editor.config=null;Editor.configVersion=
-null;Editor.defaultBorder=5;Editor.commonProperties=[{name:"comic",dispName:"Comic",type:"bool",defVal:!1,isVisible:function(a,b){return"1"!=mxUtils.getValue(a.style,"sketch","0")}},{name:"jiggle",dispName:"Jiggle",type:"float",min:0,defVal:1,isVisible:function(a,b){return"1"==mxUtils.getValue(a.style,"comic","0")||"1"==mxUtils.getValue(a.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"fillWeight",dispName:"Fill Weight",type:"int",defVal:-1,isVisible:function(a,b){return"1"==mxUtils.getValue(a.style,
-"sketch","1"==urlParams.rough?"1":"0")}},{name:"hachureGap",dispName:"Hachure Gap",type:"int",defVal:-1,isVisible:function(a,b){return"1"==mxUtils.getValue(a.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"hachureAngle",dispName:"Hachure Angle",type:"int",defVal:-41,isVisible:function(a,b){return"1"==mxUtils.getValue(a.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"curveFitting",dispName:"Curve Fitting",type:"float",defVal:.95,isVisible:function(a,b){return"1"==mxUtils.getValue(a.style,
-"sketch","1"==urlParams.rough?"1":"0")}},{name:"simplification",dispName:"Simplification",type:"float",defVal:0,min:0,max:1,isVisible:function(a,b){return"1"==mxUtils.getValue(a.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"disableMultiStroke",dispName:"Disable Multi Stroke",type:"bool",defVal:!1,isVisible:function(a,b){return"1"==mxUtils.getValue(a.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"disableMultiStrokeFill",dispName:"Disable Multi Stroke Fill",type:"bool",defVal:!1,isVisible:function(a,
-b){return"1"==mxUtils.getValue(a.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"dashOffset",dispName:"Dash Offset",type:"int",defVal:-1,isVisible:function(a,b){return"1"==mxUtils.getValue(a.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"dashGap",dispName:"Dash Gap",type:"int",defVal:-1,isVisible:function(a,b){return"1"==mxUtils.getValue(a.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"zigzagOffset",dispName:"ZigZag Offset",type:"int",defVal:-1,isVisible:function(a,b){return"1"==
-mxUtils.getValue(a.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"jiggle",dispName:"Jiggle",type:"float",min:0,defVal:1,isVisible:function(a,b){return"1"==mxUtils.getValue(a.style,"comic","0")||"1"==mxUtils.getValue(a.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"sketchStyle",dispName:"Sketch Style",type:"enum",defVal:"rough",enumList:[{val:"rough",dispName:"Rough"},{val:"comic",dispName:"Comic"}],isVisible:function(a,b){return"1"==mxUtils.getValue(a.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(a){return"orthogonalEdgeStyle"==mxUtils.getValue(a.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=[{type:"separator"},{name:"resizeLastRow",dispName:"Resize Last Row",type:"bool",getDefaultValue:function(a,b){var e=b.editorUi.editor.graph.getCellStyle(1==a.vertices.length&&0==a.edges.length?a.vertices[0]:null);return"1"==mxUtils.getValue(e,"resizeLastRow","0")},isVisible:function(a,b){var e=b.editorUi.editor.graph;return 1==
-a.vertices.length&&0==a.edges.length&&e.isTable(a.vertices[0])}},{name:"resizeLast",dispName:"Resize Last Column",type:"bool",getDefaultValue:function(a,b){var e=b.editorUi.editor.graph.getCellStyle(1==a.vertices.length&&0==a.edges.length?a.vertices[0]:null);return"1"==mxUtils.getValue(e,"resizeLast","0")},isVisible:function(a,b){var e=b.editorUi.editor.graph;return 1==a.vertices.length&&0==a.edges.length&&e.isTable(a.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(a,b){return b.editorUi.editor.graph.isCellConnectable(1==a.vertices.length&&0==a.edges.length?a.vertices[0]:null)},isVisible:function(a,b){return 1==a.vertices.length&&0==a.edges.length}},{name:"allowArrows",dispName:"Allow Arrows",type:"bool",defVal:!0},{name:"snapToPoint",dispName:"Snap to Point",type:"bool",defVal:!1},{name:"perimeter",dispName:"Perimeter",defVal:"none",type:"enum",enumList:[{val:"none",dispName:"None"},{val:"rectanglePerimeter",dispName:"Rectangle"},
-{val:"ellipsePerimeter",dispName:"Ellipse"},{val:"rhombusPerimeter",dispName:"Rhombus"},{val:"trianglePerimeter",dispName:"Triangle"},{val:"hexagonPerimeter2",dispName:"Hexagon"},{val:"lifelinePerimeter",dispName:"Lifeline"},{val:"orthogonalPerimeter",dispName:"Orthogonal"},{val:"backbonePerimeter",dispName:"Backbone"},{val:"calloutPerimeter",dispName:"Callout"},{val:"parallelogramPerimeter",dispName:"Parallelogram"},{val:"trapezoidPerimeter",dispName:"Trapezoid"},{val:"stepPerimeter",dispName:"Step"},
-{val:"centerPerimeter",dispName:"Center"}]},{name:"fixDash",dispName:"Fixed Dash",type:"bool",defVal:!1},{name:"autosize",dispName:"Autosize",type:"bool",defVal:!1},{name:"container",dispName:"Container",type:"bool",defVal:!1,isVisible:function(a,b){return 1==a.vertices.length&&0==a.edges.length}},{name:"dropTarget",dispName:"Drop Target",type:"bool",getDefaultValue:function(a,b){var e=1==a.vertices.length&&0==a.edges.length?a.vertices[0]:null,c=b.editorUi.editor.graph;return null!=e&&(c.isSwimlane(e)||
-0<c.model.getChildCount(e))},isVisible:function(a,b){return 1==a.vertices.length&&0==a.edges.length}},{name:"collapsible",dispName:"Collapsible",type:"bool",getDefaultValue:function(a,b){var e=1==a.vertices.length&&0==a.edges.length?a.vertices[0]:null,c=b.editorUi.editor.graph;return null!=e&&(c.isContainer(e)&&"0"!=a.style.collapsible||!c.isContainer(e)&&"1"==a.style.collapsible)},isVisible:function(a,b){return 1==a.vertices.length&&0==a.edges.length}},{name:"recursiveResize",dispName:"Resize Children",
-type:"bool",defVal:!0,isVisible:function(a,b){return 1==a.vertices.length&&0==a.edges.length&&!b.editorUi.editor.graph.isSwimlane(a.vertices[0])&&null==mxUtils.getValue(a.style,"childLayout",null)}},{name:"expand",dispName:"Expand",type:"bool",defVal:!0},{name:"part",dispName:"Part",type:"bool",defVal:!1,isVisible:function(a,b){var e=b.editorUi.editor.graph.model;return 0<a.vertices.length?e.isVertex(e.getParent(a.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(a,b){var e=0<a.vertices.length?b.editorUi.editor.graph.getCellGeometry(a.vertices[0]):null;return null!=e&&!e.relative}},{name:"resizable",dispName:"Resizable",type:"bool",defVal:!0},{name:"resizeWidth",dispName:"Resize Width",type:"bool",
-defVal:!1},{name:"resizeHeight",dispName:"Resize Height",type:"bool",defVal:!1},{name:"rotatable",dispName:"Rotatable",type:"bool",defVal:!0},{name:"cloneable",dispName:"Cloneable",type:"bool",defVal:!0},{name:"deletable",dispName:"Deletable",type:"bool",defVal:!0},{name:"treeFolding",dispName:"Tree Folding",type:"bool",defVal:!1},{name:"treeMoving",dispName:"Tree Moving",type:"bool",defVal:!1},{name:"pointerEvents",dispName:"Pointer Events",type:"bool",defVal:!0,isVisible:function(a,b){var e=mxUtils.getValue(a.style,
-mxConstants.STYLE_FILLCOLOR,null);return b.editorUi.editor.graph.isSwimlane(a.vertices[0])||null==e||e==mxConstants.NONE}},{name:"moveCells",dispName:"Move Cells on Fold",type:"bool",defVal:!1,isVisible:function(a,b){return 0<a.vertices.length&&b.editorUi.editor.graph.isContainer(a.vertices[0])}}].concat(Editor.commonProperties);Editor.defaultCsvValue='##\n## Example CSV import. Use ## for comments and # for configuration. Paste CSV below.\n## The following names are reserved and should not be used (or ignored):\n## id, tooltip, placeholder(s), link and label (see below)\n##\n#\n## Node label with placeholders and HTML.\n## Default is \'%name_of_first_column%\'.\n#\n# label: %name%<br><i style="color:gray;">%position%</i><br><a href="mailto:%email%">Email</a>\n#\n## Node style (placeholders are replaced once).\n## Default is the current style for nodes.\n#\n# style: label;image=%image%;whiteSpace=wrap;html=1;rounded=1;fillColor=%fill%;strokeColor=%stroke%;\n#\n## Parent style for nodes with child nodes (placeholders are replaced once).\n#\n# parentstyle: swimlane;whiteSpace=wrap;html=1;childLayout=stackLayout;horizontal=1;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;\n#\n## Optional column name that contains a reference to a named style in styles.\n## Default is the current style for nodes.\n#\n# stylename: -\n#\n## JSON for named styles of the form {"name": "style", "name": "style"} where style is a cell style with\n## placeholders that are replaced once.\n#\n# styles: -\n#\n## JSON for variables in styles of the form {"name": "value", "name": "value"} where name is a string\n## that will replace a placeholder in a style.\n#\n# vars: -\n#\n## Optional column name that contains a reference to a named label in labels.\n## Default is the current label.\n#\n# labelname: -\n#\n## JSON for named labels of the form {"name": "label", "name": "label"} where label is a cell label with\n## placeholders.\n#\n# labels: -\n#\n## Uses the given column name as the identity for cells (updates existing cells).\n## Default is no identity (empty value or -).\n#\n# identity: -\n#\n## Uses the given column name as the parent reference for cells. Default is no parent (empty or -).\n## The identity above is used for resolving the reference so it must be specified.\n#\n# parent: -\n#\n## Adds a prefix to the identity of cells to make sure they do not collide with existing cells (whose\n## IDs are numbers from 0..n, sometimes with a GUID prefix in the context of realtime collaboration).\n## Default is csvimport-.\n#\n# namespace: csvimport-\n#\n## Connections between rows ("from": source colum, "to": target column).\n## Label, style and invert are optional. Defaults are \'\', current style and false.\n## If placeholders are used in the style, they are replaced with data from the source.\n## An optional placeholders can be set to target to use data from the target instead.\n## In addition to label, an optional fromlabel and tolabel can be used to name the column\n## that contains the text for the label in the edges source or target (invert ignored).\n## In addition to those, an optional source and targetlabel can be used to specify a label\n## that contains placeholders referencing the respective columns in the source or target row.\n## The label is created in the form fromlabel + sourcelabel + label + tolabel + targetlabel.\n## Additional labels can be added by using an optional labels array with entries of the\n## form {"label": string, "x": number, "y": number, "dx": number, "dy": number} where\n## x is from -1 to 1 along the edge, y is orthogonal, and dx/dy are offsets in pixels.\n## An optional placeholders with the string value "source" or "target" can be specified\n## to replace placeholders in the additional label with data from the source or target.\n## The target column may contain a comma-separated list of values.\n## Multiple connect entries are allowed.\n#\n# connect: {"from": "manager", "to": "name", "invert": true, "label": "manages", \\\n# "style": "curved=1;endArrow=blockThin;endFill=1;fontSize=11;"}\n# connect: {"from": "refs", "to": "id", "style": "curved=1;fontSize=11;"}\n#\n## Node x-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# left: \n#\n## Node y-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# top: \n#\n## Node width. Possible value is a number (in px), auto or an @ sign followed by a column\n## name that contains the value for the width. Default is auto.\n#\n# width: auto\n#\n## Node height. Possible value is a number (in px), auto or an @ sign followed by a column\n## name that contains the value for the height. Default is auto.\n#\n# height: auto\n#\n## Padding for autosize. Default is 0.\n#\n# padding: -12\n#\n## Comma-separated list of ignored columns for metadata. (These can be\n## used for connections and styles but will not be added as metadata.)\n#\n# ignore: id,image,fill,stroke,refs,manager\n#\n## Column to be renamed to link attribute (used as link).\n#\n# link: url\n#\n## Spacing between nodes. Default is 40.\n#\n# nodespacing: 40\n#\n## Spacing between levels of hierarchical layouts. Default is 100.\n#\n# levelspacing: 100\n#\n## Spacing between parallel edges. Default is 40. Use 0 to disable.\n#\n# edgespacing: 40\n#\n## Name or JSON of layout. Possible values are auto, none, verticaltree, horizontaltree,\n## verticalflow, horizontalflow, organic, circle or a JSON string as used in Layout, Apply.\n## Default is auto.\n#\n# layout: auto\n#\n## ---- CSV below this line. First line are column names. ----\nname,position,id,location,manager,email,fill,stroke,refs,url,image\nTessa Miller,CFO,emi,Office 1,,me@example.com,#dae8fc,#6c8ebf,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-3-128.png\nEdward Morrison,Brand Manager,emo,Office 2,Tessa Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-10-3-128.png\nAlison Donovan,System Admin,rdo,Office 3,Tessa Miller,me@example.com,#d5e8d4,#82b366,"emo,tva",https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-2-128.png\nEvan Valet,HR Director,tva,Office 4,Tessa Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-9-2-128.png\n';
+Editor.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.compressXml=!0;Editor.globalVars=null;Editor.shadowOptionEnabled=!mxClient.IS_SF;Editor.config=
+null;Editor.configVersion=null;Editor.defaultBorder=5;Editor.commonProperties=[{name:"comic",dispName:"Comic",type:"bool",defVal:!1,isVisible:function(a,b){return"1"!=mxUtils.getValue(a.style,"sketch","0")}},{name:"jiggle",dispName:"Jiggle",type:"float",min:0,defVal:1,isVisible:function(a,b){return"1"==mxUtils.getValue(a.style,"comic","0")||"1"==mxUtils.getValue(a.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"fillWeight",dispName:"Fill Weight",type:"int",defVal:-1,isVisible:function(a,b){return"1"==
+mxUtils.getValue(a.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"hachureGap",dispName:"Hachure Gap",type:"int",defVal:-1,isVisible:function(a,b){return"1"==mxUtils.getValue(a.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"hachureAngle",dispName:"Hachure Angle",type:"int",defVal:-41,isVisible:function(a,b){return"1"==mxUtils.getValue(a.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"curveFitting",dispName:"Curve Fitting",type:"float",defVal:.95,isVisible:function(a,b){return"1"==
+mxUtils.getValue(a.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"simplification",dispName:"Simplification",type:"float",defVal:0,min:0,max:1,isVisible:function(a,b){return"1"==mxUtils.getValue(a.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"disableMultiStroke",dispName:"Disable Multi Stroke",type:"bool",defVal:!1,isVisible:function(a,b){return"1"==mxUtils.getValue(a.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"disableMultiStrokeFill",dispName:"Disable Multi Stroke Fill",type:"bool",
+defVal:!1,isVisible:function(a,b){return"1"==mxUtils.getValue(a.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"dashOffset",dispName:"Dash Offset",type:"int",defVal:-1,isVisible:function(a,b){return"1"==mxUtils.getValue(a.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"dashGap",dispName:"Dash Gap",type:"int",defVal:-1,isVisible:function(a,b){return"1"==mxUtils.getValue(a.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"zigzagOffset",dispName:"ZigZag Offset",type:"int",defVal:-1,isVisible:function(a,
+b){return"1"==mxUtils.getValue(a.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"jiggle",dispName:"Jiggle",type:"float",min:0,defVal:1,isVisible:function(a,b){return"1"==mxUtils.getValue(a.style,"comic","0")||"1"==mxUtils.getValue(a.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"sketchStyle",dispName:"Sketch Style",type:"enum",defVal:"rough",enumList:[{val:"rough",dispName:"Rough"},{val:"comic",dispName:"Comic"}],isVisible:function(a,b){return"1"==mxUtils.getValue(a.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(a){return"orthogonalEdgeStyle"==mxUtils.getValue(a.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=[{type:"separator"},{name:"resizeLastRow",dispName:"Resize Last Row",type:"bool",getDefaultValue:function(a,b){var e=b.editorUi.editor.graph.getCellStyle(1==a.vertices.length&&0==a.edges.length?a.vertices[0]:null);return"1"==mxUtils.getValue(e,"resizeLastRow","0")},isVisible:function(a,
+b){var e=b.editorUi.editor.graph;return 1==a.vertices.length&&0==a.edges.length&&e.isTable(a.vertices[0])}},{name:"resizeLast",dispName:"Resize Last Column",type:"bool",getDefaultValue:function(a,b){var e=b.editorUi.editor.graph.getCellStyle(1==a.vertices.length&&0==a.edges.length?a.vertices[0]:null);return"1"==mxUtils.getValue(e,"resizeLast","0")},isVisible:function(a,b){var e=b.editorUi.editor.graph;return 1==a.vertices.length&&0==a.edges.length&&e.isTable(a.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(a,b){return b.editorUi.editor.graph.isCellConnectable(1==a.vertices.length&&0==a.edges.length?a.vertices[0]:null)},isVisible:function(a,b){return 1==a.vertices.length&&0==a.edges.length}},{name:"allowArrows",dispName:"Allow Arrows",type:"bool",defVal:!0},{name:"snapToPoint",dispName:"Snap to Point",type:"bool",defVal:!1},{name:"perimeter",dispName:"Perimeter",defVal:"none",type:"enum",enumList:[{val:"none",dispName:"None"},{val:"rectanglePerimeter",
+dispName:"Rectangle"},{val:"ellipsePerimeter",dispName:"Ellipse"},{val:"rhombusPerimeter",dispName:"Rhombus"},{val:"trianglePerimeter",dispName:"Triangle"},{val:"hexagonPerimeter2",dispName:"Hexagon"},{val:"lifelinePerimeter",dispName:"Lifeline"},{val:"orthogonalPerimeter",dispName:"Orthogonal"},{val:"backbonePerimeter",dispName:"Backbone"},{val:"calloutPerimeter",dispName:"Callout"},{val:"parallelogramPerimeter",dispName:"Parallelogram"},{val:"trapezoidPerimeter",dispName:"Trapezoid"},{val:"stepPerimeter",
+dispName:"Step"},{val:"centerPerimeter",dispName:"Center"}]},{name:"fixDash",dispName:"Fixed Dash",type:"bool",defVal:!1},{name:"autosize",dispName:"Autosize",type:"bool",defVal:!1},{name:"container",dispName:"Container",type:"bool",defVal:!1,isVisible:function(a,b){return 1==a.vertices.length&&0==a.edges.length}},{name:"dropTarget",dispName:"Drop Target",type:"bool",getDefaultValue:function(a,b){var e=1==a.vertices.length&&0==a.edges.length?a.vertices[0]:null,c=b.editorUi.editor.graph;return null!=
+e&&(c.isSwimlane(e)||0<c.model.getChildCount(e))},isVisible:function(a,b){return 1==a.vertices.length&&0==a.edges.length}},{name:"collapsible",dispName:"Collapsible",type:"bool",getDefaultValue:function(a,b){var e=1==a.vertices.length&&0==a.edges.length?a.vertices[0]:null,c=b.editorUi.editor.graph;return null!=e&&(c.isContainer(e)&&"0"!=a.style.collapsible||!c.isContainer(e)&&"1"==a.style.collapsible)},isVisible:function(a,b){return 1==a.vertices.length&&0==a.edges.length}},{name:"recursiveResize",
+dispName:"Resize Children",type:"bool",defVal:!0,isVisible:function(a,b){return 1==a.vertices.length&&0==a.edges.length&&!b.editorUi.editor.graph.isSwimlane(a.vertices[0])&&null==mxUtils.getValue(a.style,"childLayout",null)}},{name:"expand",dispName:"Expand",type:"bool",defVal:!0},{name:"part",dispName:"Part",type:"bool",defVal:!1,isVisible:function(a,b){var e=b.editorUi.editor.graph.model;return 0<a.vertices.length?e.isVertex(e.getParent(a.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(a,b){var e=0<a.vertices.length?b.editorUi.editor.graph.getCellGeometry(a.vertices[0]):null;return null!=e&&!e.relative}},{name:"resizable",dispName:"Resizable",type:"bool",defVal:!0},{name:"resizeWidth",
+dispName:"Resize Width",type:"bool",defVal:!1},{name:"resizeHeight",dispName:"Resize Height",type:"bool",defVal:!1},{name:"rotatable",dispName:"Rotatable",type:"bool",defVal:!0},{name:"cloneable",dispName:"Cloneable",type:"bool",defVal:!0},{name:"deletable",dispName:"Deletable",type:"bool",defVal:!0},{name:"treeFolding",dispName:"Tree Folding",type:"bool",defVal:!1},{name:"treeMoving",dispName:"Tree Moving",type:"bool",defVal:!1},{name:"pointerEvents",dispName:"Pointer Events",type:"bool",defVal:!0,
+isVisible:function(a,b){var e=mxUtils.getValue(a.style,mxConstants.STYLE_FILLCOLOR,null);return b.editorUi.editor.graph.isSwimlane(a.vertices[0])||null==e||e==mxConstants.NONE}},{name:"moveCells",dispName:"Move Cells on Fold",type:"bool",defVal:!1,isVisible:function(a,b){return 0<a.vertices.length&&b.editorUi.editor.graph.isContainer(a.vertices[0])}}].concat(Editor.commonProperties);Editor.defaultCsvValue='##\n## Example CSV import. Use ## for comments and # for configuration. Paste CSV below.\n## The following names are reserved and should not be used (or ignored):\n## id, tooltip, placeholder(s), link and label (see below)\n##\n#\n## Node label with placeholders and HTML.\n## Default is \'%name_of_first_column%\'.\n#\n# label: %name%<br><i style="color:gray;">%position%</i><br><a href="mailto:%email%">Email</a>\n#\n## Node style (placeholders are replaced once).\n## Default is the current style for nodes.\n#\n# style: label;image=%image%;whiteSpace=wrap;html=1;rounded=1;fillColor=%fill%;strokeColor=%stroke%;\n#\n## Parent style for nodes with child nodes (placeholders are replaced once).\n#\n# parentstyle: swimlane;whiteSpace=wrap;html=1;childLayout=stackLayout;horizontal=1;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;\n#\n## Optional column name that contains a reference to a named style in styles.\n## Default is the current style for nodes.\n#\n# stylename: -\n#\n## JSON for named styles of the form {"name": "style", "name": "style"} where style is a cell style with\n## placeholders that are replaced once.\n#\n# styles: -\n#\n## JSON for variables in styles of the form {"name": "value", "name": "value"} where name is a string\n## that will replace a placeholder in a style.\n#\n# vars: -\n#\n## Optional column name that contains a reference to a named label in labels.\n## Default is the current label.\n#\n# labelname: -\n#\n## JSON for named labels of the form {"name": "label", "name": "label"} where label is a cell label with\n## placeholders.\n#\n# labels: -\n#\n## Uses the given column name as the identity for cells (updates existing cells).\n## Default is no identity (empty value or -).\n#\n# identity: -\n#\n## Uses the given column name as the parent reference for cells. Default is no parent (empty or -).\n## The identity above is used for resolving the reference so it must be specified.\n#\n# parent: -\n#\n## Adds a prefix to the identity of cells to make sure they do not collide with existing cells (whose\n## IDs are numbers from 0..n, sometimes with a GUID prefix in the context of realtime collaboration).\n## Default is csvimport-.\n#\n# namespace: csvimport-\n#\n## Connections between rows ("from": source colum, "to": target column).\n## Label, style and invert are optional. Defaults are \'\', current style and false.\n## If placeholders are used in the style, they are replaced with data from the source.\n## An optional placeholders can be set to target to use data from the target instead.\n## In addition to label, an optional fromlabel and tolabel can be used to name the column\n## that contains the text for the label in the edges source or target (invert ignored).\n## In addition to those, an optional source and targetlabel can be used to specify a label\n## that contains placeholders referencing the respective columns in the source or target row.\n## The label is created in the form fromlabel + sourcelabel + label + tolabel + targetlabel.\n## Additional labels can be added by using an optional labels array with entries of the\n## form {"label": string, "x": number, "y": number, "dx": number, "dy": number} where\n## x is from -1 to 1 along the edge, y is orthogonal, and dx/dy are offsets in pixels.\n## An optional placeholders with the string value "source" or "target" can be specified\n## to replace placeholders in the additional label with data from the source or target.\n## The target column may contain a comma-separated list of values.\n## Multiple connect entries are allowed.\n#\n# connect: {"from": "manager", "to": "name", "invert": true, "label": "manages", \\\n# "style": "curved=1;endArrow=blockThin;endFill=1;fontSize=11;"}\n# connect: {"from": "refs", "to": "id", "style": "curved=1;fontSize=11;"}\n#\n## Node x-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# left: \n#\n## Node y-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# top: \n#\n## Node width. Possible value is a number (in px), auto or an @ sign followed by a column\n## name that contains the value for the width. Default is auto.\n#\n# width: auto\n#\n## Node height. Possible value is a number (in px), auto or an @ sign followed by a column\n## name that contains the value for the height. Default is auto.\n#\n# height: auto\n#\n## Padding for autosize. Default is 0.\n#\n# padding: -12\n#\n## Comma-separated list of ignored columns for metadata. (These can be\n## used for connections and styles but will not be added as metadata.)\n#\n# ignore: id,image,fill,stroke,refs,manager\n#\n## Column to be renamed to link attribute (used as link).\n#\n# link: url\n#\n## Spacing between nodes. Default is 40.\n#\n# nodespacing: 40\n#\n## Spacing between levels of hierarchical layouts. Default is 100.\n#\n# levelspacing: 100\n#\n## Spacing between parallel edges. Default is 40. Use 0 to disable.\n#\n# edgespacing: 40\n#\n## Name or JSON of layout. Possible values are auto, none, verticaltree, horizontaltree,\n## verticalflow, horizontalflow, organic, circle or a JSON string as used in Layout, Apply.\n## Default is auto.\n#\n# layout: auto\n#\n## ---- CSV below this line. First line are column names. ----\nname,position,id,location,manager,email,fill,stroke,refs,url,image\nTessa Miller,CFO,emi,Office 1,,me@example.com,#dae8fc,#6c8ebf,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-3-128.png\nEdward Morrison,Brand Manager,emo,Office 2,Tessa Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-10-3-128.png\nAlison Donovan,System Admin,rdo,Office 3,Tessa Miller,me@example.com,#d5e8d4,#82b366,"emo,tva",https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-2-128.png\nEvan Valet,HR Director,tva,Office 4,Tessa Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-9-2-128.png\n';
Editor.createRoughCanvas=function(a){var b=rough.canvas({getContext:function(){return a}});b.draw=function(b){var e=b.sets||[];b=b.options||this.getDefaultOptions();for(var c=0;c<e.length;c++){var d=e[c];switch(d.type){case "path":null!=b.stroke&&this._drawToContext(a,d,b);break;case "fillPath":this._drawToContext(a,d,b);break;case "fillSketch":this.fillSketch(a,d,b)}}};b.fillSketch=function(b,e,c){var d=a.state.strokeColor,k=a.state.strokeWidth,l=a.state.strokeAlpha,f=a.state.dashed,g=c.fillWeight;
0>g&&(g=c.strokeWidth/2);a.setStrokeAlpha(a.state.fillAlpha);a.setStrokeColor(c.fill||"");a.setStrokeWidth(g);a.setDashed(!1);this._drawToContext(b,e,c);a.setDashed(f);a.setStrokeWidth(k);a.setStrokeColor(d);a.setStrokeAlpha(l)};b._drawToContext=function(a,b,e){a.begin();for(var c=0;c<b.ops.length;c++){var d=b.ops[c],k=d.data;switch(d.op){case "move":a.moveTo(k[0],k[1]);break;case "bcurveTo":a.curveTo(k[0],k[1],k[2],k[3],k[4],k[5]);break;case "lineTo":a.lineTo(k[0],k[1])}}a.end();"fillPath"===b.type&&
e.filled?a.fill():a.stroke()};return b};(function(){function a(b,e,c){this.canvas=b;this.rc=e;this.shape=c;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.originalBegin=this.canvas.begin;this.canvas.begin=mxUtils.bind(this,a.prototype.begin);this.originalEnd=this.canvas.end;this.canvas.end=mxUtils.bind(this,a.prototype.end);this.originalRect=this.canvas.rect;this.canvas.rect=mxUtils.bind(this,a.prototype.rect);this.originalRoundrect=this.canvas.roundrect;this.canvas.roundrect=
@@ -10275,7 +10276,7 @@ b.length&&(b=a[b[1]],null!=b&&(b=/.* \/Subject (\d+) (\d+) R/g.exec(b.join("\n")
2)),{to:"string"}).replace(/\+/g," "),null!=a&&0<a.length&&(b=a))):"tEXt"==e&&(a=a.split(String.fromCharCode(0)),1<a.length&&("mxGraphModel"==a[0]||"mxfile"==a[0])&&(b=a[1]));if(null!=b||"IDAT"==e)return!0}))}catch(V){}null!=b&&"%"==b.charAt(0)&&(b=decodeURIComponent(b));null!=b&&"%"==b.charAt(0)&&(b=decodeURIComponent(b));return b};Editor.extractParserError=function(a,b){var e=null,c=null!=a?a.getElementsByTagName("parsererror"):null;null!=c&&0<c.length&&(e=b||mxResources.get("invalidChars"),c=c[0].getElementsByTagName("div"),
0<c.length&&(e=mxUtils.getTextContent(c[0])));return null!=e?mxUtils.trim(e):e};Editor.addRetryToError=function(a,b){if(null!=a){var e=null!=a.error?a.error:a;null==e.retry&&(e.retry=b)}};Editor.configure=function(a,b){if(null!=a){Editor.config=a;Editor.configVersion=a.version;Menus.prototype.defaultFonts=a.defaultFonts||Menus.prototype.defaultFonts;ColorDialog.prototype.presetColors=a.presetColors||ColorDialog.prototype.presetColors;ColorDialog.prototype.defaultColors=a.defaultColors||ColorDialog.prototype.defaultColors;
ColorDialog.prototype.colorNames=a.colorNames||ColorDialog.prototype.colorNames;StyleFormatPanel.prototype.defaultColorSchemes=a.defaultColorSchemes||StyleFormatPanel.prototype.defaultColorSchemes;Graph.prototype.defaultEdgeLength=a.defaultEdgeLength||Graph.prototype.defaultEdgeLength;DrawioFile.prototype.autosaveDelay=a.autosaveDelay||DrawioFile.prototype.autosaveDelay;null!=a.templateFile&&(EditorUi.templateFile=a.templateFile);null!=a.styles&&(Editor.styles=a.styles);null!=a.globalVars&&(Editor.globalVars=
-a.globalVars);null!=a.compressXml&&(Editor.compressXml=a.compressXml);null!=a.simpleLabels&&(Editor.simpleLabels=a.simpleLabels);a.customFonts&&(Menus.prototype.defaultFonts=a.customFonts.concat(Menus.prototype.defaultFonts));a.customPresetColors&&(ColorDialog.prototype.presetColors=a.customPresetColors.concat(ColorDialog.prototype.presetColors));null!=a.customColorSchemes&&(StyleFormatPanel.prototype.defaultColorSchemes=a.customColorSchemes.concat(StyleFormatPanel.prototype.defaultColorSchemes));
+a.globalVars);null!=a.compressXml&&(Editor.compressXml=a.compressXml);null!=a.includeDiagram&&(Editor.defaultIncludeDiagram=a.includeDiagram);null!=a.simpleLabels&&(Editor.simpleLabels=a.simpleLabels);a.customFonts&&(Menus.prototype.defaultFonts=a.customFonts.concat(Menus.prototype.defaultFonts));a.customPresetColors&&(ColorDialog.prototype.presetColors=a.customPresetColors.concat(ColorDialog.prototype.presetColors));null!=a.customColorSchemes&&(StyleFormatPanel.prototype.defaultColorSchemes=a.customColorSchemes.concat(StyleFormatPanel.prototype.defaultColorSchemes));
if(null!=a.css){var e=document.createElement("style");e.setAttribute("type","text/css");e.appendChild(document.createTextNode(a.css));var c=document.getElementsByTagName("script")[0];c.parentNode.insertBefore(e,c)}null!=a.libraries&&(Sidebar.prototype.customEntries=a.libraries);null!=a.enabledLibraries&&(Sidebar.prototype.enabledLibraries=a.enabledLibraries);null!=a.defaultLibraries&&(Sidebar.prototype.defaultEntries=a.defaultLibraries);null!=a.defaultCustomLibraries&&(Editor.defaultCustomLibraries=
a.defaultCustomLibraries);null!=a.enableCustomLibraries&&(Editor.enableCustomLibraries=a.enableCustomLibraries);null!=a.defaultVertexStyle&&(Graph.prototype.defaultVertexStyle=a.defaultVertexStyle);null!=a.defaultEdgeStyle&&(Graph.prototype.defaultEdgeStyle=a.defaultEdgeStyle);null!=a.zoomFactor&&(e=parseFloat(a.zoomFactor),!isNaN(e)&&1<e&&(Graph.prototype.zoomFactor=e));null!=a.gridSteps&&(e=parseInt(a.gridSteps),!isNaN(e)&&0<e&&(mxGraphView.prototype.gridSteps=e));null!=a.pageFormat&&(e=parseInt(a.pageFormat.width),
c=parseInt(a.pageFormat.height),!isNaN(e)&&0<e&&!isNaN(c)&&0<c&&(mxGraph.prototype.defaultPageFormat=new mxRectangle(0,0,e,c),mxGraph.prototype.pageFormat=mxGraph.prototype.defaultPageFormat));a.thumbWidth&&(Sidebar.prototype.thumbWidth=a.thumbWidth);a.thumbHeight&&(Sidebar.prototype.thumbHeight=a.thumbHeight);a.emptyLibraryXml&&(EditorUi.prototype.emptyLibraryXml=a.emptyLibraryXml);a.sidebarWidth&&(EditorUi.prototype.hsplitPosition=a.sidebarWidth);a.fontCss&&Editor.configureFontCss(a.fontCss);null!=
@@ -10286,8 +10287,8 @@ null!=urlParams.edit?decodeURIComponent(urlParams.edit):null;Editor.prototype.cr
"default-style2";if("1"==urlParams.embed||null!=e&&""!=e)e!=this.graph.currentStyle&&(c=null!=this.graph.themes?this.graph.themes[e]:mxUtils.load(STYLE_PATH+"/"+e+".xml").getDocumentElement(),null!=c&&(d=new mxCodec(c.ownerDocument),d.decode(c,this.graph.getStylesheet())));else if(c=null!=this.graph.themes?this.graph.themes["default-old"]:mxUtils.load(STYLE_PATH+"/default-old.xml").getDocumentElement(),null!=c){var d=new mxCodec(c.ownerDocument);d.decode(c,this.graph.getStylesheet())}this.graph.currentStyle=
e;this.graph.mathEnabled="1"==urlParams.math||"1"==b.getAttribute("math");e=b.getAttribute("backgroundImage");null!=e?this.graph.setBackgroundImage(this.graph.parseBackgroundImage(e)):this.graph.setBackgroundImage(null);mxClient.NO_FO=this.graph.mathEnabled&&!this.useForeignObjectForMath?!0:this.originalNoForeignObject;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();this.graph.setShadowVisible("1"==b.getAttribute("shadow"),
!1);if(e=b.getAttribute("extFonts"))try{for(e=e.split("|").map(function(a){a=a.split("^");return{name:a[0],url:a[1]}}),c=0;c<e.length;c++)this.graph.addExtFont(e[c].name,e[c].url)}catch(V){console.log("ExtFonts format error: "+V.message)}else null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(this.graph.extFonts=[])}a.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(a){a=null!=a?a:!0;var b=d.apply(this,arguments);null!=this.graph.currentStyle&&"default-style2"!=this.graph.currentStyle&&b.setAttribute("style",this.graph.currentStyle);var e=this.graph.getBackgroundImageObject(this.graph.backgroundImage);null!=e&&b.setAttribute("backgroundImage",JSON.stringify(e));b.setAttribute("math",this.graph.mathEnabled?"1":"0");b.setAttribute("shadow",this.graph.shadowVisible?"1":"0");null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(e=this.graph.extFonts.map(function(a){return a.name+
-"^"+a.url}),b.setAttribute("extFonts",e.join("|")));return b};Editor.prototype.isDataSvg=function(a){try{var b=mxUtils.parseXml(a).documentElement.getAttribute("content");if(null!=b&&(null!=b&&"<"!=b.charAt(0)&&"%"!=b.charAt(0)&&(b=unescape(window.atob?atob(b):Base64.decode(cont,b))),null!=b&&"%"==b.charAt(0)&&(b=decodeURIComponent(b)),null!=b&&0<b.length)){var e=mxUtils.parseXml(b).documentElement;return"mxfile"==e.nodeName||"mxGraphModel"==e.nodeName}}catch(L){}return!1};Editor.prototype.extractGraphModel=
+function(a,b){a=null!=a?a:!0;var e=d.apply(this,arguments);null!=this.graph.currentStyle&&"default-style2"!=this.graph.currentStyle&&e.setAttribute("style",this.graph.currentStyle);var c=this.graph.getBackgroundImageObject(this.graph.backgroundImage,b);null!=c&&e.setAttribute("backgroundImage",JSON.stringify(c));e.setAttribute("math",this.graph.mathEnabled?"1":"0");e.setAttribute("shadow",this.graph.shadowVisible?"1":"0");null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(c=this.graph.extFonts.map(function(a){return a.name+
+"^"+a.url}),e.setAttribute("extFonts",c.join("|")));return e};Editor.prototype.isDataSvg=function(a){try{var b=mxUtils.parseXml(a).documentElement.getAttribute("content");if(null!=b&&(null!=b&&"<"!=b.charAt(0)&&"%"!=b.charAt(0)&&(b=unescape(window.atob?atob(b):Base64.decode(cont,b))),null!=b&&"%"==b.charAt(0)&&(b=decodeURIComponent(b)),null!=b&&0<b.length)){var e=mxUtils.parseXml(b).documentElement;return"mxfile"==e.nodeName||"mxGraphModel"==e.nodeName}}catch(L){}return!1};Editor.prototype.extractGraphModel=
function(a,b,e){return Editor.extractGraphModel.apply(this,arguments)};var c=Editor.prototype.resetGraph;Editor.prototype.resetGraph=function(){this.graph.mathEnabled="1"==urlParams.math;this.graph.view.x0=null;this.graph.view.y0=null;mxClient.NO_FO=this.graph.mathEnabled&&!this.useForeignObjectForMath?!0:this.originalNoForeignObject;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();c.apply(this,arguments)};
var b=Editor.prototype.updateGraphComponents;Editor.prototype.updateGraphComponents=function(){b.apply(this,arguments);mxClient.NO_FO=this.graph.mathEnabled&&!this.useForeignObjectForMath&&null!=Editor.MathJaxRender?!0:this.originalNoForeignObject;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform()};Editor.mathJaxWebkitCss="div.MathJax_SVG_Display { position: static; }\nspan.MathJax_SVG { position: static !important; }";
Editor.initMath=function(a,b){if("undefined"===typeof window.MathJax){a=(null!=a?a:DRAW_MATH_URL+"/MathJax.js")+"?config=TeX-MML-AM_"+("html"==urlParams["math-output"]?"HTMLorMML":"SVG")+"-full";Editor.mathJaxQueue=[];Editor.doMathJaxRender=function(a){window.setTimeout(function(){"hidden"!=a.style.visibility&&MathJax.Hub.Queue(["Typeset",MathJax.Hub,a])},0)};var e=null!=urlParams["math-font"]?decodeURIComponent(urlParams["math-font"]):"TeX";b=null!=b?b:{"HTML-CSS":{availableFonts:[e],imageFont:null},
@@ -10310,11 +10311,11 @@ else if("eot"==f||/(\.eot)($|\?)/i.test(a))b="application/vnd.ms-fontobject";els
function(a){null!=this.fontCss&&null==this.resolvedFontCss?this.embedCssFonts(this.fontCss,mxUtils.bind(this,function(b){this.resolvedFontCss=b;a()})):a()};Editor.prototype.embedExtFonts=function(a){var b=this.graph.getCustomFonts();if(0<b.length){var e="",c=0;null==this.cachedGoogleFonts&&(this.cachedGoogleFonts={});for(var d=mxUtils.bind(this,function(){0==c&&this.embedCssFonts(e,a)}),k=0;k<b.length;k++)mxUtils.bind(this,function(a,b){Graph.isCssFontUrl(b)?null==this.cachedGoogleFonts[b]?(c++,this.loadUrl(b,
mxUtils.bind(this,function(a){this.cachedGoogleFonts[b]=a;e+=a;c--;d()}),mxUtils.bind(this,function(a){c--;e+="@import url("+b+");";d()}))):e+=this.cachedGoogleFonts[b]:e+='@font-face {font-family: "'+a+'";src: url("'+b+'")}'})(b[k].name,b[k].url);d()}else a()};Editor.prototype.addMathCss=function(a){a=a.getElementsByTagName("defs");if(null!=a&&0<a.length)for(var b=document.getElementsByTagName("style"),e=0;e<b.length;e++)0<mxUtils.getTextContent(b[e]).indexOf("MathJax")&&a[0].appendChild(b[e].cloneNode(!0))};
Editor.prototype.addFontCss=function(a,b){b=null!=b?b:this.absoluteCssFonts(this.fontCss);if(null!=b){var e=a.getElementsByTagName("defs"),c=a.ownerDocument;0==e.length?(e=null!=c.createElementNS?c.createElementNS(mxConstants.NS_SVG,"defs"):c.createElement("defs"),null!=a.firstChild?a.insertBefore(e,a.firstChild):a.appendChild(e)):e=e[0];c=null!=c.createElementNS?c.createElementNS(mxConstants.NS_SVG,"style"):c.createElement("style");c.setAttribute("type","text/css");mxUtils.setTextContent(c,b);e.appendChild(c)}};
-Editor.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||this.useCanvasForExport};Editor.prototype.getMaxCanvasScale=function(a,b,e){var c=mxClient.IS_FF?8192:16384;return Math.min(e,Math.min(c/a,c/b))};Editor.prototype.exportToCanvas=function(a,b,e,c,d,k,l,f,g,n,p,m,q,x,u,t,A,z){try{k=null!=k?k:!0;l=null!=l?l:!0;m=null!=m?m:this.graph;q=null!=q?q:0;var v=g?null:m.background;v==mxConstants.NONE&&(v=null);null==v&&(v=c);null==v&&0==g&&(v=t?this.graph.defaultPageBackgroundColor:"#ffffff");
-this.convertImages(m.getSvg(null,null,q,x,null,l,null,null,null,n,null,t,A,z),mxUtils.bind(this,function(e){try{var c=new Image;c.onload=mxUtils.bind(this,function(){try{var l=function(){mxClient.IS_SF?window.setTimeout(function(){x.drawImage(c,0,0);a(g,e)},0):(x.drawImage(c,0,0),a(g,e))},g=document.createElement("canvas"),n=parseInt(e.getAttribute("width")),p=parseInt(e.getAttribute("height"));f=null!=f?f:1;null!=b&&(f=k?Math.min(1,Math.min(3*b/(4*p),b/n)):b/n);f=this.getMaxCanvasScale(n,p,f);n=
-Math.ceil(f*n);p=Math.ceil(f*p);g.setAttribute("width",n);g.setAttribute("height",p);var x=g.getContext("2d");null!=v&&(x.beginPath(),x.rect(0,0,n,p),x.fillStyle=v,x.fill());1!=f&&x.scale(f,f);if(u){var t=m.view,A=t.scale;t.scale=1;var z=btoa(unescape(encodeURIComponent(t.createSvgGrid(t.gridColor))));t.scale=A;var z="data:image/svg+xml;base64,"+z,I=m.gridSize*t.gridSteps*f,B=m.getGraphBounds(),E=t.translate.x*A,y=t.translate.y*A,H=E+(B.x-E)/A-q,N=y+(B.y-y)/A-q,J=new Image;J.onload=function(){try{for(var a=
--Math.round(I-mxUtils.mod((E-H)*f,I)),b=-Math.round(I-mxUtils.mod((y-N)*f,I));a<n;a+=I)for(var e=b;e<p;e+=I)x.drawImage(J,a/f,e/f);l()}catch(sa){null!=d&&d(sa)}};J.onerror=function(a){null!=d&&d(a)};J.src=z}else l()}catch(va){null!=d&&d(va)}});c.onerror=function(a){null!=d&&d(a)};n&&this.graph.addSvgShadow(e);this.graph.mathEnabled&&this.addMathCss(e);var l=mxUtils.bind(this,function(){try{null!=this.resolvedFontCss&&this.addFontCss(e,this.resolvedFontCss),c.src=Editor.createSvgDataUri(mxUtils.getXml(e))}catch(S){null!=
-d&&d(S)}});this.embedExtFonts(mxUtils.bind(this,function(a){try{null!=a&&this.addFontCss(e,a),this.loadFonts(l)}catch(aa){null!=d&&d(aa)}}))}catch(S){null!=d&&d(S)}}),e,p)}catch(fa){null!=d&&d(fa)}};Editor.crcTable=[];for(var f=0;256>f;f++)for(var g=f,m=0;8>m;m++)g=1==(g&1)?3988292384^g>>>1:g>>>1,Editor.crcTable[f]=g;Editor.updateCRC=function(a,b,e,c){for(var d=0;d<c;d++)a=Editor.crcTable[(a^b.charCodeAt(e+d))&255]^a>>>8;return a};Editor.crc32=function(a){for(var b=-1,e=0;e<a.length;e++)b=b>>>8^Editor.crcTable[(b^
+Editor.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||this.useCanvasForExport};Editor.prototype.getMaxCanvasScale=function(a,b,e){var c=mxClient.IS_FF?8192:16384;return Math.min(e,Math.min(c/a,c/b))};Editor.prototype.exportToCanvas=function(a,b,e,c,d,k,l,f,g,n,p,q,m,x,u,t,A,z){try{k=null!=k?k:!0;l=null!=l?l:!0;q=null!=q?q:this.graph;m=null!=m?m:0;var v=g?null:q.background;v==mxConstants.NONE&&(v=null);null==v&&(v=c);null==v&&0==g&&(v=t?this.graph.defaultPageBackgroundColor:"#ffffff");
+this.convertImages(q.getSvg(null,null,m,x,null,l,null,null,null,n,null,t,A,z),mxUtils.bind(this,function(e){try{var c=new Image;c.onload=mxUtils.bind(this,function(){try{var l=function(){mxClient.IS_SF?window.setTimeout(function(){x.drawImage(c,0,0);a(g,e)},0):(x.drawImage(c,0,0),a(g,e))},g=document.createElement("canvas"),n=parseInt(e.getAttribute("width")),p=parseInt(e.getAttribute("height"));f=null!=f?f:1;null!=b&&(f=k?Math.min(1,Math.min(3*b/(4*p),b/n)):b/n);f=this.getMaxCanvasScale(n,p,f);n=
+Math.ceil(f*n);p=Math.ceil(f*p);g.setAttribute("width",n);g.setAttribute("height",p);var x=g.getContext("2d");null!=v&&(x.beginPath(),x.rect(0,0,n,p),x.fillStyle=v,x.fill());1!=f&&x.scale(f,f);if(u){var t=q.view,A=t.scale;t.scale=1;var z=btoa(unescape(encodeURIComponent(t.createSvgGrid(t.gridColor))));t.scale=A;var z="data:image/svg+xml;base64,"+z,I=q.gridSize*t.gridSteps*f,B=q.getGraphBounds(),E=t.translate.x*A,y=t.translate.y*A,H=E+(B.x-E)/A-m,N=y+(B.y-y)/A-m,K=new Image;K.onload=function(){try{for(var a=
+-Math.round(I-mxUtils.mod((E-H)*f,I)),b=-Math.round(I-mxUtils.mod((y-N)*f,I));a<n;a+=I)for(var e=b;e<p;e+=I)x.drawImage(K,a/f,e/f);l()}catch(sa){null!=d&&d(sa)}};K.onerror=function(a){null!=d&&d(a)};K.src=z}else l()}catch(va){null!=d&&d(va)}});c.onerror=function(a){null!=d&&d(a)};n&&this.graph.addSvgShadow(e);this.graph.mathEnabled&&this.addMathCss(e);var l=mxUtils.bind(this,function(){try{null!=this.resolvedFontCss&&this.addFontCss(e,this.resolvedFontCss),c.src=Editor.createSvgDataUri(mxUtils.getXml(e))}catch(S){null!=
+d&&d(S)}});this.embedExtFonts(mxUtils.bind(this,function(a){try{null!=a&&this.addFontCss(e,a),this.loadFonts(l)}catch(aa){null!=d&&d(aa)}}))}catch(S){null!=d&&d(S)}}),e,p)}catch(fa){null!=d&&d(fa)}};Editor.crcTable=[];for(var g=0;256>g;g++)for(var f=g,m=0;8>m;m++)f=1==(f&1)?3988292384^f>>>1:f>>>1,Editor.crcTable[g]=f;Editor.updateCRC=function(a,b,e,c){for(var d=0;d<c;d++)a=Editor.crcTable[(a^b.charCodeAt(e+d))&255]^a>>>8;return a};Editor.crc32=function(a){for(var b=-1,e=0;e<a.length;e++)b=b>>>8^Editor.crcTable[(b^
a.charCodeAt(e))&255];return(b^-1)>>>0};Editor.writeGraphModelToPng=function(a,b,e,c,d){function k(a,b){var e=g;g+=b;return a.substring(e,g)}function l(a){a=k(a,4);return a.charCodeAt(3)+(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}function f(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)}a=a.substring(a.indexOf(",")+1);a=window.atob?atob(a):Base64.decode(a,!0);var g=0;if(k(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=d&&d();else if(k(a,
4),"IHDR"!=k(a,4))null!=d&&d();else{k(a,17);d=a.substring(0,g);do{var n=l(a);if("IDAT"==k(a,4)){d=a.substring(0,g-8);"pHYs"==b&&"dpi"==e?(e=Math.round(c/.0254),e=f(e)+f(e)+String.fromCharCode(1)):e=e+String.fromCharCode(0)+("zTXt"==b?String.fromCharCode(0):"")+c;c=4294967295;c=Editor.updateCRC(c,b,0,4);c=Editor.updateCRC(c,e,0,e.length);d+=f(e.length)+b+e+f(c^4294967295);d+=a.substring(g-8,a.length);break}d+=a.substring(g-8,g-4+n);k(a,n);k(a,4)}while(n);return"data:image/png;base64,"+(window.btoa?
btoa(d):Base64.encode(d,!0))}};if(window.ColorDialog){FilenameDialog.filenameHelpLink="https://www.diagrams.net/doc/faq/save-file-formats";var e=ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(a,b){e.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()};var k=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=function(){k.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()}}window.EditDataDialog&&
@@ -10349,34 +10350,34 @@ gradient:"#ea6b66"},{fill:"#e6d0de",stroke:"#996185",gradient:"#d5739d"}],[{fill
c(d.shape.customProperties));a=a.getAttribute("customProperties");if(null!=a)try{c(JSON.parse(a))}catch(U){}}};var u=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){var a=this.format.getSelectionState();"image"!=a.style.shape&&!a.containsLabel&&0<a.cells.length&&this.container.appendChild(this.addStyles(this.createPanel()));u.apply(this,arguments);if(Editor.enableCustomProperties){for(var b={},e=a.vertices,c=a.edges,d=0;d<e.length;d++)this.findCommonProperties(e[d],b,0==
d);for(d=0;d<c.length;d++)this.findCommonProperties(c[d],b,0==e.length&&0==d);null!=Object.getOwnPropertyNames&&0<Object.getOwnPropertyNames(b).length&&this.container.appendChild(this.addProperties(this.createPanel(),b,a))}};var t=StyleFormatPanel.prototype.addStyleOps;StyleFormatPanel.prototype.addStyleOps=function(a){var b=this.format.getSelectionState(),e=mxUtils.button(mxResources.get("copyStyle"),mxUtils.bind(this,function(a){this.editorUi.actions.get("copyStyle").funct()}));e.setAttribute("title",
mxResources.get("copyStyle")+" ("+this.editorUi.actions.get("copyStyle").shortcut+")");e.style.marginBottom="2px";e.style.width="100px";e.style.marginRight="2px";a.appendChild(e);0<b.cells.length?(e=mxUtils.button(mxResources.get("pasteStyle"),mxUtils.bind(this,function(a){this.editorUi.actions.get("pasteStyle").funct()})),e.setAttribute("title",mxResources.get("pasteStyle")+" ("+this.editorUi.actions.get("pasteStyle").shortcut+")"),e.style.marginBottom="2px",e.style.width="100px",a.appendChild(e)):
-e.style.width="202px";mxUtils.br(a);return t.apply(this,arguments)};EditorUi.prototype.propertiesCollapsed=!0;StyleFormatPanel.prototype.addProperties=function(a,b,e){function c(a,b,e,c){m.getModel().beginUpdate();try{var d=[],k=[];if(null!=e.index){for(var l=[],f=e.parentRow.nextSibling;f&&f.getAttribute("data-pName")==a;)l.push(f.getAttribute("data-pValue")),f=f.nextSibling;e.index<l.length?null!=c?l.splice(c,1):l[e.index]=b:l.push(b);null!=e.size&&l.length>e.size&&(l=l.slice(0,e.size));b=l.join(",");
-null!=e.countProperty&&(m.setCellStyles(e.countProperty,l.length,m.getSelectionCells()),d.push(e.countProperty),k.push(l.length))}m.setCellStyles(a,b,m.getSelectionCells());d.push(a);k.push(b);if(null!=e.dependentProps)for(a=0;a<e.dependentProps.length;a++){var g=e.dependentPropsDefVal[a],n=e.dependentPropsVals[a];if(n.length>b)n=n.slice(0,b);else for(var q=n.length;q<b;q++)n.push(g);n=n.join(",");m.setCellStyles(e.dependentProps[a],n,m.getSelectionCells());d.push(e.dependentProps[a]);k.push(n)}if("function"==
-typeof e.onChange)e.onChange(m,b);p.editorUi.fireEvent(new mxEventObject("styleChanged","keys",d,"values",k,"cells",m.getSelectionCells()))}finally{m.getModel().endUpdate()}}function d(b,e,c){var d=mxUtils.getOffset(a,!0),k=mxUtils.getOffset(b,!0);e.style.position="absolute";e.style.left=k.x-d.x+"px";e.style.top=k.y-d.y+"px";e.style.width=b.offsetWidth+"px";e.style.height=b.offsetHeight-(c?4:0)+"px";e.style.zIndex=5}function k(a,b,e){var d=document.createElement("div");d.style.width="32px";d.style.height=
-"4px";d.style.margin="2px";d.style.border="1px solid black";d.style.background=b&&"none"!=b?b:"url('"+Dialog.prototype.noColorImage+"')";btn=mxUtils.button("",mxUtils.bind(p,function(k){this.editorUi.pickColor(b,function(b){d.style.background="none"==b?"url('"+Dialog.prototype.noColorImage+"')":b;c(a,b,e)});mxEvent.consume(k)}));btn.style.height="12px";btn.style.width="40px";btn.className="geColorBtn";btn.appendChild(d);return btn}function l(a,b,e,d,k,l,f){null!=b&&(b=b.split(","),q.push({name:a,
-values:b,type:e,defVal:d,countProperty:k,parentRow:l,isDeletable:!0,flipBkg:f}));btn=mxUtils.button("+",mxUtils.bind(p,function(b){for(var g=l,p=0;null!=g.nextSibling;)if(g.nextSibling.getAttribute("data-pName")==a)g=g.nextSibling,p++;else break;var m={type:e,parentRow:l,index:p,isDeletable:!0,defVal:d,countProperty:k},p=n(a,"",m,0==p%2,f);c(a,d,m);g.parentNode.insertBefore(p,g.nextSibling);mxEvent.consume(b)}));btn.style.height="16px";btn.style.width="25px";btn.className="geColorBtn";return btn}
-function f(a,b,e,c,d,k,l){if(0<d){var f=Array(d);b=null!=b?b.split(","):[];for(var g=0;g<d;g++)f[g]=null!=b[g]?b[g]:null!=c?c:"";q.push({name:a,values:f,type:e,defVal:c,parentRow:k,flipBkg:l,size:d})}return document.createElement("div")}function g(a,b,e){var d=document.createElement("input");d.type="checkbox";d.checked="1"==b;mxEvent.addListener(d,"change",function(){c(a,d.checked?"1":"0",e)});return d}function n(b,e,n,m,q){var x=n.dispName,u=n.type,t=document.createElement("tr");t.className="gePropRow"+
-(q?"Dark":"")+(m?"Alt":"")+" gePropNonHeaderRow";t.setAttribute("data-pName",b);t.setAttribute("data-pValue",e);m=!1;null!=n.index&&(t.setAttribute("data-index",n.index),x=(null!=x?x:"")+"["+n.index+"]",m=!0);var A=document.createElement("td");A.className="gePropRowCell";A.innerHTML=mxUtils.htmlEntities(mxResources.get(x,null,x));m&&(A.style.textAlign="right");t.appendChild(A);A=document.createElement("td");A.className="gePropRowCell";if("color"==u)A.appendChild(k(b,e,n));else if("bool"==u||"boolean"==
-u)A.appendChild(g(b,e,n));else if("enum"==u){var z=n.enumList;for(q=0;q<z.length;q++)if(x=z[q],x.val==e){A.innerHTML=mxUtils.htmlEntities(mxResources.get(x.dispName,null,x.dispName));break}mxEvent.addListener(A,"click",mxUtils.bind(p,function(){var k=document.createElement("select");d(A,k);for(var l=0;l<z.length;l++){var f=z[l],g=document.createElement("option");g.value=mxUtils.htmlEntities(f.val);g.innerHTML=mxUtils.htmlEntities(mxResources.get(f.dispName,null,f.dispName));k.appendChild(g)}k.value=
-e;a.appendChild(k);mxEvent.addListener(k,"change",function(){var a=mxUtils.htmlEntities(k.value);c(b,a,n)});k.focus();mxEvent.addListener(k,"blur",function(){a.removeChild(k)})}))}else"dynamicArr"==u?A.appendChild(l(b,e,n.subType,n.subDefVal,n.countProperty,t,q)):"staticArr"==u?A.appendChild(f(b,e,n.subType,n.subDefVal,n.size,t,q)):"readOnly"==u?(q=document.createElement("input"),q.setAttribute("readonly",""),q.value=e,q.style.width="96px",q.style.borderWidth="0px",A.appendChild(q)):(A.innerHTML=
+e.style.width="202px";mxUtils.br(a);return t.apply(this,arguments)};EditorUi.prototype.propertiesCollapsed=!0;StyleFormatPanel.prototype.addProperties=function(a,b,e){function c(a,b,e,c){q.getModel().beginUpdate();try{var d=[],k=[];if(null!=e.index){for(var l=[],f=e.parentRow.nextSibling;f&&f.getAttribute("data-pName")==a;)l.push(f.getAttribute("data-pValue")),f=f.nextSibling;e.index<l.length?null!=c?l.splice(c,1):l[e.index]=b:l.push(b);null!=e.size&&l.length>e.size&&(l=l.slice(0,e.size));b=l.join(",");
+null!=e.countProperty&&(q.setCellStyles(e.countProperty,l.length,q.getSelectionCells()),d.push(e.countProperty),k.push(l.length))}q.setCellStyles(a,b,q.getSelectionCells());d.push(a);k.push(b);if(null!=e.dependentProps)for(a=0;a<e.dependentProps.length;a++){var g=e.dependentPropsDefVal[a],n=e.dependentPropsVals[a];if(n.length>b)n=n.slice(0,b);else for(var m=n.length;m<b;m++)n.push(g);n=n.join(",");q.setCellStyles(e.dependentProps[a],n,q.getSelectionCells());d.push(e.dependentProps[a]);k.push(n)}if("function"==
+typeof e.onChange)e.onChange(q,b);p.editorUi.fireEvent(new mxEventObject("styleChanged","keys",d,"values",k,"cells",q.getSelectionCells()))}finally{q.getModel().endUpdate()}}function d(b,e,c){var d=mxUtils.getOffset(a,!0),k=mxUtils.getOffset(b,!0);e.style.position="absolute";e.style.left=k.x-d.x+"px";e.style.top=k.y-d.y+"px";e.style.width=b.offsetWidth+"px";e.style.height=b.offsetHeight-(c?4:0)+"px";e.style.zIndex=5}function k(a,b,e){var d=document.createElement("div");d.style.width="32px";d.style.height=
+"4px";d.style.margin="2px";d.style.border="1px solid black";d.style.background=b&&"none"!=b?b:"url('"+Dialog.prototype.noColorImage+"')";btn=mxUtils.button("",mxUtils.bind(p,function(k){this.editorUi.pickColor(b,function(b){d.style.background="none"==b?"url('"+Dialog.prototype.noColorImage+"')":b;c(a,b,e)});mxEvent.consume(k)}));btn.style.height="12px";btn.style.width="40px";btn.className="geColorBtn";btn.appendChild(d);return btn}function l(a,b,e,d,k,l,f){null!=b&&(b=b.split(","),m.push({name:a,
+values:b,type:e,defVal:d,countProperty:k,parentRow:l,isDeletable:!0,flipBkg:f}));btn=mxUtils.button("+",mxUtils.bind(p,function(b){for(var g=l,p=0;null!=g.nextSibling;)if(g.nextSibling.getAttribute("data-pName")==a)g=g.nextSibling,p++;else break;var q={type:e,parentRow:l,index:p,isDeletable:!0,defVal:d,countProperty:k},p=n(a,"",q,0==p%2,f);c(a,d,q);g.parentNode.insertBefore(p,g.nextSibling);mxEvent.consume(b)}));btn.style.height="16px";btn.style.width="25px";btn.className="geColorBtn";return btn}
+function f(a,b,e,c,d,k,l){if(0<d){var f=Array(d);b=null!=b?b.split(","):[];for(var g=0;g<d;g++)f[g]=null!=b[g]?b[g]:null!=c?c:"";m.push({name:a,values:f,type:e,defVal:c,parentRow:k,flipBkg:l,size:d})}return document.createElement("div")}function g(a,b,e){var d=document.createElement("input");d.type="checkbox";d.checked="1"==b;mxEvent.addListener(d,"change",function(){c(a,d.checked?"1":"0",e)});return d}function n(b,e,n,q,m){var x=n.dispName,u=n.type,t=document.createElement("tr");t.className="gePropRow"+
+(m?"Dark":"")+(q?"Alt":"")+" gePropNonHeaderRow";t.setAttribute("data-pName",b);t.setAttribute("data-pValue",e);q=!1;null!=n.index&&(t.setAttribute("data-index",n.index),x=(null!=x?x:"")+"["+n.index+"]",q=!0);var A=document.createElement("td");A.className="gePropRowCell";A.innerHTML=mxUtils.htmlEntities(mxResources.get(x,null,x));q&&(A.style.textAlign="right");t.appendChild(A);A=document.createElement("td");A.className="gePropRowCell";if("color"==u)A.appendChild(k(b,e,n));else if("bool"==u||"boolean"==
+u)A.appendChild(g(b,e,n));else if("enum"==u){var z=n.enumList;for(m=0;m<z.length;m++)if(x=z[m],x.val==e){A.innerHTML=mxUtils.htmlEntities(mxResources.get(x.dispName,null,x.dispName));break}mxEvent.addListener(A,"click",mxUtils.bind(p,function(){var k=document.createElement("select");d(A,k);for(var l=0;l<z.length;l++){var f=z[l],g=document.createElement("option");g.value=mxUtils.htmlEntities(f.val);g.innerHTML=mxUtils.htmlEntities(mxResources.get(f.dispName,null,f.dispName));k.appendChild(g)}k.value=
+e;a.appendChild(k);mxEvent.addListener(k,"change",function(){var a=mxUtils.htmlEntities(k.value);c(b,a,n)});k.focus();mxEvent.addListener(k,"blur",function(){a.removeChild(k)})}))}else"dynamicArr"==u?A.appendChild(l(b,e,n.subType,n.subDefVal,n.countProperty,t,m)):"staticArr"==u?A.appendChild(f(b,e,n.subType,n.subDefVal,n.size,t,m)):"readOnly"==u?(m=document.createElement("input"),m.setAttribute("readonly",""),m.value=e,m.style.width="96px",m.style.borderWidth="0px",A.appendChild(m)):(A.innerHTML=
e,mxEvent.addListener(A,"click",mxUtils.bind(p,function(){function k(){var a=l.value,a=0==a.length&&"string"!=u?0:a;n.allowAuto&&(null!=a.trim&&"auto"==a.trim().toLowerCase()?(a="auto",u="string"):(a=parseFloat(a),a=isNaN(a)?0:a));null!=n.min&&a<n.min?a=n.min:null!=n.max&&a>n.max&&(a=n.max);a=mxUtils.htmlEntities(("int"==u?parseInt(a):a)+"");c(b,a,n)}var l=document.createElement("input");d(A,l,!0);l.value=e;l.className="gePropEditor";"int"!=u&&"float"!=u||n.allowAuto||(l.type="number",l.step="int"==
-u?"1":"any",null!=n.min&&(l.min=parseFloat(n.min)),null!=n.max&&(l.max=parseFloat(n.max)));a.appendChild(l);mxEvent.addListener(l,"keypress",function(a){13==a.keyCode&&k()});l.focus();mxEvent.addListener(l,"blur",function(){k()})})));n.isDeletable&&(q=mxUtils.button("-",mxUtils.bind(p,function(a){c(b,"",n,n.index);mxEvent.consume(a)})),q.style.height="16px",q.style.width="25px",q.style["float"]="right",q.className="geColorBtn",A.appendChild(q));t.appendChild(A);return t}var p=this,m=this.editorUi.editor.graph,
-q=[];a.style.position="relative";a.style.padding="0";var x=document.createElement("table");x.className="geProperties";x.style.whiteSpace="nowrap";x.style.width="100%";var u=document.createElement("tr");u.className="gePropHeader";var t=document.createElement("th");t.className="gePropHeaderCell";var A=document.createElement("img");A.src=Sidebar.prototype.expandedImage;t.appendChild(A);mxUtils.write(t,mxResources.get("property"));u.style.cursor="pointer";var z=function(){var b=x.querySelectorAll(".gePropNonHeaderRow"),
+u?"1":"any",null!=n.min&&(l.min=parseFloat(n.min)),null!=n.max&&(l.max=parseFloat(n.max)));a.appendChild(l);mxEvent.addListener(l,"keypress",function(a){13==a.keyCode&&k()});l.focus();mxEvent.addListener(l,"blur",function(){k()})})));n.isDeletable&&(m=mxUtils.button("-",mxUtils.bind(p,function(a){c(b,"",n,n.index);mxEvent.consume(a)})),m.style.height="16px",m.style.width="25px",m.style["float"]="right",m.className="geColorBtn",A.appendChild(m));t.appendChild(A);return t}var p=this,q=this.editorUi.editor.graph,
+m=[];a.style.position="relative";a.style.padding="0";var x=document.createElement("table");x.className="geProperties";x.style.whiteSpace="nowrap";x.style.width="100%";var u=document.createElement("tr");u.className="gePropHeader";var t=document.createElement("th");t.className="gePropHeaderCell";var A=document.createElement("img");A.src=Sidebar.prototype.expandedImage;t.appendChild(A);mxUtils.write(t,mxResources.get("property"));u.style.cursor="pointer";var z=function(){var b=x.querySelectorAll(".gePropNonHeaderRow"),
e;if(p.editorUi.propertiesCollapsed){A.src=Sidebar.prototype.collapsedImage;e="none";for(var c=a.childNodes.length-1;0<=c;c--)try{var d=a.childNodes[c],k=d.nodeName.toUpperCase();"INPUT"!=k&&"SELECT"!=k||a.removeChild(d)}catch(ra){}}else A.src=Sidebar.prototype.expandedImage,e="";for(c=0;c<b.length;c++)b[c].style.display=e};mxEvent.addListener(u,"click",function(){p.editorUi.propertiesCollapsed=!p.editorUi.propertiesCollapsed;z()});u.appendChild(t);t=document.createElement("th");t.className="gePropHeaderCell";
-t.innerHTML=mxResources.get("value");u.appendChild(t);x.appendChild(u);var v=!1,B=!1,u=null;1==e.vertices.length&&0==e.edges.length?u=e.vertices[0].id:0==e.vertices.length&&1==e.edges.length&&(u=e.edges[0].id);null!=u&&x.appendChild(n("id",mxUtils.htmlEntities(u),{dispName:"ID",type:"readOnly"},!0,!1));for(var E in b)if(u=b[E],"function"!=typeof u.isVisible||u.isVisible(e,this)){var I=null!=e.style[E]?mxUtils.htmlEntities(e.style[E]+""):null!=u.getDefaultValue?u.getDefaultValue(e,this):u.defVal;if("separator"==
-u.type)B=!B;else{if("staticArr"==u.type)u.size=parseInt(e.style[u.sizeProperty]||b[u.sizeProperty].defVal)||0;else if(null!=u.dependentProps){for(var y=u.dependentProps,J=[],H=[],t=0;t<y.length;t++){var C=e.style[y[t]];H.push(b[y[t]].subDefVal);J.push(null!=C?C.split(","):[])}u.dependentPropsDefVal=H;u.dependentPropsVals=J}x.appendChild(n(E,I,u,v,B));v=!v}}for(t=0;t<q.length;t++)for(u=q[t],b=u.parentRow,e=0;e<u.values.length;e++)E=n(u.name,u.values[e],{type:u.type,parentRow:u.parentRow,isDeletable:u.isDeletable,
-index:e,defVal:u.defVal,countProperty:u.countProperty,size:u.size},0==e%2,u.flipBkg),b.parentNode.insertBefore(E,b.nextSibling),b=E;a.appendChild(x);z();return a};StyleFormatPanel.prototype.addStyles=function(a){function b(a){mxEvent.addListener(a,"mouseenter",function(){a.style.opacity="1"});mxEvent.addListener(a,"mouseleave",function(){a.style.opacity="0.5"})}var e=this.editorUi,c=e.editor.graph,d=document.createElement("div");d.style.whiteSpace="nowrap";d.style.paddingLeft="24px";d.style.paddingRight=
+t.innerHTML=mxResources.get("value");u.appendChild(t);x.appendChild(u);var v=!1,B=!1,u=null;1==e.vertices.length&&0==e.edges.length?u=e.vertices[0].id:0==e.vertices.length&&1==e.edges.length&&(u=e.edges[0].id);null!=u&&x.appendChild(n("id",mxUtils.htmlEntities(u),{dispName:"ID",type:"readOnly"},!0,!1));for(var I in b)if(u=b[I],"function"!=typeof u.isVisible||u.isVisible(e,this)){var E=null!=e.style[I]?mxUtils.htmlEntities(e.style[I]+""):null!=u.getDefaultValue?u.getDefaultValue(e,this):u.defVal;if("separator"==
+u.type)B=!B;else{if("staticArr"==u.type)u.size=parseInt(e.style[u.sizeProperty]||b[u.sizeProperty].defVal)||0;else if(null!=u.dependentProps){for(var y=u.dependentProps,K=[],H=[],t=0;t<y.length;t++){var C=e.style[y[t]];H.push(b[y[t]].subDefVal);K.push(null!=C?C.split(","):[])}u.dependentPropsDefVal=H;u.dependentPropsVals=K}x.appendChild(n(I,E,u,v,B));v=!v}}for(t=0;t<m.length;t++)for(u=m[t],b=u.parentRow,e=0;e<u.values.length;e++)I=n(u.name,u.values[e],{type:u.type,parentRow:u.parentRow,isDeletable:u.isDeletable,
+index:e,defVal:u.defVal,countProperty:u.countProperty,size:u.size},0==e%2,u.flipBkg),b.parentNode.insertBefore(I,b.nextSibling),b=I;a.appendChild(x);z();return a};StyleFormatPanel.prototype.addStyles=function(a){function b(a){mxEvent.addListener(a,"mouseenter",function(){a.style.opacity="1"});mxEvent.addListener(a,"mouseleave",function(){a.style.opacity="0.5"})}var e=this.editorUi,c=e.editor.graph,d=document.createElement("div");d.style.whiteSpace="nowrap";d.style.paddingLeft="24px";d.style.paddingRight=
"20px";a.style.paddingLeft="16px";a.style.paddingBottom="6px";a.style.position="relative";a.appendChild(d);var k="plain-gray plain-blue plain-green plain-turquoise plain-orange plain-yellow plain-red plain-pink plain-purple gray blue green turquoise orange yellow red pink purple".split(" "),l=document.createElement("div");l.style.whiteSpace="nowrap";l.style.position="relative";l.style.textAlign="center";for(var f=[],g=0;g<this.defaultColorSchemes.length;g++){var n=document.createElement("div");n.style.display=
"inline-block";n.style.width="6px";n.style.height="6px";n.style.marginLeft="4px";n.style.marginRight="3px";n.style.borderRadius="3px";n.style.cursor="pointer";n.style.background="transparent";n.style.border="1px solid #b5b6b7";mxUtils.bind(this,function(a){mxEvent.addListener(n,"click",mxUtils.bind(this,function(){p(a)}))})(g);f.push(n);l.appendChild(n)}var p=mxUtils.bind(this,function(a){null!=this.format.currentScheme&&(f[this.format.currentScheme].style.background="transparent");this.format.currentScheme=
-a;m(this.defaultColorSchemes[this.format.currentScheme]);f[this.format.currentScheme].style.background="#84d7ff"}),m=mxUtils.bind(this,function(a){var b=mxUtils.bind(this,function(a){var b=mxUtils.button("",mxUtils.bind(this,function(b){c.getModel().beginUpdate();try{for(var d=this.format.getSelectionState().cells,l=0;l<d.length;l++){for(var f=c.getModel().getStyle(d[l]),g=0;g<k.length;g++)f=mxUtils.removeStylename(f,k[g]);var n=c.getModel().isVertex(d[l])?e.initialDefaultVertexStyle:e.initialdefaultEdgeStyle;
+a;q(this.defaultColorSchemes[this.format.currentScheme]);f[this.format.currentScheme].style.background="#84d7ff"}),q=mxUtils.bind(this,function(a){var b=mxUtils.bind(this,function(a){var b=mxUtils.button("",mxUtils.bind(this,function(b){c.getModel().beginUpdate();try{for(var d=this.format.getSelectionState().cells,l=0;l<d.length;l++){for(var f=c.getModel().getStyle(d[l]),g=0;g<k.length;g++)f=mxUtils.removeStylename(f,k[g]);var n=c.getModel().isVertex(d[l])?e.initialDefaultVertexStyle:e.initialdefaultEdgeStyle;
null!=a?(f=mxUtils.setStyle(f,mxConstants.STYLE_GRADIENTCOLOR,a.gradient||mxUtils.getValue(n,mxConstants.STYLE_GRADIENTCOLOR,null)),mxEvent.isAltDown(b)||(f=""==a.fill?mxUtils.setStyle(f,mxConstants.STYLE_FILLCOLOR,null):mxUtils.setStyle(f,mxConstants.STYLE_FILLCOLOR,a.fill||mxUtils.getValue(n,mxConstants.STYLE_FILLCOLOR,null))),mxEvent.isShiftDown(b)||(f=""==a.stroke?mxUtils.setStyle(f,mxConstants.STYLE_STROKECOLOR,null):mxUtils.setStyle(f,mxConstants.STYLE_STROKECOLOR,a.stroke||mxUtils.getValue(n,
mxConstants.STYLE_STROKECOLOR,null))),mxEvent.isControlDown(b)||mxClient.IS_MAC&&mxEvent.isMetaDown(b)||!c.getModel().isVertex(d[l])||(f=mxUtils.setStyle(f,mxConstants.STYLE_FONTCOLOR,a.font||mxUtils.getValue(n,mxConstants.STYLE_FONTCOLOR,null)))):(f=mxUtils.setStyle(f,mxConstants.STYLE_FILLCOLOR,mxUtils.getValue(n,mxConstants.STYLE_FILLCOLOR,"#ffffff")),f=mxUtils.setStyle(f,mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(n,mxConstants.STYLE_STROKECOLOR,"#000000")),f=mxUtils.setStyle(f,mxConstants.STYLE_GRADIENTCOLOR,
mxUtils.getValue(n,mxConstants.STYLE_GRADIENTCOLOR,null)),c.getModel().isVertex(d[l])&&(f=mxUtils.setStyle(f,mxConstants.STYLE_FONTCOLOR,mxUtils.getValue(n,mxConstants.STYLE_FONTCOLOR,null))));c.getModel().setStyle(d[l],f)}}finally{c.getModel().endUpdate()}}));b.className="geStyleButton";b.style.width="36px";b.style.height=10>=this.defaultColorSchemes.length?"24px":"30px";b.style.margin="0px 6px 6px 0px";if(null!=a){var l="1"==urlParams.sketch?"2px solid":"1px solid";null!=a.gradient?mxClient.IS_IE&&
10>document.documentMode?b.style.filter="progid:DXImageTransform.Microsoft.Gradient(StartColorStr='"+a.fill+"', EndColorStr='"+a.gradient+"', GradientType=0)":b.style.backgroundImage="linear-gradient("+a.fill+" 0px,"+a.gradient+" 100%)":a.fill==mxConstants.NONE?b.style.background="url('"+Dialog.prototype.noColorImage+"')":b.style.backgroundColor=""==a.fill?mxUtils.getValue(e.initialDefaultVertexStyle,mxConstants.STYLE_FILLCOLOR,Editor.isDarkMode()?"#2a2a2a":"#ffffff"):a.fill||mxUtils.getValue(e.initialDefaultVertexStyle,
mxConstants.STYLE_FILLCOLOR,Editor.isDarkMode()?"#2a2a2a":"#ffffff");b.style.border=a.stroke==mxConstants.NONE?l+" transparent":""==a.stroke?l+" "+mxUtils.getValue(e.initialDefaultVertexStyle,mxConstants.STYLE_STROKECOLOR,Editor.isDarkMode()?"#ffffff":"#2a2a2a"):l+" "+(a.stroke||mxUtils.getValue(e.initialDefaultVertexStyle,mxConstants.STYLE_STROKECOLOR,Editor.isDarkMode()?"#ffffff":"#2a2a2a"));null!=a.title&&b.setAttribute("title",a.title)}else{var l=mxUtils.getValue(c.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,
-"#ffffff"),f=mxUtils.getValue(c.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,"#000000");b.style.backgroundColor=l;b.style.border="1px solid "+f}b.style.borderRadius="0";d.appendChild(b)});d.innerHTML="";for(var l=0;l<a.length;l++)0<l&&0==mxUtils.mod(l,4)&&mxUtils.br(d),b(a[l])});null==this.format.currentScheme?p(Editor.isDarkMode()?1:"1"==urlParams.sketch?5:0):p(this.format.currentScheme);var g=10>=this.defaultColorSchemes.length?28:8,q=document.createElement("div");q.style.cssText="position:absolute;left:10px;top:8px;bottom:"+
-g+"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(q,"click",mxUtils.bind(this,function(){p(mxUtils.mod(this.format.currentScheme-1,this.defaultColorSchemes.length))}));
+"#ffffff"),f=mxUtils.getValue(c.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,"#000000");b.style.backgroundColor=l;b.style.border="1px solid "+f}b.style.borderRadius="0";d.appendChild(b)});d.innerHTML="";for(var l=0;l<a.length;l++)0<l&&0==mxUtils.mod(l,4)&&mxUtils.br(d),b(a[l])});null==this.format.currentScheme?p(Editor.isDarkMode()?1:"1"==urlParams.sketch?5:0):p(this.format.currentScheme);var g=10>=this.defaultColorSchemes.length?28:8,m=document.createElement("div");m.style.cssText="position:absolute;left:10px;top:8px;bottom:"+
+g+"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(m,"click",mxUtils.bind(this,function(){p(mxUtils.mod(this.format.currentScheme-1,this.defaultColorSchemes.length))}));
var x=document.createElement("div");x.style.cssText="position:absolute;left:202px;top:8px;bottom:"+g+"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&&
-(a.appendChild(q),a.appendChild(x));mxEvent.addListener(x,"click",mxUtils.bind(this,function(){p(mxUtils.mod(this.format.currentScheme+1,this.defaultColorSchemes.length))}));b(q);b(x);m(this.defaultColorSchemes[this.format.currentScheme]);10>=this.defaultColorSchemes.length&&a.appendChild(l);return a};StyleFormatPanel.prototype.addEditOps=function(a){var b=this.format.getSelectionState(),e=null;1==b.cells.length&&(e=mxUtils.button(mxResources.get("editStyle"),mxUtils.bind(this,function(a){this.editorUi.actions.get("editStyle").funct()})),
+(a.appendChild(m),a.appendChild(x));mxEvent.addListener(x,"click",mxUtils.bind(this,function(){p(mxUtils.mod(this.format.currentScheme+1,this.defaultColorSchemes.length))}));b(m);b(x);q(this.defaultColorSchemes[this.format.currentScheme]);10>=this.defaultColorSchemes.length&&a.appendChild(l);return a};StyleFormatPanel.prototype.addEditOps=function(a){var b=this.format.getSelectionState(),e=null;1==b.cells.length&&(e=mxUtils.button(mxResources.get("editStyle"),mxUtils.bind(this,function(a){this.editorUi.actions.get("editStyle").funct()})),
e.setAttribute("title",mxResources.get("editStyle")+" ("+this.editorUi.actions.get("editStyle").shortcut+")"),e.style.width="202px",e.style.marginBottom="2px",a.appendChild(e));var c=this.editorUi.editor.graph,c=1==b.cells.length?c.view.getState(b.cells[0]):null;null!=c&&null!=c.shape&&null!=c.shape.stencil?(b=mxUtils.button(mxResources.get("editShape"),mxUtils.bind(this,function(a){this.editorUi.actions.get("editShape").funct()})),b.setAttribute("title",mxResources.get("editShape")),b.style.marginBottom=
"2px",null==e?b.style.width="202px":(e.style.width="100px",b.style.width="100px",b.style.marginLeft="2px"),a.appendChild(b)):b.image&&0<b.cells.length&&(b=mxUtils.button(mxResources.get("editImage"),mxUtils.bind(this,function(a){this.editorUi.actions.get("image").funct()})),b.setAttribute("title",mxResources.get("editImage")),b.style.marginBottom="2px",null==e?b.style.width="202px":(e.style.width="100px",b.style.width="100px",b.style.marginLeft="2px"),a.appendChild(b));return a}}Graph.customFontElements=
{};Graph.recentCustomFonts={};Graph.isGoogleFontUrl=function(a){return a.substring(0,Editor.GOOGLE_FONTS.length)==Editor.GOOGLE_FONTS};Graph.isCssFontUrl=function(a){return Graph.isGoogleFontUrl(a)};Graph.createFontElement=function(a,b){var e;Graph.isCssFontUrl(b)?(e=document.createElement("link"),e.setAttribute("rel","stylesheet"),e.setAttribute("type","text/css"),e.setAttribute("charset","UTF-8"),e.setAttribute("href",b)):(e=document.createElement("style"),mxUtils.write(e,'@font-face {\nfont-family: "'+
@@ -10391,8 +10392,8 @@ Graph.prototype.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity="0.4";
this.node.nodeName&&Graph.processFontAttributes(this.node)};Graph.prototype.getCustomFonts=function(){var a=this.extFonts,a=null!=a?a.slice():[],b;for(b in Graph.customFontElements){var e=Graph.customFontElements[b];a.push({name:e.name,url:e.url})}return a};Graph.prototype.setFont=function(a,b){Graph.addFont(a,b);document.execCommand("fontname",!1,a);if(null!=b){var e=this.cellEditor.textarea.getElementsByTagName("font");b=Graph.getFontUrl(a,b);for(var c=0;c<e.length;c++)e[c].getAttribute("face")==
a&&e[c].getAttribute("data-font-src")!=b&&e[c].setAttribute("data-font-src",b)}};var A=Graph.prototype.isFastZoomEnabled;Graph.prototype.isFastZoomEnabled=function(){return A.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 a=JSON.parse(decodeURIComponent(urlParams.vars));if(null!=a)for(var b in a)this.globalVars[b]=
a[b]}catch(H){null!=window.console&&console.log("Error in vars URL parameter: "+H)}};Graph.prototype.getExportVariables=function(){return null!=this.globalVars?mxUtils.clone(this.globalVars):{}};var B=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=function(a){var b=B.apply(this,arguments);null==b&&null!=this.globalVars&&(b=this.globalVars[a]);return b};Graph.prototype.getDefaultStylesheet=function(){if(null==this.defaultStylesheet){var a=this.themes["default-style2"];this.defaultStylesheet=
-(new mxCodec(a.ownerDocument)).decode(a)}return this.defaultStylesheet};Graph.prototype.isViewer=function(){return urlParams.viewer};var C=Graph.prototype.getSvg;Graph.prototype.getSvg=function(a,b,e,c,d,k,l,f,g,n,p,m,q,x){var u=null,t=null;m||null==this.themes||"darkTheme"!=this.defaultThemeName||(u=this.stylesheet,t=this.defaultPageBackgroundColor,this.defaultPageBackgroundColor="darkTheme"==this.defaultThemeName?"#ffffff":"#2a2a2a",this.stylesheet=this.getDefaultStylesheet(),this.refresh());var A=
-C.apply(this,arguments),z=this.getCustomFonts();if(p&&0<z.length){var v=A.ownerDocument,B=null!=v.createElementNS?v.createElementNS(mxConstants.NS_SVG,"style"):v.createElement("style");null!=v.setAttributeNS?B.setAttributeNS("type","text/css"):B.setAttribute("type","text/css");for(var E="",y="",I=0;I<z.length;I++){var J=z[I].name,D=z[I].url;Graph.isCssFontUrl(D)?E+="@import url("+D+");\n":y+='@font-face {\nfont-family: "'+J+'";\nsrc: url("'+D+'");\n}\n'}B.appendChild(v.createTextNode(E+y));A.getElementsByTagName("defs")[0].appendChild(B)}null!=
+(new mxCodec(a.ownerDocument)).decode(a)}return this.defaultStylesheet};Graph.prototype.isViewer=function(){return urlParams.viewer};var C=Graph.prototype.getSvg;Graph.prototype.getSvg=function(a,b,e,c,d,k,l,f,g,n,p,q,m,x){var u=null,t=null;q||null==this.themes||"darkTheme"!=this.defaultThemeName||(u=this.stylesheet,t=this.defaultPageBackgroundColor,this.defaultPageBackgroundColor="darkTheme"==this.defaultThemeName?"#ffffff":"#2a2a2a",this.stylesheet=this.getDefaultStylesheet(),this.refresh());var A=
+C.apply(this,arguments),z=this.getCustomFonts();if(p&&0<z.length){var v=A.ownerDocument,B=null!=v.createElementNS?v.createElementNS(mxConstants.NS_SVG,"style"):v.createElement("style");null!=v.setAttributeNS?B.setAttributeNS("type","text/css"):B.setAttribute("type","text/css");for(var y="",E="",I=0;I<z.length;I++){var K=z[I].name,D=z[I].url;Graph.isCssFontUrl(D)?y+="@import url("+D+");\n":E+='@font-face {\nfont-family: "'+K+'";\nsrc: url("'+D+'");\n}\n'}B.appendChild(v.createTextNode(y+E));A.getElementsByTagName("defs")[0].appendChild(B)}null!=
u&&(this.defaultPageBackgroundColor=t,this.stylesheet=u,this.refresh());return A};var D=Graph.prototype.createSvgImageExport;Graph.prototype.createSvgImageExport=function(){var a=D.apply(this,arguments);if(this.mathEnabled){var b=a.drawText;a.drawText=function(a,e){if(null!=a.text&&null!=a.text.value&&a.text.checkBounds()&&(mxUtils.isNode(a.text.value)||a.text.dialect==mxConstants.DIALECT_STRICTHTML)){var c=a.text.getContentNode();if(null!=c){c=c.cloneNode(!0);if(c.getElementsByTagNameNS)for(var d=
c.getElementsByTagNameNS("http://www.w3.org/1998/Math/MathML","math");0<d.length;)d[0].parentNode.removeChild(d[0]);null!=c.innerHTML&&(d=a.text.value,a.text.value=c.innerHTML,b.apply(this,arguments),a.text.value=d)}}else b.apply(this,arguments)}}return a};var G=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){G.apply(this,arguments);if(mxClient.IS_GC&&null!=this.getDrawPane()){var a=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"),
@@ -10400,9 +10401,9 @@ this.webKitForceRepaintNode.style.cssText="position:absolute;",a.ownerSVGElement
a.substring(0,17)&&(a=JSON.parse(a.substring(17)),null!=a.actions&&this.executeCustomActions(a.actions))};Graph.prototype.executeCustomActions=function(a,b){if(this.executingCustomActions)this.stoppingCustomActions=!0,null!=this.pendingWaitThread&&window.clearTimeout(this.pendingWaitThread),null!=this.pendingExecuteNextAction&&this.pendingExecuteNextAction(),this.fireEvent(new mxEventObject("stopExecutingCustomActions"));else{this.executingCustomActions=!0;var e=!1,c=0,d=0,k=mxUtils.bind(this,function(){e||
(e=!0,this.model.beginUpdate())}),l=mxUtils.bind(this,function(){e&&(e=!1,this.model.endUpdate())}),f=mxUtils.bind(this,function(){0<c&&c--;0==c&&g()}),g=mxUtils.bind(this,function(){if(d<a.length){var e=this.stoppingCustomActions,n=a[d++],p=[];if(null!=n.open)if(l(),this.isCustomLink(n.open)){if(!this.customLinkClicked(n.open))return}else this.openLink(n.open);null==n.wait||e||(this.pendingExecuteNextAction=mxUtils.bind(this,function(){this.pendingWaitThread=this.pendingExecuteNextAction=null;f()}),
c++,this.pendingWaitThread=window.setTimeout(this.pendingExecuteNextAction,""!=n.wait?parseInt(n.wait):1E3),l());null!=n.opacity&&null!=n.opacity.value&&Graph.setOpacityForNodes(this.getNodesForCells(this.getCellsForAction(n.opacity,!0)),n.opacity.value);null!=n.fadeIn&&(c++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(n.fadeIn,!0)),0,1,f,e?0:n.fadeIn.delay));null!=n.fadeOut&&(c++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(n.fadeOut,!0)),1,0,f,e?0:n.fadeOut.delay));
-null!=n.wipeIn&&(p=p.concat(this.createWipeAnimations(this.getCellsForAction(n.wipeIn,!0),!0)));null!=n.wipeOut&&(p=p.concat(this.createWipeAnimations(this.getCellsForAction(n.wipeOut,!0),!1)));null!=n.toggle&&(k(),this.toggleCells(this.getCellsForAction(n.toggle,!0)));if(null!=n.show){k();var m=this.getCellsForAction(n.show,!0);Graph.setOpacityForNodes(this.getNodesForCells(m),1);this.setCellsVisible(m,!0)}null!=n.hide&&(k(),m=this.getCellsForAction(n.hide,!0),Graph.setOpacityForNodes(this.getNodesForCells(m),
-0),this.setCellsVisible(m,!1));null!=n.toggleStyle&&null!=n.toggleStyle.key&&(k(),this.toggleCellStyles(n.toggleStyle.key,null!=n.toggleStyle.defaultValue?n.toggleStyle.defaultValue:"0",this.getCellsForAction(n.toggleStyle,!0)));null!=n.style&&null!=n.style.key&&(k(),this.setCellStyles(n.style.key,n.style.value,this.getCellsForAction(n.style,!0)));m=[];null!=n.select&&this.isEnabled()&&(m=this.getCellsForAction(n.select),this.setSelectionCells(m));null!=n.highlight&&(m=this.getCellsForAction(n.highlight),
-this.highlightCells(m,n.highlight.color,n.highlight.duration,n.highlight.opacity));null!=n.scroll&&(m=this.getCellsForAction(n.scroll));null!=n.viewbox&&this.fitWindow(n.viewbox,n.viewbox.border);0<m.length&&this.scrollCellToVisible(m[0]);0<p.length&&(c++,this.executeAnimations(p,f,e?1:n.steps,e?0:n.delay));0==c?g():l()}else this.stoppingCustomActions=this.executingCustomActions=!1,l(),null!=b&&b()});g()}};Graph.prototype.doUpdateCustomLinksForCell=function(a,b){var e=this.getLinkForCell(b);null!=
+null!=n.wipeIn&&(p=p.concat(this.createWipeAnimations(this.getCellsForAction(n.wipeIn,!0),!0)));null!=n.wipeOut&&(p=p.concat(this.createWipeAnimations(this.getCellsForAction(n.wipeOut,!0),!1)));null!=n.toggle&&(k(),this.toggleCells(this.getCellsForAction(n.toggle,!0)));if(null!=n.show){k();var q=this.getCellsForAction(n.show,!0);Graph.setOpacityForNodes(this.getNodesForCells(q),1);this.setCellsVisible(q,!0)}null!=n.hide&&(k(),q=this.getCellsForAction(n.hide,!0),Graph.setOpacityForNodes(this.getNodesForCells(q),
+0),this.setCellsVisible(q,!1));null!=n.toggleStyle&&null!=n.toggleStyle.key&&(k(),this.toggleCellStyles(n.toggleStyle.key,null!=n.toggleStyle.defaultValue?n.toggleStyle.defaultValue:"0",this.getCellsForAction(n.toggleStyle,!0)));null!=n.style&&null!=n.style.key&&(k(),this.setCellStyles(n.style.key,n.style.value,this.getCellsForAction(n.style,!0)));q=[];null!=n.select&&this.isEnabled()&&(q=this.getCellsForAction(n.select),this.setSelectionCells(q));null!=n.highlight&&(q=this.getCellsForAction(n.highlight),
+this.highlightCells(q,n.highlight.color,n.highlight.duration,n.highlight.opacity));null!=n.scroll&&(q=this.getCellsForAction(n.scroll));null!=n.viewbox&&this.fitWindow(n.viewbox,n.viewbox.border);0<q.length&&this.scrollCellToVisible(q[0]);0<p.length&&(c++,this.executeAnimations(p,f,e?1:n.steps,e?0:n.delay));0==c?g():l()}else this.stoppingCustomActions=this.executingCustomActions=!1,l(),null!=b&&b()});g()}};Graph.prototype.doUpdateCustomLinksForCell=function(a,b){var e=this.getLinkForCell(b);null!=
e&&"data:action/json,"==e.substring(0,17)&&this.setLinkForCell(b,this.updateCustomLink(a,e));if(this.isHtmlLabel(b)){var c=document.createElement("div");c.innerHTML=this.sanitizeHtml(this.getLabel(b));for(var d=c.getElementsByTagName("a"),k=!1,l=0;l<d.length;l++)e=d[l].getAttribute("href"),null!=e&&"data:action/json,"==e.substring(0,17)&&(d[l].setAttribute("href",this.updateCustomLink(a,e)),k=!0);k&&this.labelChanged(b,c.innerHTML)}};Graph.prototype.updateCustomLink=function(a,b){if("data:action/json,"==
b.substring(0,17))try{var e=JSON.parse(b.substring(17));null!=e.actions&&(this.updateCustomLinkActions(a,e.actions),b="data:action/json,"+JSON.stringify(e))}catch(L){}return b};Graph.prototype.updateCustomLinkActions=function(a,b){for(var e=0;e<b.length;e++){var c=b[e],d;for(d in c)this.updateCustomLinkAction(a,c[d],"cells"),this.updateCustomLinkAction(a,c[d],"excludeCells")}};Graph.prototype.updateCustomLinkAction=function(a,b,e){if(null!=b&&null!=b[e]){for(var c=[],d=0;d<b[e].length;d++)if("*"==
b[e][d])c.push(b[e][d]);else{var k=a[b[e][d]];null!=k?""!=k&&c.push(k):c.push(b[e][d])}b[e]=c}};Graph.prototype.getCellsForAction=function(a,b){var e=this.getCellsById(a.cells).concat(this.getCellsForTags(a.tags,null,null,b));if(null!=a.excludeCells){for(var c=[],d=0;d<e.length;d++)0>a.excludeCells.indexOf(e[d].id)&&c.push(e[d]);e=c}return e};Graph.prototype.getCellsById=function(a){var b=[];if(null!=a)for(var e=0;e<a.length;e++)if("*"==a[e])var c=this.model.getRoot(),b=b.concat(this.model.filterDescendants(function(a){return a!=
@@ -10426,31 +10427,31 @@ mxStencilRegistry.libraries["mockup/misc"]=[SHAPES_PATH+"/mockup/mxMockupMisc.js
[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(a){var b=null;null!=a&&0<a.length&&("ER"==a.substring(0,2)?b="mxgraph.er":"sysML"==a.substring(0,5)&&(b="mxgraph.sysml"));return b};var F=mxMarker.createMarker;mxMarker.createMarker=function(a,b,e,c,d,k,l,f,g,n){if(null!=e&&null==mxMarker.markers[e]){var p=this.getPackageForType(e);null!=p&&
-mxStencilRegistry.getStencil(p)}return F.apply(this,arguments)};PrintDialog.prototype.create=function(a,b){function e(){x.value=Math.max(1,Math.min(f,Math.max(parseInt(x.value),parseInt(q.value))));q.value=Math.max(1,Math.min(f,Math.min(parseInt(x.value),parseInt(q.value))))}function c(b){function e(b,e,k){var l=b.useCssTransforms,f=b.currentTranslate,g=b.currentScale,n=b.view.translate,p=b.view.scale;b.useCssTransforms&&(b.useCssTransforms=!1,b.currentTranslate=new mxPoint(0,0),b.currentScale=1,
-b.view.translate=new mxPoint(0,0),b.view.scale=1);var m=b.getGraphBounds(),q=0,x=0,u=M.get(),t=1/b.pageScale,v=z.checked;if(v)var t=parseInt(I.value),B=parseInt(F.value),t=Math.min(u.height*B/(m.height/b.view.scale),u.width*t/(m.width/b.view.scale));else t=parseInt(A.value)/(100*b.pageScale),isNaN(t)&&(c=1/b.pageScale,A.value="100 %");u=mxRectangle.fromRectangle(u);u.width=Math.ceil(u.width*c);u.height=Math.ceil(u.height*c);t*=c;!v&&b.pageVisible?(m=b.getPageLayout(),q-=m.x*u.width,x-=m.y*u.height):
-v=!0;if(null==e){e=PrintDialog.createPrintPreview(b,t,u,0,q,x,v);e.pageSelector=!1;e.mathEnabled=!1;q=a.getCurrentFile();null!=q&&(e.title=q.getTitle());var E=e.writeHead;e.writeHead=function(e){E.apply(this,arguments);if(mxClient.IS_GC||mxClient.IS_SF)e.writeln('<style type="text/css">'),e.writeln(Editor.mathJaxWebkitCss),e.writeln("</style>");mxClient.IS_GC&&(e.writeln('<style type="text/css">'),e.writeln("@media print {"),e.writeln("span.MathJax_SVG svg { shape-rendering: crispEdges; }"),e.writeln("}"),
+mxStencilRegistry.getStencil(p)}return F.apply(this,arguments)};PrintDialog.prototype.create=function(a,b){function e(){x.value=Math.max(1,Math.min(f,Math.max(parseInt(x.value),parseInt(m.value))));m.value=Math.max(1,Math.min(f,Math.min(parseInt(x.value),parseInt(m.value))))}function c(b){function e(b,e,k){var l=b.useCssTransforms,f=b.currentTranslate,g=b.currentScale,n=b.view.translate,p=b.view.scale;b.useCssTransforms&&(b.useCssTransforms=!1,b.currentTranslate=new mxPoint(0,0),b.currentScale=1,
+b.view.translate=new mxPoint(0,0),b.view.scale=1);var q=b.getGraphBounds(),m=0,x=0,u=M.get(),t=1/b.pageScale,v=z.checked;if(v)var t=parseInt(J.value),B=parseInt(F.value),t=Math.min(u.height*B/(q.height/b.view.scale),u.width*t/(q.width/b.view.scale));else t=parseInt(A.value)/(100*b.pageScale),isNaN(t)&&(c=1/b.pageScale,A.value="100 %");u=mxRectangle.fromRectangle(u);u.width=Math.ceil(u.width*c);u.height=Math.ceil(u.height*c);t*=c;!v&&b.pageVisible?(q=b.getPageLayout(),m-=q.x*u.width,x-=q.y*u.height):
+v=!0;if(null==e){e=PrintDialog.createPrintPreview(b,t,u,0,m,x,v);e.pageSelector=!1;e.mathEnabled=!1;m=a.getCurrentFile();null!=m&&(e.title=m.getTitle());var E=e.writeHead;e.writeHead=function(e){E.apply(this,arguments);if(mxClient.IS_GC||mxClient.IS_SF)e.writeln('<style type="text/css">'),e.writeln(Editor.mathJaxWebkitCss),e.writeln("</style>");mxClient.IS_GC&&(e.writeln('<style type="text/css">'),e.writeln("@media print {"),e.writeln("span.MathJax_SVG svg { shape-rendering: crispEdges; }"),e.writeln("}"),
e.writeln("</style>"));null!=a.editor.fontCss&&(e.writeln('<style type="text/css">'),e.writeln(a.editor.fontCss),e.writeln("</style>"));for(var c=b.getCustomFonts(),d=0;d<c.length;d++){var k=c[d].name,l=c[d].url;Graph.isCssFontUrl(l)?e.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(l)+'" charset="UTF-8" type="text/css">'):(e.writeln('<style type="text/css">'),e.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(k)+'";\nsrc: url("'+mxUtils.htmlEntities(l)+'");\n}'),e.writeln("</style>"))}};
-if("undefined"!==typeof MathJax){var y=e.renderPage;e.renderPage=function(b,e,c,d,k,l){var f=mxClient.NO_FO;mxClient.NO_FO=this.graph.mathEnabled&&!a.editor.useForeignObjectForMath?!0:a.editor.originalNoForeignObject;var g=y.apply(this,arguments);mxClient.NO_FO=f;this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:g.className="geDisableMathJax";return g}}q=null;x=d.enableFlowAnimation;d.enableFlowAnimation=!1;null!=d.themes&&"darkTheme"==d.defaultThemeName&&(q=d.stylesheet,d.stylesheet=d.getDefaultStylesheet(),
-d.refresh());e.open(null,null,k,!0);d.enableFlowAnimation=x;null!=q&&(d.stylesheet=q,d.refresh())}else{u=b.background;if(null==u||""==u||u==mxConstants.NONE)u="#ffffff";e.backgroundColor=u;e.autoOrigin=v;e.appendGraph(b,t,q,x,k,!0);k=b.getCustomFonts();if(null!=e.wnd)for(q=0;q<k.length;q++)x=k[q].name,v=k[q].url,Graph.isCssFontUrl(v)?e.wnd.document.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(v)+'" charset="UTF-8" type="text/css">'):(e.wnd.document.writeln('<style type="text/css">'),
-e.wnd.document.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(x)+'";\nsrc: url("'+mxUtils.htmlEntities(v)+'");\n}'),e.wnd.document.writeln("</style>"))}l&&(b.useCssTransforms=l,b.currentTranslate=f,b.currentScale=g,b.view.translate=n,b.view.scale=p);return e}var c=parseInt(N.value)/100;isNaN(c)&&(c=1,N.value="100 %");var c=.75*c,k=null;null!=d.themes&&"darkTheme"==d.defaultThemeName&&(k=d.stylesheet,d.stylesheet=d.getDefaultStylesheet(),d.refresh());var l=q.value,f=x.value,n=!p.checked,
-m=null;if(EditorUi.isElectronApp)PrintDialog.electronPrint(a,p.checked,l,f,z.checked,I.value,F.value,parseInt(A.value)/100,parseInt(N.value)/100,M.get());else{n&&(n=l==g&&f==g);if(!n&&null!=a.pages&&a.pages.length){var u=0,n=a.pages.length-1;p.checked||(u=parseInt(l)-1,n=parseInt(f)-1);for(var t=u;t<=n;t++){var v=a.pages[t],l=v==a.currentPage?d:null;if(null==l){var l=a.createTemporaryGraph(d.stylesheet),f=!0,u=!1,B=null,E=null;null==v.viewState&&null==v.root&&a.updatePageRoot(v);null!=v.viewState&&
-(f=v.viewState.pageVisible,u=v.viewState.mathEnabled,B=v.viewState.background,E=v.viewState.backgroundImage,l.extFonts=v.viewState.extFonts);l.background=B;l.backgroundImage=null!=E?new mxImage(E.src,E.width,E.height):null;l.pageVisible=f;l.mathEnabled=u;var y=l.getGlobalVariable;l.getGlobalVariable=function(b){return"page"==b?v.getName():"pagenumber"==b?t+1:"pagecount"==b?null!=a.pages?a.pages.length:1:y.apply(this,arguments)};document.body.appendChild(l.container);a.updatePageRoot(v);l.model.setRoot(v.root)}m=
-e(l,m,t!=n);l!=d&&l.container.parentNode.removeChild(l.container)}}else m=e(d);null==m?a.handleError({message:mxResources.get("errorUpdatingPreview")}):(m.mathEnabled&&(n=m.wnd.document,b&&(m.wnd.IMMEDIATE_PRINT=!0),n.writeln('<script type="text/javascript" src="'+DRAWIO_BASE_URL+'/js/math-print.js">\x3c/script>')),m.closeDocument(),!m.mathEnabled&&b&&PrintDialog.printPreview(m));null!=k&&(d.stylesheet=k,d.refresh())}}var d=a.editor.graph,k=document.createElement("div"),l=document.createElement("h3");
+if("undefined"!==typeof MathJax){var y=e.renderPage;e.renderPage=function(b,e,c,d,k,l){var f=mxClient.NO_FO;mxClient.NO_FO=this.graph.mathEnabled&&!a.editor.useForeignObjectForMath?!0:a.editor.originalNoForeignObject;var g=y.apply(this,arguments);mxClient.NO_FO=f;this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:g.className="geDisableMathJax";return g}}m=null;x=d.enableFlowAnimation;d.enableFlowAnimation=!1;null!=d.themes&&"darkTheme"==d.defaultThemeName&&(m=d.stylesheet,d.stylesheet=d.getDefaultStylesheet(),
+d.refresh());e.open(null,null,k,!0);d.enableFlowAnimation=x;null!=m&&(d.stylesheet=m,d.refresh())}else{u=b.background;if(null==u||""==u||u==mxConstants.NONE)u="#ffffff";e.backgroundColor=u;e.autoOrigin=v;e.appendGraph(b,t,m,x,k,!0);k=b.getCustomFonts();if(null!=e.wnd)for(m=0;m<k.length;m++)x=k[m].name,v=k[m].url,Graph.isCssFontUrl(v)?e.wnd.document.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(v)+'" charset="UTF-8" type="text/css">'):(e.wnd.document.writeln('<style type="text/css">'),
+e.wnd.document.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(x)+'";\nsrc: url("'+mxUtils.htmlEntities(v)+'");\n}'),e.wnd.document.writeln("</style>"))}l&&(b.useCssTransforms=l,b.currentTranslate=f,b.currentScale=g,b.view.translate=n,b.view.scale=p);return e}var c=parseInt(N.value)/100;isNaN(c)&&(c=1,N.value="100 %");var c=.75*c,k=null;null!=d.themes&&"darkTheme"==d.defaultThemeName&&(k=d.stylesheet,d.stylesheet=d.getDefaultStylesheet(),d.refresh());var l=m.value,f=x.value,n=!p.checked,
+q=null;if(EditorUi.isElectronApp)PrintDialog.electronPrint(a,p.checked,l,f,z.checked,J.value,F.value,parseInt(A.value)/100,parseInt(N.value)/100,M.get());else{n&&(n=l==g&&f==g);if(!n&&null!=a.pages&&a.pages.length){var u=0,n=a.pages.length-1;p.checked||(u=parseInt(l)-1,n=parseInt(f)-1);for(var t=u;t<=n;t++){var v=a.pages[t],l=v==a.currentPage?d:null;if(null==l){var l=a.createTemporaryGraph(d.stylesheet),f=!0,u=!1,B=null,E=null;null==v.viewState&&null==v.root&&a.updatePageRoot(v);null!=v.viewState&&
+(f=v.viewState.pageVisible,u=v.viewState.mathEnabled,B=v.viewState.background,E=v.viewState.backgroundImage,l.extFonts=v.viewState.extFonts);l.background=B;l.backgroundImage=null!=E?new mxImage(E.src,E.width,E.height):null;l.pageVisible=f;l.mathEnabled=u;var y=l.getGlobalVariable;l.getGlobalVariable=function(b){return"page"==b?v.getName():"pagenumber"==b?t+1:"pagecount"==b?null!=a.pages?a.pages.length:1:y.apply(this,arguments)};document.body.appendChild(l.container);a.updatePageRoot(v);l.model.setRoot(v.root)}q=
+e(l,q,t!=n);l!=d&&l.container.parentNode.removeChild(l.container)}}else q=e(d);null==q?a.handleError({message:mxResources.get("errorUpdatingPreview")}):(q.mathEnabled&&(n=q.wnd.document,b&&(q.wnd.IMMEDIATE_PRINT=!0),n.writeln('<script type="text/javascript" src="'+DRAWIO_BASE_URL+'/js/math-print.js">\x3c/script>')),q.closeDocument(),!q.mathEnabled&&b&&PrintDialog.printPreview(q));null!=k&&(d.stylesheet=k,d.refresh())}}var d=a.editor.graph,k=document.createElement("div"),l=document.createElement("h3");
l.style.width="100%";l.style.textAlign="center";l.style.marginTop="0px";mxUtils.write(l,b||mxResources.get("print"));k.appendChild(l);var f=1,g=1,n=document.createElement("div");n.style.cssText="border-bottom:1px solid lightGray;padding-bottom:12px;margin-bottom:12px;";var p=document.createElement("input");p.style.cssText="margin-right:8px;margin-bottom:8px;";p.setAttribute("value","all");p.setAttribute("type","radio");p.setAttribute("name","pages-printdialog");n.appendChild(p);l=document.createElement("span");
-mxUtils.write(l,mxResources.get("printAllPages"));n.appendChild(l);mxUtils.br(n);var m=p.cloneNode(!0);p.setAttribute("checked","checked");m.setAttribute("value","range");n.appendChild(m);l=document.createElement("span");mxUtils.write(l,mxResources.get("pages")+":");n.appendChild(l);var q=document.createElement("input");q.style.cssText="margin:0 8px 0 8px;";q.setAttribute("value","1");q.setAttribute("type","number");q.setAttribute("min","1");q.style.width="50px";n.appendChild(q);l=document.createElement("span");
-mxUtils.write(l,mxResources.get("to"));n.appendChild(l);var x=q.cloneNode(!0);n.appendChild(x);mxEvent.addListener(q,"focus",function(){m.checked=!0});mxEvent.addListener(x,"focus",function(){m.checked=!0});mxEvent.addListener(q,"change",e);mxEvent.addListener(x,"change",e);if(null!=a.pages&&(f=a.pages.length,null!=a.currentPage))for(l=0;l<a.pages.length;l++)if(a.currentPage==a.pages[l]){g=l+1;q.value=g;x.value=g;break}q.setAttribute("max",f);x.setAttribute("max",f);a.isPagesEnabled()?1<f&&(k.appendChild(n),
-m.checked=!0):m.checked=!0;var u=document.createElement("div");u.style.marginBottom="10px";var t=document.createElement("input");t.style.marginRight="8px";t.setAttribute("value","adjust");t.setAttribute("type","radio");t.setAttribute("name","printZoom");u.appendChild(t);l=document.createElement("span");mxUtils.write(l,mxResources.get("adjustTo"));u.appendChild(l);var A=document.createElement("input");A.style.cssText="margin:0 8px 0 8px;";A.setAttribute("value","100 %");A.style.width="50px";u.appendChild(A);
-mxEvent.addListener(A,"focus",function(){t.checked=!0});k.appendChild(u);var n=n.cloneNode(!1),z=t.cloneNode(!0);z.setAttribute("value","fit");t.setAttribute("checked","checked");l=document.createElement("div");l.style.cssText="display:inline-block;height:100%;vertical-align:top;padding-top:2px;";l.appendChild(z);n.appendChild(l);u=document.createElement("table");u.style.display="inline-block";var v=document.createElement("tbody"),B=document.createElement("tr"),E=B.cloneNode(!0),y=document.createElement("td"),
-J=y.cloneNode(!0),C=y.cloneNode(!0),D=y.cloneNode(!0),G=y.cloneNode(!0),K=y.cloneNode(!0);y.style.textAlign="right";D.style.textAlign="right";mxUtils.write(y,mxResources.get("fitTo"));var I=document.createElement("input");I.style.cssText="margin:0 8px 0 8px;";I.setAttribute("value","1");I.setAttribute("min","1");I.setAttribute("type","number");I.style.width="40px";J.appendChild(I);l=document.createElement("span");mxUtils.write(l,mxResources.get("fitToSheetsAcross"));C.appendChild(l);mxUtils.write(D,
-mxResources.get("fitToBy"));var F=I.cloneNode(!0);G.appendChild(F);mxEvent.addListener(I,"focus",function(){z.checked=!0});mxEvent.addListener(F,"focus",function(){z.checked=!0});l=document.createElement("span");mxUtils.write(l,mxResources.get("fitToSheetsDown"));K.appendChild(l);B.appendChild(y);B.appendChild(J);B.appendChild(C);E.appendChild(D);E.appendChild(G);E.appendChild(K);v.appendChild(B);v.appendChild(E);u.appendChild(v);n.appendChild(u);k.appendChild(n);n=document.createElement("div");l=
+mxUtils.write(l,mxResources.get("printAllPages"));n.appendChild(l);mxUtils.br(n);var q=p.cloneNode(!0);p.setAttribute("checked","checked");q.setAttribute("value","range");n.appendChild(q);l=document.createElement("span");mxUtils.write(l,mxResources.get("pages")+":");n.appendChild(l);var m=document.createElement("input");m.style.cssText="margin:0 8px 0 8px;";m.setAttribute("value","1");m.setAttribute("type","number");m.setAttribute("min","1");m.style.width="50px";n.appendChild(m);l=document.createElement("span");
+mxUtils.write(l,mxResources.get("to"));n.appendChild(l);var x=m.cloneNode(!0);n.appendChild(x);mxEvent.addListener(m,"focus",function(){q.checked=!0});mxEvent.addListener(x,"focus",function(){q.checked=!0});mxEvent.addListener(m,"change",e);mxEvent.addListener(x,"change",e);if(null!=a.pages&&(f=a.pages.length,null!=a.currentPage))for(l=0;l<a.pages.length;l++)if(a.currentPage==a.pages[l]){g=l+1;m.value=g;x.value=g;break}m.setAttribute("max",f);x.setAttribute("max",f);a.isPagesEnabled()?1<f&&(k.appendChild(n),
+q.checked=!0):q.checked=!0;var u=document.createElement("div");u.style.marginBottom="10px";var t=document.createElement("input");t.style.marginRight="8px";t.setAttribute("value","adjust");t.setAttribute("type","radio");t.setAttribute("name","printZoom");u.appendChild(t);l=document.createElement("span");mxUtils.write(l,mxResources.get("adjustTo"));u.appendChild(l);var A=document.createElement("input");A.style.cssText="margin:0 8px 0 8px;";A.setAttribute("value","100 %");A.style.width="50px";u.appendChild(A);
+mxEvent.addListener(A,"focus",function(){t.checked=!0});k.appendChild(u);var n=n.cloneNode(!1),z=t.cloneNode(!0);z.setAttribute("value","fit");t.setAttribute("checked","checked");l=document.createElement("div");l.style.cssText="display:inline-block;height:100%;vertical-align:top;padding-top:2px;";l.appendChild(z);n.appendChild(l);u=document.createElement("table");u.style.display="inline-block";var v=document.createElement("tbody"),B=document.createElement("tr"),y=B.cloneNode(!0),E=document.createElement("td"),
+K=E.cloneNode(!0),C=E.cloneNode(!0),D=E.cloneNode(!0),G=E.cloneNode(!0),I=E.cloneNode(!0);E.style.textAlign="right";D.style.textAlign="right";mxUtils.write(E,mxResources.get("fitTo"));var J=document.createElement("input");J.style.cssText="margin:0 8px 0 8px;";J.setAttribute("value","1");J.setAttribute("min","1");J.setAttribute("type","number");J.style.width="40px";K.appendChild(J);l=document.createElement("span");mxUtils.write(l,mxResources.get("fitToSheetsAcross"));C.appendChild(l);mxUtils.write(D,
+mxResources.get("fitToBy"));var F=J.cloneNode(!0);G.appendChild(F);mxEvent.addListener(J,"focus",function(){z.checked=!0});mxEvent.addListener(F,"focus",function(){z.checked=!0});l=document.createElement("span");mxUtils.write(l,mxResources.get("fitToSheetsDown"));I.appendChild(l);B.appendChild(E);B.appendChild(K);B.appendChild(C);y.appendChild(D);y.appendChild(G);y.appendChild(I);v.appendChild(B);v.appendChild(y);u.appendChild(v);n.appendChild(u);k.appendChild(n);n=document.createElement("div");l=
document.createElement("div");l.style.fontWeight="bold";l.style.marginBottom="12px";mxUtils.write(l,mxResources.get("paperSize"));n.appendChild(l);l=document.createElement("div");l.style.marginBottom="12px";var M=PageSetupDialog.addPageFormatPanel(l,"printdialog",a.editor.graph.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT);n.appendChild(l);l=document.createElement("span");mxUtils.write(l,mxResources.get("pageScale"));n.appendChild(l);var N=document.createElement("input");N.style.cssText="margin:0 8px 0 8px;";
N.setAttribute("value","100 %");N.style.width="60px";n.appendChild(N);k.appendChild(n);l=document.createElement("div");l.style.cssText="text-align:right;margin:48px 0 0 0;";n=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});n.className="geBtn";a.editor.cancelFirst&&l.appendChild(n);a.isOffline()||(u=mxUtils.button(mxResources.get("help"),function(){d.openLink("https://www.diagrams.net/doc/faq/print-diagram")}),u.className="geBtn",l.appendChild(u));PrintDialog.previewEnabled&&(u=
-mxUtils.button(mxResources.get("preview"),function(){a.hideDialog();c(!1)}),u.className="geBtn",l.appendChild(u));u=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){a.hideDialog();c(!0)});u.className="geBtn gePrimaryBtn";l.appendChild(u);a.editor.cancelFirst||l.appendChild(n);k.appendChild(l);this.container=k};var K=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 a=this.image;null!=a&&null!=a.src&&Graph.isPageLink(a.src)&&(a={originalSrc:a.src});this.page.viewState.backgroundImage=a}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 K.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 M=document.createElement("canvas"),J=new Image;J.onload=function(){try{M.getContext("2d").drawImage(J,0,0);var a=M.toDataURL("image/png");Editor.prototype.useCanvasForExport=
-null!=a&&6<a.length}catch(N){}};J.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(I){}})();
+mxUtils.button(mxResources.get("preview"),function(){a.hideDialog();c(!1)}),u.className="geBtn",l.appendChild(u));u=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){a.hideDialog();c(!0)});u.className="geBtn gePrimaryBtn";l.appendChild(u);a.editor.cancelFirst||l.appendChild(n);k.appendChild(l);this.container=k};var J=ChangePageSetup.prototype.execute;ChangePageSetup.prototype.execute=function(){null==this.page&&(this.page=this.ui.currentPage);if(this.page!=this.ui.currentPage){if(null!=
+this.page.viewState){this.ignoreColor||(this.page.viewState.background=this.color);if(!this.ignoreImage){var a=this.image;null!=a&&null!=a.src&&Graph.isPageLink(a.src)&&(a={originalSrc:a.src});this.page.viewState.backgroundImage=a}null!=this.format&&(this.page.viewState.pageFormat=this.format);null!=this.mathEnabled&&(this.page.viewState.mathEnabled=this.mathEnabled);null!=this.shadowVisible&&(this.page.viewState.shadowVisible=this.shadowVisible)}}else J.apply(this,arguments),null!=this.mathEnabled&&
+this.mathEnabled!=this.ui.isMathEnabled()&&(this.ui.setMathEnabled(this.mathEnabled),this.mathEnabled=!this.mathEnabled),null!=this.shadowVisible&&this.shadowVisible!=this.ui.editor.graph.shadowVisible&&(this.ui.editor.graph.setShadowVisible(this.shadowVisible),this.shadowVisible=!this.shadowVisible)};Editor.prototype.useCanvasForExport=!1;try{var M=document.createElement("canvas"),K=new Image;K.onload=function(){try{M.getContext("2d").drawImage(K,0,0);var a=M.toDataURL("image/png");Editor.prototype.useCanvasForExport=
+null!=a&&6<a.length}catch(N){}};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(I){}})();
(function(){var a=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);a.beforeDecode=function(a,c,b){b.ui=a.ui;return c};a.afterDecode=function(a,c,b){b.previousColor=b.color;b.previousImage=b.image;b.previousFormat=b.format;null!=b.foldingEnabled&&(b.foldingEnabled=!b.foldingEnabled);null!=b.mathEnabled&&(b.mathEnabled=!b.mathEnabled);null!=b.shadowVisible&&(b.shadowVisible=!b.shadowVisible);return b};mxCodecRegistry.register(a)})();
-(function(){var a=new mxObjectCodec(new ChangeGridColor,["ui"]);a.beforeDecode=function(a,c,b){b.ui=a.ui;return c};mxCodecRegistry.register(a)})();(function(){EditorUi.VERSION="15.0.3";EditorUi.compactUi="atlas"!=uiTheme;Editor.isDarkMode()&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&(/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname))&&"support.draw.io"!=window.location.hostname;EditorUi.drawHost=window.DRAWIO_BASE_URL;EditorUi.lightboxHost=window.DRAWIO_LIGHTBOX_URL;EditorUi.lastErrorMessage=
+(function(){var a=new mxObjectCodec(new ChangeGridColor,["ui"]);a.beforeDecode=function(a,c,b){b.ui=a.ui;return c};mxCodecRegistry.register(a)})();(function(){EditorUi.VERSION="15.0.4";EditorUi.compactUi="atlas"!=uiTheme;Editor.isDarkMode()&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&(/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname))&&"support.draw.io"!=window.location.hostname;EditorUi.drawHost=window.DRAWIO_BASE_URL;EditorUi.lightboxHost=window.DRAWIO_LIGHTBOX_URL;EditorUi.lastErrorMessage=
null;EditorUi.ignoredAnonymizedChars="\n\t`~!@#$%^&*()_+{}|:\"<>?-=[];'./,\n\t";EditorUi.templateFile=TEMPLATE_PATH+"/index.xml";EditorUi.cacheUrl="1"==urlParams.dev?"/cache":window.REALTIME_URL;null==EditorUi.cacheUrl&&"undefined"!==typeof DrawioFile&&(DrawioFile.SYNC="none");Editor.cacheTimeout=1E4;EditorUi.enablePlantUml=EditorUi.enableLogging;EditorUi.isElectronApp=null!=window&&null!=window.process&&null!=window.process.versions&&null!=window.process.versions.electron;EditorUi.nativeFileSupport=
!mxClient.IS_OP&&!EditorUi.isElectronApp&&"1"!=urlParams.extAuth&&"showSaveFilePicker"in window&&"showOpenFilePicker"in window;EditorUi.enableDrafts=!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&isLocalStorage&&"0"!=urlParams.drafts;EditorUi.scratchpadHelpLink="https://www.diagrams.net/doc/faq/scratchpad";EditorUi.defaultMermaidConfig={theme:"neutral",arrowMarkerAbsolute:!1,flowchart:{htmlLabels:!1},sequence:{diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,
noteMargin:10,messageMargin:35,mirrorActors:!0,bottomMarginAdj:1,useMaxWidth:!0,rightAngles:!1,showSequenceNumbers:!1},gantt:{titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,leftPadding:75,gridLineStartPadding:35,fontSize:11,fontFamily:'"Open-Sans", "sans-serif"',numberSectionStyles:4,axisFormat:"%Y-%m-%d"}};EditorUi.logError=function(a,b,c,d,f,g,m){g=null!=g?g:0<=a.indexOf("NetworkError")||0<=a.indexOf("SecurityError")||0<=a.indexOf("NS_ERROR_FAILURE")||0<=a.indexOf("out of memory")?"CONFIG":
@@ -10478,115 +10479,117 @@ this.editor.setGraphXml(a),null!=this.currentPage&&(this.currentPage.root=this.e
a.ownerDocument.createElement("diagram");n.setAttribute("id",Editor.guid());n.appendChild(a)}else{n=Graph.zapGremlins(mxUtils.getXml(a));l=Graph.compress(n);if(Graph.decompress(l)!=n)return n;n=a.ownerDocument.createElement("diagram");n.setAttribute("id",Editor.guid());mxUtils.setTextContent(n,l)}l=a.ownerDocument.createElement("mxfile");l.appendChild(n)}z?(l=l.cloneNode(!0),l.removeAttribute("modified"),l.removeAttribute("host"),l.removeAttribute("agent"),l.removeAttribute("etag"),l.removeAttribute("userAgent"),
l.removeAttribute("version"),l.removeAttribute("editor"),l.removeAttribute("type")):(l.removeAttribute("userAgent"),l.removeAttribute("version"),l.removeAttribute("editor"),l.removeAttribute("pages"),l.removeAttribute("type"),mxClient.IS_CHROMEAPP?l.setAttribute("host","Chrome"):EditorUi.isElectronApp?l.setAttribute("host","Electron"):l.setAttribute("host",window.location.hostname),l.setAttribute("modified",(new Date).toISOString()),l.setAttribute("agent",navigator.appVersion),l.setAttribute("version",
EditorUi.VERSION),l.setAttribute("etag",Editor.guid()),a=null!=c?c.getMode():this.mode,null!=a&&l.setAttribute("type",a),1<l.getElementsByTagName("diagram").length&&null!=this.pages&&l.setAttribute("pages",this.pages.length));y=y?mxUtils.getPrettyXml(l):mxUtils.getXml(l);if(!g&&!f&&(m||null!=c&&/(\.html)$/i.test(c.getTitle())))y=this.getHtml2(mxUtils.getXml(l),b,null!=c?c.getTitle():null,e,k);else if(g||!f&&null!=c&&/(\.svg)$/i.test(c.getTitle()))null==c||c.getMode()!=App.MODE_DEVICE&&c.getMode()!=
-App.MODE_BROWSER||(d=null),y=this.getEmbeddedSvg(y,b,d,null,t,v,k);return y};EditorUi.prototype.getXmlFileData=function(a,b,c){a=null!=a?a:!0;b=null!=b?b:!1;c=null!=c?c:!Editor.compressXml;var e=this.editor.getGraphXml(a);if(a&&null!=this.fileNode&&null!=this.currentPage)if(a=function(a){var b=a.getElementsByTagName("mxGraphModel"),b=0<b.length?b[0]:null;null==b&&c?(b=mxUtils.trim(mxUtils.getTextContent(a)),a=a.cloneNode(!1),0<b.length&&(b=Graph.decompress(b),null!=b&&0<b.length&&a.appendChild(mxUtils.parseXml(b).documentElement))):
-null==b||c?a=a.cloneNode(!0):(a=a.cloneNode(!1),mxUtils.setTextContent(a,Graph.compressNode(b)));e.appendChild(a)},EditorUi.removeChildNodes(this.currentPage.node),mxUtils.setTextContent(this.currentPage.node,Graph.compressNode(e)),e=this.fileNode.cloneNode(!1),b)a(this.currentPage.node);else for(b=0;b<this.pages.length;b++){if(this.currentPage!=this.pages[b]&&this.pages[b].needsUpdate){var d=(new mxCodec(mxUtils.createXmlDocument())).encode(new mxGraphModel(this.pages[b].root));this.editor.graph.saveViewState(this.pages[b].viewState,
-d);EditorUi.removeChildNodes(this.pages[b].node);mxUtils.setTextContent(this.pages[b].node,Graph.compressNode(d));delete this.pages[b].needsUpdate}a(this.pages[b].node)}return e};EditorUi.prototype.anonymizeString=function(a,b){for(var e=[],c=0;c<a.length;c++){var d=a.charAt(c);0<=EditorUi.ignoredAnonymizedChars.indexOf(d)?e.push(d):isNaN(parseInt(d))?d.toLowerCase()!=d?e.push(String.fromCharCode(65+Math.round(25*Math.random()))):d.toUpperCase()!=d?e.push(String.fromCharCode(97+Math.round(25*Math.random()))):
-/\s/.test(d)?e.push(" "):e.push("?"):e.push(b?"0":Math.round(9*Math.random()))}return e.join("")};EditorUi.prototype.anonymizePatch=function(a){if(null!=a[EditorUi.DIFF_INSERT])for(var b=0;b<a[EditorUi.DIFF_INSERT].length;b++)try{var e=mxUtils.parseXml(a[EditorUi.DIFF_INSERT][b].data).documentElement.cloneNode(!1);null!=e.getAttribute("name")&&e.setAttribute("name",this.anonymizeString(e.getAttribute("name")));a[EditorUi.DIFF_INSERT][b].data=mxUtils.getXml(e)}catch(q){a[EditorUi.DIFF_INSERT][b].data=
-q.message}if(null!=a[EditorUi.DIFF_UPDATE]){for(var c in a[EditorUi.DIFF_UPDATE]){var d=a[EditorUi.DIFF_UPDATE][c];null!=d.name&&(d.name=this.anonymizeString(d.name));null!=d.cells&&(b=mxUtils.bind(this,function(a){var b=d.cells[a];if(null!=b){for(var e in b)null!=b[e].value&&(b[e].value="["+b[e].value.length+"]"),null!=b[e].xmlValue&&(b[e].xmlValue="["+b[e].xmlValue.length+"]"),null!=b[e].style&&(b[e].style="["+b[e].style.length+"]"),0==Object.keys(b[e]).length&&delete b[e];0==Object.keys(b).length&&
-delete d.cells[a]}}),b(EditorUi.DIFF_INSERT),b(EditorUi.DIFF_UPDATE),0==Object.keys(d.cells).length&&delete d.cells);0==Object.keys(d).length&&delete a[EditorUi.DIFF_UPDATE][c]}0==Object.keys(a[EditorUi.DIFF_UPDATE]).length&&delete a[EditorUi.DIFF_UPDATE]}return a};EditorUi.prototype.anonymizeAttributes=function(a,b){if(null!=a.attributes)for(var e=0;e<a.attributes.length;e++)"as"!=a.attributes[e].name&&a.setAttribute(a.attributes[e].name,this.anonymizeString(a.attributes[e].value,b));if(null!=a.childNodes)for(e=
-0;e<a.childNodes.length;e++)this.anonymizeAttributes(a.childNodes[e],b)};EditorUi.prototype.anonymizeNode=function(a,b){for(var e=a.getElementsByTagName("mxCell"),c=0;c<e.length;c++)null!=e[c].getAttribute("value")&&e[c].setAttribute("value","["+e[c].getAttribute("value").length+"]"),null!=e[c].getAttribute("xmlValue")&&e[c].setAttribute("xmlValue","["+e[c].getAttribute("xmlValue").length+"]"),null!=e[c].getAttribute("style")&&e[c].setAttribute("style","["+e[c].getAttribute("style").length+"]"),null!=
-e[c].parentNode&&"root"!=e[c].parentNode.nodeName&&null!=e[c].parentNode.parentNode&&(e[c].setAttribute("id",e[c].parentNode.getAttribute("id")),e[c].parentNode.parentNode.replaceChild(e[c],e[c].parentNode));return a};EditorUi.prototype.synchronizeCurrentFile=function(a){var b=this.getCurrentFile();null!=b&&(b.savingFile?this.handleError({message:mxResources.get("busy")}):!a&&b.invalidChecksum?b.handleFileError(null,!0):this.spinner.spin(document.body,mxResources.get("updatingDocument"))&&(b.clearAutosave(),
-this.editor.setStatus(""),a?b.reloadFile(mxUtils.bind(this,function(){b.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(a){b.handleFileError(a,!0)})):b.synchronizeFile(mxUtils.bind(this,function(){b.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(a){b.handleFileError(a,!0)}))))};EditorUi.prototype.getFileData=function(a,b,c,d,f,g,m,t,v,z){f=null!=f?f:!0;g=null!=g?g:!1;var e=this.editor.graph;if(b||!a&&null!=v&&/(\.svg)$/i.test(v.getTitle()))if(z=
-!1,null!=e.themes&&"darkTheme"==e.defaultThemeName||null!=this.pages&&this.currentPage!=this.pages[0]){var k=e.getGlobalVariable,e=this.createTemporaryGraph(e.getStylesheet()),l=this.pages[0];e.getGlobalVariable=function(a){return"page"==a?l.getName():"pagenumber"==a?1:k.apply(this,arguments)};document.body.appendChild(e.container);e.model.setRoot(l.root)}m=null!=m?m:this.getXmlFileData(f,g,z);v=null!=v?v:this.getCurrentFile();a=this.createFileData(m,e,v,window.location.href,a,b,c,d,f,t,z);e!=this.editor.graph&&
-e.container.parentNode.removeChild(e.container);return a};EditorUi.prototype.getHtml=function(a,b,c,d,f,g){g=null!=g?g:!0;var e=null,k=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=b){var e=g?b.getGraphBounds():b.getBoundingBox(b.getSelectionCells()),l=b.view.scale;g=Math.floor(e.x/l-b.view.translate.x);l=Math.floor(e.y/l-b.view.translate.y);e=b.background;null==f&&(b=this.getBasenames().join(";"),0<b.length&&(k=EditorUi.drawHost+"/embed.js?s="+b));a.setAttribute("x0",g);a.setAttribute("y0",
-l)}null!=a&&(a.setAttribute("pan","1"),a.setAttribute("zoom","1"),a.setAttribute("resize","0"),a.setAttribute("fit","0"),a.setAttribute("border","20"),a.setAttribute("links","1"),null!=d&&a.setAttribute("edit",d));null!=f&&(f=f.replace(/&/g,"&amp;"));a=null!=a?Graph.zapGremlins(mxUtils.getXml(a)):"";d=Graph.compress(a);Graph.decompress(d)!=a&&(d=encodeURIComponent(a));return(null==f?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+
-(null!=f?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==f?null!=c?"<title>"+mxUtils.htmlEntities(c)+"</title>\n":"":"<title>diagrams.net</title>\n")+(null!=f?'<meta http-equiv="refresh" content="0;URL=\''+f+"'\"/>\n":"")+"</head>\n<body"+(null==f&&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;">'+d+"</div>\n</div>\n"+(null==f?'<script type="text/javascript" src="'+
-k+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+f+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.getHtml2=function(a,b,c,d,f){b=window.DRAWIO_VIEWER_URL||EditorUi.drawHost+"/js/viewer-static.min.js";null!=f&&(f=f.replace(/&/g,"&amp;"));a={highlight:"#0000ff",nav:this.editor.graph.foldingEnabled,resize:!0,xml:Graph.zapGremlins(a),toolbar:"pages zoom layers lightbox"};
-null!=this.pages&&null!=this.currentPage&&(a.page=mxUtils.indexOf(this.pages,this.currentPage));return(null==f?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=f?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==f?null!=c?"<title>"+mxUtils.htmlEntities(c)+"</title>\n":"":"<title>diagrams.net</title>\n")+(null!=f?'<meta http-equiv="refresh" content="0;URL=\''+f+"'\"/>\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(a))+'"></div>\n'+(null==f?'<script type="text/javascript" src="'+b+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+f+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.setFileData=function(a){a=this.validateFileData(a);this.pages=this.fileNode=this.currentPage=null;a=null!=a&&0<a.length?mxUtils.parseXml(a).documentElement:
-null;var b=Editor.extractParserError(a,mxResources.get("invalidOrMissingFile"));if(b)throw Error(mxResources.get("notADiagramFile")+" ("+b+")");b=null!=a?this.editor.extractGraphModel(a,!0):null;null!=b&&(a=b);if(null!=a&&"mxfile"==a.nodeName&&(b=a.getElementsByTagName("diagram"),"0"!=urlParams.pages||1<b.length||1==b.length&&b[0].hasAttribute("name"))){var e=null;this.fileNode=a;this.pages=[];for(var c=0;c<b.length;c++)null==b[c].getAttribute("id")&&b[c].setAttribute("id",c),a=new DiagramPage(b[c]),
-null==a.getName()&&a.setName(mxResources.get("pageWithNumber",[c+1])),this.pages.push(a),null!=urlParams["page-id"]&&a.getId()==urlParams["page-id"]&&(e=a);this.currentPage=null!=e?e:this.pages[Math.max(0,Math.min(this.pages.length-1,urlParams.page||0))];a=this.currentPage.node}"0"!=urlParams.pages&&null==this.fileNode&&null!=a&&(this.fileNode=a.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(a.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",
-[1])),this.pages=[this.currentPage]);this.editor.setGraphXml(a);null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=urlParams["layer-ids"])try{var d=urlParams["layer-ids"].split(" ");a={};for(c=0;c<d.length;c++)a[d[c]]=!0;for(var f=this.editor.graph.getModel(),g=f.getChildren(f.root),c=0;c<g.length;c++){var m=g[c];f.setVisible(m,a[m.id]||!1)}}catch(v){}};EditorUi.prototype.getBaseFilename=function(a){var b=this.getCurrentFile(),b=null!=b&&null!=b.getTitle()?b.getTitle():
-this.defaultFilename;if(/(\.xml)$/i.test(b)||/(\.html)$/i.test(b)||/(\.svg)$/i.test(b)||/(\.png)$/i.test(b)||/(\.drawio)$/i.test(b))b=b.substring(0,b.lastIndexOf("."));!a&&null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&null!=this.currentPage.node.getAttribute("name")&&0<this.currentPage.getName().length&&(b=b+"-"+this.currentPage.getName());return b};EditorUi.prototype.downloadFile=function(a,b,c,d,f,g,m,t,v,z,y){try{d=null!=d?d:this.editor.graph.isSelectionEmpty();var e=this.getBaseFilename(!f),
-k=e+"."+a;if("xml"==a){var l='<?xml version="1.0" encoding="UTF-8"?>\n'+this.getFileData(!0,null,null,null,d,f,null,null,null,b);this.saveData(k,a,l,"text/xml")}else if("html"==a)l=this.getHtml2(this.getFileData(!0),this.editor.graph,e),this.saveData(k,a,l,"text/html");else if("svg"!=a&&"xmlsvg"!=a||!this.spinner.spin(document.body,mxResources.get("export")))"xmlpng"==a?k=e+".png":"jpeg"==a&&(k=e+".jpg"),this.saveRequest(k,a,mxUtils.bind(this,function(b,e){try{var c=this.editor.graph.pageVisible;
-null!=g&&(this.editor.graph.pageVisible=g);var k=this.createDownloadRequest(b,a,d,e,m,f,t,v,z,y);this.editor.graph.pageVisible=c;return k}catch(I){this.handleError(I)}}));else{var n=null,p=mxUtils.bind(this,function(a){a.length<=MAX_REQUEST_SIZE?this.saveData(k,"svg",a,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(n)}))});if("svg"==a){var q=this.editor.graph.background;if(m||q==mxConstants.NONE)q=
-null;var u=this.editor.graph.getSvg(q,null,null,null,null,d);c&&this.editor.graph.addSvgShadow(u);this.editor.convertImages(u,mxUtils.bind(this,mxUtils.bind(this,function(a){this.spinner.stop();p('<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n'+mxUtils.getXml(a))})))}else k=e+".svg",n=this.getFileData(!1,!0,null,mxUtils.bind(this,function(a){this.spinner.stop();p(a)}),d)}}catch(F){this.handleError(F)}};EditorUi.prototype.createDownloadRequest=
-function(a,b,c,d,f,g,m,t,v,z){var e=this.editor.graph,k=e.getGraphBounds();c=this.getFileData(!0,null,null,null,c,0==g?!1:"xmlpng"!=b);var l="",n="";if(k.width*k.height>MAX_AREA||c.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};z=z?"1":"0";"pdf"==b&&0==g&&(n="&allPages=1");if("xmlpng"==b&&(z="1",b="png",null!=this.pages&&null!=this.currentPage))for(g=0;g<this.pages.length;g++)if(this.pages[g]==this.currentPage){l="&from="+g;break}g=e.background;"png"!=b&&"pdf"!=b||!f?f||
-null!=g&&g!=mxConstants.NONE||(g="#ffffff"):g=mxConstants.NONE;f={globalVars:e.getExportVariables()};v&&(f.grid={size:e.gridSize,steps:e.view.gridSteps,color:e.view.gridColor});Graph.translateDiagram&&(f.diagramLanguage=Graph.diagramLanguage);return new mxXmlRequest(EXPORT_URL,"format="+b+l+n+"&bg="+(null!=g?g:mxConstants.NONE)+"&base64="+d+"&embedXml="+z+"&xml="+encodeURIComponent(c)+(null!=a?"&filename="+encodeURIComponent(a):"")+"&extras="+encodeURIComponent(JSON.stringify(f))+(null!=m?"&scale="+
-m:"")+(null!=t?"&border="+t:""))};EditorUi.prototype.setMode=function(a,b){this.mode=a};EditorUi.prototype.loadDescriptor=function(a,b,c){var e=window.location.hash,d=mxUtils.bind(this,function(c){var d=null!=a.data?a.data:"";null!=c&&0<c.length&&(0<d.length&&(d+="\n"),d+=c);c=new LocalFile(this,"csv"!=a.format&&0<d.length?d:this.emptyDiagramXml,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0);c.getHash=function(){return e};this.fileLoaded(c);"csv"==a.format&&this.importCsv(d,
-mxUtils.bind(this,function(a){this.editor.undoManager.clear();this.editor.setModified(!1);this.editor.setStatus("")}));if(null!=a.update){var k=null!=a.interval?parseInt(a.interval):6E4,l=null,f=mxUtils.bind(this,function(){var b=this.currentPage;mxUtils.post(a.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,function(a){b===this.currentPage&&(200<=a.getStatus()&&300>=a.getStatus()?(this.updateDiagram(a.getText()),g()):this.handleError({message:mxResources.get("error")+
-" "+a.getStatus()}))}),mxUtils.bind(this,function(a){this.handleError(a)}))}),g=mxUtils.bind(this,function(){window.clearTimeout(l);l=window.setTimeout(f,k)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){g();f()}));g();f()}null!=b&&b()});null!=a.url&&0<a.url.length?this.editor.loadUrl(a.url,mxUtils.bind(this,function(a){d(a)}),mxUtils.bind(this,function(a){null!=c&&c(a)})):d("")};EditorUi.prototype.updateDiagram=function(a){function b(a){var b=new mxCellOverlay(a.image||d.warningImage,
-a.tooltip,a.align,a.valign,a.offset);b.addListener(mxEvent.CLICK,function(b,e){c.alert(a.tooltip)});return b}var e=null,c=this;if(null!=a&&0<a.length&&(e=mxUtils.parseXml(a),a=null!=e?e.documentElement:null,null!=a&&"updates"==a.nodeName)){var d=this.editor.graph,f=d.getModel();f.beginUpdate();var g=null;try{for(a=a.firstChild;null!=a;){if("update"==a.nodeName){var m=f.getCell(a.getAttribute("id"));if(null!=m){try{var v=a.getAttribute("value");if(null!=v){var z=mxUtils.parseXml(v).documentElement;
-if(null!=z)if("1"==z.getAttribute("replace-value"))f.setValue(m,z);else for(var y=z.attributes,x=0;x<y.length;x++)d.setAttributeForCell(m,y[x].nodeName,0<y[x].nodeValue.length?y[x].nodeValue:null)}}catch(K){null!=window.console&&console.log("Error in value for "+m.id+": "+K)}try{var A=a.getAttribute("style");null!=A&&d.model.setStyle(m,A)}catch(K){null!=window.console&&console.log("Error in style for "+m.id+": "+K)}try{var B=a.getAttribute("icon");if(null!=B){var C=0<B.length?JSON.parse(B):null;null!=
-C&&C.append||d.removeCellOverlays(m);null!=C&&d.addCellOverlay(m,b(C))}}catch(K){null!=window.console&&console.log("Error in icon for "+m.id+": "+K)}try{var D=a.getAttribute("geometry");if(null!=D){var D=JSON.parse(D),G=d.getCellGeometry(m);if(null!=G){G=G.clone();for(key in D){var E=parseFloat(D[key]);"dx"==key?G.x+=E:"dy"==key?G.y+=E:"dw"==key?G.width+=E:"dh"==key?G.height+=E:G[key]=parseFloat(D[key])}d.model.setGeometry(m,G)}}}catch(K){null!=window.console&&console.log("Error in icon for "+m.id+
-": "+K)}}}else if("model"==a.nodeName){for(var F=a.firstChild;null!=F&&F.nodeType!=mxConstants.NODETYPE_ELEMENT;)F=F.nextSibling;null!=F&&(new mxCodec(a.firstChild)).decode(F,f)}else if("view"==a.nodeName){if(a.hasAttribute("scale")&&(d.view.scale=parseFloat(a.getAttribute("scale"))),a.hasAttribute("dx")||a.hasAttribute("dy"))d.view.translate=new mxPoint(parseFloat(a.getAttribute("dx")||0),parseFloat(a.getAttribute("dy")||0))}else"fit"==a.nodeName&&(g=a.hasAttribute("max-scale")?parseFloat(a.getAttribute("max-scale")):
-1);a=a.nextSibling}}finally{f.endUpdate()}null!=g&&this.chromelessResize&&this.chromelessResize(!0,g)}return e};EditorUi.prototype.getCopyFilename=function(a,b){var e=null!=a&&null!=a.getTitle()?a.getTitle():this.defaultFilename,c="",d=e.lastIndexOf(".");0<=d&&(c=e.substring(d),e=e.substring(0,d));if(b)var k=new Date,d=k.getFullYear(),f=k.getMonth()+1,g=k.getDate(),m=k.getHours(),z=k.getMinutes(),k=k.getSeconds(),e=e+(" "+(d+"-"+f+"-"+g+"-"+m+"-"+z+"-"+k));return e=mxResources.get("copyOf",[e])+c};
-EditorUi.prototype.fileLoaded=function(a,b){var e=this.getCurrentFile();this.fileEditable=this.fileLoadedError=null;this.setCurrentFile(null);var c=!1;this.hideDialog();null!=e&&(EditorUi.debug("File.closed",[e]),e.removeListener(this.descriptorChangedListener),e.close());this.editor.graph.model.clear();this.editor.undoManager.clear();var d=mxUtils.bind(this,function(){this.setGraphEnabled(!1);this.setCurrentFile(null);null!=e&&this.updateDocumentTitle();this.editor.graph.model.clear();this.editor.undoManager.clear();
-this.setBackgroundImage(null);!b&&null!=window.location.hash&&0<window.location.hash.length&&(window.location.hash="");null!=this.fname&&(this.fnameWrapper.style.display="none",this.fname.innerHTML="",this.fname.setAttribute("title",mxResources.get("rename")));this.editor.setStatus("");this.updateUi();b||this.showSplash()});if(null!=a)try{mxClient.IS_SF&&"min"==uiTheme&&(this.diagramContainer.style.visibility="");this.openingFile=!0;this.setCurrentFile(a);a.addListener("descriptorChanged",this.descriptorChangedListener);
-a.addListener("contentChanged",this.descriptorChangedListener);a.open();delete this.openingFile;this.setGraphEnabled(!0);this.setMode(a.getMode());this.editor.graph.model.prefix=Editor.guid()+"-";this.editor.undoManager.clear();this.descriptorChanged();this.updateUi();a.isEditable()?a.isModified()?(a.addUnsavedStatus(),null!=a.backupPatch&&a.patch([a.backupPatch])):this.editor.setStatus(""):this.editor.setStatus('<span class="geStatusAlert" style="margin-left:8px;">'+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"));c=!0;this.isOffline()||null==a.getMode()||EditorUi.logEvent({category:a.getMode().toUpperCase()+"-OPEN-FILE-"+a.getHash(),action:"size_"+a.getSize(),
-label:"autosave_"+(this.editor.autosave?"on":"off")});EditorUi.debug("File.opened",[a]);if(this.editor.editable&&this.mode==a.getMode()&&a.getMode()!=App.MODE_DEVICE&&null!=a.getMode())try{this.addRecent({id:a.getHash(),title:a.getTitle(),mode:a.getMode()})}catch(u){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+1),mxSettings.save()}catch(u){}}catch(u){this.fileLoadedError=u;if(EditorUi.enableLogging&&!this.isOffline())try{EditorUi.logEvent({category:"ERROR-LOAD-FILE-"+(null!=a?a.getHash():
-"none"),action:"message_"+u.message,label:"stack_"+u.stack})}catch(t){}var k=mxUtils.bind(this,function(){null!=urlParams.url&&this.spinner.spin(document.body,mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=e?this.fileLoaded(e):d()});b?k():this.handleError(u,mxResources.get("errorLoadingFile"),k,!0,null,null,!0)}else d();return c};EditorUi.prototype.getHashValueForPages=function(a,b){var e=0,c=new mxGraphModel,d=new mxCodec;null!=b&&(b.byteCount=0,b.attrCount=
-0,b.eltCount=0,b.nodeCount=0);for(var k=0;k<a.length;k++){this.updatePageRoot(a[k]);var f=a[k].node.cloneNode(!1);f.removeAttribute("name");c.root=a[k].root;var g=d.encode(c);this.editor.graph.saveViewState(a[k].viewState,g,!0);g.removeAttribute("pageWidth");g.removeAttribute("pageHeight");f.appendChild(g);null!=b&&(b.eltCount+=f.getElementsByTagName("*").length,b.nodeCount+=f.getElementsByTagName("mxCell").length);e=(e<<5)-e+this.hashValue(f,function(a,b,e,c){return!c||"mxGeometry"!=a.nodeName&&
-"mxPoint"!=a.nodeName||"x"!=b&&"y"!=b&&"width"!=b&&"height"!=b?c&&"mxCell"==a.nodeName&&"previous"==b?null:e:Math.round(e)},b)<<0}return e};EditorUi.prototype.hashValue=function(a,b,c){var e=0;if(null!=a&&"object"===typeof a&&"number"===typeof a.nodeType&&"string"===typeof a.nodeName&&"function"===typeof a.getAttribute){null!=a.nodeName&&(e^=this.hashValue(a.nodeName,b,c));if(null!=a.attributes){null!=c&&(c.attrCount+=a.attributes.length);for(var d=0;d<a.attributes.length;d++){var k=a.attributes[d].name,
-l=null!=b?b(a,k,a.attributes[d].value,!0):a.attributes[d].value;null!=l&&(e^=this.hashValue(k,b,c)+this.hashValue(l,b,c))}}if(null!=a.childNodes)for(d=0;d<a.childNodes.length;d++)e=(e<<5)-e+this.hashValue(a.childNodes[d],b,c)<<0}else if(null!=a&&"function"!==typeof a){a=String(a);b=0;null!=c&&(c.byteCount+=a.length);for(d=0;d<a.length;d++)b=(b<<5)-b+a.charCodeAt(d)<<0;e^=b}return e};EditorUi.prototype.descriptorChanged=function(){};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=
-function(a,b,c,d,f,g,m){};EditorUi.prototype.isScratchpadEnabled=function(){return isLocalStorage||mxClient.IS_CHROMEAPP};EditorUi.prototype.toggleScratchpad=function(){this.isScratchpadEnabled()&&(null==this.scratchpad?StorageFile.getFileContent(this,".scratchpad",mxUtils.bind(this,function(a){null==a&&(a=this.emptyLibraryXml);this.loadLibrary(new StorageLibrary(this,a,".scratchpad"))})):this.closeLibrary(this.scratchpad))};EditorUi.prototype.createLibraryDataFromImages=function(a){var b=mxUtils.createXmlDocument(),
-e=b.createElement("mxlibrary");mxUtils.setTextContent(e,JSON.stringify(a));b.appendChild(e);return mxUtils.getXml(b)};EditorUi.prototype.closeLibrary=function(a){null!=a&&(this.removeLibrarySidebar(a.getHash()),a.constructor!=LocalLibrary&&mxSettings.removeCustomLibrary(a.getHash()),".scratchpad"==a.title&&(this.scratchpad=null))};EditorUi.prototype.removeLibrarySidebar=function(a){var b=this.sidebar.palettes[a];if(null!=b){for(var e=0;e<b.length;e++)b[e].parentNode.removeChild(b[e]);delete this.sidebar.palettes[a]}};
-EditorUi.prototype.repositionLibrary=function(a){var b=this.sidebar.container;if(null==a){var e=this.sidebar.palettes["L.scratchpad"];null==e&&(e=this.sidebar.palettes.search);null!=e&&(a=e[e.length-1].nextSibling)}a=null!=a?a:b.firstChild.nextSibling.nextSibling;var e=b.lastChild,c=e.previousSibling;b.insertBefore(e,a);b.insertBefore(c,e)};EditorUi.prototype.loadLibrary=function(a,b){var e=mxUtils.parseXml(a.getData());if("mxlibrary"==e.documentElement.nodeName){var c=JSON.parse(mxUtils.getTextContent(e.documentElement));
-this.libraryLoaded(a,c,e.documentElement.getAttribute("title"),b)}else throw{message:mxResources.get("notALibraryFile")};};EditorUi.prototype.getLibraryStorageHint=function(a){return""};EditorUi.prototype.libraryLoaded=function(a,b,c,d){if(null!=this.sidebar){a.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(a.getHash());".scratchpad"==a.title&&(this.scratchpad=a);var e=this.sidebar.palettes[a.getHash()],e=null!=e?e[e.length-1].nextSibling:null;this.removeLibrarySidebar(a.getHash());var k=
-null,l=mxUtils.bind(this,function(b,e){0==b.length&&a.isEditable()?(null==k&&(k=document.createElement("div"),k.className="geDropTarget",mxUtils.write(k,mxResources.get("dragElementsHere"))),e.appendChild(k)):this.addLibraryEntries(b,e)});null!=this.sidebar&&null!=b&&this.sidebar.addEntries(b);c=null!=c&&0<c.length?c:a.getTitle();var f=this.sidebar.addPalette(a.getHash(),c,null!=d?d:!0,mxUtils.bind(this,function(a){l(b,a)}));this.repositionLibrary(e);var g=f.parentNode.previousSibling;d=g.getAttribute("title");
-null!=d&&0<d.length&&".scratchpad"!=a.title&&g.setAttribute("title",this.getLibraryStorageHint(a)+"\n"+d);var n=document.createElement("div");n.style.position="absolute";n.style.right="0px";n.style.top="0px";n.style.padding="8px";n.style.backgroundColor="inherit";g.style.position="relative";var m=document.createElement("img");m.setAttribute("src",Dialog.prototype.closeImage);m.setAttribute("title",mxResources.get("close"));m.setAttribute("valign","absmiddle");m.setAttribute("border","0");m.style.cursor=
-"pointer";m.style.margin="0 3px";var x=null;if(".scratchpad"!=a.title||this.closableScratchpad)n.appendChild(m),mxEvent.addListener(m,"click",mxUtils.bind(this,function(b){if(!mxEvent.isConsumed(b)){var e=mxUtils.bind(this,function(){this.closeLibrary(a)});null!=x?this.confirm(mxResources.get("allChangesLost"),null,e,mxResources.get("cancel"),mxResources.get("discardChanges")):e();mxEvent.consume(b)}}));if(a.isEditable()){var A=this.editor.graph,B=null,C=mxUtils.bind(this,function(e){this.showLibraryDialog(a.getTitle(),
-f,b,a,a.getMode());mxEvent.consume(e)}),D=mxUtils.bind(this,function(e){a.setModified(!0);a.isAutosave()?(null!=B&&null!=B.parentNode&&B.parentNode.removeChild(B),B=m.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",n.insertBefore(B,n.firstChild),g.style.paddingRight=18*n.childNodes.length+"px",this.saveLibrary(a.getTitle(),b,a,a.getMode(),!0,!0,function(){null!=B&&null!=
-B.parentNode&&(B.parentNode.removeChild(B),g.style.paddingRight=18*n.childNodes.length+"px")})):null==x&&(x=m.cloneNode(!1),x.setAttribute("src",IMAGE_PATH+"/download.png"),x.setAttribute("title",mxResources.get("save")),n.insertBefore(x,n.firstChild),mxEvent.addListener(x,"click",mxUtils.bind(this,function(e){this.saveLibrary(a.getTitle(),b,a,a.getMode(),a.constructor==LocalLibrary,!0,function(){null==x||a.isModified()||(g.style.paddingRight=18*n.childNodes.length+"px",x.parentNode.removeChild(x),
-x=null)});mxEvent.consume(e)})),g.style.paddingRight=18*n.childNodes.length+"px")}),G=mxUtils.bind(this,function(a,e,c,d){a=A.cloneCells(mxUtils.sortCells(A.model.getTopmostCells(a)));for(var l=0;l<a.length;l++){var g=A.getCellGeometry(a[l]);null!=g&&g.translate(-e.x,-e.y)}f.appendChild(this.sidebar.createVertexTemplateFromCells(a,e.width,e.height,d||"",!0,!1,!1));a={xml:Graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(a))),w:e.width,h:e.height};null!=d&&(a.title=d);b.push(a);D(c);null!=
-k&&null!=k.parentNode&&0<b.length&&(k.parentNode.removeChild(k),k=null)}),E=mxUtils.bind(this,function(a){if(A.isSelectionEmpty())A.getRubberband().isActive()?(A.getRubberband().execute(a),A.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var b=A.getSelectionCells(),e=A.view.getBounds(b),c=A.view.scale;e.x/=c;e.y/=c;e.width/=c;e.height/=c;e.x-=A.view.translate.x;e.y-=A.view.translate.y;G(b,e)}mxEvent.consume(a)});mxEvent.addGestureListeners(f,
-function(){},mxUtils.bind(this,function(a){A.isMouseDown&&null!=A.panningManager&&null!=A.graphHandler.first&&(A.graphHandler.suspend(),null!=A.graphHandler.hint&&(A.graphHandler.hint.style.visibility="hidden"),f.style.backgroundColor="#f1f3f4",f.style.cursor="copy",A.panningManager.stop(),A.autoScroll=!1,mxEvent.consume(a))}),mxUtils.bind(this,function(a){A.isMouseDown&&null!=A.panningManager&&null!=A.graphHandler&&(f.style.backgroundColor="",f.style.cursor="default",this.sidebar.showTooltips=!0,
-A.panningManager.stop(),A.graphHandler.reset(),A.isMouseDown=!1,A.autoScroll=!0,E(a),mxEvent.consume(a))}));mxEvent.addListener(f,"mouseleave",mxUtils.bind(this,function(a){A.isMouseDown&&null!=A.graphHandler.first&&(A.graphHandler.resume(),null!=A.graphHandler.hint&&(A.graphHandler.hint.style.visibility="visible"),f.style.backgroundColor="",f.style.cursor="",A.autoScroll=!0)}));Graph.fileSupport&&(mxEvent.addListener(f,"dragover",mxUtils.bind(this,function(a){f.style.backgroundColor="#f1f3f4";a.dataTransfer.dropEffect=
-"copy";f.style.cursor="copy";this.sidebar.hideTooltip();a.stopPropagation();a.preventDefault()})),mxEvent.addListener(f,"drop",mxUtils.bind(this,function(a){f.style.cursor="";f.style.backgroundColor="";0<a.dataTransfer.files.length&&this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(e,c,d,g,n,m,p,q,x){if(null!=e&&"image/"==c.substring(0,6))e="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image="+this.convertDataUri(e),e=[new mxCell("",
-new mxGeometry(0,0,n,m),e)],e[0].vertex=!0,G(e,new mxRectangle(0,0,n,m),a,mxEvent.isAltDown(a)?null:p.substring(0,p.lastIndexOf(".")).replace(/_/g," ")),null!=k&&null!=k.parentNode&&0<b.length&&(k.parentNode.removeChild(k),k=null);else{var u=!1,t=mxUtils.bind(this,function(e,c){if(null!=e&&"application/pdf"==c){var d=Editor.extractGraphModelFromPdf(e);null!=d&&0<d.length&&(e=d)}if(null!=e)if(d=mxUtils.parseXml(e),"mxlibrary"==d.documentElement.nodeName)try{var g=JSON.parse(mxUtils.getTextContent(d.documentElement));
-l(g,f);b=b.concat(g);D(a);this.spinner.stop();u=!0}catch(O){}else if("mxfile"==d.documentElement.nodeName)try{for(var n=d.documentElement.getElementsByTagName("diagram"),g=0;g<n.length;g++){var m=this.stringToCells(Editor.getDiagramNodeXml(n[g])),p=this.editor.graph.getBoundingBoxFromGeometry(m);G(m,new mxRectangle(0,0,p.width,p.height),a)}u=!0}catch(O){null!=window.console&&console.log("error in drop handler:",O)}u||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));
-null!=k&&null!=k.parentNode&&0<b.length&&(k.parentNode.removeChild(k),k=null)});null!=x&&null!=p&&(/(\.v(dx|sdx?))($|\?)/i.test(p)||/(\.vs(x|sx?))($|\?)/i.test(p))?this.importVisio(x,function(a){t(a,"text/xml")},null,p):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(e,p)&&null!=x?this.parseFile(x,mxUtils.bind(this,function(a){4==a.readyState&&(this.spinner.stop(),200<=a.status&&299>=a.status?t(a.responseText,"text/xml"):this.handleError({message:mxResources.get(413==a.status?
-"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):t(e,c)}}));a.stopPropagation();a.preventDefault()})),mxEvent.addListener(f,"dragleave",function(a){f.style.cursor="";f.style.backgroundColor="";a.stopPropagation();a.preventDefault()}));m=m.cloneNode(!1);m.setAttribute("src",Editor.editImage);m.setAttribute("title",mxResources.get("edit"));n.insertBefore(m,n.firstChild);mxEvent.addListener(m,"click",C);mxEvent.addListener(f,"dblclick",function(a){mxEvent.getSource(a)==
-f&&C(a)});d=m.cloneNode(!1);d.setAttribute("src",Editor.plusImage);d.setAttribute("title",mxResources.get("add"));n.insertBefore(d,n.firstChild);mxEvent.addListener(d,"click",E);this.isOffline()||".scratchpad"!=a.title||null==EditorUi.scratchpadHelpLink||(d=document.createElement("span"),d.setAttribute("title",mxResources.get("help")),d.style.cssText="color:#a3a3a3;text-decoration:none;margin-right:2px;",mxUtils.write(d,"?"),mxEvent.addGestureListeners(d,mxUtils.bind(this,function(a){this.openLink(EditorUi.scratchpadHelpLink);
-mxEvent.consume(a)})),n.insertBefore(d,n.firstChild))}g.appendChild(n);g.style.paddingRight=18*n.childNodes.length+"px"}};EditorUi.prototype.addLibraryEntries=function(a,b){for(var e=0;e<a.length;e++){var c=a[e],d=c.data;if(null!=d){var d=this.convertDataUri(d),k="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==c.aspect&&(k+="aspect=fixed;");b.appendChild(this.sidebar.createVertexTemplate(k+"image="+d,c.w,c.h,"",c.title||"",!1,!1,!0))}else null!=c.xml&&(d=this.stringToCells(Graph.decompress(c.xml)),
-0<d.length&&b.appendChild(this.sidebar.createVertexTemplateFromCells(d,c.w,c.h,c.title||"",!0,!1,!0)))}};EditorUi.prototype.getResource=function(a){return null!=a?a[mxLanguage]||a.main:null};EditorUi.prototype.footerHeight=0;"1"==urlParams.savesidebar&&(Sidebar.prototype.thumbWidth=64,Sidebar.prototype.thumbHeight=64);EditorUi.initTheme=function(){"atlas"==uiTheme?(mxClient.link("stylesheet",STYLE_PATH+"/atlas.css"),"undefined"!==typeof Toolbar&&(Toolbar.prototype.unselectedBackground="linear-gradient(rgb(255, 255, 255) 0px, rgb(242, 242, 242) 100%)",
-Toolbar.prototype.selectedBackground="rgb(242, 242, 242)"),Editor.prototype.initialTopSpacing=3,EditorUi.prototype.menubarHeight=41,EditorUi.prototype.toolbarHeight=38):Editor.isDarkMode()&&(mxClient.link("stylesheet",STYLE_PATH+"/dark.css"),Dialog.backdropColor="#2a2a2a",Format.inactiveTabBackgroundColor="black",Graph.prototype.defaultThemeName="darkTheme",Graph.prototype.defaultPageBackgroundColor="#2a2a2a",Graph.prototype.defaultPageBorderColor="#505759",BaseFormatPanel.prototype.buttonBackgroundColor=
-"#2a2a2a",mxGraphHandler.prototype.previewColor="#cccccc",StyleFormatPanel.prototype.defaultStrokeColor="#cccccc",mxConstants.DROP_TARGET_COLOR="#00ff00");Editor.sketchFontFamily="Architects Daughter";Editor.sketchFontSource="https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter";"1"==urlParams.sketch&&(Graph.prototype.defaultVertexStyle={pointerEvents:"0",hachureGap:"4"},Graph.prototype.defaultEdgeStyle={edgeStyle:"none",rounded:"0",curved:"1",jettySize:"auto",orthogonalLoop:"1",
-endArrow:"open",startSize:"14",endSize:"14",sourcePerimeterSpacing:"8",targetPerimeterSpacing:"8"},"0"!=urlParams.rough&&(Graph.prototype.defaultVertexStyle.fontFamily=Editor.sketchFontFamily,Graph.prototype.defaultVertexStyle.fontSource=Editor.sketchFontSource,Graph.prototype.defaultVertexStyle.fontSize="20",Graph.prototype.defaultVertexStyle.sketch="1",Graph.prototype.defaultEdgeStyle.fontFamily=Editor.sketchFontFamily,Graph.prototype.defaultEdgeStyle.fontSource=Editor.sketchFontSource,Graph.prototype.defaultEdgeStyle.fontSize=
-"20",Graph.prototype.defaultEdgeStyle.sketch="1",Menus.prototype.defaultFonts=[{fontFamily:Editor.sketchFontFamily,fontUrl:decodeURIComponent(Editor.sketchFontSource)},{fontFamily:"Rock Salt",fontUrl:"https://fonts.googleapis.com/css?family=Rock+Salt"},{fontFamily:"Permanent Marker",fontUrl:"https://fonts.googleapis.com/css?family=Permanent+Marker"}].concat(Menus.prototype.defaultFonts)),Editor.configurationKey=".sketch-configuration",Editor.settingsKey=".sketch-config",Graph.prototype.defaultGridEnabled=
-!1,Graph.prototype.defaultPageVisible=!1,Graph.prototype.defaultEdgeLength=120,Editor.fitWindowBorders=new mxRectangle(60,30,30,30))};EditorUi.initTheme();EditorUi.prototype.showImageDialog=function(a,b,c,d,f){a=new ImageDialog(this,a,b,c,d,f);this.showDialog(a.container,Graph.fileSupport?480:360,Graph.fileSupport?200:90,!0,!0);a.init()};EditorUi.prototype.showBackgroundImageDialog=function(a,b){a=null!=a?a:mxUtils.bind(this,function(a,b){if(!b){var e=new ChangePageSetup(this,null,a);e.ignoreColor=
-!0;this.editor.graph.model.execute(e)}});var e=new BackgroundImageDialog(this,a,b);this.showDialog(e.container,360,200,!0,!0);e.init()};EditorUi.prototype.showLibraryDialog=function(a,b,c,d,f){a=new LibraryDialog(this,a,b,c,d,f);this.showDialog(a.container,640,440,!0,!1,mxUtils.bind(this,function(a){a&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()}));a.init()};var c=EditorUi.prototype.createFormat;EditorUi.prototype.createFormat=function(a){var b=c.apply(this,arguments);this.editor.graph.addListener("viewStateChanged",
-mxUtils.bind(this,function(a){this.editor.graph.isSelectionEmpty()&&b.refresh()}));return b};EditorUi.prototype.createSidebarFooterContainer=function(){var a=this.createDiv("geSidebarContainer geSidebarFooter");a.style.position="absolute";a.style.overflow="hidden";var b=document.createElement("a");b.className="geTitle";b.style.color="#DF6C0C";b.style.fontWeight="bold";b.style.height="100%";b.style.paddingTop="9px";b.innerHTML='<span style="font-size:18px;margin-right:5px;">+</span>';mxUtils.write(b,
-mxResources.get("moreShapes")+"...");mxEvent.addListener(b,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(a){a.preventDefault()}));mxEvent.addListener(b,"click",mxUtils.bind(this,function(a){this.actions.get("shapes").funct();mxEvent.consume(a)}));a.appendChild(b);return a};EditorUi.prototype.handleError=function(a,b,c,d,f,g,m){var e=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},k=null!=a&&null!=a.error?a.error:a;if(null!=a&&null!=a.stack&&
-null!=a.message)try{m?null!=window.console&&console.error("EditorUi.handleError:",a):EditorUi.logError("Caught: "+(""==a.message&&null!=a.name)?a.name:a.message,a.filename,a.lineNumber,a.columnNumber,a,"INFO")}catch(B){}if(null!=k||null!=b){m=mxUtils.htmlEntities(mxResources.get("unknownError"));var l=mxResources.get("ok"),n=null;b=null!=b?b:mxResources.get("error");if(null!=k){null!=k.retry&&(l=mxResources.get("cancel"),n=function(){e();k.retry()});if(404==k.code||404==k.status||403==k.code){m=403==
-k.code?null!=k.message?mxUtils.htmlEntities(k.message):mxUtils.htmlEntities(mxResources.get("accessDenied")):null!=f?f:mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied")+(null!=this.drive&&null!=this.drive.user?" ("+this.drive.user.displayName+", "+this.drive.user.email+")":""));var p=null!=f?null:null!=g?g: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!=a&&null!=a.error&&(null!=a.error.errors&&0<a.error.errors.length&&
-"fileAccess"==a.error.errors[0].reason||null!=a.error.data&&0<a.error.data.length&&"fileAccess"==a.error.data[0].reason)||404==k.code||404==k.status)){p="#U"==p.substring(0,2)?p.substring(45,p.lastIndexOf("%26ex")):p.substring(2);this.showError(b,m,mxResources.get("openInNewWindow"),mxUtils.bind(this,function(){this.editor.graph.openLink("https://drive.google.com/open?id="+p);this.handleError(a,b,c,d,f)}),n,mxResources.get("changeUser"),mxUtils.bind(this,function(){function a(){d.innerHTML="";for(var a=
-0;a<b.length;a++){var e=document.createElement("option");mxUtils.write(e,b[a].displayName);e.value=a;d.appendChild(e);e=document.createElement("option");e.innerHTML="&nbsp;&nbsp;&nbsp;";mxUtils.write(e,"<"+b[a].email+">");e.setAttribute("disabled","disabled");d.appendChild(e)}e=document.createElement("option");mxUtils.write(e,mxResources.get("addAccount"));e.value=b.length;d.appendChild(e)}var b=this.drive.getUsersList(),e=document.createElement("div"),c=document.createElement("span");c.style.marginTop=
-"6px";mxUtils.write(c,mxResources.get("changeUser")+": ");e.appendChild(c);var d=document.createElement("select");d.style.width="200px";a();mxEvent.addListener(d,"change",mxUtils.bind(this,function(){var e=d.value,c=b.length!=e;c&&this.drive.setUser(b[e]);this.drive.authorize(c,mxUtils.bind(this,function(){c||(b=this.drive.getUsersList(),a())}),mxUtils.bind(this,function(a){this.handleError(a)}),!0)}));e.appendChild(d);e=new CustomDialog(this,e,mxUtils.bind(this,function(){this.loadFile(window.location.hash.substr(1),
-!0)}));this.showDialog(e.container,300,75,!0,!0)}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.hideDialog();null!=c&&c()}),480,150);return}}null!=k.message?m=""==k.message&&null!=k.name?mxUtils.htmlEntities(k.name):mxUtils.htmlEntities(k.message):null!=k.response&&null!=k.response.error?m=mxUtils.htmlEntities(k.response.error):"undefined"!==typeof window.App&&(k.code==App.ERROR_TIMEOUT?m=mxUtils.htmlEntities(mxResources.get("timeout")):k.code==App.ERROR_BUSY?m=mxUtils.htmlEntities(mxResources.get("busy")):
-"string"===typeof k&&0<k.length&&(m=mxUtils.htmlEntities(k)))}var q=g=null;null!=k&&null!=k.helpLink&&(g=mxResources.get("help"),q=mxUtils.bind(this,function(){return this.editor.graph.openLink(k.helpLink)}));this.showError(b,m,l,c,n,null,null,g,q,null,null,null,d?c:null)}else null!=c&&c()};EditorUi.prototype.alert=function(a,b,c){a=new ErrorDialog(this,null,a,mxResources.get("ok"),b);this.showDialog(a.container,c||340,100,!0,!1);a.init()};EditorUi.prototype.confirm=function(a,b,c,d,f,g){var e=null!=
-this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},k=Math.min(200,28*Math.ceil(a.length/50));a=new ConfirmDialog(this,a,function(){e();null!=b&&b()},function(){e();null!=c&&c()},d,f,null,null,null,null,k);this.showDialog(a.container,340,46+k,!0,g);a.init()};EditorUi.prototype.showBanner=function(a,b,c,d){var e=!1;if(!(this.bannerShowing||this["hideBanner"+a]||isLocalStorage&&null!=mxSettings.settings&&null!=mxSettings.settings["close"+a])){var k=document.createElement("div");
-k.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(k.style,"box-shadow","1px 1px 2px 0px #ddd");mxUtils.setPrefixedStyle(k.style,"transform","translate(-50%,120%)");mxUtils.setPrefixedStyle(k.style,"transition","all 1s ease");k.className="geBtn gePrimaryBtn";e=document.createElement("img");e.setAttribute("src",IMAGE_PATH+
-"/logo.png");e.setAttribute("border","0");e.setAttribute("align","absmiddle");e.style.cssText="margin-top:-4px;margin-left:8px;margin-right:12px;width:26px;height:26px;";k.appendChild(e);e=document.createElement("img");e.setAttribute("src",Dialog.prototype.closeImage);e.setAttribute("title",mxResources.get(d?"doNotShowAgain":"close"));e.setAttribute("border","0");e.style.cssText="position:absolute;right:10px;top:12px;filter:invert(1);padding:6px;margin:-6px;cursor:default;";k.appendChild(e);mxUtils.write(k,
-b);document.body.appendChild(k);this.bannerShowing=!0;b=document.createElement("div");b.style.cssText="font-size:11px;text-align:center;font-weight:normal;";var f=document.createElement("input");f.setAttribute("type","checkbox");f.setAttribute("id","geDoNotShowAgainCheckbox");f.style.marginRight="6px";if(!d){b.appendChild(f);var l=document.createElement("label");l.setAttribute("for","geDoNotShowAgainCheckbox");mxUtils.write(l,mxResources.get("doNotShowAgain"));b.appendChild(l);k.style.paddingBottom=
-"30px";k.appendChild(b)}var g=mxUtils.bind(this,function(){null!=k.parentNode&&(k.parentNode.removeChild(k),this.bannerShowing=!1,f.checked||d)&&(this["hideBanner"+a]=!0,isLocalStorage&&null!=mxSettings.settings&&(mxSettings.settings["close"+a]=Date.now(),mxSettings.save()))});mxEvent.addListener(e,"click",mxUtils.bind(this,function(a){mxEvent.consume(a);g()}));var n=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(k.style,"transform","translate(-50%,120%)");window.setTimeout(mxUtils.bind(this,
-function(){g()}),1E3)});mxEvent.addListener(k,"click",mxUtils.bind(this,function(a){var b=mxEvent.getSource(a);b!=f&&b!=l?(null!=c&&c(),g(),mxEvent.consume(a)):n()}));window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(k.style,"transform","translate(-50%,0%)")}),500);window.setTimeout(n,3E4);e=!0}return e};EditorUi.prototype.setCurrentFile=function(a){null!=a&&(a.opened=new Date);this.currentFile=a};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};EditorUi.prototype.isExportToCanvas=
-function(){return this.editor.isExportToCanvas()};EditorUi.prototype.createImageDataUri=function(a,b,c,d){a=a.toDataURL("image/"+c);if(null!=a&&6<a.length)null!=b&&(a=Editor.writeGraphModelToPng(a,"tEXt","mxfile",encodeURIComponent(b))),0<d&&(a=Editor.writeGraphModelToPng(a,"pHYs","dpi",d));else throw{message:mxResources.get("unknownError")};return a};EditorUi.prototype.saveCanvas=function(a,b,c,d,f){var e="jpeg"==c?"jpg":c;d=this.getBaseFilename(d)+"."+e;a=this.createImageDataUri(a,b,c,f);this.saveData(d,
-e,a.substring(a.lastIndexOf(",")+1),"image/"+c,!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(a,b){var e=new TextareaDialog(this,a,b,null,null,mxResources.get("close"));e.textarea.style.width="600px";e.textarea.style.height=
-"380px";this.showDialog(e.container,620,460,!0,!0,null,null,null,null,!0);e.init();document.execCommand("selectall",!1,null)};EditorUi.prototype.doSaveLocalFile=function(a,b,c,d,f,g){"text/xml"!=c||/(\.drawio)$/i.test(b)||/(\.xml)$/i.test(b)||/(\.svg)$/i.test(b)||/(\.html)$/i.test(b)||(b=b+"."+(null!=g?g:"drawio"));if(window.Blob&&navigator.msSaveOrOpenBlob)a=d?this.base64ToBlob(a,c):new Blob([a],{type:c}),navigator.msSaveOrOpenBlob(a,b);else if(mxClient.IS_IE)c=window.open("about:blank","_blank"),
-null==c?mxUtils.popup(a,!0):(c.document.write(a),c.document.close(),c.document.execCommand("SaveAs",!0,b),c.close());else if(mxClient.IS_IOS&&this.isOffline())navigator.standalone||null==c||"image/"!=c.substring(0,6)?this.showTextDialog(b+":",a):this.openInNewWindow(a,c,d);else{var e=document.createElement("a");g=(null==navigator.userAgent||0>navigator.userAgent.indexOf("PaleMoon/"))&&"undefined"!==typeof e.download;if(mxClient.IS_GC&&null!=navigator.userAgent){var k=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);
-g=65==(k?parseInt(k[2],10):!1)?!1:g}if(g||this.isOffline()){e.href=URL.createObjectURL(d?this.base64ToBlob(a,c):new Blob([a],{type:c}));g?e.download=b:e.setAttribute("target","_blank");document.body.appendChild(e);try{window.setTimeout(function(){URL.revokeObjectURL(e.href)},2E4),e.click(),e.parentNode.removeChild(e)}catch(v){}}else this.createEchoRequest(a,b,c,d,f).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(a,b,c,d,f,g){a="xml="+encodeURIComponent(a);return new mxXmlRequest(SAVE_URL,
-a+(null!=c?"&mime="+c:"")+(null!=f?"&format="+f:"")+(null!=g?"&base64="+g:"")+(null!=b?"&filename="+encodeURIComponent(b):"")+(d?"&binary=1":""))};EditorUi.prototype.base64ToBlob=function(a,b){b=b||"";for(var e=atob(a),c=e.length,d=Math.ceil(c/1024),k=Array(d),f=0;f<d;++f){for(var g=1024*f,m=Math.min(g+1024,c),z=Array(m-g),y=0;g<m;++y,++g)z[y]=e[g].charCodeAt(0);k[f]=new Uint8Array(z)}return new Blob(k,{type:b})};EditorUi.prototype.saveLocalFile=function(a,b,c,d,f,g,m,t){g=null!=g?g:!1;m=null!=m?
-m:"vsdx"!=f&&(!mxClient.IS_IOS||!navigator.standalone);f=this.getServiceCount(g);isLocalStorage&&f++;var e=4>=f?2:6<f?4:3;b=new CreateDialog(this,b,mxUtils.bind(this,function(b,e){try{if("_blank"==e)if(null!=c&&"image/"==c.substring(0,6))this.openInNewWindow(a,c,d);else if(null!=c&&"text/html"==c.substring(0,9)){var k=new EmbedDialog(this,a);this.showDialog(k.container,440,240,!0,!0);k.init()}else{var f=window.open("about:blank");null==f?mxUtils.popup(a,!0):(f.document.write("<pre>"+mxUtils.htmlEntities(a,
-!1)+"</pre>"),f.document.close())}else e==App.MODE_DEVICE||"download"==e?this.doSaveLocalFile(a,b,c,d,null,t):null!=b&&0<b.length&&this.pickFolder(e,mxUtils.bind(this,function(k){try{this.exportFile(a,b,c,d,e,k)}catch(C){this.handleError(C)}}))}catch(B){this.handleError(B)}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,g,m,null,1<f,e,a,c,d);g=this.isServices(f)?f>e?390:270:160;this.showDialog(b.container,400,g,!0,!0);b.init()};EditorUi.prototype.openInNewWindow=
-function(a,b,c){var e=window.open("about:blank");null==e||null==e.document?mxUtils.popup(a,!0):("image/svg+xml"!=b||mxClient.IS_SVG?"image/svg+xml"==b?e.document.write("<html>"+a+"</html>"):(a=c?a:btoa(unescape(encodeURIComponent(a))),e.document.write('<html><img style="max-width:100%;" src="data:'+b+";base64,"+a+'"/></html>')):e.document.write("<html><pre>"+mxUtils.htmlEntities(a,!1)+"</pre></html>"),e.document.close())};var b=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(a){if(this.isExportToCanvas()&&this.isChromelessImageExportEnabled()){this.exportDialog=null;var e=a(mxUtils.bind(this,function(a){var b=mxUtils.bind(this,function(){mxEvent.removeListener(this.editor.graph.container,"click",b);null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),
-this.exportDialog=null)});if(null!=this.exportDialog)b.apply(this);else{this.exportDialog=document.createElement("div");var c=e.getBoundingClientRect();mxUtils.setPrefixedStyle(this.exportDialog.style,"borderRadius","5px");this.exportDialog.style.position="fixed";this.exportDialog.style.textAlign="center";this.exportDialog.style.fontFamily="Helvetica,Arial";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 d=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});d.spin(this.exportDialog);
-this.editor.exportToCanvas(mxUtils.bind(this,function(a){d.stop();this.exportDialog.style.width="auto";this.exportDialog.style.height="auto";this.exportDialog.style.padding="10px";var e=this.createImageDataUri(a,null,"png");a=document.createElement("img");a.style.maxWidth="140px";a.style.maxHeight="140px";a.style.cursor="pointer";a.style.backgroundColor="white";a.setAttribute("title",mxResources.get("openInNewWindow"));a.setAttribute("border","0");a.setAttribute("src",e);this.exportDialog.appendChild(a);
-mxEvent.addListener(a,"click",mxUtils.bind(this,function(){this.openInNewWindow(e.substring(e.indexOf(",")+1),"image/png",!0);b.apply(this,arguments)}))}),null,this.thumbImageCache,null,mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),null,null,null,null,null,null,null,Editor.defaultBorder);mxEvent.addListener(this.editor.graph.container,"click",b);document.body.appendChild(this.exportDialog)}mxEvent.consume(a)}),Editor.cameraLargeImage,mxResources.get("export"))}b.apply(this,
-arguments)};EditorUi.prototype.saveData=function(a,b,c,d,f){this.isLocalFileSave()?this.saveLocalFile(c,a,d,f,b):this.saveRequest(a,b,mxUtils.bind(this,function(a,e){return this.createEchoRequest(c,a,d,f,b,e)}),c,f,d)};EditorUi.prototype.saveRequest=function(a,b,c,d,f,g,m){m=null!=m?m:!mxClient.IS_IOS||!navigator.standalone;var e=this.getServiceCount(!1);isLocalStorage&&e++;var k=4>=e?2:6<e?4:3;a=new CreateDialog(this,a,mxUtils.bind(this,function(a,e){if("_blank"==e||null!=a&&0<a.length){var k=c("_blank"==
-e?null:a,e==App.MODE_DEVICE||"download"==e||null==e||"_blank"==e?"0":"1");null!=k&&(e==App.MODE_DEVICE||"download"==e||"_blank"==e?k.simulate(document,"_blank"):this.pickFolder(e,mxUtils.bind(this,function(c){g=null!=g?g:"pdf"==b?"application/pdf":"image/"+b;if(null!=d)try{this.exportFile(d,a,g,!0,e,c)}catch(B){this.handleError(B)}else this.spinner.spin(document.body,mxResources.get("saving"))&&k.send(mxUtils.bind(this,function(){this.spinner.stop();if(200<=k.getStatus()&&299>=k.getStatus())try{this.exportFile(k.getText(),
-a,g,!0,e,c)}catch(B){this.handleError(B)}else this.handleError({message:mxResources.get("errorSavingFile")})}),function(a){this.spinner.stop();this.handleError(a)})})))}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,!1,m,null,1<e,k,d,g,f);e=this.isServices(e)?4<e?390:270:160;this.showDialog(a.container,380,e,!0,!0);a.init()};EditorUi.prototype.isServices=function(a){return 1!=a};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};
-EditorUi.prototype.exportFile=function(a,b,c,d,f,g){};EditorUi.prototype.pickFolder=function(a,b,c){b(null)};EditorUi.prototype.exportSvg=function(a,b,c,d,f,g,m,t,v,z,y,x){if(this.spinner.spin(document.body,mxResources.get("export")))try{var e=this.editor.graph.isSelectionEmpty();c=null!=c?c:e;var k=b?null:this.editor.graph.background;k==mxConstants.NONE&&(k=null);null==k&&0==b&&(k=y?this.editor.graph.defaultPageBackgroundColor:"#ffffff");var l=this.editor.graph.getSvg(k,a,m,t,null,c,null,null,"blank"==
-z?"_blank":"self"==z?"_top":null,null,!0,y,x);d&&this.editor.graph.addSvgShadow(l);var n=this.getBaseFilename()+".svg",p=mxUtils.bind(this,function(a){this.spinner.stop();f&&a.setAttribute("content",this.getFileData(!0,null,null,null,c,v,null,null,null,!1));var b='<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n'+mxUtils.getXml(a);this.isLocalFileSave()||b.length<=MAX_REQUEST_SIZE?this.saveData(n,"svg",b,"image/svg+xml"):
-this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(b)}))});this.editor.addFontCss(l);this.editor.graph.mathEnabled&&this.editor.addMathCss(l);g?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.editor.convertImages(l,p,this.thumbImageCache)):p(l)}catch(E){this.handleError(E)}};EditorUi.prototype.addRadiobox=function(a,b,c,d,f,g,m){return this.addCheckbox(a,c,d,f,g,m,!0,b)};EditorUi.prototype.addCheckbox=function(a,
-b,c,d,f,g,m,t){g=null!=g?g:!0;var e=document.createElement("input");e.style.marginRight="8px";e.style.marginTop="16px";e.setAttribute("type",m?"radio":"checkbox");m="geCheckbox-"+Editor.guid();e.id=m;null!=t&&e.setAttribute("name",t);c&&(e.setAttribute("checked","checked"),e.defaultChecked=!0);d&&e.setAttribute("disabled","disabled");g&&(a.appendChild(e),c=document.createElement("label"),mxUtils.write(c,b),c.setAttribute("for",m),a.appendChild(c),f||mxUtils.br(a));return e};EditorUi.prototype.addEditButton=
-function(a,b){var e=this.addCheckbox(a,mxResources.get("edit")+":",!0,null,!0);e.style.marginLeft="24px";var c=this.getCurrentFile(),d="";null!=c&&c.getMode()!=App.MODE_DEVICE&&c.getMode()!=App.MODE_BROWSER&&(d=window.location.href);var k=document.createElement("select");k.style.width="120px";k.style.marginLeft="8px";k.style.marginRight="10px";k.className="geBtn";c=document.createElement("option");c.setAttribute("value","blank");mxUtils.write(c,mxResources.get("makeCopy"));k.appendChild(c);c=document.createElement("option");
-c.setAttribute("value","custom");mxUtils.write(c,mxResources.get("custom")+"...");k.appendChild(c);a.appendChild(k);mxEvent.addListener(k,"change",mxUtils.bind(this,function(){if("custom"==k.value){var a=new FilenameDialog(this,d,mxResources.get("ok"),function(a){null!=a?d=a:k.value="blank"},mxResources.get("url"),null,null,null,null,function(){k.value="blank"});this.showDialog(a.container,300,80,!0,!1);a.init()}}));mxEvent.addListener(e,"change",mxUtils.bind(this,function(){e.checked&&(null==b||
-b.checked)?k.removeAttribute("disabled"):k.setAttribute("disabled","disabled")}));mxUtils.br(a);return{getLink:function(){return e.checked?"blank"===k.value?"_blank":d:null},getEditInput:function(){return e},getEditSelect:function(){return k}}};EditorUi.prototype.addLinkSection=function(a,b){function e(){f.innerHTML='<div style="width:100%;height:100%;box-sizing:border-box;'+(null!=k&&k!=mxConstants.NONE?"border:1px solid black;background-color:"+k:"background-position:center center;background-repeat:no-repeat;background-image:url('"+
-Dialog.prototype.closeImage+"')")+';"></div>'}mxUtils.write(a,mxResources.get("links")+":");var c=document.createElement("select");c.style.width="100px";c.style.marginLeft="8px";c.style.marginRight="10px";c.className="geBtn";var d=document.createElement("option");d.setAttribute("value","auto");mxUtils.write(d,mxResources.get("automatic"));c.appendChild(d);d=document.createElement("option");d.setAttribute("value","blank");mxUtils.write(d,mxResources.get("openInNewWindow"));c.appendChild(d);d=document.createElement("option");
+App.MODE_BROWSER||(d=null),y=this.getEmbeddedSvg(y,b,d,null,t,v,k);return y};EditorUi.prototype.getXmlFileData=function(a,b,c,d){a=null!=a?a:!0;b=null!=b?b:!1;c=null!=c?c:!Editor.compressXml;var e=this.editor.getGraphXml(a,d);if(a&&null!=this.fileNode&&null!=this.currentPage)if(a=function(a){var b=a.getElementsByTagName("mxGraphModel"),b=0<b.length?b[0]:null;null==b&&c?(b=mxUtils.trim(mxUtils.getTextContent(a)),a=a.cloneNode(!1),0<b.length&&(b=Graph.decompress(b),null!=b&&0<b.length&&a.appendChild(mxUtils.parseXml(b).documentElement))):
+null==b||c?a=a.cloneNode(!0):(a=a.cloneNode(!1),mxUtils.setTextContent(a,Graph.compressNode(b)));e.appendChild(a)},EditorUi.removeChildNodes(this.currentPage.node),mxUtils.setTextContent(this.currentPage.node,Graph.compressNode(e)),e=this.fileNode.cloneNode(!1),b)a(this.currentPage.node);else for(b=0;b<this.pages.length;b++){var k=this.pages[b],l=k.node;if(k!=this.currentPage)if(k.needsUpdate){var f=new mxCodec(mxUtils.createXmlDocument()),f=f.encode(new mxGraphModel(k.root));this.editor.graph.saveViewState(k.viewState,
+f,null,d);EditorUi.removeChildNodes(k.node);mxUtils.setTextContent(k.node,Graph.compressNode(f));delete k.needsUpdate}else d&&(null==k.viewState&&(f=this.editor.extractGraphModel(k.node),k.viewState=this.editor.graph.createViewState(f)),null!=k.viewState.backgroundImage&&Graph.isPageLink(k.viewState.backgroundImage.originalSrc)&&null==k.viewState.backgroundImage.src&&(k.viewState.backgroundImage=this.createImageForPageLink(k.viewState.backgroundImage.originalSrc)),null!=k.viewState.backgroundImage&&
+null!=k.viewState.backgroundImage.originalSrc&&(f=new mxCodec(mxUtils.createXmlDocument()),f=f.encode(new mxGraphModel(k.root)),this.editor.graph.saveViewState(k.viewState,f,null,d),l=l.cloneNode(!1),mxUtils.setTextContent(e,Graph.compressNode(f))));a(l)}return e};EditorUi.prototype.anonymizeString=function(a,b){for(var e=[],c=0;c<a.length;c++){var d=a.charAt(c);0<=EditorUi.ignoredAnonymizedChars.indexOf(d)?e.push(d):isNaN(parseInt(d))?d.toLowerCase()!=d?e.push(String.fromCharCode(65+Math.round(25*
+Math.random()))):d.toUpperCase()!=d?e.push(String.fromCharCode(97+Math.round(25*Math.random()))):/\s/.test(d)?e.push(" "):e.push("?"):e.push(b?"0":Math.round(9*Math.random()))}return e.join("")};EditorUi.prototype.anonymizePatch=function(a){if(null!=a[EditorUi.DIFF_INSERT])for(var b=0;b<a[EditorUi.DIFF_INSERT].length;b++)try{var e=mxUtils.parseXml(a[EditorUi.DIFF_INSERT][b].data).documentElement.cloneNode(!1);null!=e.getAttribute("name")&&e.setAttribute("name",this.anonymizeString(e.getAttribute("name")));
+a[EditorUi.DIFF_INSERT][b].data=mxUtils.getXml(e)}catch(q){a[EditorUi.DIFF_INSERT][b].data=q.message}if(null!=a[EditorUi.DIFF_UPDATE]){for(var c in a[EditorUi.DIFF_UPDATE]){var d=a[EditorUi.DIFF_UPDATE][c];null!=d.name&&(d.name=this.anonymizeString(d.name));null!=d.cells&&(b=mxUtils.bind(this,function(a){var b=d.cells[a];if(null!=b){for(var e in b)null!=b[e].value&&(b[e].value="["+b[e].value.length+"]"),null!=b[e].xmlValue&&(b[e].xmlValue="["+b[e].xmlValue.length+"]"),null!=b[e].style&&(b[e].style=
+"["+b[e].style.length+"]"),0==Object.keys(b[e]).length&&delete b[e];0==Object.keys(b).length&&delete d.cells[a]}}),b(EditorUi.DIFF_INSERT),b(EditorUi.DIFF_UPDATE),0==Object.keys(d.cells).length&&delete d.cells);0==Object.keys(d).length&&delete a[EditorUi.DIFF_UPDATE][c]}0==Object.keys(a[EditorUi.DIFF_UPDATE]).length&&delete a[EditorUi.DIFF_UPDATE]}return a};EditorUi.prototype.anonymizeAttributes=function(a,b){if(null!=a.attributes)for(var e=0;e<a.attributes.length;e++)"as"!=a.attributes[e].name&&
+a.setAttribute(a.attributes[e].name,this.anonymizeString(a.attributes[e].value,b));if(null!=a.childNodes)for(e=0;e<a.childNodes.length;e++)this.anonymizeAttributes(a.childNodes[e],b)};EditorUi.prototype.anonymizeNode=function(a,b){for(var e=a.getElementsByTagName("mxCell"),c=0;c<e.length;c++)null!=e[c].getAttribute("value")&&e[c].setAttribute("value","["+e[c].getAttribute("value").length+"]"),null!=e[c].getAttribute("xmlValue")&&e[c].setAttribute("xmlValue","["+e[c].getAttribute("xmlValue").length+
+"]"),null!=e[c].getAttribute("style")&&e[c].setAttribute("style","["+e[c].getAttribute("style").length+"]"),null!=e[c].parentNode&&"root"!=e[c].parentNode.nodeName&&null!=e[c].parentNode.parentNode&&(e[c].setAttribute("id",e[c].parentNode.getAttribute("id")),e[c].parentNode.parentNode.replaceChild(e[c],e[c].parentNode));return a};EditorUi.prototype.synchronizeCurrentFile=function(a){var b=this.getCurrentFile();null!=b&&(b.savingFile?this.handleError({message:mxResources.get("busy")}):!a&&b.invalidChecksum?
+b.handleFileError(null,!0):this.spinner.spin(document.body,mxResources.get("updatingDocument"))&&(b.clearAutosave(),this.editor.setStatus(""),a?b.reloadFile(mxUtils.bind(this,function(){b.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(a){b.handleFileError(a,!0)})):b.synchronizeFile(mxUtils.bind(this,function(){b.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(a){b.handleFileError(a,!0)}))))};EditorUi.prototype.getFileData=function(a,b,c,d,f,g,m,
+t,v,z,y){f=null!=f?f:!0;g=null!=g?g:!1;var e=this.editor.graph;if(b||!a&&null!=v&&/(\.svg)$/i.test(v.getTitle()))if(z=!1,null!=e.themes&&"darkTheme"==e.defaultThemeName||null!=this.pages&&this.currentPage!=this.pages[0]){var k=e.getGlobalVariable,e=this.createTemporaryGraph(e.getStylesheet()),l=this.pages[0];e.getGlobalVariable=function(a){return"page"==a?l.getName():"pagenumber"==a?1:k.apply(this,arguments)};document.body.appendChild(e.container);e.model.setRoot(l.root)}m=null!=m?m:this.getXmlFileData(f,
+g,z,y);v=null!=v?v:this.getCurrentFile();a=this.createFileData(m,e,v,window.location.href,a,b,c,d,f,t,z);e!=this.editor.graph&&e.container.parentNode.removeChild(e.container);return a};EditorUi.prototype.getHtml=function(a,b,c,d,f,g){g=null!=g?g:!0;var e=null,k=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=b){var e=g?b.getGraphBounds():b.getBoundingBox(b.getSelectionCells()),l=b.view.scale;g=Math.floor(e.x/l-b.view.translate.x);l=Math.floor(e.y/l-b.view.translate.y);e=b.background;null==f&&
+(b=this.getBasenames().join(";"),0<b.length&&(k=EditorUi.drawHost+"/embed.js?s="+b));a.setAttribute("x0",g);a.setAttribute("y0",l)}null!=a&&(a.setAttribute("pan","1"),a.setAttribute("zoom","1"),a.setAttribute("resize","0"),a.setAttribute("fit","0"),a.setAttribute("border","20"),a.setAttribute("links","1"),null!=d&&a.setAttribute("edit",d));null!=f&&(f=f.replace(/&/g,"&amp;"));a=null!=a?Graph.zapGremlins(mxUtils.getXml(a)):"";d=Graph.compress(a);Graph.decompress(d)!=a&&(d=encodeURIComponent(a));return(null==
+f?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=f?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==f?null!=c?"<title>"+mxUtils.htmlEntities(c)+"</title>\n":"":"<title>diagrams.net</title>\n")+(null!=f?'<meta http-equiv="refresh" content="0;URL=\''+f+"'\"/>\n":"")+"</head>\n<body"+(null==f&&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;">'+
+d+"</div>\n</div>\n"+(null==f?'<script type="text/javascript" src="'+k+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+f+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.getHtml2=function(a,b,c,d,f){b=window.DRAWIO_VIEWER_URL||EditorUi.drawHost+"/js/viewer-static.min.js";null!=f&&(f=f.replace(/&/g,"&amp;"));a={highlight:"#0000ff",nav:this.editor.graph.foldingEnabled,
+resize:!0,xml:Graph.zapGremlins(a),toolbar:"pages zoom layers lightbox"};null!=this.pages&&null!=this.currentPage&&(a.page=mxUtils.indexOf(this.pages,this.currentPage));return(null==f?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=f?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==f?null!=c?"<title>"+mxUtils.htmlEntities(c)+"</title>\n":"":"<title>diagrams.net</title>\n")+(null!=f?'<meta http-equiv="refresh" content="0;URL=\''+
+f+"'\"/>\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(a))+'"></div>\n'+(null==f?'<script type="text/javascript" src="'+b+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+f+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.setFileData=
+function(a){a=this.validateFileData(a);this.pages=this.fileNode=this.currentPage=null;a=null!=a&&0<a.length?mxUtils.parseXml(a).documentElement:null;var b=Editor.extractParserError(a,mxResources.get("invalidOrMissingFile"));if(b)throw Error(mxResources.get("notADiagramFile")+" ("+b+")");b=null!=a?this.editor.extractGraphModel(a,!0):null;null!=b&&(a=b);if(null!=a&&"mxfile"==a.nodeName&&(b=a.getElementsByTagName("diagram"),"0"!=urlParams.pages||1<b.length||1==b.length&&b[0].hasAttribute("name"))){var e=
+null;this.fileNode=a;this.pages=[];for(var c=0;c<b.length;c++)null==b[c].getAttribute("id")&&b[c].setAttribute("id",c),a=new DiagramPage(b[c]),null==a.getName()&&a.setName(mxResources.get("pageWithNumber",[c+1])),this.pages.push(a),null!=urlParams["page-id"]&&a.getId()==urlParams["page-id"]&&(e=a);this.currentPage=null!=e?e:this.pages[Math.max(0,Math.min(this.pages.length-1,urlParams.page||0))];a=this.currentPage.node}"0"!=urlParams.pages&&null==this.fileNode&&null!=a&&(this.fileNode=a.ownerDocument.createElement("mxfile"),
+this.currentPage=new DiagramPage(a.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),this.pages=[this.currentPage]);this.editor.setGraphXml(a);null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=urlParams["layer-ids"])try{var d=urlParams["layer-ids"].split(" ");a={};for(c=0;c<d.length;c++)a[d[c]]=!0;for(var f=this.editor.graph.getModel(),g=f.getChildren(f.root),c=0;c<g.length;c++){var m=g[c];f.setVisible(m,a[m.id]||
+!1)}}catch(v){}};EditorUi.prototype.getBaseFilename=function(a){var b=this.getCurrentFile(),b=null!=b&&null!=b.getTitle()?b.getTitle():this.defaultFilename;if(/(\.xml)$/i.test(b)||/(\.html)$/i.test(b)||/(\.svg)$/i.test(b)||/(\.png)$/i.test(b))b=b.substring(0,b.lastIndexOf("."));/(\.drawio)$/i.test(b)&&(b=b.substring(0,b.lastIndexOf(".")));!a&&null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&null!=this.currentPage.node.getAttribute("name")&&0<this.currentPage.getName().length&&(b=b+"-"+
+this.currentPage.getName());return b};EditorUi.prototype.downloadFile=function(a,b,c,d,f,g,m,t,v,z,y){try{d=null!=d?d:this.editor.graph.isSelectionEmpty();var e=this.getBaseFilename(!f),k=e+("xml"==a||"pdf"==a&&y?".drawio":"")+"."+a;if("xml"==a){var l='<?xml version="1.0" encoding="UTF-8"?>\n'+this.getFileData(!0,null,null,null,d,f,null,null,null,b);this.saveData(k,a,l,"text/xml")}else if("html"==a)l=this.getHtml2(this.getFileData(!0),this.editor.graph,e),this.saveData(k,a,l,"text/html");else if("svg"!=
+a&&"xmlsvg"!=a||!this.spinner.spin(document.body,mxResources.get("export")))"xmlpng"==a?k=e+".png":"jpeg"==a&&(k=e+".jpg"),this.saveRequest(k,a,mxUtils.bind(this,function(b,e){try{var c=this.editor.graph.pageVisible;null!=g&&(this.editor.graph.pageVisible=g);var k=this.createDownloadRequest(b,a,d,e,m,f,t,v,z,y);this.editor.graph.pageVisible=c;return k}catch(I){this.handleError(I)}}));else{var n=null,p=mxUtils.bind(this,function(a){a.length<=MAX_REQUEST_SIZE?this.saveData(k,"svg",a,"image/svg+xml"):
+this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(n)}))});if("svg"==a){var q=this.editor.graph.background;if(m||q==mxConstants.NONE)q=null;var u=this.editor.graph.getSvg(q,null,null,null,null,d);c&&this.editor.graph.addSvgShadow(u);this.editor.convertImages(u,mxUtils.bind(this,mxUtils.bind(this,function(a){this.spinner.stop();p('<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n'+
+mxUtils.getXml(a))})))}else k=e+".svg",n=this.getFileData(!1,!0,null,mxUtils.bind(this,function(a){this.spinner.stop();p(a)}),d)}}catch(F){this.handleError(F)}};EditorUi.prototype.createDownloadRequest=function(a,b,c,d,f,g,m,t,v,z){var e=this.editor.graph,k=e.getGraphBounds();c=this.getFileData(!0,null,null,null,c,0==g?!1:"xmlpng"!=b,null,null,null,null,"pdf"==b);var l="",n="";if(k.width*k.height>MAX_AREA||c.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};z=z?"1":"0";"pdf"==
+b&&0==g&&(n="&allPages=1");if("xmlpng"==b&&(z="1",b="png",null!=this.pages&&null!=this.currentPage))for(g=0;g<this.pages.length;g++)if(this.pages[g]==this.currentPage){l="&from="+g;break}g=e.background;"png"!=b&&"pdf"!=b||!f?f||null!=g&&g!=mxConstants.NONE||(g="#ffffff"):g=mxConstants.NONE;f={globalVars:e.getExportVariables()};v&&(f.grid={size:e.gridSize,steps:e.view.gridSteps,color:e.view.gridColor});Graph.translateDiagram&&(f.diagramLanguage=Graph.diagramLanguage);return new mxXmlRequest(EXPORT_URL,
+"format="+b+l+n+"&bg="+(null!=g?g:mxConstants.NONE)+"&base64="+d+"&embedXml="+z+"&xml="+encodeURIComponent(c)+(null!=a?"&filename="+encodeURIComponent(a):"")+"&extras="+encodeURIComponent(JSON.stringify(f))+(null!=m?"&scale="+m:"")+(null!=t?"&border="+t:""))};EditorUi.prototype.setMode=function(a,b){this.mode=a};EditorUi.prototype.loadDescriptor=function(a,b,c){var e=window.location.hash,d=mxUtils.bind(this,function(c){var d=null!=a.data?a.data:"";null!=c&&0<c.length&&(0<d.length&&(d+="\n"),d+=c);
+c=new LocalFile(this,"csv"!=a.format&&0<d.length?d:this.emptyDiagramXml,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0);c.getHash=function(){return e};this.fileLoaded(c);"csv"==a.format&&this.importCsv(d,mxUtils.bind(this,function(a){this.editor.undoManager.clear();this.editor.setModified(!1);this.editor.setStatus("")}));if(null!=a.update){var k=null!=a.interval?parseInt(a.interval):6E4,l=null,f=mxUtils.bind(this,function(){var b=this.currentPage;mxUtils.post(a.update,
+"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,function(a){b===this.currentPage&&(200<=a.getStatus()&&300>=a.getStatus()?(this.updateDiagram(a.getText()),g()):this.handleError({message:mxResources.get("error")+" "+a.getStatus()}))}),mxUtils.bind(this,function(a){this.handleError(a)}))}),g=mxUtils.bind(this,function(){window.clearTimeout(l);l=window.setTimeout(f,k)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){g();f()}));g();f()}null!=
+b&&b()});null!=a.url&&0<a.url.length?this.editor.loadUrl(a.url,mxUtils.bind(this,function(a){d(a)}),mxUtils.bind(this,function(a){null!=c&&c(a)})):d("")};EditorUi.prototype.updateDiagram=function(a){function b(a){var b=new mxCellOverlay(a.image||d.warningImage,a.tooltip,a.align,a.valign,a.offset);b.addListener(mxEvent.CLICK,function(b,e){c.alert(a.tooltip)});return b}var e=null,c=this;if(null!=a&&0<a.length&&(e=mxUtils.parseXml(a),a=null!=e?e.documentElement:null,null!=a&&"updates"==a.nodeName)){var d=
+this.editor.graph,f=d.getModel();f.beginUpdate();var g=null;try{for(a=a.firstChild;null!=a;){if("update"==a.nodeName){var m=f.getCell(a.getAttribute("id"));if(null!=m){try{var v=a.getAttribute("value");if(null!=v){var z=mxUtils.parseXml(v).documentElement;if(null!=z)if("1"==z.getAttribute("replace-value"))f.setValue(m,z);else for(var y=z.attributes,x=0;x<y.length;x++)d.setAttributeForCell(m,y[x].nodeName,0<y[x].nodeValue.length?y[x].nodeValue:null)}}catch(J){null!=window.console&&console.log("Error in value for "+
+m.id+": "+J)}try{var A=a.getAttribute("style");null!=A&&d.model.setStyle(m,A)}catch(J){null!=window.console&&console.log("Error in style for "+m.id+": "+J)}try{var B=a.getAttribute("icon");if(null!=B){var C=0<B.length?JSON.parse(B):null;null!=C&&C.append||d.removeCellOverlays(m);null!=C&&d.addCellOverlay(m,b(C))}}catch(J){null!=window.console&&console.log("Error in icon for "+m.id+": "+J)}try{var D=a.getAttribute("geometry");if(null!=D){var D=JSON.parse(D),G=d.getCellGeometry(m);if(null!=G){G=G.clone();
+for(key in D){var E=parseFloat(D[key]);"dx"==key?G.x+=E:"dy"==key?G.y+=E:"dw"==key?G.width+=E:"dh"==key?G.height+=E:G[key]=parseFloat(D[key])}d.model.setGeometry(m,G)}}}catch(J){null!=window.console&&console.log("Error in icon for "+m.id+": "+J)}}}else if("model"==a.nodeName){for(var F=a.firstChild;null!=F&&F.nodeType!=mxConstants.NODETYPE_ELEMENT;)F=F.nextSibling;null!=F&&(new mxCodec(a.firstChild)).decode(F,f)}else if("view"==a.nodeName){if(a.hasAttribute("scale")&&(d.view.scale=parseFloat(a.getAttribute("scale"))),
+a.hasAttribute("dx")||a.hasAttribute("dy"))d.view.translate=new mxPoint(parseFloat(a.getAttribute("dx")||0),parseFloat(a.getAttribute("dy")||0))}else"fit"==a.nodeName&&(g=a.hasAttribute("max-scale")?parseFloat(a.getAttribute("max-scale")):1);a=a.nextSibling}}finally{f.endUpdate()}null!=g&&this.chromelessResize&&this.chromelessResize(!0,g)}return e};EditorUi.prototype.getCopyFilename=function(a,b){var e=null!=a&&null!=a.getTitle()?a.getTitle():this.defaultFilename,c="",d=e.lastIndexOf(".");0<=d&&(c=
+e.substring(d),e=e.substring(0,d));if(b)var k=new Date,d=k.getFullYear(),f=k.getMonth()+1,g=k.getDate(),m=k.getHours(),z=k.getMinutes(),k=k.getSeconds(),e=e+(" "+(d+"-"+f+"-"+g+"-"+m+"-"+z+"-"+k));return e=mxResources.get("copyOf",[e])+c};EditorUi.prototype.fileLoaded=function(a,b){var e=this.getCurrentFile();this.fileEditable=this.fileLoadedError=null;this.setCurrentFile(null);var c=!1;this.hideDialog();null!=e&&(EditorUi.debug("File.closed",[e]),e.removeListener(this.descriptorChangedListener),
+e.close());this.editor.graph.model.clear();this.editor.undoManager.clear();var d=mxUtils.bind(this,function(){this.setGraphEnabled(!1);this.setCurrentFile(null);null!=e&&this.updateDocumentTitle();this.editor.graph.model.clear();this.editor.undoManager.clear();this.setBackgroundImage(null);!b&&null!=window.location.hash&&0<window.location.hash.length&&(window.location.hash="");null!=this.fname&&(this.fnameWrapper.style.display="none",this.fname.innerHTML="",this.fname.setAttribute("title",mxResources.get("rename")));
+this.editor.setStatus("");this.updateUi();b||this.showSplash()});if(null!=a)try{mxClient.IS_SF&&"min"==uiTheme&&(this.diagramContainer.style.visibility="");this.openingFile=!0;this.setCurrentFile(a);a.addListener("descriptorChanged",this.descriptorChangedListener);a.addListener("contentChanged",this.descriptorChangedListener);a.open();delete this.openingFile;this.setGraphEnabled(!0);this.setMode(a.getMode());this.editor.graph.model.prefix=Editor.guid()+"-";this.editor.undoManager.clear();this.descriptorChanged();
+this.updateUi();a.isEditable()?a.isModified()?(a.addUnsavedStatus(),null!=a.backupPatch&&a.patch([a.backupPatch])):this.editor.setStatus(""):this.editor.setStatus('<span class="geStatusAlert" style="margin-left:8px;">'+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"));c=!0;this.isOffline()||null==a.getMode()||EditorUi.logEvent({category:a.getMode().toUpperCase()+"-OPEN-FILE-"+a.getHash(),action:"size_"+a.getSize(),label:"autosave_"+(this.editor.autosave?"on":"off")});EditorUi.debug("File.opened",[a]);if(this.editor.editable&&this.mode==a.getMode()&&a.getMode()!=App.MODE_DEVICE&&null!=a.getMode())try{this.addRecent({id:a.getHash(),title:a.getTitle(),
+mode:a.getMode()})}catch(u){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+1),mxSettings.save()}catch(u){}}catch(u){this.fileLoadedError=u;if(EditorUi.enableLogging&&!this.isOffline())try{EditorUi.logEvent({category:"ERROR-LOAD-FILE-"+(null!=a?a.getHash():"none"),action:"message_"+u.message,label:"stack_"+u.stack})}catch(t){}var k=mxUtils.bind(this,function(){null!=urlParams.url&&this.spinner.spin(document.body,mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):
+null!=e?this.fileLoaded(e):d()});b?k():this.handleError(u,mxResources.get("errorLoadingFile"),k,!0,null,null,!0)}else d();return c};EditorUi.prototype.getHashValueForPages=function(a,b){var e=0,c=new mxGraphModel,d=new mxCodec;null!=b&&(b.byteCount=0,b.attrCount=0,b.eltCount=0,b.nodeCount=0);for(var k=0;k<a.length;k++){this.updatePageRoot(a[k]);var f=a[k].node.cloneNode(!1);f.removeAttribute("name");c.root=a[k].root;var g=d.encode(c);this.editor.graph.saveViewState(a[k].viewState,g,!0);g.removeAttribute("pageWidth");
+g.removeAttribute("pageHeight");f.appendChild(g);null!=b&&(b.eltCount+=f.getElementsByTagName("*").length,b.nodeCount+=f.getElementsByTagName("mxCell").length);e=(e<<5)-e+this.hashValue(f,function(a,b,e,c){return!c||"mxGeometry"!=a.nodeName&&"mxPoint"!=a.nodeName||"x"!=b&&"y"!=b&&"width"!=b&&"height"!=b?c&&"mxCell"==a.nodeName&&"previous"==b?null:e:Math.round(e)},b)<<0}return e};EditorUi.prototype.hashValue=function(a,b,c){var e=0;if(null!=a&&"object"===typeof a&&"number"===typeof a.nodeType&&"string"===
+typeof a.nodeName&&"function"===typeof a.getAttribute){null!=a.nodeName&&(e^=this.hashValue(a.nodeName,b,c));if(null!=a.attributes){null!=c&&(c.attrCount+=a.attributes.length);for(var d=0;d<a.attributes.length;d++){var k=a.attributes[d].name,l=null!=b?b(a,k,a.attributes[d].value,!0):a.attributes[d].value;null!=l&&(e^=this.hashValue(k,b,c)+this.hashValue(l,b,c))}}if(null!=a.childNodes)for(d=0;d<a.childNodes.length;d++)e=(e<<5)-e+this.hashValue(a.childNodes[d],b,c)<<0}else if(null!=a&&"function"!==
+typeof a){a=String(a);b=0;null!=c&&(c.byteCount+=a.length);for(d=0;d<a.length;d++)b=(b<<5)-b+a.charCodeAt(d)<<0;e^=b}return e};EditorUi.prototype.descriptorChanged=function(){};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(a,b,c,d,f,g,m){};EditorUi.prototype.isScratchpadEnabled=function(){return isLocalStorage||mxClient.IS_CHROMEAPP};EditorUi.prototype.toggleScratchpad=function(){this.isScratchpadEnabled()&&(null==this.scratchpad?StorageFile.getFileContent(this,
+".scratchpad",mxUtils.bind(this,function(a){null==a&&(a=this.emptyLibraryXml);this.loadLibrary(new StorageLibrary(this,a,".scratchpad"))})):this.closeLibrary(this.scratchpad))};EditorUi.prototype.createLibraryDataFromImages=function(a){var b=mxUtils.createXmlDocument(),e=b.createElement("mxlibrary");mxUtils.setTextContent(e,JSON.stringify(a));b.appendChild(e);return mxUtils.getXml(b)};EditorUi.prototype.closeLibrary=function(a){null!=a&&(this.removeLibrarySidebar(a.getHash()),a.constructor!=LocalLibrary&&
+mxSettings.removeCustomLibrary(a.getHash()),".scratchpad"==a.title&&(this.scratchpad=null))};EditorUi.prototype.removeLibrarySidebar=function(a){var b=this.sidebar.palettes[a];if(null!=b){for(var e=0;e<b.length;e++)b[e].parentNode.removeChild(b[e]);delete this.sidebar.palettes[a]}};EditorUi.prototype.repositionLibrary=function(a){var b=this.sidebar.container;if(null==a){var e=this.sidebar.palettes["L.scratchpad"];null==e&&(e=this.sidebar.palettes.search);null!=e&&(a=e[e.length-1].nextSibling)}a=null!=
+a?a:b.firstChild.nextSibling.nextSibling;var e=b.lastChild,c=e.previousSibling;b.insertBefore(e,a);b.insertBefore(c,e)};EditorUi.prototype.loadLibrary=function(a,b){var e=mxUtils.parseXml(a.getData());if("mxlibrary"==e.documentElement.nodeName){var c=JSON.parse(mxUtils.getTextContent(e.documentElement));this.libraryLoaded(a,c,e.documentElement.getAttribute("title"),b)}else throw{message:mxResources.get("notALibraryFile")};};EditorUi.prototype.getLibraryStorageHint=function(a){return""};EditorUi.prototype.libraryLoaded=
+function(a,b,c,d){if(null!=this.sidebar){a.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(a.getHash());".scratchpad"==a.title&&(this.scratchpad=a);var e=this.sidebar.palettes[a.getHash()],e=null!=e?e[e.length-1].nextSibling:null;this.removeLibrarySidebar(a.getHash());var k=null,l=mxUtils.bind(this,function(b,e){0==b.length&&a.isEditable()?(null==k&&(k=document.createElement("div"),k.className="geDropTarget",mxUtils.write(k,mxResources.get("dragElementsHere"))),e.appendChild(k)):this.addLibraryEntries(b,
+e)});null!=this.sidebar&&null!=b&&this.sidebar.addEntries(b);c=null!=c&&0<c.length?c:a.getTitle();var f=this.sidebar.addPalette(a.getHash(),c,null!=d?d:!0,mxUtils.bind(this,function(a){l(b,a)}));this.repositionLibrary(e);var g=f.parentNode.previousSibling;d=g.getAttribute("title");null!=d&&0<d.length&&".scratchpad"!=a.title&&g.setAttribute("title",this.getLibraryStorageHint(a)+"\n"+d);var n=document.createElement("div");n.style.position="absolute";n.style.right="0px";n.style.top="0px";n.style.padding=
+"8px";n.style.backgroundColor="inherit";g.style.position="relative";var m=document.createElement("img");m.setAttribute("src",Dialog.prototype.closeImage);m.setAttribute("title",mxResources.get("close"));m.setAttribute("valign","absmiddle");m.setAttribute("border","0");m.style.cursor="pointer";m.style.margin="0 3px";var x=null;if(".scratchpad"!=a.title||this.closableScratchpad)n.appendChild(m),mxEvent.addListener(m,"click",mxUtils.bind(this,function(b){if(!mxEvent.isConsumed(b)){var e=mxUtils.bind(this,
+function(){this.closeLibrary(a)});null!=x?this.confirm(mxResources.get("allChangesLost"),null,e,mxResources.get("cancel"),mxResources.get("discardChanges")):e();mxEvent.consume(b)}}));if(a.isEditable()){var A=this.editor.graph,B=null,C=mxUtils.bind(this,function(e){this.showLibraryDialog(a.getTitle(),f,b,a,a.getMode());mxEvent.consume(e)}),D=mxUtils.bind(this,function(e){a.setModified(!0);a.isAutosave()?(null!=B&&null!=B.parentNode&&B.parentNode.removeChild(B),B=m.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",n.insertBefore(B,n.firstChild),g.style.paddingRight=18*n.childNodes.length+"px",this.saveLibrary(a.getTitle(),b,a,a.getMode(),!0,!0,function(){null!=B&&null!=B.parentNode&&(B.parentNode.removeChild(B),g.style.paddingRight=18*n.childNodes.length+"px")})):null==x&&(x=m.cloneNode(!1),x.setAttribute("src",IMAGE_PATH+"/download.png"),x.setAttribute("title",mxResources.get("save")),
+n.insertBefore(x,n.firstChild),mxEvent.addListener(x,"click",mxUtils.bind(this,function(e){this.saveLibrary(a.getTitle(),b,a,a.getMode(),a.constructor==LocalLibrary,!0,function(){null==x||a.isModified()||(g.style.paddingRight=18*n.childNodes.length+"px",x.parentNode.removeChild(x),x=null)});mxEvent.consume(e)})),g.style.paddingRight=18*n.childNodes.length+"px")}),G=mxUtils.bind(this,function(a,e,c,d){a=A.cloneCells(mxUtils.sortCells(A.model.getTopmostCells(a)));for(var l=0;l<a.length;l++){var g=A.getCellGeometry(a[l]);
+null!=g&&g.translate(-e.x,-e.y)}f.appendChild(this.sidebar.createVertexTemplateFromCells(a,e.width,e.height,d||"",!0,!1,!1));a={xml:Graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(a))),w:e.width,h:e.height};null!=d&&(a.title=d);b.push(a);D(c);null!=k&&null!=k.parentNode&&0<b.length&&(k.parentNode.removeChild(k),k=null)}),E=mxUtils.bind(this,function(a){if(A.isSelectionEmpty())A.getRubberband().isActive()?(A.getRubberband().execute(a),A.getRubberband().reset()):this.showError(mxResources.get("error"),
+mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var b=A.getSelectionCells(),e=A.view.getBounds(b),c=A.view.scale;e.x/=c;e.y/=c;e.width/=c;e.height/=c;e.x-=A.view.translate.x;e.y-=A.view.translate.y;G(b,e)}mxEvent.consume(a)});mxEvent.addGestureListeners(f,function(){},mxUtils.bind(this,function(a){A.isMouseDown&&null!=A.panningManager&&null!=A.graphHandler.first&&(A.graphHandler.suspend(),null!=A.graphHandler.hint&&(A.graphHandler.hint.style.visibility="hidden"),f.style.backgroundColor=
+"#f1f3f4",f.style.cursor="copy",A.panningManager.stop(),A.autoScroll=!1,mxEvent.consume(a))}),mxUtils.bind(this,function(a){A.isMouseDown&&null!=A.panningManager&&null!=A.graphHandler&&(f.style.backgroundColor="",f.style.cursor="default",this.sidebar.showTooltips=!0,A.panningManager.stop(),A.graphHandler.reset(),A.isMouseDown=!1,A.autoScroll=!0,E(a),mxEvent.consume(a))}));mxEvent.addListener(f,"mouseleave",mxUtils.bind(this,function(a){A.isMouseDown&&null!=A.graphHandler.first&&(A.graphHandler.resume(),
+null!=A.graphHandler.hint&&(A.graphHandler.hint.style.visibility="visible"),f.style.backgroundColor="",f.style.cursor="",A.autoScroll=!0)}));Graph.fileSupport&&(mxEvent.addListener(f,"dragover",mxUtils.bind(this,function(a){f.style.backgroundColor="#f1f3f4";a.dataTransfer.dropEffect="copy";f.style.cursor="copy";this.sidebar.hideTooltip();a.stopPropagation();a.preventDefault()})),mxEvent.addListener(f,"drop",mxUtils.bind(this,function(a){f.style.cursor="";f.style.backgroundColor="";0<a.dataTransfer.files.length&&
+this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(e,c,d,g,n,m,p,q,x){if(null!=e&&"image/"==c.substring(0,6))e="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image="+this.convertDataUri(e),e=[new mxCell("",new mxGeometry(0,0,n,m),e)],e[0].vertex=!0,G(e,new mxRectangle(0,0,n,m),a,mxEvent.isAltDown(a)?null:p.substring(0,p.lastIndexOf(".")).replace(/_/g," ")),null!=k&&null!=k.parentNode&&0<b.length&&(k.parentNode.removeChild(k),
+k=null);else{var u=!1,t=mxUtils.bind(this,function(e,c){if(null!=e&&"application/pdf"==c){var d=Editor.extractGraphModelFromPdf(e);null!=d&&0<d.length&&(e=d)}if(null!=e)if(d=mxUtils.parseXml(e),"mxlibrary"==d.documentElement.nodeName)try{var g=JSON.parse(mxUtils.getTextContent(d.documentElement));l(g,f);b=b.concat(g);D(a);this.spinner.stop();u=!0}catch(O){}else if("mxfile"==d.documentElement.nodeName)try{for(var n=d.documentElement.getElementsByTagName("diagram"),g=0;g<n.length;g++){var m=this.stringToCells(Editor.getDiagramNodeXml(n[g])),
+p=this.editor.graph.getBoundingBoxFromGeometry(m);G(m,new mxRectangle(0,0,p.width,p.height),a)}u=!0}catch(O){null!=window.console&&console.log("error in drop handler:",O)}u||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));null!=k&&null!=k.parentNode&&0<b.length&&(k.parentNode.removeChild(k),k=null)});null!=x&&null!=p&&(/(\.v(dx|sdx?))($|\?)/i.test(p)||/(\.vs(x|sx?))($|\?)/i.test(p))?this.importVisio(x,function(a){t(a,"text/xml")},null,p):!this.isOffline()&&(new XMLHttpRequest).upload&&
+this.isRemoteFileFormat(e,p)&&null!=x?this.parseFile(x,mxUtils.bind(this,function(a){4==a.readyState&&(this.spinner.stop(),200<=a.status&&299>=a.status?t(a.responseText,"text/xml"):this.handleError({message:mxResources.get(413==a.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):t(e,c)}}));a.stopPropagation();a.preventDefault()})),mxEvent.addListener(f,"dragleave",function(a){f.style.cursor="";f.style.backgroundColor="";a.stopPropagation();a.preventDefault()}));
+m=m.cloneNode(!1);m.setAttribute("src",Editor.editImage);m.setAttribute("title",mxResources.get("edit"));n.insertBefore(m,n.firstChild);mxEvent.addListener(m,"click",C);mxEvent.addListener(f,"dblclick",function(a){mxEvent.getSource(a)==f&&C(a)});d=m.cloneNode(!1);d.setAttribute("src",Editor.plusImage);d.setAttribute("title",mxResources.get("add"));n.insertBefore(d,n.firstChild);mxEvent.addListener(d,"click",E);this.isOffline()||".scratchpad"!=a.title||null==EditorUi.scratchpadHelpLink||(d=document.createElement("span"),
+d.setAttribute("title",mxResources.get("help")),d.style.cssText="color:#a3a3a3;text-decoration:none;margin-right:2px;",mxUtils.write(d,"?"),mxEvent.addGestureListeners(d,mxUtils.bind(this,function(a){this.openLink(EditorUi.scratchpadHelpLink);mxEvent.consume(a)})),n.insertBefore(d,n.firstChild))}g.appendChild(n);g.style.paddingRight=18*n.childNodes.length+"px"}};EditorUi.prototype.addLibraryEntries=function(a,b){for(var e=0;e<a.length;e++){var c=a[e],d=c.data;if(null!=d){var d=this.convertDataUri(d),
+k="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==c.aspect&&(k+="aspect=fixed;");b.appendChild(this.sidebar.createVertexTemplate(k+"image="+d,c.w,c.h,"",c.title||"",!1,!1,!0))}else null!=c.xml&&(d=this.stringToCells(Graph.decompress(c.xml)),0<d.length&&b.appendChild(this.sidebar.createVertexTemplateFromCells(d,c.w,c.h,c.title||"",!0,!1,!0)))}};EditorUi.prototype.getResource=function(a){return null!=a?a[mxLanguage]||a.main:null};EditorUi.prototype.footerHeight=
+0;"1"==urlParams.savesidebar&&(Sidebar.prototype.thumbWidth=64,Sidebar.prototype.thumbHeight=64);EditorUi.initTheme=function(){"atlas"==uiTheme?(mxClient.link("stylesheet",STYLE_PATH+"/atlas.css"),"undefined"!==typeof Toolbar&&(Toolbar.prototype.unselectedBackground="linear-gradient(rgb(255, 255, 255) 0px, rgb(242, 242, 242) 100%)",Toolbar.prototype.selectedBackground="rgb(242, 242, 242)"),Editor.prototype.initialTopSpacing=3,EditorUi.prototype.menubarHeight=41,EditorUi.prototype.toolbarHeight=38):
+Editor.isDarkMode()&&(mxClient.link("stylesheet",STYLE_PATH+"/dark.css"),Dialog.backdropColor="#2a2a2a",Format.inactiveTabBackgroundColor="black",Graph.prototype.defaultThemeName="darkTheme",Graph.prototype.defaultPageBackgroundColor="#2a2a2a",Graph.prototype.defaultPageBorderColor="#505759",BaseFormatPanel.prototype.buttonBackgroundColor="#2a2a2a",mxGraphHandler.prototype.previewColor="#cccccc",StyleFormatPanel.prototype.defaultStrokeColor="#cccccc",mxConstants.DROP_TARGET_COLOR="#00ff00");Editor.sketchFontFamily=
+"Architects Daughter";Editor.sketchFontSource="https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter";"1"==urlParams.sketch&&(Graph.prototype.defaultVertexStyle={pointerEvents:"0",hachureGap:"4"},Graph.prototype.defaultEdgeStyle={edgeStyle:"none",rounded:"0",curved:"1",jettySize:"auto",orthogonalLoop:"1",endArrow:"open",startSize:"14",endSize:"14",sourcePerimeterSpacing:"8",targetPerimeterSpacing:"8"},"0"!=urlParams.rough&&(Graph.prototype.defaultVertexStyle.fontFamily=Editor.sketchFontFamily,
+Graph.prototype.defaultVertexStyle.fontSource=Editor.sketchFontSource,Graph.prototype.defaultVertexStyle.fontSize="20",Graph.prototype.defaultVertexStyle.sketch="1",Graph.prototype.defaultEdgeStyle.fontFamily=Editor.sketchFontFamily,Graph.prototype.defaultEdgeStyle.fontSource=Editor.sketchFontSource,Graph.prototype.defaultEdgeStyle.fontSize="20",Graph.prototype.defaultEdgeStyle.sketch="1",Menus.prototype.defaultFonts=[{fontFamily:Editor.sketchFontFamily,fontUrl:decodeURIComponent(Editor.sketchFontSource)},
+{fontFamily:"Rock Salt",fontUrl:"https://fonts.googleapis.com/css?family=Rock+Salt"},{fontFamily:"Permanent Marker",fontUrl:"https://fonts.googleapis.com/css?family=Permanent+Marker"}].concat(Menus.prototype.defaultFonts)),Editor.configurationKey=".sketch-configuration",Editor.settingsKey=".sketch-config",Graph.prototype.defaultGridEnabled=!1,Graph.prototype.defaultPageVisible=!1,Graph.prototype.defaultEdgeLength=120,Editor.fitWindowBorders=new mxRectangle(60,30,30,30))};EditorUi.initTheme();EditorUi.prototype.showImageDialog=
+function(a,b,c,d,f){a=new ImageDialog(this,a,b,c,d,f);this.showDialog(a.container,Graph.fileSupport?480:360,Graph.fileSupport?200:90,!0,!0);a.init()};EditorUi.prototype.showBackgroundImageDialog=function(a,b){a=null!=a?a:mxUtils.bind(this,function(a,b){if(!b){var e=new ChangePageSetup(this,null,a);e.ignoreColor=!0;this.editor.graph.model.execute(e)}});var e=new BackgroundImageDialog(this,a,b);this.showDialog(e.container,360,200,!0,!0);e.init()};EditorUi.prototype.showLibraryDialog=function(a,b,c,
+d,f){a=new LibraryDialog(this,a,b,c,d,f);this.showDialog(a.container,640,440,!0,!1,mxUtils.bind(this,function(a){a&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()}));a.init()};var c=EditorUi.prototype.createFormat;EditorUi.prototype.createFormat=function(a){var b=c.apply(this,arguments);this.editor.graph.addListener("viewStateChanged",mxUtils.bind(this,function(a){this.editor.graph.isSelectionEmpty()&&b.refresh()}));return b};EditorUi.prototype.createSidebarFooterContainer=function(){var a=
+this.createDiv("geSidebarContainer geSidebarFooter");a.style.position="absolute";a.style.overflow="hidden";var b=document.createElement("a");b.className="geTitle";b.style.color="#DF6C0C";b.style.fontWeight="bold";b.style.height="100%";b.style.paddingTop="9px";b.innerHTML='<span style="font-size:18px;margin-right:5px;">+</span>';mxUtils.write(b,mxResources.get("moreShapes")+"...");mxEvent.addListener(b,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(a){a.preventDefault()}));
+mxEvent.addListener(b,"click",mxUtils.bind(this,function(a){this.actions.get("shapes").funct();mxEvent.consume(a)}));a.appendChild(b);return a};EditorUi.prototype.handleError=function(a,b,c,d,f,g,m){var e=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},k=null!=a&&null!=a.error?a.error:a;if(null!=a&&null!=a.stack&&null!=a.message)try{m?null!=window.console&&console.error("EditorUi.handleError:",a):EditorUi.logError("Caught: "+(""==a.message&&null!=a.name)?a.name:a.message,
+a.filename,a.lineNumber,a.columnNumber,a,"INFO")}catch(B){}if(null!=k||null!=b){m=mxUtils.htmlEntities(mxResources.get("unknownError"));var l=mxResources.get("ok"),n=null;b=null!=b?b:mxResources.get("error");if(null!=k){null!=k.retry&&(l=mxResources.get("cancel"),n=function(){e();k.retry()});if(404==k.code||404==k.status||403==k.code){m=403==k.code?null!=k.message?mxUtils.htmlEntities(k.message):mxUtils.htmlEntities(mxResources.get("accessDenied")):null!=f?f:mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied")+
+(null!=this.drive&&null!=this.drive.user?" ("+this.drive.user.displayName+", "+this.drive.user.email+")":""));var p=null!=f?null:null!=g?g: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!=a&&null!=a.error&&(null!=a.error.errors&&0<a.error.errors.length&&"fileAccess"==a.error.errors[0].reason||null!=a.error.data&&0<a.error.data.length&&"fileAccess"==a.error.data[0].reason)||404==k.code||404==k.status)){p="#U"==p.substring(0,
+2)?p.substring(45,p.lastIndexOf("%26ex")):p.substring(2);this.showError(b,m,mxResources.get("openInNewWindow"),mxUtils.bind(this,function(){this.editor.graph.openLink("https://drive.google.com/open?id="+p);this.handleError(a,b,c,d,f)}),n,mxResources.get("changeUser"),mxUtils.bind(this,function(){function a(){d.innerHTML="";for(var a=0;a<b.length;a++){var e=document.createElement("option");mxUtils.write(e,b[a].displayName);e.value=a;d.appendChild(e);e=document.createElement("option");e.innerHTML="&nbsp;&nbsp;&nbsp;";
+mxUtils.write(e,"<"+b[a].email+">");e.setAttribute("disabled","disabled");d.appendChild(e)}e=document.createElement("option");mxUtils.write(e,mxResources.get("addAccount"));e.value=b.length;d.appendChild(e)}var b=this.drive.getUsersList(),e=document.createElement("div"),c=document.createElement("span");c.style.marginTop="6px";mxUtils.write(c,mxResources.get("changeUser")+": ");e.appendChild(c);var d=document.createElement("select");d.style.width="200px";a();mxEvent.addListener(d,"change",mxUtils.bind(this,
+function(){var e=d.value,c=b.length!=e;c&&this.drive.setUser(b[e]);this.drive.authorize(c,mxUtils.bind(this,function(){c||(b=this.drive.getUsersList(),a())}),mxUtils.bind(this,function(a){this.handleError(a)}),!0)}));e.appendChild(d);e=new CustomDialog(this,e,mxUtils.bind(this,function(){this.loadFile(window.location.hash.substr(1),!0)}));this.showDialog(e.container,300,75,!0,!0)}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.hideDialog();null!=c&&c()}),480,150);return}}null!=k.message?
+m=""==k.message&&null!=k.name?mxUtils.htmlEntities(k.name):mxUtils.htmlEntities(k.message):null!=k.response&&null!=k.response.error?m=mxUtils.htmlEntities(k.response.error):"undefined"!==typeof window.App&&(k.code==App.ERROR_TIMEOUT?m=mxUtils.htmlEntities(mxResources.get("timeout")):k.code==App.ERROR_BUSY?m=mxUtils.htmlEntities(mxResources.get("busy")):"string"===typeof k&&0<k.length&&(m=mxUtils.htmlEntities(k)))}var q=g=null;null!=k&&null!=k.helpLink&&(g=mxResources.get("help"),q=mxUtils.bind(this,
+function(){return this.editor.graph.openLink(k.helpLink)}));this.showError(b,m,l,c,n,null,null,g,q,null,null,null,d?c:null)}else null!=c&&c()};EditorUi.prototype.alert=function(a,b,c){a=new ErrorDialog(this,null,a,mxResources.get("ok"),b);this.showDialog(a.container,c||340,100,!0,!1);a.init()};EditorUi.prototype.confirm=function(a,b,c,d,f,g){var e=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},k=Math.min(200,28*Math.ceil(a.length/50));a=new ConfirmDialog(this,a,function(){e();
+null!=b&&b()},function(){e();null!=c&&c()},d,f,null,null,null,null,k);this.showDialog(a.container,340,46+k,!0,g);a.init()};EditorUi.prototype.showBanner=function(a,b,c,d){var e=!1;if(!(this.bannerShowing||this["hideBanner"+a]||isLocalStorage&&null!=mxSettings.settings&&null!=mxSettings.settings["close"+a])){var k=document.createElement("div");k.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(k.style,"box-shadow","1px 1px 2px 0px #ddd");mxUtils.setPrefixedStyle(k.style,"transform","translate(-50%,120%)");mxUtils.setPrefixedStyle(k.style,"transition","all 1s ease");k.className="geBtn gePrimaryBtn";e=document.createElement("img");e.setAttribute("src",IMAGE_PATH+"/logo.png");e.setAttribute("border","0");e.setAttribute("align","absmiddle");e.style.cssText="margin-top:-4px;margin-left:8px;margin-right:12px;width:26px;height:26px;";k.appendChild(e);
+e=document.createElement("img");e.setAttribute("src",Dialog.prototype.closeImage);e.setAttribute("title",mxResources.get(d?"doNotShowAgain":"close"));e.setAttribute("border","0");e.style.cssText="position:absolute;right:10px;top:12px;filter:invert(1);padding:6px;margin:-6px;cursor:default;";k.appendChild(e);mxUtils.write(k,b);document.body.appendChild(k);this.bannerShowing=!0;b=document.createElement("div");b.style.cssText="font-size:11px;text-align:center;font-weight:normal;";var f=document.createElement("input");
+f.setAttribute("type","checkbox");f.setAttribute("id","geDoNotShowAgainCheckbox");f.style.marginRight="6px";if(!d){b.appendChild(f);var l=document.createElement("label");l.setAttribute("for","geDoNotShowAgainCheckbox");mxUtils.write(l,mxResources.get("doNotShowAgain"));b.appendChild(l);k.style.paddingBottom="30px";k.appendChild(b)}var g=mxUtils.bind(this,function(){null!=k.parentNode&&(k.parentNode.removeChild(k),this.bannerShowing=!1,f.checked||d)&&(this["hideBanner"+a]=!0,isLocalStorage&&null!=
+mxSettings.settings&&(mxSettings.settings["close"+a]=Date.now(),mxSettings.save()))});mxEvent.addListener(e,"click",mxUtils.bind(this,function(a){mxEvent.consume(a);g()}));var n=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(k.style,"transform","translate(-50%,120%)");window.setTimeout(mxUtils.bind(this,function(){g()}),1E3)});mxEvent.addListener(k,"click",mxUtils.bind(this,function(a){var b=mxEvent.getSource(a);b!=f&&b!=l?(null!=c&&c(),g(),mxEvent.consume(a)):n()}));window.setTimeout(mxUtils.bind(this,
+function(){mxUtils.setPrefixedStyle(k.style,"transform","translate(-50%,0%)")}),500);window.setTimeout(n,3E4);e=!0}return e};EditorUi.prototype.setCurrentFile=function(a){null!=a&&(a.opened=new Date);this.currentFile=a};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};EditorUi.prototype.isExportToCanvas=function(){return this.editor.isExportToCanvas()};EditorUi.prototype.createImageDataUri=function(a,b,c,d){a=a.toDataURL("image/"+c);if(null!=a&&6<a.length)null!=b&&(a=Editor.writeGraphModelToPng(a,
+"tEXt","mxfile",encodeURIComponent(b))),0<d&&(a=Editor.writeGraphModelToPng(a,"pHYs","dpi",d));else throw{message:mxResources.get("unknownError")};return a};EditorUi.prototype.saveCanvas=function(a,b,c,d,f){var e="jpeg"==c?"jpg":c;d=this.getBaseFilename(d)+(null!=b?".drawio":"")+"."+e;a=this.createImageDataUri(a,b,c,f);this.saveData(d,e,a.substring(a.lastIndexOf(",")+1),"image/"+c,!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(a,b){var e=new TextareaDialog(this,a,b,null,null,mxResources.get("close"));e.textarea.style.width="600px";e.textarea.style.height="380px";this.showDialog(e.container,620,460,!0,!0,null,null,null,null,!0);e.init();document.execCommand("selectall",!1,null)};EditorUi.prototype.doSaveLocalFile=function(a,b,c,d,
+f,g){"text/xml"!=c||/(\.drawio)$/i.test(b)||/(\.xml)$/i.test(b)||/(\.svg)$/i.test(b)||/(\.html)$/i.test(b)||(b=b+"."+(null!=g?g:"drawio"));if(window.Blob&&navigator.msSaveOrOpenBlob)a=d?this.base64ToBlob(a,c):new Blob([a],{type:c}),navigator.msSaveOrOpenBlob(a,b);else if(mxClient.IS_IE)c=window.open("about:blank","_blank"),null==c?mxUtils.popup(a,!0):(c.document.write(a),c.document.close(),c.document.execCommand("SaveAs",!0,b),c.close());else if(mxClient.IS_IOS&&this.isOffline())navigator.standalone||
+null==c||"image/"!=c.substring(0,6)?this.showTextDialog(b+":",a):this.openInNewWindow(a,c,d);else{var e=document.createElement("a");g=(null==navigator.userAgent||0>navigator.userAgent.indexOf("PaleMoon/"))&&"undefined"!==typeof e.download;if(mxClient.IS_GC&&null!=navigator.userAgent){var k=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);g=65==(k?parseInt(k[2],10):!1)?!1:g}if(g||this.isOffline()){e.href=URL.createObjectURL(d?this.base64ToBlob(a,c):new Blob([a],{type:c}));g?e.download=b:e.setAttribute("target",
+"_blank");document.body.appendChild(e);try{window.setTimeout(function(){URL.revokeObjectURL(e.href)},2E4),e.click(),e.parentNode.removeChild(e)}catch(v){}}else this.createEchoRequest(a,b,c,d,f).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(a,b,c,d,f,g){a="xml="+encodeURIComponent(a);return new mxXmlRequest(SAVE_URL,a+(null!=c?"&mime="+c:"")+(null!=f?"&format="+f:"")+(null!=g?"&base64="+g:"")+(null!=b?"&filename="+encodeURIComponent(b):"")+(d?"&binary=1":""))};EditorUi.prototype.base64ToBlob=
+function(a,b){b=b||"";for(var e=atob(a),c=e.length,d=Math.ceil(c/1024),k=Array(d),f=0;f<d;++f){for(var g=1024*f,m=Math.min(g+1024,c),z=Array(m-g),y=0;g<m;++y,++g)z[y]=e[g].charCodeAt(0);k[f]=new Uint8Array(z)}return new Blob(k,{type:b})};EditorUi.prototype.saveLocalFile=function(a,b,c,d,f,g,m,t){g=null!=g?g:!1;m=null!=m?m:"vsdx"!=f&&(!mxClient.IS_IOS||!navigator.standalone);f=this.getServiceCount(g);isLocalStorage&&f++;var e=4>=f?2:6<f?4:3;b=new CreateDialog(this,b,mxUtils.bind(this,function(b,e){try{if("_blank"==
+e)if(null!=c&&"image/"==c.substring(0,6))this.openInNewWindow(a,c,d);else if(null!=c&&"text/html"==c.substring(0,9)){var k=new EmbedDialog(this,a);this.showDialog(k.container,440,240,!0,!0);k.init()}else{var f=window.open("about:blank");null==f?mxUtils.popup(a,!0):(f.document.write("<pre>"+mxUtils.htmlEntities(a,!1)+"</pre>"),f.document.close())}else e==App.MODE_DEVICE||"download"==e?this.doSaveLocalFile(a,b,c,d,null,t):null!=b&&0<b.length&&this.pickFolder(e,mxUtils.bind(this,function(k){try{this.exportFile(a,
+b,c,d,e,k)}catch(C){this.handleError(C)}}))}catch(B){this.handleError(B)}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,g,m,null,1<f,e,a,c,d);g=this.isServices(f)?f>e?390:270:160;this.showDialog(b.container,400,g,!0,!0);b.init()};EditorUi.prototype.openInNewWindow=function(a,b,c){var e=window.open("about:blank");null==e||null==e.document?mxUtils.popup(a,!0):("image/svg+xml"!=b||mxClient.IS_SVG?"image/svg+xml"==b?e.document.write("<html>"+
+a+"</html>"):(a=c?a:btoa(unescape(encodeURIComponent(a))),e.document.write('<html><img style="max-width:100%;" src="data:'+b+";base64,"+a+'"/></html>')):e.document.write("<html><pre>"+mxUtils.htmlEntities(a,!1)+"</pre></html>"),e.document.close())};var b=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(a){if(this.isExportToCanvas()&&this.isChromelessImageExportEnabled()){this.exportDialog=null;var e=a(mxUtils.bind(this,function(a){var b=mxUtils.bind(this,function(){mxEvent.removeListener(this.editor.graph.container,"click",b);null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null)});if(null!=this.exportDialog)b.apply(this);else{this.exportDialog=document.createElement("div");var c=e.getBoundingClientRect();
+mxUtils.setPrefixedStyle(this.exportDialog.style,"borderRadius","5px");this.exportDialog.style.position="fixed";this.exportDialog.style.textAlign="center";this.exportDialog.style.fontFamily="Helvetica,Arial";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 d=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});d.spin(this.exportDialog);this.editor.exportToCanvas(mxUtils.bind(this,function(a){d.stop();this.exportDialog.style.width="auto";this.exportDialog.style.height=
+"auto";this.exportDialog.style.padding="10px";var e=this.createImageDataUri(a,null,"png");a=document.createElement("img");a.style.maxWidth="140px";a.style.maxHeight="140px";a.style.cursor="pointer";a.style.backgroundColor="white";a.setAttribute("title",mxResources.get("openInNewWindow"));a.setAttribute("border","0");a.setAttribute("src",e);this.exportDialog.appendChild(a);mxEvent.addListener(a,"click",mxUtils.bind(this,function(){this.openInNewWindow(e.substring(e.indexOf(",")+1),"image/png",!0);
+b.apply(this,arguments)}))}),null,this.thumbImageCache,null,mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),null,null,null,null,null,null,null,Editor.defaultBorder);mxEvent.addListener(this.editor.graph.container,"click",b);document.body.appendChild(this.exportDialog)}mxEvent.consume(a)}),Editor.cameraLargeImage,mxResources.get("export"))}b.apply(this,arguments)};EditorUi.prototype.saveData=function(a,b,c,d,f){this.isLocalFileSave()?this.saveLocalFile(c,a,d,f,b):this.saveRequest(a,
+b,mxUtils.bind(this,function(a,e){return this.createEchoRequest(c,a,d,f,b,e)}),c,f,d)};EditorUi.prototype.saveRequest=function(a,b,c,d,f,g,m){m=null!=m?m:!mxClient.IS_IOS||!navigator.standalone;var e=this.getServiceCount(!1);isLocalStorage&&e++;var k=4>=e?2:6<e?4:3;a=new CreateDialog(this,a,mxUtils.bind(this,function(a,e){if("_blank"==e||null!=a&&0<a.length){var k=c("_blank"==e?null:a,e==App.MODE_DEVICE||"download"==e||null==e||"_blank"==e?"0":"1");null!=k&&(e==App.MODE_DEVICE||"download"==e||"_blank"==
+e?k.simulate(document,"_blank"):this.pickFolder(e,mxUtils.bind(this,function(c){g=null!=g?g:"pdf"==b?"application/pdf":"image/"+b;if(null!=d)try{this.exportFile(d,a,g,!0,e,c)}catch(B){this.handleError(B)}else this.spinner.spin(document.body,mxResources.get("saving"))&&k.send(mxUtils.bind(this,function(){this.spinner.stop();if(200<=k.getStatus()&&299>=k.getStatus())try{this.exportFile(k.getText(),a,g,!0,e,c)}catch(B){this.handleError(B)}else this.handleError({message:mxResources.get("errorSavingFile")})}),
+function(a){this.spinner.stop();this.handleError(a)})})))}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,!1,m,null,1<e,k,d,g,f);e=this.isServices(e)?4<e?390:270:160;this.showDialog(a.container,380,e,!0,!0);a.init()};EditorUi.prototype.isServices=function(a){return 1!=a};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(a,b,c,d,f,g){};EditorUi.prototype.pickFolder=function(a,
+b,c){b(null)};EditorUi.prototype.exportSvg=function(a,b,c,d,f,g,m,t,v,z,y,x){if(this.spinner.spin(document.body,mxResources.get("export")))try{var e=this.editor.graph.isSelectionEmpty();c=null!=c?c:e;var k=b?null:this.editor.graph.background;k==mxConstants.NONE&&(k=null);null==k&&0==b&&(k=y?this.editor.graph.defaultPageBackgroundColor:"#ffffff");var l=this.editor.graph.getSvg(k,a,m,t,null,c,null,null,"blank"==z?"_blank":"self"==z?"_top":null,null,!0,y,x);d&&this.editor.graph.addSvgShadow(l);var n=
+this.getBaseFilename()+(f?".drawio":"")+".svg",p=mxUtils.bind(this,function(a){this.spinner.stop();f&&a.setAttribute("content",this.getFileData(!0,null,null,null,c,v,null,null,null,!1));var b='<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n'+mxUtils.getXml(a);this.isLocalFileSave()||b.length<=MAX_REQUEST_SIZE?this.saveData(n,"svg",b,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},
+mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(b)}))});this.editor.addFontCss(l);this.editor.graph.mathEnabled&&this.editor.addMathCss(l);g?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.editor.convertImages(l,p,this.thumbImageCache)):p(l)}catch(E){this.handleError(E)}};EditorUi.prototype.addRadiobox=function(a,b,c,d,f,g,m){return this.addCheckbox(a,c,d,f,g,m,!0,b)};EditorUi.prototype.addCheckbox=function(a,b,c,d,f,g,m,t){g=null!=g?g:!0;var e=document.createElement("input");
+e.style.marginRight="8px";e.style.marginTop="16px";e.setAttribute("type",m?"radio":"checkbox");m="geCheckbox-"+Editor.guid();e.id=m;null!=t&&e.setAttribute("name",t);c&&(e.setAttribute("checked","checked"),e.defaultChecked=!0);d&&e.setAttribute("disabled","disabled");g&&(a.appendChild(e),c=document.createElement("label"),mxUtils.write(c,b),c.setAttribute("for",m),a.appendChild(c),f||mxUtils.br(a));return e};EditorUi.prototype.addEditButton=function(a,b){var e=this.addCheckbox(a,mxResources.get("edit")+
+":",!0,null,!0);e.style.marginLeft="24px";var c=this.getCurrentFile(),d="";null!=c&&c.getMode()!=App.MODE_DEVICE&&c.getMode()!=App.MODE_BROWSER&&(d=window.location.href);var k=document.createElement("select");k.style.width="120px";k.style.marginLeft="8px";k.style.marginRight="10px";k.className="geBtn";c=document.createElement("option");c.setAttribute("value","blank");mxUtils.write(c,mxResources.get("makeCopy"));k.appendChild(c);c=document.createElement("option");c.setAttribute("value","custom");mxUtils.write(c,
+mxResources.get("custom")+"...");k.appendChild(c);a.appendChild(k);mxEvent.addListener(k,"change",mxUtils.bind(this,function(){if("custom"==k.value){var a=new FilenameDialog(this,d,mxResources.get("ok"),function(a){null!=a?d=a:k.value="blank"},mxResources.get("url"),null,null,null,null,function(){k.value="blank"});this.showDialog(a.container,300,80,!0,!1);a.init()}}));mxEvent.addListener(e,"change",mxUtils.bind(this,function(){e.checked&&(null==b||b.checked)?k.removeAttribute("disabled"):k.setAttribute("disabled",
+"disabled")}));mxUtils.br(a);return{getLink:function(){return e.checked?"blank"===k.value?"_blank":d:null},getEditInput:function(){return e},getEditSelect:function(){return k}}};EditorUi.prototype.addLinkSection=function(a,b){function e(){f.innerHTML='<div style="width:100%;height:100%;box-sizing:border-box;'+(null!=k&&k!=mxConstants.NONE?"border:1px solid black;background-color:"+k:"background-position:center center;background-repeat:no-repeat;background-image:url('"+Dialog.prototype.closeImage+
+"')")+';"></div>'}mxUtils.write(a,mxResources.get("links")+":");var c=document.createElement("select");c.style.width="100px";c.style.marginLeft="8px";c.style.marginRight="10px";c.className="geBtn";var d=document.createElement("option");d.setAttribute("value","auto");mxUtils.write(d,mxResources.get("automatic"));c.appendChild(d);d=document.createElement("option");d.setAttribute("value","blank");mxUtils.write(d,mxResources.get("openInNewWindow"));c.appendChild(d);d=document.createElement("option");
d.setAttribute("value","self");mxUtils.write(d,mxResources.get("openInThisWindow"));c.appendChild(d);b&&(d=document.createElement("option"),d.setAttribute("value","frame"),mxUtils.write(d,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),c.appendChild(d));a.appendChild(c);mxUtils.write(a,mxResources.get("borderColor")+":");var k="#0000ff",f=null,f=mxUtils.button("",mxUtils.bind(this,function(a){this.pickColor(k||"none",function(a){k=a;e()});mxEvent.consume(a)}));e();f.style.padding=
mxClient.IS_FF?"4px 2px 4px 2px":"4px";f.style.marginLeft="4px";f.style.height="22px";f.style.width="22px";f.style.position="relative";f.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";f.className="geColorBtn";a.appendChild(f);mxUtils.br(a);return{getColor:function(){return k},getTarget:function(){return c.value},focus:function(){c.focus()}}};EditorUi.prototype.createUrlParameters=function(a,b,c,d,f,g,m){m=null!=m?m:[];d&&("https://viewer.diagrams.net"==EditorUi.lightboxHost&&
"1"!=urlParams.dev||m.push("lightbox=1"),"auto"!=a&&m.push("target="+a),null!=b&&b!=mxConstants.NONE&&m.push("highlight="+("#"==b.charAt(0)?b.substring(1):b)),null!=f&&0<f.length&&m.push("edit="+encodeURIComponent(f)),g&&m.push("layers=1"),this.editor.graph.foldingEnabled&&m.push("nav=1"));c&&null!=this.currentPage&&null!=this.pages&&this.currentPage!=this.pages[0]&&m.push("page-id="+this.currentPage.getId());return m};EditorUi.prototype.createLink=function(a,b,c,d,f,g,m,t,v,z){v=this.createUrlParameters(a,
@@ -10606,19 +10609,19 @@ x.style.marginRight="16px",x.style.width="50px",x.style.marginLeft="6px",x.style
b)C=this.addCheckbox(e,mxResources.get("allPages"),c,!c);var D=this.addCheckbox(e,mxResources.get("lightbox"),!0,null,null,!g),G=this.addEditButton(e,D),E=G.getEditInput();g&&(E.style.marginLeft=D.style.marginLeft,D.style.display="none",a-=30);var F=this.addCheckbox(e,mxResources.get("layers"),!0);F.style.marginLeft=E.style.marginLeft;F.style.marginBottom="16px";F.style.marginTop="8px";mxEvent.addListener(D,"change",function(){D.checked?(F.removeAttribute("disabled"),E.removeAttribute("disabled")):
(F.setAttribute("disabled","disabled"),E.setAttribute("disabled","disabled"));E.checked&&D.checked?G.getEditSelect().removeAttribute("disabled"):G.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,e,mxUtils.bind(this,function(){f(q.getTarget(),q.getColor(),null==C?!0:C.checked,D.checked,G.getLink(),F.checked,null!=x?x.value:null,null!=p?p.value:null)}),null,mxResources.get("create"),k);this.showDialog(b.container,340,254+a,!0,!0);null!=x?(x.focus(),mxClient.IS_GC||mxClient.IS_FF||
5<=document.documentMode?x.select():document.execCommand("selectAll",!1,null)):q.focus()};EditorUi.prototype.showRemoteExportDialog=function(a,b,c,d,f){var e=document.createElement("div");e.style.whiteSpace="nowrap";var k=document.createElement("h3");mxUtils.write(k,mxResources.get("image"));k.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:"+(f?"10":"4")+"px";e.appendChild(k);if(f){mxUtils.write(e,mxResources.get("zoom")+":");var g=document.createElement("input");g.setAttribute("type",
-"text");g.style.marginRight="16px";g.style.width="60px";g.style.marginLeft="4px";g.style.marginRight="12px";g.value=this.lastExportZoom||"100%";e.appendChild(g);mxUtils.write(e,mxResources.get("borderWidth")+":");var l=document.createElement("input");l.setAttribute("type","text");l.style.marginRight="16px";l.style.width="60px";l.style.marginLeft="4px";l.value=this.lastExportBorder||"0";e.appendChild(l);mxUtils.br(e)}var m=this.addCheckbox(e,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),
-n=d?null:this.addCheckbox(e,mxResources.get("includeCopyOfMyDiagram"),!0),k=this.editor.graph,p=d?null:this.addCheckbox(e,mxResources.get("transparentBackground"),k.background==mxConstants.NONE||null==k.background);null!=p&&(p.style.marginBottom="16px");a=new CustomDialog(this,e,mxUtils.bind(this,function(){var a=parseInt(g.value)/100||1,b=parseInt(l.value)||0;c(!m.checked,null!=n?n.checked:!1,null!=p?p.checked:!1,a,b)}),null,a,b);this.showDialog(a.container,300,(f?25:0)+(d?125:210),!0,!0)};EditorUi.prototype.showExportDialog=
-function(a,b,c,d,f,g,m,t,v){m=null!=m?m:!0;var e=document.createElement("div");e.style.whiteSpace="nowrap";var k=this.editor.graph,l="jpeg"==t?196:300,n=document.createElement("h3");mxUtils.write(n,a);n.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";e.appendChild(n);mxUtils.write(e,mxResources.get("zoom")+":");var p=document.createElement("input");p.setAttribute("type","text");p.style.marginRight="16px";p.style.width="60px";p.style.marginLeft="4px";p.style.marginRight=
-"12px";p.value=this.lastExportZoom||"100%";e.appendChild(p);mxUtils.write(e,mxResources.get("borderWidth")+":");var q=document.createElement("input");q.setAttribute("type","text");q.style.marginRight="16px";q.style.width="60px";q.style.marginLeft="4px";q.value=this.lastExportBorder||"0";e.appendChild(q);mxUtils.br(e);var u=this.addCheckbox(e,mxResources.get("selectionOnly"),!1,k.isSelectionEmpty()),G=document.createElement("input");G.style.marginTop="16px";G.style.marginRight="8px";G.style.marginLeft=
-"24px";G.setAttribute("disabled","disabled");G.setAttribute("type","checkbox");var E=document.createElement("select");E.style.marginTop="16px";E.style.marginLeft="8px";a=["selectionOnly","diagram","page"];for(n=0;n<a.length;n++)if(!k.isSelectionEmpty()||"selectionOnly"!=a[n]){var F=document.createElement("option");mxUtils.write(F,mxResources.get(a[n]));F.setAttribute("value",a[n]);E.appendChild(F)}v?(mxUtils.write(e,mxResources.get("size")+":"),e.appendChild(E),mxUtils.br(e),l+=26,mxEvent.addListener(E,
-"change",function(){"selectionOnly"==E.value&&(u.checked=!0)})):g&&(e.appendChild(G),mxUtils.write(e,mxResources.get("crop")),mxUtils.br(e),l+=26,mxEvent.addListener(u,"change",function(){u.checked?G.removeAttribute("disabled"):G.setAttribute("disabled","disabled")}));k.isSelectionEmpty()?v&&(u.style.display="none",u.nextSibling.style.display="none",u.nextSibling.nextSibling.style.display="none",l-=26):(E.value="diagram",G.setAttribute("checked","checked"),G.defaultChecked=!0,mxEvent.addListener(u,
-"change",function(){E.value=u.checked?"selectionOnly":"diagram"}));var K=this.addCheckbox(e,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=t),M=null;Editor.isDarkMode()&&(M=this.addCheckbox(e,mxResources.get("dark"),!0),l+=26);var J=this.addCheckbox(e,mxResources.get("shadow"),k.shadowVisible),I=document.createElement("input");I.style.marginTop="16px";I.style.marginRight="8px";I.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||I.setAttribute("disabled","disabled");
-b&&(e.appendChild(I),mxUtils.write(e,mxResources.get("embedImages")),mxUtils.br(e),l+=26);var N=null;if("png"==t||"jpeg"==t)N=this.addCheckbox(e,mxResources.get("grid"),!1,this.isOffline()||!this.canvasSupported,!1,!0),l+=26;var H=this.addCheckbox(e,mxResources.get("includeCopyOfMyDiagram"),m,null,null,"jpeg"!=t);H.style.marginBottom="16px";var L=document.createElement("select");L.style.maxWidth="260px";L.style.marginLeft="8px";L.style.marginRight="10px";L.className="geBtn";b=document.createElement("option");
-b.setAttribute("value","auto");mxUtils.write(b,mxResources.get("automatic"));L.appendChild(b);b=document.createElement("option");b.setAttribute("value","blank");mxUtils.write(b,mxResources.get("openInNewWindow"));L.appendChild(b);b=document.createElement("option");b.setAttribute("value","self");mxUtils.write(b,mxResources.get("openInThisWindow"));L.appendChild(b);"svg"==t&&(mxUtils.write(e,mxResources.get("links")+":"),e.appendChild(L),mxUtils.br(e),mxUtils.br(e),l+=26);c=new CustomDialog(this,e,
-mxUtils.bind(this,function(){this.lastExportBorder=q.value;this.lastExportZoom=p.value;f(p.value,K.checked,!u.checked,J.checked,H.checked,I.checked,q.value,G.checked,!1,L.value,null!=N?N.checked:null,null!=M?M.checked:null,E.value)}),null,c,d);this.showDialog(c.container,340,l,!0,!0,null,null,null,null,!0);p.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?p.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(a,b,c,d,f){var e=document.createElement("div");
-e.style.whiteSpace="nowrap";var k=this.editor.graph;if(null!=b){var g=document.createElement("h3");mxUtils.write(g,b);g.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";e.appendChild(g)}var l=this.addCheckbox(e,mxResources.get("fit"),!0),n=this.addCheckbox(e,mxResources.get("shadow"),k.shadowVisible&&d,!d),m=this.addCheckbox(e,c),p=this.addCheckbox(e,mxResources.get("lightbox"),!0),A=this.addEditButton(e,p),B=A.getEditInput(),C=1<k.model.getChildCount(k.model.getRoot()),
-D=this.addCheckbox(e,mxResources.get("layers"),C,!C);D.style.marginLeft=B.style.marginLeft;D.style.marginBottom="12px";D.style.marginTop="8px";mxEvent.addListener(p,"change",function(){p.checked?(C&&D.removeAttribute("disabled"),B.removeAttribute("disabled")):(D.setAttribute("disabled","disabled"),B.setAttribute("disabled","disabled"));B.checked&&p.checked?A.getEditSelect().removeAttribute("disabled"):A.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,e,mxUtils.bind(this,
-function(){a(l.checked,n.checked,m.checked,p.checked,A.getLink(),D.checked)}),null,mxResources.get("embed"),f);this.showDialog(b.container,280,280,!0,!0)};EditorUi.prototype.createEmbedImage=function(a,b,c,d,f,g,m,t){function e(b){var e=" ",n="";d&&(e=" onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+
+"text");g.style.marginRight="16px";g.style.width="60px";g.style.marginLeft="4px";g.style.marginRight="12px";g.value=this.lastExportZoom||"100%";e.appendChild(g);mxUtils.write(e,mxResources.get("borderWidth")+":");var l=document.createElement("input");l.setAttribute("type","text");l.style.marginRight="16px";l.style.width="60px";l.style.marginLeft="4px";l.value=this.lastExportBorder||"0";e.appendChild(l);mxUtils.br(e)}var n=this.addCheckbox(e,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),
+m=d?null:this.addCheckbox(e,mxResources.get("includeCopyOfMyDiagram"),Editor.defaultIncludeDiagram),k=this.editor.graph,p=d?null:this.addCheckbox(e,mxResources.get("transparentBackground"),k.background==mxConstants.NONE||null==k.background);null!=p&&(p.style.marginBottom="16px");a=new CustomDialog(this,e,mxUtils.bind(this,function(){var a=parseInt(g.value)/100||1,b=parseInt(l.value)||0;c(!n.checked,null!=m?m.checked:!1,null!=p?p.checked:!1,a,b)}),null,a,b);this.showDialog(a.container,300,(f?25:0)+
+(d?125:210),!0,!0)};EditorUi.prototype.showExportDialog=function(a,b,c,d,f,g,m,t,v){m=null!=m?m:Editor.defaultIncludeDiagram;var e=document.createElement("div");e.style.whiteSpace="nowrap";var k=this.editor.graph,l="jpeg"==t?196:300,n=document.createElement("h3");mxUtils.write(n,a);n.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";e.appendChild(n);mxUtils.write(e,mxResources.get("zoom")+":");var p=document.createElement("input");p.setAttribute("type","text");p.style.marginRight=
+"16px";p.style.width="60px";p.style.marginLeft="4px";p.style.marginRight="12px";p.value=this.lastExportZoom||"100%";e.appendChild(p);mxUtils.write(e,mxResources.get("borderWidth")+":");var q=document.createElement("input");q.setAttribute("type","text");q.style.marginRight="16px";q.style.width="60px";q.style.marginLeft="4px";q.value=this.lastExportBorder||"0";e.appendChild(q);mxUtils.br(e);var u=this.addCheckbox(e,mxResources.get("selectionOnly"),!1,k.isSelectionEmpty()),G=document.createElement("input");
+G.style.marginTop="16px";G.style.marginRight="8px";G.style.marginLeft="24px";G.setAttribute("disabled","disabled");G.setAttribute("type","checkbox");var E=document.createElement("select");E.style.marginTop="16px";E.style.marginLeft="8px";a=["selectionOnly","diagram","page"];for(n=0;n<a.length;n++)if(!k.isSelectionEmpty()||"selectionOnly"!=a[n]){var F=document.createElement("option");mxUtils.write(F,mxResources.get(a[n]));F.setAttribute("value",a[n]);E.appendChild(F)}v?(mxUtils.write(e,mxResources.get("size")+
+":"),e.appendChild(E),mxUtils.br(e),l+=26,mxEvent.addListener(E,"change",function(){"selectionOnly"==E.value&&(u.checked=!0)})):g&&(e.appendChild(G),mxUtils.write(e,mxResources.get("crop")),mxUtils.br(e),l+=26,mxEvent.addListener(u,"change",function(){u.checked?G.removeAttribute("disabled"):G.setAttribute("disabled","disabled")}));k.isSelectionEmpty()?v&&(u.style.display="none",u.nextSibling.style.display="none",u.nextSibling.nextSibling.style.display="none",l-=26):(E.value="diagram",G.setAttribute("checked",
+"checked"),G.defaultChecked=!0,mxEvent.addListener(u,"change",function(){E.value=u.checked?"selectionOnly":"diagram"}));var J=this.addCheckbox(e,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=t),M=null;Editor.isDarkMode()&&(M=this.addCheckbox(e,mxResources.get("dark"),!0),l+=26);var K=this.addCheckbox(e,mxResources.get("shadow"),k.shadowVisible),I=document.createElement("input");I.style.marginTop="16px";I.style.marginRight="8px";I.setAttribute("type","checkbox");!this.isOffline()&&
+this.canvasSupported||I.setAttribute("disabled","disabled");b&&(e.appendChild(I),mxUtils.write(e,mxResources.get("embedImages")),mxUtils.br(e),l+=26);var N=null;if("png"==t||"jpeg"==t)N=this.addCheckbox(e,mxResources.get("grid"),!1,this.isOffline()||!this.canvasSupported,!1,!0),l+=26;var H=this.addCheckbox(e,mxResources.get("includeCopyOfMyDiagram"),m,null,null,"jpeg"!=t);H.style.marginBottom="16px";var L=document.createElement("select");L.style.maxWidth="260px";L.style.marginLeft="8px";L.style.marginRight=
+"10px";L.className="geBtn";b=document.createElement("option");b.setAttribute("value","auto");mxUtils.write(b,mxResources.get("automatic"));L.appendChild(b);b=document.createElement("option");b.setAttribute("value","blank");mxUtils.write(b,mxResources.get("openInNewWindow"));L.appendChild(b);b=document.createElement("option");b.setAttribute("value","self");mxUtils.write(b,mxResources.get("openInThisWindow"));L.appendChild(b);"svg"==t&&(mxUtils.write(e,mxResources.get("links")+":"),e.appendChild(L),
+mxUtils.br(e),mxUtils.br(e),l+=26);c=new CustomDialog(this,e,mxUtils.bind(this,function(){this.lastExportBorder=q.value;this.lastExportZoom=p.value;f(p.value,J.checked,!u.checked,K.checked,H.checked,I.checked,q.value,G.checked,!1,L.value,null!=N?N.checked:null,null!=M?M.checked:null,E.value)}),null,c,d);this.showDialog(c.container,340,l,!0,!0,null,null,null,null,!0);p.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?p.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=
+function(a,b,c,d,f){var e=document.createElement("div");e.style.whiteSpace="nowrap";var k=this.editor.graph;if(null!=b){var g=document.createElement("h3");mxUtils.write(g,b);g.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";e.appendChild(g)}var l=this.addCheckbox(e,mxResources.get("fit"),!0),n=this.addCheckbox(e,mxResources.get("shadow"),k.shadowVisible&&d,!d),m=this.addCheckbox(e,c),p=this.addCheckbox(e,mxResources.get("lightbox"),!0),A=this.addEditButton(e,p),B=A.getEditInput(),
+C=1<k.model.getChildCount(k.model.getRoot()),D=this.addCheckbox(e,mxResources.get("layers"),C,!C);D.style.marginLeft=B.style.marginLeft;D.style.marginBottom="12px";D.style.marginTop="8px";mxEvent.addListener(p,"change",function(){p.checked?(C&&D.removeAttribute("disabled"),B.removeAttribute("disabled")):(D.setAttribute("disabled","disabled"),B.setAttribute("disabled","disabled"));B.checked&&p.checked?A.getEditSelect().removeAttribute("disabled"):A.getEditSelect().setAttribute("disabled","disabled")});
+b=new CustomDialog(this,e,mxUtils.bind(this,function(){a(l.checked,n.checked,m.checked,p.checked,A.getLink(),D.checked)}),null,mxResources.get("embed"),f);this.showDialog(b.container,280,280,!0,!0)};EditorUi.prototype.createEmbedImage=function(a,b,c,d,f,g,m,t){function e(b){var e=" ",n="";d&&(e=" onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+
EditorUi.lightboxHost+"/?client=1"+(null!=l?"&page="+l:"")+(f?"&edit=_blank":"")+(g?"&layers=1":"")+"');}})(this);\"",n+="cursor:pointer;");a&&(n+="max-width:100%;");var p="";c&&(p=' width="'+Math.round(k.width)+'" height="'+Math.round(k.height)+'"');m('<img src="'+b+'"'+p+(""!=n?' style="'+n+'"':"")+e+"/>")}var k=this.editor.graph.getGraphBounds(),l=this.getSelectedPageIndex();if(this.isExportToCanvas())this.editor.exportToCanvas(mxUtils.bind(this,function(a){var b=d?this.getFileData(!0):null;a=
this.createImageDataUri(a,b,"png");e(a)}),null,null,null,mxUtils.bind(this,function(a){t({message:mxResources.get("unknownError")})}),null,!0,c?2:1,null,b,null,null,Editor.defaultBorder);else if(b=this.getFileData(!0),k.width*k.height<=MAX_AREA&&b.length<=MAX_REQUEST_SIZE){var n="";c&&(n="&w="+Math.round(2*k.width)+"&h="+Math.round(2*k.height));var p=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(d?"1":"0")+n+"&xml="+encodeURIComponent(b));p.send(mxUtils.bind(this,function(){200<=p.getStatus()&&
299>=p.getStatus()?e("data:image/png;base64,"+p.getText()):t({message:mxResources.get("unknownError")})}))}else t({message:mxResources.get("drawingTooLarge")})};EditorUi.prototype.createEmbedSvg=function(a,b,c,d,f,g,m){var e=this.editor.graph.getSvg(null,null,null,null,null,null,null,null,null,null,!c),k=e.getElementsByTagName("a");if(null!=k)for(var l=0;l<k.length;l++){var n=k[l].getAttribute("href");null!=n&&"#"==n.charAt(0)&&"_blank"==k[l].getAttribute("target")&&k[l].removeAttribute("target")}d&&
@@ -10628,7 +10631,7 @@ EditorUi.lightboxHost+"/?client=1"+(null!=b?"&page="+b:"")+(f?"&edit=_blank":"")
Math.floor((new Date-a)/1E3);var b=Math.floor(a/31536E3);if(1<b)return b+" "+mxResources.get("years");b=Math.floor(a/2592E3);if(1<b)return b+" "+mxResources.get("months");b=Math.floor(a/86400);if(1<b)return b+" "+mxResources.get("days");b=Math.floor(a/3600);if(1<b)return b+" "+mxResources.get("hours");b=Math.floor(a/60);return 1<b?b+" "+mxResources.get("minutes"):1==b?b+" "+mxResources.get("minute"):null};EditorUi.prototype.decodeNodeIntoGraph=function(a,b){if(null!=a){var e=null;if("diagram"==a.nodeName)e=
a;else if("mxfile"==a.nodeName){var c=a.getElementsByTagName("diagram");if(0<c.length){var e=c[0],d=b.getGlobalVariable;b.getGlobalVariable=function(a){return"page"==a?e.getAttribute("name")||mxResources.get("pageWithNumber",[1]):"pagenumber"==a?1:d.apply(this,arguments)}}}null!=e&&(a=Editor.parseDiagramNode(e))}c=this.editor.graph;try{this.editor.graph=b,this.editor.setGraphXml(a)}catch(q){}finally{this.editor.graph=c}return a};EditorUi.prototype.getPngFileProperties=function(a){var b=1,e=0;if(null!=
a){if(a.hasAttribute("scale")){var c=parseFloat(a.getAttribute("scale"));!isNaN(c)&&0<c&&(b=c)}a.hasAttribute("border")&&(c=parseInt(a.getAttribute("border")),!isNaN(c)&&0<c&&(e=c))}return{scale:b,border:e}};EditorUi.prototype.getEmbeddedPng=function(a,b,c,d,f){try{var e=this.editor.graph,k=null!=e.themes&&"darkTheme"==e.defaultThemeName,g=null;if(null!=c&&0<c.length)e=this.createTemporaryGraph(this.editor.graph.getStylesheet()),document.body.appendChild(e.container),this.decodeNodeIntoGraph(this.editor.extractGraphModel(mxUtils.parseXml(c).documentElement,
-!0),e),g=c;else if(k||null!=this.pages&&this.currentPage!=this.pages[0]){var e=this.createTemporaryGraph(e.getStylesheet()),l=e.getGlobalVariable,m=this.pages[0];e.getGlobalVariable=function(a){return"page"==a?m.getName():"pagenumber"==a?1:l.apply(this,arguments)};document.body.appendChild(e.container);e.model.setRoot(m.root)}this.editor.exportToCanvas(mxUtils.bind(this,function(c){try{null==g&&(g=this.getFileData(!0,null,null,null,null,null,null,null,null,!1));var d=c.toDataURL("image/png"),d=Editor.writeGraphModelToPng(d,
+!0),e),g=c;else if(k||null!=this.pages&&this.currentPage!=this.pages[0]){var e=this.createTemporaryGraph(e.getStylesheet()),l=e.getGlobalVariable,n=this.pages[0];e.getGlobalVariable=function(a){return"page"==a?n.getName():"pagenumber"==a?1:l.apply(this,arguments)};document.body.appendChild(e.container);e.model.setRoot(n.root)}this.editor.exportToCanvas(mxUtils.bind(this,function(c){try{null==g&&(g=this.getFileData(!0,null,null,null,null,null,null,null,null,!1));var d=c.toDataURL("image/png"),d=Editor.writeGraphModelToPng(d,
"tEXt","mxfile",encodeURIComponent(g));a(d.substring(d.lastIndexOf(",")+1));e!=this.editor.graph&&e.container.parentNode.removeChild(e.container)}catch(A){null!=b&&b(A)}}),null,null,null,mxUtils.bind(this,function(a){null!=b&&b(a)}),null,null,d,null,e.shadowVisible,null,e,f)}catch(y){null!=b&&b(y)}};EditorUi.prototype.getEmbeddedSvg=function(a,b,c,d,f,g,m,t,v,z,y,x,A){t=null!=t?t:!0;m=null!=v?v:b.background;m==mxConstants.NONE&&(m=null);g=b.getSvg(m,z,y,null,null,g,null,null,null,b.shadowVisible||
x,null,A);(b.shadowVisible||x)&&b.addSvgShadow(g);null!=a&&g.setAttribute("content",a);null!=c&&g.setAttribute("resource",c);if(null!=f)this.embedFonts(g,mxUtils.bind(this,function(a){t?this.editor.convertImages(a,mxUtils.bind(this,function(a){f((d?"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+mxUtils.getXml(a))})):f((d?"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+
mxUtils.getXml(a))}));else return(d?"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+mxUtils.getXml(g)};EditorUi.prototype.embedFonts=function(a,b){this.editor.loadFonts(mxUtils.bind(this,function(){try{null!=this.editor.resolvedFontCss&&this.editor.addFontCss(a,this.editor.resolvedFontCss),this.editor.embedExtFonts(mxUtils.bind(this,function(e){try{null!=e&&this.editor.addFontCss(a,e),b(a)}catch(n){b(a)}}))}catch(l){b(a)}}))};
@@ -10646,12 +10649,12 @@ function(){c({message:JSON.parse(e.result).Message})},e.readAsText(m.response))}
var e=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportGraphML)try{this.doImportGraphML(a,b,c)}catch(p){c(p)}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportGraphML||this.loadingExtensions||this.isOffline(!0)?e():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",e))};EditorUi.prototype.exportVisio=function(a){var b=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof VsdxExport)try{(new VsdxExport(this)).exportCurrentDiagrams(a)||
this.handleError({message:mxResources.get("unknownError")})}catch(l){this.handleError(l)}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof VsdxExport||this.loadingExtensions||this.isOffline(!0)?b():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",b))};EditorUi.prototype.convertLucidChart=function(a,b,c){var e=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof window.LucidImporter){try{EditorUi.logEvent({category:"LUCIDCHART-IMPORT-FILE",
action:"size_"+a.length}),EditorUi.debug("convertLucidChart",a)}catch(p){}try{b(LucidImporter.importState(JSON.parse(a)))}catch(p){null!=window.console&&console.error(p),c(p)}}else c({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof window.LucidImporter||this.loadingExtensions||this.isOffline(!0)?window.setTimeout(e,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",e)})})})}):mxscript("js/extensions.min.js",e))};EditorUi.prototype.generateMermaidImage=function(a,b,c,d){var e=this,f=function(){try{this.loadingMermaid=!1,b=null!=b?b:EditorUi.defaultMermaidConfig,b.securityLevel="strict",b.startOnLoad=!1,mermaid.mermaidAPI.initialize(b),mermaid.mermaidAPI.render("geMermaidOutput-"+(new Date).getTime(),a,function(a){try{if(mxClient.IS_IE||mxClient.IS_IE11)a=
-a.replace(/ xmlns:\S*="http:\/\/www.w3.org\/XML\/1998\/namespace"/g,"").replace(/ (NS xml|\S*):space="preserve"/g,' xml:space="preserve"');var b=mxUtils.parseXml(a).getElementsByTagName("svg");if(0<b.length){var f=parseFloat(b[0].getAttribute("width")),k=parseFloat(b[0].getAttribute("height"));if(isNaN(f)||isNaN(k))try{var g=b[0].getAttribute("viewBox").split(/\s+/),f=parseFloat(g[2]),k=parseFloat(g[3])}catch(x){f=f||100,k=k||100}c(e.convertDataUri(Editor.createSvgDataUri(a)),f,k)}else d({message:mxResources.get("invalidInput")})}catch(x){d(x)}})}catch(u){d(u)}};
-"undefined"!==typeof mermaid||this.loadingMermaid||this.isOffline(!0)?f():(this.loadingMermaid=!0,"1"==urlParams.dev?mxscript("js/mermaid/mermaid.min.js",f):mxscript("js/extensions.min.js",f))};EditorUi.prototype.generatePlantUmlImage=function(a,b,c,d){function e(a,b,c){c1=a>>2;c2=(a&3)<<4|b>>4;c3=(b&15)<<2|c>>6;c4=c&63;r="";r+=f(c1&63);r+=f(c2&63);r+=f(c3&63);return r+=f(c4&63)}function f(a){if(10>a)return String.fromCharCode(48+a);a-=10;if(26>a)return String.fromCharCode(65+a);a-=26;if(26>a)return String.fromCharCode(97+
-a);a-=26;return 0==a?"-":1==a?"_":"?"}var k=new XMLHttpRequest;k.open("GET",("txt"==b?PLANT_URL+"/txt/":"png"==b?PLANT_URL+"/png/":PLANT_URL+"/svg/")+function(a){r="";for(i=0;i<a.length;i+=3)r=i+2==a.length?r+e(a.charCodeAt(i),a.charCodeAt(i+1),0):i+1==a.length?r+e(a.charCodeAt(i),0,0):r+e(a.charCodeAt(i),a.charCodeAt(i+1),a.charCodeAt(i+2));return r}(Graph.arrayBufferToString(pako.deflateRaw(a))),!0);"txt"!=b&&(k.responseType="blob");k.onload=function(a){if(200<=this.status&&300>this.status)if("txt"==
-b)c(this.response);else{var e=new FileReader;e.readAsDataURL(this.response);e.onloadend=function(a){var b=new Image;b.onload=function(){try{var a=b.width,f=b.height;if(0==a&&0==f){var k=e.result,g=k.indexOf(","),l=decodeURIComponent(escape(atob(k.substring(g+1)))),m=mxUtils.parseXml(l).getElementsByTagName("svg");0<m.length&&(a=parseFloat(m[0].getAttribute("width")),f=parseFloat(m[0].getAttribute("height")))}c(e.result,a,f)}catch(E){d(E)}};b.src=e.result};e.onerror=function(a){d(a)}}else d(a)};k.onerror=
-function(a){d(a)};k.send()};EditorUi.prototype.insertAsPreText=function(a,b,c){var e=this.editor.graph,d=null;e.getModel().beginUpdate();try{d=e.insertVertex(null,null,"<pre>"+a+"</pre>",b,c,1,1,"text;html=1;align=left;verticalAlign=top;"),e.updateCellSize(d,!0)}finally{e.getModel().endUpdate()}return d};EditorUi.prototype.insertTextAt=function(a,b,c,d,f,g,m,t){g=null!=g?g:!0;m=null!=m?m:!0;if(null!=a)if(Graph.fileSupport&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a))this.parseFile(new Blob([a.replace(/\s+/g,
+function(){mxscript("js/orgchart/OrgChart.Layout.min.js",function(){mxscript("js/orgchart/mxOrgChartLayout.js",e)})})})}):mxscript("js/extensions.min.js",e))};EditorUi.prototype.generateMermaidImage=function(a,b,c,d){var e=this,k=function(){try{this.loadingMermaid=!1,b=null!=b?b:EditorUi.defaultMermaidConfig,b.securityLevel="strict",b.startOnLoad=!1,mermaid.mermaidAPI.initialize(b),mermaid.mermaidAPI.render("geMermaidOutput-"+(new Date).getTime(),a,function(a){try{if(mxClient.IS_IE||mxClient.IS_IE11)a=
+a.replace(/ xmlns:\S*="http:\/\/www.w3.org\/XML\/1998\/namespace"/g,"").replace(/ (NS xml|\S*):space="preserve"/g,' xml:space="preserve"');var b=mxUtils.parseXml(a).getElementsByTagName("svg");if(0<b.length){var k=parseFloat(b[0].getAttribute("width")),f=parseFloat(b[0].getAttribute("height"));if(isNaN(k)||isNaN(f))try{var g=b[0].getAttribute("viewBox").split(/\s+/),k=parseFloat(g[2]),f=parseFloat(g[3])}catch(x){k=k||100,f=f||100}c(e.convertDataUri(Editor.createSvgDataUri(a)),k,f)}else d({message:mxResources.get("invalidInput")})}catch(x){d(x)}})}catch(u){d(u)}};
+"undefined"!==typeof mermaid||this.loadingMermaid||this.isOffline(!0)?k():(this.loadingMermaid=!0,"1"==urlParams.dev?mxscript("js/mermaid/mermaid.min.js",k):mxscript("js/extensions.min.js",k))};EditorUi.prototype.generatePlantUmlImage=function(a,b,c,d){function e(a,b,c){c1=a>>2;c2=(a&3)<<4|b>>4;c3=(b&15)<<2|c>>6;c4=c&63;r="";r+=k(c1&63);r+=k(c2&63);r+=k(c3&63);return r+=k(c4&63)}function k(a){if(10>a)return String.fromCharCode(48+a);a-=10;if(26>a)return String.fromCharCode(65+a);a-=26;if(26>a)return String.fromCharCode(97+
+a);a-=26;return 0==a?"-":1==a?"_":"?"}var f=new XMLHttpRequest;f.open("GET",("txt"==b?PLANT_URL+"/txt/":"png"==b?PLANT_URL+"/png/":PLANT_URL+"/svg/")+function(a){r="";for(i=0;i<a.length;i+=3)r=i+2==a.length?r+e(a.charCodeAt(i),a.charCodeAt(i+1),0):i+1==a.length?r+e(a.charCodeAt(i),0,0):r+e(a.charCodeAt(i),a.charCodeAt(i+1),a.charCodeAt(i+2));return r}(Graph.arrayBufferToString(pako.deflateRaw(a))),!0);"txt"!=b&&(f.responseType="blob");f.onload=function(a){if(200<=this.status&&300>this.status)if("txt"==
+b)c(this.response);else{var e=new FileReader;e.readAsDataURL(this.response);e.onloadend=function(a){var b=new Image;b.onload=function(){try{var a=b.width,k=b.height;if(0==a&&0==k){var f=e.result,g=f.indexOf(","),l=decodeURIComponent(escape(atob(f.substring(g+1)))),m=mxUtils.parseXml(l).getElementsByTagName("svg");0<m.length&&(a=parseFloat(m[0].getAttribute("width")),k=parseFloat(m[0].getAttribute("height")))}c(e.result,a,k)}catch(E){d(E)}};b.src=e.result};e.onerror=function(a){d(a)}}else d(a)};f.onerror=
+function(a){d(a)};f.send()};EditorUi.prototype.insertAsPreText=function(a,b,c){var e=this.editor.graph,d=null;e.getModel().beginUpdate();try{d=e.insertVertex(null,null,"<pre>"+a+"</pre>",b,c,1,1,"text;html=1;align=left;verticalAlign=top;"),e.updateCellSize(d,!0)}finally{e.getModel().endUpdate()}return d};EditorUi.prototype.insertTextAt=function(a,b,c,d,f,g,m,t){g=null!=g?g:!0;m=null!=m?m:!0;if(null!=a)if(Graph.fileSupport&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a))this.parseFile(new Blob([a.replace(/\s+/g,
" ")],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&200<=a.status&&299>=a.status&&this.editor.graph.setSelectionCells(this.insertTextAt(a.responseText,b,c,!0))}));else if("data:"==a.substring(0,5)||!this.isOffline()&&(f||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(a))){var e=this.editor.graph;if("data:application/pdf;base64,"==a.substring(0,28)){var k=Editor.extractGraphModelFromPdf(a);if(null!=k&&0<k.length)return this.importXml(k,b,c,g,!0,t)}if("data:image/png;base64,"==
a.substring(0,22)&&(k=this.extractGraphModelFromPng(a),null!=k&&0<k.length))return this.importXml(k,b,c,g,!0,t);if("data:image/svg+xml;"==a.substring(0,19))try{k=null;"data:image/svg+xml;base64,"==a.substring(0,26)?(k=a.substring(a.indexOf(",")+1),k=window.atob&&!mxClient.IS_SF?atob(k):Base64.decode(k,!0)):k=decodeURIComponent(a.substring(a.indexOf(",")+1));var l=this.importXml(k,b,c,g,!0,t);if(0<l.length)return l}catch(A){}this.loadImage(a,mxUtils.bind(this,function(d){if("data:"==a.substring(0,
5))this.resizeImage(d,a,mxUtils.bind(this,function(a,d,f){e.setSelectionCell(e.insertVertex(null,null,"",e.snap(b),e.snap(c),d,f,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(a)+";"))}),m,this.maxImageSize);else{var f=Math.min(1,Math.min(this.maxImageSize/d.width,this.maxImageSize/d.height)),k=Math.round(d.width*f);d=Math.round(d.height*f);e.setSelectionCell(e.insertVertex(null,null,"",e.snap(b),e.snap(c),
@@ -10671,8 +10674,8 @@ null,null!=x?mxEvent.isControlDown(x):null),v=!0)),v||(b=this.editor.graph,y=a.i
function(){var l=this.editor.graph,n=l.gridSize;f=null!=f?f:mxUtils.bind(this,function(a,b,c,d,f,k,g,l,m){try{return null!=a&&"<mxlibrary"==a.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,a,g)),null):this.importFile(a,b,c,d,f,k,g,l,m,e,x,A)}catch(ga){return this.handleError(ga),null}});g=null!=g?g:mxUtils.bind(this,function(a){l.setSelectionCells(a)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var p=a.length,q=p,u=[],E=mxUtils.bind(this,function(a,
b){u[a]=b;if(0==--q){this.spinner.stop();if(null!=t)t(u);else{var c=[];l.getModel().beginUpdate();try{for(var e=0;e<u.length;e++){var d=u[e]();null!=d&&(c=c.concat(d))}}finally{l.getModel().endUpdate()}}g(c)}}),B=0;B<p;B++)mxUtils.bind(this,function(e){var g=a[e];if(null!=g){var p=new FileReader;p.onload=mxUtils.bind(this,function(a){if(null==m||m(g))if("image/"==g.type.substring(0,6))if("image/svg"==g.type.substring(0,9)){var p=Graph.clipSvgDataUri(a.target.result),q=p.indexOf(","),A=decodeURIComponent(escape(atob(p.substring(q+
1)))),u=mxUtils.parseXml(A),A=u.getElementsByTagName("svg");if(0<A.length){var A=A[0],t=x?null:A.getAttribute("content");null!=t&&"<"!=t.charAt(0)&&"%"!=t.charAt(0)&&(t=unescape(window.atob?atob(t):Base64.decode(t,!0)));null!=t&&"%"==t.charAt(0)&&(t=decodeURIComponent(t));null==t||"<mxfile "!==t.substring(0,8)&&"<mxGraphModel "!==t.substring(0,14)?E(e,mxUtils.bind(this,function(){try{if(p.substring(0,q+1),null!=u){var a=u.getElementsByTagName("svg");if(0<a.length){var k=a[0],m=k.getAttribute("width"),
-x=k.getAttribute("height"),m=null!=m&&"%"!=m.charAt(m.length-1)?parseFloat(m):NaN,x=null!=x&&"%"!=x.charAt(x.length-1)?parseFloat(x):NaN,A=k.getAttribute("viewBox");if(null==A||0==A.length)k.setAttribute("viewBox","0 0 "+m+" "+x);else if(isNaN(m)||isNaN(x)){var t=A.split(" ");3<t.length&&(m=parseFloat(t[2]),x=parseFloat(t[3]))}p=Editor.createSvgDataUri(mxUtils.getXml(k));var E=Math.min(1,Math.min(d/Math.max(1,m)),d/Math.max(1,x)),z=f(p,g.type,b+e*n,c+e*n,Math.max(1,Math.round(m*E)),Math.max(1,Math.round(x*
-E)),g.name);if(isNaN(m)||isNaN(x)){var B=new Image;B.onload=mxUtils.bind(this,function(){m=Math.max(1,B.width);x=Math.max(1,B.height);z[0].geometry.width=m;z[0].geometry.height=x;k.setAttribute("viewBox","0 0 "+m+" "+x);p=Editor.createSvgDataUri(mxUtils.getXml(k));var a=p.indexOf(";");0<a&&(p=p.substring(0,a)+p.substring(p.indexOf(",",a+1)));l.setCellStyles("image",p,[z[0]])});B.src=Editor.createSvgDataUri(mxUtils.getXml(k))}return z}}}catch(ca){}return null})):E(e,mxUtils.bind(this,function(){return f(t,
+x=k.getAttribute("height"),m=null!=m&&"%"!=m.charAt(m.length-1)?parseFloat(m):NaN,x=null!=x&&"%"!=x.charAt(x.length-1)?parseFloat(x):NaN,A=k.getAttribute("viewBox");if(null==A||0==A.length)k.setAttribute("viewBox","0 0 "+m+" "+x);else if(isNaN(m)||isNaN(x)){var t=A.split(" ");3<t.length&&(m=parseFloat(t[2]),x=parseFloat(t[3]))}p=Editor.createSvgDataUri(mxUtils.getXml(k));var z=Math.min(1,Math.min(d/Math.max(1,m)),d/Math.max(1,x)),E=f(p,g.type,b+e*n,c+e*n,Math.max(1,Math.round(m*z)),Math.max(1,Math.round(x*
+z)),g.name);if(isNaN(m)||isNaN(x)){var B=new Image;B.onload=mxUtils.bind(this,function(){m=Math.max(1,B.width);x=Math.max(1,B.height);E[0].geometry.width=m;E[0].geometry.height=x;k.setAttribute("viewBox","0 0 "+m+" "+x);p=Editor.createSvgDataUri(mxUtils.getXml(k));var a=p.indexOf(";");0<a&&(p=p.substring(0,a)+p.substring(p.indexOf(",",a+1)));l.setCellStyles("image",p,[E[0]])});B.src=Editor.createSvgDataUri(mxUtils.getXml(k))}return E}}}catch(ca){}return null})):E(e,mxUtils.bind(this,function(){return f(t,
"text/xml",b+e*n,c+e*n,0,0,g.name)}))}else E(e,mxUtils.bind(this,function(){return null}))}else{A=!1;if("image/png"==g.type){var B=x?null:this.extractGraphModelFromPng(a.target.result);if(null!=B&&0<B.length){var v=new Image;v.src=a.target.result;E(e,mxUtils.bind(this,function(){return f(B,"text/xml",b+e*n,c+e*n,v.width,v.height,g.name)}));A=!0}}A||(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(a.target.result,mxUtils.bind(this,function(l){this.resizeImage(l,a.target.result,mxUtils.bind(this,function(a,l,m){E(e,mxUtils.bind(this,function(){if(null!=a&&a.length<z){var p=k&&this.isResampleImageSize(g.size,y)?Math.min(1,Math.min(d/l,d/m)):1;return f(a,g.type,b+e*n,c+e*n,Math.round(l*p),Math.round(m*p),g.name)}this.handleError({message:mxResources.get("imageTooBig")});
return null}))}),k,d,y,g.size)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else p=a.target.result,f(p,g.type,b+e*n,c+e*n,240,160,g.name,function(a){E(e,function(){return a})},g)});/(\.v(dx|sdx?))($|\?)/i.test(g.name)||/(\.vs(x|sx?))($|\?)/i.test(g.name)?f(null,g.type,b+e*n,c+e*n,240,160,g.name,function(a){E(e,function(){return a})},g):"image"==g.type.substring(0,5)||"application/pdf"==g.type?p.readAsDataURL(g):p.readAsText(g)}})(B)});if(l){l=
@@ -10680,33 +10683,33 @@ return null}))}),k,d,y,g.size)}),mxUtils.bind(this,function(){this.handleError({
function(a){d(a,!0)},function(a){d(a,!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):d(!1,e)};EditorUi.prototype.parseFile=function(a,b,c){c=null!=c?c:a.name;var e=new FormData;e.append("format","xml");e.append("upfile",a,c);var d=new XMLHttpRequest;d.open("POST",
OPEN_URL);d.onreadystatechange=function(){b(d)};d.send(e);try{EditorUi.logEvent({category:"GLIFFY-IMPORT-FILE",action:"size_"+a.size})}catch(q){}};EditorUi.prototype.isResampleImageSize=function(a,b){b=null!=b?b:this.resampleThreshold;return a>b};EditorUi.prototype.resizeImage=function(a,b,c,d,f,g,m){f=null!=f?f:this.maxImageSize;var e=Math.max(1,a.width),k=Math.max(1,a.height);if(d&&this.isResampleImageSize(null!=m?m:b.length,g))try{var l=Math.max(e/f,k/f);if(1<l){var n=Math.round(e/l),p=Math.round(k/
l),q=document.createElement("canvas");q.width=n;q.height=p;q.getContext("2d").drawImage(a,0,0,n,p);var u=q.toDataURL();if(u.length<b.length){var C=document.createElement("canvas");C.width=n;C.height=p;var D=C.toDataURL();u!==D&&(b=u,e=n,k=p)}}}catch(G){}c(b,e,k)};EditorUi.prototype.extractGraphModelFromPng=function(a){return Editor.extractGraphModelFromPng(a)};EditorUi.prototype.loadImage=function(a,b,c){try{var e=new Image;e.onload=function(){e.width=0<e.width?e.width:120;e.height=0<e.height?e.height:
-120;b(e)};null!=c&&(e.onerror=c);e.src=a}catch(p){if(null!=c)c(p);else throw p;}};var f=EditorUi.prototype.init;EditorUi.prototype.init=function(){mxStencilRegistry.allowEval=mxStencilRegistry.allowEval&&!this.isOfflineApp();"undefined"!==typeof window.mxSettings&&(this.formatWidth=mxSettings.getFormatWidth());var a=this,b=this.editor.graph;Editor.isDarkMode()&&(b.view.defaultGridColor=mxGraphView.prototype.defaultDarkGridColor);b.cellEditor.editPlantUmlData=function(c,e,d){var f=JSON.parse(d);e=
-new TextareaDialog(a,mxResources.get("plantUml")+":",f.data,function(e){null!=e&&a.spinner.spin(document.body,mxResources.get("inserting"))&&a.generatePlantUmlImage(e,f.format,function(d,g,k){a.spinner.stop();b.getModel().beginUpdate();try{if("txt"==f.format)b.labelChanged(c,"<pre>"+d+"</pre>"),b.updateCellSize(c,!0);else{b.setCellStyles("image",a.convertDataUri(d),[c]);var l=b.model.getGeometry(c);null!=l&&(l=l.clone(),l.width=g,l.height=k,b.cellsResized([c],[l],!1))}b.setAttributeForCell(c,"plantUmlData",
-JSON.stringify({data:e,format:f.format}))}finally{b.getModel().endUpdate()}},function(b){a.handleError(b)})},null,null,400,220);a.showDialog(e.container,420,300,!0,!0);e.init()};b.cellEditor.editMermaidData=function(c,e,d){var f=JSON.parse(d);e=new TextareaDialog(a,mxResources.get("mermaid")+":",f.data,function(e){null!=e&&a.spinner.spin(document.body,mxResources.get("inserting"))&&a.generateMermaidImage(e,f.config,function(d,g,k){a.spinner.stop();b.getModel().beginUpdate();try{b.setCellStyles("image",
-d,[c]);var l=b.model.getGeometry(c);null!=l&&(l=l.clone(),l.width=Math.max(l.width,g),l.height=Math.max(l.height,k),b.cellsResized([c],[l],!1));b.setAttributeForCell(c,"mermaidData",JSON.stringify({data:e,config:f.config},null,2))}finally{b.getModel().endUpdate()}},function(b){a.handleError(b)})},null,null,400,220);a.showDialog(e.container,420,300,!0,!0);e.init()};var c=b.cellEditor.startEditing;b.cellEditor.startEditing=function(e,d){try{var f=this.graph.getAttributeForCell(e,"plantUmlData");if(null!=
-f)this.editPlantUmlData(e,d,f);else if(f=this.graph.getAttributeForCell(e,"mermaidData"),null!=f)this.editMermaidData(e,d,f);else{var g=b.getCellStyle(e);"1"==mxUtils.getValue(g,"metaEdit","0")?a.showDataDialog(e):c.apply(this,arguments)}}catch(M){a.handleError(M)}};b.getLinkTitle=function(b){return a.getLinkTitle(b)};b.customLinkClicked=function(b){var c=!1;try{a.handleCustomLink(b),c=!0}catch(F){a.handleError(F)}return c};var d=b.parseBackgroundImage;b.parseBackgroundImage=function(a){var b=d.apply(this,
-arguments);null!=b&&null!=b.src&&Graph.isPageLink(b.src)&&(b={originalSrc:b.src});return b};var g=b.setBackgroundImage;b.setBackgroundImage=function(b){null!=b&&null!=b.originalSrc&&(b=a.createImageForPageLink(b.originalSrc));g.apply(this,arguments)};this.editor.addListener("pageRenamed",mxUtils.bind(this,function(){b.refreshBackgroundImage()}));this.editor.addListener("pageMoved",mxUtils.bind(this,function(){b.refreshBackgroundImage()}));this.editor.addListener("pagesPatched",mxUtils.bind(this,function(a,
-c){var e=null!=b.backgroundImage?b.backgroundImage.originalSrc:null;if(null!=e){var d=e.indexOf(",");if(0<d)for(var e=e.substring(d+1),d=c.getProperty("patches"),f=0;f<d.length;f++)if(null!=d[f][EditorUi.DIFF_UPDATE][e]){b.refreshBackgroundImage();b.view.validateBackgroundImage();break}}}));var m=b.getBackgroundImageObject;b.getBackgroundImageObject=function(a){var b=m.apply(this,arguments);null!=b&&null!=b.originalSrc&&(b={src:b.originalSrc,width:b.width,height:b.height});return b};var u=this.clearDefaultStyle;
-this.clearDefaultStyle=function(){u.apply(this,arguments)};this.isOffline()||"undefined"===typeof window.EditDataDialog||(EditDataDialog.placeholderHelpLink="https://www.diagrams.net/doc/faq/predefined-placeholders");if(/viewer\.diagrams\.net$/.test(window.location.hostname)||/embed\.diagrams\.net$/.test(window.location.hostname))this.editor.editBlankUrl="https://app.diagrams.net/";var t=a.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(a){a=null!=a?a:"";"1"==urlParams.dev&&(a+=(0<a.length?
-"&":"?")+"dev=1");return t.apply(this,arguments)};var v=b.addClickHandler;b.addClickHandler=function(a,c,e){var d=c;c=function(a,c){if(null==c){var e=mxEvent.getSource(a);"a"==e.nodeName.toLowerCase()&&(c=e.getAttribute("href"))}null!=c&&b.isCustomLink(c)&&(mxEvent.isTouchEvent(a)||!mxEvent.isPopupTrigger(a))&&b.customLinkClicked(c)&&mxEvent.consume(a);null!=d&&d(a,c)};v.call(this,a,c,e)};f.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(b.view.canvas.ownerSVGElement,null,!0);
-if(null!=this.menus){var z=Menus.prototype.addPopupMenuEditItems;this.menus.addPopupMenuEditItems=function(b,c,e){a.editor.graph.isSelectionEmpty()?z.apply(this,arguments):a.menus.addMenuItems(b,"delete - cut copy copyAsImage - duplicate".split(" "),null,e)}}a.actions.get("print").funct=function(){a.showDialog((new PrintDialog(a)).container,360,null!=a.pages&&1<a.pages.length?450:370,!0,!0)};this.defaultFilename=mxResources.get("untitledDiagram");var y=b.getExportVariables;b.getExportVariables=function(){var b=
-y.apply(this,arguments),c=a.getCurrentFile();null!=c&&(b.filename=c.getTitle());b.pagecount=null!=a.pages?a.pages.length:1;b.page=null!=a.currentPage?a.currentPage.getName():"";b.pagenumber=null!=a.pages&&null!=a.currentPage?mxUtils.indexOf(a.pages,a.currentPage)+1:1;return b};var x=b.getGlobalVariable;b.getGlobalVariable=function(b){var c=a.getCurrentFile();return"filename"==b&&null!=c?c.getTitle():"page"==b&&null!=a.currentPage?a.currentPage.getName():"pagenumber"==b?null!=a.currentPage&&null!=
-a.pages?mxUtils.indexOf(a.pages,a.currentPage)+1:1:"pagecount"==b?null!=a.pages?a.pages.length:1:x.apply(this,arguments)};var A=b.labelLinkClicked;b.labelLinkClicked=function(a,c,e){var d=c.getAttribute("href");if(null==d||!b.isCustomLink(d)||!mxEvent.isTouchEvent(e)&&mxEvent.isPopupTrigger(e))A.apply(this,arguments);else{if(!b.isEnabled()||null!=a&&b.isCellLocked(a.cell))b.customLinkClicked(d),b.getRubberband().reset();mxEvent.consume(e)}};this.editor.getOrCreateFilename=function(){var b=a.defaultFilename,
-c=a.getCurrentFile();null!=c&&(b=null!=c.getTitle()?c.getTitle():b);return b};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,"insertRectangle"),this.keyHandler.bindAction(75,!0,"insertEllipse",!0),this.altShiftActions[83]="synchronize",this.installImagePasteHandler(),this.installNativeClipboardHandler();this.spinner=this.createSpinner(null,null,24);Graph.fileSupport&&b.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(a){var c=b.cellEditor.text2,e=null;null!=c&&(mxEvent.addListener(c,"dragleave",function(a){null!=e&&(e.parentNode.removeChild(e),e=null);a.stopPropagation();a.preventDefault()}),mxEvent.addListener(c,
-"dragover",mxUtils.bind(this,function(a){null==e&&(!mxClient.IS_IE||10<document.documentMode)&&(e=this.highlightElement(c));a.stopPropagation();a.preventDefault()})),mxEvent.addListener(c,"drop",mxUtils.bind(this,function(a){null!=e&&(e.parentNode.removeChild(e),e=null);if(0<a.dataTransfer.files.length)this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,function(a,c,e,d,f,g){b.insertImage(a,f,g)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var b=0;b<a.length;b++)a[b]()},
+120;b(e)};null!=c&&(e.onerror=c);e.src=a}catch(p){if(null!=c)c(p);else throw p;}};var g=EditorUi.prototype.init;EditorUi.prototype.init=function(){mxStencilRegistry.allowEval=mxStencilRegistry.allowEval&&!this.isOfflineApp();"undefined"!==typeof window.mxSettings&&(this.formatWidth=mxSettings.getFormatWidth());var a=this,b=this.editor.graph;Editor.isDarkMode()&&(b.view.defaultGridColor=mxGraphView.prototype.defaultDarkGridColor);b.cellEditor.editPlantUmlData=function(c,e,d){var f=JSON.parse(d);e=
+new TextareaDialog(a,mxResources.get("plantUml")+":",f.data,function(e){null!=e&&a.spinner.spin(document.body,mxResources.get("inserting"))&&a.generatePlantUmlImage(e,f.format,function(d,k,g){a.spinner.stop();b.getModel().beginUpdate();try{if("txt"==f.format)b.labelChanged(c,"<pre>"+d+"</pre>"),b.updateCellSize(c,!0);else{b.setCellStyles("image",a.convertDataUri(d),[c]);var l=b.model.getGeometry(c);null!=l&&(l=l.clone(),l.width=k,l.height=g,b.cellsResized([c],[l],!1))}b.setAttributeForCell(c,"plantUmlData",
+JSON.stringify({data:e,format:f.format}))}finally{b.getModel().endUpdate()}},function(b){a.handleError(b)})},null,null,400,220);a.showDialog(e.container,420,300,!0,!0);e.init()};b.cellEditor.editMermaidData=function(c,e,d){var f=JSON.parse(d);e=new TextareaDialog(a,mxResources.get("mermaid")+":",f.data,function(e){null!=e&&a.spinner.spin(document.body,mxResources.get("inserting"))&&a.generateMermaidImage(e,f.config,function(d,k,g){a.spinner.stop();b.getModel().beginUpdate();try{b.setCellStyles("image",
+d,[c]);var l=b.model.getGeometry(c);null!=l&&(l=l.clone(),l.width=Math.max(l.width,k),l.height=Math.max(l.height,g),b.cellsResized([c],[l],!1));b.setAttributeForCell(c,"mermaidData",JSON.stringify({data:e,config:f.config},null,2))}finally{b.getModel().endUpdate()}},function(b){a.handleError(b)})},null,null,400,220);a.showDialog(e.container,420,300,!0,!0);e.init()};var c=b.cellEditor.startEditing;b.cellEditor.startEditing=function(e,d){try{var f=this.graph.getAttributeForCell(e,"plantUmlData");if(null!=
+f)this.editPlantUmlData(e,d,f);else if(f=this.graph.getAttributeForCell(e,"mermaidData"),null!=f)this.editMermaidData(e,d,f);else{var k=b.getCellStyle(e);"1"==mxUtils.getValue(k,"metaEdit","0")?a.showDataDialog(e):c.apply(this,arguments)}}catch(M){a.handleError(M)}};b.getLinkTitle=function(b){return a.getLinkTitle(b)};b.customLinkClicked=function(b){var c=!1;try{a.handleCustomLink(b),c=!0}catch(F){a.handleError(F)}return c};var d=b.parseBackgroundImage;b.parseBackgroundImage=function(a){var b=d.apply(this,
+arguments);null!=b&&null!=b.src&&Graph.isPageLink(b.src)&&(b={originalSrc:b.src});return b};var f=b.setBackgroundImage;b.setBackgroundImage=function(b){null!=b&&null!=b.originalSrc&&(b=a.createImageForPageLink(b.originalSrc));f.apply(this,arguments)};this.editor.addListener("pageRenamed",mxUtils.bind(this,function(){b.refreshBackgroundImage()}));this.editor.addListener("pageMoved",mxUtils.bind(this,function(){b.refreshBackgroundImage()}));this.editor.addListener("pagesPatched",mxUtils.bind(this,function(a,
+c){var e=null!=b.backgroundImage?b.backgroundImage.originalSrc:null;if(null!=e){var d=e.indexOf(",");if(0<d)for(var e=e.substring(d+1),d=c.getProperty("patches"),f=0;f<d.length;f++)if(null!=d[f][EditorUi.DIFF_UPDATE][e]){b.refreshBackgroundImage();b.view.validateBackgroundImage();break}}}));var m=b.getBackgroundImageObject;b.getBackgroundImageObject=function(a,b){var c=m.apply(this,arguments);null==c||null==c.originalSrc||b||(c={src:c.originalSrc});return c};var u=this.clearDefaultStyle;this.clearDefaultStyle=
+function(){u.apply(this,arguments)};this.isOffline()||"undefined"===typeof window.EditDataDialog||(EditDataDialog.placeholderHelpLink="https://www.diagrams.net/doc/faq/predefined-placeholders");if(/viewer\.diagrams\.net$/.test(window.location.hostname)||/embed\.diagrams\.net$/.test(window.location.hostname))this.editor.editBlankUrl="https://app.diagrams.net/";var t=a.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(a){a=null!=a?a:"";"1"==urlParams.dev&&(a+=(0<a.length?"&":"?")+"dev=1");
+return t.apply(this,arguments)};var v=b.addClickHandler;b.addClickHandler=function(a,c,e){var d=c;c=function(a,c){if(null==c){var e=mxEvent.getSource(a);"a"==e.nodeName.toLowerCase()&&(c=e.getAttribute("href"))}null!=c&&b.isCustomLink(c)&&(mxEvent.isTouchEvent(a)||!mxEvent.isPopupTrigger(a))&&b.customLinkClicked(c)&&mxEvent.consume(a);null!=d&&d(a,c)};v.call(this,a,c,e)};g.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(b.view.canvas.ownerSVGElement,null,!0);if(null!=this.menus){var z=
+Menus.prototype.addPopupMenuEditItems;this.menus.addPopupMenuEditItems=function(b,c,e){a.editor.graph.isSelectionEmpty()?z.apply(this,arguments):a.menus.addMenuItems(b,"delete - cut copy copyAsImage - duplicate".split(" "),null,e)}}a.actions.get("print").funct=function(){a.showDialog((new PrintDialog(a)).container,360,null!=a.pages&&1<a.pages.length?450:370,!0,!0)};this.defaultFilename=mxResources.get("untitledDiagram");var y=b.getExportVariables;b.getExportVariables=function(){var b=y.apply(this,
+arguments),c=a.getCurrentFile();null!=c&&(b.filename=c.getTitle());b.pagecount=null!=a.pages?a.pages.length:1;b.page=null!=a.currentPage?a.currentPage.getName():"";b.pagenumber=null!=a.pages&&null!=a.currentPage?mxUtils.indexOf(a.pages,a.currentPage)+1:1;return b};var x=b.getGlobalVariable;b.getGlobalVariable=function(b){var c=a.getCurrentFile();return"filename"==b&&null!=c?c.getTitle():"page"==b&&null!=a.currentPage?a.currentPage.getName():"pagenumber"==b?null!=a.currentPage&&null!=a.pages?mxUtils.indexOf(a.pages,
+a.currentPage)+1:1:"pagecount"==b?null!=a.pages?a.pages.length:1:x.apply(this,arguments)};var A=b.labelLinkClicked;b.labelLinkClicked=function(a,c,e){var d=c.getAttribute("href");if(null==d||!b.isCustomLink(d)||!mxEvent.isTouchEvent(e)&&mxEvent.isPopupTrigger(e))A.apply(this,arguments);else{if(!b.isEnabled()||null!=a&&b.isCellLocked(a.cell))b.customLinkClicked(d),b.getRubberband().reset();mxEvent.consume(e)}};this.editor.getOrCreateFilename=function(){var b=a.defaultFilename,c=a.getCurrentFile();
+null!=c&&(b=null!=c.getTitle()?c.getTitle():b);return b};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,"insertRectangle"),
+this.keyHandler.bindAction(75,!0,"insertEllipse",!0),this.altShiftActions[83]="synchronize",this.installImagePasteHandler(),this.installNativeClipboardHandler();this.spinner=this.createSpinner(null,null,24);Graph.fileSupport&&b.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(a){var c=b.cellEditor.text2,e=null;null!=c&&(mxEvent.addListener(c,"dragleave",function(a){null!=e&&(e.parentNode.removeChild(e),e=null);a.stopPropagation();a.preventDefault()}),mxEvent.addListener(c,"dragover",
+mxUtils.bind(this,function(a){null==e&&(!mxClient.IS_IE||10<document.documentMode)&&(e=this.highlightElement(c));a.stopPropagation();a.preventDefault()})),mxEvent.addListener(c,"drop",mxUtils.bind(this,function(a){null!=e&&(e.parentNode.removeChild(e),e=null);if(0<a.dataTransfer.files.length)this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,function(a,c,e,d,f,k){b.insertImage(a,f,k)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var b=0;b<a.length;b++)a[b]()},
mxEvent.isControlDown(a));else if(0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")){var c=a.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(c)?this.loadImage(decodeURIComponent(c),mxUtils.bind(this,function(a){var e=Math.max(1,a.width);a=Math.max(1,a.height);var d=this.maxImageSize,d=Math.min(1,Math.min(d/Math.max(1,e)),d/Math.max(1,a));b.insertImage(decodeURIComponent(c),e*d,a*d)})):document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/plain"))}else 0<=
mxUtils.indexOf(a.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(a.dataTransfer.types,"text/plain")&&document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/plain"));a.stopPropagation();a.preventDefault()})))}));"undefined"!==typeof window.mxSettings&&(B=this.editor.graph.view,B.setUnit(mxSettings.getUnit()),B.addListener("unitChanged",function(a,b){mxSettings.setUnit(b.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(a,b){if(0<this.editor.graph.getSelectionCount()){var c=this.editor.graph.getSelectionCell(),c=this.editor.graph.getModel().getStyle(c);
this.styleInput.value=c||"";this.styleInput.style.visibility="visible"}else this.styleInput.style.visibility="hidden"})));var C=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==this.styleInput?!0:C.apply(this,arguments)}}B=document.getElementById("geInfo");null!=B&&B.parentNode.removeChild(B);if(Graph.fileSupport&&(!this.editor.chromeless||this.editor.editable)){var D=null;mxEvent.addListener(b.container,"dragleave",function(a){b.isEnabled()&&(null!=D&&(D.parentNode.removeChild(D),
D=null),a.stopPropagation(),a.preventDefault())});mxEvent.addListener(b.container,"dragover",mxUtils.bind(this,function(a){null==D&&(!mxClient.IS_IE||10<document.documentMode)&&(D=this.highlightElement(b.container));null!=this.sidebar&&this.sidebar.hideTooltip();a.stopPropagation();a.preventDefault()}));mxEvent.addListener(b.container,"drop",mxUtils.bind(this,function(a){null!=D&&(D.parentNode.removeChild(D),D=null);if(b.isEnabled()){var c=mxUtils.convertPoint(b.container,mxEvent.getClientX(a),mxEvent.getClientY(a)),
-e=b.view.translate,d=b.view.scale,f=c.x/d-e.x,g=c.y/d-e.y;if(0<a.dataTransfer.files.length)mxEvent.isShiftDown(a)?this.openFiles(a.dataTransfer.files,!0):(mxEvent.isAltDown(a)&&(g=f=null),this.importFiles(a.dataTransfer.files,f,g,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(a),null,null,mxEvent.isShiftDown(a),a));else{mxEvent.isAltDown(a)&&(g=f=0);var k=0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")?a.dataTransfer.getData("text/uri-list"):null,c=this.extractGraphModelFromEvent(a,
-null!=this.pages);if(null!=c)b.setSelectionCells(this.importXml(c,f,g,!0));else if(0<=mxUtils.indexOf(a.dataTransfer.types,"text/html")){var l=a.dataTransfer.getData("text/html"),c=document.createElement("div");c.innerHTML=b.sanitizeHtml(l);var m=null,e=c.getElementsByTagName("img");null!=e&&1==e.length?(l=e[0].getAttribute("src"),null==l&&(l=e[0].getAttribute("srcset")),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(l)||(m=!0)):(e=c.getElementsByTagName("a"),null!=e&&1==e.length?l=e[0].getAttribute("href"):
-(c=c.getElementsByTagName("pre"),null!=c&&1==c.length&&(l=mxUtils.getTextContent(c[0]))));var n=!0,p=mxUtils.bind(this,function(){b.setSelectionCells(this.insertTextAt(l,f,g,!0,m,null,n,mxEvent.isControlDown(a)))});m&&null!=l&&l.length>this.resampleThreshold?this.confirmImageResize(function(a){n=a;p()},mxEvent.isControlDown(a)):p()}else null!=k&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(k)?this.loadImage(decodeURIComponent(k),mxUtils.bind(this,function(a){var c=Math.max(1,a.width);a=Math.max(1,a.height);
-var e=this.maxImageSize,e=Math.min(1,Math.min(e/Math.max(1,c)),e/Math.max(1,a));b.setSelectionCell(b.insertVertex(null,null,"",f,g,c*e,a*e,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+k+";"))}),mxUtils.bind(this,function(a){b.setSelectionCells(this.insertTextAt(k,f,g,!0))})):0<=mxUtils.indexOf(a.dataTransfer.types,"text/plain")&&b.setSelectionCells(this.insertTextAt(a.dataTransfer.getData("text/plain"),f,g,!0))}}a.stopPropagation();
-a.preventDefault()}),!1)}b.enableFlowAnimation=!0;this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();this.installSettings()};EditorUi.prototype.installImagePasteHandler=function(){if(!mxClient.IS_IE){var a=this.editor.graph;a.container.addEventListener("paste",mxUtils.bind(this,function(b){if(!mxEvent.isConsumed(b))try{for(var c=b.clipboardData||b.originalEvent.clipboardData,e=!1,d=0;d<c.types.length;d++)if("text/"===c.types[d].substring(0,5)){e=!0;break}if(!e){var f=c.items;for(index in f){var g=
-f[index];if("file"===g.kind){if(a.isEditing())this.importFiles([g.getAsFile()],0,0,this.maxImageSize,function(b,c,e,d,f,g){a.insertImage(b,f,g)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var b=0;b<a.length;b++)a[b]()});else{var k=this.editor.graph.getInsertPoint();this.importFiles([g.getAsFile()],k.x,k.y,this.maxImageSize);mxEvent.consume(b)}break}}}}catch(v){}}),!1)}};EditorUi.prototype.installNativeClipboardHandler=function(){function a(){window.setTimeout(function(){c.innerHTML=
+e=b.view.translate,d=b.view.scale,f=c.x/d-e.x,k=c.y/d-e.y;if(0<a.dataTransfer.files.length)mxEvent.isShiftDown(a)?this.openFiles(a.dataTransfer.files,!0):(mxEvent.isAltDown(a)&&(k=f=null),this.importFiles(a.dataTransfer.files,f,k,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(a),null,null,mxEvent.isShiftDown(a),a));else{mxEvent.isAltDown(a)&&(k=f=0);var g=0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")?a.dataTransfer.getData("text/uri-list"):null,c=this.extractGraphModelFromEvent(a,
+null!=this.pages);if(null!=c)b.setSelectionCells(this.importXml(c,f,k,!0));else if(0<=mxUtils.indexOf(a.dataTransfer.types,"text/html")){var l=a.dataTransfer.getData("text/html"),c=document.createElement("div");c.innerHTML=b.sanitizeHtml(l);var m=null,e=c.getElementsByTagName("img");null!=e&&1==e.length?(l=e[0].getAttribute("src"),null==l&&(l=e[0].getAttribute("srcset")),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(l)||(m=!0)):(e=c.getElementsByTagName("a"),null!=e&&1==e.length?l=e[0].getAttribute("href"):
+(c=c.getElementsByTagName("pre"),null!=c&&1==c.length&&(l=mxUtils.getTextContent(c[0]))));var n=!0,p=mxUtils.bind(this,function(){b.setSelectionCells(this.insertTextAt(l,f,k,!0,m,null,n,mxEvent.isControlDown(a)))});m&&null!=l&&l.length>this.resampleThreshold?this.confirmImageResize(function(a){n=a;p()},mxEvent.isControlDown(a)):p()}else null!=g&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(g)?this.loadImage(decodeURIComponent(g),mxUtils.bind(this,function(a){var c=Math.max(1,a.width);a=Math.max(1,a.height);
+var e=this.maxImageSize,e=Math.min(1,Math.min(e/Math.max(1,c)),e/Math.max(1,a));b.setSelectionCell(b.insertVertex(null,null,"",f,k,c*e,a*e,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+g+";"))}),mxUtils.bind(this,function(a){b.setSelectionCells(this.insertTextAt(g,f,k,!0))})):0<=mxUtils.indexOf(a.dataTransfer.types,"text/plain")&&b.setSelectionCells(this.insertTextAt(a.dataTransfer.getData("text/plain"),f,k,!0))}}a.stopPropagation();
+a.preventDefault()}),!1)}b.enableFlowAnimation=!0;this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();this.installSettings()};EditorUi.prototype.installImagePasteHandler=function(){if(!mxClient.IS_IE){var a=this.editor.graph;a.container.addEventListener("paste",mxUtils.bind(this,function(b){if(!mxEvent.isConsumed(b))try{for(var c=b.clipboardData||b.originalEvent.clipboardData,e=!1,d=0;d<c.types.length;d++)if("text/"===c.types[d].substring(0,5)){e=!0;break}if(!e){var f=c.items;for(index in f){var k=
+f[index];if("file"===k.kind){if(a.isEditing())this.importFiles([k.getAsFile()],0,0,this.maxImageSize,function(b,c,e,d,f,k){a.insertImage(b,f,k)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var b=0;b<a.length;b++)a[b]()});else{var g=this.editor.graph.getInsertPoint();this.importFiles([k.getAsFile()],g.x,g.y,this.maxImageSize);mxEvent.consume(b)}break}}}}catch(v){}}),!1)}};EditorUi.prototype.installNativeClipboardHandler=function(){function a(){window.setTimeout(function(){c.innerHTML=
"&nbsp;";c.focus();document.execCommand("selectAll",!1,null)},0)}var b=this.editor.graph,c=document.createElement("div");c.setAttribute("autocomplete","off");c.setAttribute("autocorrect","off");c.setAttribute("autocapitalize","off");c.setAttribute("spellcheck","false");c.style.textRendering="optimizeSpeed";c.style.fontFamily="monospace";c.style.wordBreak="break-all";c.style.background="transparent";c.style.color="transparent";c.style.position="absolute";c.style.whiteSpace="nowrap";c.style.overflow=
"hidden";c.style.display="block";c.style.fontSize="1";c.style.zIndex="-1";c.style.resize="none";c.style.outline="none";c.style.width="1px";c.style.height="1px";mxUtils.setOpacity(c,0);c.contentEditable=!0;c.innerHTML="&nbsp;";var d=!1;this.keyHandler.bindControlKey(88,null);this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86,null);mxEvent.addListener(document,"keydown",mxUtils.bind(this,function(a){var e=mxEvent.getSource(a);null==b.container||!b.isEnabled()||b.isMouseDown||
b.isEditing()||null!=this.dialog||"INPUT"==e.nodeName||"TEXTAREA"==e.nodeName||224!=a.keyCode&&(mxClient.IS_MAC||17!=a.keyCode)&&(!mxClient.IS_MAC||91!=a.keyCode&&93!=a.keyCode)||d||(c.style.left=b.container.scrollLeft+10+"px",c.style.top=b.container.scrollTop+10+"px",b.container.appendChild(c),d=!0,c.focus(),document.execCommand("selectAll",!1,null))}));mxEvent.addListener(document,"keyup",mxUtils.bind(this,function(a){var e=a.keyCode;window.setTimeout(mxUtils.bind(this,function(){!d||224!=e&&17!=
@@ -10756,13 +10759,13 @@ var q=1==k.enableRecent,t=1==k.enableSearch,u=1==k.enableCustomTemp;if("1"==urlP
null,q?mxUtils.bind(this,function(a,b,c){this.remoteInvoke("getRecentDiagrams",[c],null,a,b)}):null,t?mxUtils.bind(this,function(a,b,c,e){this.remoteInvoke("searchDiagrams",[a,e],null,b,c)}):null,mxUtils.bind(this,function(a,b,c){this.remoteInvoke("getFileContent",[a.url],null,b,c)}),null,u?mxUtils.bind(this,function(a){this.remoteInvoke("getCustomTemplates",null,null,a,function(){a({},0)})}):null,!1,!1,!0,!0);this.showDialog(v.container,window.innerWidth,window.innerHeight,!0,!1,null,!1,!0);return}n=
new NewDialog(this,!1,k.templatesOnly?!1:null!=k.callback,mxUtils.bind(this,function(b,c,e,d){b=b||this.emptyDiagramXml;null!=k.callback?g.postMessage(JSON.stringify({event:"template",xml:b,blank:b==this.emptyDiagramXml,name:c,tempUrl:e,libs:d,builtIn:!0,message:k}),"*"):(a(b,f,b!=this.emptyDiagramXml,k.toSketch),this.editor.modified||this.editor.setStatus(""))}),null,null,null,null,null,null,null,q?mxUtils.bind(this,function(a){this.remoteInvoke("getRecentDiagrams",[null],null,a,function(){a(null,
"Network Error!")})}):null,t?mxUtils.bind(this,function(a,b){this.remoteInvoke("searchDiagrams",[a,null],null,b,function(){b(null,"Network Error!")})}):null,mxUtils.bind(this,function(a,b,c){g.postMessage(JSON.stringify({event:"template",docUrl:a,info:b,name:c}),"*")}),null,null,u?mxUtils.bind(this,function(a){this.remoteInvoke("getCustomTemplates",null,null,a,function(){a({},0)})}):null,1==k.withoutType);this.showDialog(n.container,620,460,!0,!1,mxUtils.bind(this,function(a){this.sidebar.hideTooltip();
-a&&this.actions.get("exit").funct()}));n.init();return}if("textContent"==k.action){var K=this.getDiagramTextContent();g.postMessage(JSON.stringify({event:"textContent",data:K,message:k}),"*");return}if("status"==k.action){null!=k.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(k.messageKey))):null!=k.message&&this.editor.setStatus(mxUtils.htmlEntities(k.message));null!=k.modified&&(this.editor.modified=k.modified);return}if("spinner"==k.action){var M=null!=k.messageKey?mxResources.get(k.messageKey):
-k.message;null==k.show||k.show?this.spinner.spin(document.body,M):this.spinner.stop();return}if("export"==k.action){if("png"==k.format||"xmlpng"==k.format){if(null==k.spin&&null==k.spinKey||this.spinner.spin(document.body,null!=k.spinKey?mxResources.get(k.spinKey):k.spin)){var J=null!=k.xml?k.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var I=this.editor.graph,N=mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();var b=this.createLoadMessage("export");b.format=
-k.format;b.message=k;b.data=a;b.xml=J;g.postMessage(JSON.stringify(b),"*")}),H=mxUtils.bind(this,function(a){null==a&&(a=Editor.blankImage);"xmlpng"==k.format&&(a=Editor.writeGraphModelToPng(a,"tEXt","mxfile",encodeURIComponent(J)));I!=this.editor.graph&&I.container.parentNode.removeChild(I.container);N(a)}),L=k.pageId||(null!=this.pages?k.currentPage?this.currentPage.getId():this.pages[0].getId():null);if(this.isExportToCanvas()){null!=k.xml&&0<k.xml.length&&(c=!0,this.setFileData(J),c=!1);if(null!=
+a&&this.actions.get("exit").funct()}));n.init();return}if("textContent"==k.action){var J=this.getDiagramTextContent();g.postMessage(JSON.stringify({event:"textContent",data:J,message:k}),"*");return}if("status"==k.action){null!=k.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(k.messageKey))):null!=k.message&&this.editor.setStatus(mxUtils.htmlEntities(k.message));null!=k.modified&&(this.editor.modified=k.modified);return}if("spinner"==k.action){var M=null!=k.messageKey?mxResources.get(k.messageKey):
+k.message;null==k.show||k.show?this.spinner.spin(document.body,M):this.spinner.stop();return}if("export"==k.action){if("png"==k.format||"xmlpng"==k.format){if(null==k.spin&&null==k.spinKey||this.spinner.spin(document.body,null!=k.spinKey?mxResources.get(k.spinKey):k.spin)){var K=null!=k.xml?k.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var I=this.editor.graph,N=mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();var b=this.createLoadMessage("export");b.format=
+k.format;b.message=k;b.data=a;b.xml=K;g.postMessage(JSON.stringify(b),"*")}),H=mxUtils.bind(this,function(a){null==a&&(a=Editor.blankImage);"xmlpng"==k.format&&(a=Editor.writeGraphModelToPng(a,"tEXt","mxfile",encodeURIComponent(K)));I!=this.editor.graph&&I.container.parentNode.removeChild(I.container);N(a)}),L=k.pageId||(null!=this.pages?k.currentPage?this.currentPage.getId():this.pages[0].getId():null);if(this.isExportToCanvas()){null!=k.xml&&0<k.xml.length&&(c=!0,this.setFileData(K),c=!1);if(null!=
this.pages&&this.currentPage.getId()!=L){for(var V=I.getGlobalVariable,I=this.createTemporaryGraph(I.getStylesheet()),U,P=0;P<this.pages.length;P++)if(this.pages[P].getId()==L){U=this.updatePageRoot(this.pages[P]);break}null==U&&(U=this.currentPage);I.getGlobalVariable=function(a){return"page"==a?U.getName():"pagenumber"==a?1:V.apply(this,arguments)};document.body.appendChild(I.container);I.model.setRoot(U.root)}if(null!=k.layerIds){for(var W=I.model,ha=W.getChildCells(W.getRoot()),n={},P=0;P<k.layerIds.length;P++)n[k.layerIds[P]]=
!0;for(P=0;P<ha.length;P++)W.setVisible(ha[P],n[ha[P].id]||!1)}this.editor.exportToCanvas(mxUtils.bind(this,function(a){H(a.toDataURL("image/png"))}),k.width,null,k.background,mxUtils.bind(this,function(){H(null)}),null,null,k.scale,k.transparent,k.shadow,null,I,k.border,null,k.grid,k.keepTheme)}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==k.format?"1":"0")+(null!=L?"&pageId="+L:"")+(null!=k.layerIds&&0<k.layerIds.length?"&extras="+encodeURIComponent(JSON.stringify({layerIds:k.layerIds})):
-"")+(null!=k.scale?"&scale="+k.scale:"")+"&base64=1&xml="+encodeURIComponent(J))).send(mxUtils.bind(this,function(a){200<=a.getStatus()&&299>=a.getStatus()?N("data:image/png;base64,"+a.getText()):H(null)}),mxUtils.bind(this,function(){H(null)}))}}else{null!=k.xml&&0<k.xml.length&&(c=!0,this.setFileData(k.xml),c=!1);M=this.createLoadMessage("export");M.message=k;if("html2"==k.format||"html"==k.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length)){var ea=this.getXmlFileData();M.xml=
-mxUtils.getXml(ea);M.data=this.getFileData(null,null,!0,null,null,null,ea);M.format=k.format}else if("html"==k.format)J=this.editor.getGraphXml(),M.data=this.getHtml(J,this.editor.graph),M.xml=mxUtils.getXml(J),M.format=k.format;else{mxSvgCanvas2D.prototype.foAltText=null;var X=null!=k.background?k.background:this.editor.graph.background;X==mxConstants.NONE&&(X=null);M.xml=this.getFileData(!0,null,null,null,null,null,null,null,null,!1);M.format="svg";var Z=mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);
+"")+(null!=k.scale?"&scale="+k.scale:"")+"&base64=1&xml="+encodeURIComponent(K))).send(mxUtils.bind(this,function(a){200<=a.getStatus()&&299>=a.getStatus()?N("data:image/png;base64,"+a.getText()):H(null)}),mxUtils.bind(this,function(){H(null)}))}}else{null!=k.xml&&0<k.xml.length&&(c=!0,this.setFileData(k.xml),c=!1);M=this.createLoadMessage("export");M.message=k;if("html2"==k.format||"html"==k.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length)){var ea=this.getXmlFileData();M.xml=
+mxUtils.getXml(ea);M.data=this.getFileData(null,null,!0,null,null,null,ea);M.format=k.format}else if("html"==k.format)K=this.editor.getGraphXml(),M.data=this.getHtml(K,this.editor.graph),M.xml=mxUtils.getXml(K),M.format=k.format;else{mxSvgCanvas2D.prototype.foAltText=null;var X=null!=k.background?k.background:this.editor.graph.background;X==mxConstants.NONE&&(X=null);M.xml=this.getFileData(!0,null,null,null,null,null,null,null,null,!1);M.format="svg";var Z=mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);
this.spinner.stop();M.data=Editor.createSvgDataUri(a);g.postMessage(JSON.stringify(M),"*")});if("xmlsvg"==k.format)(null==k.spin&&null==k.spinKey||this.spinner.spin(document.body,null!=k.spinKey?mxResources.get(k.spinKey):k.spin))&&this.getEmbeddedSvg(M.xml,this.editor.graph,null,!0,Z,null,null,k.embedImages,X,k.scale,k.border,k.shadow,k.keepTheme);else if(null==k.spin&&null==k.spinKey||this.spinner.spin(document.body,null!=k.spinKey?mxResources.get(k.spinKey):k.spin)){this.editor.graph.setEnabled(!1);
var Y=this.editor.graph.getSvg(X,k.scale,k.border,null,null,null,null,null,null,this.editor.graph.shadowVisible||k.shadow,null,k.keepTheme);(this.editor.graph.shadowVisible||k.shadow)&&this.editor.graph.addSvgShadow(Y);this.embedFonts(Y,mxUtils.bind(this,function(a){k.embedImages||null==k.embedImages?this.editor.convertImages(a,mxUtils.bind(this,function(a){Z(mxUtils.getXml(a))})):Z(mxUtils.getXml(a))}))}return}g.postMessage(JSON.stringify(M),"*")}return}if("load"==k.action){m=k.toSketch;e=1==k.autosave;
this.hideDialog();null!=k.modified&&null==urlParams.modified&&(urlParams.modified=k.modified);null!=k.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=k.saveAndExit);null!=k.noSaveBtn&&null==urlParams.noSaveBtn&&(urlParams.noSaveBtn=k.noSaveBtn);null!=k.noExitBtn&&null==urlParams.noExitBtn&&(urlParams.noExitBtn=k.noExitBtn);null!=k.title&&null!=this.buttonContainer&&(p=document.createElement("span"),mxUtils.write(p,k.title),"atlas"==uiTheme?(this.buttonContainer.style.paddingRight=
@@ -10778,27 +10781,27 @@ var c=b;if("1"==urlParams.noSaveBtn){if("0"!=urlParams.saveAndExit){var d="1"==u
a.appendChild(b),"1"==urlParams.saveAndExit&&(b=document.createElement("a"),mxUtils.write(b,mxResources.get("saveAndExit")),b.setAttribute("title",mxResources.get("saveAndExit")),b.className="geBigButton geBigStandardButton",b.style.marginLeft="6px",mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),a.appendChild(b),c=b);"1"!=urlParams.noExitBtn&&(b=document.createElement("a"),c="1"==urlParams.publishClose?mxResources.get("close"):mxResources.get("exit"),
mxUtils.write(b,c),b.setAttribute("title",c),b.className="geBigButton geBigStandardButton",b.style.marginLeft="6px",mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()})),a.appendChild(b),c=b);c.style.marginRight="20px";this.toolbar.container.appendChild(a);this.toolbar.staticElements.push(a);a.style.right="atlas"!=uiTheme?"52px":"42px"}};EditorUi.prototype.showImportCsvDialog=function(){null==this.importCsvDialog&&(this.importCsvDialog=new TextareaDialog(this,
mxResources.get("csv")+":",Editor.defaultCsvValue,mxUtils.bind(this,function(a){this.importCsv(a)}),null,null,620,430,null,!0,!0,mxResources.get("import"),this.isOffline()?null:"https://drawio-app.com/import-from-csv-to-drawio/"));this.showDialog(this.importCsvDialog.container,640,520,!0,!0,null,null,null,null,!0);this.importCsvDialog.init()};EditorUi.prototype.executeLayoutList=function(a,b){for(var c=this.editor.graph,e=c.getSelectionCells(),d=0;d<a.length;d++){var f=new window[a[d].layout](c);
-if(null!=a[d].config)for(var g in a[d].config)f[g]=a[d].config[g];this.executeLayout(function(){f.execute(c.getDefaultParent(),0==e.length?null:e)},d==a.length-1,b)}};EditorUi.prototype.importCsv=function(a,b){try{var c=a.split("\n"),e=[],d=[],f={};if(0<c.length){var g={},k=null,m=null,z=null,y=null,x=null,A=null,B=null,C=null,D=null,G="",E="auto",F="auto",K=null,M=null,J=40,I=40,N=100,H=0,L=this.editor.graph;L.getGraphBounds();for(var V=function(){null!=b?b(ia):(L.setSelectionCells(ia),L.scrollCellToVisible(L.getSelectionCell()))},
+if(null!=a[d].config)for(var g in a[d].config)f[g]=a[d].config[g];this.executeLayout(function(){f.execute(c.getDefaultParent(),0==e.length?null:e)},d==a.length-1,b)}};EditorUi.prototype.importCsv=function(a,b){try{var c=a.split("\n"),e=[],d=[],f={};if(0<c.length){var g={},k=null,m=null,z=null,y=null,x=null,A=null,B=null,C=null,D=null,G="",E="auto",F="auto",J=null,M=null,K=40,I=40,N=100,H=0,L=this.editor.graph;L.getGraphBounds();for(var V=function(){null!=b?b(ia):(L.setSelectionCells(ia),L.scrollCellToVisible(L.getSelectionCell()))},
U=L.getFreeInsertPoint(),P=U.x,W=U.y,U=W,ha=null,ea="auto",D=null,X=[],Z=null,Y=null,ga=0;ga<c.length&&"#"==c[ga].charAt(0);){a=c[ga];for(ga++;ga<c.length&&"\\"==a.charAt(a.length-1)&&"#"==c[ga].charAt(0);)a=a.substring(0,a.length-1)+mxUtils.trim(c[ga].substring(1)),ga++;if("#"!=a.charAt(1)){var ba=a.indexOf(":");if(0<ba){var O=mxUtils.trim(a.substring(1,ba)),Q=mxUtils.trim(a.substring(ba+1));"label"==O?ha=L.sanitizeHtml(Q):"labelname"==O&&0<Q.length&&"-"!=Q?x=Q:"labels"==O&&0<Q.length&&"-"!=Q?A=
-JSON.parse(Q):"style"==O?m=Q:"parentstyle"==O?B=Q:"stylename"==O&&0<Q.length&&"-"!=Q?y=Q:"styles"==O&&0<Q.length&&"-"!=Q?z=JSON.parse(Q):"vars"==O&&0<Q.length&&"-"!=Q?k=JSON.parse(Q):"identity"==O&&0<Q.length&&"-"!=Q?C=Q:"parent"==O&&0<Q.length&&"-"!=Q?D=Q:"namespace"==O&&0<Q.length&&"-"!=Q?G=Q:"width"==O?E=Q:"height"==O?F=Q:"left"==O&&0<Q.length?K=Q:"top"==O&&0<Q.length?M=Q:"ignore"==O?Y=Q.split(","):"connect"==O?X.push(JSON.parse(Q)):"link"==O?Z=Q:"padding"==O?H=parseFloat(Q):"edgespacing"==O?J=
+JSON.parse(Q):"style"==O?m=Q:"parentstyle"==O?B=Q:"stylename"==O&&0<Q.length&&"-"!=Q?y=Q:"styles"==O&&0<Q.length&&"-"!=Q?z=JSON.parse(Q):"vars"==O&&0<Q.length&&"-"!=Q?k=JSON.parse(Q):"identity"==O&&0<Q.length&&"-"!=Q?C=Q:"parent"==O&&0<Q.length&&"-"!=Q?D=Q:"namespace"==O&&0<Q.length&&"-"!=Q?G=Q:"width"==O?E=Q:"height"==O?F=Q:"left"==O&&0<Q.length?J=Q:"top"==O&&0<Q.length?M=Q:"ignore"==O?Y=Q.split(","):"connect"==O?X.push(JSON.parse(Q)):"link"==O?Z=Q:"padding"==O?H=parseFloat(Q):"edgespacing"==O?K=
parseFloat(Q):"nodespacing"==O?I=parseFloat(Q):"levelspacing"==O?N=parseFloat(Q):"layout"==O&&(ea=Q)}}}if(null==c[ga])throw Error(mxResources.get("invalidOrMissingFile"));for(var ma=this.editor.csvToArray(c[ga]),O=ba=null,Q=[],T=0;T<ma.length;T++)C==ma[T]&&(ba=T),D==ma[T]&&(O=T),Q.push(mxUtils.trim(ma[T]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,""));null==ha&&(ha="%"+Q[0]+"%");if(null!=X)for(var fa=0;fa<X.length;fa++)null==g[X[fa].to]&&(g[X[fa].to]={});C=[];for(T=ga+1;T<c.length;T++){var ja=
this.editor.csvToArray(c[T]);if(null==ja){var na=40<c[T].length?c[T].substring(0,40)+"...":c[T];throw Error(na+" ("+T+"):\n"+mxResources.get("containsValidationErrors"));}0<ja.length&&C.push(ja)}L.model.beginUpdate();try{for(T=0;T<C.length;T++){var ja=C[T],S=null,aa=null!=ba?G+ja[ba]:null;null!=aa&&(S=L.model.getCell(aa));var c=null!=S,ca=new mxCell(ha,new mxGeometry(P,U,0,0),m||"whiteSpace=wrap;html=1;");ca.vertex=!0;ca.id=aa;for(var da=0;da<ja.length;da++)L.setAttributeForCell(ca,Q[da],ja[da]);
if(null!=x&&null!=A){var qa=A[ca.getAttribute(x)];null!=qa&&L.labelChanged(ca,qa)}if(null!=y&&null!=z){var oa=z[ca.getAttribute(y)];null!=oa&&(ca.style=oa)}L.setAttributeForCell(ca,"placeholders","1");ca.style=L.replacePlaceholders(ca,ca.style,k);c&&(L.model.setGeometry(S,ca.geometry),L.model.setStyle(S,ca.style),0>mxUtils.indexOf(d,S)&&d.push(S));S=ca;if(!c)for(fa=0;fa<X.length;fa++)g[X[fa].to][S.getAttribute(X[fa].to)]=S;null!=Z&&"link"!=Z&&(L.setLinkForCell(S,S.getAttribute(Z)),L.setAttributeForCell(S,
-Z,null));L.fireEvent(new mxEventObject("cellsInserted","cells",[S]));var ka=this.editor.graph.getPreferredSizeForCell(S);S.vertex&&(null!=K&&null!=S.getAttribute(K)&&(S.geometry.x=P+parseFloat(S.getAttribute(K))),null!=M&&null!=S.getAttribute(M)&&(S.geometry.y=W+parseFloat(S.getAttribute(M))),"@"==E.charAt(0)&&null!=S.getAttribute(E.substring(1))?S.geometry.width=parseFloat(S.getAttribute(E.substring(1))):S.geometry.width="auto"==E?ka.width+H:parseFloat(E),"@"==F.charAt(0)&&null!=S.getAttribute(F.substring(1))?
+Z,null));L.fireEvent(new mxEventObject("cellsInserted","cells",[S]));var ka=this.editor.graph.getPreferredSizeForCell(S);S.vertex&&(null!=J&&null!=S.getAttribute(J)&&(S.geometry.x=P+parseFloat(S.getAttribute(J))),null!=M&&null!=S.getAttribute(M)&&(S.geometry.y=W+parseFloat(S.getAttribute(M))),"@"==E.charAt(0)&&null!=S.getAttribute(E.substring(1))?S.geometry.width=parseFloat(S.getAttribute(E.substring(1))):S.geometry.width="auto"==E?ka.width+H:parseFloat(E),"@"==F.charAt(0)&&null!=S.getAttribute(F.substring(1))?
S.geometry.height=parseFloat(S.getAttribute(F.substring(1))):S.geometry.height="auto"==F?ka.height+H:parseFloat(F),U+=S.geometry.height+I);c?(null==f[aa]&&(f[aa]=[]),f[aa].push(S)):(D=null!=O?L.model.getCell(G+ja[O]):null,e.push(S),null!=D?(D.style=L.replacePlaceholders(D,B,k),L.addCell(S,D)):d.push(L.addCell(S)))}for(var pa=d.slice(),ia=d.slice(),fa=0;fa<X.length;fa++)for(var ra=X[fa],T=0;T<e.length;T++){var S=e[T],wa=mxUtils.bind(this,function(a,b,c){var e=b.getAttribute(c.from);if(null!=e&&(L.setAttributeForCell(b,
c.from,null),""!=e))for(var e=e.split(","),d=0;d<e.length;d++){var f=g[c.to][e[d]];if(null!=f){var l=c.label;null!=c.fromlabel&&(l=(b.getAttribute(c.fromlabel)||"")+(l||""));null!=c.sourcelabel&&(l=L.replacePlaceholders(b,c.sourcelabel,k)+(l||""));null!=c.tolabel&&(l=(l||"")+(f.getAttribute(c.tolabel)||""));null!=c.targetlabel&&(l=(l||"")+L.replacePlaceholders(f,c.targetlabel,k));var m="target"==c.placeholders==!c.invert?f:a,m=null!=c.style?L.replacePlaceholders(m,c.style,k):L.createCurrentEdgeStyle(),
l=L.insertEdge(null,null,l||"",c.invert?f:a,c.invert?a:f,m);if(null!=c.labels)for(m=0;m<c.labels.length;m++){var n=c.labels[m],x=new mxCell(n.label||m,new mxGeometry(null!=n.x?n.x:0,null!=n.y?n.y:0,0,0),"resizable=0;html=1;");x.vertex=!0;x.connectable=!1;x.geometry.relative=!0;null!=n.placeholders&&(x.value=L.replacePlaceholders("target"==n.placeholders==!c.invert?f:a,x.value,k));if(null!=n.dx||null!=n.dy)x.geometry.offset=new mxPoint(null!=n.dx?n.dx:0,null!=n.dy?n.dy:0);l.insert(x)}ia.push(l);mxUtils.remove(c.invert?
-a:f,pa)}}});wa(S,S,ra);if(null!=f[S.id])for(da=0;da<f[S.id].length;da++)wa(S,f[S.id][da],ra)}if(null!=Y)for(T=0;T<e.length;T++)for(S=e[T],da=0;da<Y.length;da++)L.setAttributeForCell(S,mxUtils.trim(Y[da]),null);if(0<d.length){var R=new mxParallelEdgeLayout(L);R.spacing=J;R.checkOverlap=!0;var ta=function(){0<R.spacing&&R.execute(L.getDefaultParent());for(var a=0;a<d.length;a++){var b=L.getCellGeometry(d[a]);b.x=Math.round(L.snap(b.x));b.y=Math.round(L.snap(b.y));"auto"==E&&(b.width=Math.round(L.snap(b.width)));
+a:f,pa)}}});wa(S,S,ra);if(null!=f[S.id])for(da=0;da<f[S.id].length;da++)wa(S,f[S.id][da],ra)}if(null!=Y)for(T=0;T<e.length;T++)for(S=e[T],da=0;da<Y.length;da++)L.setAttributeForCell(S,mxUtils.trim(Y[da]),null);if(0<d.length){var R=new mxParallelEdgeLayout(L);R.spacing=K;R.checkOverlap=!0;var ta=function(){0<R.spacing&&R.execute(L.getDefaultParent());for(var a=0;a<d.length;a++){var b=L.getCellGeometry(d[a]);b.x=Math.round(L.snap(b.x));b.y=Math.round(L.snap(b.y));"auto"==E&&(b.width=Math.round(L.snap(b.width)));
"auto"==F&&(b.height=Math.round(L.snap(b.height)))}};if("["==ea.charAt(0)){var la=V;L.view.validate();this.executeLayoutList(JSON.parse(ea),function(){ta();la()});V=null}else if("circle"==ea){var ua=new mxCircleLayout(L);ua.disableEdgeStyle=!1;ua.resetEdges=!1;var va=ua.isVertexIgnored;ua.isVertexIgnored=function(a){return va.apply(this,arguments)||0>mxUtils.indexOf(d,a)};this.executeLayout(function(){ua.execute(L.getDefaultParent());ta()},!0,V);V=null}else if("horizontaltree"==ea||"verticaltree"==
ea||"auto"==ea&&ia.length==2*d.length-1&&1==pa.length){L.view.validate();var ya=new mxCompactTreeLayout(L,"horizontaltree"==ea);ya.levelDistance=I;ya.edgeRouting=!1;ya.resetEdges=!1;this.executeLayout(function(){ya.execute(L.getDefaultParent(),0<pa.length?pa[0]:null)},!0,V);V=null}else if("horizontalflow"==ea||"verticalflow"==ea||"auto"==ea&&1==pa.length){L.view.validate();var xa=new mxHierarchicalLayout(L,"horizontalflow"==ea?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);xa.intraCellSpacing=
-I;xa.parallelEdgeSpacing=J;xa.interRankCellSpacing=N;xa.disableEdgeStyle=!1;this.executeLayout(function(){xa.execute(L.getDefaultParent(),ia);L.moveCells(ia,P,W)},!0,V);V=null}else if("organic"==ea||"auto"==ea&&ia.length>d.length){L.view.validate();var sa=new mxFastOrganicLayout(L);sa.forceConstant=3*I;sa.disableEdgeStyle=!1;sa.resetEdges=!1;var za=sa.isVertexIgnored;sa.isVertexIgnored=function(a){return za.apply(this,arguments)||0>mxUtils.indexOf(d,a)};this.executeLayout(function(){sa.execute(L.getDefaultParent());
+I;xa.parallelEdgeSpacing=K;xa.interRankCellSpacing=N;xa.disableEdgeStyle=!1;this.executeLayout(function(){xa.execute(L.getDefaultParent(),ia);L.moveCells(ia,P,W)},!0,V);V=null}else if("organic"==ea||"auto"==ea&&ia.length>d.length){L.view.validate();var sa=new mxFastOrganicLayout(L);sa.forceConstant=3*I;sa.disableEdgeStyle=!1;sa.resetEdges=!1;var za=sa.isVertexIgnored;sa.isVertexIgnored=function(a){return za.apply(this,arguments)||0>mxUtils.indexOf(d,a)};this.executeLayout(function(){sa.execute(L.getDefaultParent());
ta()},!0,V);V=null}}this.hideDialog()}finally{L.model.endUpdate()}null!=V&&V()}}catch(Aa){this.handleError(Aa)}};EditorUi.prototype.getSearch=function(a){var b="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=a&&0<window.location.search.length){var c="?",e;for(e in urlParams)0>mxUtils.indexOf(a,e)&&null!=urlParams[e]&&(b+=c+e+"="+urlParams[e],c="&")}else b=window.location.search;return b};EditorUi.prototype.getUrl=function(a){a=null!=a?a:window.location.pathname;var b=0<a.indexOf("?")?1:0;
if("1"==urlParams.offline)a+=window.location.search;else{var c="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "),e;for(e in urlParams)0>mxUtils.indexOf(c,e)&&(a=0==b?a+"?":a+"&",null!=urlParams[e]&&(a+=e+"="+urlParams[e],b++))}return a};EditorUi.prototype.showLinkDialog=function(a,b,c,d,f){a=new LinkDialog(this,a,b,c,!0,d,f);this.showDialog(a.container,560,130,!0,!0);a.init()};EditorUi.prototype.getServiceCount=function(a){var b=1;null==this.drive&&
"function"!==typeof window.DriveClient||b++;null==this.dropbox&&"function"!==typeof window.DropboxClient||b++;null==this.oneDrive&&"function"!==typeof window.OneDriveClient||b++;null!=this.gitHub&&b++;null!=this.gitLab&&b++;null!=this.notion&&b++;a&&isLocalStorage&&"1"==urlParams.browser&&b++;return b};EditorUi.prototype.updateUi=function(){this.updateButtonContainer();this.updateActionStates();var a=this.getCurrentFile(),b=null!=a||"1"==urlParams.embed&&this.editor.graph.isEnabled();this.menus.get("viewPanels").setEnabled(b);
this.menus.get("viewZoom").setEnabled(b);var c=("1"!=urlParams.embed||!this.editor.graph.isEnabled())&&(null==a||a.isRestricted());this.actions.get("makeCopy").setEnabled(!c);this.actions.get("print").setEnabled(!c);this.menus.get("exportAs").setEnabled(!c);this.menus.get("embed").setEnabled(!c);c="1"!=urlParams.embed||this.editor.graph.isEnabled();this.menus.get("extras").setEnabled(c);Editor.enableCustomLibraries&&(this.menus.get("openLibraryFrom").setEnabled(c),this.menus.get("newLibrary").setEnabled(c));
a="1"==urlParams.embed&&this.editor.graph.isEnabled()||null!=a&&a.isEditable();this.actions.get("image").setEnabled(b);this.actions.get("zoomIn").setEnabled(b);this.actions.get("zoomOut").setEnabled(b);this.actions.get("resetView").setEnabled(b);this.actions.get("undo").setEnabled(this.canUndo()&&a);this.actions.get("redo").setEnabled(this.canRedo()&&a);this.menus.get("edit").setEnabled(b);this.menus.get("view").setEnabled(b);this.menus.get("importFrom").setEnabled(a);this.menus.get("arrange").setEnabled(a);
null!=this.toolbar&&(null!=this.toolbar.edgeShapeMenu&&this.toolbar.edgeShapeMenu.setEnabled(a),null!=this.toolbar.edgeStyleMenu&&this.toolbar.edgeStyleMenu.setEnabled(a));this.updateUserElement()};EditorUi.prototype.updateButtonContainer=function(){};EditorUi.prototype.updateUserElement=function(){};EditorUi.prototype.scheduleSanityCheck=function(){};EditorUi.prototype.stopSanityCheck=function(){};EditorUi.prototype.isDiagramActive=function(){var a=this.getCurrentFile();return null!=a&&a.isEditable()||
-"1"==urlParams.embed&&this.editor.graph.isEnabled()};var g=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){g.apply(this,arguments);var a=this.editor.graph,b=this.getCurrentFile(),c=this.isDiagramActive(),d=a.getEditableCells(a.getSelectionCells());this.actions.get("pageSetup").setEnabled(c);this.actions.get("autosave").setEnabled(null!=b&&b.isEditable()&&b.isAutosaveOptional());this.actions.get("guides").setEnabled(c);this.actions.get("editData").setEnabled(0<
+"1"==urlParams.embed&&this.editor.graph.isEnabled()};var f=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){f.apply(this,arguments);var a=this.editor.graph,b=this.getCurrentFile(),c=this.isDiagramActive(),d=a.getEditableCells(a.getSelectionCells());this.actions.get("pageSetup").setEnabled(c);this.actions.get("autosave").setEnabled(null!=b&&b.isEditable()&&b.isAutosaveOptional());this.actions.get("guides").setEnabled(c);this.actions.get("editData").setEnabled(0<
d.length||a.isSelectionEmpty());this.actions.get("shadowVisible").setEnabled(c);this.actions.get("connectionArrows").setEnabled(c);this.actions.get("connectionPoints").setEnabled(c);this.actions.get("copyStyle").setEnabled(c&&!a.isSelectionEmpty());this.actions.get("pasteStyle").setEnabled(c&&0<d.length);this.actions.get("editGeometry").setEnabled(0<d.length&&a.getModel().isVertex(d[0]));this.actions.get("createShape").setEnabled(c);this.actions.get("createRevision").setEnabled(c);this.actions.get("moveToFolder").setEnabled(null!=
b);this.actions.get("makeCopy").setEnabled(null!=b&&!b.isRestricted());this.actions.get("editDiagram").setEnabled(c&&(null==b||!b.isRestricted()));this.actions.get("publishLink").setEnabled(null!=b&&!b.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!=
b&&b.isRenamable()||"1"==urlParams.embed);this.actions.get("close").setEnabled(null!=b);this.menus.get("publish").setEnabled(null!=b&&!b.isRestricted());b=this.actions.get("findReplace");b.setEnabled("hidden"!=this.diagramContainer.style.visibility);b.label=mxResources.get("find")+(a.isEnabled()?"/"+mxResources.get("replace"):"")+"...";a=a.view.getState(a.getSelectionCell());this.actions.get("editShape").setEnabled(c&&null!=a&&null!=a.shape&&null!=a.shape.stencil)};var m=EditorUi.prototype.destroy;
@@ -10817,9 +10820,9 @@ b){var c=mxUtils.bind(this,function(b,c){var d={event:"remoteInvokeResponse",msg
(k=[]);if(e.isAsync)k.push(function(){c(Array.prototype.slice.apply(arguments))}),k.push(function(a){c(null,a||"Unkown Error")}),this[d].apply(this,k);else{var m=this[d].apply(this,k);c([m])}}else c(null,"Invalid Call: "+d+" is not found.")}catch(z){c(null,"Invalid Call: An error occurred, "+z.message)}};EditorUi.prototype.openDatabase=function(a,b){if(null==this.database){var c=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB;if(null!=c)try{var d=c.open("database",2);d.onupgradeneeded=
function(a){try{var c=d.result;1>a.oldVersion&&c.createObjectStore("objects",{keyPath:"key"});2>a.oldVersion&&(c.createObjectStore("files",{keyPath:"title"}),c.createObjectStore("filesInfo",{keyPath:"title"}),EditorUi.migrateStorageFiles=isLocalStorage)}catch(u){null!=b&&b(u)}};d.onsuccess=mxUtils.bind(this,function(b){var c=d.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(a){if(!a||"1"==urlParams.forceMigration){var b=document.createElement("iframe");b.style.display="none";b.setAttribute("src","https://www.draw.io?embed=1&proto=json&forceMigration="+urlParams.forceMigration);document.body.appendChild(b);var c=!0,d=!1,e,f=0,g=mxUtils.bind(this,function(){d=!0;this.setDatabaseItem(".drawioMigrated3",!0);b.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",
-funtionName:"setMigratedFlag"}),"*")}),k=mxUtils.bind(this,function(){f++;m()}),m=mxUtils.bind(this,function(){try{if(f>=e.length)g();else{var a=e[f];StorageFile.getFileContent(this,a,mxUtils.bind(this,function(c){null==c||".scratchpad"==a&&c==this.emptyLibraryXml?b.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFile",functionArgs:[a]}),"*"):k()}),k)}}catch(E){console.log(E)}}),l=mxUtils.bind(this,function(a){try{this.setDatabaseItem(null,[{title:a.title,
+funtionName:"setMigratedFlag"}),"*")}),k=mxUtils.bind(this,function(){f++;l()}),l=mxUtils.bind(this,function(){try{if(f>=e.length)g();else{var a=e[f];StorageFile.getFileContent(this,a,mxUtils.bind(this,function(c){null==c||".scratchpad"==a&&c==this.emptyLibraryXml?b.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFile",functionArgs:[a]}),"*"):k()}),k)}}catch(E){console.log(E)}}),m=mxUtils.bind(this,function(a){try{this.setDatabaseItem(null,[{title:a.title,
size:a.data.length,lastModified:Date.now(),type:a.isLib?"L":"F"},{title:a.title,data:a.data}],k,k,["filesInfo","files"])}catch(E){console.log(E)}});a=mxUtils.bind(this,function(a){try{if(a.source==b.contentWindow){var f={};try{f=JSON.parse(a.data)}catch(F){}"init"==f.event?(b.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),"*"),b.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=f.event||d||
-(c?null!=f.resp&&0<f.resp.length&&null!=f.resp[0]?(e=f.resp[0],c=!1,m()):g():null!=f.resp&&0<f.resp.length&&null!=f.resp[0]?l(f.resp[0]):k())}}catch(F){console.log(F)}});window.addEventListener("message",a)}})));a(c);c.onversionchange=function(){c.close()}});d.onerror=b;d.onblocked=function(){}}catch(p){null!=b&&b(p)}else null!=b&&b()}else a(this.database)};EditorUi.prototype.setDatabaseItem=function(a,b,c,d,f){this.openDatabase(mxUtils.bind(this,function(e){try{f=f||"objects";Array.isArray(f)||(f=
+(c?null!=f.resp&&0<f.resp.length&&null!=f.resp[0]?(e=f.resp[0],c=!1,l()):g():null!=f.resp&&0<f.resp.length&&null!=f.resp[0]?m(f.resp[0]):k())}}catch(F){console.log(F)}});window.addEventListener("message",a)}})));a(c);c.onversionchange=function(){c.close()}});d.onerror=b;d.onblocked=function(){}}catch(p){null!=b&&b(p)}else null!=b&&b()}else a(this.database)};EditorUi.prototype.setDatabaseItem=function(a,b,c,d,f){this.openDatabase(mxUtils.bind(this,function(e){try{f=f||"objects";Array.isArray(f)||(f=
[f],a=[a],b=[b]);var g=e.transaction(f,"readwrite");g.oncomplete=c;g.onerror=d;for(e=0;e<f.length;e++)g.objectStore(f[e]).put(null!=a&&null!=a[e]?{key:a[e],data:b[e]}:b[e])}catch(t){null!=d&&d(t)}}),d)};EditorUi.prototype.removeDatabaseItem=function(a,b,c,d){this.openDatabase(mxUtils.bind(this,function(e){d=d||"objects";Array.isArray(d)||(d=[d],a=[a]);e=e.transaction(d,"readwrite");e.oncomplete=b;e.onerror=c;for(var f=0;f<d.length;f++)e.objectStore(d[f])["delete"](a[f])}),c)};EditorUi.prototype.getDatabaseItem=
function(a,b,c,d){this.openDatabase(mxUtils.bind(this,function(e){try{d=d||"objects";var f=e.transaction([d],"readonly").objectStore(d).get(a);f.onsuccess=function(){b(f.result)};f.onerror=c}catch(u){null!=c&&c(u)}}),c)};EditorUi.prototype.getDatabaseItems=function(a,b,c){this.openDatabase(mxUtils.bind(this,function(d){try{c=c||"objects";var e=d.transaction([c],"readonly").objectStore(c).openCursor(IDBKeyRange.lowerBound(0)),f=[];e.onsuccess=function(b){null==b.target.result?a(f):(f.push(b.target.result.value),
b.target.result["continue"]())};e.onerror=b}catch(u){null!=b&&b(u)}}),b)};EditorUi.prototype.getDatabaseItemKeys=function(a,b,c){this.openDatabase(mxUtils.bind(this,function(d){try{c=c||"objects";var e=d.transaction([c],"readonly").objectStore(c).getAllKeys();e.onsuccess=function(){a(e.result)};e.onerror=b}catch(q){null!=b&&b(q)}}),b)};EditorUi.prototype.commentsSupported=function(){var a=this.getCurrentFile();return null!=a?a.commentsSupported():!1};EditorUi.prototype.commentsRefreshNeeded=function(){var a=
@@ -10831,59 +10834,59 @@ return this.editor.embedExtFonts(a)};EditorUi.prototype.exportToCanvas=function(
return this.editor.convertImages(a,b,c,d)};EditorUi.prototype.convertImageToDataUri=function(a,b){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImageToDataUri");return this.editor.convertImageToDataUri(a,b)};EditorUi.prototype.base64Encode=function(a){EditorUi.logEvent("SHOULD NOT BE CALLED: base64Encode");return Editor.base64Encode(a)};EditorUi.prototype.updateCRC=function(a,b,c,d){EditorUi.logEvent("SHOULD NOT BE CALLED: updateCRC");return Editor.updateCRC(a,b,c,d)};EditorUi.prototype.crc32=function(a){EditorUi.logEvent("SHOULD NOT BE CALLED: crc32");
return Editor.crc32(a)};EditorUi.prototype.writeGraphModelToPng=function(a,b,c,d,f){EditorUi.logEvent("SHOULD NOT BE CALLED: writeGraphModelToPng");return Editor.writeGraphModelToPng(a,b,c,d,f)};EditorUi.prototype.getLocalStorageFileNames=function(){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;for(var a=[],b=0;b<localStorage.length;b++){var c=localStorage.key(b),d=localStorage.getItem(c);if(0<c.length&&(".scratchpad"==c||"."!=c.charAt(0))&&0<d.length){var f=
"<mxfile "===d.substring(0,8)||"<?xml"===d.substring(0,5)||"\x3c!--[if IE]>"===d.substring(0,12),d="<mxlibrary>"===d.substring(0,11);(f||d)&&a.push(c)}}return a};EditorUi.prototype.getLocalStorageFile=function(a){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;var b=localStorage.getItem(a);return{title:a,data:b,isLib:"<mxlibrary>"===b.substring(0,11)}};EditorUi.prototype.setMigratedFlag=function(){localStorage.setItem(".localStorageMigrated","1")}})();
-var CommentsWindow=function(a,d,c,b,f,g){function m(){for(var a=x.getElementsByTagName("div"),b=0,c=0;c<a.length;c++)"none"!=a[c].style.display&&a[c].parentNode==x&&b++;A.style.display=0==b?"block":"none"}function e(a,b,c,d){function e(){b.removeChild(k);b.removeChild(l);g.style.display="block";f.style.display="block"}v={div:b,comment:a,saveCallback:c,deleteOnCancel:d};var f=b.querySelector(".geCommentTxt"),g=b.querySelector(".geCommentActionsList"),k=document.createElement("textarea");k.className=
+var CommentsWindow=function(a,d,c,b,g,f){function m(){for(var a=x.getElementsByTagName("div"),b=0,c=0;c<a.length;c++)"none"!=a[c].style.display&&a[c].parentNode==x&&b++;A.style.display=0==b?"block":"none"}function e(a,b,c,d){function e(){b.removeChild(k);b.removeChild(l);g.style.display="block";f.style.display="block"}v={div:b,comment:a,saveCallback:c,deleteOnCancel:d};var f=b.querySelector(".geCommentTxt"),g=b.querySelector(".geCommentActionsList"),k=document.createElement("textarea");k.className=
"geCommentEditTxtArea";k.style.minHeight=f.offsetHeight+"px";k.value=a.content;b.insertBefore(k,f);var l=document.createElement("div");l.className="geCommentEditBtns";var n=mxUtils.button(mxResources.get("cancel"),function(){d?(b.parentNode.removeChild(b),m()):e();v=null});n.className="geCommentEditBtn";l.appendChild(n);var x=mxUtils.button(mxResources.get("save"),function(){f.innerHTML="";a.content=k.value;mxUtils.write(f,a.content);e();c(a);v=null});mxEvent.addListener(k,"keydown",mxUtils.bind(this,
function(a){mxEvent.isConsumed(a)||((mxEvent.isControlDown(a)||mxClient.IS_MAC&&mxEvent.isMetaDown(a))&&13==a.keyCode?(x.click(),mxEvent.consume(a)):27==a.keyCode&&(n.click(),mxEvent.consume(a)))}));x.focus();x.className="geCommentEditBtn gePrimaryBtn";l.appendChild(x);b.insertBefore(l,f);g.style.display="none";f.style.display="none";k.focus()}function k(b,c){c.innerHTML="";var d=new Date(b.modifiedDate),e=a.timeSince(d);null==e&&(e=mxResources.get("lessThanAMinute"));mxUtils.write(c,mxResources.get("timeAgo",
[e],"{1} ago"));c.setAttribute("title",d.toLocaleDateString()+" "+d.toLocaleTimeString())}function l(a){var b=document.createElement("img");b.className="geCommentBusyImg";b.src=IMAGE_PATH+"/spin.gif";a.appendChild(b);a.busyImg=b}function n(a){a.style.border="1px solid red";a.removeChild(a.busyImg)}function p(a){a.style.border="";a.removeChild(a.busyImg)}function q(b,c,d,f,g){function B(a,c,d){var e=document.createElement("li");e.className="geCommentAction";var f=document.createElement("a");f.className=
-"geCommentActionLnk";mxUtils.write(f,a);e.appendChild(f);mxEvent.addListener(f,"click",function(a){c(a,b);a.preventDefault();mxEvent.consume(a)});G.appendChild(e);d&&(e.style.display="none")}function E(){function a(b){c.push(d);if(null!=b.replies)for(var e=0;e<b.replies.length;e++)d=d.nextSibling,a(b.replies[e])}var c=[],d=y;a(b);return{pdiv:d,replies:c}}function J(c,d,g,k,m){function x(){l(B);b.addReply(u,function(a){u.id=a;b.replies.push(u);p(B);g&&g()},function(b){A();n(B);a.handleError(b,null,
+"geCommentActionLnk";mxUtils.write(f,a);e.appendChild(f);mxEvent.addListener(f,"click",function(a){c(a,b);a.preventDefault();mxEvent.consume(a)});G.appendChild(e);d&&(e.style.display="none")}function E(){function a(b){c.push(d);if(null!=b.replies)for(var e=0;e<b.replies.length;e++)d=d.nextSibling,a(b.replies[e])}var c=[],d=y;a(b);return{pdiv:d,replies:c}}function K(c,d,g,k,m){function x(){l(B);b.addReply(u,function(a){u.id=a;b.replies.push(u);p(B);g&&g()},function(b){A();n(B);a.handleError(b,null,
null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},k,m)}function A(){e(u,B,function(a){x()},!0)}var t=E().pdiv,u=a.newComment(c,a.getCurrentUser());u.pCommentId=b.id;null==b.replies&&(b.replies=[]);var B=q(u,b.replies,t,f+1);d?A():x()}if(g||!b.isResolved){A.style.display="none";var y=document.createElement("div");y.className="geCommentContainer";y.setAttribute("data-commentId",b.id);y.style.marginLeft=20*f+5+"px";b.isResolved&&!Editor.isDarkMode()&&(y.style.backgroundColor="ghostWhite");
var C=document.createElement("div");C.className="geCommentHeader";var I=document.createElement("img");I.className="geCommentUserImg";I.src=b.user.pictureUrl||Editor.userImage;C.appendChild(I);I=document.createElement("div");I.className="geCommentHeaderTxt";C.appendChild(I);var z=document.createElement("div");z.className="geCommentUsername";mxUtils.write(z,b.user.displayName||"");I.appendChild(z);z=document.createElement("div");z.className="geCommentDate";z.setAttribute("data-commentId",b.id);k(b,
-z);I.appendChild(z);y.appendChild(C);C=document.createElement("div");C.className="geCommentTxt";mxUtils.write(C,b.content||"");y.appendChild(C);b.isLocked&&(y.style.opacity="0.5");C=document.createElement("div");C.className="geCommentActions";var G=document.createElement("ul");G.className="geCommentActionsList";C.appendChild(G);u||b.isLocked||0!=f&&!t||B(mxResources.get("reply"),function(){J("",!0)},b.isResolved);I=a.getCurrentUser();null==I||I.id!=b.user.id||u||b.isLocked||(B(mxResources.get("edit"),
+z);I.appendChild(z);y.appendChild(C);C=document.createElement("div");C.className="geCommentTxt";mxUtils.write(C,b.content||"");y.appendChild(C);b.isLocked&&(y.style.opacity="0.5");C=document.createElement("div");C.className="geCommentActions";var G=document.createElement("ul");G.className="geCommentActionsList";C.appendChild(G);u||b.isLocked||0!=f&&!t||B(mxResources.get("reply"),function(){K("",!0)},b.isResolved);I=a.getCurrentUser();null==I||I.id!=b.user.id||u||b.isLocked||(B(mxResources.get("edit"),
function(){function c(){e(b,y,function(){l(y);b.editComment(b.content,function(){p(y)},function(b){n(y);c();a.handleError(b,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}c()},b.isResolved),B(mxResources.get("delete"),function(){a.confirm(mxResources.get("areYouSure"),function(){l(y);b.deleteComment(function(a){if(!0===a){a=y.querySelector(".geCommentTxt");a.innerHTML="";mxUtils.write(a,mxResources.get("msgDeleted"));var d=y.querySelectorAll(".geCommentAction");for(a=
0;a<d.length;a++)d[a].parentNode.removeChild(d[a]);p(y);y.style.opacity="0.5"}else{d=E(b).replies;for(a=0;a<d.length;a++)x.removeChild(d[a]);for(a=0;a<c.length;a++)if(c[a]==b){c.splice(a,1);break}A.style.display=0==x.getElementsByTagName("div").length?"block":"none"}},function(b){n(y);a.handleError(b,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},b.isResolved));u||b.isLocked||0!=f||B(b.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(a){function c(){var c=
-a.target;c.innerHTML="";b.isResolved=!b.isResolved;mxUtils.write(c,b.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var d=b.isResolved?"none":"",e=E(b).replies,f=Editor.isDarkMode()?"transparent":b.isResolved?"ghostWhite":"white",g=0;g<e.length;g++){e[g].style.backgroundColor=f;for(var k=e[g].querySelectorAll(".geCommentAction"),l=0;l<k.length;l++)k[l]!=c.parentNode&&(k[l].style.display=d);D||(e[g].style.display="none")}m()}b.isResolved?J(mxResources.get("reOpened")+": ",!0,
-c,!1,!0):J(mxResources.get("markedAsResolved"),!1,c,!0)});y.appendChild(C);null!=d?x.insertBefore(y,d.nextSibling):x.appendChild(y);for(d=0;null!=b.replies&&d<b.replies.length;d++)C=b.replies[d],C.isResolved=b.isResolved,q(C,b.replies,null,f+1,g);null!=v&&(v.comment.id==b.id?(g=b.content,b.content=v.comment.content,e(b,y,v.saveCallback,v.deleteOnCancel),b.content=g):null==v.comment.id&&v.comment.pCommentId==b.id&&(x.appendChild(v.div),e(v.comment,v.div,v.saveCallback,v.deleteOnCancel)));return y}}
+a.target;c.innerHTML="";b.isResolved=!b.isResolved;mxUtils.write(c,b.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var d=b.isResolved?"none":"",e=E(b).replies,f=Editor.isDarkMode()?"transparent":b.isResolved?"ghostWhite":"white",g=0;g<e.length;g++){e[g].style.backgroundColor=f;for(var k=e[g].querySelectorAll(".geCommentAction"),l=0;l<k.length;l++)k[l]!=c.parentNode&&(k[l].style.display=d);D||(e[g].style.display="none")}m()}b.isResolved?K(mxResources.get("reOpened")+": ",!0,
+c,!1,!0):K(mxResources.get("markedAsResolved"),!1,c,!0)});y.appendChild(C);null!=d?x.insertBefore(y,d.nextSibling):x.appendChild(y);for(d=0;null!=b.replies&&d<b.replies.length;d++)C=b.replies[d],C.isResolved=b.isResolved,q(C,b.replies,null,f+1,g);null!=v&&(v.comment.id==b.id?(g=b.content,b.content=v.comment.content,e(b,y,v.saveCallback,v.deleteOnCancel),b.content=g):null==v.comment.id&&v.comment.pCommentId==b.id&&(x.appendChild(v.div),e(v.comment,v.div,v.saveCallback,v.deleteOnCancel)));return y}}
var u=!a.canComment(),t=a.canReplyToReplies(),v=null,z=document.createElement("div");z.className="geCommentsWin";z.style.background=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";var y=EditorUi.compactUi?"26px":"30px",x=document.createElement("div");x.className="geCommentsList";x.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";x.style.bottom=parseInt(y)+7+"px";z.appendChild(x);var A=document.createElement("span");A.style.cssText="display:none;padding-top:10px;text-align:center;";
mxUtils.write(A,mxResources.get("noCommentsFound"));var B=document.createElement("div");B.className="geToolbarContainer geCommentsToolbar";B.style.height=y;B.style.padding=EditorUi.compactUi?"4px 0px 3px 0px":"1px";B.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";y=document.createElement("a");y.className="geButton";if(!u){var C=y.cloneNode();C.innerHTML='<div class="geSprite geSprite-plus" style="display:inline-block;"></div>';C.setAttribute("title",mxResources.get("create")+
"...");mxEvent.addListener(C,"click",function(b){function c(){e(d,f,function(b){l(f);a.addComment(b,function(a){b.id=a;G.push(b);p(f)},function(b){n(f);c();a.handleError(b,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},!0)}var d=a.newComment("",a.getCurrentUser()),f=q(d,G,null,0);c();b.preventDefault();mxEvent.consume(b)});B.appendChild(C)}C=y.cloneNode();C.innerHTML='<img src="'+IMAGE_PATH+'/check.png" style="width: 16px; padding: 2px;">';C.setAttribute("title",mxResources.get("showResolved"));
var D=!1;Editor.isDarkMode()&&(C.style.filter="invert(100%)");mxEvent.addListener(C,"click",function(a){this.className=(D=!D)?"geButton geCheckedBtn":"geButton";E();a.preventDefault();mxEvent.consume(a)});B.appendChild(C);a.commentsRefreshNeeded()&&(C=y.cloneNode(),C.innerHTML='<img src="'+IMAGE_PATH+'/update16.png" style="width: 16px; padding: 2px;">',C.setAttribute("title",mxResources.get("refresh")),Editor.isDarkMode()&&(C.style.filter="invert(100%)"),mxEvent.addListener(C,"click",function(a){E();
-a.preventDefault();mxEvent.consume(a)}),B.appendChild(C));a.commentsSaveNeeded()&&(y=y.cloneNode(),y.innerHTML='<img src="'+IMAGE_PATH+'/save.png" style="width: 20px; padding: 2px;">',y.setAttribute("title",mxResources.get("save")),Editor.isDarkMode()&&(y.style.filter="invert(100%)"),mxEvent.addListener(y,"click",function(a){g();a.preventDefault();mxEvent.consume(a)}),B.appendChild(y));z.appendChild(B);var G=[],E=mxUtils.bind(this,function(){this.hasError=!1;if(null!=v)try{v.div=v.div.cloneNode(!0);
-var b=v.div.querySelector(".geCommentEditTxtArea"),c=v.div.querySelector(".geCommentEditBtns");v.comment.content=b.value;b.parentNode.removeChild(b);c.parentNode.removeChild(c)}catch(J){a.handleError(J)}x.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+IMAGE_PATH+'/spin.gif" valign="middle"> '+mxUtils.htmlEntities(mxResources.get("loading"))+"...</div>";t=a.canReplyToReplies();a.commentsSupported()?a.getComments(function(a){function b(a){if(null!=a){a.sort(function(a,b){return new Date(a.modifiedDate)-
+a.preventDefault();mxEvent.consume(a)}),B.appendChild(C));a.commentsSaveNeeded()&&(y=y.cloneNode(),y.innerHTML='<img src="'+IMAGE_PATH+'/save.png" style="width: 20px; padding: 2px;">',y.setAttribute("title",mxResources.get("save")),Editor.isDarkMode()&&(y.style.filter="invert(100%)"),mxEvent.addListener(y,"click",function(a){f();a.preventDefault();mxEvent.consume(a)}),B.appendChild(y));z.appendChild(B);var G=[],E=mxUtils.bind(this,function(){this.hasError=!1;if(null!=v)try{v.div=v.div.cloneNode(!0);
+var b=v.div.querySelector(".geCommentEditTxtArea"),c=v.div.querySelector(".geCommentEditBtns");v.comment.content=b.value;b.parentNode.removeChild(b);c.parentNode.removeChild(c)}catch(K){a.handleError(K)}x.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+IMAGE_PATH+'/spin.gif" valign="middle"> '+mxUtils.htmlEntities(mxResources.get("loading"))+"...</div>";t=a.canReplyToReplies();a.commentsSupported()?a.getComments(function(a){function b(a){if(null!=a){a.sort(function(a,b){return new Date(a.modifiedDate)-
new Date(b.modifiedDate)});for(var c=0;c<a.length;c++)b(a[c].replies)}}a.sort(function(a,b){return new Date(a.modifiedDate)-new Date(b.modifiedDate)});x.innerHTML="";x.appendChild(A);A.style.display="block";G=a;for(a=0;a<G.length;a++)b(G[a].replies),q(G[a],G,null,0,D);null!=v&&null==v.comment.id&&null==v.comment.pCommentId&&(x.appendChild(v.div),e(v.comment,v.div,v.saveCallback,v.deleteOnCancel))},mxUtils.bind(this,function(a){x.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(a&&a.message?
": "+a.message:""));this.hasError=!0})):x.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});E();this.refreshComments=E;B=mxUtils.bind(this,function(){function a(b){var d=c[b.id];if(null!=d)for(k(b,d),d=0;null!=b.replies&&d<b.replies.length;d++)a(b.replies[d])}if(this.window.isVisible()){for(var b=x.querySelectorAll(".geCommentDate"),c={},d=0;d<b.length;d++){var e=b[d];c[e.getAttribute("data-commentId")]=e}for(d=0;d<G.length;d++)a(G[d])}});setInterval(B,6E4);this.refreshCommentsTime=B;this.window=
-new mxWindow(mxResources.get("comments"),z,d,c,b,f,!0,!0);this.window.minimumSize=new mxRectangle(0,0,300,200);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.window.fit()}));this.window.setLocation=function(a,b){var c=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;a=Math.max(0,Math.min(a,(window.innerWidth||
+new mxWindow(mxResources.get("comments"),z,d,c,b,g,!0,!0);this.window.minimumSize=new mxRectangle(0,0,300,200);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.window.fit()}));this.window.setLocation=function(a,b){var c=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;a=Math.max(0,Math.min(a,(window.innerWidth||
document.body.clientWidth||document.documentElement.clientWidth)-this.table.clientWidth));b=Math.max(0,Math.min(b,c-this.table.clientHeight-48));this.getX()==a&&this.getY()==b||mxWindow.prototype.setLocation.apply(this,arguments)};var F=mxUtils.bind(this,function(){var a=this.window.getX(),b=this.window.getY();this.window.setLocation(a,b)});mxEvent.addListener(window,"resize",F);this.destroy=function(){mxEvent.removeListener(window,"resize",F);this.window.destroy()}},ConfirmDialog=function(a,d,c,
-b,f,g,m,e,k,l,n){var p=document.createElement("div");p.style.textAlign="center";n=null!=n?n:44;var q=document.createElement("div");q.style.padding="6px";q.style.overflow="auto";q.style.maxHeight=n+"px";q.style.lineHeight="1.2em";mxUtils.write(q,d);p.appendChild(q);null!=l&&(q=document.createElement("div"),q.style.padding="6px 0 6px 0",d=document.createElement("img"),d.setAttribute("src",l),q.appendChild(d),p.appendChild(q));l=document.createElement("div");l.style.textAlign="center";l.style.whiteSpace=
-"nowrap";var u=document.createElement("input");u.setAttribute("type","checkbox");g=mxUtils.button(g||mxResources.get("cancel"),function(){a.hideDialog();null!=b&&b(u.checked)});g.className="geBtn";null!=e&&(g.innerHTML=e+"<br>"+g.innerHTML,g.style.paddingBottom="8px",g.style.paddingTop="8px",g.style.height="auto",g.style.width="40%");a.editor.cancelFirst&&l.appendChild(g);var t=mxUtils.button(f||mxResources.get("ok"),function(){a.hideDialog();null!=c&&c(u.checked)});l.appendChild(t);null!=m?(t.innerHTML=
-m+"<br>"+t.innerHTML+"<br>",t.style.paddingBottom="8px",t.style.paddingTop="8px",t.style.height="auto",t.className="geBtn",t.style.width="40%"):t.className="geBtn gePrimaryBtn";a.editor.cancelFirst||l.appendChild(g);p.appendChild(l);k?(l.style.marginTop="10px",q=document.createElement("p"),q.style.marginTop="20px",q.style.marginBottom="0px",q.appendChild(u),f=document.createElement("span"),mxUtils.write(f," "+mxResources.get("rememberThisSetting")),q.appendChild(f),p.appendChild(q),mxEvent.addListener(f,
+b,g,f,m,e,k,l,n){var p=document.createElement("div");p.style.textAlign="center";n=null!=n?n:44;var q=document.createElement("div");q.style.padding="6px";q.style.overflow="auto";q.style.maxHeight=n+"px";q.style.lineHeight="1.2em";mxUtils.write(q,d);p.appendChild(q);null!=l&&(q=document.createElement("div"),q.style.padding="6px 0 6px 0",d=document.createElement("img"),d.setAttribute("src",l),q.appendChild(d),p.appendChild(q));l=document.createElement("div");l.style.textAlign="center";l.style.whiteSpace=
+"nowrap";var u=document.createElement("input");u.setAttribute("type","checkbox");f=mxUtils.button(f||mxResources.get("cancel"),function(){a.hideDialog();null!=b&&b(u.checked)});f.className="geBtn";null!=e&&(f.innerHTML=e+"<br>"+f.innerHTML,f.style.paddingBottom="8px",f.style.paddingTop="8px",f.style.height="auto",f.style.width="40%");a.editor.cancelFirst&&l.appendChild(f);var t=mxUtils.button(g||mxResources.get("ok"),function(){a.hideDialog();null!=c&&c(u.checked)});l.appendChild(t);null!=m?(t.innerHTML=
+m+"<br>"+t.innerHTML+"<br>",t.style.paddingBottom="8px",t.style.paddingTop="8px",t.style.height="auto",t.className="geBtn",t.style.width="40%"):t.className="geBtn gePrimaryBtn";a.editor.cancelFirst||l.appendChild(f);p.appendChild(l);k?(l.style.marginTop="10px",q=document.createElement("p"),q.style.marginTop="20px",q.style.marginBottom="0px",q.appendChild(u),g=document.createElement("span"),mxUtils.write(g," "+mxResources.get("rememberThisSetting")),q.appendChild(g),p.appendChild(q),mxEvent.addListener(g,
"click",function(a){u.checked=!u.checked;mxEvent.consume(a)})):l.style.marginTop="12px";this.init=function(){t.focus()};this.container=p};EditorUi.DIFF_INSERT="i";EditorUi.DIFF_REMOVE="r";EditorUi.DIFF_UPDATE="u";EditorUi.prototype.codec=new mxCodec;EditorUi.prototype.viewStateProperties={background:!0,backgroundImage:!0,shadowVisible:!0,foldingEnabled:!0,pageScale:!0,mathEnabled:!0,pageFormat:!0,extFonts:!0};EditorUi.prototype.cellProperties={id:!0,value:!0,xmlValue:!0,vertex:!0,edge:!0,visible:!0,collapsed:!0,connectable:!0,parent:!0,children:!0,previous:!0,source:!0,target:!0,edges:!0,geometry:!0,style:!0,mxObjectId:!0,mxTransient:!0};
-EditorUi.prototype.patchPages=function(a,d,c,b,f){var g={},m=[],e={},k={},l={},n={};if(null!=b&&null!=b[EditorUi.DIFF_UPDATE])for(var p in b[EditorUi.DIFF_UPDATE])g[p]=b[EditorUi.DIFF_UPDATE][p];if(null!=d[EditorUi.DIFF_REMOVE])for(b=0;b<d[EditorUi.DIFF_REMOVE].length;b++)k[d[EditorUi.DIFF_REMOVE][b]]=!0;if(null!=d[EditorUi.DIFF_INSERT])for(b=0;b<d[EditorUi.DIFF_INSERT].length;b++)e[d[EditorUi.DIFF_INSERT][b].previous]=d[EditorUi.DIFF_INSERT][b];if(null!=d[EditorUi.DIFF_UPDATE])for(p in d[EditorUi.DIFF_UPDATE])b=
+EditorUi.prototype.patchPages=function(a,d,c,b,g){var f={},m=[],e={},k={},l={},n={};if(null!=b&&null!=b[EditorUi.DIFF_UPDATE])for(var p in b[EditorUi.DIFF_UPDATE])f[p]=b[EditorUi.DIFF_UPDATE][p];if(null!=d[EditorUi.DIFF_REMOVE])for(b=0;b<d[EditorUi.DIFF_REMOVE].length;b++)k[d[EditorUi.DIFF_REMOVE][b]]=!0;if(null!=d[EditorUi.DIFF_INSERT])for(b=0;b<d[EditorUi.DIFF_INSERT].length;b++)e[d[EditorUi.DIFF_INSERT][b].previous]=d[EditorUi.DIFF_INSERT][b];if(null!=d[EditorUi.DIFF_UPDATE])for(p in d[EditorUi.DIFF_UPDATE])b=
d[EditorUi.DIFF_UPDATE][p],null!=b.previous&&(n[b.previous]=p);if(null!=a){var q="";for(b=0;b<a.length;b++){var u=a[b].getId();l[u]=a[b];null!=n[q]||k[u]||null!=d[EditorUi.DIFF_UPDATE]&&null!=d[EditorUi.DIFF_UPDATE][u]&&null!=d[EditorUi.DIFF_UPDATE][u].previous||(n[q]=u);q=u}}var t={},v=mxUtils.bind(this,function(a){var b=null!=a?a.getId():"";if(null!=a&&!t[b]){t[b]=!0;m.push(a);var k=null!=d[EditorUi.DIFF_UPDATE]?d[EditorUi.DIFF_UPDATE][b]:null;null!=k&&(this.updatePageRoot(a),null!=k.name&&a.setName(k.name),
-null!=k.view&&this.patchViewState(a,k.view),null!=k.cells&&this.patchPage(a,k.cells,g[a.getId()],f),!c||null==k.cells&&null==k.view||(a.needsUpdate=!0))}a=n[b];null!=a&&(delete n[b],v(l[a]));a=e[b];null!=a&&(delete e[b],z(a))}),z=mxUtils.bind(this,function(a){a=mxUtils.parseXml(a.data).documentElement;a=new DiagramPage(a);this.updatePageRoot(a);var b=l[a.getId()];null==b?v(a):(b.root=a.root,this.currentPage==b?this.editor.graph.model.setRoot(b.root):c&&(b.needsUpdate=!0))});v();for(p in n)v(l[n[p]]),
+null!=k.view&&this.patchViewState(a,k.view),null!=k.cells&&this.patchPage(a,k.cells,f[a.getId()],g),!c||null==k.cells&&null==k.view||(a.needsUpdate=!0))}a=n[b];null!=a&&(delete n[b],v(l[a]));a=e[b];null!=a&&(delete e[b],z(a))}),z=mxUtils.bind(this,function(a){a=mxUtils.parseXml(a.data).documentElement;a=new DiagramPage(a);this.updatePageRoot(a);var b=l[a.getId()];null==b?v(a):(b.root=a.root,this.currentPage==b?this.editor.graph.model.setRoot(b.root):c&&(b.needsUpdate=!0))});v();for(p in n)v(l[n[p]]),
delete n[p];for(p in e)z(e[p]),delete e[p];return m};EditorUi.prototype.patchViewState=function(a,d){if(null!=a.viewState&&null!=d){a==this.currentPage&&(a.viewState=this.editor.graph.getViewState());for(var c in d)try{a.viewState[c]=JSON.parse(d[c])}catch(b){}a==this.currentPage&&this.editor.graph.setViewState(a.viewState,!0)}};
-EditorUi.prototype.createParentLookup=function(a,d){function c(a){var c=b[a];null==c&&(c={inserted:[],moved:{}},b[a]=c);return c}var b={};if(null!=d[EditorUi.DIFF_INSERT])for(var f=0;f<d[EditorUi.DIFF_INSERT].length;f++){var g=d[EditorUi.DIFF_INSERT][f],m=null!=g.parent?g.parent:"",e=null!=g.previous?g.previous:"";c(m).inserted[e]=g}if(null!=d[EditorUi.DIFF_UPDATE])for(var k in d[EditorUi.DIFF_UPDATE])g=d[EditorUi.DIFF_UPDATE][k],null!=g.previous&&(m=g.parent,null==m&&(f=a.getCell(k),null!=f&&(f=
-a.getParent(f),null!=f&&(m=f.getId()))),null!=m&&(c(m).moved[g.previous]=k));return b};
-EditorUi.prototype.patchPage=function(a,d,c,b){var f=a==this.currentPage?this.editor.graph.model:new mxGraphModel(a.root),g=this.createParentLookup(f,d);f.beginUpdate();try{var m=f.updateEdgeParent,e=new mxDictionary,k=[];f.updateEdgeParent=function(a,c){!e.get(a)&&b&&(e.put(a,!0),k.push(a))};var l=g[""],n=null!=l&&null!=l.inserted?l.inserted[""]:null,p=null;null!=n&&(p=this.getCellForJson(n));if(null==p){var q=null!=l&&null!=l.moved?l.moved[""]:null;null!=q&&(p=f.getCell(q))}null!=p&&(f.setRoot(p),
-a.root=p);this.patchCellRecursive(a,f,f.root,g,d);if(null!=d[EditorUi.DIFF_REMOVE])for(var u=0;u<d[EditorUi.DIFF_REMOVE].length;u++){var t=f.getCell(d[EditorUi.DIFF_REMOVE][u]);null!=t&&f.remove(t)}if(null!=d[EditorUi.DIFF_UPDATE]){var v=null!=c&&null!=c.cells?c.cells[EditorUi.DIFF_UPDATE]:null;for(q in d[EditorUi.DIFF_UPDATE])this.patchCell(f,f.getCell(q),d[EditorUi.DIFF_UPDATE][q],null!=v?v[q]:null)}if(null!=d[EditorUi.DIFF_INSERT])for(u=0;u<d[EditorUi.DIFF_INSERT].length;u++)n=d[EditorUi.DIFF_INSERT][u],
-t=f.getCell(n.id),null!=t&&(f.setTerminal(t,f.getCell(n.source),!0),f.setTerminal(t,f.getCell(n.target),!1));f.updateEdgeParent=m;if(b&&0<k.length)for(u=0;u<k.length;u++)f.contains(k[u])&&f.updateEdgeParent(k[u])}finally{f.endUpdate()}};
-EditorUi.prototype.patchCellRecursive=function(a,d,c,b,f){if(null!=c){for(var g=b[c.getId()],m=null!=g&&null!=g.inserted?g.inserted:{},g=null!=g&&null!=g.moved?g.moved:{},e=0,k=d.getChildCount(c),l="",n=0;n<k;n++){var p=d.getChildAt(c,n).getId();null==g[l]&&(null==f[EditorUi.DIFF_UPDATE]||null==f[EditorUi.DIFF_UPDATE][p]||null==f[EditorUi.DIFF_UPDATE][p].previous&&null==f[EditorUi.DIFF_UPDATE][p].parent)&&(g[l]=p);l=p}k=mxUtils.bind(this,function(g,k){var m=null!=g?g.getId():"";if(null!=g&&k){var l=
-d.getCell(m);null!=l&&l!=g&&(g=null)}null!=g&&(d.getChildAt(c,e)!=g&&d.add(c,g,e),this.patchCellRecursive(a,d,g,b,f),e++);return m});for(l=[null];0<l.length;)if(n=l.shift(),n=k(null!=n?n.child:null,null!=n?n.insert:!1),p=g[n],null!=p&&(delete g[n],l.push({child:d.getCell(p)})),p=m[n],null!=p&&(delete m[n],l.push({child:this.getCellForJson(p),insert:!0})),0==l.length){for(n in g)l.push({child:d.getCell(g[n])}),delete g[n];for(n in m)l.push({child:this.getCellForJson(m[n]),insert:!0}),delete m[n]}}};
+EditorUi.prototype.createParentLookup=function(a,d){function c(a){var c=b[a];null==c&&(c={inserted:[],moved:{}},b[a]=c);return c}var b={};if(null!=d[EditorUi.DIFF_INSERT])for(var g=0;g<d[EditorUi.DIFF_INSERT].length;g++){var f=d[EditorUi.DIFF_INSERT][g],m=null!=f.parent?f.parent:"",e=null!=f.previous?f.previous:"";c(m).inserted[e]=f}if(null!=d[EditorUi.DIFF_UPDATE])for(var k in d[EditorUi.DIFF_UPDATE])f=d[EditorUi.DIFF_UPDATE][k],null!=f.previous&&(m=f.parent,null==m&&(g=a.getCell(k),null!=g&&(g=
+a.getParent(g),null!=g&&(m=g.getId()))),null!=m&&(c(m).moved[f.previous]=k));return b};
+EditorUi.prototype.patchPage=function(a,d,c,b){var g=a==this.currentPage?this.editor.graph.model:new mxGraphModel(a.root),f=this.createParentLookup(g,d);g.beginUpdate();try{var m=g.updateEdgeParent,e=new mxDictionary,k=[];g.updateEdgeParent=function(a,c){!e.get(a)&&b&&(e.put(a,!0),k.push(a))};var l=f[""],n=null!=l&&null!=l.inserted?l.inserted[""]:null,p=null;null!=n&&(p=this.getCellForJson(n));if(null==p){var q=null!=l&&null!=l.moved?l.moved[""]:null;null!=q&&(p=g.getCell(q))}null!=p&&(g.setRoot(p),
+a.root=p);this.patchCellRecursive(a,g,g.root,f,d);if(null!=d[EditorUi.DIFF_REMOVE])for(var u=0;u<d[EditorUi.DIFF_REMOVE].length;u++){var t=g.getCell(d[EditorUi.DIFF_REMOVE][u]);null!=t&&g.remove(t)}if(null!=d[EditorUi.DIFF_UPDATE]){var v=null!=c&&null!=c.cells?c.cells[EditorUi.DIFF_UPDATE]:null;for(q in d[EditorUi.DIFF_UPDATE])this.patchCell(g,g.getCell(q),d[EditorUi.DIFF_UPDATE][q],null!=v?v[q]:null)}if(null!=d[EditorUi.DIFF_INSERT])for(u=0;u<d[EditorUi.DIFF_INSERT].length;u++)n=d[EditorUi.DIFF_INSERT][u],
+t=g.getCell(n.id),null!=t&&(g.setTerminal(t,g.getCell(n.source),!0),g.setTerminal(t,g.getCell(n.target),!1));g.updateEdgeParent=m;if(b&&0<k.length)for(u=0;u<k.length;u++)g.contains(k[u])&&g.updateEdgeParent(k[u])}finally{g.endUpdate()}};
+EditorUi.prototype.patchCellRecursive=function(a,d,c,b,g){if(null!=c){for(var f=b[c.getId()],m=null!=f&&null!=f.inserted?f.inserted:{},f=null!=f&&null!=f.moved?f.moved:{},e=0,k=d.getChildCount(c),l="",n=0;n<k;n++){var p=d.getChildAt(c,n).getId();null==f[l]&&(null==g[EditorUi.DIFF_UPDATE]||null==g[EditorUi.DIFF_UPDATE][p]||null==g[EditorUi.DIFF_UPDATE][p].previous&&null==g[EditorUi.DIFF_UPDATE][p].parent)&&(f[l]=p);l=p}k=mxUtils.bind(this,function(f,k){var m=null!=f?f.getId():"";if(null!=f&&k){var l=
+d.getCell(m);null!=l&&l!=f&&(f=null)}null!=f&&(d.getChildAt(c,e)!=f&&d.add(c,f,e),this.patchCellRecursive(a,d,f,b,g),e++);return m});for(l=[null];0<l.length;)if(n=l.shift(),n=k(null!=n?n.child:null,null!=n?n.insert:!1),p=f[n],null!=p&&(delete f[n],l.push({child:d.getCell(p)})),p=m[n],null!=p&&(delete m[n],l.push({child:this.getCellForJson(p),insert:!0})),0==l.length){for(n in f)l.push({child:d.getCell(f[n])}),delete f[n];for(n in m)l.push({child:this.getCellForJson(m[n]),insert:!0}),delete m[n]}}};
EditorUi.prototype.patchCell=function(a,d,c,b){if(null!=d&&null!=c){if(null==b||null==b.xmlValue&&(null==b.value||""==b.value))"value"in c?a.setValue(d,c.value):null!=c.xmlValue&&a.setValue(d,mxUtils.parseXml(c.xmlValue).documentElement);null!=b&&null!=b.style||null==c.style||a.setStyle(d,c.style);null!=c.visible&&a.setVisible(d,1==c.visible);null!=c.collapsed&&a.setCollapsed(d,1==c.collapsed);null!=c.vertex&&(d.vertex=1==c.vertex);null!=c.edge&&(d.edge=1==c.edge);null!=c.connectable&&(d.connectable=
-1==c.connectable);null!=c.geometry&&a.setGeometry(d,this.codec.decode(mxUtils.parseXml(c.geometry).documentElement));null!=c.source&&a.setTerminal(d,a.getCell(c.source),!0);null!=c.target&&a.setTerminal(d,a.getCell(c.target),!1);for(var f in c)this.cellProperties[f]||(d[f]=c[f])}};
-EditorUi.prototype.getPagesForNode=function(a,d){var c=this.editor.extractGraphModel(a,!0,!0);null!=c&&(a=c);var c=a.getElementsByTagName(d||"diagram"),b=[];if(0<c.length)for(var f=0;f<c.length;f++){var g=new DiagramPage(c[f]);this.updatePageRoot(g,!0);b.push(g)}else"mxGraphModel"==a.nodeName&&(g=new DiagramPage(a.ownerDocument.createElement("diagram")),g.setName(mxResources.get("pageWithNumber",[1])),mxUtils.setTextContent(g.node,Graph.compressNode(a,!0)),b.push(g));return b};
-EditorUi.prototype.diffPages=function(a,d){for(var c=[],b=[],f={},g={},m={},e=null,k=0;k<d.length;k++)g[d[k].getId()]={page:d[k],prev:e},e=d[k];e=null;for(k=0;k<a.length;k++){var l=a[k].getId(),n=g[l];if(null==n)b.push(l);else{var p=this.diffPage(a[k],n.page),q={};0<Object.keys(p).length&&(q.cells=p);p=this.diffViewState(a[k],n.page);0<Object.keys(p).length&&(q.view=p);if((null!=n.prev?null==e:null!=e)||null!=e&&null!=n.prev&&e.getId()!=n.prev.getId())q.previous=null!=n.prev?n.prev.getId():"";null!=
-n.page.getName()&&a[k].getName()!=n.page.getName()&&(q.name=n.page.getName());0<Object.keys(q).length&&(m[l]=q)}delete g[a[k].getId()];e=a[k]}for(l in g)n=g[l],c.push({data:mxUtils.getXml(n.page.node),previous:null!=n.prev?n.prev.getId():""});0<Object.keys(m).length&&(f[EditorUi.DIFF_UPDATE]=m);0<b.length&&(f[EditorUi.DIFF_REMOVE]=b);0<c.length&&(f[EditorUi.DIFF_INSERT]=c);return f};
-EditorUi.prototype.createCellLookup=function(a,d,c){c=null!=c?c:{};c[a.getId()]={cell:a,prev:d};var b=a.getChildCount();d=null;for(var f=0;f<b;f++){var g=a.getChildAt(f);this.createCellLookup(g,d,c);d=g}return c};
-EditorUi.prototype.diffCellRecursive=function(a,d,c,b,f){b=null!=b?b:{};var g=c[a.getId()];delete c[a.getId()];if(null==g)f.push(a.getId());else{var m=this.diffCell(a,g.cell);if(null!=m.parent||(null!=g.prev?null==d:null!=d)||null!=d&&null!=g.prev&&d.getId()!=g.prev.getId())m.previous=null!=g.prev?g.prev.getId():"";0<Object.keys(m).length&&(b[a.getId()]=m)}g=a.getChildCount();d=null;for(m=0;m<g;m++){var e=a.getChildAt(m);this.diffCellRecursive(e,d,c,b,f);d=e}return b};
-EditorUi.prototype.diffPage=function(a,d){var c=[],b=[],f={};this.updatePageRoot(a);this.updatePageRoot(d);var g=this.createCellLookup(d.root),m=this.diffCellRecursive(a.root,null,g,m,b),e;for(e in g){var k=g[e];c.push(this.getJsonForCell(k.cell,k.prev))}0<Object.keys(m).length&&(f[EditorUi.DIFF_UPDATE]=m);0<b.length&&(f[EditorUi.DIFF_REMOVE]=b);0<c.length&&(f[EditorUi.DIFF_INSERT]=c);return f};
-EditorUi.prototype.diffViewState=function(a,d){var c=a.viewState,b=d.viewState,f={};d==this.currentPage&&(b=this.editor.graph.getViewState());if(null!=c&&null!=b)for(var g in this.viewStateProperties){var m=JSON.stringify(c[g]),e=JSON.stringify(b[g]);m!=e&&(f[g]=e)}return f};
+1==c.connectable);null!=c.geometry&&a.setGeometry(d,this.codec.decode(mxUtils.parseXml(c.geometry).documentElement));null!=c.source&&a.setTerminal(d,a.getCell(c.source),!0);null!=c.target&&a.setTerminal(d,a.getCell(c.target),!1);for(var g in c)this.cellProperties[g]||(d[g]=c[g])}};
+EditorUi.prototype.getPagesForNode=function(a,d){var c=this.editor.extractGraphModel(a,!0,!0);null!=c&&(a=c);var c=a.getElementsByTagName(d||"diagram"),b=[];if(0<c.length)for(var g=0;g<c.length;g++){var f=new DiagramPage(c[g]);this.updatePageRoot(f,!0);b.push(f)}else"mxGraphModel"==a.nodeName&&(f=new DiagramPage(a.ownerDocument.createElement("diagram")),f.setName(mxResources.get("pageWithNumber",[1])),mxUtils.setTextContent(f.node,Graph.compressNode(a,!0)),b.push(f));return b};
+EditorUi.prototype.diffPages=function(a,d){for(var c=[],b=[],g={},f={},m={},e=null,k=0;k<d.length;k++)f[d[k].getId()]={page:d[k],prev:e},e=d[k];e=null;for(k=0;k<a.length;k++){var l=a[k].getId(),n=f[l];if(null==n)b.push(l);else{var p=this.diffPage(a[k],n.page),q={};0<Object.keys(p).length&&(q.cells=p);p=this.diffViewState(a[k],n.page);0<Object.keys(p).length&&(q.view=p);if((null!=n.prev?null==e:null!=e)||null!=e&&null!=n.prev&&e.getId()!=n.prev.getId())q.previous=null!=n.prev?n.prev.getId():"";null!=
+n.page.getName()&&a[k].getName()!=n.page.getName()&&(q.name=n.page.getName());0<Object.keys(q).length&&(m[l]=q)}delete f[a[k].getId()];e=a[k]}for(l in f)n=f[l],c.push({data:mxUtils.getXml(n.page.node),previous:null!=n.prev?n.prev.getId():""});0<Object.keys(m).length&&(g[EditorUi.DIFF_UPDATE]=m);0<b.length&&(g[EditorUi.DIFF_REMOVE]=b);0<c.length&&(g[EditorUi.DIFF_INSERT]=c);return g};
+EditorUi.prototype.createCellLookup=function(a,d,c){c=null!=c?c:{};c[a.getId()]={cell:a,prev:d};var b=a.getChildCount();d=null;for(var g=0;g<b;g++){var f=a.getChildAt(g);this.createCellLookup(f,d,c);d=f}return c};
+EditorUi.prototype.diffCellRecursive=function(a,d,c,b,g){b=null!=b?b:{};var f=c[a.getId()];delete c[a.getId()];if(null==f)g.push(a.getId());else{var m=this.diffCell(a,f.cell);if(null!=m.parent||(null!=f.prev?null==d:null!=d)||null!=d&&null!=f.prev&&d.getId()!=f.prev.getId())m.previous=null!=f.prev?f.prev.getId():"";0<Object.keys(m).length&&(b[a.getId()]=m)}f=a.getChildCount();d=null;for(m=0;m<f;m++){var e=a.getChildAt(m);this.diffCellRecursive(e,d,c,b,g);d=e}return b};
+EditorUi.prototype.diffPage=function(a,d){var c=[],b=[],g={};this.updatePageRoot(a);this.updatePageRoot(d);var f=this.createCellLookup(d.root),m=this.diffCellRecursive(a.root,null,f,m,b),e;for(e in f){var k=f[e];c.push(this.getJsonForCell(k.cell,k.prev))}0<Object.keys(m).length&&(g[EditorUi.DIFF_UPDATE]=m);0<b.length&&(g[EditorUi.DIFF_REMOVE]=b);0<c.length&&(g[EditorUi.DIFF_INSERT]=c);return g};
+EditorUi.prototype.diffViewState=function(a,d){var c=a.viewState,b=d.viewState,g={};d==this.currentPage&&(b=this.editor.graph.getViewState());if(null!=c&&null!=b)for(var f in this.viewStateProperties){var m=JSON.stringify(c[f]),e=JSON.stringify(b[f]);m!=e&&(g[f]=e)}return g};
EditorUi.prototype.getCellForJson=function(a){var d=null!=a.geometry?this.codec.decode(mxUtils.parseXml(a.geometry).documentElement):null,c=a.value;null!=a.xmlValue&&(c=mxUtils.parseXml(a.xmlValue).documentElement);d=new mxCell(c,d,a.style);d.connectable=0!=a.connectable;d.collapsed=1==a.collapsed;d.visible=0!=a.visible;d.vertex=1==a.vertex;d.edge=1==a.edge;d.id=a.id;for(var b in a)this.cellProperties[b]||(d[b]=a[b]);return d};
EditorUi.prototype.getJsonForCell=function(a,d){var c={id:a.getId()};a.vertex&&(c.vertex=1);a.edge&&(c.edge=1);a.connectable||(c.connectable=0);null!=a.parent&&(c.parent=a.parent.getId());null!=d&&(c.previous=d.getId());null!=a.source&&(c.source=a.source.getId());null!=a.target&&(c.target=a.target.getId());null!=a.style&&(c.style=a.style);null!=a.geometry&&(c.geometry=mxUtils.getXml(this.codec.encode(a.geometry)));a.collapsed&&(c.collapsed=1);a.visible||(c.visible=0);null!=a.value&&("object"===typeof a.value&&
"number"===typeof a.value.nodeType&&"string"===typeof a.value.nodeName&&"function"===typeof a.value.getAttribute?c.xmlValue=mxUtils.getXml(a.value):c.value=a.value);for(var b in a)this.cellProperties[b]||"function"===typeof a[b]||(c[b]=a[b]);return c};
EditorUi.prototype.diffCell=function(a,d){function c(a){return null!=a&&"object"===typeof a&&"number"===typeof a.nodeType&&"string"===typeof a.nodeName&&"function"===typeof a.getAttribute}var b={};a.vertex!=d.vertex&&(b.vertex=d.vertex?1:0);a.edge!=d.edge&&(b.edge=d.edge?1:0);a.connectable!=d.connectable&&(b.connectable=d.connectable?1:0);if((null!=a.parent?null==d.parent:null!=d.parent)||null!=a.parent&&null!=d.parent&&a.parent.getId()!=d.parent.getId())b.parent=null!=d.parent?d.parent.getId():"";
if((null!=a.source?null==d.source:null!=d.source)||null!=a.source&&null!=d.source&&a.source.getId()!=d.source.getId())b.source=null!=d.source?d.source.getId():"";if((null!=a.target?null==d.target:null!=d.target)||null!=a.target&&null!=d.target&&a.target.getId()!=d.target.getId())b.target=null!=d.target?d.target.getId():"";c(a.value)&&c(d.value)?a.value.isEqualNode(d.value)||(b.xmlValue=mxUtils.getXml(d.value)):a.value!=d.value&&(c(d.value)?b.xmlValue=mxUtils.getXml(d.value):b.value=null!=d.value?
-d.value:null);a.style!=d.style&&(b.style=d.style);a.visible!=d.visible&&(b.visible=d.visible?1:0);a.collapsed!=d.collapsed&&(b.collapsed=d.collapsed?1:0);if(!this.isObjectEqual(a.geometry,d.geometry,new mxGeometry)){var f=this.codec.encode(d.geometry);null!=f&&(b.geometry=mxUtils.getXml(f))}for(var g in a)this.cellProperties[g]||"function"===typeof a[g]||"function"===typeof d[g]||a[g]==d[g]||(b[g]=void 0===d[g]?null:d[g]);for(g in d)g in a||this.cellProperties[g]||"function"===typeof a[g]||"function"===
-typeof d[g]||a[g]==d[g]||(b[g]=void 0===d[g]?null:d[g]);return b};EditorUi.prototype.isObjectEqual=function(a,d,c){if(null==a&&null==d)return!0;if(null!=a?null==d:null!=d)return!1;var b=function(a,b){return null==c||c[a]!=b?!0===b?1:b:void 0};return JSON.stringify(a,b)==JSON.stringify(d,b)};var mxSettings={currentVersion:18,defaultFormatWidth:600>screen.width?"0":"240",key:Editor.settingsKey,getLanguage:function(){return mxSettings.settings.language},setLanguage:function(a){mxSettings.settings.language=a},getUi:function(){return mxSettings.settings.ui},setUi:function(a){var d=localStorage.getItem(".drawio-config"),d=null==d?mxSettings.getDefaults():JSON.parse(d);d.ui=a;delete d.isNew;d.version=mxSettings.currentVersion;localStorage.setItem(".drawio-config",JSON.stringify(d))},getShowStartScreen:function(){return mxSettings.settings.showStartScreen},
+d.value:null);a.style!=d.style&&(b.style=d.style);a.visible!=d.visible&&(b.visible=d.visible?1:0);a.collapsed!=d.collapsed&&(b.collapsed=d.collapsed?1:0);if(!this.isObjectEqual(a.geometry,d.geometry,new mxGeometry)){var g=this.codec.encode(d.geometry);null!=g&&(b.geometry=mxUtils.getXml(g))}for(var f in a)this.cellProperties[f]||"function"===typeof a[f]||"function"===typeof d[f]||a[f]==d[f]||(b[f]=void 0===d[f]?null:d[f]);for(f in d)f in a||this.cellProperties[f]||"function"===typeof a[f]||"function"===
+typeof d[f]||a[f]==d[f]||(b[f]=void 0===d[f]?null:d[f]);return b};EditorUi.prototype.isObjectEqual=function(a,d,c){if(null==a&&null==d)return!0;if(null!=a?null==d:null!=d)return!1;var b=function(a,b){return null==c||c[a]!=b?!0===b?1:b:void 0};return JSON.stringify(a,b)==JSON.stringify(d,b)};var mxSettings={currentVersion:18,defaultFormatWidth:600>screen.width?"0":"240",key:Editor.settingsKey,getLanguage:function(){return mxSettings.settings.language},setLanguage:function(a){mxSettings.settings.language=a},getUi:function(){return mxSettings.settings.ui},setUi:function(a){var d=localStorage.getItem(".drawio-config"),d=null==d?mxSettings.getDefaults():JSON.parse(d);d.ui=a;delete d.isNew;d.version=mxSettings.currentVersion;localStorage.setItem(".drawio-config",JSON.stringify(d))},getShowStartScreen:function(){return mxSettings.settings.showStartScreen},
setShowStartScreen:function(a){mxSettings.settings.showStartScreen=a},getGridColor:function(a){return a?mxSettings.settings.darkGridColor:mxSettings.settings.gridColor},setGridColor:function(a,d){d?mxSettings.settings.darkGridColor=a:mxSettings.settings.gridColor=a},getAutosave:function(){return mxSettings.settings.autosave},setAutosave:function(a){mxSettings.settings.autosave=a},getResizeImages:function(){return mxSettings.settings.resizeImages},setResizeImages:function(a){mxSettings.settings.resizeImages=
a},getOpenCounter:function(){return mxSettings.settings.openCounter},setOpenCounter:function(a){mxSettings.settings.openCounter=a},setCustomFonts:function(a){mxSettings.settings.customFonts=a},getCustomFonts:function(){for(var a=mxSettings.settings.customFonts||[],d=0;d<a.length;d++)"string"===typeof a[d]&&(a[d]={name:a[d],url:null});return a},getLibraries:function(){return mxSettings.settings.libraries},setLibraries:function(a){mxSettings.settings.libraries=a},addCustomLibrary:function(a){mxSettings.load();
Array.isArray(mxSettings.settings.customLibraries)||(mxSettings.settings.customLibraries=[]);0>mxUtils.indexOf(mxSettings.settings.customLibraries,a)&&("L.scratchpad"===a?mxSettings.settings.customLibraries.splice(0,0,a):mxSettings.settings.customLibraries.push(a));mxSettings.save()},removeCustomLibrary:function(a){mxSettings.load();mxUtils.remove(a,mxSettings.settings.customLibraries);mxSettings.save()},getCustomLibraries:function(){return mxSettings.settings.customLibraries},getPlugins:function(){return mxSettings.settings.plugins},
@@ -10920,27 +10923,27 @@ DrawioFileSync.prototype.fileChangedNotify=function(a){if(this.isValidState())if
DrawioFileSync.prototype.fileChanged=function(a,d,c,b){return this.notifyThread=b=window.setTimeout(mxUtils.bind(this,function(){null!=c&&c()||(this.isValidState()?this.file.loadPatchDescriptor(mxUtils.bind(this,function(b){null!=c&&c()||(this.isValidState()?this.catchup(b,a,d,c):null!=d&&d())}),d):null!=d&&d())}),b?this.cacheReadyDelay:0)};
DrawioFileSync.prototype.reloadDescriptor=function(){this.file.loadDescriptor(mxUtils.bind(this,function(a){null!=a?(this.file.setDescriptorRevisionId(a,this.file.getCurrentRevisionId()),this.updateDescriptor(a),this.fileChangedNotify()):(this.file.inConflictState=!0,this.file.handleFileError())}),mxUtils.bind(this,function(a){this.file.inConflictState=!0;this.file.handleFileError(a)}))};
DrawioFileSync.prototype.updateDescriptor=function(a){this.file.setDescriptor(a);this.file.descriptorChanged();this.start()};
-DrawioFileSync.prototype.p2pCatchup=function(a,d,c,b,f,g,m,e){if(null!=f&&(null==e||!e()))if(this.file.getDescriptorRevisionId(f),this.file.getCurrentRevisionId(),this.isValidState()){if(this.file.getDescriptorSecret(f),null==e||!e()){this.file.stats.bytesReceived+=a.length;d=null;c=[];try{if(a=[a],null!=a&&0<a.length)for(b=0;b<a.length;b++){var k=this.stringToObject(a[b]);if(k.v>DrawioFileSync.PROTOCOL){failed=!0;c=[];break}else if(k.v===DrawioFileSync.PROTOCOL&&null!=k.d)d=k.d.checksum,c.push(k.d.patch);
-else{failed=!0;c=[];break}}}catch(l){c=[],null!=window.console&&"1"==urlParams.test&&console.log(l)}try{0<c.length?(this.file.stats.cacheHits++,this.merge(c,d,f,g,m,e)):(this.file.stats.cacheFail++,this.reload(g,m,e))}catch(l){null!=m&&m(l)}}}else null!=m&&m()};
-DrawioFileSync.prototype.catchup=function(a,d,c,b){if(null!=a&&(null==b||!b())){var f=this.file.getDescriptorRevisionId(a),g=this.file.getCurrentRevisionId();if(g==f)this.file.patchDescriptor(this.file.getDescriptor(),a),null!=d&&d();else if(this.isValidState()){var m=this.file.getDescriptorSecret(a);if(null==m||"1"==urlParams.lockdown)this.reload(d,c,b);else{var e=0,k=!1,l=mxUtils.bind(this,function(){if(null==b||!b())if(g!=this.file.getCurrentRevisionId())null!=d&&d();else if(this.isValidState()){var n=
-!0,p=window.setTimeout(mxUtils.bind(this,function(){n=!1;this.reload(d,c,b)}),this.ui.timeout);mxUtils.get(EditorUi.cacheUrl+"?id="+encodeURIComponent(this.channelId)+"&from="+encodeURIComponent(g)+"&to="+encodeURIComponent(f)+(null!=m?"&secret="+encodeURIComponent(m):""),mxUtils.bind(this,function(f){this.file.stats.bytesReceived+=f.getText().length;window.clearTimeout(p);if(n&&(null==b||!b()))if(g!=this.file.getCurrentRevisionId())null!=d&&d();else if(this.isValidState()){var m=null,q=[];if(200<=
-f.getStatus()&&299>=f.getStatus()&&0<f.getText().length)try{var v=JSON.parse(f.getText());if(null!=v&&0<v.length)for(var z=0;z<v.length;z++){var y=this.stringToObject(v[z]);if(y.v>DrawioFileSync.PROTOCOL){k=!0;q=[];break}else if(y.v===DrawioFileSync.PROTOCOL&&null!=y.d)m=y.d.checksum,q.push(y.d.patch);else{k=!0;q=[];break}}}catch(x){q=[],null!=window.console&&"1"==urlParams.test&&console.log(x)}try{0<q.length?(this.file.stats.cacheHits++,this.merge(q,m,a,d,c,b)):e<=this.maxCacheReadyRetries-1&&!k&&
-401!=f.getStatus()&&503!=f.getStatus()?(e++,this.file.stats.cacheMiss++,window.setTimeout(l,(e+1)*this.cacheReadyDelay)):(this.file.stats.cacheFail++,this.reload(d,c,b))}catch(x){null!=c&&c(x)}}else null!=c&&c()}))}else null!=c&&c()});window.setTimeout(l,this.cacheReadyDelay)}}else null!=c&&c()}};
+DrawioFileSync.prototype.p2pCatchup=function(a,d,c,b,g,f,m,e){if(null!=g&&(null==e||!e()))if(this.file.getDescriptorRevisionId(g),this.file.getCurrentRevisionId(),this.isValidState()){if(this.file.getDescriptorSecret(g),null==e||!e()){this.file.stats.bytesReceived+=a.length;d=null;c=[];try{if(a=[a],null!=a&&0<a.length)for(b=0;b<a.length;b++){var k=this.stringToObject(a[b]);if(k.v>DrawioFileSync.PROTOCOL){failed=!0;c=[];break}else if(k.v===DrawioFileSync.PROTOCOL&&null!=k.d)d=k.d.checksum,c.push(k.d.patch);
+else{failed=!0;c=[];break}}}catch(l){c=[],null!=window.console&&"1"==urlParams.test&&console.log(l)}try{0<c.length?(this.file.stats.cacheHits++,this.merge(c,d,g,f,m,e)):(this.file.stats.cacheFail++,this.reload(f,m,e))}catch(l){null!=m&&m(l)}}}else null!=m&&m()};
+DrawioFileSync.prototype.catchup=function(a,d,c,b){if(null!=a&&(null==b||!b())){var g=this.file.getDescriptorRevisionId(a),f=this.file.getCurrentRevisionId();if(f==g)this.file.patchDescriptor(this.file.getDescriptor(),a),null!=d&&d();else if(this.isValidState()){var m=this.file.getDescriptorSecret(a);if(null==m||"1"==urlParams.lockdown)this.reload(d,c,b);else{var e=0,k=!1,l=mxUtils.bind(this,function(){if(null==b||!b())if(f!=this.file.getCurrentRevisionId())null!=d&&d();else if(this.isValidState()){var n=
+!0,p=window.setTimeout(mxUtils.bind(this,function(){n=!1;this.reload(d,c,b)}),this.ui.timeout);mxUtils.get(EditorUi.cacheUrl+"?id="+encodeURIComponent(this.channelId)+"&from="+encodeURIComponent(f)+"&to="+encodeURIComponent(g)+(null!=m?"&secret="+encodeURIComponent(m):""),mxUtils.bind(this,function(g){this.file.stats.bytesReceived+=g.getText().length;window.clearTimeout(p);if(n&&(null==b||!b()))if(f!=this.file.getCurrentRevisionId())null!=d&&d();else if(this.isValidState()){var m=null,q=[];if(200<=
+g.getStatus()&&299>=g.getStatus()&&0<g.getText().length)try{var v=JSON.parse(g.getText());if(null!=v&&0<v.length)for(var z=0;z<v.length;z++){var y=this.stringToObject(v[z]);if(y.v>DrawioFileSync.PROTOCOL){k=!0;q=[];break}else if(y.v===DrawioFileSync.PROTOCOL&&null!=y.d)m=y.d.checksum,q.push(y.d.patch);else{k=!0;q=[];break}}}catch(x){q=[],null!=window.console&&"1"==urlParams.test&&console.log(x)}try{0<q.length?(this.file.stats.cacheHits++,this.merge(q,m,a,d,c,b)):e<=this.maxCacheReadyRetries-1&&!k&&
+401!=g.getStatus()&&503!=g.getStatus()?(e++,this.file.stats.cacheMiss++,window.setTimeout(l,(e+1)*this.cacheReadyDelay)):(this.file.stats.cacheFail++,this.reload(d,c,b))}catch(x){null!=c&&c(x)}}else null!=c&&c()}))}else null!=c&&c()});window.setTimeout(l,this.cacheReadyDelay)}}else null!=c&&c()}};
DrawioFileSync.prototype.reload=function(a,d,c,b){this.file.updateFile(mxUtils.bind(this,function(){this.lastModified=this.file.getLastModifiedDate();this.updateStatus();this.start();null!=a&&a()}),mxUtils.bind(this,function(a){null!=d&&d(a)}),c,b)};
-DrawioFileSync.prototype.merge=function(a,d,c,b,f,g){try{this.file.stats.merged++;this.lastModified=new Date;this.file.shadowPages=null!=this.file.shadowPages?this.file.shadowPages:this.ui.getPagesForNode(mxUtils.parseXml(this.file.shadowData).documentElement);this.file.backupPatch=this.file.isModified()?this.ui.diffPages(this.file.shadowPages,this.ui.pages):null;var m=this.file.ignorePatches(a),e=this.file.getDescriptorRevisionId(c);if(!m){for(g=0;g<a.length;g++)this.file.shadowPages=this.ui.patchPages(this.file.shadowPages,
-a[g]);var k=null!=d?this.ui.getHashValueForPages(this.file.shadowPages):null;"1"==urlParams.test&&EditorUi.debug("Sync.merge",[this],"from",this.file.getCurrentRevisionId(),"to",e,"etag",this.file.getDescriptorEtag(c),"backup",this.file.backupPatch,"attempt",this.catchupRetryCount,"patches",a,"checksum",d==k,d);if(null!=d&&d!=k){var l=this.ui.hashValue(this.file.getCurrentRevisionId()),n=this.ui.hashValue(e);this.file.checksumError(f,a,"From: "+l+"\nTo: "+n+"\nChecksum: "+d+"\nCurrent: "+k,e,"merge");
-return}this.file.patch(a,DrawioFile.LAST_WRITE_WINS?this.file.backupPatch:null)}this.file.invalidChecksum=!1;this.file.inConflictState=!1;this.file.patchDescriptor(this.file.getDescriptor(),c);this.file.backupPatch=null;null!=b&&b()}catch(u){this.file.inConflictState=!0;this.file.invalidChecksum=!0;this.file.descriptorChanged();null!=f&&f(u);try{if(this.file.errorReportsEnabled)l=this.ui.hashValue(this.file.getCurrentRevisionId()),n=this.ui.hashValue(e),this.file.sendErrorReport("Error in merge",
+DrawioFileSync.prototype.merge=function(a,d,c,b,g,f){try{this.file.stats.merged++;this.lastModified=new Date;this.file.shadowPages=null!=this.file.shadowPages?this.file.shadowPages:this.ui.getPagesForNode(mxUtils.parseXml(this.file.shadowData).documentElement);this.file.backupPatch=this.file.isModified()?this.ui.diffPages(this.file.shadowPages,this.ui.pages):null;var m=this.file.ignorePatches(a),e=this.file.getDescriptorRevisionId(c);if(!m){for(f=0;f<a.length;f++)this.file.shadowPages=this.ui.patchPages(this.file.shadowPages,
+a[f]);var k=null!=d?this.ui.getHashValueForPages(this.file.shadowPages):null;"1"==urlParams.test&&EditorUi.debug("Sync.merge",[this],"from",this.file.getCurrentRevisionId(),"to",e,"etag",this.file.getDescriptorEtag(c),"backup",this.file.backupPatch,"attempt",this.catchupRetryCount,"patches",a,"checksum",d==k,d);if(null!=d&&d!=k){var l=this.ui.hashValue(this.file.getCurrentRevisionId()),n=this.ui.hashValue(e);this.file.checksumError(g,a,"From: "+l+"\nTo: "+n+"\nChecksum: "+d+"\nCurrent: "+k,e,"merge");
+return}this.file.patch(a,DrawioFile.LAST_WRITE_WINS?this.file.backupPatch:null)}this.file.invalidChecksum=!1;this.file.inConflictState=!1;this.file.patchDescriptor(this.file.getDescriptor(),c);this.file.backupPatch=null;null!=b&&b()}catch(u){this.file.inConflictState=!0;this.file.invalidChecksum=!0;this.file.descriptorChanged();null!=g&&g(u);try{if(this.file.errorReportsEnabled)l=this.ui.hashValue(this.file.getCurrentRevisionId()),n=this.ui.hashValue(e),this.file.sendErrorReport("Error in merge",
"From: "+l+"\nTo: "+n+"\nChecksum: "+d+"\nPatches:\n"+this.file.compressReportData(JSON.stringify(a,null,2)),u);else{var p=this.file.getCurrentUser(),q=null!=p?p.id:"unknown";EditorUi.logError("Error in merge",null,this.file.getMode()+"."+this.file.getId(),q,u)}}catch(t){}}};
DrawioFileSync.prototype.descriptorChanged=function(a){this.lastModified=this.file.getLastModifiedDate();if(null!=this.channelId){var d=this.objectToString(this.createMessage({a:"desc",m:this.lastModified.getTime()})),c=this.file.getCurrentRevisionId(),b=this.objectToString({});mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()+"&from="+encodeURIComponent(a)+"&to="+encodeURIComponent(c)+"&msg="+encodeURIComponent(d)+"&data="+encodeURIComponent(b));this.file.stats.bytesSent+=b.length;this.file.stats.msgSent++}this.updateStatus()};
DrawioFileSync.prototype.objectToString=function(a){a=Graph.compress(JSON.stringify(a));null!=this.key&&"undefined"!==typeof CryptoJS&&(a=CryptoJS.AES.encrypt(a,this.key).toString());return a};DrawioFileSync.prototype.stringToObject=function(a){null!=this.key&&"undefined"!==typeof CryptoJS&&(a=CryptoJS.AES.decrypt(a,this.key).toString(CryptoJS.enc.Utf8));return JSON.parse(Graph.decompress(a))};
-DrawioFileSync.prototype.createToken=function(a,d,c){var b=!0,f=window.setTimeout(mxUtils.bind(this,function(){b=!1;c({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.ui.timeout);mxUtils.get(EditorUi.cacheUrl+"?id="+encodeURIComponent(this.channelId)+"&secret="+encodeURIComponent(a),mxUtils.bind(this,function(a){window.clearTimeout(f);b&&(200<=a.getStatus()&&299>=a.getStatus()?d(a.getText()):c({code:a.getStatus(),message:"Token Error "+a.getStatus()}))}))};
+DrawioFileSync.prototype.createToken=function(a,d,c){var b=!0,g=window.setTimeout(mxUtils.bind(this,function(){b=!1;c({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.ui.timeout);mxUtils.get(EditorUi.cacheUrl+"?id="+encodeURIComponent(this.channelId)+"&secret="+encodeURIComponent(a),mxUtils.bind(this,function(a){window.clearTimeout(g);b&&(200<=a.getStatus()&&299>=a.getStatus()?d(a.getText()):c({code:a.getStatus(),message:"Token Error "+a.getStatus()}))}))};
DrawioFileSync.prototype.fileSaving=function(){var a=this.objectToString(this.createMessage({m:(new Date).getTime(),type:"optimistic"}));mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()+"&msg="+encodeURIComponent(a),function(){})};
-DrawioFileSync.prototype.sendFileChanges=function(a,d){this.lastModified=this.file.getLastModifiedDate();var c=this.objectToString(this.createMessage({m:this.lastModified.getTime()})),b=this.file.getDescriptorSecret(this.file.getDescriptor()),f=this.file.getDescriptorRevisionId(d),g=this.file.getCurrentRevisionId(),m=null!=this.file.shadowPages?this.file.shadowPages:this.ui.getPagesForNode(mxUtils.parseXml(this.file.shadowData).documentElement),e=this.file.getDescriptorSecret(d),k=this.ui.getHashValueForPages(a),
-m=this.ui.diffPages(m,a),k=this.objectToString(this.createMessage({patch:m,checksum:k}));this.file.p2pCollab.sendMessage("diff",{id:this.channelId,from:f,to:g,msg:c,secret:b,lastSecret:e,data:k})};
-DrawioFileSync.prototype.fileSaved=function(a,d,c,b,f){this.lastModified=this.file.getLastModifiedDate();this.resetUpdateStatusThread();this.catchupRetryCount=0;if(!this.ui.isOffline(!0)&&!this.file.inConflictState&&!this.file.redirectDialogShowing&&(this.start(),null!=this.channelId)){var g=this.objectToString(this.createMessage({m:this.lastModified.getTime()})),m=this.file.getDescriptorSecret(this.file.getDescriptor()),e=this.file.getDescriptorRevisionId(d),k=this.file.getCurrentRevisionId();if(null==
-m||"1"==urlParams.lockdown)this.file.stats.msgSent++,mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()+"&msg="+encodeURIComponent(g),function(){}),null!=c&&c(),"1"==urlParams.test&&EditorUi.debug("Sync.fileSaved",[this],"from",e,"to",k,"etag",this.file.getCurrentEtag(),"notify");else{var l=null!=this.file.shadowPages?this.file.shadowPages:this.ui.getPagesForNode(mxUtils.parseXml(this.file.shadowData).documentElement);d=this.file.getDescriptorSecret(d);var n=this.ui.getHashValueForPages(a),l=this.ui.diffPages(l,
-a),p=this.objectToString(this.createMessage({patch:l,checksum:n}));this.file.stats.bytesSent+=p.length;this.file.stats.msgSent++;var q=!0,u=window.setTimeout(mxUtils.bind(this,function(){q=!1;b({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.ui.timeout);mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()+"&from="+encodeURIComponent(e)+"&to="+encodeURIComponent(k)+"&msg="+encodeURIComponent(g)+(null!=m?"&secret="+encodeURIComponent(m):"")+(null!=d?"&last-secret="+encodeURIComponent(d):
-"")+(p.length<this.maxCacheEntrySize?"&data="+encodeURIComponent(p):"")+(null!=f?"&token="+encodeURIComponent(f):""),mxUtils.bind(this,function(a){window.clearTimeout(u);q&&(200<=a.getStatus()&&299>=a.getStatus()?null!=c&&c():b({code:a.getStatus(),message:a.getStatus()}))}));"1"==urlParams.test&&EditorUi.debug("Sync.fileSaved",[this],"from",e,"to",k,"etag",this.file.getCurrentEtag(),p.length,"bytes","diff",l,"checksum",n)}}this.file.shadowPages=a};
+DrawioFileSync.prototype.sendFileChanges=function(a,d){this.lastModified=this.file.getLastModifiedDate();var c=this.objectToString(this.createMessage({m:this.lastModified.getTime()})),b=this.file.getDescriptorSecret(this.file.getDescriptor()),g=this.file.getDescriptorRevisionId(d),f=this.file.getCurrentRevisionId(),m=null!=this.file.shadowPages?this.file.shadowPages:this.ui.getPagesForNode(mxUtils.parseXml(this.file.shadowData).documentElement),e=this.file.getDescriptorSecret(d),k=this.ui.getHashValueForPages(a),
+m=this.ui.diffPages(m,a),k=this.objectToString(this.createMessage({patch:m,checksum:k}));this.file.p2pCollab.sendMessage("diff",{id:this.channelId,from:g,to:f,msg:c,secret:b,lastSecret:e,data:k})};
+DrawioFileSync.prototype.fileSaved=function(a,d,c,b,g){this.lastModified=this.file.getLastModifiedDate();this.resetUpdateStatusThread();this.catchupRetryCount=0;if(!this.ui.isOffline(!0)&&!this.file.inConflictState&&!this.file.redirectDialogShowing&&(this.start(),null!=this.channelId)){var f=this.objectToString(this.createMessage({m:this.lastModified.getTime()})),m=this.file.getDescriptorSecret(this.file.getDescriptor()),e=this.file.getDescriptorRevisionId(d),k=this.file.getCurrentRevisionId();if(null==
+m||"1"==urlParams.lockdown)this.file.stats.msgSent++,mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()+"&msg="+encodeURIComponent(f),function(){}),null!=c&&c(),"1"==urlParams.test&&EditorUi.debug("Sync.fileSaved",[this],"from",e,"to",k,"etag",this.file.getCurrentEtag(),"notify");else{var l=null!=this.file.shadowPages?this.file.shadowPages:this.ui.getPagesForNode(mxUtils.parseXml(this.file.shadowData).documentElement);d=this.file.getDescriptorSecret(d);var n=this.ui.getHashValueForPages(a),l=this.ui.diffPages(l,
+a),p=this.objectToString(this.createMessage({patch:l,checksum:n}));this.file.stats.bytesSent+=p.length;this.file.stats.msgSent++;var q=!0,u=window.setTimeout(mxUtils.bind(this,function(){q=!1;b({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.ui.timeout);mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()+"&from="+encodeURIComponent(e)+"&to="+encodeURIComponent(k)+"&msg="+encodeURIComponent(f)+(null!=m?"&secret="+encodeURIComponent(m):"")+(null!=d?"&last-secret="+encodeURIComponent(d):
+"")+(p.length<this.maxCacheEntrySize?"&data="+encodeURIComponent(p):"")+(null!=g?"&token="+encodeURIComponent(g):""),mxUtils.bind(this,function(a){window.clearTimeout(u);q&&(200<=a.getStatus()&&299>=a.getStatus()?null!=c&&c():b({code:a.getStatus(),message:a.getStatus()}))}));"1"==urlParams.test&&EditorUi.debug("Sync.fileSaved",[this],"from",e,"to",k,"etag",this.file.getCurrentEtag(),p.length,"bytes","diff",l,"checksum",n)}}this.file.shadowPages=a};
DrawioFileSync.prototype.getIdParameters=function(){var a="id="+this.channelId;null!=this.pusher&&null!=this.pusher.connection&&null!=this.pusher.connection.socket_id&&(a+="&sid="+this.pusher.connection.socket_id);return a};DrawioFileSync.prototype.createMessage=function(a){return{v:DrawioFileSync.PROTOCOL,d:a,c:this.clientId}};
DrawioFileSync.prototype.fileConflict=function(a,d,c){this.catchupRetryCount++;this.catchupRetryCount<this.maxCatchupRetries?(this.file.stats.conflicts++,null!=a?this.catchup(a,d,c):this.fileChanged(d,c)):(this.file.stats.timeouts++,this.catchupRetryCount=0,null!=c&&c({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")}))};
DrawioFileSync.prototype.stop=function(){null!=this.pusher&&(EditorUi.debug("Sync.stop",[this]),null!=this.pusher.connection&&(this.pusher.connection.unbind("state_change",this.connectionListener),this.pusher.connection.unbind("error",this.pusherErrorListener)),null!=this.channel&&(this.channel.unbind("changed",this.changeListener),this.channel=null),this.pusher.disconnect(),this.pusher=null);this.updateOnlineState();this.updateStatus()};
@@ -10948,45 +10951,45 @@ DrawioFileSync.prototype.destroy=function(){if(null!=this.channelId){var a=this.
"online",this.onlineListener),this.onlineListener=null);null!=this.visibleListener&&(mxEvent.removeListener(document,"visibilitychange",this.visibleListener),this.visibleListener=null);null!=this.activityListener&&(mxEvent.removeListener(document,mxClient.IS_POINTER?"pointermove":"mousemove",this.activityListener),mxEvent.removeListener(document,"keypress",this.activityListener),mxEvent.removeListener(window,"focus",this.activityListener),!mxClient.IS_POINTER&&mxClient.IS_TOUCH&&(mxEvent.removeListener(document,
"touchstart",this.activityListener),mxEvent.removeListener(document,"touchmove",this.activityListener)),this.activityListener=null);null!=this.collaboratorsElement&&(this.collaboratorsElement.parentNode.removeChild(this.collaboratorsElement),this.collaboratorsElement=null)};Graph.prototype.defaultThemes["default-style2"]=mxUtils.parseXml('<mxStylesheet><add as="defaultVertex"><add as="shape" value="label"/><add as="perimeter" value="rectanglePerimeter"/><add as="fontSize" value="12"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="fillColor" value="#ffffff"/><add as="strokeColor" value="#000000"/><add as="fontColor" value="#000000"/></add><add as="defaultEdge"><add as="shape" value="connector"/><add as="labelBackgroundColor" value="#ffffff"/><add as="endArrow" value="classic"/><add as="fontSize" value="11"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="rounded" value="1"/><add as="strokeColor" value="#000000"/><add as="fontColor" value="#000000"/></add><add as="text"><add as="fillColor" value="none"/><add as="gradientColor" value="none"/><add as="strokeColor" value="none"/><add as="align" value="left"/><add as="verticalAlign" value="top"/></add><add as="edgeLabel" extend="text"><add as="labelBackgroundColor" value="#ffffff"/><add as="fontSize" value="11"/></add><add as="label"><add as="fontStyle" value="1"/><add as="align" value="left"/><add as="verticalAlign" value="middle"/><add as="spacing" value="2"/><add as="spacingLeft" value="52"/><add as="imageWidth" value="42"/><add as="imageHeight" value="42"/><add as="rounded" value="1"/></add><add as="icon" extend="label"><add as="align" value="center"/><add as="imageAlign" value="center"/><add as="verticalLabelPosition" value="bottom"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="4"/><add as="labelBackgroundColor" value="#ffffff"/><add as="spacing" value="0"/><add as="spacingLeft" value="0"/><add as="spacingTop" value="6"/><add as="fontStyle" value="0"/><add as="imageWidth" value="48"/><add as="imageHeight" value="48"/></add><add as="swimlane"><add as="shape" value="swimlane"/><add as="fontSize" value="12"/><add as="fontStyle" value="1"/><add as="startSize" value="23"/></add><add as="group"><add as="verticalAlign" value="top"/><add as="fillColor" value="none"/><add as="strokeColor" value="none"/><add as="gradientColor" value="none"/><add as="pointerEvents" value="0"/></add><add as="ellipse"><add as="shape" value="ellipse"/><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombus"><add as="shape" value="rhombus"/><add as="perimeter" value="rhombusPerimeter"/></add><add as="triangle"><add as="shape" value="triangle"/><add as="perimeter" value="trianglePerimeter"/></add><add as="line"><add as="shape" value="line"/><add as="strokeWidth" value="4"/><add as="labelBackgroundColor" value="#ffffff"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="8"/></add><add as="image"><add as="shape" value="image"/><add as="labelBackgroundColor" value="white"/><add as="verticalAlign" value="top"/><add as="verticalLabelPosition" value="bottom"/></add><add as="roundImage" extend="image"><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombusImage" extend="image"><add as="perimeter" value="rhombusPerimeter"/></add><add as="arrow"><add as="shape" value="arrow"/><add as="edgeStyle" value="none"/><add as="fillColor" value="#ffffff"/></add><add as="fancy"><add as="shadow" value="1"/><add as="glass" value="1"/></add><add as="gray" extend="fancy"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="blue" extend="fancy"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="green" extend="fancy"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="turquoise" extend="fancy"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="yellow" extend="fancy"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="orange" extend="fancy"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="red" extend="fancy"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="pink" extend="fancy"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="purple" extend="fancy"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add><add as="plain-gray"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="plain-blue"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="plain-green"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="plain-turquoise"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="plain-yellow"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="plain-orange"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="plain-red"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="plain-pink"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="plain-purple"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add></mxStylesheet>').documentElement;
Graph.prototype.defaultThemes.darkTheme=mxUtils.parseXml('<mxStylesheet><add as="defaultVertex"><add as="shape" value="label"/><add as="perimeter" value="rectanglePerimeter"/><add as="fontSize" value="12"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="fillColor" value="#2a2a2a"/><add as="strokeColor" value="#f0f0f0"/><add as="fontColor" value="#f0f0f0"/></add><add as="defaultEdge"><add as="shape" value="connector"/><add as="labelBackgroundColor" value="#2a2a2a"/><add as="endArrow" value="classic"/><add as="fontSize" value="11"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="rounded" value="1"/><add as="strokeColor" value="#f0f0f0"/><add as="fontColor" value="#f0f0f0"/></add><add as="text"><add as="fillColor" value="none"/><add as="gradientColor" value="none"/><add as="strokeColor" value="none"/><add as="align" value="left"/><add as="verticalAlign" value="top"/></add><add as="edgeLabel" extend="text"><add as="labelBackgroundColor" value="#2a2a2a"/><add as="fontSize" value="11"/></add><add as="label"><add as="fontStyle" value="1"/><add as="align" value="left"/><add as="verticalAlign" value="middle"/><add as="spacing" value="2"/><add as="spacingLeft" value="52"/><add as="imageWidth" value="42"/><add as="imageHeight" value="42"/><add as="rounded" value="1"/></add><add as="icon" extend="label"><add as="align" value="center"/><add as="imageAlign" value="center"/><add as="verticalLabelPosition" value="bottom"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="4"/><add as="labelBackgroundColor" value="#2a2a2a"/><add as="spacing" value="0"/><add as="spacingLeft" value="0"/><add as="spacingTop" value="6"/><add as="fontStyle" value="0"/><add as="imageWidth" value="48"/><add as="imageHeight" value="48"/></add><add as="swimlane"><add as="shape" value="swimlane"/><add as="fontSize" value="12"/><add as="fontStyle" value="1"/><add as="startSize" value="23"/></add><add as="group"><add as="verticalAlign" value="top"/><add as="fillColor" value="none"/><add as="strokeColor" value="none"/><add as="gradientColor" value="none"/><add as="pointerEvents" value="0"/></add><add as="ellipse"><add as="shape" value="ellipse"/><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombus"><add as="shape" value="rhombus"/><add as="perimeter" value="rhombusPerimeter"/></add><add as="triangle"><add as="shape" value="triangle"/><add as="perimeter" value="trianglePerimeter"/></add><add as="line"><add as="shape" value="line"/><add as="strokeWidth" value="4"/><add as="labelBackgroundColor" value="#2a2a2a"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="8"/></add><add as="image"><add as="shape" value="image"/><add as="labelBackgroundColor" value="#2a2a2a"/><add as="verticalAlign" value="top"/><add as="verticalLabelPosition" value="bottom"/></add><add as="roundImage" extend="image"><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombusImage" extend="image"><add as="perimeter" value="rhombusPerimeter"/></add><add as="arrow"><add as="shape" value="arrow"/><add as="edgeStyle" value="none"/><add as="fillColor" value="#2a2a2a"/></add></mxStylesheet>').documentElement;function mxAsyncCanvas(a){mxAbstractCanvas2D.call(this);this.htmlCanvas=a;a.images=a.images||[];a.subCanvas=a.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 a="";(this.state.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&(a+="bold ");(this.state.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&(a+="italic ");this.ctx.font=a+this.state.fontSize+"px "+this.state.fontFamily};mxAsyncCanvas.prototype.rotate=function(a,d,c,b,f){};
+mxAsyncCanvas.prototype.decWaitCounter=function(){this.waitCounter--;0==this.waitCounter&&null!=this.onComplete&&(this.onComplete(),this.onComplete=null)};mxAsyncCanvas.prototype.updateFont=function(){var a="";(this.state.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&(a+="bold ");(this.state.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&(a+="italic ");this.ctx.font=a+this.state.fontSize+"px "+this.state.fontFamily};mxAsyncCanvas.prototype.rotate=function(a,d,c,b,g){};
mxAsyncCanvas.prototype.setAlpha=function(a){this.state.alpha=a};mxAsyncCanvas.prototype.setFontColor=function(a){this.state.fontColor=a};mxAsyncCanvas.prototype.setFontBackgroundColor=function(a){a==mxConstants.NONE&&(a=null);this.state.fontBackgroundColor=a};mxAsyncCanvas.prototype.setFontBorderColor=function(a){a==mxConstants.NONE&&(a=null);this.state.fontBorderColor=a};mxAsyncCanvas.prototype.setFontSize=function(a){this.state.fontSize=a};
-mxAsyncCanvas.prototype.setFontFamily=function(a){this.state.fontFamily=a};mxAsyncCanvas.prototype.setFontStyle=function(a){this.state.fontStyle=a};mxAsyncCanvas.prototype.rect=function(a,d,c,b){};mxAsyncCanvas.prototype.roundrect=function(a,d,c,b,f,g){};mxAsyncCanvas.prototype.ellipse=function(a,d,c,b){};mxAsyncCanvas.prototype.rewriteImageSource=function(a){if("http://"==a.substring(0,7)||"https://"==a.substring(0,8))a="/proxy?url="+encodeURIComponent(a);return a};
-mxAsyncCanvas.prototype.image=function(a,d,c,b,f,g,m,e){f=this.rewriteImageSource(f);a=this.htmlCanvas.images[f];null==a&&(a=new Image,a.onload=mxUtils.bind(this,function(){this.decWaitCounter()}),a.onerror=mxUtils.bind(this,function(){this.decWaitCounter()}),this.incWaitCounter(),this.htmlCanvas.images[f]=a,a.src=f)};mxAsyncCanvas.prototype.fill=function(){};mxAsyncCanvas.prototype.stroke=function(){};mxAsyncCanvas.prototype.fillAndStroke=function(){};
-mxAsyncCanvas.prototype.text=function(a,d,c,b,f,g,m,e,k,l,n,p){if(null!=f&&0!=f.length&&(a=this.state.scale,"html"==k&&"function"===typeof html2canvas)){this.incWaitCounter();var q=this.canvasIndex++;html2canvas(f,{onrendered:mxUtils.bind(this,function(a){this.htmlCanvas.subCanvas[q]=a;this.decWaitCounter()}),scale:a,logging:!0})}};mxAsyncCanvas.prototype.finish=function(a){0==this.waitCounter?a():this.onComplete=a};function mxJsCanvas(a){mxAbstractCanvas2D.call(this);this.ctx=a.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(a){a=a.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,function(a,c,b,f){return c+c+b+b+f+f});return(a=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(a))?{r:parseInt(a[1],16),g:parseInt(a[2],16),b:parseInt(a[3],16)}:null};mxJsCanvas.prototype.incWaitCounter=function(){this.waitCounter++};
+mxAsyncCanvas.prototype.setFontFamily=function(a){this.state.fontFamily=a};mxAsyncCanvas.prototype.setFontStyle=function(a){this.state.fontStyle=a};mxAsyncCanvas.prototype.rect=function(a,d,c,b){};mxAsyncCanvas.prototype.roundrect=function(a,d,c,b,g,f){};mxAsyncCanvas.prototype.ellipse=function(a,d,c,b){};mxAsyncCanvas.prototype.rewriteImageSource=function(a){if("http://"==a.substring(0,7)||"https://"==a.substring(0,8))a="/proxy?url="+encodeURIComponent(a);return a};
+mxAsyncCanvas.prototype.image=function(a,d,c,b,g,f,m,e){g=this.rewriteImageSource(g);a=this.htmlCanvas.images[g];null==a&&(a=new Image,a.onload=mxUtils.bind(this,function(){this.decWaitCounter()}),a.onerror=mxUtils.bind(this,function(){this.decWaitCounter()}),this.incWaitCounter(),this.htmlCanvas.images[g]=a,a.src=g)};mxAsyncCanvas.prototype.fill=function(){};mxAsyncCanvas.prototype.stroke=function(){};mxAsyncCanvas.prototype.fillAndStroke=function(){};
+mxAsyncCanvas.prototype.text=function(a,d,c,b,g,f,m,e,k,l,n,p){if(null!=g&&0!=g.length&&(a=this.state.scale,"html"==k&&"function"===typeof html2canvas)){this.incWaitCounter();var q=this.canvasIndex++;html2canvas(g,{onrendered:mxUtils.bind(this,function(a){this.htmlCanvas.subCanvas[q]=a;this.decWaitCounter()}),scale:a,logging:!0})}};mxAsyncCanvas.prototype.finish=function(a){0==this.waitCounter?a():this.onComplete=a};function mxJsCanvas(a){mxAbstractCanvas2D.call(this);this.ctx=a.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(a){a=a.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,function(a,c,b,g){return c+c+b+b+g+g});return(a=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(a))?{r:parseInt(a[1],16),g:parseInt(a[2],16),b:parseInt(a[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 a="";(this.state.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&(a+="bold ");(this.state.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&(a+="italic ");this.ctx.font=a+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(a){this.state.scale*=a;this.state.strokeWidth*=a;this.ctx.scale(a,a)};mxJsCanvas.prototype.translate=function(a,d){this.state.dx+=a;this.state.dy+=d;this.ctx.translate(a,d)};
-mxJsCanvas.prototype.rotate=function(a,d,c,b,f){b-=this.state.dx;f-=this.state.dy;this.ctx.translate(b,f);(d||c)&&this.ctx.scale(d?-1:1,c?-1:1);this.ctx.rotate(a*this.M_RAD_PER_DEG);this.ctx.translate(-b,-f)};mxJsCanvas.prototype.setAlpha=function(a){this.state.alpha=a;this.ctx.globalAlpha=a};mxJsCanvas.prototype.setFillColor=function(a){a==mxConstants.NONE&&(a=null);this.state.fillColor=a;this.state.gradientColor=null;this.ctx.fillStyle=a};
-mxJsCanvas.prototype.setGradient=function(a,d,c,b,f,g,m,e,k){c=this.ctx.createLinearGradient(0,b,0,b+g);b=this.state;b.fillColor=a;b.fillAlpha=null!=e?e:1;b.gradientColor=d;b.gradientAlpha=null!=k?k:1;b.gradientDirection=m;a=this.hexToRgb(a);d=this.hexToRgb(d);null!=a&&c.addColorStop(0,"rgba("+a.r+","+a.g+","+a.b+","+b.fillAlpha+")");null!=d&&c.addColorStop(1,"rgba("+d.r+","+d.g+","+d.b+","+b.gradientAlpha+")");this.ctx.fillStyle=c};
+mxJsCanvas.prototype.rotate=function(a,d,c,b,g){b-=this.state.dx;g-=this.state.dy;this.ctx.translate(b,g);(d||c)&&this.ctx.scale(d?-1:1,c?-1:1);this.ctx.rotate(a*this.M_RAD_PER_DEG);this.ctx.translate(-b,-g)};mxJsCanvas.prototype.setAlpha=function(a){this.state.alpha=a;this.ctx.globalAlpha=a};mxJsCanvas.prototype.setFillColor=function(a){a==mxConstants.NONE&&(a=null);this.state.fillColor=a;this.state.gradientColor=null;this.ctx.fillStyle=a};
+mxJsCanvas.prototype.setGradient=function(a,d,c,b,g,f,m,e,k){c=this.ctx.createLinearGradient(0,b,0,b+f);b=this.state;b.fillColor=a;b.fillAlpha=null!=e?e:1;b.gradientColor=d;b.gradientAlpha=null!=k?k:1;b.gradientDirection=m;a=this.hexToRgb(a);d=this.hexToRgb(d);null!=a&&c.addColorStop(0,"rgba("+a.r+","+a.g+","+a.b+","+b.fillAlpha+")");null!=d&&c.addColorStop(1,"rgba("+d.r+","+d.g+","+d.b+","+b.gradientAlpha+")");this.ctx.fillStyle=c};
mxJsCanvas.prototype.setStrokeColor=function(a){null!=a&&(a==mxConstants.NONE?(this.state.strokeColor=null,this.ctx.strokeStyle="rgba(0, 0, 0, 0)"):(this.ctx.strokeStyle=a,this.state.strokeColor=a))};mxJsCanvas.prototype.setStrokeWidth=function(a){this.ctx.lineWidth=a};mxJsCanvas.prototype.setDashed=function(a){if(this.state.dashed=a){a=this.state.dashPattern.split(" ");for(var d=0;d<a.length;d++)a[d]=parseInt(a[d],10);this.setLineDash(a)}else this.setLineDash([0])};
mxJsCanvas.prototype.setLineDash=function(a){try{"function"===typeof this.ctx.setLineDash&&this.ctx.setLineDash(a)}catch(d){}};mxJsCanvas.prototype.setDashPattern=function(a){this.state.dashPattern=a;if(this.state.dashed){a=a.split(" ");for(var d=0;d<a.length;d++)a[d]=parseInt(a[d],10);this.ctx.setLineDash(a)}};mxJsCanvas.prototype.setLineCap=function(a){this.ctx.lineCap=a};mxJsCanvas.prototype.setLineJoin=function(a){this.ctx.lineJoin=a};
mxJsCanvas.prototype.setMiterLimit=function(a){this.ctx.lineJoin=a};mxJsCanvas.prototype.setFontColor=function(a){this.ctx.fillStyle=a};mxJsCanvas.prototype.setFontBackgroundColor=function(a){a==mxConstants.NONE&&(a=null);this.state.fontBackgroundColor=a};mxJsCanvas.prototype.setFontBorderColor=function(a){a==mxConstants.NONE&&(a=null);this.state.fontBorderColor=a};mxJsCanvas.prototype.setFontSize=function(a){this.state.fontSize=a};
mxJsCanvas.prototype.setFontFamily=function(a){this.state.fontFamily=a};mxJsCanvas.prototype.setFontStyle=function(a){this.state.fontStyle=a};mxJsCanvas.prototype.setShadow=function(a){(this.state.shadow=a)?(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(a){if(null==a||a==mxConstants.NONE)a=null,this.ctx.shadowColor="transparent";this.state.shadowColor=a;if(this.state.shadow&&null!=a){var d=null!=this.state.shadowAlpha?this.state.shadowAlpha:1;a=this.hexToRgb(a);this.ctx.shadowColor="rgba("+a.r+","+a.g+","+a.b+","+d+")"}};mxJsCanvas.prototype.setShadowAlpha=function(a){this.state.shadowAlpha=a;this.setShadowColor(this.state.shadowColor)};
mxJsCanvas.prototype.setShadowOffset=function(a,d){this.state.shadowDx=a;this.state.shadowDy=d;this.state.shadow&&(this.ctx.shadowOffsetX=a,this.ctx.shadowOffsetY=d)};mxJsCanvas.prototype.moveTo=function(a,d){this.ctx.moveTo(a,d);this.lastMoveX=a;this.lastMoveY=d};mxJsCanvas.prototype.lineTo=function(a,d){this.ctx.lineTo(a,d);this.lastMoveX=a;this.lastMoveY=d};mxJsCanvas.prototype.quadTo=function(a,d,c,b){this.ctx.quadraticCurveTo(a,d,c,b);this.lastMoveX=c;this.lastMoveY=b};
-mxJsCanvas.prototype.arcTo=function(a,d,c,b,f,g,m){a=mxUtils.arcToCurves(this.lastMoveX,this.lastMoveY,a,d,c,b,f,g,m);if(null!=a)for(d=0;d<a.length;d+=6)this.curveTo(a[d],a[d+1],a[d+2],a[d+3],a[d+4],a[d+5])};mxJsCanvas.prototype.curveTo=function(a,d,c,b,f,g){this.ctx.bezierCurveTo(a,d,c,b,f,g);this.lastMoveX=f;this.lastMoveY=g};mxJsCanvas.prototype.rect=function(a,d,c,b){this.begin();this.moveTo(a,d);this.lineTo(a+c,d);this.lineTo(a+c,d+b);this.lineTo(a,d+b);this.close()};
-mxJsCanvas.prototype.roundrect=function(a,d,c,b,f,g){this.begin();this.moveTo(a+f,d);this.lineTo(a+c-f,d);this.quadTo(a+c,d,a+c,d+g);this.lineTo(a+c,d+b-g);this.quadTo(a+c,d+b,a+c-f,d+b);this.lineTo(a+f,d+b);this.quadTo(a,d+b,a,d+b-g);this.lineTo(a,d+g);this.quadTo(a,d,a+f,d)};mxJsCanvas.prototype.ellipse=function(a,d,c,b){this.ctx.save();this.ctx.translate(a+c/2,d+b/2);this.ctx.scale(c/2,b/2);this.ctx.beginPath();this.ctx.arc(0,0,1,0,2*Math.PI,!1);this.ctx.restore()};
+mxJsCanvas.prototype.arcTo=function(a,d,c,b,g,f,m){a=mxUtils.arcToCurves(this.lastMoveX,this.lastMoveY,a,d,c,b,g,f,m);if(null!=a)for(d=0;d<a.length;d+=6)this.curveTo(a[d],a[d+1],a[d+2],a[d+3],a[d+4],a[d+5])};mxJsCanvas.prototype.curveTo=function(a,d,c,b,g,f){this.ctx.bezierCurveTo(a,d,c,b,g,f);this.lastMoveX=g;this.lastMoveY=f};mxJsCanvas.prototype.rect=function(a,d,c,b){this.begin();this.moveTo(a,d);this.lineTo(a+c,d);this.lineTo(a+c,d+b);this.lineTo(a,d+b);this.close()};
+mxJsCanvas.prototype.roundrect=function(a,d,c,b,g,f){this.begin();this.moveTo(a+g,d);this.lineTo(a+c-g,d);this.quadTo(a+c,d,a+c,d+f);this.lineTo(a+c,d+b-f);this.quadTo(a+c,d+b,a+c-g,d+b);this.lineTo(a+g,d+b);this.quadTo(a,d+b,a,d+b-f);this.lineTo(a,d+f);this.quadTo(a,d,a+g,d)};mxJsCanvas.prototype.ellipse=function(a,d,c,b){this.ctx.save();this.ctx.translate(a+c/2,d+b/2);this.ctx.scale(c/2,b/2);this.ctx.beginPath();this.ctx.arc(0,0,1,0,2*Math.PI,!1);this.ctx.restore()};
mxJsCanvas.prototype.rewriteImageSource=function(a){if("http://"==a.substring(0,7)||"https://"==a.substring(0,8))a="/proxy?url="+encodeURIComponent(a);return a};
-mxJsCanvas.prototype.image=function(a,d,c,b,f,g,m,e){f=this.rewriteImageSource(f);f=this.images[f];if(null!=f&&0<f.height&&0<f.width){var k=this.ctx;k.save();if(g){g=f.width;var l=f.height,n=Math.min(c/g,b/l);a+=(c-g*n)/2;d+=(b-l*n)/2;c=g*n;b=l*n}m&&(k.translate(2*a+c,0),k.scale(-1,1));e&&(k.translate(0,2*d+b),k.scale(1,-1));k.drawImage(f,a,d,c,b);k.restore()}};mxJsCanvas.prototype.begin=function(){this.ctx.beginPath()};mxJsCanvas.prototype.close=function(){this.ctx.closePath()};
+mxJsCanvas.prototype.image=function(a,d,c,b,g,f,m,e){g=this.rewriteImageSource(g);g=this.images[g];if(null!=g&&0<g.height&&0<g.width){var k=this.ctx;k.save();if(f){f=g.width;var l=g.height,n=Math.min(c/f,b/l);a+=(c-f*n)/2;d+=(b-l*n)/2;c=f*n;b=l*n}m&&(k.translate(2*a+c,0),k.scale(-1,1));e&&(k.translate(0,2*d+b),k.scale(1,-1));k.drawImage(g,a,d,c,b);k.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 a=this.ctx.shadowColor,d=this.ctx.shadowOffsetX,c=this.ctx.shadowOffsetY;this.ctx.shadowColor="transparent";this.ctx.shadowOffsetX=0;this.ctx.shadowOffsetY=0;this.ctx.stroke();this.ctx.shadowColor=a;this.ctx.shadowOffsetX=d;this.ctx.shadowOffsetY=c}else this.ctx.fill(),this.ctx.stroke()};
-mxJsCanvas.prototype.text=function(a,d,c,b,f,g,m,e,k,l,n,p){if(null!=f&&0!=f.length){c=this.state.scale;0!=p&&(this.ctx.translate(Math.round(a),Math.round(d)),this.ctx.rotate(p*Math.PI/180),this.ctx.translate(Math.round(-a),Math.round(-d)));if("html"==k){f=this.subCanvas[this.canvasIndex++];k=f.height;p=f.width;switch(m){case mxConstants.ALIGN_MIDDLE:d-=k/2/c;break;case mxConstants.ALIGN_BOTTOM:d-=k/c}switch(g){case mxConstants.ALIGN_CENTER:a-=p/2/c;break;case mxConstants.ALIGN_RIGHT:a-=p/c}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(a)-.5,Math.round(d)-.5,Math.round(f.width/c),Math.round(f.height/c))),null!=this.state.fontBorderColor&&(this.ctx.strokeStyle=this.state.fontBorderColor,this.ctx.lineWidth=1,this.ctx.strokeRect(Math.round(a)-.5,Math.round(d)-.5,Math.round(f.width/c),Math.round(f.height/c)));this.ctx.scale(1/c,1/c);this.ctx.drawImage(f,
-Math.round(a*c),Math.round(d*c))}else{this.ctx.save();this.updateFont();p=document.createElement("div");p.innerHTML=f;p.style.position="absolute";p.style.top="-9999px";p.style.left="-9999px";p.style.fontFamily=this.state.fontFamily;p.style.fontWeight="bold";p.style.fontSize=this.state.fontSize+"pt";document.body.appendChild(p);k=[p.offsetWidth,p.offsetHeight];document.body.removeChild(p);f=f.split("\n");p=k[1];this.ctx.textBaseline="top";k=d;switch(m){case mxConstants.ALIGN_MIDDLE:this.ctx.textBaseline=
-"middle";d-=(f.length-1)*p/2;k=d-this.state.fontSize/2;break;case mxConstants.ALIGN_BOTTOM:this.ctx.textBaseline="alphabetic",d-=p*(f.length-1),k=d-this.state.fontSize}m=[];p=[];for(c=0;c<f.length;c++)p[c]=a,m[c]=this.ctx.measureText(f[c]).width,null!=g&&g!=mxConstants.ALIGN_LEFT&&(p[c]-=m[c],g==mxConstants.ALIGN_CENTER&&(p[c]+=m[c]/2));if(null!=this.state.fontBackgroundColor||null!=this.state.fontBorderColor){a=p[0];g=m[0];for(c=1;c<f.length;c++)a=Math.min(a,p[c]),g=Math.max(g,m[c]);this.ctx.save();
-a=Math.round(a)-.5;k=Math.round(k)-.5;null!=this.state.fontBackgroundColor&&(this.ctx.fillStyle=this.state.fontBackgroundColor,this.ctx.fillRect(a,k,g,this.state.fontSize*mxConstants.LINE_HEIGHT*f.length));null!=this.state.fontBorderColor&&(this.ctx.strokeStyle=this.state.fontBorderColor,this.ctx.lineWidth=1,this.ctx.strokeRect(a,k,g,this.state.fontSize*mxConstants.LINE_HEIGHT*f.length));this.ctx.restore()}for(c=0;c<f.length;c++)this.ctx.fillText(f[c],p[c],d),d+=this.state.fontSize*mxConstants.LINE_HEIGHT}this.ctx.restore()}};
+mxJsCanvas.prototype.text=function(a,d,c,b,g,f,m,e,k,l,n,p){if(null!=g&&0!=g.length){c=this.state.scale;0!=p&&(this.ctx.translate(Math.round(a),Math.round(d)),this.ctx.rotate(p*Math.PI/180),this.ctx.translate(Math.round(-a),Math.round(-d)));if("html"==k){g=this.subCanvas[this.canvasIndex++];k=g.height;p=g.width;switch(m){case mxConstants.ALIGN_MIDDLE:d-=k/2/c;break;case mxConstants.ALIGN_BOTTOM:d-=k/c}switch(f){case mxConstants.ALIGN_CENTER:a-=p/2/c;break;case mxConstants.ALIGN_RIGHT:a-=p/c}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(a)-.5,Math.round(d)-.5,Math.round(g.width/c),Math.round(g.height/c))),null!=this.state.fontBorderColor&&(this.ctx.strokeStyle=this.state.fontBorderColor,this.ctx.lineWidth=1,this.ctx.strokeRect(Math.round(a)-.5,Math.round(d)-.5,Math.round(g.width/c),Math.round(g.height/c)));this.ctx.scale(1/c,1/c);this.ctx.drawImage(g,
+Math.round(a*c),Math.round(d*c))}else{this.ctx.save();this.updateFont();p=document.createElement("div");p.innerHTML=g;p.style.position="absolute";p.style.top="-9999px";p.style.left="-9999px";p.style.fontFamily=this.state.fontFamily;p.style.fontWeight="bold";p.style.fontSize=this.state.fontSize+"pt";document.body.appendChild(p);k=[p.offsetWidth,p.offsetHeight];document.body.removeChild(p);g=g.split("\n");p=k[1];this.ctx.textBaseline="top";k=d;switch(m){case mxConstants.ALIGN_MIDDLE:this.ctx.textBaseline=
+"middle";d-=(g.length-1)*p/2;k=d-this.state.fontSize/2;break;case mxConstants.ALIGN_BOTTOM:this.ctx.textBaseline="alphabetic",d-=p*(g.length-1),k=d-this.state.fontSize}m=[];p=[];for(c=0;c<g.length;c++)p[c]=a,m[c]=this.ctx.measureText(g[c]).width,null!=f&&f!=mxConstants.ALIGN_LEFT&&(p[c]-=m[c],f==mxConstants.ALIGN_CENTER&&(p[c]+=m[c]/2));if(null!=this.state.fontBackgroundColor||null!=this.state.fontBorderColor){a=p[0];f=m[0];for(c=1;c<g.length;c++)a=Math.min(a,p[c]),f=Math.max(f,m[c]);this.ctx.save();
+a=Math.round(a)-.5;k=Math.round(k)-.5;null!=this.state.fontBackgroundColor&&(this.ctx.fillStyle=this.state.fontBackgroundColor,this.ctx.fillRect(a,k,f,this.state.fontSize*mxConstants.LINE_HEIGHT*g.length));null!=this.state.fontBorderColor&&(this.ctx.strokeStyle=this.state.fontBorderColor,this.ctx.lineWidth=1,this.ctx.strokeRect(a,k,f,this.state.fontSize*mxConstants.LINE_HEIGHT*g.length));this.ctx.restore()}for(c=0;c<g.length;c++)this.ctx.fillText(g[c],p[c],d),d+=this.state.fontSize*mxConstants.LINE_HEIGHT}this.ctx.restore()}};
mxJsCanvas.prototype.getCanvas=function(){return canvas};mxJsCanvas.prototype.finish=function(a){0==this.waitCounter?a():this.onComplete=a};DrawioClient=function(a,d){mxEventSource.call(this);this.ui=a;this.cookieName=d;this.token=this.getPersistentToken()};mxUtils.extend(DrawioClient,mxEventSource);DrawioClient.prototype.token=null;DrawioClient.prototype.user=null;DrawioClient.prototype.setUser=function(a){this.user=a;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 a=new Date;a.setYear(a.getFullYear()-1);document.cookie=this.cookieName+"=; expires="+a.toUTCString()}};
DrawioClient.prototype.getPersistentToken=function(a){var d=null;isLocalStorage&&(d=localStorage.getItem("."+this.cookieName),null==d&&a&&(d=sessionStorage.getItem("."+this.cookieName)));if(null==d&&"undefined"!=typeof Storage){var c=document.cookie;a=this.cookieName+"=";var b=c.indexOf(a);0<=b&&(b+=a.length,d=c.indexOf(";",b),0>d?d=c.length:postCookie=c.substring(d),d=c.substring(b,d),d=0<d.length?d:null,null!=d&&isLocalStorage&&(c=new Date,c.setYear(c.getFullYear()-1),document.cookie=a+"; expires="+
-c.toUTCString(),localStorage.setItem("."+this.cookieName,d)))}return d};DrawioClient.prototype.setPersistentToken=function(a,d){try{if(null!=a)if(isLocalStorage)d?sessionStorage.setItem("."+this.cookieName,a):localStorage.setItem("."+this.cookieName,a);else{if("undefined"!=typeof Storage){var c=new Date;c.setYear(c.getFullYear()+10);var b=this.cookieName+"="+a+"; path=/"+(d?"":"; expires="+c.toUTCString());"https"==document.location.protocol.toLowerCase()&&(b+=";secure");document.cookie=b}}else this.clearPersistentToken()}catch(f){this.ui.handleError(f)}};DrawioUser=function(a,d,c,b,f){this.id=a;this.email=d;this.displayName=c;this.pictureUrl=b;this.locale=f};DriveFile=function(a,d,c){DrawioFile.call(this,a,d);this.desc=c};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};
+c.toUTCString(),localStorage.setItem("."+this.cookieName,d)))}return d};DrawioClient.prototype.setPersistentToken=function(a,d){try{if(null!=a)if(isLocalStorage)d?sessionStorage.setItem("."+this.cookieName,a):localStorage.setItem("."+this.cookieName,a);else{if("undefined"!=typeof Storage){var c=new Date;c.setYear(c.getFullYear()+10);var b=this.cookieName+"="+a+"; path=/"+(d?"":"; expires="+c.toUTCString());"https"==document.location.protocol.toLowerCase()&&(b+=";secure");document.cookie=b}}else this.clearPersistentToken()}catch(g){this.ui.handleError(g)}};DrawioUser=function(a,d,c,b,g){this.id=a;this.email=d;this.displayName=c;this.pictureUrl=b;this.locale=g};DriveFile=function(a,d,c){DrawioFile.call(this,a,d);this.desc=c};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(a){return null!=a&&null!=a.error&&412==a.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(a){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 c=0;c<d.items.length;c++)if("anyoneWithLink"===d.items[c].id||"anyone"===d.items[c].id){a(this.desc.webContentLink);return}a(null)}),mxUtils.bind(this,function(){a(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(a,d,c,b,f){DrawioFile.prototype.save.apply(this,[a,mxUtils.bind(this,function(){this.saveFile(null,a,d,c,b,f)}),c,b,f])};
-DriveFile.prototype.saveFile=function(a,d,c,b,f,g){try{this.isEditable()?this.savingFile||(this.savingFileTime=new Date,this.setShadowModified(!1),this.savingFile=!0,this.createSecret(mxUtils.bind(this,function(a,e){var k=mxUtils.bind(this,function(g,m){try{var l=this.desc;this.ui.drive.saveFile(this,m,mxUtils.bind(this,function(a,f){try{this.savingFile=!1,0!=a?(this.setModified(this.getShadowModified()),d&&(this.lastAutosaveRevision=(new Date).getTime()),this.autosaveDelay=Math.round(Math.min(1E4,
+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(a,d,c,b,g){DrawioFile.prototype.save.apply(this,[a,mxUtils.bind(this,function(){this.saveFile(null,a,d,c,b,g)}),c,b,g])};
+DriveFile.prototype.saveFile=function(a,d,c,b,g,f){try{this.isEditable()?this.savingFile||(this.savingFileTime=new Date,this.setShadowModified(!1),this.savingFile=!0,this.createSecret(mxUtils.bind(this,function(a,e){var k=mxUtils.bind(this,function(f,m){try{var l=this.desc;this.ui.drive.saveFile(this,m,mxUtils.bind(this,function(a,f){try{this.savingFile=!1,0!=a?(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=a,null!=e?this.fileSaved(f,l,mxUtils.bind(this,function(){this.contentChanged();null!=c&&c(a)}),b,e):null!=c&&c(a)):null!=b&&b(a)}catch(t){if(this.savingFile=!1,null!=b)b(t);else throw t;}}),mxUtils.bind(this,function(a,c){try{this.savingFile=!1,this.isConflict(a)?(this.inConflictState=!0,null!=this.sync?(this.savingFile=!0,this.sync.fileConflict(c,mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,function(){this.updateFileData();
-this.setShadowModified(!1);k(g,!0)}),100+500*Math.random())}),mxUtils.bind(this,function(){this.savingFile=!1;null!=b&&b()}))):null!=b&&b()):null!=b&&b(a)}catch(t){if(this.savingFile=!1,null!=b)b(t);else throw t;}}),f,f,g,null,a)}catch(q){if(this.savingFile=!1,null!=b)b(q);else throw q;}});k(g,d)}))):null!=c&&c()}catch(m){if(null!=b)b(m);else throw m;}};
+this.setShadowModified(!1);k(f,!0)}),100+500*Math.random())}),mxUtils.bind(this,function(){this.savingFile=!1;null!=b&&b()}))):null!=b&&b()):null!=b&&b(a)}catch(t){if(this.savingFile=!1,null!=b)b(t);else throw t;}}),g,g,f,null,a)}catch(q){if(this.savingFile=!1,null!=b)b(q);else throw q;}});k(f,d)}))):null!=c&&c()}catch(m){if(null!=b)b(m);else throw m;}};
DriveFile.prototype.copyFile=function(a,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,a,d)}catch(c){d(c)}}),d,!0)};
DriveFile.prototype.makeCopy=function(a,d,c){this.ui.spinner.spin(document.body,mxResources.get("saving"))&&this.saveAs(this.ui.getCopyFilename(this,c),mxUtils.bind(this,function(b){this.desc=b;this.ui.spinner.stop();this.setModified(!1);this.backupPatch=null;this.inConflictState=this.invalidChecksum=!1;this.descriptorChanged();a()}),mxUtils.bind(this,function(){this.ui.spinner.stop();null!=d&&d()}))};DriveFile.prototype.saveAs=function(a,d,c){this.ui.drive.copyFile(this.getId(),a,d,c)};
-DriveFile.prototype.rename=function(a,d,c){var b=this.getCurrentEtag();this.ui.drive.renameFile(this.getId(),a,mxUtils.bind(this,function(f){this.hasSameExtension(a,this.getTitle())?(this.desc=f,this.descriptorChanged(),null!=this.sync&&this.sync.descriptorChanged(b),null!=d&&d(f)):(this.desc=f,null!=this.sync&&this.sync.descriptorChanged(b),this.save(!0,d,c))}),c)};
+DriveFile.prototype.rename=function(a,d,c){var b=this.getCurrentEtag();this.ui.drive.renameFile(this.getId(),a,mxUtils.bind(this,function(g){this.hasSameExtension(a,this.getTitle())?(this.desc=g,this.descriptorChanged(),null!=this.sync&&this.sync.descriptorChanged(b),null!=d&&d(g)):(this.desc=g,null!=this.sync&&this.sync.descriptorChanged(b),this.save(!0,d,c))}),c)};
DriveFile.prototype.move=function(a,d,c){this.ui.drive.moveFile(this.getId(),a,mxUtils.bind(this,function(a){this.desc=a;this.descriptorChanged();null!=d&&d(a)}),c)};DriveFile.prototype.share=function(){this.ui.drive.showPermissions(this.getId())};DriveFile.prototype.getTitle=function(){return this.desc.title};DriveFile.prototype.getHash=function(){return"G"+this.getId()};DriveFile.prototype.getId=function(){return this.desc.id};
DriveFile.prototype.isEditable=function(){return DrawioFile.prototype.isEditable.apply(this,arguments)&&this.desc.editable};DriveFile.prototype.isSyncSupported=function(){return!0};DriveFile.prototype.isRevisionHistorySupported=function(){return!0};
DriveFile.prototype.getRevisions=function(a,d){this.ui.drive.executeRequest({url:"/files/"+this.getId()+"/revisions"},mxUtils.bind(this,function(c){for(var b=0;b<c.items.length;b++)mxUtils.bind(this,function(a){a.title=a.originalFilename;a.getXml=mxUtils.bind(this,function(b,c){this.ui.drive.getXmlFile(a,mxUtils.bind(this,function(a){b(a.getData())}),c)});a.getUrl=mxUtils.bind(this,function(b){return this.ui.getUrl(window.location.pathname+"?rev="+a.id+"&chrome=0&nav=1&layers=1&edit=_blank"+(null!=
@@ -10995,145 +10998,145 @@ DriveFile.prototype.getDescriptor=function(){return this.desc};DriveFile.prototy
DriveFile.prototype.setDescriptorEtag=function(a,d){a.etag=d};DriveFile.prototype.loadPatchDescriptor=function(a,d){this.ui.drive.executeRequest({url:"/files/"+this.getId()+"?supportsAllDrives=true&fields="+this.ui.drive.catchupFields},mxUtils.bind(this,function(c){a(c)}),d)};DriveFile.prototype.patchDescriptor=function(a,d){a.headRevisionId=d.headRevisionId;a.modifiedDate=d.modifiedDate;DrawioFile.prototype.patchDescriptor.apply(this,arguments)};
DriveFile.prototype.loadDescriptor=function(a,d){this.ui.drive.loadDescriptor(this.getId(),a,d)};DriveFile.prototype.commentsSupported=function(){return!0};
DriveFile.prototype.getComments=function(a,d){function c(a,d,m){if(d.deleted)return null;m=new DriveComment(a,d.commentId||d.replyId,d.content,d.modifiedDate,d.createdDate,"resolved"==d.status,d.author.isAuthenticatedUser?b:new DrawioUser(d.author.permissionId,d.author.emailAddress,d.author.displayName,d.author.picture.url),m);for(var e=0;null!=d.replies&&e<d.replies.length;e++)m.addReplyDirect(c(a,d.replies[e],d.commentId));return m}var b=this.ui.getCurrentUser();this.ui.drive.executeRequest({url:"/files/"+
-this.getId()+"/comments"},mxUtils.bind(this,function(b){for(var d=[],f=0;f<b.items.length;f++){var e=c(this,b.items[f]);null!=e&&d.push(e)}a(d)}),d)};DriveFile.prototype.addComment=function(a,d,c){a={content:a.content};this.ui.drive.executeRequest({url:"/files/"+this.getId()+"/comments",method:"POST",params:a},mxUtils.bind(this,function(a){d(a.commentId)}),c)};DriveFile.prototype.canReplyToReplies=function(){return!1};DriveFile.prototype.canComment=function(){return this.desc.canComment};
+this.getId()+"/comments"},mxUtils.bind(this,function(b){for(var d=[],g=0;g<b.items.length;g++){var e=c(this,b.items[g]);null!=e&&d.push(e)}a(d)}),d)};DriveFile.prototype.addComment=function(a,d,c){a={content:a.content};this.ui.drive.executeRequest({url:"/files/"+this.getId()+"/comments",method:"POST",params:a},mxUtils.bind(this,function(a){d(a.commentId)}),c)};DriveFile.prototype.canReplyToReplies=function(){return!1};DriveFile.prototype.canComment=function(){return this.desc.canComment};
DriveFile.prototype.newComment=function(a,d){return new DriveComment(this,null,a,Date.now(),Date.now(),!1,d)};DriveLibrary=function(a,d,c){DriveFile.call(this,a,d,c)};mxUtils.extend(DriveLibrary,DriveFile);DriveLibrary.prototype.isAutosave=function(){return!0};DriveLibrary.prototype.save=function(a,d,c){this.ui.drive.saveFile(this,a,mxUtils.bind(this,function(a){this.desc=a;null!=d&&d(a)}),c)};DriveLibrary.prototype.open=function(){};(function(){var a=null,d={};window.DriveClient=function(a,b){null==b&&null!=window.urlParams&&"1"==window.urlParams.extAuth&&(b=!0);mxEventSource.call(this);DrawioClient.call(this,a,"gDriveAuthInfo");this.isExtAuth=b;this.ui=a;this.xmlMimeType="application/vnd.jgraph.mxfile";this.mimeType="application/vnd.jgraph.mxfile.realtime";this.ui.editor.chromeless&&!this.ui.editor.editable&&"1"!=urlParams.rt&&"1"!=urlParams.extAuth?(this.cookieName="gDriveViewerAuthInfo",this.token=this.getPersistentToken(),
this.appId=window.DRAWIO_GOOGLE_VIEWER_APP_ID||"850530949725",this.clientId=window.DRAWIO_GOOGLE_VIEWER_CLIENT_ID||"850530949725.apps.googleusercontent.com",this.scopes=["https://www.googleapis.com/auth/drive.readonly","https://www.googleapis.com/auth/userinfo.profile"]):(this.appId=window.DRAWIO_GOOGLE_APP_ID||"671128082532",this.clientId=window.DRAWIO_GOOGLE_CLIENT_ID||"671128082532-jhphbq6d0e1gnsus9mn7vf8a6fjn10mp.apps.googleusercontent.com");this.mimeTypes=this.xmlMimeType+",application/mxe,application/mxr,application/vnd.jgraph.mxfile.realtime,application/vnd.jgraph.mxfile.rtlegacy";
var c=JSON.parse(this.token);null!=c&&null!=c.current&&(this.userId=c.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(a){this.user=a;null==this.user?(this.userId=null,null!=this.tokenRefreshThread&&(window.clearTimeout(this.tokenRefreshThread),this.tokenRefreshThread=null)):this.userId=a.id;this.fireEvent(new mxEventObject("userChanged"))};DriveClient.prototype.setUserId=function(a){this.userId=a;null!=this.user&&this.user.id!=this.userId&&(this.user=null)};DriveClient.prototype.getUser=
-function(){return this.user};DriveClient.prototype.getUsersList=function(){var a=[],b=JSON.parse(this.getPersistentToken(!0)),d=null;if(null!=b){null!=b.current&&(d=b.current.userId,a.push(b[d].user),a[0].isCurrent=!0);for(var g in b)"current"!=g&&g!=d&&a.push(b[g].user)}return a};DriveClient.prototype.logout=function(){this.ui.editor.loadUrl(this.redirectUri+"?doLogout=1&userId="+this.userId+"&state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.hostname));this.clearPersistentToken();
+function(){return this.user};DriveClient.prototype.getUsersList=function(){var a=[],b=JSON.parse(this.getPersistentToken(!0)),d=null;if(null!=b){null!=b.current&&(d=b.current.userId,a.push(b[d].user),a[0].isCurrent=!0);for(var f in b)"current"!=f&&f!=d&&a.push(b[f].user)}return a};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);a=null};DriveClient.prototype.execute=function(a){var b=mxUtils.bind(this,function(b){this.ui.showAuthDialog(this,!0,mxUtils.bind(this,function(b,c){this.authorize(!1,mxUtils.bind(this,function(){null!=c&&c();a()}),mxUtils.bind(this,function(a){var b=mxResources.get("cannotLogin");null!=a&&null!=a.error&&403==a.error.code&&null!=a.error.data&&0<a.error.data.length&&"domainPolicy"==a.error.data[0].reason&&(b=a.error.message);this.logout();this.ui.showError(mxResources.get("error"),
-b,mxResources.get("help"),mxUtils.bind(this,function(){this.ui.openLink("https://www.diagrams.net/doc/faq/gsuite-authorisation-troubleshoot")}),null,mxResources.get("ok"))}),b)}))});this.authorize(!0,a,b)};DriveClient.prototype.executeRequest=function(c,b,d){try{var f=!0,m=null,e=0;null!=this.requestThread&&window.clearTimeout(this.requestThread);var k=mxUtils.bind(this,function(){try{this.requestThread=null;this.currentRequest=c;null!=m&&window.clearTimeout(m);m=window.setTimeout(mxUtils.bind(this,
-function(){f=!1;null!=d&&d({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout"),retry:k})}),this.ui.timeout);var g=null,n=!1;"string"===typeof c.params?g=c.params:null!=c.params&&(g=JSON.stringify(c.params),n=!0);var p=c.fullUrl||this.GDriveBaseUrl+c.url;n&&(p+=(0<p.indexOf("?")?"&":"?")+"alt=json");var q=new mxXmlRequest(p,g,c.method||"GET");q.setRequestHeaders=mxUtils.bind(this,function(b,d){if(null!=c.headers)for(var e in c.headers)b.setRequestHeader(e,c.headers[e]);else null!=c.contentType?
-b.setRequestHeader("Content-Type",c.contentType):n&&b.setRequestHeader("Content-Type","application/json");b.setRequestHeader("Authorization","Bearer "+a)});q.send(mxUtils.bind(this,function(a){try{if(window.clearTimeout(m),f){var g;try{g=JSON.parse(a.getText())}catch(y){g=null}if(200<=a.getStatus()&&299>=a.getStatus())null!=b&&b(g);else{var l=null!=g&&null!=g.error?null!=g.error.data?g.error.data:g.error.errors:null,n=null!=l&&0<l.length?l[0].reason:null;null==d||null==g||null==g.error||-1!=g.error.code&&
-(403!=g.error.code||"domainPolicy"!=n&&"The requested mime type change is forbidden."!=g.error.message)?null!=g&&null!=g.error&&(401==g.error.code||403==g.error.code&&"rateLimitExceeded"!=n)?403==g.error.code&&this.retryAuth||401==g.error.code&&this.retryAuth&&"authError"==n?(null!=d&&d(g),this.retryAuth=!1):(this.retryAuth=!0,this.execute(k)):null!=g&&null!=g.error&&412!=g.error.code&&404!=g.error.code&&400!=g.error.code&&this.currentRequest==c&&e<this.maxRetries?(e++,this.requestThread=window.setTimeout(k,
-Math.round(Math.pow(2,e)*(1+.1*(Math.random()-.5))*this.coolOff))):null!=d&&d(g):d(g)}}}catch(y){if(null!=d)d(y);else throw y;}}))}catch(u){if(null!=d)d(u);else throw u;}});null!=a&&this.authCalled?k():this.execute(k)}catch(l){if(null!=d)d(l);else throw l;}};DriveClient.prototype.createAuthWin=function(a){return window.open(a?a:"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(a,b,d,g,m){this.isExtAuth&&!a?window.parent.driveAuth(mxUtils.bind(this,function(a){this.updateAuthInfo(a,!0,!0,b,d)}),d):(new mxXmlRequest(this.redirectUri+"?getState=1",null,"GET")).send(mxUtils.bind(this,function(c){200<=c.getStatus()&&299>=c.getStatus()?this.authorizeStep2(c.getText(),a,b,d,g,m):null!=d&&d(c)}),d)};DriveClient.prototype.updateAuthInfo=function(c,b,d,g,m){a=c.access_token;delete c.access_token;c.expires=Date.now()+1E3*parseInt(c.expires_in);
-c.remember=b;this.resetTokenRefresh(c);this.authCalled=!0;if(d||null==this.user){var e=JSON.stringify(c);this.updateUser(mxUtils.bind(this,function(){var a=JSON.parse(e);this.setPersistentToken(a,!b);null!=g&&g()}),m)}else null!=g&&(this.setPersistentToken(c,!b),g())};DriveClient.prototype.authorizeStep2=function(a,b,d,g,m,e){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(b&&null==this.userId)null!=g&&g();else if(b)(new mxXmlRequest(this.redirectUri+"?state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.hostname+"&token="+a)+"&userId="+this.userId,null,"GET")).send(mxUtils.bind(this,function(a){200<=a.getStatus()&&299>=a.getStatus()?(a=JSON.parse(a.getText()),this.updateAuthInfo(a,!0,!1,d,g)):(0!=a.getStatus()&&this.logout(),null!=g&&g(a))}),g);else{var f=
-"https://accounts.google.com/o/oauth2/v2/auth?client_id="+this.clientId+"&redirect_uri="+encodeURIComponent(this.redirectUri)+"&response_type=code&include_granted_scopes=true"+(m?"&access_type=offline&prompt=consent%20select_account":"")+"&scope="+encodeURIComponent(this.scopes.join(" "))+"&state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.hostname+"&token="+a+(this.sameWinRedirectUrl?"&redirect="+this.sameWinRedirectUrl:""));this.sameWinAuthMode?(window.location.assign(f),
-e=null):null==e?e=this.createAuthWin(f):e.location=f;null!=e&&(window.onGoogleDriveCallback=mxUtils.bind(this,function(a,b){window.onGoogleDriveCallback=null;try{null==a?null!=g&&g({message:mxResources.get("accessDenied")}):this.updateAuthInfo(a,m,!0,d,g)}catch(q){null!=g&&g(q)}finally{null!=b&&b.close()}}),e.focus())}}catch(n){if(null!=g)g(n);else throw n;}};DriveClient.prototype.resetTokenRefresh=function(a){null!=this.tokenRefreshThread&&(window.clearTimeout(this.tokenRefreshThread),this.tokenRefreshThread=
+b,mxResources.get("help"),mxUtils.bind(this,function(){this.ui.openLink("https://www.diagrams.net/doc/faq/gsuite-authorisation-troubleshoot")}),null,mxResources.get("ok"))}),b)}))});this.authorize(!0,a,b)};DriveClient.prototype.executeRequest=function(c,b,d){try{var f=!0,g=null,e=0;null!=this.requestThread&&window.clearTimeout(this.requestThread);var k=mxUtils.bind(this,function(){try{this.requestThread=null;this.currentRequest=c;null!=g&&window.clearTimeout(g);g=window.setTimeout(mxUtils.bind(this,
+function(){f=!1;null!=d&&d({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout"),retry:k})}),this.ui.timeout);var m=null,n=!1;"string"===typeof c.params?m=c.params:null!=c.params&&(m=JSON.stringify(c.params),n=!0);var p=c.fullUrl||this.GDriveBaseUrl+c.url;n&&(p+=(0<p.indexOf("?")?"&":"?")+"alt=json");var q=new mxXmlRequest(p,m,c.method||"GET");q.setRequestHeaders=mxUtils.bind(this,function(b,d){if(null!=c.headers)for(var e in c.headers)b.setRequestHeader(e,c.headers[e]);else null!=c.contentType?
+b.setRequestHeader("Content-Type",c.contentType):n&&b.setRequestHeader("Content-Type","application/json");b.setRequestHeader("Authorization","Bearer "+a)});q.send(mxUtils.bind(this,function(a){try{if(window.clearTimeout(g),f){var m;try{m=JSON.parse(a.getText())}catch(y){m=null}if(200<=a.getStatus()&&299>=a.getStatus())null!=b&&b(m);else{var l=null!=m&&null!=m.error?null!=m.error.data?m.error.data:m.error.errors:null,n=null!=l&&0<l.length?l[0].reason:null;null==d||null==m||null==m.error||-1!=m.error.code&&
+(403!=m.error.code||"domainPolicy"!=n&&"The requested mime type change is forbidden."!=m.error.message)?null!=m&&null!=m.error&&(401==m.error.code||403==m.error.code&&"rateLimitExceeded"!=n)?403==m.error.code&&this.retryAuth||401==m.error.code&&this.retryAuth&&"authError"==n?(null!=d&&d(m),this.retryAuth=!1):(this.retryAuth=!0,this.execute(k)):null!=m&&null!=m.error&&412!=m.error.code&&404!=m.error.code&&400!=m.error.code&&this.currentRequest==c&&e<this.maxRetries?(e++,this.requestThread=window.setTimeout(k,
+Math.round(Math.pow(2,e)*(1+.1*(Math.random()-.5))*this.coolOff))):null!=d&&d(m):d(m)}}}catch(y){if(null!=d)d(y);else throw y;}}))}catch(u){if(null!=d)d(u);else throw u;}});null!=a&&this.authCalled?k():this.execute(k)}catch(l){if(null!=d)d(l);else throw l;}};DriveClient.prototype.createAuthWin=function(a){return window.open(a?a:"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(a,b,d,f,m){this.isExtAuth&&!a?window.parent.driveAuth(mxUtils.bind(this,function(a){this.updateAuthInfo(a,!0,!0,b,d)}),d):(new mxXmlRequest(this.redirectUri+"?getState=1",null,"GET")).send(mxUtils.bind(this,function(c){200<=c.getStatus()&&299>=c.getStatus()?this.authorizeStep2(c.getText(),a,b,d,f,m):null!=d&&d(c)}),d)};DriveClient.prototype.updateAuthInfo=function(c,b,d,f,m){a=c.access_token;delete c.access_token;c.expires=Date.now()+1E3*parseInt(c.expires_in);
+c.remember=b;this.resetTokenRefresh(c);this.authCalled=!0;if(d||null==this.user){var e=JSON.stringify(c);this.updateUser(mxUtils.bind(this,function(){var a=JSON.parse(e);this.setPersistentToken(a,!b);null!=f&&f()}),m)}else null!=f&&(this.setPersistentToken(c,!b),f())};DriveClient.prototype.authorizeStep2=function(a,b,d,f,m,e){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(b&&null==this.userId)null!=f&&f();else if(b)(new mxXmlRequest(this.redirectUri+"?state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.hostname+"&token="+a)+"&userId="+this.userId,null,"GET")).send(mxUtils.bind(this,function(a){200<=a.getStatus()&&299>=a.getStatus()?(a=JSON.parse(a.getText()),this.updateAuthInfo(a,!0,!1,d,f)):(0!=a.getStatus()&&this.logout(),null!=f&&f(a))}),f);else{var g=
+"https://accounts.google.com/o/oauth2/v2/auth?client_id="+this.clientId+"&redirect_uri="+encodeURIComponent(this.redirectUri)+"&response_type=code&include_granted_scopes=true"+(m?"&access_type=offline&prompt=consent%20select_account":"")+"&scope="+encodeURIComponent(this.scopes.join(" "))+"&state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.hostname+"&token="+a+(this.sameWinRedirectUrl?"&redirect="+this.sameWinRedirectUrl:""));this.sameWinAuthMode?(window.location.assign(g),
+e=null):null==e?e=this.createAuthWin(g):e.location=g;null!=e&&(window.onGoogleDriveCallback=mxUtils.bind(this,function(a,b){window.onGoogleDriveCallback=null;try{null==a?null!=f&&f({message:mxResources.get("accessDenied")}):this.updateAuthInfo(a,m,!0,d,f)}catch(q){null!=f&&f(q)}finally{null!=b&&b.close()}}),e.focus())}}catch(n){if(null!=f)f(n);else throw n;}};DriveClient.prototype.resetTokenRefresh=function(a){null!=this.tokenRefreshThread&&(window.clearTimeout(this.tokenRefreshThread),this.tokenRefreshThread=
null);null!=a&&null==a.error&&0<a.expires_in&&(this.tokenRefreshInterval=1E3*parseInt(a.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*a.expires_in))};DriveClient.prototype.checkToken=function(a){var b=0<this.lastTokenRefresh;(new Date).getTime()-this.lastTokenRefresh>this.tokenRefreshInterval||null==this.tokenRefreshThread?this.execute(mxUtils.bind(this,
function(){a();b&&this.fireEvent(new mxEventObject("disconnected"))})):a()};DriveClient.prototype.updateUser=function(c,b){try{var d={Authorization:"Bearer "+a};this.ui.editor.loadUrl("https://www.googleapis.com/oauth2/v2/userinfo?alt=json",mxUtils.bind(this,function(a){var d=JSON.parse(a);this.executeRequest({url:"/about"},mxUtils.bind(this,function(a){var b=mxResources.get("notAvailable"),e=b,f=null;null!=a&&null!=a.user&&(b=a.user.emailAddress,e=a.user.displayName,f=null!=a.user.picture?a.user.picture.url:
-null);this.setUser(new DrawioUser(d.id,b,e,f,d.locale));this.userId=d.id;null!=c&&c()}),b)}),b,null,null,null,null,d)}catch(g){if(null!=b)b(g);else throw g;}};DriveClient.prototype.copyFile=function(a,b,d,g){null!=a&&null!=b&&this.executeRequest({url:"/files/"+a+"/copy?fields="+encodeURIComponent(this.allFields)+"&supportsAllDrives=true&enforceSingleParent=true",method:"POST",params:{title:b,properties:[{key:"channel",value:Editor.guid()}]}},d,g)};DriveClient.prototype.renameFile=function(a,b,d,g){null!=
-a&&null!=b&&this.executeRequest(this.createDriveRequest(a,{title:b}),d,g)};DriveClient.prototype.moveFile=function(a,b,d,g){null!=a&&null!=b&&this.executeRequest(this.createDriveRequest(a,{parents:[{kind:"drive#fileLink",id:b}]}),d,g)};DriveClient.prototype.createDriveRequest=function(a,b){return{url:"/files/"+a+"?uploadType=multipart&supportsAllDrives=true",method:"PUT",contentType:"application/json; charset=UTF-8",params:b}};DriveClient.prototype.getLibrary=function(a,b,d){return this.getFile(a,
-b,d,!0,!0)};DriveClient.prototype.loadDescriptor=function(a,b,d,g){this.executeRequest({url:"/files/"+a+"?supportsAllDrives=true&fields="+(null!=g?g:this.allFields)},b,d)};DriveClient.prototype.listFiles=function(a,b,d,g,m){this.executeRequest({url:"/files?supportsAllDrives=true&includeItemsFromAllDrives=true&q="+encodeURIComponent("(mimeType contains '"+this.xmlMimeType+"') "+(a?" and (title contains '"+a+"')":"")+(b?" and (modifiedDate > '"+b.toISOString()+"')":"")+(d?" and ('me' in owners)":""))+
-"&orderBy=modifiedDate desc,title"},g,m)};DriveClient.prototype.getCustomProperty=function(a,b){var c=a.properties,d=null;if(null!=c)for(var m=0;m<c.length;m++)if(c[m].key==b){d=c[m].value;break}return d};DriveClient.prototype.getFile=function(c,b,d,g,m){g=null!=g?g:!1;m=null!=m?m:!1;null!=urlParams.rev?this.executeRequest({url:"/files/"+c+"/revisions/"+urlParams.rev+"?supportsAllDrives=true"},mxUtils.bind(this,function(a){a.title=a.originalFilename;a.headRevisionId=a.id;a.id=c;this.getXmlFile(a,
-b,d)}),d):this.loadDescriptor(c,mxUtils.bind(this,function(c){try{if(null!=this.user){var e=/\.png$/i.test(c.title);/\.v(dx|sdx?)$/i.test(c.title)||/\.gliffy$/i.test(c.title)||!this.ui.useCanvasForExport&&e?this.ui.convertFile(c.downloadUrl,c.title,c.mimeType,this.extension,b,d,null,{Authorization:"Bearer "+a}):g||m||c.mimeType==this.libraryMimeType||c.mimeType==this.xmlMimeType?this.getXmlFile(c,b,d,!0,m):this.getXmlFile(c,b,d)}else d({message:mxResources.get("loggedOut")})}catch(l){if(null!=d)d(l);
-else throw l;}}),d)};DriveClient.prototype.isGoogleRealtimeMimeType=function(a){return null!=a&&"application/vnd.jgraph.mxfile."==a.substring(0,30)};DriveClient.prototype.getXmlFile=function(c,b,d,g,m){try{var e={Authorization:"Bearer "+a},f=c.downloadUrl;if(null==f)null!=d&&d({message:mxResources.get("exportOptionsDisabledDetails")});else{var l=0,n=mxUtils.bind(this,function(){this.ui.editor.loadUrl(f,mxUtils.bind(this,function(a){try{if(null==a)d({message:mxResources.get("invalidOrMissingFile")});
-else if(c.mimeType==this.libraryMimeType||m)c.mimeType!=this.libraryMimeType||m?b(new DriveLibrary(this.ui,a,c)):d({message:mxResources.get("notADiagramFile")});else{var e=!1;if(/\.png$/i.test(c.title)){var g=a.lastIndexOf(",");if(0<g){var k=this.ui.extractGraphModelFromPng(a);if(null!=k&&0<k.length)a=k;else try{var k=a.substring(g+1),l=!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(k):atob(k),n=this.ui.editor.extractGraphModel(mxUtils.parseXml(l).documentElement,!0);null==n||0<n.getElementsByTagName("parsererror").length?
-e=!0:a=l}catch(y){e=!0}}}else/\.pdf$/i.test(c.title)?(k=Editor.extractGraphModelFromPdf(a),null!=k&&0<k.length&&(e=!0,a=k)):"data:image/png;base64,PG14ZmlsZS"==a.substring(0,32)&&(l=a.substring(22),a=window.atob&&!mxClient.IS_SF?atob(l):Base64.decode(l));Graph.fileSupport&&(new XMLHttpRequest).upload&&this.ui.isRemoteFileFormat(a,f)?this.ui.parseFile(new Blob([a],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){try{4==a.readyState&&(200<=a.status&&299>=a.status?b(new LocalFile(this.ui,
+null);this.setUser(new DrawioUser(d.id,b,e,f,d.locale));this.userId=d.id;null!=c&&c()}),b)}),b,null,null,null,null,d)}catch(f){if(null!=b)b(f);else throw f;}};DriveClient.prototype.copyFile=function(a,b,d,f){null!=a&&null!=b&&this.executeRequest({url:"/files/"+a+"/copy?fields="+encodeURIComponent(this.allFields)+"&supportsAllDrives=true&enforceSingleParent=true",method:"POST",params:{title:b,properties:[{key:"channel",value:Editor.guid()}]}},d,f)};DriveClient.prototype.renameFile=function(a,b,d,f){null!=
+a&&null!=b&&this.executeRequest(this.createDriveRequest(a,{title:b}),d,f)};DriveClient.prototype.moveFile=function(a,b,d,f){null!=a&&null!=b&&this.executeRequest(this.createDriveRequest(a,{parents:[{kind:"drive#fileLink",id:b}]}),d,f)};DriveClient.prototype.createDriveRequest=function(a,b){return{url:"/files/"+a+"?uploadType=multipart&supportsAllDrives=true",method:"PUT",contentType:"application/json; charset=UTF-8",params:b}};DriveClient.prototype.getLibrary=function(a,b,d){return this.getFile(a,
+b,d,!0,!0)};DriveClient.prototype.loadDescriptor=function(a,b,d,f){this.executeRequest({url:"/files/"+a+"?supportsAllDrives=true&fields="+(null!=f?f:this.allFields)},b,d)};DriveClient.prototype.listFiles=function(a,b,d,f,m){this.executeRequest({url:"/files?supportsAllDrives=true&includeItemsFromAllDrives=true&q="+encodeURIComponent("(mimeType contains '"+this.xmlMimeType+"') "+(a?" and (title contains '"+a+"')":"")+(b?" and (modifiedDate > '"+b.toISOString()+"')":"")+(d?" and ('me' in owners)":""))+
+"&orderBy=modifiedDate desc,title"},f,m)};DriveClient.prototype.getCustomProperty=function(a,b){var c=a.properties,d=null;if(null!=c)for(var m=0;m<c.length;m++)if(c[m].key==b){d=c[m].value;break}return d};DriveClient.prototype.getFile=function(c,b,d,f,m){f=null!=f?f:!1;m=null!=m?m:!1;null!=urlParams.rev?this.executeRequest({url:"/files/"+c+"/revisions/"+urlParams.rev+"?supportsAllDrives=true"},mxUtils.bind(this,function(a){a.title=a.originalFilename;a.headRevisionId=a.id;a.id=c;this.getXmlFile(a,
+b,d)}),d):this.loadDescriptor(c,mxUtils.bind(this,function(c){try{if(null!=this.user){var e=/\.png$/i.test(c.title);/\.v(dx|sdx?)$/i.test(c.title)||/\.gliffy$/i.test(c.title)||!this.ui.useCanvasForExport&&e?this.ui.convertFile(c.downloadUrl,c.title,c.mimeType,this.extension,b,d,null,{Authorization:"Bearer "+a}):f||m||c.mimeType==this.libraryMimeType||c.mimeType==this.xmlMimeType?this.getXmlFile(c,b,d,!0,m):this.getXmlFile(c,b,d)}else d({message:mxResources.get("loggedOut")})}catch(l){if(null!=d)d(l);
+else throw l;}}),d)};DriveClient.prototype.isGoogleRealtimeMimeType=function(a){return null!=a&&"application/vnd.jgraph.mxfile."==a.substring(0,30)};DriveClient.prototype.getXmlFile=function(c,b,d,f,m){try{var e={Authorization:"Bearer "+a},g=c.downloadUrl;if(null==g)null!=d&&d({message:mxResources.get("exportOptionsDisabledDetails")});else{var l=0,n=mxUtils.bind(this,function(){this.ui.editor.loadUrl(g,mxUtils.bind(this,function(a){try{if(null==a)d({message:mxResources.get("invalidOrMissingFile")});
+else if(c.mimeType==this.libraryMimeType||m)c.mimeType!=this.libraryMimeType||m?b(new DriveLibrary(this.ui,a,c)):d({message:mxResources.get("notADiagramFile")});else{var e=!1;if(/\.png$/i.test(c.title)){var f=a.lastIndexOf(",");if(0<f){var k=this.ui.extractGraphModelFromPng(a);if(null!=k&&0<k.length)a=k;else try{var k=a.substring(f+1),l=!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(k):atob(k),n=this.ui.editor.extractGraphModel(mxUtils.parseXml(l).documentElement,!0);null==n||0<n.getElementsByTagName("parsererror").length?
+e=!0:a=l}catch(y){e=!0}}}else/\.pdf$/i.test(c.title)?(k=Editor.extractGraphModelFromPdf(a),null!=k&&0<k.length&&(e=!0,a=k)):"data:image/png;base64,PG14ZmlsZS"==a.substring(0,32)&&(l=a.substring(22),a=window.atob&&!mxClient.IS_SF?atob(l):Base64.decode(l));Graph.fileSupport&&(new XMLHttpRequest).upload&&this.ui.isRemoteFileFormat(a,g)?this.ui.parseFile(new Blob([a],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){try{4==a.readyState&&(200<=a.status&&299>=a.status?b(new LocalFile(this.ui,
a.responseText,c.title+this.extension,!0)):null!=d&&d({message:mxResources.get("errorLoadingFile")}))}catch(x){if(null!=d)d(x);else throw x;}}),c.title):b(e?new LocalFile(this.ui,a,c.title,!0):new DriveFile(this.ui,a,c))}}catch(y){if(null!=d)d(y);else throw y;}}),mxUtils.bind(this,function(a,b){if(l<this.maxRetries&&null!=b&&403==b.getStatus())l++,window.setTimeout(n,2*l*this.coolOff*(1+.1*(Math.random()-.5)));else if(null!=d)d(a);else throw a;}),null!=c.mimeType&&"image/"==c.mimeType.substring(0,
-6)&&"image/svg"!=c.mimeType.substring(0,9)||/\.png$/i.test(c.title)||/\.jpe?g$/i.test(c.title)||/\.pdf$/i.test(c.title),null,null,null,e)});n()}}catch(p){if(null!=d)d(p);else throw p;}};DriveClient.prototype.saveFile=function(a,b,d,g,m,e,k,l,n){try{var c=0;a.saveLevel=1;var f=mxUtils.bind(this,function(b){if(null!=g)g(b);else throw b;try{if(!a.isConflict(b)){var c="sl_"+a.saveLevel+"-error_"+(a.getErrorMessage(b)||"unknown");null!=b&&null!=b.error&&null!=b.error.code&&(c+="-code_"+b.error.code);EditorUi.logEvent({category:"ERROR-SAVE-FILE-"+
-a.getHash()+"-rev_"+a.desc.headRevisionId+"-mod_"+a.desc.modifiedDate+"-size_"+a.getSize()+"-mime_"+a.desc.mimeType+(this.ui.editor.autosave?"":"-nosave")+(a.isAutosave()?"":"-noauto")+(a.changeListenerEnabled?"":"-nolisten")+(a.inConflictState?"-conflict":"")+(a.invalidChecksum?"-invalid":""),action:c,label:(null!=this.user?"user_"+this.user.id:"nouser")+(null!=a.sync?"-client_"+a.sync.clientId:"-nosync")})}}catch(F){}}),u=mxUtils.bind(this,function(a){f(a);try{EditorUi.logError(a.message,null,null,
+6)&&"image/svg"!=c.mimeType.substring(0,9)||/\.png$/i.test(c.title)||/\.jpe?g$/i.test(c.title)||/\.pdf$/i.test(c.title),null,null,null,e)});n()}}catch(p){if(null!=d)d(p);else throw p;}};DriveClient.prototype.saveFile=function(a,b,d,f,m,e,k,l,n){try{var c=0;a.saveLevel=1;var g=mxUtils.bind(this,function(b){if(null!=f)f(b);else throw b;try{if(!a.isConflict(b)){var c="sl_"+a.saveLevel+"-error_"+(a.getErrorMessage(b)||"unknown");null!=b&&null!=b.error&&null!=b.error.code&&(c+="-code_"+b.error.code);EditorUi.logEvent({category:"ERROR-SAVE-FILE-"+
+a.getHash()+"-rev_"+a.desc.headRevisionId+"-mod_"+a.desc.modifiedDate+"-size_"+a.getSize()+"-mime_"+a.desc.mimeType+(this.ui.editor.autosave?"":"-nosave")+(a.isAutosave()?"":"-noauto")+(a.changeListenerEnabled?"":"-nolisten")+(a.inConflictState?"-conflict":"")+(a.invalidChecksum?"-invalid":""),action:c,label:(null!=this.user?"user_"+this.user.id:"nouser")+(null!=a.sync?"-client_"+a.sync.clientId:"-nosync")})}}catch(F){}}),u=mxUtils.bind(this,function(a){g(a);try{EditorUi.logError(a.message,null,null,
a)}catch(E){}});if(a.isEditable()&&null!=a.desc){var t=(new Date).getTime(),v=a.desc.etag,z=a.desc.modifiedDate,y=a.desc.headRevisionId,x=this.ui.useCanvasForExport&&/(\.png)$/i.test(a.getTitle());e=null!=e?e:!1;var A=null,B=!1,C={mimeType:a.desc.mimeType,title:a.getTitle()};if(this.isGoogleRealtimeMimeType(C.mimeType))C.mimeType=this.xmlMimeType,A=a.desc,B=b=!0;else if("application/octet-stream"==C.mimeType||"1"==urlParams["override-mime"]&&C.mimeType!=this.xmlMimeType)C.mimeType=this.xmlMimeType;
-var D=mxUtils.bind(this,function(g,m,p){try{a.saveLevel=3;a.constructor==DriveFile&&(null==l&&(l=[]),null==a.getChannelId()&&l.push({key:"channel",value:Editor.guid(32)}),null==a.getChannelKey()&&l.push({key:"key",value:Editor.guid(32)}),l.push({key:"secret",value:null!=n?n:Editor.guid(32)}));p||(null!=g||e||(g=this.placeholderThumbnail,m=this.placeholderMimeType),null!=g&&null!=m&&(C.thumbnail={image:g,mimeType:m}));var q=a.getData(),E=mxUtils.bind(this,function(c){try{if(a.saveDelay=(new Date).getTime()-
-t,a.saveLevel=11,null==c)f({message:mxResources.get("errorSavingFile")+": Empty response"});else{var e=(new Date(c.modifiedDate)).getTime()-(new Date(z)).getTime();if(0>=e||v==c.etag||b&&y==c.headRevisionId){a.saveLevel=12;var g=[];0>=e&&g.push("invalid modified time");v==c.etag&&g.push("stale etag");b&&y==c.headRevisionId&&g.push("stale revision");var k=g.join(", ");f({message:mxResources.get("errorSavingFile")+": "+k},c);try{EditorUi.logError("Critical: Error saving to Google Drive "+a.desc.id,
+var D=mxUtils.bind(this,function(f,m,p){try{a.saveLevel=3;a.constructor==DriveFile&&(null==l&&(l=[]),null==a.getChannelId()&&l.push({key:"channel",value:Editor.guid(32)}),null==a.getChannelKey()&&l.push({key:"key",value:Editor.guid(32)}),l.push({key:"secret",value:null!=n?n:Editor.guid(32)}));p||(null!=f||e||(f=this.placeholderThumbnail,m=this.placeholderMimeType),null!=f&&null!=m&&(C.thumbnail={image:f,mimeType:m}));var q=a.getData(),E=mxUtils.bind(this,function(c){try{if(a.saveDelay=(new Date).getTime()-
+t,a.saveLevel=11,null==c)g({message:mxResources.get("errorSavingFile")+": Empty response"});else{var e=(new Date(c.modifiedDate)).getTime()-(new Date(z)).getTime();if(0>=e||v==c.etag||b&&y==c.headRevisionId){a.saveLevel=12;var f=[];0>=e&&f.push("invalid modified time");v==c.etag&&f.push("stale etag");b&&y==c.headRevisionId&&f.push("stale revision");var k=f.join(", ");g({message:mxResources.get("errorSavingFile")+": "+k},c);try{EditorUi.logError("Critical: Error saving to Google Drive "+a.desc.id,
null,"from-"+y+"."+z+"-"+this.ui.hashValue(v)+"-to-"+c.headRevisionId+"."+c.modifiedDate+"-"+this.ui.hashValue(c.etag)+(0<k.length?"-errors-"+k:""),"user-"+(null!=this.user?this.user.id:"nouser")+(null!=a.sync?"-client_"+a.sync.clientId:"-nosync"))}catch(U){}}else if(a.saveLevel=null,d(c,q),null!=A){this.executeRequest({url:"/files/"+A.id+"/revisions/"+A.headRevisionId+"?supportsAllDrives=true"},mxUtils.bind(this,mxUtils.bind(this,function(a){a.pinned=!0;this.executeRequest({url:"/files/"+A.id+"/revisions/"+
A.headRevisionId,method:"PUT",params:a})})));try{EditorUi.logEvent({category:a.convertedFrom+"-CONVERT-FILE-"+a.getHash(),action:"from_"+A.id+"."+A.headRevisionId+"-to_"+a.desc.id+"."+a.desc.headRevisionId,label:null!=this.user?"user_"+this.user.id:"nouser"+(null!=a.sync?"-client_"+a.sync.clientId:"nosync")})}catch(U){}}}}catch(U){u(U)}}),D=mxUtils.bind(this,function(d,e){a.saveLevel=4;try{null!=l&&(C.properties=l);var m=k||a.constructor!=DriveFile||"manual"!=DrawioFile.SYNC&&"auto"!=DrawioFile.SYNC?
-null:a.getCurrentEtag(),n=mxUtils.bind(this,function(g){a.saveLevel=5;try{var k=a.desc.mimeType!=this.xmlMimeType&&a.desc.mimeType!=this.mimeType&&a.desc.mimeType!=this.libraryMimeType,l=!0,n=null;try{n=window.setTimeout(mxUtils.bind(this,function(){l=!1;f({code:App.ERROR_TIMEOUT})}),5*this.ui.timeout)}catch(Z){}this.executeRequest(this.createUploadRequest(a.getId(),C,d,b||g||k,e,g?null:m,B),mxUtils.bind(this,function(a){window.clearTimeout(n);l&&E(a)}),mxUtils.bind(this,function(b){window.clearTimeout(n);
+null:a.getCurrentEtag(),n=mxUtils.bind(this,function(f){a.saveLevel=5;try{var k=a.desc.mimeType!=this.xmlMimeType&&a.desc.mimeType!=this.mimeType&&a.desc.mimeType!=this.libraryMimeType,l=!0,n=null;try{n=window.setTimeout(mxUtils.bind(this,function(){l=!1;g({code:App.ERROR_TIMEOUT})}),5*this.ui.timeout)}catch(Z){}this.executeRequest(this.createUploadRequest(a.getId(),C,d,b||f||k,e,f?null:m,B),mxUtils.bind(this,function(a){window.clearTimeout(n);l&&E(a)}),mxUtils.bind(this,function(b){window.clearTimeout(n);
if(l){a.saveLevel=6;try{a.isConflict(b)?this.executeRequest({url:"/files/"+a.getId()+"?supportsAllDrives=true&fields="+this.catchupFields},mxUtils.bind(this,function(d){a.saveLevel=7;try{if(null!=d&&d.etag==m)if(c<this.staleEtagMaxRetries){c++;var e=2*c*this.coolOff*(1+.1*(Math.random()-.5));window.setTimeout(p,e);"1"==urlParams.test&&EditorUi.debug("DriveClient: Stale Etag Detected","retry",c,"delay",e)}else{p(!0);try{EditorUi.logEvent({category:"STALE-ETAG-SAVE-FILE-"+a.getHash(),action:"rev_"+
a.desc.headRevisionId+"-mod_"+a.desc.modifiedDate+"-size_"+a.getSize()+"-mime_"+a.desc.mimeType+(this.ui.editor.autosave?"":"-nosave")+(a.isAutosave()?"":"-noauto")+(a.changeListenerEnabled?"":"-nolisten")+(a.inConflictState?"-conflict":"")+(a.invalidChecksum?"-invalid":""),label:(null!=this.user?"user_"+this.user.id:"nouser")+(null!=a.sync?"-client_"+a.sync.clientId:"-nosync")})}catch(ba){}}else"1"==urlParams.test&&d.headRevisionId==y&&EditorUi.debug("DriveClient: Remote Etag Changed","local",m,
-"remote",d.etag,"rev",a.desc.headRevisionId,"response",[d],"file",[a]),f(b,d)}catch(ba){u(ba)}}),mxUtils.bind(this,function(){f(b)})):f(b)}catch(Y){u(Y)}}}))}catch(Z){u(Z)}}),p=mxUtils.bind(this,function(b){a.saveLevel=9;if(b||null==m)n(b);else{var c=!0,d=null;try{d=window.setTimeout(mxUtils.bind(this,function(){c=!1;f({code:App.ERROR_TIMEOUT})}),3*this.ui.timeout)}catch(X){}this.executeRequest({url:"/files/"+a.getId()+"?supportsAllDrives=true&fields="+this.catchupFields},mxUtils.bind(this,function(e){window.clearTimeout(d);
-if(c){a.saveLevel=10;try{null!=e&&e.headRevisionId==y?("1"==urlParams.test&&m!=e.etag&&EditorUi.debug("DriveClient: Preflight Etag Update","from",m,"to",e.etag,"rev",a.desc.headRevisionId,"response",[e],"file",[a]),m=e.etag,n(b)):f({error:{code:412}},e)}catch(Z){u(Z)}}}),mxUtils.bind(this,function(b){window.clearTimeout(d);c&&(a.saveLevel=11,f(b))}))}});if(x&&null==g){a.saveLevel=8;var A=new Image;A.onload=mxUtils.bind(this,function(){try{var a=this.thumbnailWidth/A.width,b=document.createElement("canvas");
-b.width=this.thumbnailWidth;b.height=Math.floor(A.height*a);b.getContext("2d").drawImage(A,0,0,b.width,b.height);var c=b.toDataURL(),c=c.substring(c.indexOf(",")+1).replace(/\+/g,"-").replace(/\//g,"_");C.thumbnail={image:c,mimeType:"image/png"};p(!1)}catch(X){try{p(!1)}catch(Z){u(Z)}}});A.src="data:image/png;base64,"+d}else p(!1)}catch(W){u(W)}});if(x){var I=this.ui.getPngFileProperties(this.ui.fileNode);this.ui.getEmbeddedPng(mxUtils.bind(this,function(a){D(a,!0)}),f,this.ui.getCurrentFile()!=a?
+"remote",d.etag,"rev",a.desc.headRevisionId,"response",[d],"file",[a]),g(b,d)}catch(ba){u(ba)}}),mxUtils.bind(this,function(){g(b)})):g(b)}catch(Y){u(Y)}}}))}catch(Z){u(Z)}}),p=mxUtils.bind(this,function(b){a.saveLevel=9;if(b||null==m)n(b);else{var c=!0,d=null;try{d=window.setTimeout(mxUtils.bind(this,function(){c=!1;g({code:App.ERROR_TIMEOUT})}),3*this.ui.timeout)}catch(X){}this.executeRequest({url:"/files/"+a.getId()+"?supportsAllDrives=true&fields="+this.catchupFields},mxUtils.bind(this,function(e){window.clearTimeout(d);
+if(c){a.saveLevel=10;try{null!=e&&e.headRevisionId==y?("1"==urlParams.test&&m!=e.etag&&EditorUi.debug("DriveClient: Preflight Etag Update","from",m,"to",e.etag,"rev",a.desc.headRevisionId,"response",[e],"file",[a]),m=e.etag,n(b)):g({error:{code:412}},e)}catch(Z){u(Z)}}}),mxUtils.bind(this,function(b){window.clearTimeout(d);c&&(a.saveLevel=11,g(b))}))}});if(x&&null==f){a.saveLevel=8;var q=new Image;q.onload=mxUtils.bind(this,function(){try{var a=this.thumbnailWidth/q.width,b=document.createElement("canvas");
+b.width=this.thumbnailWidth;b.height=Math.floor(q.height*a);b.getContext("2d").drawImage(q,0,0,b.width,b.height);var c=b.toDataURL(),c=c.substring(c.indexOf(",")+1).replace(/\+/g,"-").replace(/\//g,"_");C.thumbnail={image:c,mimeType:"image/png"};p(!1)}catch(X){try{p(!1)}catch(Z){u(Z)}}});q.src="data:image/png;base64,"+d}else p(!1)}catch(W){u(W)}});if(x){var I=this.ui.getPngFileProperties(this.ui.fileNode);this.ui.getEmbeddedPng(mxUtils.bind(this,function(a){D(a,!0)}),g,this.ui.getCurrentFile()!=a?
q:null,I.scale,I.border)}else D(q,!1)}catch(N){u(N)}});try{a.saveLevel=2,(e||x||a.constructor==DriveLibrary||!this.enableThumbnails||"0"==urlParams.thumb||null!=C.mimeType&&"application/vnd.jgraph.mxfile"!=C.mimeType.substring(0,29)||!this.ui.getThumbnail(this.thumbnailWidth,mxUtils.bind(this,function(a){try{var b=null;try{null!=a&&(b=a.toDataURL("image/png")),null!=b&&(b=b.length>this.maxThumbnailSize?null:b.substring(b.indexOf(",")+1).replace(/\+/g,"-").replace(/\//g,"_"))}catch(F){b=null}D(b,"image/png")}catch(F){u(F)}})))&&
-D(null,null,a.constructor!=DriveLibrary)}catch(G){u(G)}}else this.ui.editor.graph.reset(),f({message:mxResources.get("readOnly")})}catch(G){u(G)}};DriveClient.prototype.insertFile=function(a,b,d,g,m,e,k){e=null!=e?e:this.xmlMimeType;a={mimeType:e,title:a};null!=d&&(a.parents=[{kind:"drive#fileLink",id:d}]);this.executeRequest(this.createUploadRequest(null,a,b,!1,k),mxUtils.bind(this,function(a){e==this.libraryMimeType?g(new DriveLibrary(this.ui,b,a)):0==a?null!=m&&m({message:mxResources.get("errorSavingFile")}):
-g(new DriveFile(this.ui,b,a))}),m)};DriveClient.prototype.createUploadRequest=function(a,b,d,g,m,e,k){m=null!=m?m:!1;var c={"Content-Type":'multipart/mixed; boundary="-------314159265358979323846"'};null!=e&&(c["If-Match"]=e);a={fullUrl:"https://content.googleapis.com/upload/drive/v2/files"+(null!=a?"/"+a:"")+"?uploadType=multipart&supportsAllDrives=true&enforceSingleParent=true&fields="+this.allFields,method:null!=a?"PUT":"POST",headers:c,params:"\r\n---------314159265358979323846\r\nContent-Type: application/json\r\n\r\n"+
-JSON.stringify(b)+"\r\n---------314159265358979323846\r\nContent-Type: application/octect-stream\r\nContent-Transfer-Encoding: base64\r\n\r\n"+(null!=d?m?d:!window.btoa||mxClient.IS_IE||mxClient.IS_IE11?Base64.encode(d):Graph.base64EncodeUnicode(d):"")+"\r\n---------314159265358979323846--"};g||(a.fullUrl+="&newRevision=false");k&&(a.fullUrl+="&pinned=true");return a};DriveClient.prototype.createLinkPicker=function(){var c=d.linkPicker;if(null==c||d.linkPickerToken!=a){d.linkPickerToken=a;var c=(new google.picker.DocsView(google.picker.ViewId.FOLDERS)).setParent("root").setIncludeFolders(!0).setSelectFolderEnabled(!0),
-b=(new google.picker.DocsView).setIncludeFolders(!0).setSelectFolderEnabled(!0),f=(new google.picker.DocsView).setIncludeFolders(!0).setEnableDrives(!0).setSelectFolderEnabled(!0),c=(new google.picker.PickerBuilder).setAppId(this.appId).setLocale(mxLanguage).setOAuthToken(d.linkPickerToken).enableFeature(google.picker.Feature.SUPPORT_DRIVES).addView(c).addView(b).addView(f).addView(google.picker.ViewId.RECENTLY_PICKED)}return c};DriveClient.prototype.pickFile=function(c,b,f){this.filePickerCallback=
+D(null,null,a.constructor!=DriveLibrary)}catch(G){u(G)}}else this.ui.editor.graph.reset(),g({message:mxResources.get("readOnly")})}catch(G){u(G)}};DriveClient.prototype.insertFile=function(a,b,d,f,m,e,k){e=null!=e?e:this.xmlMimeType;a={mimeType:e,title:a};null!=d&&(a.parents=[{kind:"drive#fileLink",id:d}]);this.executeRequest(this.createUploadRequest(null,a,b,!1,k),mxUtils.bind(this,function(a){e==this.libraryMimeType?f(new DriveLibrary(this.ui,b,a)):0==a?null!=m&&m({message:mxResources.get("errorSavingFile")}):
+f(new DriveFile(this.ui,b,a))}),m)};DriveClient.prototype.createUploadRequest=function(a,b,d,f,m,e,k){m=null!=m?m:!1;var c={"Content-Type":'multipart/mixed; boundary="-------314159265358979323846"'};null!=e&&(c["If-Match"]=e);a={fullUrl:"https://content.googleapis.com/upload/drive/v2/files"+(null!=a?"/"+a:"")+"?uploadType=multipart&supportsAllDrives=true&enforceSingleParent=true&fields="+this.allFields,method:null!=a?"PUT":"POST",headers:c,params:"\r\n---------314159265358979323846\r\nContent-Type: application/json\r\n\r\n"+
+JSON.stringify(b)+"\r\n---------314159265358979323846\r\nContent-Type: application/octect-stream\r\nContent-Transfer-Encoding: base64\r\n\r\n"+(null!=d?m?d:!window.btoa||mxClient.IS_IE||mxClient.IS_IE11?Base64.encode(d):Graph.base64EncodeUnicode(d):"")+"\r\n---------314159265358979323846--"};f||(a.fullUrl+="&newRevision=false");k&&(a.fullUrl+="&pinned=true");return a};DriveClient.prototype.createLinkPicker=function(){var c=d.linkPicker;if(null==c||d.linkPickerToken!=a){d.linkPickerToken=a;var c=(new google.picker.DocsView(google.picker.ViewId.FOLDERS)).setParent("root").setIncludeFolders(!0).setSelectFolderEnabled(!0),
+b=(new google.picker.DocsView).setIncludeFolders(!0).setSelectFolderEnabled(!0),g=(new google.picker.DocsView).setIncludeFolders(!0).setEnableDrives(!0).setSelectFolderEnabled(!0),c=(new google.picker.PickerBuilder).setAppId(this.appId).setLocale(mxLanguage).setOAuthToken(d.linkPickerToken).enableFeature(google.picker.Feature.SUPPORT_DRIVES).addView(c).addView(b).addView(g).addView(google.picker.ViewId.RECENTLY_PICKED)}return c};DriveClient.prototype.pickFile=function(c,b,g){this.filePickerCallback=
null!=c?c:mxUtils.bind(this,function(a){this.ui.loadFile("G"+a)});this.filePicked=mxUtils.bind(this,function(a){a.action==google.picker.Action.PICKED&&this.filePickerCallback(a.docs[0].id,a.docs[0])});this.ui.spinner.spin(document.body,mxResources.get("authorizing"))&&this.execute(mxUtils.bind(this,function(){try{this.ui.spinner.stop();var c=b?"genericPicker":"filePicker",m=mxUtils.bind(this,function(a){"picker modal-dialog-bg picker-dialog-bg"==mxEvent.getSource(a).className&&(mxEvent.removeListener(document,
-"click",m),this[c].setVisible(!1),f&&f())});if(null==d[c]||d[c+"Token"]!=a){d[c+"Token"]=a;var e=(new google.picker.DocsView(google.picker.ViewId.FOLDERS)).setParent("root").setIncludeFolders(!0),k=(new google.picker.DocsView).setIncludeFolders(!0),l=(new google.picker.DocsView).setEnableDrives(!0).setIncludeFolders(!0),n=(new google.picker.DocsUploadView).setIncludeFolders(!0);b?(e.setMimeTypes("*/*"),k.setMimeTypes("*/*"),l.setMimeTypes("*/*")):(e.setMimeTypes(this.mimeTypes),k.setMimeTypes(this.mimeTypes),
+"click",m),this[c].setVisible(!1),g&&g())});if(null==d[c]||d[c+"Token"]!=a){d[c+"Token"]=a;var e=(new google.picker.DocsView(google.picker.ViewId.FOLDERS)).setParent("root").setIncludeFolders(!0),k=(new google.picker.DocsView).setIncludeFolders(!0),l=(new google.picker.DocsView).setEnableDrives(!0).setIncludeFolders(!0),n=(new google.picker.DocsUploadView).setIncludeFolders(!0);b?(e.setMimeTypes("*/*"),k.setMimeTypes("*/*"),l.setMimeTypes("*/*")):(e.setMimeTypes(this.mimeTypes),k.setMimeTypes(this.mimeTypes),
l.setMimeTypes(this.mimeTypes));d[c]=(new google.picker.PickerBuilder).setOAuthToken(d[c+"Token"]).setLocale(mxLanguage).setAppId(this.appId).enableFeature(google.picker.Feature.SUPPORT_DRIVES).addView(e).addView(k).addView(l).addView(google.picker.ViewId.RECENTLY_PICKED).addView(n);if(urlParams.gPickerSize){var p=urlParams.gPickerSize.split(",");d[c]=d[c].setSize(p[0],p[1])}urlParams.topBaseUrl&&(d[c]=d[c].setOrigin(decodeURIComponent(urlParams.topBaseUrl)));d[c]=d[c].setCallback(mxUtils.bind(this,
-function(a){if(a.action==google.picker.Action.PICKED||a.action==google.picker.Action.CANCEL)mxEvent.removeListener(document,"click",m),f&&a.action==google.picker.Action.CANCEL&&f();a.action==google.picker.Action.PICKED&&this.filePicked(a)})).build()}mxEvent.addListener(document,"click",m);d[c].setVisible(!0)}catch(q){this.ui.spinner.stop(),this.ui.handleError(q)}}))};DriveClient.prototype.pickFolder=function(c,b){this.folderPickerCallback=c;var f=mxUtils.bind(this,function(){try{this.ui.spinner.spin(document.body,
+function(a){if(a.action==google.picker.Action.PICKED||a.action==google.picker.Action.CANCEL)mxEvent.removeListener(document,"click",m),g&&a.action==google.picker.Action.CANCEL&&g();a.action==google.picker.Action.PICKED&&this.filePicked(a)})).build()}mxEvent.addListener(document,"click",m);d[c].setVisible(!0)}catch(q){this.ui.spinner.stop(),this.ui.handleError(q)}}))};DriveClient.prototype.pickFolder=function(c,b){this.folderPickerCallback=c;var g=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 b=mxUtils.bind(this,function(a){"picker modal-dialog-bg picker-dialog-bg"==mxEvent.getSource(a).className&&(mxEvent.removeListener(document,"click",b),d.folderPicker.setVisible(!1))});if(null==d.folderPicker||d.folderPickerToken!=a){d.folderPickerToken=a;var c=(new google.picker.DocsView(google.picker.ViewId.FOLDERS)).setParent("root").setIncludeFolders(!0).setSelectFolderEnabled(!0).setMimeTypes("application/vnd.google-apps.folder"),
-e=(new google.picker.DocsView).setIncludeFolders(!0).setSelectFolderEnabled(!0).setMimeTypes("application/vnd.google-apps.folder"),f=(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(c).addView(e).addView(f).addView(google.picker.ViewId.RECENTLY_PICKED).setTitle(mxResources.get("pickFolder"));
+e=(new google.picker.DocsView).setIncludeFolders(!0).setSelectFolderEnabled(!0).setMimeTypes("application/vnd.google-apps.folder"),g=(new google.picker.DocsView).setIncludeFolders(!0).setEnableDrives(!0).setSelectFolderEnabled(!0).setMimeTypes("application/vnd.google-apps.folder");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(c).addView(e).addView(g).addView(google.picker.ViewId.RECENTLY_PICKED).setTitle(mxResources.get("pickFolder"));
if(urlParams.gPickerSize){var l=urlParams.gPickerSize.split(",");d.folderPicker=d.folderPicker.setSize(l[0],l[1])}urlParams.topBaseUrl&&(d.folderPicker=d.folderPicker.setOrigin(decodeURIComponent(urlParams.topBaseUrl)));d.folderPicker=d.folderPicker.setCallback(mxUtils.bind(this,function(a){a.action!=google.picker.Action.PICKED&&a.action!=google.picker.Action.CANCEL||mxEvent.removeListener(document,"click",b);this.folderPickerCallback(a)})).build()}mxEvent.addListener(document,"click",b);d.folderPicker.setVisible(!0)}catch(n){this.ui.spinner.stop(),
-this.ui.handleError(n)}}))}catch(g){this.ui.handleError(g)}});b?f():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(){f()}),mxResources.get("yes"),mxResources.get("noPickFolder")+"...",!0)};DriveClient.prototype.pickLibrary=function(c){this.filePickerCallback=c;this.filePicked=mxUtils.bind(this,function(a){a.action==google.picker.Action.PICKED?
+this.ui.handleError(n)}}))}catch(f){this.ui.handleError(f)}});b?g():this.ui.confirm(mxResources.get("useRootFolder"),mxUtils.bind(this,function(){this.folderPickerCallback({action:google.picker.Action.PICKED,docs:[{type:"folder",id:"root"}]})}),mxUtils.bind(this,function(){g()}),mxResources.get("yes"),mxResources.get("noPickFolder")+"...",!0)};DriveClient.prototype.pickLibrary=function(c){this.filePickerCallback=c;this.filePicked=mxUtils.bind(this,function(a){a.action==google.picker.Action.PICKED?
this.filePickerCallback(a.docs[0].id):a.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 b=mxUtils.bind(this,function(a){"picker modal-dialog-bg picker-dialog-bg"==mxEvent.getSource(a).className&&(mxEvent.removeListener(document,"click",b),d.libraryPicker.setVisible(!1))});if(null==d.libraryPicker||d.libraryPickerToken!=
-a){d.libraryPickerToken=a;var c=(new google.picker.DocsView(google.picker.ViewId.FOLDERS)).setParent("root").setIncludeFolders(!0).setMimeTypes(this.libraryMimeType+",application/xml,text/plain,application/octet-stream"),g=(new google.picker.DocsView).setIncludeFolders(!0).setMimeTypes(this.libraryMimeType+",application/xml,text/plain,application/octet-stream"),m=(new google.picker.DocsView).setEnableDrives(!0).setIncludeFolders(!0).setMimeTypes(this.libraryMimeType+",application/xml,text/plain,application/octet-stream"),
-e=(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(c).addView(g).addView(m).addView(google.picker.ViewId.RECENTLY_PICKED).addView(e);if(urlParams.gPickerSize){var k=urlParams.gPickerSize.split(",");d.libraryPicker=d.libraryPicker.setSize(k[0],k[1])}urlParams.topBaseUrl&&(d.libraryPicker=d.libraryPicker.setOrigin(decodeURIComponent(urlParams.topBaseUrl)));
+a){d.libraryPickerToken=a;var c=(new google.picker.DocsView(google.picker.ViewId.FOLDERS)).setParent("root").setIncludeFolders(!0).setMimeTypes(this.libraryMimeType+",application/xml,text/plain,application/octet-stream"),f=(new google.picker.DocsView).setIncludeFolders(!0).setMimeTypes(this.libraryMimeType+",application/xml,text/plain,application/octet-stream"),m=(new google.picker.DocsView).setEnableDrives(!0).setIncludeFolders(!0).setMimeTypes(this.libraryMimeType+",application/xml,text/plain,application/octet-stream"),
+e=(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(c).addView(f).addView(m).addView(google.picker.ViewId.RECENTLY_PICKED).addView(e);if(urlParams.gPickerSize){var k=urlParams.gPickerSize.split(",");d.libraryPicker=d.libraryPicker.setSize(k[0],k[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",b);a.action==google.picker.Action.PICKED&&this.filePicked(a)})).build()}mxEvent.addListener(document,"click",b);d.libraryPicker.setVisible(!0)}catch(l){this.ui.spinner.stop(),this.ui.handleError(l)}}))};DriveClient.prototype.showPermissions=function(c){var b=mxUtils.bind(this,function(){var a=new ConfirmDialog(this.ui,
mxResources.get("googleSharingNotAvailable"),mxUtils.bind(this,function(){this.ui.editor.graph.openLink("https://drive.google.com/open?id="+c)}),null,mxResources.get("open"),null,null,null,null,IMAGE_PATH+"/google-share.png");this.ui.showDialog(a.container,360,190,!0,!0);a.init()});this.sharingFailed?b():this.checkToken(mxUtils.bind(this,function(){try{var d=new gapi.drive.share.ShareClient(this.appId);d.setOAuthToken(a);d.setItemIds([c]);d.showSettingsDialog();"MutationObserver"in window&&(null!=
this.sharingObserver&&(this.sharingObserver.disconnect(),this.sharingObserver=null),this.sharingObserver=new MutationObserver(mxUtils.bind(this,function(a){for(var c=!1,d=0;d<a.length;d++)for(var f=0;f<a[d].addedNodes.length;f++){var g=a[d].addedNodes[f];"BUTTON"==g.nodeName&&"ok"==g.getAttribute("name")&&null!=g.parentNode&&null!=g.parentNode.parentNode&&"dialog"==g.parentNode.parentNode.getAttribute("role")?(this.sharingFailed=!0,g.click(),b(),c=!0):"DIV"==g.nodeName&&"shr-q-shr-r-shr-xb"==g.className&&
-(c=!0)}c&&(this.sharingObserver.disconnect(),this.sharingObserver=null)})),this.sharingObserver.observe(document,{childList:!0,subtree:!0}))}catch(g){this.ui.handleError(g)}}))};DriveClient.prototype.clearPersistentToken=function(){var a=JSON.parse(this.getPersistentToken(!0))||{};delete a.current;delete a[this.userId];for(var b in a){a.current={userId:b,expires:0};break}DrawioClient.prototype.setPersistentToken.call(this,JSON.stringify(a))};DriveClient.prototype.setPersistentToken=function(a,b){var c=
+(c=!0)}c&&(this.sharingObserver.disconnect(),this.sharingObserver=null)})),this.sharingObserver.observe(document,{childList:!0,subtree:!0}))}catch(f){this.ui.handleError(f)}}))};DriveClient.prototype.clearPersistentToken=function(){var a=JSON.parse(this.getPersistentToken(!0))||{};delete a.current;delete a[this.userId];for(var b in a){a.current={userId:b,expires:0};break}DrawioClient.prototype.setPersistentToken.call(this,JSON.stringify(a))};DriveClient.prototype.setPersistentToken=function(a,b){var c=
JSON.parse(this.getPersistentToken(!0))||{};a.userId=this.userId;c.current=a;c[this.userId]={user:this.user};DrawioClient.prototype.setPersistentToken.call(this,JSON.stringify(c),b)}})();DropboxFile=function(a,d,c){DrawioFile.call(this,a,d);this.stat=c};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(a,d){var c=this.ui.dropbox.client.filesListRevisions({path:this.stat.path_lower,limit:100});c.then(mxUtils.bind(this,function(b){try{for(var c=[],g=b.entries.length-1;0<=g;g--)mxUtils.bind(this,function(a){c.push({modifiedDate:a.client_modified,fileSize:a.size,getXml:mxUtils.bind(this,function(b,c){this.ui.dropbox.readFile({path:this.stat.path_lower,rev:a.rev},b,c)}),getUrl:mxUtils.bind(this,function(b){return this.ui.getUrl(window.location.pathname+"?rev="+
-a.rev+"&chrome=0&nav=1&layers=1&edit=_blank"+(null!=b?"&page="+b:""))+window.location.hash})})})(b.entries[g]);a(c)}catch(m){d(m)}}));c["catch"](function(a){d(a)})};DropboxFile.prototype.getLatestVersion=function(a,d){this.ui.dropbox.getFile(this.getId(),a,d)};DropboxFile.prototype.updateDescriptor=function(a){this.stat=a.stat};DropboxFile.prototype.save=function(a,d,c,b,f){this.doSave(this.getTitle(),a,d,c,b,f)};DropboxFile.prototype.saveAs=function(a,d,c){this.doSave(a,!1,d,c)};
-DropboxFile.prototype.doSave=function(a,d,c,b,f,g){var m=this.stat.name;this.stat.name=a;DrawioFile.prototype.save.apply(this,[null,mxUtils.bind(this,function(){this.stat.name=m;this.saveFile(a,d,c,b,f,g)}),b,f,g])};
+DropboxFile.prototype.getRevisions=function(a,d){var c=this.ui.dropbox.client.filesListRevisions({path:this.stat.path_lower,limit:100});c.then(mxUtils.bind(this,function(b){try{for(var c=[],f=b.entries.length-1;0<=f;f--)mxUtils.bind(this,function(a){c.push({modifiedDate:a.client_modified,fileSize:a.size,getXml:mxUtils.bind(this,function(b,c){this.ui.dropbox.readFile({path:this.stat.path_lower,rev:a.rev},b,c)}),getUrl:mxUtils.bind(this,function(b){return this.ui.getUrl(window.location.pathname+"?rev="+
+a.rev+"&chrome=0&nav=1&layers=1&edit=_blank"+(null!=b?"&page="+b:""))+window.location.hash})})})(b.entries[f]);a(c)}catch(m){d(m)}}));c["catch"](function(a){d(a)})};DropboxFile.prototype.getLatestVersion=function(a,d){this.ui.dropbox.getFile(this.getId(),a,d)};DropboxFile.prototype.updateDescriptor=function(a){this.stat=a.stat};DropboxFile.prototype.save=function(a,d,c,b,g){this.doSave(this.getTitle(),a,d,c,b,g)};DropboxFile.prototype.saveAs=function(a,d,c){this.doSave(a,!1,d,c)};
+DropboxFile.prototype.doSave=function(a,d,c,b,g,f){var m=this.stat.name;this.stat.name=a;DrawioFile.prototype.save.apply(this,[null,mxUtils.bind(this,function(){this.stat.name=m;this.saveFile(a,d,c,b,g,f)}),b,g,f])};
DropboxFile.prototype.saveFile=function(a,d,c,b){this.isEditable()?this.savingFile?null!=b&&b({code:App.ERROR_BUSY}):(d=mxUtils.bind(this,function(d){if(d)try{this.savingFileTime=new Date;this.setShadowModified(!1);this.savingFile=!0;var f=mxUtils.bind(this,function(d){var e=this.stat.path_display.lastIndexOf("/"),e=1<e?this.stat.path_display.substring(1,e+1):null;this.ui.dropbox.saveFile(a,d,mxUtils.bind(this,function(a){this.setModified(this.getShadowModified());this.savingFile=!1;this.stat=a;this.contentChanged();
-null!=c&&c()}),mxUtils.bind(this,function(a){this.savingFile=!1;null!=b&&b(a)}),e)});if(this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle())){var m=this.ui.getPngFileProperties(this.ui.fileNode);this.ui.getEmbeddedPng(mxUtils.bind(this,function(a){f(this.ui.base64ToBlob(a,"image/png"))}),b,this.ui.getCurrentFile()!=this?this.getData():null,m.scale,m.border)}else f(this.getData())}catch(e){if(this.savingFile=!1,null!=b)b(e);else throw e;}else null!=b&&b()}),this.getTitle()==a?d(!0):this.ui.dropbox.checkExists(a,
+null!=c&&c()}),mxUtils.bind(this,function(a){this.savingFile=!1;null!=b&&b(a)}),e)});if(this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle())){var g=this.ui.getPngFileProperties(this.ui.fileNode);this.ui.getEmbeddedPng(mxUtils.bind(this,function(a){f(this.ui.base64ToBlob(a,"image/png"))}),b,this.ui.getCurrentFile()!=this?this.getData():null,g.scale,g.border)}else f(this.getData())}catch(e){if(this.savingFile=!1,null!=b)b(e);else throw e;}else null!=b&&b()}),this.getTitle()==a?d(!0):this.ui.dropbox.checkExists(a,
d)):null!=c&&c()};DropboxFile.prototype.rename=function(a,d,c){this.ui.dropbox.renameFile(this,a,mxUtils.bind(this,function(b){this.hasSameExtension(a,this.getTitle())?(this.stat=b,this.descriptorChanged(),null!=d&&d()):(this.stat=b,this.descriptorChanged(),this.save(!0,d,c))}),c)};DropboxLibrary=function(a,d,c){DropboxFile.call(this,a,d,c)};mxUtils.extend(DropboxLibrary,DropboxFile);DropboxLibrary.prototype.isAutosave=function(){return!0};DropboxLibrary.prototype.doSave=function(a,d,c){this.saveFile(a,!1,d,c)};DropboxLibrary.prototype.open=function(){};(function(){var a=null;window.DropboxClient=function(a){DrawioClient.call(this,a,"dbauth");this.client=new Dropbox({clientId:this.clientId})};mxUtils.extend(DropboxClient,DrawioClient);DropboxClient.prototype.appPath="/drawio/";DropboxClient.prototype.extension=".drawio";DropboxClient.prototype.writingFile=!1;DropboxClient.prototype.maxRetries=4;DropboxClient.prototype.clientId=window.DRAWIO_DROPBOX_ID;DropboxClient.prototype.redirectUri=window.location.protocol+"//"+window.location.host+"/dropbox";
-DropboxClient.prototype.logout=function(){this.ui.editor.loadUrl(this.redirectUri+"?doLogout=1&state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.hostname));this.clearPersistentToken();this.setUser(null);a=null;this.client.authTokenRevoke().then(mxUtils.bind(this,function(){this.client.setAccessToken(null)}))};DropboxClient.prototype.updateUser=function(d,c,b){var f=!0,g=window.setTimeout(mxUtils.bind(this,function(){f=!1;c({code:App.ERROR_TIMEOUT})}),this.ui.timeout),m=this.client.usersGetCurrentAccount();
-m.then(mxUtils.bind(this,function(a){window.clearTimeout(g);f&&(this.setUser(new DrawioUser(a.account_id,a.email,a.name.display_name)),d())}));m["catch"](mxUtils.bind(this,function(e){window.clearTimeout(g);f&&(null==e||401!==e.status||b?c({message:mxResources.get("accessDenied")}):(this.setUser(null),this.client.setAccessToken(null),a=null,this.authenticate(mxUtils.bind(this,function(){this.updateUser(d,c,!0)}),c)))}))};DropboxClient.prototype.authenticate=function(a,c){(new mxXmlRequest(this.redirectUri+
-"?getState=1",null,"GET")).send(mxUtils.bind(this,function(b){200<=b.getStatus()&&299>=b.getStatus()?this.authenticateStep2(b.getText(),a,c):null!=c&&c(b)}),c)};DropboxClient.prototype.authenticateStep2=function(d,c,b){if(null==window.onDropboxCallback){var f=mxUtils.bind(this,function(){var g=!0;null!=this.getPersistentToken(!0)?(new mxXmlRequest(this.redirectUri+"?state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.hostname+"&token="+d),null,"GET")).send(mxUtils.bind(this,
-function(d){200<=d.getStatus()&&299>=d.getStatus()?(a=JSON.parse(d.getText()).access_token,this.client.setAccessToken(a),this.setUser(null),c()):(this.clearPersistentToken(),this.setUser(null),a=null,this.client.setAccessToken(null),401==d.getStatus()?f():b({message:mxResources.get("accessDenied"),retry:f}))}),b):this.ui.showAuthDialog(this,!0,mxUtils.bind(this,function(m,e){null!=window.open("https://www.dropbox.com/oauth2/authorize?client_id="+this.clientId+(m?"&token_access_type=offline":"")+"&redirect_uri="+
-encodeURIComponent(this.redirectUri)+"&response_type=code&state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.hostname+"&token="+d),"dbauth")?window.onDropboxCallback=mxUtils.bind(this,function(d,l){if(g){window.onDropboxCallback=null;g=!1;try{null==d?b({message:mxResources.get("accessDenied"),retry:f}):(null!=e&&e(),a=d.access_token,this.client.setAccessToken(a),this.setUser(null),m&&this.setPersistentToken("remembered"),c())}catch(n){b(n)}finally{null!=l&&l.close()}}else null!=
-l&&l.close()}):b({message:mxResources.get("serviceUnavailableOrBlocked"),retry:f})}),mxUtils.bind(this,function(){g&&(window.onDropboxCallback=null,g=!1,b({message:mxResources.get("accessDenied"),retry:f}))}))});f()}else b({code:App.ERROR_BUSY})};DropboxClient.prototype.executePromise=function(d,c,b){var f=mxUtils.bind(this,function(m){var e=!0,k=window.setTimeout(mxUtils.bind(this,function(){e=!1;b({code:App.ERROR_TIMEOUT,retry:g})}),this.ui.timeout),l=d();l.then(mxUtils.bind(this,function(a){window.clearTimeout(k);
-e&&null!=c&&c(a)}));l["catch"](mxUtils.bind(this,function(c){window.clearTimeout(k);e&&(null==c||500!=c.status&&400!=c.status&&401!=c.status?b({message:mxResources.get("error")+" "+c.status}):(this.setUser(null),this.client.setAccessToken(null),a=null,m?b({message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,function(){this.authenticate(function(){g(!0)},b)})}):this.authenticate(function(){f(!0)},b)))}))}),g=mxUtils.bind(this,function(a){null==this.user?this.updateUser(function(){g(!0)},
-b,a):f(a)});null==a?this.authenticate(function(){g(!0)},b):g(!1)};DropboxClient.prototype.getLibrary=function(a,c,b){this.getFile(a,c,b,!0)};DropboxClient.prototype.getFile=function(d,c,b,f){f=null!=f?f:!1;var g=/\.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&&g){var m=mxUtils.bind(this,function(){var a=d.split("/");this.ui.convertFile(d,0<a.length?a[a.length-1]:d,null,this.extension,c,b)});null!=a?m():this.authenticate(m,
-b)}else m={path:"/"+d},null!=urlParams.rev&&(m.rev=urlParams.rev),this.readFile(m,mxUtils.bind(this,function(a,b){var e=null;if(0<(g?a.lastIndexOf(","):-1)){var k=this.ui.extractGraphModelFromPng(a);null!=k&&0<k.length?a=k:e=new LocalFile(this,a,d,!0)}c(null!=e?e:f?new DropboxLibrary(this.ui,a,b):new DropboxFile(this.ui,a,b))}),b,g)};DropboxClient.prototype.readFile=function(d,c,b,f){var g=mxUtils.bind(this,function(e){var k=!0,l=window.setTimeout(mxUtils.bind(this,function(){k=!1;b({code:App.ERROR_TIMEOUT})}),
-this.ui.timeout),n=this.client.filesGetMetadata({path:"/"+d.path.substring(1),include_deleted:!1});n.then(mxUtils.bind(this,function(a){}));n["catch"](function(a){window.clearTimeout(l);k&&null!=a&&409==a.status&&(k=!1,b({message:mxResources.get("fileNotFound")}))});n=this.client.filesDownload(d);n.then(mxUtils.bind(this,function(a){window.clearTimeout(l);if(k){k=!1;try{var d=new FileReader;d.onload=mxUtils.bind(this,function(b){c(d.result,a)});f?d.readAsDataURL(a.fileBlob):d.readAsText(a.fileBlob)}catch(u){b(u)}}}));
-n["catch"](mxUtils.bind(this,function(c){window.clearTimeout(l);k&&(k=!1,null==c||500!=c.status&&400!=c.status&&401!=c.status?b({message:mxResources.get("error")+" "+c.status}):(this.client.setAccessToken(null),this.setUser(null),a=null,e?b({message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,function(){this.authenticate(function(){m(!0)},b)})}):this.authenticate(function(){g(!0)},b)))}))}),m=mxUtils.bind(this,function(a){null==this.user?this.updateUser(function(){m(!0)},b,a):g(a)});null==
-a?this.authenticate(function(){m(!0)},b):m(!1)};DropboxClient.prototype.checkExists=function(a,c,b){var d=mxUtils.bind(this,function(){return this.client.filesGetMetadata({path:"/"+a.toLowerCase(),include_deleted:!1})});this.executePromise(d,mxUtils.bind(this,function(d){b?c(!1,!0,d):this.ui.confirm(mxResources.get("replaceIt",[a]),function(){c(!0,!0,d)},function(){c(!1,!0,d)})}),function(a){c(!0,!1)})};DropboxClient.prototype.renameFile=function(a,c,b,f){if(/[\\\/:\?\*"\|]/.test(c))f({message:mxResources.get("dropboxCharsNotAllowed")});
-else{if(null!=a&&null!=c){var d=a.stat.path_display.substring(1),m=d.lastIndexOf("/");0<m&&(c=d.substring(0,m+1)+c)}null!=a&&null!=c&&a.stat.path_lower.substring(1)!==c.toLowerCase()?this.checkExists(c,mxUtils.bind(this,function(d,g,m){d?(d=mxUtils.bind(this,function(d){d=mxUtils.bind(this,function(){return this.client.filesMove({from_path:a.stat.path_display,to_path:"/"+c,autorename:!1})});this.executePromise(d,b,f)}),g&&m.path_lower.substring(1)!==c.toLowerCase()?(g=mxUtils.bind(this,function(){return this.client.filesDelete({path:"/"+
-c.toLowerCase()})}),this.executePromise(g,d,f)):d()):f()})):f({message:mxResources.get("invalidName")})}};DropboxClient.prototype.insertLibrary=function(a,c,b,f){this.insertFile(a,c,b,f,!0)};DropboxClient.prototype.insertFile=function(a,c,b,f,g){g=null!=g?g:!1;this.checkExists(a,mxUtils.bind(this,function(d){d?this.saveFile(a,c,mxUtils.bind(this,function(a){g?b(new DropboxLibrary(this.ui,c,a)):b(new DropboxFile(this.ui,c,a))}),f):f()}))};DropboxClient.prototype.saveFile=function(a,c,b,f,g){if(/[\\\/:\?\*"\|]/.test(a))f({message:mxResources.get("dropboxCharsNotAllowed")});
-else if(15E7<=c.length)f({message:mxResources.get("drawingTooLarge")+" ("+this.ui.formatFileSize(c.length)+" / 150 MB)"});else{g=null!=g?g:"";var d=mxUtils.bind(this,function(){return this.client.filesUpload({path:"/"+g+a,mode:{".tag":"overwrite"},mute:!0,contents:new Blob([c],{type:"text/plain"})})});this.executePromise(d,b,f)}};DropboxClient.prototype.pickLibrary=function(a){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"))){var b=mxUtils.bind(this,function(a){this.ui.spinner.stop();this.ui.handleError(a)}),d=c[0].link.indexOf(this.appPath);if(0<d){var g=decodeURIComponent(c[0].link.substring(d+this.appPath.length-1));this.readFile({path:g},mxUtils.bind(this,function(d,e){if(null!=e&&e.id==c[0].id)try{this.ui.spinner.stop(),a(g.substring(1),new DropboxLibrary(this.ui,d,e))}catch(k){this.ui.handleError(k)}else this.createLibrary(c[0],a,b)}),b)}else this.createLibrary(c[0],a,b)}})})};DropboxClient.prototype.createLibrary=
+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);a=null;this.client.authTokenRevoke().then(mxUtils.bind(this,function(){this.client.setAccessToken(null)}))};DropboxClient.prototype.updateUser=function(d,c,b){var g=!0,f=window.setTimeout(mxUtils.bind(this,function(){g=!1;c({code:App.ERROR_TIMEOUT})}),this.ui.timeout),m=this.client.usersGetCurrentAccount();
+m.then(mxUtils.bind(this,function(a){window.clearTimeout(f);g&&(this.setUser(new DrawioUser(a.account_id,a.email,a.name.display_name)),d())}));m["catch"](mxUtils.bind(this,function(e){window.clearTimeout(f);g&&(null==e||401!==e.status||b?c({message:mxResources.get("accessDenied")}):(this.setUser(null),this.client.setAccessToken(null),a=null,this.authenticate(mxUtils.bind(this,function(){this.updateUser(d,c,!0)}),c)))}))};DropboxClient.prototype.authenticate=function(a,c){(new mxXmlRequest(this.redirectUri+
+"?getState=1",null,"GET")).send(mxUtils.bind(this,function(b){200<=b.getStatus()&&299>=b.getStatus()?this.authenticateStep2(b.getText(),a,c):null!=c&&c(b)}),c)};DropboxClient.prototype.authenticateStep2=function(d,c,b){if(null==window.onDropboxCallback){var g=mxUtils.bind(this,function(){var f=!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(d){200<=d.getStatus()&&299>=d.getStatus()?(a=JSON.parse(d.getText()).access_token,this.client.setAccessToken(a),this.setUser(null),c()):(this.clearPersistentToken(),this.setUser(null),a=null,this.client.setAccessToken(null),401==d.getStatus()?g():b({message:mxResources.get("accessDenied"),retry:g}))}),b):this.ui.showAuthDialog(this,!0,mxUtils.bind(this,function(m,e){null!=window.open("https://www.dropbox.com/oauth2/authorize?client_id="+this.clientId+(m?"&token_access_type=offline":"")+"&redirect_uri="+
+encodeURIComponent(this.redirectUri)+"&response_type=code&state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.hostname+"&token="+d),"dbauth")?window.onDropboxCallback=mxUtils.bind(this,function(d,l){if(f){window.onDropboxCallback=null;f=!1;try{null==d?b({message:mxResources.get("accessDenied"),retry:g}):(null!=e&&e(),a=d.access_token,this.client.setAccessToken(a),this.setUser(null),m&&this.setPersistentToken("remembered"),c())}catch(n){b(n)}finally{null!=l&&l.close()}}else null!=
+l&&l.close()}):b({message:mxResources.get("serviceUnavailableOrBlocked"),retry:g})}),mxUtils.bind(this,function(){f&&(window.onDropboxCallback=null,f=!1,b({message:mxResources.get("accessDenied"),retry:g}))}))});g()}else b({code:App.ERROR_BUSY})};DropboxClient.prototype.executePromise=function(d,c,b){var g=mxUtils.bind(this,function(m){var e=!0,k=window.setTimeout(mxUtils.bind(this,function(){e=!1;b({code:App.ERROR_TIMEOUT,retry:f})}),this.ui.timeout),l=d();l.then(mxUtils.bind(this,function(a){window.clearTimeout(k);
+e&&null!=c&&c(a)}));l["catch"](mxUtils.bind(this,function(c){window.clearTimeout(k);e&&(null==c||500!=c.status&&400!=c.status&&401!=c.status?b({message:mxResources.get("error")+" "+c.status}):(this.setUser(null),this.client.setAccessToken(null),a=null,m?b({message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,function(){this.authenticate(function(){f(!0)},b)})}):this.authenticate(function(){g(!0)},b)))}))}),f=mxUtils.bind(this,function(a){null==this.user?this.updateUser(function(){f(!0)},
+b,a):g(a)});null==a?this.authenticate(function(){f(!0)},b):f(!1)};DropboxClient.prototype.getLibrary=function(a,c,b){this.getFile(a,c,b,!0)};DropboxClient.prototype.getFile=function(d,c,b,g){g=null!=g?g:!1;var f=/\.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&&f){var m=mxUtils.bind(this,function(){var a=d.split("/");this.ui.convertFile(d,0<a.length?a[a.length-1]:d,null,this.extension,c,b)});null!=a?m():this.authenticate(m,
+b)}else m={path:"/"+d},null!=urlParams.rev&&(m.rev=urlParams.rev),this.readFile(m,mxUtils.bind(this,function(a,b){var e=null;if(0<(f?a.lastIndexOf(","):-1)){var k=this.ui.extractGraphModelFromPng(a);null!=k&&0<k.length?a=k:e=new LocalFile(this,a,d,!0)}c(null!=e?e:g?new DropboxLibrary(this.ui,a,b):new DropboxFile(this.ui,a,b))}),b,f)};DropboxClient.prototype.readFile=function(d,c,b,g){var f=mxUtils.bind(this,function(e){var k=!0,l=window.setTimeout(mxUtils.bind(this,function(){k=!1;b({code:App.ERROR_TIMEOUT})}),
+this.ui.timeout),n=this.client.filesGetMetadata({path:"/"+d.path.substring(1),include_deleted:!1});n.then(mxUtils.bind(this,function(a){}));n["catch"](function(a){window.clearTimeout(l);k&&null!=a&&409==a.status&&(k=!1,b({message:mxResources.get("fileNotFound")}))});n=this.client.filesDownload(d);n.then(mxUtils.bind(this,function(a){window.clearTimeout(l);if(k){k=!1;try{var d=new FileReader;d.onload=mxUtils.bind(this,function(b){c(d.result,a)});g?d.readAsDataURL(a.fileBlob):d.readAsText(a.fileBlob)}catch(u){b(u)}}}));
+n["catch"](mxUtils.bind(this,function(c){window.clearTimeout(l);k&&(k=!1,null==c||500!=c.status&&400!=c.status&&401!=c.status?b({message:mxResources.get("error")+" "+c.status}):(this.client.setAccessToken(null),this.setUser(null),a=null,e?b({message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,function(){this.authenticate(function(){m(!0)},b)})}):this.authenticate(function(){f(!0)},b)))}))}),m=mxUtils.bind(this,function(a){null==this.user?this.updateUser(function(){m(!0)},b,a):f(a)});null==
+a?this.authenticate(function(){m(!0)},b):m(!1)};DropboxClient.prototype.checkExists=function(a,c,b){var d=mxUtils.bind(this,function(){return this.client.filesGetMetadata({path:"/"+a.toLowerCase(),include_deleted:!1})});this.executePromise(d,mxUtils.bind(this,function(d){b?c(!1,!0,d):this.ui.confirm(mxResources.get("replaceIt",[a]),function(){c(!0,!0,d)},function(){c(!1,!0,d)})}),function(a){c(!0,!1)})};DropboxClient.prototype.renameFile=function(a,c,b,g){if(/[\\\/:\?\*"\|]/.test(c))g({message:mxResources.get("dropboxCharsNotAllowed")});
+else{if(null!=a&&null!=c){var d=a.stat.path_display.substring(1),m=d.lastIndexOf("/");0<m&&(c=d.substring(0,m+1)+c)}null!=a&&null!=c&&a.stat.path_lower.substring(1)!==c.toLowerCase()?this.checkExists(c,mxUtils.bind(this,function(d,f,m){d?(d=mxUtils.bind(this,function(d){d=mxUtils.bind(this,function(){return this.client.filesMove({from_path:a.stat.path_display,to_path:"/"+c,autorename:!1})});this.executePromise(d,b,g)}),f&&m.path_lower.substring(1)!==c.toLowerCase()?(f=mxUtils.bind(this,function(){return this.client.filesDelete({path:"/"+
+c.toLowerCase()})}),this.executePromise(f,d,g)):d()):g()})):g({message:mxResources.get("invalidName")})}};DropboxClient.prototype.insertLibrary=function(a,c,b,g){this.insertFile(a,c,b,g,!0)};DropboxClient.prototype.insertFile=function(a,c,b,g,f){f=null!=f?f:!1;this.checkExists(a,mxUtils.bind(this,function(d){d?this.saveFile(a,c,mxUtils.bind(this,function(a){f?b(new DropboxLibrary(this.ui,c,a)):b(new DropboxFile(this.ui,c,a))}),g):g()}))};DropboxClient.prototype.saveFile=function(a,c,b,g,f){if(/[\\\/:\?\*"\|]/.test(a))g({message:mxResources.get("dropboxCharsNotAllowed")});
+else if(15E7<=c.length)g({message:mxResources.get("drawingTooLarge")+" ("+this.ui.formatFileSize(c.length)+" / 150 MB)"});else{f=null!=f?f:"";var d=mxUtils.bind(this,function(){return this.client.filesUpload({path:"/"+f+a,mode:{".tag":"overwrite"},mute:!0,contents:new Blob([c],{type:"text/plain"})})});this.executePromise(d,b,g)}};DropboxClient.prototype.pickLibrary=function(a){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"))){var b=mxUtils.bind(this,function(a){this.ui.spinner.stop();this.ui.handleError(a)}),d=c[0].link.indexOf(this.appPath);if(0<d){var f=decodeURIComponent(c[0].link.substring(d+this.appPath.length-1));this.readFile({path:f},mxUtils.bind(this,function(d,e){if(null!=e&&e.id==c[0].id)try{this.ui.spinner.stop(),a(f.substring(1),new DropboxLibrary(this.ui,d,e))}catch(k){this.ui.handleError(k)}else this.createLibrary(c[0],a,b)}),b)}else this.createLibrary(c[0],a,b)}})})};DropboxClient.prototype.createLibrary=
function(a,c,b){this.ui.confirm(mxResources.get("note")+": "+mxResources.get("fileWillBeSavedInAppFolder",[a.name]),mxUtils.bind(this,function(){this.ui.editor.loadUrl(a.link,mxUtils.bind(this,function(d){this.insertFile(a.name,d,mxUtils.bind(this,function(a){try{this.ui.spinner.stop(),c(a.getHash().substring(1),a)}catch(m){b(m)}}),b,!0)}),b)}),mxUtils.bind(this,function(){this.ui.spinner.stop()}))};DropboxClient.prototype.pickFile=function(a,c){null!=Dropbox.choose?(a=null!=a?a:mxUtils.bind(this,
-function(a,c){this.ui.loadFile(null!=a?"D"+encodeURIComponent(a):c.getHash(),null,c)}),Dropbox.choose({linkType:"direct",cancel:mxUtils.bind(this,function(){}),success:mxUtils.bind(this,function(b){if(this.ui.spinner.spin(document.body,mxResources.get("loading")))if(c)this.ui.spinner.stop(),a(b[0].link);else{var d=mxUtils.bind(this,function(a){this.ui.spinner.stop();this.ui.handleError(a)}),g=mxUtils.bind(this,function(b,c){this.ui.spinner.stop();a(b,c)}),m=/\.png$/i.test(b[0].name);if(/\.vsdx$/i.test(b[0].name)||
-/\.gliffy$/i.test(b[0].name)||!this.ui.useCanvasForExport&&m)g(b[0].link);else{var e=b[0].link.indexOf(this.appPath);if(0<e){var k=decodeURIComponent(b[0].link.substring(e+this.appPath.length-1));this.readFile({path:k},mxUtils.bind(this,function(c,e){if(null!=e&&e.id==b[0].id){var f=m?c.lastIndexOf(","):-1;this.ui.spinner.stop();var l=null;0<f&&(f=this.ui.extractGraphModelFromPng(c),null!=f&&0<f.length?c=f:l=new LocalFile(this,c,k,!0));a(k.substring(1),null!=l?l:new DropboxFile(this.ui,c,e))}else this.createFile(b[0],
-g,d)}),d,m)}else this.createFile(b[0],g,d)}}})})):this.ui.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})};DropboxClient.prototype.createFile=function(a,c,b){var d=/(\.png)$/i.test(a.name);this.ui.editor.loadUrl(a.link,mxUtils.bind(this,function(f){null!=f&&0<f.length?this.ui.confirm(mxResources.get("note")+": "+mxResources.get("fileWillBeSavedInAppFolder",[a.name]),mxUtils.bind(this,function(){var g=d?f.lastIndexOf(","):-1;0<g&&(g=this.ui.extractGraphModelFromPng(f.substring(g+
+function(a,c){this.ui.loadFile(null!=a?"D"+encodeURIComponent(a):c.getHash(),null,c)}),Dropbox.choose({linkType:"direct",cancel:mxUtils.bind(this,function(){}),success:mxUtils.bind(this,function(b){if(this.ui.spinner.spin(document.body,mxResources.get("loading")))if(c)this.ui.spinner.stop(),a(b[0].link);else{var d=mxUtils.bind(this,function(a){this.ui.spinner.stop();this.ui.handleError(a)}),f=mxUtils.bind(this,function(b,c){this.ui.spinner.stop();a(b,c)}),m=/\.png$/i.test(b[0].name);if(/\.vsdx$/i.test(b[0].name)||
+/\.gliffy$/i.test(b[0].name)||!this.ui.useCanvasForExport&&m)f(b[0].link);else{var e=b[0].link.indexOf(this.appPath);if(0<e){var k=decodeURIComponent(b[0].link.substring(e+this.appPath.length-1));this.readFile({path:k},mxUtils.bind(this,function(c,e){if(null!=e&&e.id==b[0].id){var g=m?c.lastIndexOf(","):-1;this.ui.spinner.stop();var l=null;0<g&&(g=this.ui.extractGraphModelFromPng(c),null!=g&&0<g.length?c=g:l=new LocalFile(this,c,k,!0));a(k.substring(1),null!=l?l:new DropboxFile(this.ui,c,e))}else this.createFile(b[0],
+f,d)}),d,m)}else this.createFile(b[0],f,d)}}})})):this.ui.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})};DropboxClient.prototype.createFile=function(a,c,b){var d=/(\.png)$/i.test(a.name);this.ui.editor.loadUrl(a.link,mxUtils.bind(this,function(f){null!=f&&0<f.length?this.ui.confirm(mxResources.get("note")+": "+mxResources.get("fileWillBeSavedInAppFolder",[a.name]),mxUtils.bind(this,function(){var g=d?f.lastIndexOf(","):-1;0<g&&(g=this.ui.extractGraphModelFromPng(f.substring(g+
1)),null!=g&&0<g.length&&(f=g));this.insertFile(a.name,f,mxUtils.bind(this,function(b){c(a.name,b)}),b)}),mxUtils.bind(this,function(){this.ui.spinner.stop()})):(this.ui.spinner.stop(),b({message:mxResources.get("errorLoadingFile")}))}),b,d)}})();OneDriveFile=function(a,d,c){DrawioFile.call(this,a,d);this.meta=c};mxUtils.extend(OneDriveFile,DrawioFile);OneDriveFile.prototype.autosaveDelay=300;
OneDriveFile.prototype.share=function(){var a=this.meta.webUrl,a=a.substring(0,a.lastIndexOf("/"));if(null!=this.meta.parentReference)try{if("personal"==this.meta.parentReference.driveType)a="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),c=this.meta.webUrl,a=c.substring(0,c.length-d.length-
-this.meta.name.length-(0<d.length?1:0)),c=c.substring(c.indexOf("/",8)),a=a+"/Forms/AllItems.aspx?id="+c+"&parent="+c.substring(0,c.lastIndexOf("/"));else if("business"==this.meta.parentReference.driveType)var a=this.meta["@microsoft.graph.downloadUrl"],b=a.indexOf("/_layouts/15/download.aspx?"),d=c=this.meta.webUrl,c=c.substring(8),c=c.substring(c.indexOf("/")),d=d.substring(0,d.lastIndexOf("/")),d=d.substring(d.indexOf("/",8)),a=a.substring(0,b)+"/_layouts/15/onedrive.aspx?id="+c+"&parent="+d}catch(f){}this.ui.editor.graph.openLink(a)};
+this.meta.name.length-(0<d.length?1:0)),c=c.substring(c.indexOf("/",8)),a=a+"/Forms/AllItems.aspx?id="+c+"&parent="+c.substring(0,c.lastIndexOf("/"));else if("business"==this.meta.parentReference.driveType)var a=this.meta["@microsoft.graph.downloadUrl"],b=a.indexOf("/_layouts/15/download.aspx?"),d=c=this.meta.webUrl,c=c.substring(8),c=c.substring(c.indexOf("/")),d=d.substring(0,d.lastIndexOf("/")),d=d.substring(d.indexOf("/",8)),a=a.substring(0,b)+"/_layouts/15/onedrive.aspx?id="+c+"&parent="+d}catch(g){}this.ui.editor.graph.openLink(a)};
OneDriveFile.prototype.getId=function(){return this.getIdOf(this.meta)};OneDriveFile.prototype.getParentId=function(){return this.getIdOf(this.meta,!0)};OneDriveFile.prototype.getIdOf=function(a,d){return(null!=a.parentReference&&null!=a.parentReference.driveId?a.parentReference.driveId+"/":"")+(null!=d?a.parentReference.id:a.id)};OneDriveFile.prototype.getChannelId=function(){return"W-"+DrawioFile.prototype.getChannelId.apply(this,arguments)};OneDriveFile.prototype.getHash=function(){return"W"+encodeURIComponent(this.getId())};
OneDriveFile.prototype.getMode=function(){return App.MODE_ONEDRIVE};OneDriveFile.prototype.isAutosaveOptional=function(){return!0};OneDriveFile.prototype.getTitle=function(){return this.meta.name};OneDriveFile.prototype.isRenamable=function(){return!0};OneDriveFile.prototype.isOptimisticSync=function(){return!0};OneDriveFile.prototype.isSyncSupported=function(){return!0};OneDriveFile.prototype.getSize=function(){return this.meta.size};
OneDriveFile.prototype.isConflict=function(a){return null!=a&&(412==a.getStatus()||409==a.getStatus())};OneDriveFile.prototype.getCurrentUser=function(){return null!=this.ui.oneDrive?this.ui.oneDrive.user:null};OneDriveFile.prototype.loadDescriptor=function(a,d){this.ui.oneDrive.executeRequest(this.ui.oneDrive.getItemURL(this.getId()),mxUtils.bind(this,function(c){200<=c.getStatus()&&299>=c.getStatus()?a(JSON.parse(c.getText())):null!=d&&d()}),d)};
OneDriveFile.prototype.getLatestVersion=function(a,d){this.ui.oneDrive.getFile(this.getId(),a,d)};OneDriveFile.prototype.getDescriptor=function(){return this.meta};OneDriveFile.prototype.setDescriptor=function(a){this.meta=a};OneDriveFile.prototype.getDescriptorEtag=function(a){return a.eTag};OneDriveFile.prototype.setDescriptorEtag=function(a,d){a.eTag=d};
OneDriveFile.prototype.loadPatchDescriptor=function(a,d){var c=this.ui.oneDrive.getItemURL(this.getId());this.ui.oneDrive.executeRequest(c+"?select=etag,file",mxUtils.bind(this,function(b){200<=b.getStatus()&&299>=b.getStatus()?a(JSON.parse(b.getText())):d(this.ui.oneDrive.parseRequestText(b))}),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(a,d,c,b,f){this.doSave(this.getTitle(),a,d,c,b,f)};OneDriveFile.prototype.saveAs=function(a,d,c){this.doSave(a,!1,d,c)};
-OneDriveFile.prototype.doSave=function(a,d,c,b,f,g){var m=this.meta.name;this.meta.name=a;DrawioFile.prototype.save.apply(this,[null,mxUtils.bind(this,function(){this.meta.name=m;this.saveFile(a,d,c,b,f,g)}),b,f,g])};
-OneDriveFile.prototype.saveFile=function(a,d,c,b,f,g){if(!this.isEditable())null!=c&&c();else if(!this.savingFile)if(this.getTitle()==a){var m=mxUtils.bind(this,function(){try{this.savingFileTime=new Date;this.setShadowModified(!1);this.savingFile=!0;var a=g||this.constructor!=OneDriveFile||"manual"!=DrawioFile.SYNC&&"auto"!=DrawioFile.SYNC?null:this.getCurrentEtag(),d=this.meta;this.fileSaving();this.ui.oneDrive.saveFile(this,mxUtils.bind(this,function(a,e){this.setModified(this.getShadowModified());
+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(a,d,c,b,g){this.doSave(this.getTitle(),a,d,c,b,g)};OneDriveFile.prototype.saveAs=function(a,d,c){this.doSave(a,!1,d,c)};
+OneDriveFile.prototype.doSave=function(a,d,c,b,g,f){var m=this.meta.name;this.meta.name=a;DrawioFile.prototype.save.apply(this,[null,mxUtils.bind(this,function(){this.meta.name=m;this.saveFile(a,d,c,b,g,f)}),b,g,f])};
+OneDriveFile.prototype.saveFile=function(a,d,c,b,g,f){if(!this.isEditable())null!=c&&c();else if(!this.savingFile)if(this.getTitle()==a){var m=mxUtils.bind(this,function(){try{this.savingFileTime=new Date;this.setShadowModified(!1);this.savingFile=!0;var a=f||this.constructor!=OneDriveFile||"manual"!=DrawioFile.SYNC&&"auto"!=DrawioFile.SYNC?null:this.getCurrentEtag(),d=this.meta;this.fileSaving();this.ui.oneDrive.saveFile(this,mxUtils.bind(this,function(a,e){this.setModified(this.getShadowModified());
this.savingFile=!1;this.meta=a;this.fileSaved(e,d,mxUtils.bind(this,function(){this.contentChanged();null!=c&&c()}),b)}),mxUtils.bind(this,function(a,c){try{this.savingFile=!1,this.isConflict(c)?(this.inConflictState=!0,null!=this.sync?(this.savingFile=!0,this.sync.fileConflict(null,mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,function(){this.updateFileData();m()}),100+500*Math.random())}),mxUtils.bind(this,function(){this.savingFile=!1;null!=b&&b()}))):null!=b&&b()):null!=b&&
b(a)}catch(p){if(this.savingFile=!1,null!=b)b(p);else throw p;}}),a)}catch(l){if(this.savingFile=!1,null!=b)b(l);else throw l;}});m()}else this.savingFileTime=new Date,this.setShadowModified(!1),this.savingFile=!0,this.ui.oneDrive.insertFile(a,this.getData(),mxUtils.bind(this,function(a){this.setModified(this.getShadowModified());this.savingFile=!1;null!=c&&c();this.ui.fileLoaded(a)}),mxUtils.bind(this,function(){this.savingFile=!1;null!=b&&b()}))};
-OneDriveFile.prototype.rename=function(a,d,c){var b=this.getCurrentEtag();this.ui.oneDrive.renameFile(this,a,mxUtils.bind(this,function(f){this.hasSameExtension(a,this.getTitle())?(this.meta=f,this.descriptorChanged(),null!=this.sync&&this.sync.descriptorChanged(b),null!=d&&d(f)):(this.meta=f,null!=this.sync&&this.sync.descriptorChanged(b),this.save(!0,d,c))}),c)};
-OneDriveFile.prototype.move=function(a,d,c){this.ui.oneDrive.moveFile(this.getId(),a,mxUtils.bind(this,function(a){this.meta=a;this.descriptorChanged();null!=d&&d(a)}),c)};OneDriveLibrary=function(a,d,c){OneDriveFile.call(this,a,d,c)};mxUtils.extend(OneDriveLibrary,OneDriveFile);OneDriveLibrary.prototype.isAutosave=function(){return!0};OneDriveLibrary.prototype.save=function(a,d,c){this.ui.oneDrive.saveFile(this,mxUtils.bind(this,function(a){this.desc=a;null!=d&&d(a)}),c)};OneDriveLibrary.prototype.open=function(){};(function(){var a=null;window.OneDriveClient=function(a,c,b,f){null==c&&null!=window.urlParams&&"1"==window.urlParams.extAuth&&(c=!0);null==b&&(null!=window.urlParams&&"1"==window.urlParams.inlinePicker||mxClient.IS_ANDROID||mxClient.IS_IOS)&&(b=!0);null==f&&null!=window.urlParams&&"1"==window.urlParams.noLogoutOD&&(f=!0);DrawioClient.call(this,a,c?"oneDriveExtAuthInfo":"oneDriveAuthInfo");this.isExtAuth=c;this.inlinePicker=b;this.noLogout=f;a=JSON.parse(this.token);null!=a&&(this.endpointHint=null!=
+OneDriveFile.prototype.rename=function(a,d,c){var b=this.getCurrentEtag();this.ui.oneDrive.renameFile(this,a,mxUtils.bind(this,function(g){this.hasSameExtension(a,this.getTitle())?(this.meta=g,this.descriptorChanged(),null!=this.sync&&this.sync.descriptorChanged(b),null!=d&&d(g)):(this.meta=g,null!=this.sync&&this.sync.descriptorChanged(b),this.save(!0,d,c))}),c)};
+OneDriveFile.prototype.move=function(a,d,c){this.ui.oneDrive.moveFile(this.getId(),a,mxUtils.bind(this,function(a){this.meta=a;this.descriptorChanged();null!=d&&d(a)}),c)};OneDriveLibrary=function(a,d,c){OneDriveFile.call(this,a,d,c)};mxUtils.extend(OneDriveLibrary,OneDriveFile);OneDriveLibrary.prototype.isAutosave=function(){return!0};OneDriveLibrary.prototype.save=function(a,d,c){this.ui.oneDrive.saveFile(this,mxUtils.bind(this,function(a){this.desc=a;null!=d&&d(a)}),c)};OneDriveLibrary.prototype.open=function(){};(function(){var a=null;window.OneDriveClient=function(a,c,b,g){null==c&&null!=window.urlParams&&"1"==window.urlParams.extAuth&&(c=!0);null==b&&(null!=window.urlParams&&"1"==window.urlParams.inlinePicker||mxClient.IS_ANDROID||mxClient.IS_IOS)&&(b=!0);null==g&&null!=window.urlParams&&"1"==window.urlParams.noLogoutOD&&(g=!0);DrawioClient.call(this,a,c?"oneDriveExtAuthInfo":"oneDriveAuthInfo");this.isExtAuth=c;this.inlinePicker=b;this.noLogout=g;a=JSON.parse(this.token);null!=a&&(this.endpointHint=null!=
a.endpointHint?a.endpointHint.replace("/Documents","/_layouts/15/onedrive.aspx"):a.endpointHint)};mxUtils.extend(OneDriveClient,DrawioClient);OneDriveClient.prototype.clientId=window.DRAWIO_MSGRAPH_CLIENT_ID||("test.draw.io"==window.location.hostname?"2e598409-107f-4b59-89ca-d7723c8e00a4":"45c10911-200f-4e27-a666-9e9fca147395");OneDriveClient.prototype.clientId="app.diagrams.net"==window.location.hostname?"b5ff67d6-3155-4fca-965a-59a3655c4476":OneDriveClient.prototype.clientId;OneDriveClient.prototype.clientId=
"viewer.diagrams.net"==window.location.hostname?"417a451a-a343-4788-b6c1-901e63182565":OneDriveClient.prototype.clientId;OneDriveClient.prototype.scopes="user.read files.readwrite.all sites.read.all";OneDriveClient.prototype.redirectUri=window.location.protocol+"//"+window.location.host+"/microsoft";OneDriveClient.prototype.pickerRedirectUri=window.location.protocol+"//"+window.location.host+"/onedrive3.html";OneDriveClient.prototype.defEndpointHint="api.onedrive.com";OneDriveClient.prototype.endpointHint=
OneDriveClient.prototype.defEndpointHint;OneDriveClient.prototype.extension=".drawio";OneDriveClient.prototype.baseUrl="https://graph.microsoft.com/v1.0";OneDriveClient.prototype.emptyFn=function(){};OneDriveClient.prototype.invalidFilenameRegExs=[/[~"#%\*:<>\?\/\\{\|}]/,/^\.lock$/i,/^CON$/i,/^PRN$/i,/^AUX$/i,/^NUL$/i,/^COM\d$/i,/^LPT\d$/i,/^desktop\.ini$/i,/_vti_/i];OneDriveClient.prototype.isValidFilename=function(a){if(null==a||""===a)return!1;for(var c=0;c<this.invalidFilenameRegExs.length;c++)if(this.invalidFilenameRegExs[c].test(a))return!1;
-return!0};OneDriveClient.prototype.get=function(d,c,b){d=new mxXmlRequest(d,null,"GET");d.setRequestHeaders=mxUtils.bind(this,function(b,c){b.setRequestHeader("Authorization","Bearer "+a)});d.send(c,b);return d};OneDriveClient.prototype.updateUser=function(a,c,b){var d=!0,g=window.setTimeout(mxUtils.bind(this,function(){d=!1;c({code:App.ERROR_TIMEOUT})}),this.ui.timeout);this.get(this.baseUrl+"/me",mxUtils.bind(this,function(f){window.clearTimeout(g);d&&(200>f.getStatus()||300<=f.getStatus()?b?c({message:mxResources.get("accessDenied")}):
-(this.logout(),this.authenticate(mxUtils.bind(this,function(){this.updateUser(a,c,!0)}),c)):(f=JSON.parse(f.getText()),this.setUser(new DrawioUser(f.id,null,f.displayName)),a()))}),mxUtils.bind(this,function(a){window.clearTimeout(g);d&&c(a)}))};OneDriveClient.prototype.resetTokenRefresh=function(a){null!=this.tokenRefreshThread&&(window.clearTimeout(this.tokenRefreshThread),this.tokenRefreshThread=null);0<a&&(this.tokenRefreshInterval=1E3*a,this.tokenRefreshThread=window.setTimeout(mxUtils.bind(this,
+return!0};OneDriveClient.prototype.get=function(d,c,b){d=new mxXmlRequest(d,null,"GET");d.setRequestHeaders=mxUtils.bind(this,function(b,c){b.setRequestHeader("Authorization","Bearer "+a)});d.send(c,b);return d};OneDriveClient.prototype.updateUser=function(a,c,b){var d=!0,f=window.setTimeout(mxUtils.bind(this,function(){d=!1;c({code:App.ERROR_TIMEOUT})}),this.ui.timeout);this.get(this.baseUrl+"/me",mxUtils.bind(this,function(g){window.clearTimeout(f);d&&(200>g.getStatus()||300<=g.getStatus()?b?c({message:mxResources.get("accessDenied")}):
+(this.logout(),this.authenticate(mxUtils.bind(this,function(){this.updateUser(a,c,!0)}),c)):(g=JSON.parse(g.getText()),this.setUser(new DrawioUser(g.id,null,g.displayName)),a()))}),mxUtils.bind(this,function(a){window.clearTimeout(f);d&&c(a)}))};OneDriveClient.prototype.resetTokenRefresh=function(a){null!=this.tokenRefreshThread&&(window.clearTimeout(this.tokenRefreshThread),this.tokenRefreshThread=null);0<a&&(this.tokenRefreshInterval=1E3*a,this.tokenRefreshThread=window.setTimeout(mxUtils.bind(this,
function(){this.authenticate(this.emptyFn,this.emptyFn,!0)}),900*a))};OneDriveClient.prototype.authenticate=function(a,c,b){if(this.isExtAuth)window.parent.oneDriveAuth(mxUtils.bind(this,function(b){this.updateAuthInfo(b,!0,null==this.endpointHint,a,c)}),c,null!=window.urlParams&&"1"==urlParams.odAuthCancellable);else(new mxXmlRequest(this.redirectUri+"?getState=1",null,"GET")).send(mxUtils.bind(this,function(d){200<=d.getStatus()&&299>=d.getStatus()?this.authenticateStep2(d.getText(),a,c,b):null!=
-c&&c(d)}),c)};OneDriveClient.prototype.updateAuthInfo=function(d,c,b,f,g){b&&this.setUser(null);a=d.access_token;delete d.access_token;d.expiresOn=Date.now()+1E3*d.expires_in;this.tokenExpiresOn=d.expiresOn;d.remember=c;this.setPersistentToken(JSON.stringify(d),!c);this.resetTokenRefresh(d.expires_in);b?this.getAccountTypeAndEndpoint(mxUtils.bind(this,function(){f()}),g):f()};OneDriveClient.prototype.authenticateStep2=function(d,c,b,f){if(null==window.onOneDriveCallback){var g=mxUtils.bind(this,function(){var m=
-!0,e=JSON.parse(this.getPersistentToken(!0));null!=e?(new mxXmlRequest(this.redirectUri+"?state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.hostname+"&token="+d),null,"GET")).send(mxUtils.bind(this,function(d){200<=d.getStatus()&&299>=d.getStatus()?this.updateAuthInfo(JSON.parse(d.getText()),e.remember,!1,c,b):(this.clearPersistentToken(),this.setUser(null),a=null,401!=d.getStatus()||f?b({message:mxResources.get("accessDenied"),retry:g}):g())}),b):this.ui.showAuthDialog(this,
-!0,mxUtils.bind(this,function(a,e){var f="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+(a?" offline_access":""))+"&state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.hostname+"&token="+d),f=window.open(f,"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!=f&&(window.onOneDriveCallback=mxUtils.bind(this,function(d,f){if(m){window.onOneDriveCallback=null;m=!1;try{null==d?b({message:mxResources.get("accessDenied"),retry:g}):(null!=e&&e(),this.updateAuthInfo(d,a,!0,c,b))}catch(u){b(u)}finally{null!=f&&f.close()}}else null!=f&&f.close()}),f.focus())}),mxUtils.bind(this,function(){m&&(window.onOneDriveCallback=null,m=!1,b({message:mxResources.get("accessDenied"),
-retry:g}))}))});g()}else b({code:App.ERROR_BUSY})};OneDriveClient.prototype.getAccountTypeAndEndpoint=function(a,c){this.get(this.baseUrl+"/me/drive/root",mxUtils.bind(this,function(b){try{if(200<=b.getStatus()&&299>=b.getStatus()){var d=JSON.parse(b.getText());0<d.webUrl.indexOf(".sharepoint.com")?this.endpointHint=d.webUrl.replace("/Documents","/_layouts/15/onedrive.aspx"):this.endpointHint=this.defEndpointHint;var g=JSON.parse(this.getPersistentToken(!0));null!=g&&(g.endpointHint=this.endpointHint,
-this.setPersistentToken(JSON.stringify(g),!g.remember));a();return}}catch(m){}c({message:mxResources.get("unknownError")+" (Code: "+b.getStatus()+")"})}),c)};OneDriveClient.prototype.executeRequest=function(d,c,b){var f=mxUtils.bind(this,function(a){var g=!0,e=window.setTimeout(mxUtils.bind(this,function(){g=!1;b({code:App.ERROR_TIMEOUT,retry:f})}),this.ui.timeout);this.get(d,mxUtils.bind(this,function(d){window.clearTimeout(e);g&&(200<=d.getStatus()&&299>=d.getStatus()||404==d.getStatus()?(null==
-this.user&&this.updateUser(this.emptyFn,this.emptyFn,!0),c(d)):a||401!==d.getStatus()&&400!==d.getStatus()?b(this.parseRequestText(d)):this.authenticate(function(){f(!0)},b,a))}),mxUtils.bind(this,function(a){window.clearTimeout(e);g&&b(a)}))});null==a||6E4>this.tokenExpiresOn-Date.now()?this.authenticate(function(){f(!0)},b):f(!1)};OneDriveClient.prototype.checkToken=function(d){null==a||null==this.tokenRefreshThread||6E4>this.tokenExpiresOn-Date.now()?this.authenticate(d,this.emptyFn):d()};OneDriveClient.prototype.getItemRef=
+c&&c(d)}),c)};OneDriveClient.prototype.updateAuthInfo=function(d,c,b,g,f){b&&this.setUser(null);a=d.access_token;delete d.access_token;d.expiresOn=Date.now()+1E3*d.expires_in;this.tokenExpiresOn=d.expiresOn;d.remember=c;this.setPersistentToken(JSON.stringify(d),!c);this.resetTokenRefresh(d.expires_in);b?this.getAccountTypeAndEndpoint(mxUtils.bind(this,function(){g()}),f):g()};OneDriveClient.prototype.authenticateStep2=function(d,c,b,g){if(null==window.onOneDriveCallback){var f=mxUtils.bind(this,function(){var m=
+!0,e=JSON.parse(this.getPersistentToken(!0));null!=e?(new mxXmlRequest(this.redirectUri+"?state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.hostname+"&token="+d),null,"GET")).send(mxUtils.bind(this,function(d){200<=d.getStatus()&&299>=d.getStatus()?this.updateAuthInfo(JSON.parse(d.getText()),e.remember,!1,c,b):(this.clearPersistentToken(),this.setUser(null),a=null,401!=d.getStatus()||g?b({message:mxResources.get("accessDenied"),retry:f}):f())}),b):this.ui.showAuthDialog(this,
+!0,mxUtils.bind(this,function(a,e){var g="https://login.microsoftonline.com/common/oauth2/v2.0/authorize?client_id="+this.clientId+"&response_type=code&redirect_uri="+encodeURIComponent(this.redirectUri)+"&scope="+encodeURIComponent(this.scopes+(a?" offline_access":""))+"&state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.hostname+"&token="+d),g=window.open(g,"odauth",["width=525,height=525","top="+(window.screenY+Math.max(window.outerHeight-525,0)/2),"left="+(window.screenX+
+Math.max(window.outerWidth-525,0)/2),"status=no,resizable=yes,toolbar=no,menubar=no,scrollbars=yes"].join());null!=g&&(window.onOneDriveCallback=mxUtils.bind(this,function(d,g){if(m){window.onOneDriveCallback=null;m=!1;try{null==d?b({message:mxResources.get("accessDenied"),retry:f}):(null!=e&&e(),this.updateAuthInfo(d,a,!0,c,b))}catch(u){b(u)}finally{null!=g&&g.close()}}else null!=g&&g.close()}),g.focus())}),mxUtils.bind(this,function(){m&&(window.onOneDriveCallback=null,m=!1,b({message:mxResources.get("accessDenied"),
+retry:f}))}))});f()}else b({code:App.ERROR_BUSY})};OneDriveClient.prototype.getAccountTypeAndEndpoint=function(a,c){this.get(this.baseUrl+"/me/drive/root",mxUtils.bind(this,function(b){try{if(200<=b.getStatus()&&299>=b.getStatus()){var d=JSON.parse(b.getText());0<d.webUrl.indexOf(".sharepoint.com")?this.endpointHint=d.webUrl.replace("/Documents","/_layouts/15/onedrive.aspx"):this.endpointHint=this.defEndpointHint;var f=JSON.parse(this.getPersistentToken(!0));null!=f&&(f.endpointHint=this.endpointHint,
+this.setPersistentToken(JSON.stringify(f),!f.remember));a();return}}catch(m){}c({message:mxResources.get("unknownError")+" (Code: "+b.getStatus()+")"})}),c)};OneDriveClient.prototype.executeRequest=function(d,c,b){var g=mxUtils.bind(this,function(a){var f=!0,e=window.setTimeout(mxUtils.bind(this,function(){f=!1;b({code:App.ERROR_TIMEOUT,retry:g})}),this.ui.timeout);this.get(d,mxUtils.bind(this,function(d){window.clearTimeout(e);f&&(200<=d.getStatus()&&299>=d.getStatus()||404==d.getStatus()?(null==
+this.user&&this.updateUser(this.emptyFn,this.emptyFn,!0),c(d)):a||401!==d.getStatus()&&400!==d.getStatus()?b(this.parseRequestText(d)):this.authenticate(function(){g(!0)},b,a))}),mxUtils.bind(this,function(a){window.clearTimeout(e);f&&b(a)}))});null==a||6E4>this.tokenExpiresOn-Date.now()?this.authenticate(function(){g(!0)},b):g(!1)};OneDriveClient.prototype.checkToken=function(d){null==a||null==this.tokenRefreshThread||6E4>this.tokenExpiresOn-Date.now()?this.authenticate(d,this.emptyFn):d()};OneDriveClient.prototype.getItemRef=
function(a){var c=a.split("/");return 1<c.length?{driveId:c[0],id:c[1]}:{id:a}};OneDriveClient.prototype.getItemURL=function(a,c){var b=a.split("/");if(1<b.length){var d=b[1];return(c?"":this.baseUrl)+"/drives/"+b[0]+("root"==d?"/root":"/items/"+d)}return(c?"":this.baseUrl)+"/me/drive/items/"+a};OneDriveClient.prototype.getLibrary=function(a,c,b){this.getFile(a,c,b,!1,!0)};OneDriveClient.prototype.removeExtraHtmlContent=function(a){var c=a.lastIndexOf('<html><head><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8"><meta name="Robots" ');
-0<c&&(a=a.substring(0,c));return a};OneDriveClient.prototype.getFile=function(a,c,b,f,g){g=null!=g?g:!1;this.executeRequest(this.getItemURL(a),mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus()){var d=JSON.parse(a.getText()),f=/\.png$/i.test(d.name);if(/\.v(dx|sdx?)$/i.test(d.name)||/\.gliffy$/i.test(d.name)||/\.pdf$/i.test(d.name)||!this.ui.useCanvasForExport&&f)this.ui.convertFile(d["@microsoft.graph.downloadUrl"],d.name,null!=d.file?d.file.mimeType:null,this.extension,c,b);
-else{var m=!0,n=window.setTimeout(mxUtils.bind(this,function(){m=!1;b({code:App.ERROR_TIMEOUT})}),this.ui.timeout);this.ui.editor.loadUrl(d["@microsoft.graph.downloadUrl"],mxUtils.bind(this,function(a){try{if(window.clearTimeout(n),m){/\.html$/i.test(d.name)&&(a=this.removeExtraHtmlContent(a));var e=null;if(0<(f?a.lastIndexOf(","):-1)){var k=this.ui.extractGraphModelFromPng(a);null!=k&&0<k.length?a=k:e=new LocalFile(this.ui,a,d.name,!0)}else if("data:image/png;base64,PG14ZmlsZS"==a.substring(0,32)){var l=
+0<c&&(a=a.substring(0,c));return a};OneDriveClient.prototype.getFile=function(a,c,b,g,f){f=null!=f?f:!1;this.executeRequest(this.getItemURL(a),mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus()){var d=JSON.parse(a.getText()),g=/\.png$/i.test(d.name);if(/\.v(dx|sdx?)$/i.test(d.name)||/\.gliffy$/i.test(d.name)||/\.pdf$/i.test(d.name)||!this.ui.useCanvasForExport&&g)this.ui.convertFile(d["@microsoft.graph.downloadUrl"],d.name,null!=d.file?d.file.mimeType:null,this.extension,c,b);
+else{var m=!0,n=window.setTimeout(mxUtils.bind(this,function(){m=!1;b({code:App.ERROR_TIMEOUT})}),this.ui.timeout);this.ui.editor.loadUrl(d["@microsoft.graph.downloadUrl"],mxUtils.bind(this,function(a){try{if(window.clearTimeout(n),m){/\.html$/i.test(d.name)&&(a=this.removeExtraHtmlContent(a));var e=null;if(0<(g?a.lastIndexOf(","):-1)){var k=this.ui.extractGraphModelFromPng(a);null!=k&&0<k.length?a=k:e=new LocalFile(this.ui,a,d.name,!0)}else if("data:image/png;base64,PG14ZmlsZS"==a.substring(0,32)){var l=
a.substring(22);a=window.atob&&!mxClient.IS_SF?atob(l):Base64.decode(l)}Graph.fileSupport&&(new XMLHttpRequest).upload&&this.ui.isRemoteFileFormat(a,d["@microsoft.graph.downloadUrl"])?this.ui.parseFile(new Blob([a],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){try{4==a.readyState&&(200<=a.status&&299>=a.status?c(new LocalFile(this.ui,a.responseText,d.name+this.extension,!0)):null!=b&&b({message:mxResources.get("errorLoadingFile")}))}catch(z){if(null!=b)b(z);else throw z;}}),d.name):
-null!=e?c(e):g?c(new OneDriveLibrary(this.ui,a,d)):c(new OneDriveFile(this.ui,a,d))}}catch(v){if(null!=b)b(v);else throw v;}}),mxUtils.bind(this,function(a){window.clearTimeout(n);m&&b(this.parseRequestText(a))}),f||null!=d.file&&null!=d.file.mimeType&&("image/"==d.file.mimeType.substring(0,6)&&"image/svg"!=d.file.mimeType.substring(0,9)||"application/pdf"==d.file.mimeType))}}else b(this.parseRequestText(a))}),b)};OneDriveClient.prototype.renameFile=function(a,c,b,f){null!=a&&null!=c&&(this.isValidFilename(c)?
-this.checkExists(a.getParentId(),c,!1,mxUtils.bind(this,function(d){d?this.writeFile(this.getItemURL(a.getId()),JSON.stringify({name:c}),"PATCH","application/json",b,f):f()})):f({message:this.invalidFilenameRegExs[0].test(c)?mxResources.get("oneDriveCharsNotAllowed"):mxResources.get("oneDriveInvalidDeviceName")}))};OneDriveClient.prototype.moveFile=function(a,c,b,f){c=this.getItemRef(c);var d=this.getItemRef(a);c.driveId!=d.driveId?f({message:mxResources.get("cannotMoveOneDrive",null,"Moving a file between accounts is not supported yet.")}):
-this.writeFile(this.getItemURL(a),JSON.stringify({parentReference:c}),"PATCH","application/json",b,f)};OneDriveClient.prototype.insertLibrary=function(a,c,b,f,g){this.insertFile(a,c,b,f,!0,g)};OneDriveClient.prototype.insertFile=function(a,c,b,f,g,m){this.isValidFilename(a)?(g=null!=g?g:!1,this.checkExists(m,a,!0,mxUtils.bind(this,function(d){if(d){d="/me/drive/root";null!=m&&(d=this.getItemURL(m,!0));var e=mxUtils.bind(this,function(a){g?b(new OneDriveLibrary(this.ui,c,a)):b(new OneDriveFile(this.ui,
-c,a))});d=this.baseUrl+d+"/children/"+encodeURIComponent(a)+"/content";4E6<=c.length?this.writeFile(d,"","PUT",null,mxUtils.bind(this,function(a){this.writeLargeFile(this.getItemURL(a.id),c,e,f)}),f):this.writeFile(d,c,"PUT",null,e,f)}else f()}))):f({message:this.invalidFilenameRegExs[0].test(a)?mxResources.get("oneDriveCharsNotAllowed"):mxResources.get("oneDriveInvalidDeviceName")})};OneDriveClient.prototype.checkExists=function(a,c,b,f){var d="/me/drive/root";null!=a&&(d=this.getItemURL(a,!0));
-this.executeRequest(this.baseUrl+d+"/children/"+encodeURIComponent(c),mxUtils.bind(this,function(a){404==a.getStatus()?f(!0):b?(this.ui.spinner.stop(),this.ui.confirm(mxResources.get("replaceIt",[c]),function(){f(!0)},function(){f(!1)})):(this.ui.spinner.stop(),this.ui.showError(mxResources.get("error"),mxResources.get("fileExists"),mxResources.get("ok"),function(){f(!1)}))}),function(a){f(!1)},!0)};OneDriveClient.prototype.saveFile=function(a,c,b,f){try{var d=a.getData(),m=mxUtils.bind(this,function(e){var g=
-mxUtils.bind(this,function(a){c(a,d)}),k=this.getItemURL(a.getId());4E6<=e.length?this.writeLargeFile(k,e,g,b,f):this.writeFile(k+"/content/",e,"PUT",null,g,b,f)});if(this.ui.useCanvasForExport&&/(\.png)$/i.test(a.meta.name)){var e=this.ui.getPngFileProperties(this.ui.fileNode);this.ui.getEmbeddedPng(mxUtils.bind(this,function(a){m(this.ui.base64ToBlob(a,"image/png"))}),b,this.ui.getCurrentFile()!=a?d:null,e.scale,e.border)}else m(d)}catch(k){b(k)}};OneDriveClient.prototype.writeLargeFile=function(d,
-c,b,f,g){try{if(null!=c){var m=mxUtils.bind(this,function(a,d,e){try{e=e||0;var g=!0,k=null,k=window.setTimeout(mxUtils.bind(this,function(){g=!1;f({code:App.ERROR_TIMEOUT})}),this.ui.timeout),l=c.substr(d,4194304),n=new mxXmlRequest(a,l,"PUT");n.setRequestHeaders=mxUtils.bind(this,function(a,b){a.setRequestHeader("Content-Length",l.length);a.setRequestHeader("Content-Range","bytes "+d+"-"+(d+l.length-1)+"/"+c.length)});n.send(mxUtils.bind(this,function(n){window.clearTimeout(k);if(g){var p=n.getStatus();
-200<=p&&299>=p?(p=d+l.length,p==c.length?b(JSON.parse(n.getText())):m(a,p,e)):500<=p&&599>=p&&2>e?(e++,m(a,d,e)):f(this.parseRequestText(n),n)}}),mxUtils.bind(this,function(a){window.clearTimeout(k);g&&f(this.parseRequestText(a))}))}catch(v){f(v)}}),e=mxUtils.bind(this,function(b){try{var c=!0,k=null;try{k=window.setTimeout(mxUtils.bind(this,function(){c=!1;f({code:App.ERROR_TIMEOUT})}),this.ui.timeout)}catch(q){}var p=new mxXmlRequest(d+"/createUploadSession","{}","POST");p.setRequestHeaders=mxUtils.bind(this,
-function(b,c){b.setRequestHeader("Content-Type","application/json");b.setRequestHeader("Authorization","Bearer "+a);null!=g&&b.setRequestHeader("If-Match",g)});p.send(mxUtils.bind(this,function(a){window.clearTimeout(k);c&&(200<=a.getStatus()&&299>=a.getStatus()?(a=JSON.parse(a.getText()),m(a.uploadUrl,0)):b||401!==a.getStatus()?f(this.parseRequestText(a),a):this.authenticate(function(){e(!0)},f,b))}),mxUtils.bind(this,function(a){window.clearTimeout(k);c&&f(this.parseRequestText(a))}))}catch(q){f(q)}});
-null==a||6E4>this.tokenExpiresOn-Date.now()?this.authenticate(function(){e(!0)},f):e(!1)}else f({message:mxResources.get("unknownError")})}catch(k){f(k)}};OneDriveClient.prototype.writeFile=function(d,c,b,f,g,m,e){try{if(null!=d&&null!=c){var k=mxUtils.bind(this,function(l){try{var n=!0,p=null;try{p=window.setTimeout(mxUtils.bind(this,function(){n=!1;m({code:App.ERROR_TIMEOUT})}),this.ui.timeout)}catch(u){}var q=new mxXmlRequest(d,c,b);q.setRequestHeaders=mxUtils.bind(this,function(b,c){b.setRequestHeader("Content-Type",
-f||" ");b.setRequestHeader("Authorization","Bearer "+a);null!=e&&b.setRequestHeader("If-Match",e)});q.send(mxUtils.bind(this,function(a){window.clearTimeout(p);n&&(200<=a.getStatus()&&299>=a.getStatus()?(null==this.user&&this.updateUser(this.emptyFn,this.emptyFn,!0),g(JSON.parse(a.getText()))):l||401!==a.getStatus()?m(this.parseRequestText(a),a):this.authenticate(function(){k(!0)},m,l))}),mxUtils.bind(this,function(a){window.clearTimeout(p);n&&m(this.parseRequestText(a))}))}catch(u){m(u)}});null==
+null!=e?c(e):f?c(new OneDriveLibrary(this.ui,a,d)):c(new OneDriveFile(this.ui,a,d))}}catch(v){if(null!=b)b(v);else throw v;}}),mxUtils.bind(this,function(a){window.clearTimeout(n);m&&b(this.parseRequestText(a))}),g||null!=d.file&&null!=d.file.mimeType&&("image/"==d.file.mimeType.substring(0,6)&&"image/svg"!=d.file.mimeType.substring(0,9)||"application/pdf"==d.file.mimeType))}}else b(this.parseRequestText(a))}),b)};OneDriveClient.prototype.renameFile=function(a,c,b,g){null!=a&&null!=c&&(this.isValidFilename(c)?
+this.checkExists(a.getParentId(),c,!1,mxUtils.bind(this,function(d){d?this.writeFile(this.getItemURL(a.getId()),JSON.stringify({name:c}),"PATCH","application/json",b,g):g()})):g({message:this.invalidFilenameRegExs[0].test(c)?mxResources.get("oneDriveCharsNotAllowed"):mxResources.get("oneDriveInvalidDeviceName")}))};OneDriveClient.prototype.moveFile=function(a,c,b,g){c=this.getItemRef(c);var d=this.getItemRef(a);c.driveId!=d.driveId?g({message:mxResources.get("cannotMoveOneDrive",null,"Moving a file between accounts is not supported yet.")}):
+this.writeFile(this.getItemURL(a),JSON.stringify({parentReference:c}),"PATCH","application/json",b,g)};OneDriveClient.prototype.insertLibrary=function(a,c,b,g,f){this.insertFile(a,c,b,g,!0,f)};OneDriveClient.prototype.insertFile=function(a,c,b,g,f,m){this.isValidFilename(a)?(f=null!=f?f:!1,this.checkExists(m,a,!0,mxUtils.bind(this,function(d){if(d){d="/me/drive/root";null!=m&&(d=this.getItemURL(m,!0));var e=mxUtils.bind(this,function(a){f?b(new OneDriveLibrary(this.ui,c,a)):b(new OneDriveFile(this.ui,
+c,a))});d=this.baseUrl+d+"/children/"+encodeURIComponent(a)+"/content";4E6<=c.length?this.writeFile(d,"","PUT",null,mxUtils.bind(this,function(a){this.writeLargeFile(this.getItemURL(a.id),c,e,g)}),g):this.writeFile(d,c,"PUT",null,e,g)}else g()}))):g({message:this.invalidFilenameRegExs[0].test(a)?mxResources.get("oneDriveCharsNotAllowed"):mxResources.get("oneDriveInvalidDeviceName")})};OneDriveClient.prototype.checkExists=function(a,c,b,g){var d="/me/drive/root";null!=a&&(d=this.getItemURL(a,!0));
+this.executeRequest(this.baseUrl+d+"/children/"+encodeURIComponent(c),mxUtils.bind(this,function(a){404==a.getStatus()?g(!0):b?(this.ui.spinner.stop(),this.ui.confirm(mxResources.get("replaceIt",[c]),function(){g(!0)},function(){g(!1)})):(this.ui.spinner.stop(),this.ui.showError(mxResources.get("error"),mxResources.get("fileExists"),mxResources.get("ok"),function(){g(!1)}))}),function(a){g(!1)},!0)};OneDriveClient.prototype.saveFile=function(a,c,b,g){try{var d=a.getData(),m=mxUtils.bind(this,function(e){var f=
+mxUtils.bind(this,function(a){c(a,d)}),k=this.getItemURL(a.getId());4E6<=e.length?this.writeLargeFile(k,e,f,b,g):this.writeFile(k+"/content/",e,"PUT",null,f,b,g)});if(this.ui.useCanvasForExport&&/(\.png)$/i.test(a.meta.name)){var e=this.ui.getPngFileProperties(this.ui.fileNode);this.ui.getEmbeddedPng(mxUtils.bind(this,function(a){m(this.ui.base64ToBlob(a,"image/png"))}),b,this.ui.getCurrentFile()!=a?d:null,e.scale,e.border)}else m(d)}catch(k){b(k)}};OneDriveClient.prototype.writeLargeFile=function(d,
+c,b,g,f){try{if(null!=c){var m=mxUtils.bind(this,function(a,d,e){try{e=e||0;var f=!0,k=null,k=window.setTimeout(mxUtils.bind(this,function(){f=!1;g({code:App.ERROR_TIMEOUT})}),this.ui.timeout),l=c.substr(d,4194304),n=new mxXmlRequest(a,l,"PUT");n.setRequestHeaders=mxUtils.bind(this,function(a,b){a.setRequestHeader("Content-Length",l.length);a.setRequestHeader("Content-Range","bytes "+d+"-"+(d+l.length-1)+"/"+c.length)});n.send(mxUtils.bind(this,function(n){window.clearTimeout(k);if(f){var p=n.getStatus();
+200<=p&&299>=p?(p=d+l.length,p==c.length?b(JSON.parse(n.getText())):m(a,p,e)):500<=p&&599>=p&&2>e?(e++,m(a,d,e)):g(this.parseRequestText(n),n)}}),mxUtils.bind(this,function(a){window.clearTimeout(k);f&&g(this.parseRequestText(a))}))}catch(v){g(v)}}),e=mxUtils.bind(this,function(b){try{var c=!0,k=null;try{k=window.setTimeout(mxUtils.bind(this,function(){c=!1;g({code:App.ERROR_TIMEOUT})}),this.ui.timeout)}catch(q){}var p=new mxXmlRequest(d+"/createUploadSession","{}","POST");p.setRequestHeaders=mxUtils.bind(this,
+function(b,c){b.setRequestHeader("Content-Type","application/json");b.setRequestHeader("Authorization","Bearer "+a);null!=f&&b.setRequestHeader("If-Match",f)});p.send(mxUtils.bind(this,function(a){window.clearTimeout(k);c&&(200<=a.getStatus()&&299>=a.getStatus()?(a=JSON.parse(a.getText()),m(a.uploadUrl,0)):b||401!==a.getStatus()?g(this.parseRequestText(a),a):this.authenticate(function(){e(!0)},g,b))}),mxUtils.bind(this,function(a){window.clearTimeout(k);c&&g(this.parseRequestText(a))}))}catch(q){g(q)}});
+null==a||6E4>this.tokenExpiresOn-Date.now()?this.authenticate(function(){e(!0)},g):e(!1)}else g({message:mxResources.get("unknownError")})}catch(k){g(k)}};OneDriveClient.prototype.writeFile=function(d,c,b,g,f,m,e){try{if(null!=d&&null!=c){var k=mxUtils.bind(this,function(l){try{var n=!0,p=null;try{p=window.setTimeout(mxUtils.bind(this,function(){n=!1;m({code:App.ERROR_TIMEOUT})}),this.ui.timeout)}catch(u){}var q=new mxXmlRequest(d,c,b);q.setRequestHeaders=mxUtils.bind(this,function(b,c){b.setRequestHeader("Content-Type",
+g||" ");b.setRequestHeader("Authorization","Bearer "+a);null!=e&&b.setRequestHeader("If-Match",e)});q.send(mxUtils.bind(this,function(a){window.clearTimeout(p);n&&(200<=a.getStatus()&&299>=a.getStatus()?(null==this.user&&this.updateUser(this.emptyFn,this.emptyFn,!0),f(JSON.parse(a.getText()))):l||401!==a.getStatus()?m(this.parseRequestText(a),a):this.authenticate(function(){k(!0)},m,l))}),mxUtils.bind(this,function(a){window.clearTimeout(p);n&&m(this.parseRequestText(a))}))}catch(u){m(u)}});null==
a||6E4>this.tokenExpiresOn-Date.now()?this.authenticate(function(){k(!0)},m):k(!1)}else m({message:mxResources.get("unknownError")})}catch(l){m(l)}};OneDriveClient.prototype.parseRequestText=function(a){var c={message:mxResources.get("unknownError")};try{c=JSON.parse(a.getText())}catch(b){}return c};OneDriveClient.prototype.pickLibrary=function(a){this.pickFile(function(c){a(c)})};OneDriveClient.prototype.createInlinePicker=function(a,c){return mxUtils.bind(this,function(){var b=null,d=document.createElement("div");
-d.style.width="550px";d.style.height="435px";d.style.position="relative";var g=new CustomDialog(this.ui,d,mxUtils.bind(this,function(){var d=b.getSelectedItem();if(null!=d){if(c&&"object"==typeof d.folder){a({value:[d]});return}if(!d.folder){a(OneDriveFile.prototype.getIdOf(d));return}}return mxResources.get("invalidSel",null,"Invalid selection")}),null,mxResources.get(c?"save":"open"),null,null,null,null,!0);this.ui.showDialog(g.container,550,485,!0,!0);b=new mxODPicker(d,null,mxUtils.bind(this,
+d.style.width="550px";d.style.height="435px";d.style.position="relative";var f=new CustomDialog(this.ui,d,mxUtils.bind(this,function(){var d=b.getSelectedItem();if(null!=d){if(c&&"object"==typeof d.folder){a({value:[d]});return}if(!d.folder){a(OneDriveFile.prototype.getIdOf(d));return}}return mxResources.get("invalidSel",null,"Invalid selection")}),null,mxResources.get(c?"save":"open"),null,null,null,null,!0);this.ui.showDialog(f.container,550,485,!0,!0);b=new mxODPicker(d,null,mxUtils.bind(this,
function(a,b,c){this.executeRequest(this.baseUrl+a,function(a){b(JSON.parse(a.getText()))},c)}),mxUtils.bind(this,function(a,b,c,d){this.executeRequest(this.baseUrl+"/drives/"+b+"/items/"+a,function(a){c(JSON.parse(a.getText()))},d)}),null,null,function(b){c?a({value:[b]}):a(OneDriveFile.prototype.getIdOf(b))},mxUtils.bind(this,function(a){this.ui.showError(mxResources.get("error"),a)}),c)})};OneDriveClient.prototype.pickFolder=function(d,c){var b=mxUtils.bind(this,function(a){this.ui.showError(mxResources.get("error"),
-a&&a.message?a.message:a)}),f=mxUtils.bind(this,function(c){var f=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:a,isConsumerAccount:!1},success:mxUtils.bind(this,function(b){d(b);mxClient.IS_IE11&&(a=b.accessToken)}),cancel:mxUtils.bind(this,
-function(){}),error:b})});c?f():this.ui.confirm(mxResources.get("useRootFolder"),mxUtils.bind(this,function(){d({value:[{id:"root",name:"root",parentReference:{driveId:"me"}}]})}),f,mxResources.get("yes"),mxResources.get("noPickFolder")+"...",!0);null==this.user&&this.updateUser(this.emptyFn,this.emptyFn,!0)});null==a||6E4>this.tokenExpiresOn-Date.now()?this.authenticate(mxUtils.bind(this,function(){f(!1)}),b):f(c)};OneDriveClient.prototype.pickFile=function(d){d=null!=d?d:mxUtils.bind(this,function(a){this.ui.loadFile("W"+
+a&&a.message?a.message:a)}),g=mxUtils.bind(this,function(c){var f=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:a,isConsumerAccount:!1},success:mxUtils.bind(this,function(b){d(b);mxClient.IS_IE11&&(a=b.accessToken)}),cancel:mxUtils.bind(this,
+function(){}),error:b})});c?f():this.ui.confirm(mxResources.get("useRootFolder"),mxUtils.bind(this,function(){d({value:[{id:"root",name:"root",parentReference:{driveId:"me"}}]})}),f,mxResources.get("yes"),mxResources.get("noPickFolder")+"...",!0);null==this.user&&this.updateUser(this.emptyFn,this.emptyFn,!0)});null==a||6E4>this.tokenExpiresOn-Date.now()?this.authenticate(mxUtils.bind(this,function(){g(!1)}),b):g(c)};OneDriveClient.prototype.pickFile=function(d){d=null!=d?d:mxUtils.bind(this,function(a){this.ui.loadFile("W"+
encodeURIComponent(a))});var c=mxUtils.bind(this,function(a){this.ui.showError(mxResources.get("error"),a&&a.message?a.message:a)}),b=this.inlinePicker?this.createInlinePicker(d):mxUtils.bind(this,function(){OneDrive.open({clientId:this.clientId,action:"query",multiSelect:!1,advanced:{endpointHint:mxClient.IS_IE11?null:this.endpointHint,redirectUri:this.pickerRedirectUri,queryParameters:"select=id,name,parentReference",accessToken:a,isConsumerAccount:!1},success:mxUtils.bind(this,function(b){null!=
b&&null!=b.value&&0<b.value.length&&(mxClient.IS_IE11&&(a=b.accessToken),d(OneDriveFile.prototype.getIdOf(b.value[0]),b))}),cancel:mxUtils.bind(this,function(){}),error:c});null==this.user&&this.updateUser(this.emptyFn,this.emptyFn,!0)});null==a||6E4>this.tokenExpiresOn-Date.now()?this.authenticate(mxUtils.bind(this,function(){this.ui.showDialog((new BtnDialog(this.ui,this,mxResources.get("open"),mxUtils.bind(this,function(){this.ui.hideDialog();b()}))).container,300,140,!0,!0)}),c):b()};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();
@@ -11141,119 +11144,119 @@ this.setUser(null);a=null}})();GitHubFile=function(a,d,c){DrawioFile.call(this,a
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(a){null!=this.meta.download_url?mxUtils.get(this.meta.download_url,mxUtils.bind(this,function(d){a(200<=d.getStatus()&&299>=d.getStatus()?this.meta.download_url:null)}),mxUtils.bind(this,function(){a(null)})):a(null)};GitHubFile.prototype.isConflict=function(a){return null!=a&&409==a.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(a,d){this.peer.getFile(this.getId(),a,d)};GitHubFile.prototype.isCompressedStorage=function(){return!1};GitHubFile.prototype.getDescriptor=function(){return this.meta};GitHubFile.prototype.setDescriptor=function(a){this.meta=a};GitHubFile.prototype.getDescriptorEtag=function(a){return a.sha};GitHubFile.prototype.setDescriptorEtag=function(a,d){a.sha=d};
-GitHubFile.prototype.save=function(a,d,c,b,f,g){this.doSave(this.getTitle(),d,c,b,f,g)};GitHubFile.prototype.saveAs=function(a,d,c){this.doSave(a,d,c)};GitHubFile.prototype.doSave=function(a,d,c,b,f,g){var m=this.meta.name;this.meta.name=a;DrawioFile.prototype.save.apply(this,[null,mxUtils.bind(this,function(){this.meta.name=m;this.saveFile(a,!1,d,c,b,f,g)}),c,b,f])};
-GitHubFile.prototype.saveFile=function(a,d,c,b,f,g,m){if(this.isEditable())if(this.savingFile)null!=b&&b({code:App.ERROR_BUSY});else{var e=mxUtils.bind(this,function(d){if(this.getTitle()==a)try{this.savingFileTime=new Date;this.setShadowModified(!1);this.savingFile=!0;var e=this.getCurrentEtag(),f=this.data;this.peer.saveFile(this,mxUtils.bind(this,function(a){this.setModified(this.getShadowModified());this.savingFile=!1;this.setDescriptorEtag(this.meta,a);this.fileSaved(f,e,mxUtils.bind(this,function(){this.contentChanged();
-null!=c&&c()}),b)}),mxUtils.bind(this,function(a){this.savingFile=!1;this.isConflict(a)?(this.inConflictState=!0,null!=b&&b({commitMessage:d})):null!=b&&b(a)}),g,d)}catch(p){if(this.savingFile=!1,null!=b)b(p);else throw p;}else this.savingFileTime=new Date,this.setShadowModified(!1),this.savingFile=!0,this.ui.pickFolder(this.getMode(),mxUtils.bind(this,function(e){this.peer.insertFile(a,this.getData(),mxUtils.bind(this,function(a){this.setModified(this.getShadowModified());this.savingFile=!1;null!=
+GitHubFile.prototype.save=function(a,d,c,b,g,f){this.doSave(this.getTitle(),d,c,b,g,f)};GitHubFile.prototype.saveAs=function(a,d,c){this.doSave(a,d,c)};GitHubFile.prototype.doSave=function(a,d,c,b,g,f){var m=this.meta.name;this.meta.name=a;DrawioFile.prototype.save.apply(this,[null,mxUtils.bind(this,function(){this.meta.name=m;this.saveFile(a,!1,d,c,b,g,f)}),c,b,g])};
+GitHubFile.prototype.saveFile=function(a,d,c,b,g,f,m){if(this.isEditable())if(this.savingFile)null!=b&&b({code:App.ERROR_BUSY});else{var e=mxUtils.bind(this,function(d){if(this.getTitle()==a)try{this.savingFileTime=new Date;this.setShadowModified(!1);this.savingFile=!0;var e=this.getCurrentEtag(),g=this.data;this.peer.saveFile(this,mxUtils.bind(this,function(a){this.setModified(this.getShadowModified());this.savingFile=!1;this.setDescriptorEtag(this.meta,a);this.fileSaved(g,e,mxUtils.bind(this,function(){this.contentChanged();
+null!=c&&c()}),b)}),mxUtils.bind(this,function(a){this.savingFile=!1;this.isConflict(a)?(this.inConflictState=!0,null!=b&&b({commitMessage:d})):null!=b&&b(a)}),f,d)}catch(p){if(this.savingFile=!1,null!=b)b(p);else throw p;}else this.savingFileTime=new Date,this.setShadowModified(!1),this.savingFile=!0,this.ui.pickFolder(this.getMode(),mxUtils.bind(this,function(e){this.peer.insertFile(a,this.getData(),mxUtils.bind(this,function(a){this.setModified(this.getShadowModified());this.savingFile=!1;null!=
c&&c();this.ui.fileLoaded(a)}),mxUtils.bind(this,function(){this.savingFile=!1;null!=b&&b()}),!1,e,d)}))});null!=m?e(m):this.peer.showCommitDialog(this.meta.name,null==this.getDescriptorEtag(this.meta)||this.meta.isNew,mxUtils.bind(this,function(a){e(a)}),b)}else null!=c&&c()};GitHubLibrary=function(a,d,c){GitHubFile.call(this,a,d,c)};mxUtils.extend(GitHubLibrary,GitHubFile);GitHubLibrary.prototype.doSave=function(a,d,c){this.saveFile(a,!1,d,c)};GitHubLibrary.prototype.open=function(){};(function(){var a=null;window.GitHubClient=function(a,c){DrawioClient.call(this,a,c||"ghauth")};mxUtils.extend(GitHubClient,DrawioClient);GitHubClient.prototype.clientId="test.draw.io"==window.location.hostname?"23bc97120b9035515661":window.DRAWIO_GITHUB_ID;GitHubClient.prototype.scope="repo";GitHubClient.prototype.extension=".drawio";GitHubClient.prototype.baseUrl=DRAWIO_GITHUB_API_URL;GitHubClient.prototype.baseHostUrl=DRAWIO_GITHUB_URL;GitHubClient.prototype.redirectUri=window.location.protocol+
-"//"+window.location.host+"/github2";GitHubClient.prototype.maxFileSize=1E6;GitHubClient.prototype.authToken="token";GitHubClient.prototype.setToken=function(d){a=d};GitHubClient.prototype.updateUser=function(d,c,b){var f=!0,g=window.setTimeout(mxUtils.bind(this,function(){f=!1;c({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.ui.timeout),m=new mxXmlRequest(this.baseUrl+"/user",null,"GET"),e=this.authToken+" "+a;m.setRequestHeaders=function(a,b){a.setRequestHeader("Authorization",
-e)};m.send(mxUtils.bind(this,function(){window.clearTimeout(g);f&&(401===m.getStatus()?b?c({message:mxResources.get("accessDenied")}):(this.logout(),this.authenticate(mxUtils.bind(this,function(){this.updateUser(d,c,!0)}),c)):200>m.getStatus()||300<=m.getStatus()?c({message:mxResources.get("accessDenied")}):(this.setUser(this.createUser(JSON.parse(m.getText()))),d()))}),c)};GitHubClient.prototype.createUser=function(a){return new DrawioUser(a.id,a.email,a.name)};GitHubClient.prototype.authenticate=
-function(a,c){(new mxXmlRequest(this.redirectUri+"?getState=1",null,"GET")).send(mxUtils.bind(this,function(b){200<=b.getStatus()&&299>=b.getStatus()?this.authenticateStep2(b.getText(),a,c):null!=c&&c(b)}),c)};GitHubClient.prototype.authenticateStep2=function(d,c,b){if(null==window.onGitHubCallback){var f=mxUtils.bind(this,function(){var g=!0;this.ui.showAuthDialog(this,!0,mxUtils.bind(this,function(m,e){null!=window.open(this.baseHostUrl+"/login/oauth/authorize?client_id="+this.clientId+"&scope="+
-this.scope+"&state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.hostname+"&token="+d),"ghauth")?window.onGitHubCallback=mxUtils.bind(this,function(d,l){g?(window.onGitHubCallback=null,g=!1,null==d?b({message:mxResources.get("accessDenied"),retry:f}):(null!=e&&e(),a=d.access_token,this.setUser(null),m&&this.setPersistentToken("remembered"),c(),null!=l&&l.close())):null!=l&&l.close()}):b({message:mxResources.get("serviceUnavailableOrBlocked"),retry:f})}),mxUtils.bind(this,function(){g&&
-(window.onGitHubCallback=null,g=!1,b({message:mxResources.get("accessDenied"),retry:f}))}))});f()}else b({code:App.ERROR_BUSY})};GitHubClient.prototype.getErrorMessage=function(a,c){try{var b=JSON.parse(a.getText());null!=b&&null!=b.message&&(c=b.message)}catch(f){}return c};GitHubClient.prototype.executeRequest=function(d,c,b,f){var g=mxUtils.bind(this,function(e){var k=!0,l=window.setTimeout(mxUtils.bind(this,function(){k=!1;b({code:App.ERROR_TIMEOUT,retry:m})}),this.ui.timeout),n=this.authToken+
-" "+a;d.setRequestHeaders=function(a,b){a.setRequestHeader("Authorization",n)};d.send(mxUtils.bind(this,function(){window.clearTimeout(l);if(k)if(200<=d.getStatus()&&299>=d.getStatus()||f&&404==d.getStatus())c(d);else if(401===d.getStatus())e?b({code:d.getStatus(),message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,function(){this.authenticate(function(){m(!0)},b)})}):this.authenticate(function(){g(!0)},b);else if(403===d.getStatus()){var a=!1;try{var n=JSON.parse(d.getText());null!=n&&
+"//"+window.location.host+"/github2";GitHubClient.prototype.maxFileSize=1E6;GitHubClient.prototype.authToken="token";GitHubClient.prototype.setToken=function(d){a=d};GitHubClient.prototype.updateUser=function(d,c,b){var g=!0,f=window.setTimeout(mxUtils.bind(this,function(){g=!1;c({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.ui.timeout),m=new mxXmlRequest(this.baseUrl+"/user",null,"GET"),e=this.authToken+" "+a;m.setRequestHeaders=function(a,b){a.setRequestHeader("Authorization",
+e)};m.send(mxUtils.bind(this,function(){window.clearTimeout(f);g&&(401===m.getStatus()?b?c({message:mxResources.get("accessDenied")}):(this.logout(),this.authenticate(mxUtils.bind(this,function(){this.updateUser(d,c,!0)}),c)):200>m.getStatus()||300<=m.getStatus()?c({message:mxResources.get("accessDenied")}):(this.setUser(this.createUser(JSON.parse(m.getText()))),d()))}),c)};GitHubClient.prototype.createUser=function(a){return new DrawioUser(a.id,a.email,a.name)};GitHubClient.prototype.authenticate=
+function(a,c){(new mxXmlRequest(this.redirectUri+"?getState=1",null,"GET")).send(mxUtils.bind(this,function(b){200<=b.getStatus()&&299>=b.getStatus()?this.authenticateStep2(b.getText(),a,c):null!=c&&c(b)}),c)};GitHubClient.prototype.authenticateStep2=function(d,c,b){if(null==window.onGitHubCallback){var g=mxUtils.bind(this,function(){var f=!0;this.ui.showAuthDialog(this,!0,mxUtils.bind(this,function(m,e){null!=window.open(this.baseHostUrl+"/login/oauth/authorize?client_id="+this.clientId+"&scope="+
+this.scope+"&state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.hostname+"&token="+d),"ghauth")?window.onGitHubCallback=mxUtils.bind(this,function(d,l){f?(window.onGitHubCallback=null,f=!1,null==d?b({message:mxResources.get("accessDenied"),retry:g}):(null!=e&&e(),a=d.access_token,this.setUser(null),m&&this.setPersistentToken("remembered"),c(),null!=l&&l.close())):null!=l&&l.close()}):b({message:mxResources.get("serviceUnavailableOrBlocked"),retry:g})}),mxUtils.bind(this,function(){f&&
+(window.onGitHubCallback=null,f=!1,b({message:mxResources.get("accessDenied"),retry:g}))}))});g()}else b({code:App.ERROR_BUSY})};GitHubClient.prototype.getErrorMessage=function(a,c){try{var b=JSON.parse(a.getText());null!=b&&null!=b.message&&(c=b.message)}catch(g){}return c};GitHubClient.prototype.executeRequest=function(d,c,b,g){var f=mxUtils.bind(this,function(e){var k=!0,l=window.setTimeout(mxUtils.bind(this,function(){k=!1;b({code:App.ERROR_TIMEOUT,retry:m})}),this.ui.timeout),n=this.authToken+
+" "+a;d.setRequestHeaders=function(a,b){a.setRequestHeader("Authorization",n)};d.send(mxUtils.bind(this,function(){window.clearTimeout(l);if(k)if(200<=d.getStatus()&&299>=d.getStatus()||g&&404==d.getStatus())c(d);else if(401===d.getStatus())e?b({code:d.getStatus(),message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,function(){this.authenticate(function(){m(!0)},b)})}):this.authenticate(function(){f(!0)},b);else if(403===d.getStatus()){var a=!1;try{var n=JSON.parse(d.getText());null!=n&&
null!=n.errors&&0<n.errors.length&&(a="too_large"==n.errors[0].code)}catch(u){}b({message:mxResources.get(a?"drawingTooLarge":"forbidden")})}else 404===d.getStatus()?b({code:d.getStatus(),message:this.getErrorMessage(d,mxResources.get("fileNotFound"))}):409===d.getStatus()?b({code:d.getStatus(),status:409}):b({code:d.getStatus(),message:this.getErrorMessage(d,mxResources.get("error")+" "+d.getStatus())})}),mxUtils.bind(this,function(a){window.clearTimeout(l);k&&b(a)}))}),m=mxUtils.bind(this,function(a){null==
-this.user?this.updateUser(function(){m(!0)},b,a):g(a)});null==a?this.authenticate(function(){m(!0)},b):m(!1)};GitHubClient.prototype.getLibrary=function(a,c,b){this.getFile(a,c,b,!0)};GitHubClient.prototype.getSha=function(a,c,b,f,g,m){var d="&t="+(new Date).getTime();a=new mxXmlRequest(this.baseUrl+"/repos/"+a+"/"+c+"/contents/"+b+"?ref="+f+d,null,"HEAD");this.executeRequest(a,mxUtils.bind(this,function(a){try{g(a.request.getResponseHeader("Etag").match(/"([^"]+)"/)[1])}catch(l){m(l)}}),m)};GitHubClient.prototype.getFile=
-function(d,c,b,f,g){f=null!=f?f:!1;var m=d.split("/"),e=m[0],k=m[1],l=m[2];d=m.slice(3,m.length).join("/");m=/\.png$/i.test(d);if(!g&&(/\.v(dx|sdx?)$/i.test(d)||/\.gliffy$/i.test(d)||/\.pdf$/i.test(d)||!this.ui.useCanvasForExport&&m))if(null!=a){g=this.baseUrl+"/repos/"+e+"/"+k+"/contents/"+d+"?ref="+l;var n={Authorization:"token "+a},m=d.split("/");this.ui.convertFile(g,0<m.length?m[m.length-1]:d,null,this.extension,c,b,null,n)}else b({message:mxResources.get("accessDenied")});else m="&t="+(new Date).getTime(),
-d=new mxXmlRequest(this.baseUrl+"/repos/"+e+"/"+k+"/contents/"+d+"?ref="+l+m,null,"GET"),this.executeRequest(d,mxUtils.bind(this,function(a){try{c(this.createGitHubFile(e,k,l,JSON.parse(a.getText()),f))}catch(q){b(q)}}),b)};GitHubClient.prototype.createGitHubFile=function(a,c,b,f,g){a={org:a,repo:c,ref:b,name:f.name,path:f.path,sha:f.sha,html_url:f.html_url,download_url:f.download_url};c=f.content;"base64"===f.encoding&&(/\.jpe?g$/i.test(f.name)?c="data:image/jpeg;base64,"+c:/\.gif$/i.test(f.name)?
-c="data:image/gif;base64,"+c:/\.png$/i.test(f.name)?(f=this.ui.extractGraphModelFromPng(c),c=null!=f&&0<f.length?f:"data:image/png;base64,"+c):c=Base64.decode(c));return g?new GitHubLibrary(this.ui,c,a):new GitHubFile(this.ui,c,a)};GitHubClient.prototype.insertLibrary=function(a,c,b,f,g){this.insertFile(a,c,b,f,!0,g,!1)};GitHubClient.prototype.insertFile=function(a,c,b,f,g,m,e){g=null!=g?g:!1;m=m.split("/");var d=m[0],l=m[1],n=m[2],p=m.slice(3,m.length).join("/");0<p.length&&(p+="/");p+=a;this.checkExists(d+
-"/"+l+"/"+n+"/"+p,!0,mxUtils.bind(this,function(k,m){k?g?(e||(c=Base64.encode(c)),this.showCommitDialog(a,!0,mxUtils.bind(this,function(a){this.writeFile(d,l,n,p,a,c,m,mxUtils.bind(this,function(a){try{var c=JSON.parse(a.getText());b(this.createGitHubFile(d,l,n,c.content,g))}catch(y){f(y)}}),f)}),f)):b(new GitHubFile(this.ui,c,{org:d,repo:l,ref:n,name:a,path:p,sha:m,isNew:!0})):f()}))};GitHubClient.prototype.showCommitDialog=function(a,c,b,f){var d=this.ui.spinner.pause();a=new FilenameDialog(this.ui,
-mxResources.get(c?"addedFile":"updateFile",[a]),mxResources.get("ok"),mxUtils.bind(this,function(a){d();b(a)}),mxResources.get("commitMessage"),null,null,null,null,mxUtils.bind(this,function(){f()}),null,280);this.ui.showDialog(a.container,400,80,!0,!1);a.init()};GitHubClient.prototype.writeFile=function(a,c,b,f,g,m,e,k,l){m.length>=this.maxFileSize?l({message:mxResources.get("drawingTooLarge")+" ("+this.ui.formatFileSize(m.length)+" / 1 MB)"}):(b={path:f,branch:decodeURIComponent(b),message:g,content:m},
-null!=e&&(b.sha=e),a=new mxXmlRequest(this.baseUrl+"/repos/"+a+"/"+c+"/contents/"+f,JSON.stringify(b),"PUT"),this.executeRequest(a,mxUtils.bind(this,function(a){k(a)}),mxUtils.bind(this,function(a){404==a.code&&(a.helpLink=this.baseHostUrl+"/settings/connections/applications/"+this.clientId,a.code=null);l(a)})))};GitHubClient.prototype.checkExists=function(a,c,b){var d=a.split("/"),g=d[0],m=d[1],e=d[2];a=d.slice(3,d.length).join("/");this.getSha(g,m,a,e,mxUtils.bind(this,function(d){if(c){var e=this.ui.spinner.pause();
-this.ui.confirm(mxResources.get("replaceIt",[a]),function(){e();b(!0,d)},function(){e();b(!1)})}else this.ui.spinner.stop(),this.ui.showError(mxResources.get("error"),mxResources.get("fileExists"),mxResources.get("ok"),function(){b(!1)})}),mxUtils.bind(this,function(a){b(!0)}),null,!0)};GitHubClient.prototype.saveFile=function(a,c,b,f,g){var d=a.meta.org,e=a.meta.repo,k=a.meta.ref,l=a.meta.path,n=mxUtils.bind(this,function(f,m){this.writeFile(d,e,k,l,g,m,f,mxUtils.bind(this,function(b){delete a.meta.isNew;
-c(JSON.parse(b.getText()).content.sha)}),mxUtils.bind(this,function(a){b(a)}))}),p=mxUtils.bind(this,function(){if(this.ui.useCanvasForExport&&/(\.png)$/i.test(l)){var c=this.ui.getPngFileProperties(this.ui.fileNode);this.ui.getEmbeddedPng(mxUtils.bind(this,function(b){n(a.meta.sha,b)}),b,this.ui.getCurrentFile()!=a?a.getData():null,c.scale,c.border)}else n(a.meta.sha,Base64.encode(a.getData()))});f?this.getSha(d,e,l,k,mxUtils.bind(this,function(b){a.meta.sha=b;p()}),b):p()};GitHubClient.prototype.pickLibrary=
-function(a){this.pickFile(a)};GitHubClient.prototype.pickFolder=function(a){this.showGitHubDialog(!1,a)};GitHubClient.prototype.pickFile=function(a){a=null!=a?a:mxUtils.bind(this,function(a){this.ui.loadFile("H"+encodeURIComponent(a))});this.showGitHubDialog(!0,a)};GitHubClient.prototype.showGitHubDialog=function(a,c){var b=null,d=null,g=null,m=null,e=document.createElement("div");e.style.whiteSpace="nowrap";e.style.overflow="hidden";e.style.height="304px";var k=document.createElement("h3");mxUtils.write(k,
+this.user?this.updateUser(function(){m(!0)},b,a):f(a)});null==a?this.authenticate(function(){m(!0)},b):m(!1)};GitHubClient.prototype.getLibrary=function(a,c,b){this.getFile(a,c,b,!0)};GitHubClient.prototype.getSha=function(a,c,b,g,f,m){var d="&t="+(new Date).getTime();a=new mxXmlRequest(this.baseUrl+"/repos/"+a+"/"+c+"/contents/"+b+"?ref="+g+d,null,"HEAD");this.executeRequest(a,mxUtils.bind(this,function(a){try{f(a.request.getResponseHeader("Etag").match(/"([^"]+)"/)[1])}catch(l){m(l)}}),m)};GitHubClient.prototype.getFile=
+function(d,c,b,g,f){g=null!=g?g:!1;var m=d.split("/"),e=m[0],k=m[1],l=m[2];d=m.slice(3,m.length).join("/");m=/\.png$/i.test(d);if(!f&&(/\.v(dx|sdx?)$/i.test(d)||/\.gliffy$/i.test(d)||/\.pdf$/i.test(d)||!this.ui.useCanvasForExport&&m))if(null!=a){f=this.baseUrl+"/repos/"+e+"/"+k+"/contents/"+d+"?ref="+l;var n={Authorization:"token "+a},m=d.split("/");this.ui.convertFile(f,0<m.length?m[m.length-1]:d,null,this.extension,c,b,null,n)}else b({message:mxResources.get("accessDenied")});else m="&t="+(new Date).getTime(),
+d=new mxXmlRequest(this.baseUrl+"/repos/"+e+"/"+k+"/contents/"+d+"?ref="+l+m,null,"GET"),this.executeRequest(d,mxUtils.bind(this,function(a){try{c(this.createGitHubFile(e,k,l,JSON.parse(a.getText()),g))}catch(q){b(q)}}),b)};GitHubClient.prototype.createGitHubFile=function(a,c,b,g,f){a={org:a,repo:c,ref:b,name:g.name,path:g.path,sha:g.sha,html_url:g.html_url,download_url:g.download_url};c=g.content;"base64"===g.encoding&&(/\.jpe?g$/i.test(g.name)?c="data:image/jpeg;base64,"+c:/\.gif$/i.test(g.name)?
+c="data:image/gif;base64,"+c:/\.png$/i.test(g.name)?(g=this.ui.extractGraphModelFromPng(c),c=null!=g&&0<g.length?g:"data:image/png;base64,"+c):c=Base64.decode(c));return f?new GitHubLibrary(this.ui,c,a):new GitHubFile(this.ui,c,a)};GitHubClient.prototype.insertLibrary=function(a,c,b,g,f){this.insertFile(a,c,b,g,!0,f,!1)};GitHubClient.prototype.insertFile=function(a,c,b,g,f,m,e){f=null!=f?f:!1;m=m.split("/");var d=m[0],l=m[1],n=m[2],p=m.slice(3,m.length).join("/");0<p.length&&(p+="/");p+=a;this.checkExists(d+
+"/"+l+"/"+n+"/"+p,!0,mxUtils.bind(this,function(k,m){k?f?(e||(c=Base64.encode(c)),this.showCommitDialog(a,!0,mxUtils.bind(this,function(a){this.writeFile(d,l,n,p,a,c,m,mxUtils.bind(this,function(a){try{var c=JSON.parse(a.getText());b(this.createGitHubFile(d,l,n,c.content,f))}catch(y){g(y)}}),g)}),g)):b(new GitHubFile(this.ui,c,{org:d,repo:l,ref:n,name:a,path:p,sha:m,isNew:!0})):g()}))};GitHubClient.prototype.showCommitDialog=function(a,c,b,g){var d=this.ui.spinner.pause();a=new FilenameDialog(this.ui,
+mxResources.get(c?"addedFile":"updateFile",[a]),mxResources.get("ok"),mxUtils.bind(this,function(a){d();b(a)}),mxResources.get("commitMessage"),null,null,null,null,mxUtils.bind(this,function(){g()}),null,280);this.ui.showDialog(a.container,400,80,!0,!1);a.init()};GitHubClient.prototype.writeFile=function(a,c,b,g,f,m,e,k,l){m.length>=this.maxFileSize?l({message:mxResources.get("drawingTooLarge")+" ("+this.ui.formatFileSize(m.length)+" / 1 MB)"}):(b={path:g,branch:decodeURIComponent(b),message:f,content:m},
+null!=e&&(b.sha=e),a=new mxXmlRequest(this.baseUrl+"/repos/"+a+"/"+c+"/contents/"+g,JSON.stringify(b),"PUT"),this.executeRequest(a,mxUtils.bind(this,function(a){k(a)}),mxUtils.bind(this,function(a){404==a.code&&(a.helpLink=this.baseHostUrl+"/settings/connections/applications/"+this.clientId,a.code=null);l(a)})))};GitHubClient.prototype.checkExists=function(a,c,b){var d=a.split("/"),f=d[0],m=d[1],e=d[2];a=d.slice(3,d.length).join("/");this.getSha(f,m,a,e,mxUtils.bind(this,function(d){if(c){var e=this.ui.spinner.pause();
+this.ui.confirm(mxResources.get("replaceIt",[a]),function(){e();b(!0,d)},function(){e();b(!1)})}else this.ui.spinner.stop(),this.ui.showError(mxResources.get("error"),mxResources.get("fileExists"),mxResources.get("ok"),function(){b(!1)})}),mxUtils.bind(this,function(a){b(!0)}),null,!0)};GitHubClient.prototype.saveFile=function(a,c,b,g,f){var d=a.meta.org,e=a.meta.repo,k=a.meta.ref,l=a.meta.path,n=mxUtils.bind(this,function(g,m){this.writeFile(d,e,k,l,f,m,g,mxUtils.bind(this,function(b){delete a.meta.isNew;
+c(JSON.parse(b.getText()).content.sha)}),mxUtils.bind(this,function(a){b(a)}))}),p=mxUtils.bind(this,function(){if(this.ui.useCanvasForExport&&/(\.png)$/i.test(l)){var c=this.ui.getPngFileProperties(this.ui.fileNode);this.ui.getEmbeddedPng(mxUtils.bind(this,function(b){n(a.meta.sha,b)}),b,this.ui.getCurrentFile()!=a?a.getData():null,c.scale,c.border)}else n(a.meta.sha,Base64.encode(a.getData()))});g?this.getSha(d,e,l,k,mxUtils.bind(this,function(b){a.meta.sha=b;p()}),b):p()};GitHubClient.prototype.pickLibrary=
+function(a){this.pickFile(a)};GitHubClient.prototype.pickFolder=function(a){this.showGitHubDialog(!1,a)};GitHubClient.prototype.pickFile=function(a){a=null!=a?a:mxUtils.bind(this,function(a){this.ui.loadFile("H"+encodeURIComponent(a))});this.showGitHubDialog(!0,a)};GitHubClient.prototype.showGitHubDialog=function(a,c){var b=null,d=null,f=null,m=null,e=document.createElement("div");e.style.whiteSpace="nowrap";e.style.overflow="hidden";e.style.height="304px";var k=document.createElement("h3");mxUtils.write(k,
mxResources.get(a?"selectFile":"selectFolder"));k.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";e.appendChild(k);var l=document.createElement("div");l.style.whiteSpace="nowrap";l.style.border="1px solid lightgray";l.style.boxSizing="border-box";l.style.padding="4px";l.style.overflow="auto";l.style.lineHeight="1.2em";l.style.height="274px";e.appendChild(l);var n=document.createElement("div");n.style.textOverflow="ellipsis";n.style.boxSizing="border-box";n.style.overflow=
-"hidden";n.style.padding="4px";n.style.width="100%";var p=new CustomDialog(this.ui,e,mxUtils.bind(this,function(){c(b+"/"+d+"/"+encodeURIComponent(g)+"/"+m)}));this.ui.showDialog(p.container,420,360,!0,!0);a&&p.okButton.parentNode.removeChild(p.okButton);var q=mxUtils.bind(this,function(a,b,c,d){var e=document.createElement("a");e.setAttribute("title",a);e.style.cursor="pointer";mxUtils.write(e,a);mxEvent.addListener(e,"click",b);d&&(e.style.textDecoration="underline");null!=c&&(a=n.cloneNode(),a.style.padding=
-c,a.appendChild(e),e=a);return e}),u=mxUtils.bind(this,function(a){var c=document.createElement("div");c.style.marginBottom="8px";c.appendChild(q(b+"/"+d,mxUtils.bind(this,function(){m=null;A()}),null,!0));a||(mxUtils.write(c," / "),c.appendChild(q(decodeURIComponent(g),mxUtils.bind(this,function(){m=null;x()}),null,!0)));if(null!=m&&0<m.length){var e=m.split("/");for(a=0;a<e.length;a++)(function(a){mxUtils.write(c," / ");c.appendChild(q(e[a],mxUtils.bind(this,function(){m=e.slice(0,a+1).join("/");
-y()}),null,!0))})(a)}l.appendChild(c)}),t=mxUtils.bind(this,function(a){this.ui.handleError(a,null,mxUtils.bind(this,function(){this.ui.spinner.stop();null!=this.getUser()?(m=g=d=b=null,A()):this.ui.hideDialog()}),null,{})}),v=null,z=null,y=mxUtils.bind(this,function(e){null==e&&(l.innerHTML="",e=1);var f=new mxXmlRequest(this.baseUrl+"/repos/"+b+"/"+d+"/contents/"+m+"?ref="+encodeURIComponent(g)+"&per_page=100&page="+e,null,"GET");this.ui.spinner.spin(l,mxResources.get("loading"));p.okButton.removeAttribute("disabled");
-null!=z&&(mxEvent.removeListener(l,"scroll",z),z=null);null!=v&&null!=v.parentNode&&v.parentNode.removeChild(v);v=document.createElement("a");v.style.display="block";v.style.cursor="pointer";mxUtils.write(v,mxResources.get("more")+"...");var k=mxUtils.bind(this,function(){y(e+1)});mxEvent.addListener(v,"click",k);this.executeRequest(f,mxUtils.bind(this,function(f){this.ui.spinner.stop();1==e&&(u(),l.appendChild(q("../ [Up]",mxUtils.bind(this,function(){if(""==m)m=null,A();else{var a=m.split("/");
-m=a.slice(0,a.length-1).join("/");y()}}),"4px")));var k=JSON.parse(f.getText());if(null==k||0==k.length)mxUtils.write(l,mxResources.get("noFiles"));else{var x=!0,p=0;f=mxUtils.bind(this,function(e){for(var f=0;f<k.length;f++)mxUtils.bind(this,function(f,k){if(e==("dir"==f.type)){var A=n.cloneNode();A.style.backgroundColor=x?Editor.isDarkMode()?"#000000":"#eeeeee":"";x=!x;var t=document.createElement("img");t.src=IMAGE_PATH+"/"+("dir"==f.type?"folder.png":"file.png");t.setAttribute("align","absmiddle");
-t.style.marginRight="4px";t.style.marginTop="-4px";t.width=20;A.appendChild(t);A.appendChild(q(f.name+("dir"==f.type?"/":""),mxUtils.bind(this,function(){"dir"==f.type?(m=f.path,y()):a&&"file"==f.type&&(this.ui.hideDialog(),c(b+"/"+d+"/"+encodeURIComponent(g)+"/"+f.path))})));l.appendChild(A);p++}})(k[f],f)});f(!0);a&&f(!1)}}),t,!0)}),x=mxUtils.bind(this,function(a,c){null==a&&(l.innerHTML="",a=1);var e=new mxXmlRequest(this.baseUrl+"/repos/"+b+"/"+d+"/branches?per_page=100&page="+a,null,"GET");p.okButton.setAttribute("disabled",
-"disabled");this.ui.spinner.spin(l,mxResources.get("loading"));null!=z&&(mxEvent.removeListener(l,"scroll",z),z=null);null!=v&&null!=v.parentNode&&v.parentNode.removeChild(v);v=document.createElement("a");v.style.display="block";v.style.cursor="pointer";mxUtils.write(v,mxResources.get("more")+"...");var f=mxUtils.bind(this,function(){x(a+1)});mxEvent.addListener(v,"click",f);this.executeRequest(e,mxUtils.bind(this,function(b){this.ui.spinner.stop();1==a&&(u(!0),l.appendChild(q("../ [Up]",mxUtils.bind(this,
-function(){m=null;A()}),"4px")));b=JSON.parse(b.getText());if(null==b||0==b.length)mxUtils.write(l,mxResources.get("noFiles"));else if(1==b.length&&c)g=b[0].name,m="",y();else{for(var d=0;d<b.length;d++)mxUtils.bind(this,function(a,b){var c=n.cloneNode();c.style.backgroundColor=0==b%2?Editor.isDarkMode()?"#000000":"#eeeeee":"";c.appendChild(q(a.name,mxUtils.bind(this,function(){g=a.name;m="";y()})));l.appendChild(c)})(b[d],d);100==b.length&&(l.appendChild(v),z=function(){l.scrollTop>=l.scrollHeight-
-l.offsetHeight&&f()},mxEvent.addListener(l,"scroll",z))}}),t)}),A=mxUtils.bind(this,function(a){null==a&&(l.innerHTML="",a=1);var c=new mxXmlRequest(this.baseUrl+"/user/repos?per_page=100&page="+a,null,"GET");p.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(l,mxResources.get("loading"));null!=z&&mxEvent.removeListener(l,"scroll",z);null!=v&&null!=v.parentNode&&v.parentNode.removeChild(v);v=document.createElement("a");v.style.display="block";v.style.cursor="pointer";mxUtils.write(v,
+"hidden";n.style.padding="4px";n.style.width="100%";var p=new CustomDialog(this.ui,e,mxUtils.bind(this,function(){c(b+"/"+d+"/"+encodeURIComponent(f)+"/"+m)}));this.ui.showDialog(p.container,420,360,!0,!0);a&&p.okButton.parentNode.removeChild(p.okButton);var q=mxUtils.bind(this,function(a,b,c,d){var e=document.createElement("a");e.setAttribute("title",a);e.style.cursor="pointer";mxUtils.write(e,a);mxEvent.addListener(e,"click",b);d&&(e.style.textDecoration="underline");null!=c&&(a=n.cloneNode(),a.style.padding=
+c,a.appendChild(e),e=a);return e}),u=mxUtils.bind(this,function(a){var c=document.createElement("div");c.style.marginBottom="8px";c.appendChild(q(b+"/"+d,mxUtils.bind(this,function(){m=null;A()}),null,!0));a||(mxUtils.write(c," / "),c.appendChild(q(decodeURIComponent(f),mxUtils.bind(this,function(){m=null;x()}),null,!0)));if(null!=m&&0<m.length){var e=m.split("/");for(a=0;a<e.length;a++)(function(a){mxUtils.write(c," / ");c.appendChild(q(e[a],mxUtils.bind(this,function(){m=e.slice(0,a+1).join("/");
+y()}),null,!0))})(a)}l.appendChild(c)}),t=mxUtils.bind(this,function(a){this.ui.handleError(a,null,mxUtils.bind(this,function(){this.ui.spinner.stop();null!=this.getUser()?(m=f=d=b=null,A()):this.ui.hideDialog()}),null,{})}),v=null,z=null,y=mxUtils.bind(this,function(e){null==e&&(l.innerHTML="",e=1);var g=new mxXmlRequest(this.baseUrl+"/repos/"+b+"/"+d+"/contents/"+m+"?ref="+encodeURIComponent(f)+"&per_page=100&page="+e,null,"GET");this.ui.spinner.spin(l,mxResources.get("loading"));p.okButton.removeAttribute("disabled");
+null!=z&&(mxEvent.removeListener(l,"scroll",z),z=null);null!=v&&null!=v.parentNode&&v.parentNode.removeChild(v);v=document.createElement("a");v.style.display="block";v.style.cursor="pointer";mxUtils.write(v,mxResources.get("more")+"...");var k=mxUtils.bind(this,function(){y(e+1)});mxEvent.addListener(v,"click",k);this.executeRequest(g,mxUtils.bind(this,function(g){this.ui.spinner.stop();1==e&&(u(),l.appendChild(q("../ [Up]",mxUtils.bind(this,function(){if(""==m)m=null,A();else{var a=m.split("/");
+m=a.slice(0,a.length-1).join("/");y()}}),"4px")));var k=JSON.parse(g.getText());if(null==k||0==k.length)mxUtils.write(l,mxResources.get("noFiles"));else{var x=!0,p=0;g=mxUtils.bind(this,function(e){for(var g=0;g<k.length;g++)mxUtils.bind(this,function(g,k){if(e==("dir"==g.type)){var A=n.cloneNode();A.style.backgroundColor=x?Editor.isDarkMode()?"#000000":"#eeeeee":"";x=!x;var t=document.createElement("img");t.src=IMAGE_PATH+"/"+("dir"==g.type?"folder.png":"file.png");t.setAttribute("align","absmiddle");
+t.style.marginRight="4px";t.style.marginTop="-4px";t.width=20;A.appendChild(t);A.appendChild(q(g.name+("dir"==g.type?"/":""),mxUtils.bind(this,function(){"dir"==g.type?(m=g.path,y()):a&&"file"==g.type&&(this.ui.hideDialog(),c(b+"/"+d+"/"+encodeURIComponent(f)+"/"+g.path))})));l.appendChild(A);p++}})(k[g],g)});g(!0);a&&g(!1)}}),t,!0)}),x=mxUtils.bind(this,function(a,c){null==a&&(l.innerHTML="",a=1);var e=new mxXmlRequest(this.baseUrl+"/repos/"+b+"/"+d+"/branches?per_page=100&page="+a,null,"GET");p.okButton.setAttribute("disabled",
+"disabled");this.ui.spinner.spin(l,mxResources.get("loading"));null!=z&&(mxEvent.removeListener(l,"scroll",z),z=null);null!=v&&null!=v.parentNode&&v.parentNode.removeChild(v);v=document.createElement("a");v.style.display="block";v.style.cursor="pointer";mxUtils.write(v,mxResources.get("more")+"...");var g=mxUtils.bind(this,function(){x(a+1)});mxEvent.addListener(v,"click",g);this.executeRequest(e,mxUtils.bind(this,function(b){this.ui.spinner.stop();1==a&&(u(!0),l.appendChild(q("../ [Up]",mxUtils.bind(this,
+function(){m=null;A()}),"4px")));b=JSON.parse(b.getText());if(null==b||0==b.length)mxUtils.write(l,mxResources.get("noFiles"));else if(1==b.length&&c)f=b[0].name,m="",y();else{for(var d=0;d<b.length;d++)mxUtils.bind(this,function(a,b){var c=n.cloneNode();c.style.backgroundColor=0==b%2?Editor.isDarkMode()?"#000000":"#eeeeee":"";c.appendChild(q(a.name,mxUtils.bind(this,function(){f=a.name;m="";y()})));l.appendChild(c)})(b[d],d);100==b.length&&(l.appendChild(v),z=function(){l.scrollTop>=l.scrollHeight-
+l.offsetHeight&&g()},mxEvent.addListener(l,"scroll",z))}}),t)}),A=mxUtils.bind(this,function(a){null==a&&(l.innerHTML="",a=1);var c=new mxXmlRequest(this.baseUrl+"/user/repos?per_page=100&page="+a,null,"GET");p.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(l,mxResources.get("loading"));null!=z&&mxEvent.removeListener(l,"scroll",z);null!=v&&null!=v.parentNode&&v.parentNode.removeChild(v);v=document.createElement("a");v.style.display="block";v.style.cursor="pointer";mxUtils.write(v,
mxResources.get("more")+"...");var e=mxUtils.bind(this,function(){A(a+1)});mxEvent.addListener(v,"click",e);this.executeRequest(c,mxUtils.bind(this,function(c){this.ui.spinner.stop();c=JSON.parse(c.getText());if(null==c||0==c.length)mxUtils.write(l,mxResources.get("noFiles"));else{1==a&&(l.appendChild(q(mxResources.get("enterValue")+"...",mxUtils.bind(this,function(){var a=new FilenameDialog(this.ui,"org/repo/ref",mxResources.get("ok"),mxUtils.bind(this,function(a){if(null!=a){var c=a.split("/");
-if(1<c.length){a=c[0];var e=c[1];3>c.length?(b=a,d=e,m=g=null,x()):this.ui.spinner.spin(l,mxResources.get("loading"))&&(c=encodeURIComponent(c.slice(2,c.length).join("/")),this.getFile(a+"/"+e+"/"+c,mxUtils.bind(this,function(a){this.ui.spinner.stop();b=a.meta.org;d=a.meta.repo;g=decodeURIComponent(a.meta.ref);m="";y()}),mxUtils.bind(this,function(a){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(a.container,300,80,!0,!1);a.init()}))),mxUtils.br(l),mxUtils.br(l));for(var f=0;f<c.length;f++)mxUtils.bind(this,function(a,c){var e=n.cloneNode();e.style.backgroundColor=0==c%2?Editor.isDarkMode()?"#000000":"#eeeeee":"";e.appendChild(q(a.full_name,mxUtils.bind(this,function(){b=a.owner.login;d=a.name;m="";x(null,!0)})));l.appendChild(e)})(c[f],f)}100==c.length&&(l.appendChild(v),z=function(){l.scrollTop>=l.scrollHeight-l.offsetHeight&&e()},mxEvent.addListener(l,
+if(1<c.length){a=c[0];var e=c[1];3>c.length?(b=a,d=e,m=f=null,x()):this.ui.spinner.spin(l,mxResources.get("loading"))&&(c=encodeURIComponent(c.slice(2,c.length).join("/")),this.getFile(a+"/"+e+"/"+c,mxUtils.bind(this,function(a){this.ui.spinner.stop();b=a.meta.org;d=a.meta.repo;f=decodeURIComponent(a.meta.ref);m="";y()}),mxUtils.bind(this,function(a){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(a.container,300,80,!0,!1);a.init()}))),mxUtils.br(l),mxUtils.br(l));for(var g=0;g<c.length;g++)mxUtils.bind(this,function(a,c){var e=n.cloneNode();e.style.backgroundColor=0==c%2?Editor.isDarkMode()?"#000000":"#eeeeee":"";e.appendChild(q(a.full_name,mxUtils.bind(this,function(){b=a.owner.login;d=a.name;m="";x(null,!0)})));l.appendChild(e)})(c[g],g)}100==c.length&&(l.appendChild(v),z=function(){l.scrollTop>=l.scrollHeight-l.offsetHeight&&e()},mxEvent.addListener(l,
"scroll",z))}),t)});A()};GitHubClient.prototype.logout=function(){this.clearPersistentToken();this.setUser(null);a=null}})();TrelloFile=function(a,d,c){DrawioFile.call(this,a,d);this.meta=c;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(a,d,c){this.doSave(this.getTitle(),d,c)};TrelloFile.prototype.saveAs=function(a,d,c){this.doSave(a,d,c)};TrelloFile.prototype.doSave=function(a,d,c){var b=this.meta.name;this.meta.name=a;DrawioFile.prototype.save.apply(this,[null,mxUtils.bind(this,function(){this.meta.name=b;this.saveFile(a,!1,d,c)}),c])};
-TrelloFile.prototype.saveFile=function(a,d,c,b){this.isEditable()?this.savingFile?null!=b&&(this.saveNeededCounter++,b({code:App.ERROR_BUSY})):(this.savingFileTime=new Date,this.setShadowModified(!1),this.savingFile=!0,this.getTitle()==a?this.ui.trello.saveFile(this,mxUtils.bind(this,function(f){this.setModified(this.getShadowModified());this.savingFile=!1;this.meta=f;this.contentChanged();null!=c&&c();0<this.saveNeededCounter&&(this.saveNeededCounter--,this.saveFile(a,d,c,b))}),mxUtils.bind(this,
-function(a){this.savingFile=!1;null!=b&&b(a)})):this.ui.pickFolder(App.MODE_TRELLO,mxUtils.bind(this,function(f){this.ui.trello.insertFile(a,this.getData(),mxUtils.bind(this,function(f){this.savingFile=!1;null!=c&&c();this.ui.fileLoaded(f);0<this.saveNeededCounter&&(this.saveNeededCounter--,this.saveFile(a,d,c,b))}),mxUtils.bind(this,function(){this.savingFile=!1;null!=b&&b()}),!1,f)}))):null!=c&&c()};TrelloLibrary=function(a,d,c){TrelloFile.call(this,a,d,c)};mxUtils.extend(TrelloLibrary,TrelloFile);TrelloLibrary.prototype.doSave=function(a,d,c){this.saveFile(a,!1,d,c)};TrelloLibrary.prototype.open=function(){};TrelloClient=function(a){DrawioClient.call(this,a,"tauth");Trello.setKey(this.key)};mxUtils.extend(TrelloClient,DrawioClient);TrelloClient.prototype.key="e73615c79cf7e381aef91c85936e9553";TrelloClient.prototype.baseUrl="https://api.trello.com/1/";TrelloClient.prototype.SEPARATOR="|$|";TrelloClient.prototype.maxFileSize=1E7;TrelloClient.prototype.extension=".xml";
+TrelloFile.prototype.saveFile=function(a,d,c,b){this.isEditable()?this.savingFile?null!=b&&(this.saveNeededCounter++,b({code:App.ERROR_BUSY})):(this.savingFileTime=new Date,this.setShadowModified(!1),this.savingFile=!0,this.getTitle()==a?this.ui.trello.saveFile(this,mxUtils.bind(this,function(g){this.setModified(this.getShadowModified());this.savingFile=!1;this.meta=g;this.contentChanged();null!=c&&c();0<this.saveNeededCounter&&(this.saveNeededCounter--,this.saveFile(a,d,c,b))}),mxUtils.bind(this,
+function(a){this.savingFile=!1;null!=b&&b(a)})):this.ui.pickFolder(App.MODE_TRELLO,mxUtils.bind(this,function(g){this.ui.trello.insertFile(a,this.getData(),mxUtils.bind(this,function(f){this.savingFile=!1;null!=c&&c();this.ui.fileLoaded(f);0<this.saveNeededCounter&&(this.saveNeededCounter--,this.saveFile(a,d,c,b))}),mxUtils.bind(this,function(){this.savingFile=!1;null!=b&&b()}),!1,g)}))):null!=c&&c()};TrelloLibrary=function(a,d,c){TrelloFile.call(this,a,d,c)};mxUtils.extend(TrelloLibrary,TrelloFile);TrelloLibrary.prototype.doSave=function(a,d,c){this.saveFile(a,!1,d,c)};TrelloLibrary.prototype.open=function(){};TrelloClient=function(a){DrawioClient.call(this,a,"tauth");Trello.setKey(this.key)};mxUtils.extend(TrelloClient,DrawioClient);TrelloClient.prototype.key="e73615c79cf7e381aef91c85936e9553";TrelloClient.prototype.baseUrl="https://api.trello.com/1/";TrelloClient.prototype.SEPARATOR="|$|";TrelloClient.prototype.maxFileSize=1E7;TrelloClient.prototype.extension=".xml";
TrelloClient.prototype.authenticate=function(a,d,c){c&&this.logout();c=mxUtils.bind(this,function(b,c){Trello.authorize({type:"popup",name:"draw.io",scope:{read:"true",write:"true"},expiration:b?"never":"1hour",success:function(){null!=c&&c();a()},error:function(){null!=c&&c();null!=d&&d(mxResources.get("loggedOut"))}})});this.isAuthorized()?c(!0):this.ui.showAuthDialog(this,!0,c)};TrelloClient.prototype.getLibrary=function(a,d,c){this.getFile(a,d,c,!1,!0)};
-TrelloClient.prototype.getFile=function(a,d,c,b,f){f=null!=f?f:!1;var g=mxUtils.bind(this,function(){var b=a.split(this.SEPARATOR),e=!0,k=window.setTimeout(mxUtils.bind(this,function(){e=!1;c({code:App.ERROR_TIMEOUT,retry:g})}),this.ui.timeout);Trello.cards.get(b[0]+"/attachments/"+b[1],mxUtils.bind(this,function(b){window.clearTimeout(k);if(e){var m=/\.png$/i.test(b.name),l={Authorization:'OAuth oauth_consumer_key="'+Trello.key()+'", oauth_token="'+Trello.token()+'"'};/\.v(dx|sdx?)$/i.test(b.name)||
-/\.gliffy$/i.test(b.name)||!this.ui.useCanvasForExport&&m?this.ui.convertFile(PROXY_URL+"?url="+encodeURIComponent(b.url),b.name,b.mimeType,this.extension,d,c,null,l):(e=!0,k=window.setTimeout(mxUtils.bind(this,function(){e=!1;c({code:App.ERROR_TIMEOUT})}),this.ui.timeout),this.ui.editor.loadUrl(PROXY_URL+"?url="+encodeURIComponent(b.url),mxUtils.bind(this,function(c){window.clearTimeout(k);if(e){b.compoundId=a;if(0<(m?c.lastIndexOf(","):-1)){var g=this.ui.extractGraphModelFromPng(c);null!=g&&0<g.length&&
-(c=g)}f?d(new TrelloLibrary(this.ui,c,b)):d(new TrelloFile(this.ui,c,b))}}),mxUtils.bind(this,function(a,b){window.clearTimeout(k);e&&(401==b.status?this.authenticate(g,c,!0):c())}),m||null!=b.mimeType&&"image/"==b.mimeType.substring(0,6),null,null,null,l))}}),mxUtils.bind(this,function(a){window.clearTimeout(k);e&&(null!=a&&401==a.status?this.authenticate(g,c,!0):c())}))});this.authenticate(g,c)};TrelloClient.prototype.insertLibrary=function(a,d,c,b,f){this.insertFile(a,d,c,b,!0,f)};
-TrelloClient.prototype.insertFile=function(a,d,c,b,f,g){f=null!=f?f:!1;var m=mxUtils.bind(this,function(){var e=mxUtils.bind(this,function(e){this.writeFile(a,e,g,mxUtils.bind(this,function(a){f?c(new TrelloLibrary(this.ui,d,a)):c(new TrelloFile(this.ui,d,a))}),b)});this.ui.useCanvasForExport&&/(\.png)$/i.test(a)?this.ui.getEmbeddedPng(mxUtils.bind(this,function(a){e(this.ui.base64ToBlob(a,"image/png"))}),b,d):e(d)});this.authenticate(m,b)};
-TrelloClient.prototype.saveFile=function(a,d,c){var b=a.meta.compoundId.split(this.SEPARATOR),f=mxUtils.bind(this,function(f){this.writeFile(a.meta.name,f,b[0],function(a){Trello.del("cards/"+b[0]+"/attachments/"+b[1],mxUtils.bind(this,function(){d(a)}),mxUtils.bind(this,function(a){null!=a&&401==a.status?this.authenticate(g,c,!0):c()}))},c)}),g=mxUtils.bind(this,function(){this.ui.useCanvasForExport&&/(\.png)$/i.test(a.meta.name)?this.ui.getEmbeddedPng(mxUtils.bind(this,function(a){f(this.ui.base64ToBlob(a,
-"image/png"))}),c,this.ui.getCurrentFile()!=a?a.getData():null):f(a.getData())});this.authenticate(g,c)};
-TrelloClient.prototype.writeFile=function(a,d,c,b,f){if(null!=a&&null!=d)if(d.length>=this.maxFileSize)f({message:mxResources.get("drawingTooLarge")+" ("+this.ui.formatFileSize(d.length)+" / 10 MB)"});else{var g=mxUtils.bind(this,function(){var m=!0,e=window.setTimeout(mxUtils.bind(this,function(){m=!1;f({code:App.ERROR_TIMEOUT,retry:g})}),this.ui.timeout),k=new FormData;k.append("key",Trello.key());k.append("token",Trello.token());k.append("file","string"===typeof d?new Blob([d]):d,a);k.append("name",
-a);var l=new XMLHttpRequest;l.responseType="json";l.onreadystatechange=mxUtils.bind(this,function(){if(4===l.readyState&&(window.clearTimeout(e),m))if(200==l.status){var a=l.response;a.compoundId=c+this.SEPARATOR+a.id;b(a)}else 401==l.status?this.authenticate(g,f,!0):f()});l.open("POST",this.baseUrl+"cards/"+c+"/attachments");l.send(k)});this.authenticate(g,f)}else f({message:mxResources.get("unknownError")})};TrelloClient.prototype.pickLibrary=function(a){this.pickFile(a)};
+TrelloClient.prototype.getFile=function(a,d,c,b,g){g=null!=g?g:!1;var f=mxUtils.bind(this,function(){var b=a.split(this.SEPARATOR),e=!0,k=window.setTimeout(mxUtils.bind(this,function(){e=!1;c({code:App.ERROR_TIMEOUT,retry:f})}),this.ui.timeout);Trello.cards.get(b[0]+"/attachments/"+b[1],mxUtils.bind(this,function(b){window.clearTimeout(k);if(e){var m=/\.png$/i.test(b.name),l={Authorization:'OAuth oauth_consumer_key="'+Trello.key()+'", oauth_token="'+Trello.token()+'"'};/\.v(dx|sdx?)$/i.test(b.name)||
+/\.gliffy$/i.test(b.name)||!this.ui.useCanvasForExport&&m?this.ui.convertFile(PROXY_URL+"?url="+encodeURIComponent(b.url),b.name,b.mimeType,this.extension,d,c,null,l):(e=!0,k=window.setTimeout(mxUtils.bind(this,function(){e=!1;c({code:App.ERROR_TIMEOUT})}),this.ui.timeout),this.ui.editor.loadUrl(PROXY_URL+"?url="+encodeURIComponent(b.url),mxUtils.bind(this,function(c){window.clearTimeout(k);if(e){b.compoundId=a;if(0<(m?c.lastIndexOf(","):-1)){var f=this.ui.extractGraphModelFromPng(c);null!=f&&0<f.length&&
+(c=f)}g?d(new TrelloLibrary(this.ui,c,b)):d(new TrelloFile(this.ui,c,b))}}),mxUtils.bind(this,function(a,b){window.clearTimeout(k);e&&(401==b.status?this.authenticate(f,c,!0):c())}),m||null!=b.mimeType&&"image/"==b.mimeType.substring(0,6),null,null,null,l))}}),mxUtils.bind(this,function(a){window.clearTimeout(k);e&&(null!=a&&401==a.status?this.authenticate(f,c,!0):c())}))});this.authenticate(f,c)};TrelloClient.prototype.insertLibrary=function(a,d,c,b,g){this.insertFile(a,d,c,b,!0,g)};
+TrelloClient.prototype.insertFile=function(a,d,c,b,g,f){g=null!=g?g:!1;var m=mxUtils.bind(this,function(){var e=mxUtils.bind(this,function(e){this.writeFile(a,e,f,mxUtils.bind(this,function(a){g?c(new TrelloLibrary(this.ui,d,a)):c(new TrelloFile(this.ui,d,a))}),b)});this.ui.useCanvasForExport&&/(\.png)$/i.test(a)?this.ui.getEmbeddedPng(mxUtils.bind(this,function(a){e(this.ui.base64ToBlob(a,"image/png"))}),b,d):e(d)});this.authenticate(m,b)};
+TrelloClient.prototype.saveFile=function(a,d,c){var b=a.meta.compoundId.split(this.SEPARATOR),g=mxUtils.bind(this,function(g){this.writeFile(a.meta.name,g,b[0],function(a){Trello.del("cards/"+b[0]+"/attachments/"+b[1],mxUtils.bind(this,function(){d(a)}),mxUtils.bind(this,function(a){null!=a&&401==a.status?this.authenticate(f,c,!0):c()}))},c)}),f=mxUtils.bind(this,function(){this.ui.useCanvasForExport&&/(\.png)$/i.test(a.meta.name)?this.ui.getEmbeddedPng(mxUtils.bind(this,function(a){g(this.ui.base64ToBlob(a,
+"image/png"))}),c,this.ui.getCurrentFile()!=a?a.getData():null):g(a.getData())});this.authenticate(f,c)};
+TrelloClient.prototype.writeFile=function(a,d,c,b,g){if(null!=a&&null!=d)if(d.length>=this.maxFileSize)g({message:mxResources.get("drawingTooLarge")+" ("+this.ui.formatFileSize(d.length)+" / 10 MB)"});else{var f=mxUtils.bind(this,function(){var m=!0,e=window.setTimeout(mxUtils.bind(this,function(){m=!1;g({code:App.ERROR_TIMEOUT,retry:f})}),this.ui.timeout),k=new FormData;k.append("key",Trello.key());k.append("token",Trello.token());k.append("file","string"===typeof d?new Blob([d]):d,a);k.append("name",
+a);var l=new XMLHttpRequest;l.responseType="json";l.onreadystatechange=mxUtils.bind(this,function(){if(4===l.readyState&&(window.clearTimeout(e),m))if(200==l.status){var a=l.response;a.compoundId=c+this.SEPARATOR+a.id;b(a)}else 401==l.status?this.authenticate(f,g,!0):g()});l.open("POST",this.baseUrl+"cards/"+c+"/attachments");l.send(k)});this.authenticate(f,g)}else g({message:mxResources.get("unknownError")})};TrelloClient.prototype.pickLibrary=function(a){this.pickFile(a)};
TrelloClient.prototype.pickFolder=function(a){this.authenticate(mxUtils.bind(this,function(){this.showTrelloDialog(!1,a)}),mxUtils.bind(this,function(a){this.ui.showError(mxResources.get("error"),a)}))};TrelloClient.prototype.pickFile=function(a,d){a=null!=a?a:mxUtils.bind(this,function(a){this.ui.loadFile("T"+encodeURIComponent(a))});this.authenticate(mxUtils.bind(this,function(){this.showTrelloDialog(!0,a)}),mxUtils.bind(this,function(a){this.ui.showError(mxResources.get("error"),a,mxResources.get("ok"))}))};
-TrelloClient.prototype.showTrelloDialog=function(a,d){var c=null,b="@me",f=0,g=document.createElement("div");g.style.whiteSpace="nowrap";g.style.overflow="hidden";g.style.height="224px";var m=document.createElement("h3");mxUtils.write(m,a?mxResources.get("selectFile"):mxResources.get("selectCard"));m.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";g.appendChild(m);var e=document.createElement("div");e.style.whiteSpace="nowrap";e.style.overflow="auto";e.style.height=
-"194px";g.appendChild(e);g=new CustomDialog(this.ui,g);this.ui.showDialog(g.container,340,270,!0,!0);g.okButton.parentNode.removeChild(g.okButton);var k=mxUtils.bind(this,function(a,b,c){f++;var d=document.createElement("div");d.style="width:100%;text-overflow:ellipsis;overflow:hidden;vertical-align:middle;padding:2px 0 2px 0;background:"+(0==f%2?Editor.isDarkMode()?"#000":"#eee":Editor.isDarkMode()?"":"#fff");var e=document.createElement("a");e.style.cursor="pointer";if(null!=c){var g=document.createElement("img");
-g.src=c.url;g.width=c.width;g.height=c.height;g.style="border: 1px solid black;margin:5px;vertical-align:middle";e.appendChild(g)}mxUtils.write(e,a);mxEvent.addListener(e,"click",b);d.appendChild(e);return d}),l=mxUtils.bind(this,function(a){this.ui.handleError(a,null,mxUtils.bind(this,function(){this.ui.spinner.stop();this.ui.hideDialog()}))}),n=mxUtils.bind(this,function(){f=0;e.innerHTML="";this.ui.spinner.spin(e,mxResources.get("loading"));var a=mxUtils.bind(this,function(){Trello.cards.get(c+
+TrelloClient.prototype.showTrelloDialog=function(a,d){var c=null,b="@me",g=0,f=document.createElement("div");f.style.whiteSpace="nowrap";f.style.overflow="hidden";f.style.height="224px";var m=document.createElement("h3");mxUtils.write(m,a?mxResources.get("selectFile"):mxResources.get("selectCard"));m.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";f.appendChild(m);var e=document.createElement("div");e.style.whiteSpace="nowrap";e.style.overflow="auto";e.style.height=
+"194px";f.appendChild(e);f=new CustomDialog(this.ui,f);this.ui.showDialog(f.container,340,270,!0,!0);f.okButton.parentNode.removeChild(f.okButton);var k=mxUtils.bind(this,function(a,b,c){g++;var d=document.createElement("div");d.style="width:100%;text-overflow:ellipsis;overflow:hidden;vertical-align:middle;padding:2px 0 2px 0;background:"+(0==g%2?Editor.isDarkMode()?"#000":"#eee":Editor.isDarkMode()?"":"#fff");var e=document.createElement("a");e.style.cursor="pointer";if(null!=c){var f=document.createElement("img");
+f.src=c.url;f.width=c.width;f.height=c.height;f.style="border: 1px solid black;margin:5px;vertical-align:middle";e.appendChild(f)}mxUtils.write(e,a);mxEvent.addListener(e,"click",b);d.appendChild(e);return d}),l=mxUtils.bind(this,function(a){this.ui.handleError(a,null,mxUtils.bind(this,function(){this.ui.spinner.stop();this.ui.hideDialog()}))}),n=mxUtils.bind(this,function(){g=0;e.innerHTML="";this.ui.spinner.spin(e,mxResources.get("loading"));var a=mxUtils.bind(this,function(){Trello.cards.get(c+
"/attachments",{fields:"id,name,previews"},mxUtils.bind(this,function(a){this.ui.spinner.stop();e.appendChild(k("../ [Up]",mxUtils.bind(this,function(){u()})));mxUtils.br(e);null==a||0==a.length?mxUtils.write(e,mxResources.get("noFiles")):mxUtils.bind(this,function(){for(var b=0;b<a.length;b++)mxUtils.bind(this,function(a){e.appendChild(k(a.name,mxUtils.bind(this,function(){this.ui.hideDialog();d(c+this.SEPARATOR+a.id)}),null!=a.previews?a.previews[0]:null))})(a[b])})()}),mxUtils.bind(this,function(b){401==
-b.status?this.authenticate(a,l,!0):null!=l&&l(b)}))});a()}),p=null,q=null,u=mxUtils.bind(this,function(g){null==g&&(f=0,e.innerHTML="",g=1);this.ui.spinner.spin(e,mxResources.get("loading"));null!=p&&null!=p.parentNode&&p.parentNode.removeChild(p);p=document.createElement("a");p.style.display="block";p.style.cursor="pointer";mxUtils.write(p,mxResources.get("more")+"...");var m=mxUtils.bind(this,function(){mxEvent.removeListener(e,"scroll",q);u(g+1)});mxEvent.addListener(p,"click",m);var t=mxUtils.bind(this,
-function(){Trello.get("search",{query:""==mxUtils.trim(b)?"is:open":b,cards_limit:100,cards_page:g-1},mxUtils.bind(this,function(f){this.ui.spinner.stop();f=null!=f?f.cards:null;if(null==f||0==f.length)mxUtils.write(e,mxResources.get("noFiles"));else{1==g&&(e.appendChild(k(mxResources.get("filterCards")+"...",mxUtils.bind(this,function(){var a=new FilenameDialog(this.ui,b,mxResources.get("ok"),mxUtils.bind(this,function(a){null!=a&&(b=a,u())}),mxResources.get("filterCards"),null,null,"http://help.trello.com/article/808-searching-for-cards-all-boards");
-this.ui.showDialog(a.container,300,80,!0,!1);a.init()}))),mxUtils.br(e));for(var l=0;l<f.length;l++)mxUtils.bind(this,function(b){e.appendChild(k(b.name,mxUtils.bind(this,function(){a?(c=b.id,n()):(this.ui.hideDialog(),d(b.id))})))})(f[l]);100==f.length&&(e.appendChild(p),q=function(){e.scrollTop>=e.scrollHeight-e.offsetHeight&&m()},mxEvent.addListener(e,"scroll",q))}}),mxUtils.bind(this,function(a){401==a.status?this.authenticate(t,l,!0):null!=l&&l({message:a.responseText})}))});t()});u()};
+b.status?this.authenticate(a,l,!0):null!=l&&l(b)}))});a()}),p=null,q=null,u=mxUtils.bind(this,function(f){null==f&&(g=0,e.innerHTML="",f=1);this.ui.spinner.spin(e,mxResources.get("loading"));null!=p&&null!=p.parentNode&&p.parentNode.removeChild(p);p=document.createElement("a");p.style.display="block";p.style.cursor="pointer";mxUtils.write(p,mxResources.get("more")+"...");var m=mxUtils.bind(this,function(){mxEvent.removeListener(e,"scroll",q);u(f+1)});mxEvent.addListener(p,"click",m);var t=mxUtils.bind(this,
+function(){Trello.get("search",{query:""==mxUtils.trim(b)?"is:open":b,cards_limit:100,cards_page:f-1},mxUtils.bind(this,function(g){this.ui.spinner.stop();g=null!=g?g.cards:null;if(null==g||0==g.length)mxUtils.write(e,mxResources.get("noFiles"));else{1==f&&(e.appendChild(k(mxResources.get("filterCards")+"...",mxUtils.bind(this,function(){var a=new FilenameDialog(this.ui,b,mxResources.get("ok"),mxUtils.bind(this,function(a){null!=a&&(b=a,u())}),mxResources.get("filterCards"),null,null,"http://help.trello.com/article/808-searching-for-cards-all-boards");
+this.ui.showDialog(a.container,300,80,!0,!1);a.init()}))),mxUtils.br(e));for(var l=0;l<g.length;l++)mxUtils.bind(this,function(b){e.appendChild(k(b.name,mxUtils.bind(this,function(){a?(c=b.id,n()):(this.ui.hideDialog(),d(b.id))})))})(g[l]);100==g.length&&(e.appendChild(p),q=function(){e.scrollTop>=e.scrollHeight-e.offsetHeight&&m()},mxEvent.addListener(e,"scroll",q))}}),mxUtils.bind(this,function(a){401==a.status?this.authenticate(t,l,!0):null!=l&&l({message:a.responseText})}))});t()});u()};
TrelloClient.prototype.isAuthorized=function(){try{return null!=localStorage.trello_token}catch(a){}return!1};TrelloClient.prototype.logout=function(){localStorage.removeItem("trello_token");Trello.deauthorize()};GitLabFile=function(a,d,c){GitHubFile.call(this,a,d,c);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(a){return null!=a&&400==a.status};GitLabFile.prototype.getMode=function(){return App.MODE_GITLAB};GitLabFile.prototype.getDescriptorEtag=function(a){return a.last_commit_id};
GitLabFile.prototype.setDescriptorEtag=function(a,d){a.last_commit_id=d};GitLabLibrary=function(a,d,c){GitLabFile.call(this,a,d,c)};mxUtils.extend(GitLabLibrary,GitLabFile);GitLabLibrary.prototype.doSave=function(a,d,c){this.saveFile(a,!1,d,c)};GitLabLibrary.prototype.open=function(){};(function(){var a=null;window.GitLabClient=function(a){GitHubClient.call(this,a,"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(a,c){(new mxXmlRequest(this.redirectUri+"?getState=1",null,"GET")).send(mxUtils.bind(this,function(b){200<=b.getStatus()&&299>=b.getStatus()?this.authenticateStep2(b.getText(),a,c):null!=c&&c(b)}),c)};GitLabClient.prototype.authenticateStep2=function(d,c,b){if(null==window.onGitLabCallback){var f=mxUtils.bind(this,function(){var g=!0;null!=this.getPersistentToken(!0)?(new mxXmlRequest(this.redirectUri+"?state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.hostname+"&token="+
-d),null,"GET")).send(mxUtils.bind(this,function(d){200<=d.getStatus()&&299>=d.getStatus()?(a=JSON.parse(d.getText()).access_token,this.setToken(a),this.setUser(null),c()):(this.clearPersistentToken(),this.setUser(null),a=null,this.setToken(null),401==d.getStatus()?f():b({message:mxResources.get("accessDenied"),retry:f}))}),b):this.ui.showAuthDialog(this,!0,mxUtils.bind(this,function(m,e){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(d,l){g?(window.onGitLabCallback=null,g=!1,null==d?b({message:mxResources.get("accessDenied"),retry:f}):(null!=e&&e(),a=d.access_token,this.setToken(a),this.setUser(null),m&&this.setPersistentToken("remembered"),c(),null!=l&&l.close())):null!=l&&l.close()}):b({message:mxResources.get("serviceUnavailableOrBlocked"),
-retry:f})}),mxUtils.bind(this,function(){g&&(window.onGitLabCallback=null,g=!1,b({message:mxResources.get("accessDenied"),retry:f}))}))});f()}else b({code:App.ERROR_BUSY})};GitLabClient.prototype.executeRequest=function(d,c,b,f){var g=mxUtils.bind(this,function(e){var k=!0,l=window.setTimeout(mxUtils.bind(this,function(){k=!1;b({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.ui.timeout),n=this.authToken+" "+a;d.setRequestHeaders=function(a,b){a.setRequestHeader("Authorization",
-n);a.setRequestHeader("PRIVATE_TOKEN",n);a.setRequestHeader("Content-Type","application/json")};d.send(mxUtils.bind(this,function(){window.clearTimeout(l);if(k)if(200<=d.getStatus()&&299>=d.getStatus()||f&&404==d.getStatus())c(d);else if(401===d.getStatus())e?b({message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,function(){this.authenticate(function(){m(!0)},b)})}):this.authenticate(function(){g(!0)},b);else if(403===d.getStatus()){var a=!1;try{var n=JSON.parse(d.getText());null!=n&&
+function(a,c){(new mxXmlRequest(this.redirectUri+"?getState=1",null,"GET")).send(mxUtils.bind(this,function(b){200<=b.getStatus()&&299>=b.getStatus()?this.authenticateStep2(b.getText(),a,c):null!=c&&c(b)}),c)};GitLabClient.prototype.authenticateStep2=function(d,c,b){if(null==window.onGitLabCallback){var g=mxUtils.bind(this,function(){var f=!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(d){200<=d.getStatus()&&299>=d.getStatus()?(a=JSON.parse(d.getText()).access_token,this.setToken(a),this.setUser(null),c()):(this.clearPersistentToken(),this.setUser(null),a=null,this.setToken(null),401==d.getStatus()?g():b({message:mxResources.get("accessDenied"),retry:g}))}),b):this.ui.showAuthDialog(this,!0,mxUtils.bind(this,function(m,e){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(d,l){f?(window.onGitLabCallback=null,f=!1,null==d?b({message:mxResources.get("accessDenied"),retry:g}):(null!=e&&e(),a=d.access_token,this.setToken(a),this.setUser(null),m&&this.setPersistentToken("remembered"),c(),null!=l&&l.close())):null!=l&&l.close()}):b({message:mxResources.get("serviceUnavailableOrBlocked"),
+retry:g})}),mxUtils.bind(this,function(){f&&(window.onGitLabCallback=null,f=!1,b({message:mxResources.get("accessDenied"),retry:g}))}))});g()}else b({code:App.ERROR_BUSY})};GitLabClient.prototype.executeRequest=function(d,c,b,g){var f=mxUtils.bind(this,function(e){var k=!0,l=window.setTimeout(mxUtils.bind(this,function(){k=!1;b({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.ui.timeout),n=this.authToken+" "+a;d.setRequestHeaders=function(a,b){a.setRequestHeader("Authorization",
+n);a.setRequestHeader("PRIVATE_TOKEN",n);a.setRequestHeader("Content-Type","application/json")};d.send(mxUtils.bind(this,function(){window.clearTimeout(l);if(k)if(200<=d.getStatus()&&299>=d.getStatus()||g&&404==d.getStatus())c(d);else if(401===d.getStatus())e?b({message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,function(){this.authenticate(function(){m(!0)},b)})}):this.authenticate(function(){f(!0)},b);else if(403===d.getStatus()){var a=!1;try{var n=JSON.parse(d.getText());null!=n&&
null!=n.errors&&0<n.errors.length&&(a="too_large"==n.errors[0].code)}catch(u){}b({message:mxResources.get(a?"drawingTooLarge":"forbidden")})}else 404===d.getStatus()?b({message:this.getErrorMessage(d,mxResources.get("fileNotFound"))}):400===d.getStatus()?b({status:400}):b({status:d.getStatus(),message:this.getErrorMessage(d,mxResources.get("error")+" "+d.getStatus())})}),mxUtils.bind(this,function(a){window.clearTimeout(l);k&&b(a)}))}),m=mxUtils.bind(this,function(a){null==this.user?this.updateUser(function(){m(!0)},
-b,a):g(a)});null==a?this.authenticate(function(){m(!0)},b):m(!1)};GitLabClient.prototype.getRefIndex=function(a,c,b,f,g,m){if(null!=g)b(a,g);else{var d=a.length-2,k=mxUtils.bind(this,function(){if(2>d)f({message:mxResources.get("fileNotFound")});else{var e=Math.max(d-1,0),g=a.slice(0,e).join("/"),e=a[e],p=a[d],q=a.slice(d+1,a.length).join("/"),g=this.baseUrl+"/projects/"+encodeURIComponent(g+"/"+e)+"/repository/"+(c?m?"branches?per_page=1&page=1&ref="+p:"tree?path="+q+"&ref="+p:"files/"+encodeURIComponent(q)+
-"?ref="+p),u=new mxXmlRequest(g,null,"HEAD");this.executeRequest(u,mxUtils.bind(this,function(){200==u.getStatus()?b(a,d):f({message:mxResources.get("fileNotFound")})}),mxUtils.bind(this,function(){404==u.getStatus()?(d--,k()):f({message:mxResources.get("fileNotFound")})}))}});k()}};GitLabClient.prototype.getFile=function(d,c,b,f,g,m){f=null!=f?f:!1;this.getRefIndex(d.split("/"),!1,mxUtils.bind(this,function(e,k){var m=Math.max(k-1,0),n=e.slice(0,m).join("/"),p=e[m],q=e[k];d=e.slice(k+1,e.length).join("/");
-m=/\.png$/i.test(d);if(!g&&(/\.v(dx|sdx?)$/i.test(d)||/\.gliffy$/i.test(d)||/\.pdf$/i.test(d)||!this.ui.useCanvasForExport&&m))if(null!=a){var m="&t="+(new Date).getTime(),u=this.baseUrl+"/projects/"+encodeURIComponent(n+"/"+p)+"/repository/files/"+encodeURIComponent(d)+"?ref="+q;e=d.split("/");this.ui.convertFile(u+m,0<e.length?e[e.length-1]:d,null,this.extension,c,b,mxUtils.bind(this,function(a,b,c){a=new mxXmlRequest(a,null,"GET");this.executeRequest(a,mxUtils.bind(this,function(a){try{b(this.getFileContent(JSON.parse(a.getText())))}catch(x){c(x)}}),
-c)}))}else b({message:mxResources.get("accessDenied")});else m="&t="+(new Date).getTime(),u=this.baseUrl+"/projects/"+encodeURIComponent(n+"/"+p)+"/repository/files/"+encodeURIComponent(d)+"?ref="+q,m=new mxXmlRequest(u+m,null,"GET"),this.executeRequest(m,mxUtils.bind(this,function(a){try{c(this.createGitLabFile(n,p,q,JSON.parse(a.getText()),f,k))}catch(v){b(v)}}),b)}),b,m)};GitLabClient.prototype.getFileContent=function(a){var c=a.file_name,b=a.content;"base64"===a.encoding&&(/\.jpe?g$/i.test(c)?
-b="data:image/jpeg;base64,"+b:/\.gif$/i.test(c)?b="data:image/gif;base64,"+b:/\.pdf$/i.test(c)?b="data:application/pdf;base64,"+b:/\.png$/i.test(c)?(a=this.ui.extractGraphModelFromPng(b),b=null!=a&&0<a.length?a:"data:image/png;base64,"+b):b=Base64.decode(b));return b};GitLabClient.prototype.createGitLabFile=function(a,c,b,f,g,m){var d=DRAWIO_GITLAB_URL+"/";a={org:a,repo:c,ref:b,name:f.file_name,path:f.file_path,html_url:d+a+"/"+c+"/blob/"+b+"/"+f.file_path,download_url:d+a+"/"+c+"/raw/"+b+"/"+f.file_path+
-"?inline=false",last_commit_id:f.last_commit_id,refPos:m};f=this.getFileContent(f);return g?new GitLabLibrary(this.ui,f,a):new GitLabFile(this.ui,f,a)};GitLabClient.prototype.insertFile=function(a,c,b,f,g,m,e){g=null!=g?g:!1;m=m.split("/");this.getRefIndex(m,!0,mxUtils.bind(this,function(d,m){var k=Math.max(m-1,0),l=d.slice(0,k).join("/"),q=d[k],u=d[m];path=d.slice(m+1,d.length).join("/");0<path.length&&(path+="/");path+=a;this.checkExists(l+"/"+q+"/"+u+"/"+path,!0,mxUtils.bind(this,function(d,k){if(d)if(g)e||
-(c=Base64.encode(c)),this.showCommitDialog(a,!0,mxUtils.bind(this,function(a){this.writeFile(l,q,u,path,a,c,k,mxUtils.bind(this,function(a){try{var c=JSON.parse(a.getText());b(this.createGitLabFile(l,q,u,c.content,g,m))}catch(B){f(B)}}),f)}),f);else{var n=DRAWIO_GITLAB_URL+"/";b(new GitLabFile(this.ui,c,{org:l,repo:q,ref:u,name:a,path:path,html_url:n+l+"/"+q+"/blob/"+u+"/"+path,download_url:n+l+"/"+q+"/raw/"+u+"/"+path+"?inline=false",refPos:m,last_commit_id:k,isNew:!0}))}else f()}))}),f,null,4>=
-m.length)};GitLabClient.prototype.checkExists=function(a,c,b){this.getFile(a,mxUtils.bind(this,function(d){if(c){var f=this.ui.spinner.pause();this.ui.confirm(mxResources.get("replaceIt",[a]),function(){f();b(!0,d.getCurrentEtag())},function(){f();b(!1)})}else this.ui.spinner.stop(),this.ui.showError(mxResources.get("error"),mxResources.get("fileExists"),mxResources.get("ok"),function(){b(!1)})}),mxUtils.bind(this,function(a){b(!0)}),null,!0)};GitLabClient.prototype.writeFile=function(a,c,b,f,g,m,
-e,k,l){if(m.length>=this.maxFileSize)l({message:mxResources.get("drawingTooLarge")+" ("+this.ui.formatFileSize(m.length)+" / 10 MB)"});else{var d="POST";b={path:encodeURIComponent(f),branch:decodeURIComponent(b),commit_message:g,content:m,encoding:"base64"};null!=e&&(b.last_commit_id=e,d="PUT");a=this.baseUrl+"/projects/"+encodeURIComponent(a+"/"+c)+"/repository/files/"+encodeURIComponent(f);d=new mxXmlRequest(a,JSON.stringify(b),d);this.executeRequest(d,mxUtils.bind(this,function(a){k(a)}),l)}};
-GitLabClient.prototype.saveFile=function(a,c,b,f,g){var d=a.meta.org,e=a.meta.repo,k=a.meta.ref,l=a.meta.path,n=mxUtils.bind(this,function(f,m){this.writeFile(d,e,k,l,g,m,f,mxUtils.bind(this,function(f){delete a.meta.isNew;this.getFile(d+"/"+e+"/"+k+"/"+l,mxUtils.bind(this,function(b){b.getData()==a.getData()?c(b.getCurrentEtag()):c({content:a.getCurrentEtag()})}),b,null,null,a.meta.refPos)}),b)}),p=mxUtils.bind(this,function(){if(this.ui.useCanvasForExport&&/(\.png)$/i.test(l)){var c=this.ui.getPngFileProperties(this.ui.fileNode);
-this.ui.getEmbeddedPng(mxUtils.bind(this,function(b){n(a.meta.last_commit_id,b)}),b,this.ui.getCurrentFile()!=a?a.getData():null,c.scale,c.border)}else n(a.meta.last_commit_id,Base64.encode(a.getData()))});f?this.getFile(d+"/"+e+"/"+k+"/"+l,mxUtils.bind(this,function(b){a.meta.last_commit_id=b.meta.last_commit_id;p()}),b):p()};GitLabClient.prototype.pickFolder=function(a){this.showGitLabDialog(!1,a)};GitLabClient.prototype.pickFile=function(a){a=null!=a?a:mxUtils.bind(this,function(a){this.ui.loadFile("A"+
-encodeURIComponent(a))});this.showGitLabDialog(!0,a)};GitLabClient.prototype.showGitLabDialog=function(d,c){var b=null,f=null,g=null,m=null,e=document.createElement("div");e.style.whiteSpace="nowrap";e.style.overflow="hidden";e.style.height="304px";var k=document.createElement("h3");mxUtils.write(k,mxResources.get(d?"selectFile":"selectFolder"));k.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";e.appendChild(k);var l=document.createElement("div");l.style.whiteSpace=
-"nowrap";l.style.border="1px solid lightgray";l.style.boxSizing="border-box";l.style.padding="4px";l.style.overflow="auto";l.style.lineHeight="1.2em";l.style.height="274px";e.appendChild(l);var n=document.createElement("div");n.style.textOverflow="ellipsis";n.style.boxSizing="border-box";n.style.overflow="hidden";n.style.padding="4px";n.style.width="100%";var p=new CustomDialog(this.ui,e,mxUtils.bind(this,function(){c(b+"/"+f+"/"+encodeURIComponent(g)+"/"+m)}));this.ui.showDialog(p.container,420,
-360,!0,!0);d&&p.okButton.parentNode.removeChild(p.okButton);var q=mxUtils.bind(this,function(a,b,c,d){var e=document.createElement("a");e.setAttribute("title",a);e.style.cursor="pointer";mxUtils.write(e,a);mxEvent.addListener(e,"click",b);d&&(e.style.textDecoration="underline");null!=c&&(a=n.cloneNode(),a.style.padding=c,a.appendChild(e),e=a);return e}),u=mxUtils.bind(this,function(a){var c=document.createElement("div");c.style.marginBottom="8px";c.appendChild(q(b+"/"+f,mxUtils.bind(this,function(){m=
-null;A()}),null,!0));a||(mxUtils.write(c," / "),c.appendChild(q(decodeURIComponent(g),mxUtils.bind(this,function(){m=null;x()}),null,!0)));if(null!=m&&0<m.length){var d=m.split("/");for(a=0;a<d.length;a++)(function(a){mxUtils.write(c," / ");c.appendChild(q(d[a],mxUtils.bind(this,function(){m=d.slice(0,a+1).join("/");y()}),null,!0))})(a)}l.appendChild(c)}),t=mxUtils.bind(this,function(a){this.ui.handleError(a,null,mxUtils.bind(this,function(){this.ui.spinner.stop();null!=this.getUser()?(m=g=f=b=null,
-A()):this.ui.hideDialog()}))}),v=null,z=null,y=mxUtils.bind(this,function(a){null==a&&(l.innerHTML="",a=1);var e=new mxXmlRequest(this.baseUrl+"/projects/"+encodeURIComponent(b+"/"+f)+"/repository/tree?path="+m+"&ref="+g+"&per_page=100&page="+a,null,"GET");this.ui.spinner.spin(l,mxResources.get("loading"));p.okButton.removeAttribute("disabled");null!=z&&(mxEvent.removeListener(l,"scroll",z),z=null);null!=v&&null!=v.parentNode&&v.parentNode.removeChild(v);v=document.createElement("a");v.style.display=
-"block";v.style.cursor="pointer";mxUtils.write(v,mxResources.get("more")+"...");var k=mxUtils.bind(this,function(){y(a+1)});mxEvent.addListener(v,"click",k);this.executeRequest(e,mxUtils.bind(this,function(e){this.ui.spinner.stop();1==a&&(u(!g),l.appendChild(q("../ [Up]",mxUtils.bind(this,function(){if(""==m)m=null,A();else{var a=m.split("/");m=a.slice(0,a.length-1).join("/");y()}}),"4px")));var x=JSON.parse(e.getText());if(null==x||0==x.length)mxUtils.write(l,mxResources.get("noFiles"));else{var p=
+b,a):f(a)});null==a?this.authenticate(function(){m(!0)},b):m(!1)};GitLabClient.prototype.getRefIndex=function(a,c,b,g,f,m){if(null!=f)b(a,f);else{var d=a.length-2,k=mxUtils.bind(this,function(){if(2>d)g({message:mxResources.get("fileNotFound")});else{var e=Math.max(d-1,0),f=a.slice(0,e).join("/"),e=a[e],p=a[d],q=a.slice(d+1,a.length).join("/"),f=this.baseUrl+"/projects/"+encodeURIComponent(f+"/"+e)+"/repository/"+(c?m?"branches?per_page=1&page=1&ref="+p:"tree?path="+q+"&ref="+p:"files/"+encodeURIComponent(q)+
+"?ref="+p),u=new mxXmlRequest(f,null,"HEAD");this.executeRequest(u,mxUtils.bind(this,function(){200==u.getStatus()?b(a,d):g({message:mxResources.get("fileNotFound")})}),mxUtils.bind(this,function(){404==u.getStatus()?(d--,k()):g({message:mxResources.get("fileNotFound")})}))}});k()}};GitLabClient.prototype.getFile=function(d,c,b,g,f,m){g=null!=g?g:!1;this.getRefIndex(d.split("/"),!1,mxUtils.bind(this,function(e,k){var m=Math.max(k-1,0),n=e.slice(0,m).join("/"),p=e[m],q=e[k];d=e.slice(k+1,e.length).join("/");
+m=/\.png$/i.test(d);if(!f&&(/\.v(dx|sdx?)$/i.test(d)||/\.gliffy$/i.test(d)||/\.pdf$/i.test(d)||!this.ui.useCanvasForExport&&m))if(null!=a){var m="&t="+(new Date).getTime(),u=this.baseUrl+"/projects/"+encodeURIComponent(n+"/"+p)+"/repository/files/"+encodeURIComponent(d)+"?ref="+q;e=d.split("/");this.ui.convertFile(u+m,0<e.length?e[e.length-1]:d,null,this.extension,c,b,mxUtils.bind(this,function(a,b,c){a=new mxXmlRequest(a,null,"GET");this.executeRequest(a,mxUtils.bind(this,function(a){try{b(this.getFileContent(JSON.parse(a.getText())))}catch(x){c(x)}}),
+c)}))}else b({message:mxResources.get("accessDenied")});else m="&t="+(new Date).getTime(),u=this.baseUrl+"/projects/"+encodeURIComponent(n+"/"+p)+"/repository/files/"+encodeURIComponent(d)+"?ref="+q,m=new mxXmlRequest(u+m,null,"GET"),this.executeRequest(m,mxUtils.bind(this,function(a){try{c(this.createGitLabFile(n,p,q,JSON.parse(a.getText()),g,k))}catch(v){b(v)}}),b)}),b,m)};GitLabClient.prototype.getFileContent=function(a){var c=a.file_name,b=a.content;"base64"===a.encoding&&(/\.jpe?g$/i.test(c)?
+b="data:image/jpeg;base64,"+b:/\.gif$/i.test(c)?b="data:image/gif;base64,"+b:/\.pdf$/i.test(c)?b="data:application/pdf;base64,"+b:/\.png$/i.test(c)?(a=this.ui.extractGraphModelFromPng(b),b=null!=a&&0<a.length?a:"data:image/png;base64,"+b):b=Base64.decode(b));return b};GitLabClient.prototype.createGitLabFile=function(a,c,b,g,f,m){var d=DRAWIO_GITLAB_URL+"/";a={org:a,repo:c,ref:b,name:g.file_name,path:g.file_path,html_url:d+a+"/"+c+"/blob/"+b+"/"+g.file_path,download_url:d+a+"/"+c+"/raw/"+b+"/"+g.file_path+
+"?inline=false",last_commit_id:g.last_commit_id,refPos:m};g=this.getFileContent(g);return f?new GitLabLibrary(this.ui,g,a):new GitLabFile(this.ui,g,a)};GitLabClient.prototype.insertFile=function(a,c,b,g,f,m,e){f=null!=f?f:!1;m=m.split("/");this.getRefIndex(m,!0,mxUtils.bind(this,function(d,m){var k=Math.max(m-1,0),l=d.slice(0,k).join("/"),q=d[k],u=d[m];path=d.slice(m+1,d.length).join("/");0<path.length&&(path+="/");path+=a;this.checkExists(l+"/"+q+"/"+u+"/"+path,!0,mxUtils.bind(this,function(d,k){if(d)if(f)e||
+(c=Base64.encode(c)),this.showCommitDialog(a,!0,mxUtils.bind(this,function(a){this.writeFile(l,q,u,path,a,c,k,mxUtils.bind(this,function(a){try{var c=JSON.parse(a.getText());b(this.createGitLabFile(l,q,u,c.content,f,m))}catch(B){g(B)}}),g)}),g);else{var n=DRAWIO_GITLAB_URL+"/";b(new GitLabFile(this.ui,c,{org:l,repo:q,ref:u,name:a,path:path,html_url:n+l+"/"+q+"/blob/"+u+"/"+path,download_url:n+l+"/"+q+"/raw/"+u+"/"+path+"?inline=false",refPos:m,last_commit_id:k,isNew:!0}))}else g()}))}),g,null,4>=
+m.length)};GitLabClient.prototype.checkExists=function(a,c,b){this.getFile(a,mxUtils.bind(this,function(d){if(c){var f=this.ui.spinner.pause();this.ui.confirm(mxResources.get("replaceIt",[a]),function(){f();b(!0,d.getCurrentEtag())},function(){f();b(!1)})}else this.ui.spinner.stop(),this.ui.showError(mxResources.get("error"),mxResources.get("fileExists"),mxResources.get("ok"),function(){b(!1)})}),mxUtils.bind(this,function(a){b(!0)}),null,!0)};GitLabClient.prototype.writeFile=function(a,c,b,g,f,m,
+e,k,l){if(m.length>=this.maxFileSize)l({message:mxResources.get("drawingTooLarge")+" ("+this.ui.formatFileSize(m.length)+" / 10 MB)"});else{var d="POST";b={path:encodeURIComponent(g),branch:decodeURIComponent(b),commit_message:f,content:m,encoding:"base64"};null!=e&&(b.last_commit_id=e,d="PUT");a=this.baseUrl+"/projects/"+encodeURIComponent(a+"/"+c)+"/repository/files/"+encodeURIComponent(g);d=new mxXmlRequest(a,JSON.stringify(b),d);this.executeRequest(d,mxUtils.bind(this,function(a){k(a)}),l)}};
+GitLabClient.prototype.saveFile=function(a,c,b,g,f){var d=a.meta.org,e=a.meta.repo,k=a.meta.ref,l=a.meta.path,n=mxUtils.bind(this,function(g,m){this.writeFile(d,e,k,l,f,m,g,mxUtils.bind(this,function(f){delete a.meta.isNew;this.getFile(d+"/"+e+"/"+k+"/"+l,mxUtils.bind(this,function(b){b.getData()==a.getData()?c(b.getCurrentEtag()):c({content:a.getCurrentEtag()})}),b,null,null,a.meta.refPos)}),b)}),p=mxUtils.bind(this,function(){if(this.ui.useCanvasForExport&&/(\.png)$/i.test(l)){var c=this.ui.getPngFileProperties(this.ui.fileNode);
+this.ui.getEmbeddedPng(mxUtils.bind(this,function(b){n(a.meta.last_commit_id,b)}),b,this.ui.getCurrentFile()!=a?a.getData():null,c.scale,c.border)}else n(a.meta.last_commit_id,Base64.encode(a.getData()))});g?this.getFile(d+"/"+e+"/"+k+"/"+l,mxUtils.bind(this,function(b){a.meta.last_commit_id=b.meta.last_commit_id;p()}),b):p()};GitLabClient.prototype.pickFolder=function(a){this.showGitLabDialog(!1,a)};GitLabClient.prototype.pickFile=function(a){a=null!=a?a:mxUtils.bind(this,function(a){this.ui.loadFile("A"+
+encodeURIComponent(a))});this.showGitLabDialog(!0,a)};GitLabClient.prototype.showGitLabDialog=function(d,c){var b=null,g=null,f=null,m=null,e=document.createElement("div");e.style.whiteSpace="nowrap";e.style.overflow="hidden";e.style.height="304px";var k=document.createElement("h3");mxUtils.write(k,mxResources.get(d?"selectFile":"selectFolder"));k.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";e.appendChild(k);var l=document.createElement("div");l.style.whiteSpace=
+"nowrap";l.style.border="1px solid lightgray";l.style.boxSizing="border-box";l.style.padding="4px";l.style.overflow="auto";l.style.lineHeight="1.2em";l.style.height="274px";e.appendChild(l);var n=document.createElement("div");n.style.textOverflow="ellipsis";n.style.boxSizing="border-box";n.style.overflow="hidden";n.style.padding="4px";n.style.width="100%";var p=new CustomDialog(this.ui,e,mxUtils.bind(this,function(){c(b+"/"+g+"/"+encodeURIComponent(f)+"/"+m)}));this.ui.showDialog(p.container,420,
+360,!0,!0);d&&p.okButton.parentNode.removeChild(p.okButton);var q=mxUtils.bind(this,function(a,b,c,d){var e=document.createElement("a");e.setAttribute("title",a);e.style.cursor="pointer";mxUtils.write(e,a);mxEvent.addListener(e,"click",b);d&&(e.style.textDecoration="underline");null!=c&&(a=n.cloneNode(),a.style.padding=c,a.appendChild(e),e=a);return e}),u=mxUtils.bind(this,function(a){var c=document.createElement("div");c.style.marginBottom="8px";c.appendChild(q(b+"/"+g,mxUtils.bind(this,function(){m=
+null;A()}),null,!0));a||(mxUtils.write(c," / "),c.appendChild(q(decodeURIComponent(f),mxUtils.bind(this,function(){m=null;x()}),null,!0)));if(null!=m&&0<m.length){var d=m.split("/");for(a=0;a<d.length;a++)(function(a){mxUtils.write(c," / ");c.appendChild(q(d[a],mxUtils.bind(this,function(){m=d.slice(0,a+1).join("/");y()}),null,!0))})(a)}l.appendChild(c)}),t=mxUtils.bind(this,function(a){this.ui.handleError(a,null,mxUtils.bind(this,function(){this.ui.spinner.stop();null!=this.getUser()?(m=f=g=b=null,
+A()):this.ui.hideDialog()}))}),v=null,z=null,y=mxUtils.bind(this,function(a){null==a&&(l.innerHTML="",a=1);var e=new mxXmlRequest(this.baseUrl+"/projects/"+encodeURIComponent(b+"/"+g)+"/repository/tree?path="+m+"&ref="+f+"&per_page=100&page="+a,null,"GET");this.ui.spinner.spin(l,mxResources.get("loading"));p.okButton.removeAttribute("disabled");null!=z&&(mxEvent.removeListener(l,"scroll",z),z=null);null!=v&&null!=v.parentNode&&v.parentNode.removeChild(v);v=document.createElement("a");v.style.display=
+"block";v.style.cursor="pointer";mxUtils.write(v,mxResources.get("more")+"...");var k=mxUtils.bind(this,function(){y(a+1)});mxEvent.addListener(v,"click",k);this.executeRequest(e,mxUtils.bind(this,function(e){this.ui.spinner.stop();1==a&&(u(!f),l.appendChild(q("../ [Up]",mxUtils.bind(this,function(){if(""==m)m=null,A();else{var a=m.split("/");m=a.slice(0,a.length-1).join("/");y()}}),"4px")));var x=JSON.parse(e.getText());if(null==x||0==x.length)mxUtils.write(l,mxResources.get("noFiles"));else{var p=
!0,t=0;e=mxUtils.bind(this,function(a){for(var e=0;e<x.length;e++)mxUtils.bind(this,function(e){if(a==("tree"==e.type)){var k=n.cloneNode();k.style.backgroundColor=p?Editor.isDarkMode()?"#000000":"#eeeeee":"";p=!p;var x=document.createElement("img");x.src=IMAGE_PATH+"/"+("tree"==e.type?"folder.png":"file.png");x.setAttribute("align","absmiddle");x.style.marginRight="4px";x.style.marginTop="-4px";x.width=20;k.appendChild(x);k.appendChild(q(e.name+("tree"==e.type?"/":""),mxUtils.bind(this,function(){"tree"==
-e.type?(m=e.path,y()):d&&"blob"==e.type&&(this.ui.hideDialog(),c(b+"/"+f+"/"+g+"/"+e.path))})));l.appendChild(k);t++}})(x[e])});e(!0);d&&e(!1);100==t&&(l.appendChild(v),z=function(){l.scrollTop>=l.scrollHeight-l.offsetHeight&&k()},mxEvent.addListener(l,"scroll",z))}}),t,!0)}),x=mxUtils.bind(this,function(a,c){null==a&&(l.innerHTML="",a=1);var d=new mxXmlRequest(this.baseUrl+"/projects/"+encodeURIComponent(b+"/"+f)+"/repository/branches?per_page=100&page="+a,null,"GET");p.okButton.setAttribute("disabled",
+e.type?(m=e.path,y()):d&&"blob"==e.type&&(this.ui.hideDialog(),c(b+"/"+g+"/"+f+"/"+e.path))})));l.appendChild(k);t++}})(x[e])});e(!0);d&&e(!1);100==t&&(l.appendChild(v),z=function(){l.scrollTop>=l.scrollHeight-l.offsetHeight&&k()},mxEvent.addListener(l,"scroll",z))}}),t,!0)}),x=mxUtils.bind(this,function(a,c){null==a&&(l.innerHTML="",a=1);var d=new mxXmlRequest(this.baseUrl+"/projects/"+encodeURIComponent(b+"/"+g)+"/repository/branches?per_page=100&page="+a,null,"GET");p.okButton.setAttribute("disabled",
"disabled");this.ui.spinner.spin(l,mxResources.get("loading"));null!=z&&(mxEvent.removeListener(l,"scroll",z),z=null);null!=v&&null!=v.parentNode&&v.parentNode.removeChild(v);v=document.createElement("a");v.style.display="block";v.style.cursor="pointer";mxUtils.write(v,mxResources.get("more")+"...");var e=mxUtils.bind(this,function(){x(a+1)});mxEvent.addListener(v,"click",e);this.executeRequest(d,mxUtils.bind(this,function(b){this.ui.spinner.stop();1==a&&(u(!0),l.appendChild(q("../ [Up]",mxUtils.bind(this,
-function(){m=null;A()}),"4px")));b=JSON.parse(b.getText());if(null==b||0==b.length)mxUtils.write(l,mxResources.get("noFiles"));else if(1==b.length&&c)g=b[0].name,m="",y();else{for(var d=0;d<b.length;d++)mxUtils.bind(this,function(a,b){var c=n.cloneNode();c.style.backgroundColor=0==b%2?Editor.isDarkMode()?"#000000":"#eeeeee":"";c.appendChild(q(a.name,mxUtils.bind(this,function(){g=encodeURIComponent(a.name);m="";y()})));l.appendChild(c)})(b[d],d);100==b.length&&(l.appendChild(v),z=function(){l.scrollTop>=
+function(){m=null;A()}),"4px")));b=JSON.parse(b.getText());if(null==b||0==b.length)mxUtils.write(l,mxResources.get("noFiles"));else if(1==b.length&&c)f=b[0].name,m="",y();else{for(var d=0;d<b.length;d++)mxUtils.bind(this,function(a,b){var c=n.cloneNode();c.style.backgroundColor=0==b%2?Editor.isDarkMode()?"#000000":"#eeeeee":"";c.appendChild(q(a.name,mxUtils.bind(this,function(){f=encodeURIComponent(a.name);m="";y()})));l.appendChild(c)})(b[d],d);100==b.length&&(l.appendChild(v),z=function(){l.scrollTop>=
l.scrollHeight-l.offsetHeight&&e()},mxEvent.addListener(l,"scroll",z))}}),t)});p.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(l,mxResources.get("loading"));var A=mxUtils.bind(this,function(a){var c=this.ui.spinner,d=0;this.ui.spinner.stop();var e=function(){c.spin(l,mxResources.get("loading"));d+=1},k=function(){--d;0===d&&c.stop()};null==a&&(l.innerHTML="",a=1);null!=z&&(mxEvent.removeListener(l,"scroll",z),z=null);null!=v&&null!=v.parentNode&&v.parentNode.removeChild(v);v=document.createElement("a");
v.style.display="block";v.style.cursor="pointer";mxUtils.write(v,mxResources.get("more")+"...");var p=mxUtils.bind(this,function(){0===d&&A(a+1)});mxEvent.addListener(v,"click",p);var u=mxUtils.bind(this,function(a){e();var b=new mxXmlRequest(this.baseUrl+"/groups?per_page=100",null,"GET");this.executeRequest(b,mxUtils.bind(this,function(b){a(JSON.parse(b.getText()));k()}),t)}),B=mxUtils.bind(this,function(a,b){e();var c=new mxXmlRequest(this.baseUrl+"/groups/"+a.id+"/projects?per_page=100",null,
"GET");this.executeRequest(c,mxUtils.bind(this,function(c){b(a,JSON.parse(c.getText()));k()}),t)});u(mxUtils.bind(this,function(c){e();var A=new mxXmlRequest(this.baseUrl+"/users/"+this.user.id+"/projects?per_page=100&page="+a,null,"GET");this.executeRequest(A,mxUtils.bind(this,function(A){A=JSON.parse(A.getText());if(null!=A&&0!=A.length||null!=c&&0!=c.length){1==a&&(l.appendChild(q(mxResources.get("enterValue")+"...",mxUtils.bind(this,function(){if(0===d){var a=new FilenameDialog(this.ui,"org/repo/ref",
-mxResources.get("ok"),mxUtils.bind(this,function(a){null!=a&&(a=a.split("/"),1<a.length?(b=a[0],f=a[1],g=m=null,2<a.length?(g=encodeURIComponent(a.slice(2,a.length).join("/")),y()):x(null,!0)):(this.ui.spinner.stop(),this.ui.handleError({message:mxResources.get("invalidName")})))}),mxResources.get("enterValue"));this.ui.showDialog(a.container,300,80,!0,!1);a.init()}}))),mxUtils.br(l),mxUtils.br(l));for(var t=!0,u=0;u<A.length;u++)mxUtils.bind(this,function(a){var c=n.cloneNode();c.style.backgroundColor=
-t?Editor.isDarkMode()?"#000000":"#eeeeee":"";t=!t;c.appendChild(q(a.name_with_namespace,mxUtils.bind(this,function(){0===d&&(b=a.owner.username,f=a.path,m="",x(null,!0))})));l.appendChild(c)})(A[u]);for(u=0;u<c.length;u++)e(),B(c[u],mxUtils.bind(this,function(a,c){k();for(var e=0;e<c.length;e++){var g=n.cloneNode();g.style.backgroundColor=t?"dark"==uiTheme?"#000000":"#eeeeee":"";t=!t;mxUtils.bind(this,function(c){g.appendChild(q(c.name_with_namespace,mxUtils.bind(this,function(){0===d&&(b=a.full_path,
-f=c.path,m="",x(null,!0))})));l.appendChild(g)})(c[e])}}));k()}else mxUtils.write(l,mxResources.get("noFiles"));100==A.length&&(l.appendChild(v),z=function(){l.scrollTop>=l.scrollHeight-l.offsetHeight&&p()},mxEvent.addListener(l,"scroll",z))}),t)}))});a?this.user?A():this.updateUser(function(){A()},t,!0):this.authenticate(mxUtils.bind(this,function(){this.updateUser(function(){A()},t,!0)}),t)};GitLabClient.prototype.logout=function(){this.ui.editor.loadUrl(this.redirectUri+"?doLogout=1&state="+encodeURIComponent("cId="+
+mxResources.get("ok"),mxUtils.bind(this,function(a){null!=a&&(a=a.split("/"),1<a.length?(b=a[0],g=a[1],f=m=null,2<a.length?(f=encodeURIComponent(a.slice(2,a.length).join("/")),y()):x(null,!0)):(this.ui.spinner.stop(),this.ui.handleError({message:mxResources.get("invalidName")})))}),mxResources.get("enterValue"));this.ui.showDialog(a.container,300,80,!0,!1);a.init()}}))),mxUtils.br(l),mxUtils.br(l));for(var t=!0,u=0;u<A.length;u++)mxUtils.bind(this,function(a){var c=n.cloneNode();c.style.backgroundColor=
+t?Editor.isDarkMode()?"#000000":"#eeeeee":"";t=!t;c.appendChild(q(a.name_with_namespace,mxUtils.bind(this,function(){0===d&&(b=a.owner.username,g=a.path,m="",x(null,!0))})));l.appendChild(c)})(A[u]);for(u=0;u<c.length;u++)e(),B(c[u],mxUtils.bind(this,function(a,c){k();for(var e=0;e<c.length;e++){var f=n.cloneNode();f.style.backgroundColor=t?"dark"==uiTheme?"#000000":"#eeeeee":"";t=!t;mxUtils.bind(this,function(c){f.appendChild(q(c.name_with_namespace,mxUtils.bind(this,function(){0===d&&(b=a.full_path,
+g=c.path,m="",x(null,!0))})));l.appendChild(f)})(c[e])}}));k()}else mxUtils.write(l,mxResources.get("noFiles"));100==A.length&&(l.appendChild(v),z=function(){l.scrollTop>=l.scrollHeight-l.offsetHeight&&p()},mxEvent.addListener(l,"scroll",z))}),t)}))});a?this.user?A():this.updateUser(function(){A()},t,!0):this.authenticate(mxUtils.bind(this,function(){this.updateUser(function(){A()},t,!0)}),t)};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);a=null;this.setToken(null)}})();NotionFile=function(a,d,c){DrawioFile.call(this,a,d);this.meta=c;this.peer=this.ui.notion};mxUtils.extend(NotionFile,DrawioFile);NotionFile.prototype.getId=function(){return this.meta.id};NotionFile.prototype.getHash=function(){return encodeURIComponent("N"+this.getId())};NotionFile.prototype.getMode=function(){return App.MODE_NOTION};NotionFile.prototype.isAutosave=function(){return!1};NotionFile.prototype.getTitle=function(){return this.meta.name};NotionFile.prototype.isRenamable=function(){return!1};
-NotionFile.prototype.isCompressedStorage=function(){return!0};NotionFile.prototype.save=function(a,d,c,b,f){this.doSave(this.getTitle(),d,c,b,f)};NotionFile.prototype.saveAs=function(a,d,c){this.doSave(a,d,c)};NotionFile.prototype.doSave=function(a,d,c,b,f){var g=this.meta.name;this.meta.name=a;DrawioFile.prototype.save.apply(this,[null,mxUtils.bind(this,function(){this.meta.name=g;this.saveFile(a,!1,d,c,b,f)}),c,b,f])};
-NotionFile.prototype.saveFile=function(a,d,c,b,f,g){if(this.isEditable())if(this.savingFile)null!=b&&b({code:App.ERROR_BUSY});else if(this.getTitle()==a)try{this.savingFileTime=new Date,this.setShadowModified(!1),this.savingFile=!0,this.peer.saveFile(this,mxUtils.bind(this,function(){this.setModified(this.getShadowModified());this.savingFile=!1;null!=c&&c()}),mxUtils.bind(this,function(a){this.savingFile=!1;null!=b&&b(a)}),g)}catch(m){if(this.savingFile=!1,null!=b)b(m);else throw m;}else this.savingFileTime=
+NotionFile.prototype.isCompressedStorage=function(){return!0};NotionFile.prototype.save=function(a,d,c,b,g){this.doSave(this.getTitle(),d,c,b,g)};NotionFile.prototype.saveAs=function(a,d,c){this.doSave(a,d,c)};NotionFile.prototype.doSave=function(a,d,c,b,g){var f=this.meta.name;this.meta.name=a;DrawioFile.prototype.save.apply(this,[null,mxUtils.bind(this,function(){this.meta.name=f;this.saveFile(a,!1,d,c,b,g)}),c,b,g])};
+NotionFile.prototype.saveFile=function(a,d,c,b,g,f){if(this.isEditable())if(this.savingFile)null!=b&&b({code:App.ERROR_BUSY});else if(this.getTitle()==a)try{this.savingFileTime=new Date,this.setShadowModified(!1),this.savingFile=!0,this.peer.saveFile(this,mxUtils.bind(this,function(){this.setModified(this.getShadowModified());this.savingFile=!1;null!=c&&c()}),mxUtils.bind(this,function(a){this.savingFile=!1;null!=b&&b(a)}),f)}catch(m){if(this.savingFile=!1,null!=b)b(m);else throw m;}else this.savingFileTime=
new Date,this.setShadowModified(!1),this.savingFile=!0,this.ui.pickFolder(this.getMode(),mxUtils.bind(this,function(d){this.peer.insertFile(a,this.getData(),mxUtils.bind(this,function(a){this.setModified(this.getShadowModified());this.savingFile=!1;null!=c&&c();this.ui.fileLoaded(a)}),mxUtils.bind(this,function(){this.savingFile=!1;null!=b&&b()}),!1,d)}));else null!=c&&c()};NotionLibrary=function(a,d,c){NotionFile.call(this,a,d,c)};mxUtils.extend(NotionLibrary,NotionFile);NotionLibrary.prototype.doSave=function(a,d,c){this.saveFile(a,!1,d,c)};NotionLibrary.prototype.open=function(){};(function(){var a=null;window.NotionClient=function(a){DrawioClient.call(this,a,"notionAuthInfo")};mxUtils.extend(NotionClient,DrawioClient);NotionClient.prototype.extension=".drawio";NotionClient.prototype.baseUrl=window.NOTION_API_URL||("test.draw.io"==window.location.hostname?"https://notion.jgraph.workers.dev/api":"/notion-api");NotionClient.prototype.getTitle=function(a){if("string"===typeof a.title)return a.title;for(var c=[],b=0;b<a.title.length;b++)c.push(a.title[b].text.content);return c.join(" ")};
-NotionClient.prototype.authenticate=function(d,c,b){var f=!0,g=mxUtils.bind(this,function(){f&&(f=!1,c({message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,function(){this.ui.hideDialog();m()})}))}),m=mxUtils.bind(this,function(){f=!0;this.ui.showAuthDialog(this,!0,mxUtils.bind(this,function(c,k){var e=new FilenameDialog(this.ui,"",mxResources.get("ok"),mxUtils.bind(this,function(e){a=e;this.executeRequest("/v1/databases",null,"GET",mxUtils.bind(this,function(){this.executeRequest("/setToken",
-null,"GET",mxUtils.bind(this,function(){f=!1;c&&(a=null);null!=k&&k();d()}),g,b)}),g,b)}),mxResources.get("notionToken"),function(a){return null!=a&&0<a.length},null,"https://developers.notion.com/docs/getting-started#step-1-create-an-integration");this.ui.showDialog(e.container,300,80,!0,!0);e.init()}),g)});m()};NotionClient.prototype.executeRequest=function(d,c,b,f,g,m){var e=mxUtils.bind(this,function(){var k=!0,l=window.setTimeout(mxUtils.bind(this,function(){k=!1;g({code:App.ERROR_TIMEOUT,retry:e})}),
-this.ui.timeout),n=new mxXmlRequest(this.baseUrl+d,c,b);n.withCredentials=!0;n.setRequestHeaders=mxUtils.bind(this,function(b,c){null!=a&&b.setRequestHeader("Authorization","Bearer "+a);b.setRequestHeader("Notion-Version","2021-05-13");b.setRequestHeader("Content-Type","application/json")});n.send(mxUtils.bind(this,function(a){window.clearTimeout(l);k&&(200<=a.getStatus()&&299>=a.getStatus()?(null==this.user&&this.setUser(new DrawioUser("notion",null,"Notion")),f(JSON.parse(a.getText()))):m||401!==
-a.getStatus()&&400!==a.getStatus()?g(this.parseRequestText(a)):(this.setUser(null),m=!0,this.authenticate(function(){e()},g,m)))}),mxUtils.bind(this,function(a){window.clearTimeout(l);k&&g(a)}))});e()};NotionClient.prototype.getLibrary=function(a,c,b){this.getFile(a,c,b,!1,!0)};NotionClient.prototype.getFile=function(a,c,b,f,g){g=null!=g?g:!1;this.executeRequest("/v1/pages/"+encodeURIComponent(a),null,"GET",mxUtils.bind(this,function(d){try{var e=d.properties.xml.rich_text,f="",m=this.getTitle(d.properties.Name);
-for(d=0;d<e.length;d++)f+=e[d].text.content;e={id:a,name:m};g?c(new NotionLibrary(this.ui,f,e)):c(new NotionFile(this.ui,f,e))}catch(n){if(null!=b)b(n);else throw n;}}),b)};NotionClient.prototype.insertLibrary=function(a,c,b,f,g){this.insertFile(a,c,b,f,!0,g)};NotionClient.prototype.insertFile=function(a,c,b,f,g,m){g=null!=g?g:!1;this.checkExists(m,a,!0,mxUtils.bind(this,function(d,k){d?this.writeFile(k?"/v1/pages/"+encodeURIComponent(k):"/v1/pages",k?null:m,a,c,k?"PATCH":"POST",mxUtils.bind(this,
-function(a){a={id:a.id,name:this.getTitle(a.properties.Name)};g?b(new NotionLibrary(this.ui,c,a)):b(new NotionFile(this.ui,c,a))}),f):f()}))};NotionClient.prototype.checkExists=function(a,c,b,f){this.executeRequest("/v1/databases/"+encodeURIComponent(a)+"/query",JSON.stringify({filter:{property:"Name",text:{equals:c}}}),"POST",mxUtils.bind(this,function(a){0==a.results.length?f(!0):b?(this.ui.spinner.stop(),this.ui.confirm(mxResources.get("replaceIt",[c]),function(){f(!0,a.results[0].id)},function(){f(!1)})):
-(this.ui.spinner.stop(),this.ui.showError(mxResources.get("error"),mxResources.get("fileExists"),mxResources.get("ok"),function(){f(!1)}))}),function(a){f(!1)})};NotionClient.prototype.saveFile=function(a,c,b){try{var d=a.getData();this.writeFile("/v1/pages/"+a.getId(),null,a.getTitle(),d,"PATCH",mxUtils.bind(this,function(a){c(a,d)}),b)}catch(g){b(g)}};NotionClient.prototype.writeFile=function(a,c,b,f,g,m,e){try{if(null!=a&&null!=f)if(2E5<f.length)e({message:mxResources.get("drawingTooLarge")+" ("+
-this.ui.formatFileSize(f.length)+" / 200 KB)"});else{for(var d=[],l=Math.ceil(f.length/2E3),n=0;n<l;n++)d.push({text:{content:f.substr(2E3*n,2E3)}});b={properties:{Name:{title:[{text:{content:b}}]},xml:{rich_text:d}}};c&&(b.parent={database_id:c});this.executeRequest(a,JSON.stringify(b),g,m,e)}else e({message:mxResources.get("unknownError")})}catch(p){e(p)}};NotionClient.prototype.parseRequestText=function(a){var c={message:mxResources.get("unknownError")};try{c=JSON.parse(a.getText())}catch(b){}return c};
-NotionClient.prototype.pickLibrary=function(a){this.pickFile(a)};NotionClient.prototype.pickFolder=function(a){this.showNotionDialog(!1,a)};NotionClient.prototype.pickFile=function(a){a=null!=a?a:mxUtils.bind(this,function(a){this.ui.loadFile("N"+encodeURIComponent(a))});this.showNotionDialog(!0,a)};NotionClient.prototype.showNotionDialog=function(a,c){var b,d,g=document.createElement("div");g.style.whiteSpace="nowrap";g.style.overflow="hidden";g.style.height="304px";var m=document.createElement("h3");
-mxUtils.write(m,mxResources.get(a?"officeSelDiag":"selectDB"));m.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";g.appendChild(m);var e=document.createElement("div");e.style.whiteSpace="nowrap";e.style.border="1px solid lightgray";e.style.boxSizing="border-box";e.style.padding="4px";e.style.overflow="auto";e.style.lineHeight="1.2em";e.style.height="274px";g.appendChild(e);var k=document.createElement("div");k.style.textOverflow="ellipsis";k.style.boxSizing="border-box";
-k.style.overflow="hidden";k.style.padding="4px";k.style.width="100%";var l=new CustomDialog(this.ui,g,mxUtils.bind(this,function(){c(b)}));this.ui.showDialog(l.container,420,360,!0,!0);a&&l.okButton.parentNode.removeChild(l.okButton);var n=mxUtils.bind(this,function(a,b,c,d){var e=document.createElement("a");e.setAttribute("title",a);e.style.cursor="pointer";mxUtils.write(e,a);mxEvent.addListener(e,"click",b);d&&(e.style.textDecoration="underline");null!=c&&(a=k.cloneNode(),a.style.padding=c,a.appendChild(e),
+NotionClient.prototype.authenticate=function(d,c,b){var g=!0,f=mxUtils.bind(this,function(){g&&(g=!1,c({message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,function(){this.ui.hideDialog();m()})}))}),m=mxUtils.bind(this,function(){g=!0;this.ui.showAuthDialog(this,!0,mxUtils.bind(this,function(c,k){var e=new FilenameDialog(this.ui,"",mxResources.get("ok"),mxUtils.bind(this,function(e){a=e;this.executeRequest("/v1/databases",null,"GET",mxUtils.bind(this,function(){this.executeRequest("/setToken",
+null,"GET",mxUtils.bind(this,function(){g=!1;c&&(a=null);null!=k&&k();d()}),f,b)}),f,b)}),mxResources.get("notionToken"),function(a){return null!=a&&0<a.length},null,"https://developers.notion.com/docs/getting-started#step-1-create-an-integration");this.ui.showDialog(e.container,300,80,!0,!0);e.init()}),f)});m()};NotionClient.prototype.executeRequest=function(d,c,b,g,f,m){var e=mxUtils.bind(this,function(){var k=!0,l=window.setTimeout(mxUtils.bind(this,function(){k=!1;f({code:App.ERROR_TIMEOUT,retry:e})}),
+this.ui.timeout),n=new mxXmlRequest(this.baseUrl+d,c,b);n.withCredentials=!0;n.setRequestHeaders=mxUtils.bind(this,function(b,c){null!=a&&b.setRequestHeader("Authorization","Bearer "+a);b.setRequestHeader("Notion-Version","2021-05-13");b.setRequestHeader("Content-Type","application/json")});n.send(mxUtils.bind(this,function(a){window.clearTimeout(l);k&&(200<=a.getStatus()&&299>=a.getStatus()?(null==this.user&&this.setUser(new DrawioUser("notion",null,"Notion")),g(JSON.parse(a.getText()))):m||401!==
+a.getStatus()&&400!==a.getStatus()?f(this.parseRequestText(a)):(this.setUser(null),m=!0,this.authenticate(function(){e()},f,m)))}),mxUtils.bind(this,function(a){window.clearTimeout(l);k&&f(a)}))});e()};NotionClient.prototype.getLibrary=function(a,c,b){this.getFile(a,c,b,!1,!0)};NotionClient.prototype.getFile=function(a,c,b,g,f){f=null!=f?f:!1;this.executeRequest("/v1/pages/"+encodeURIComponent(a),null,"GET",mxUtils.bind(this,function(d){try{var e=d.properties.xml.rich_text,g="",m=this.getTitle(d.properties.Name);
+for(d=0;d<e.length;d++)g+=e[d].text.content;e={id:a,name:m};f?c(new NotionLibrary(this.ui,g,e)):c(new NotionFile(this.ui,g,e))}catch(n){if(null!=b)b(n);else throw n;}}),b)};NotionClient.prototype.insertLibrary=function(a,c,b,g,f){this.insertFile(a,c,b,g,!0,f)};NotionClient.prototype.insertFile=function(a,c,b,g,f,m){f=null!=f?f:!1;this.checkExists(m,a,!0,mxUtils.bind(this,function(d,k){d?this.writeFile(k?"/v1/pages/"+encodeURIComponent(k):"/v1/pages",k?null:m,a,c,k?"PATCH":"POST",mxUtils.bind(this,
+function(a){a={id:a.id,name:this.getTitle(a.properties.Name)};f?b(new NotionLibrary(this.ui,c,a)):b(new NotionFile(this.ui,c,a))}),g):g()}))};NotionClient.prototype.checkExists=function(a,c,b,g){this.executeRequest("/v1/databases/"+encodeURIComponent(a)+"/query",JSON.stringify({filter:{property:"Name",text:{equals:c}}}),"POST",mxUtils.bind(this,function(a){0==a.results.length?g(!0):b?(this.ui.spinner.stop(),this.ui.confirm(mxResources.get("replaceIt",[c]),function(){g(!0,a.results[0].id)},function(){g(!1)})):
+(this.ui.spinner.stop(),this.ui.showError(mxResources.get("error"),mxResources.get("fileExists"),mxResources.get("ok"),function(){g(!1)}))}),function(a){g(!1)})};NotionClient.prototype.saveFile=function(a,c,b){try{var d=a.getData();this.writeFile("/v1/pages/"+a.getId(),null,a.getTitle(),d,"PATCH",mxUtils.bind(this,function(a){c(a,d)}),b)}catch(f){b(f)}};NotionClient.prototype.writeFile=function(a,c,b,g,f,m,e){try{if(null!=a&&null!=g)if(2E5<g.length)e({message:mxResources.get("drawingTooLarge")+" ("+
+this.ui.formatFileSize(g.length)+" / 200 KB)"});else{for(var d=[],l=Math.ceil(g.length/2E3),n=0;n<l;n++)d.push({text:{content:g.substr(2E3*n,2E3)}});b={properties:{Name:{title:[{text:{content:b}}]},xml:{rich_text:d}}};c&&(b.parent={database_id:c});this.executeRequest(a,JSON.stringify(b),f,m,e)}else e({message:mxResources.get("unknownError")})}catch(p){e(p)}};NotionClient.prototype.parseRequestText=function(a){var c={message:mxResources.get("unknownError")};try{c=JSON.parse(a.getText())}catch(b){}return c};
+NotionClient.prototype.pickLibrary=function(a){this.pickFile(a)};NotionClient.prototype.pickFolder=function(a){this.showNotionDialog(!1,a)};NotionClient.prototype.pickFile=function(a){a=null!=a?a:mxUtils.bind(this,function(a){this.ui.loadFile("N"+encodeURIComponent(a))});this.showNotionDialog(!0,a)};NotionClient.prototype.showNotionDialog=function(a,c){var b,d,f=document.createElement("div");f.style.whiteSpace="nowrap";f.style.overflow="hidden";f.style.height="304px";var m=document.createElement("h3");
+mxUtils.write(m,mxResources.get(a?"officeSelDiag":"selectDB"));m.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";f.appendChild(m);var e=document.createElement("div");e.style.whiteSpace="nowrap";e.style.border="1px solid lightgray";e.style.boxSizing="border-box";e.style.padding="4px";e.style.overflow="auto";e.style.lineHeight="1.2em";e.style.height="274px";f.appendChild(e);var k=document.createElement("div");k.style.textOverflow="ellipsis";k.style.boxSizing="border-box";
+k.style.overflow="hidden";k.style.padding="4px";k.style.width="100%";var l=new CustomDialog(this.ui,f,mxUtils.bind(this,function(){c(b)}));this.ui.showDialog(l.container,420,360,!0,!0);a&&l.okButton.parentNode.removeChild(l.okButton);var n=mxUtils.bind(this,function(a,b,c,d){var e=document.createElement("a");e.setAttribute("title",a);e.style.cursor="pointer";mxUtils.write(e,a);mxEvent.addListener(e,"click",b);d&&(e.style.textDecoration="underline");null!=c&&(a=k.cloneNode(),a.style.padding=c,a.appendChild(e),
e=a);return e}),p=mxUtils.bind(this,function(){var a=document.createElement("div");a.style.marginBottom="8px";a.appendChild(n(d,mxUtils.bind(this,function(){b=null;z()}),null,!0));e.appendChild(a)}),q=mxUtils.bind(this,function(a){this.ui.handleError(a,null,mxUtils.bind(this,function(){this.ui.spinner.stop();null!=this.getUser()?(b=null,z()):this.ui.hideDialog()}),null,{})}),u=null,t=null,v=mxUtils.bind(this,function(a){null==a&&(e.innerHTML="");this.ui.spinner.spin(e,mxResources.get("loading"));
l.okButton.removeAttribute("disabled");null!=t&&(mxEvent.removeListener(e,"scroll",t),t=null);null!=u&&null!=u.parentNode&&u.parentNode.removeChild(u);u=document.createElement("a");u.style.display="block";u.style.cursor="pointer";mxUtils.write(u,mxResources.get("more")+"...");var d=mxUtils.bind(this,function(){v(a)});mxEvent.addListener(u,"click",d);var f={page_size:100};null!=a&&(f.start_cursor=a);this.executeRequest("/v1/databases/"+encodeURIComponent(b)+"/query",JSON.stringify(f),"POST",mxUtils.bind(this,
function(f){this.ui.spinner.stop();null==a&&(p(),e.appendChild(n("../ [Up]",mxUtils.bind(this,function(){b=null;z()}),"4px")));var g=f.results;if(null==g||0==g.length)mxUtils.write(e,mxResources.get("noFiles"));else{for(var m=!0,l=0;l<g.length;l++)mxUtils.bind(this,function(a,b){var d=k.cloneNode();d.style.backgroundColor=m?Editor.isDarkMode()?"#000000":"#eeeeee":"";m=!m;var f=document.createElement("img");f.src=IMAGE_PATH+"/file.png";f.setAttribute("align","absmiddle");f.style.marginRight="4px";
f.style.marginTop="-4px";f.width=20;d.appendChild(f);d.appendChild(n(this.getTitle(a.properties.Name),mxUtils.bind(this,function(){this.ui.hideDialog();c(a.id)})));e.appendChild(d)})(g[l],l);f.has_more&&(a=f.next_cursor,e.appendChild(u),t=function(){e.scrollTop>=e.scrollHeight-e.offsetHeight&&d()},mxEvent.addListener(e,"scroll",t))}}),q,!0)}),z=mxUtils.bind(this,function(f){null==f&&(e.innerHTML="");l.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(e,mxResources.get("loading"));
null!=t&&mxEvent.removeListener(e,"scroll",t);null!=u&&null!=u.parentNode&&u.parentNode.removeChild(u);u=document.createElement("a");u.style.display="block";u.style.cursor="pointer";mxUtils.write(u,mxResources.get("more")+"...");var g=mxUtils.bind(this,function(){z(f)});mxEvent.addListener(u,"click",g);this.executeRequest("/v1/databases?page_size=100"+(null!=f?"&start_cursor="+f:""),null,"GET",mxUtils.bind(this,function(m){this.ui.spinner.stop();var l=m.results,x=0;if(null==l||0==l.length)mxUtils.write(e,
mxResources.get("noDBs"));else for(var p=0;p<l.length;p++)l[p].properties.Name&&"title"==l[p].properties.Name.type&&l[p].properties.xml&&"rich_text"==l[p].properties.xml.type&&(mxUtils.bind(this,function(f,g){var m=k.cloneNode();m.style.backgroundColor=0==g%2?Editor.isDarkMode()?"#000000":"#eeeeee":"";m.appendChild(n(this.getTitle(f),mxUtils.bind(this,function(){b=f.id;d=this.getTitle(f);a?v():(this.ui.hideDialog(),c(b))})));e.appendChild(m)})(l[p],p),x++);m.has_more?(f=m.next_cursor,0==x?g():(e.appendChild(u),
-t=function(){e.scrollTop>=e.scrollHeight-e.offsetHeight&&g()},mxEvent.addListener(e,"scroll",t))):0==x&&""==e.innerHTML&&mxUtils.write(e,mxResources.get("noDBs"))}),q)});z()};NotionClient.prototype.logout=function(){this.executeRequest("/removeToken",null,"GET",function(){},function(){});this.setUser(null);a=null}})();DrawioComment=function(a,d,c,b,f,g,m){this.file=a;this.id=d;this.content=c;this.modifiedDate=b;this.createdDate=f;this.isResolved=g;this.user=m;this.replies=[]};DrawioComment.prototype.addReplyDirect=function(a){null!=a&&this.replies.push(a)};DrawioComment.prototype.addReply=function(a,d,c,b,f){d()};DrawioComment.prototype.editComment=function(a,d,c){d()};DrawioComment.prototype.deleteComment=function(a,d){a()};DriveComment=function(a,d,c,b,f,g,m,e){DrawioComment.call(this,a,d,c,b,f,g,m);this.pCommentId=e};mxUtils.extend(DriveComment,DrawioComment);DriveComment.prototype.addReply=function(a,d,c,b,f){a={content:a.content};b?a.verb="resolve":f&&(a.verb="reopen");this.file.ui.drive.executeRequest({url:"/files/"+this.file.getId()+"/comments/"+this.id+"/replies",params:a,method:"POST"},mxUtils.bind(this,function(a){d(a.replyId)}),c)};
+t=function(){e.scrollTop>=e.scrollHeight-e.offsetHeight&&g()},mxEvent.addListener(e,"scroll",t))):0==x&&""==e.innerHTML&&mxUtils.write(e,mxResources.get("noDBs"))}),q)});z()};NotionClient.prototype.logout=function(){this.executeRequest("/removeToken",null,"GET",function(){},function(){});this.setUser(null);a=null}})();DrawioComment=function(a,d,c,b,g,f,m){this.file=a;this.id=d;this.content=c;this.modifiedDate=b;this.createdDate=g;this.isResolved=f;this.user=m;this.replies=[]};DrawioComment.prototype.addReplyDirect=function(a){null!=a&&this.replies.push(a)};DrawioComment.prototype.addReply=function(a,d,c,b,g){d()};DrawioComment.prototype.editComment=function(a,d,c){d()};DrawioComment.prototype.deleteComment=function(a,d){a()};DriveComment=function(a,d,c,b,g,f,m,e){DrawioComment.call(this,a,d,c,b,g,f,m);this.pCommentId=e};mxUtils.extend(DriveComment,DrawioComment);DriveComment.prototype.addReply=function(a,d,c,b,g){a={content:a.content};b?a.verb="resolve":g&&(a.verb="reopen");this.file.ui.drive.executeRequest({url:"/files/"+this.file.getId()+"/comments/"+this.id+"/replies",params:a,method:"POST"},mxUtils.bind(this,function(a){d(a.replyId)}),c)};
DriveComment.prototype.editComment=function(a,d,c){this.content=a;a={content:a};this.file.ui.drive.executeRequest(this.pCommentId?{url:"/files/"+this.file.getId()+"/comments/"+this.pCommentId+"/replies/"+this.id,params:a,method:"PATCH"}:{url:"/files/"+this.file.getId()+"/comments/"+this.id,params:a,method:"PATCH"},d,c)};
DriveComment.prototype.deleteComment=function(a,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"},a,d)};App=function(a,d,c){EditorUi.call(this,a,d,null!=c?c:"1"==urlParams.lightbox||"min"==uiTheme&&"0"!=urlParams.chrome);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||(window.onunload=mxUtils.bind(this,function(){var a=this.getCurrentFile();if(null!=a&&a.isModified()){var c={category:"DISCARD-FILE-"+a.getHash(),action:(a.savingFile?"saving":"")+(a.savingFile&&null!=a.savingFileTime?"_"+Math.round((Date.now()-a.savingFileTime.getTime())/1E3):"")+(null!=a.saveLevel?"-sl_"+a.saveLevel:"")+"-age_"+(null!=
a.ageStart?Math.round((Date.now()-a.ageStart.getTime())/1E3):"x")+(this.editor.autosave?"":"-nosave")+(a.isAutosave()?"":"-noauto")+"-open_"+(null!=a.opened?Math.round((Date.now()-a.opened.getTime())/1E3):"x")+"-save_"+(null!=a.lastSaved?Math.round((Date.now()-a.lastSaved.getTime())/1E3):"x")+"-change_"+(null!=a.lastChanged?Math.round((Date.now()-a.lastChanged.getTime())/1E3):"x")+"-alive_"+Math.round((Date.now()-App.startTime.getTime())/1E3),label:null!=a.sync?"client_"+a.sync.clientId:"nosync"};
@@ -11282,15 +11285,15 @@ if(null!=m)try{var l=JSON.parse(m);for(g in k.merge)l[g]=k.merge[g];k=l}catch(A)
b[2].getDocumentElement());"1"==urlParams.dev||EditorUi.isElectronApp?c():(mxStencilRegistry.allowEval=!1,App.loadScripts(["js/shapes-14-6-5.min.js","js/stencils.min.js","js/extensions.min.js"],c))},function(a){a=document.getElementById("geStatus");null!=a&&(a.innerHTML="Error loading page. <a>Please try refreshing.</a>",a.getElementsByTagName("a")[0].onclick=function(){mxLanguage="en";c(mxResources.getDefaultBundle(RESOURCE_BASE,mxLanguage)||mxResources.getSpecialBundle(RESOURCE_BASE,mxLanguage))})})}
function b(){try{if(null!=mxSettings.settings){document.body.style.backgroundColor="dark"==uiTheme||mxSettings.settings.darkMode?"#2a2a2a":"#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(q){null!=window.console&&console.error(q)}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;c(mxResources.getDefaultBundle(RESOURCE_BASE,mxLanguage)||mxResources.getSpecialBundle(RESOURCE_BASE,mxLanguage))}
-window.onerror=function(a,b,c,d,e){EditorUi.logError("Global: "+(null!=a?a:""),b,c,d,e,null,!0)};if(window.top==window.self&&(/ac\.draw\.io$/.test(window.location.hostname)||/ac-ent\.draw\.io$/.test(window.location.hostname)||/aj\.draw\.io$/.test(window.location.hostname)))document.body.innerHTML='<div style="margin-top:10%;text-align:center;">Stand-alone mode not allowed for this domain.</div>';else{if("1"==urlParams.embed||"1"==urlParams.lightbox){var f=document.getElementById("geInfo");null!=f&&
-f.parentNode.removeChild(f)}null!=document.referrer&&"aws3"==urlParams.libs&&"https://aws.amazon.com/architecture/icons/"==document.referrer.substring(0,42)&&(urlParams.libs="aws4");if(null!=window.mxscript){if("1"==urlParams.dev&&null!=CryptoJS&&App.mode!=App.MODE_DROPBOX&&App.mode!=App.MODE_TRELLO){f=document.getElementsByTagName("script");if(null!=f&&0<f.length){var g=mxUtils.getTextContent(f[0]);"b02227617087e21bd49f2faa15164112"!=CryptoJS.MD5(g).toString()&&(console.log("Change bootstrap script MD5 in the previous line:",
-CryptoJS.MD5(g).toString()),alert("[Dev] Bootstrap script change requires update of CSP"))}null!=f&&1<f.length&&(g=mxUtils.getTextContent(f[f.length-1]),"d53805dd6f0bbba2da4966491ca0a505"!=CryptoJS.MD5(g).toString()&&(console.log("Change main script MD5 in the previous line:",CryptoJS.MD5(g).toString()),alert("[Dev] Main script change requires update of CSP")))}try{Editor.enableServiceWorker&&("0"==urlParams.offline||/www\.draw\.io$/.test(window.location.hostname)||"1"!=urlParams.offline&&"1"==urlParams.dev)?
+window.onerror=function(a,b,c,d,e){EditorUi.logError("Global: "+(null!=a?a:""),b,c,d,e,null,!0)};if(window.top==window.self&&(/ac\.draw\.io$/.test(window.location.hostname)||/ac-ent\.draw\.io$/.test(window.location.hostname)||/aj\.draw\.io$/.test(window.location.hostname)))document.body.innerHTML='<div style="margin-top:10%;text-align:center;">Stand-alone mode not allowed for this domain.</div>';else{if("1"==urlParams.embed||"1"==urlParams.lightbox){var g=document.getElementById("geInfo");null!=g&&
+g.parentNode.removeChild(g)}null!=document.referrer&&"aws3"==urlParams.libs&&"https://aws.amazon.com/architecture/icons/"==document.referrer.substring(0,42)&&(urlParams.libs="aws4");if(null!=window.mxscript){if("1"==urlParams.dev&&null!=CryptoJS&&App.mode!=App.MODE_DROPBOX&&App.mode!=App.MODE_TRELLO){g=document.getElementsByTagName("script");if(null!=g&&0<g.length){var f=mxUtils.getTextContent(g[0]);"b02227617087e21bd49f2faa15164112"!=CryptoJS.MD5(f).toString()&&(console.log("Change bootstrap script MD5 in the previous line:",
+CryptoJS.MD5(f).toString()),alert("[Dev] Bootstrap script change requires update of CSP"))}null!=g&&1<g.length&&(f=mxUtils.getTextContent(g[g.length-1]),"d53805dd6f0bbba2da4966491ca0a505"!=CryptoJS.MD5(f).toString()&&(console.log("Change main script MD5 in the previous line:",CryptoJS.MD5(f).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(n){null!=window.console&&console.error(n)}!("ArrayBuffer"in window)||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"auto"!=DrawioFile.SYNC||"1"==urlParams.embed&&"1"!=urlParams.embedRT||"1"==urlParams.local||"0"==urlParams.chrome&&"1"!=urlParams.rt||"1"==urlParams.stealth||"1"==urlParams.offline||(mxscript(App.PUSHER_URL),"1"==
-urlParams.rtCursors&&(mxscript(App.SOCKET_IO_URL),mxscript(App.SIMPLE_PEER_URL)));if("0"!=urlParams.plugins&&"1"!=urlParams.offline){f=null!=mxSettings.settings?mxSettings.getPlugins():null;if(null==mxSettings.settings&&isLocalStorage&&"undefined"!==typeof JSON)try{var m=JSON.parse(localStorage.getItem(mxSettings.key));null!=m&&(f=m.plugins)}catch(n){}m=urlParams.p;App.initPluginCallback();null!=m&&App.loadPlugins(m.split(";"));if(null!=f&&0<f.length&&"0"!=urlParams.plugins){for(var m=window.location.protocol+
-"//"+window.location.host,g=!0,e=0;e<f.length&&g;e++)"/"!=f[e].charAt(0)&&f[e].substring(0,m.length)!=m&&(g=!1);if(g||mxUtils.confirm(mxResources.replacePlaceholders("The page has requested to load the following plugin(s):\n \n {1}\n \n Would you like to load these plugin(s) now?\n \n NOTE : Only allow plugins to run if you fully understand the security implications of doing so.\n",[f.join("\n")]).replace(/\\n/g,"\n")))for(e=0;e<f.length;e++)try{null==App.pluginsLoaded[f[e]]&&(App.pluginsLoaded[f[e]]=
-!0,App.embedModePluginsCount++,"/"==f[e].charAt(0)&&(f[e]=PLUGINS_BASE_PATH+f[e]),mxscript(f[e]))}catch(n){}}}"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=
+urlParams.rtCursors&&(mxscript(App.SOCKET_IO_URL),mxscript(App.SIMPLE_PEER_URL)));if("0"!=urlParams.plugins&&"1"!=urlParams.offline){g=null!=mxSettings.settings?mxSettings.getPlugins():null;if(null==mxSettings.settings&&isLocalStorage&&"undefined"!==typeof JSON)try{var m=JSON.parse(localStorage.getItem(mxSettings.key));null!=m&&(g=m.plugins)}catch(n){}m=urlParams.p;App.initPluginCallback();null!=m&&App.loadPlugins(m.split(";"));if(null!=g&&0<g.length&&"0"!=urlParams.plugins){for(var m=window.location.protocol+
+"//"+window.location.host,f=!0,e=0;e<g.length&&f;e++)"/"!=g[e].charAt(0)&&g[e].substring(0,m.length)!=m&&(f=!1);if(f||mxUtils.confirm(mxResources.replacePlaceholders("The page has requested to load the following plugin(s):\n \n {1}\n \n Would you like to load these plugin(s) now?\n \n NOTE : Only allow plugins to run if you fully understand the security implications of doing so.\n",[g.join("\n")]).replace(/\\n/g,"\n")))for(e=0;e<g.length;e++)try{null==App.pluginsLoaded[g[e]]&&(App.pluginsLoaded[g[e]]=
+!0,App.embedModePluginsCount++,"/"==g[e].charAt(0)&&(g[e]=PLUGINS_BASE_PATH+g[e]),mxscript(g[e]))}catch(n){}}}"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 k=window.opener||window.parent,l=function(a){if(a.source==k)try{var c=JSON.parse(a.data);null!=c&&"configure"==c.action&&(mxEvent.removeListener(window,"message",l),Editor.configure(c.config,!0),mxSettings.load(),b())}catch(q){null!=window.console&&console.log("Error in configure message: "+q,a.data)}};mxEvent.addListener(window,"message",l);k.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(n){null!=window.console&&console.error(n)}if(isLocalStorage&&null!=localStorage&&"1"!=urlParams.embed&&(f=localStorage.getItem(Editor.configurationKey),null!=f))try{f=JSON.parse(f),null!=f&&(EditorUi.debug("Using local configuration",f),Editor.configure(f),mxSettings.load())}catch(n){null!=window.console&&console.error(n)}}b()}}};
+window.DRAWIO_CONFIG)try{EditorUi.debug("Using global configuration",window.DRAWIO_CONFIG),Editor.configure(window.DRAWIO_CONFIG),mxSettings.load()}catch(n){null!=window.console&&console.error(n)}if(isLocalStorage&&null!=localStorage&&"1"!=urlParams.embed&&(g=localStorage.getItem(Editor.configurationKey),null!=g))try{g=JSON.parse(g),null!=g&&(EditorUi.debug("Using local configuration",g),Editor.configure(g),mxSettings.load())}catch(n){null!=window.console&&console.error(n)}}b()}}};
mxUtils.extend(App,EditorUi);App.prototype.defaultUserPicture=IMAGE_PATH+"/default-user.jpg";App.prototype.shareImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA2RpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDowOTgwMTE3NDA3MjA2ODExODhDNkFGMDBEQkQ0RTgwOSIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDoxMjU2NzdEMTcwRDIxMUUxQjc0MDkxRDhCNUQzOEFGRCIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDoxMjU2NzdEMDcwRDIxMUUxQjc0MDkxRDhCNUQzOEFGRCIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1IFdpbmRvd3MiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDowNjgwMTE3NDA3MjA2ODExODcxRkM4MUY1OTFDMjQ5OCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDowNzgwMTE3NDA3MjA2ODExODhDNkFGMDBEQkQ0RTgwOSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PrM/fs0AAADgSURBVHjaYmDAA/7//88MwgzkAKDGFiD+BsQ/QWxSNaf9RwN37twpI8WAS+gGfP78+RpQSoRYA36iG/D379+vQClNdLVMOMz4gi7w79+/n0CKg1gD9qELvH379hzIHGK9oA508ieY8//8+fO5rq4uFCilRKwL1JmYmNhhHEZGRiZ+fn6Q2meEbDYG4u3/cYCfP38uA7kOm0ZOIJ7zn0jw48ePPiDFhmzArv8kgi9fvuwB+w5qwH9ykjswbFSZyM4sEMDPBDTlL5BxkFSd7969OwZ2BZKYGhDzkmjOJ4AAAwBhpRqGnEFb8QAAAABJRU5ErkJggg==";
App.prototype.chevronUpImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6NDg2NEE3NUY1MUVBMTFFM0I3MUVEMTc0N0YyOUI4QzEiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6NDg2NEE3NjA1MUVBMTFFM0I3MUVEMTc0N0YyOUI4QzEiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo0ODY0QTc1RDUxRUExMUUzQjcxRUQxNzQ3RjI5QjhDMSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo0ODY0QTc1RTUxRUExMUUzQjcxRUQxNzQ3RjI5QjhDMSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Pg+qUokAAAAMUExURQAAANnZ2b+/v////5bgre4AAAAEdFJOU////wBAKqn0AAAAL0lEQVR42mJgRgMMRAswMKAKMDDARBjg8lARBoR6KImkH0wTbygT6YaS4DmAAAMAYPkClOEDDD0AAAAASUVORK5CYII=":
IMAGE_PATH+"/chevron-up.png";
@@ -11301,19 +11304,19 @@ App.prototype.formatShowImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgo
App.prototype.formatHideImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6ODdCREY5REI1NkQ3MTFFNTkyNjNEMTA5NjgwODUyRTgiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6ODdCREY5REM1NkQ3MTFFNTkyNjNEMTA5NjgwODUyRTgiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo4N0JERjlEOTU2RDcxMUU1OTI2M0QxMDk2ODA4NTJFOCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo4N0JERjlEQTU2RDcxMUU1OTI2M0QxMDk2ODA4NTJFOCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PqjT9SMAAAAGUExURQAAAP///6XZn90AAAACdFJOU/8A5bcwSgAAAB9JREFUeNpiYEQDDEQJMMABTAAmNdAC6A4j0XMAAQYAcbwA1Xvj1CgAAAAASUVORK5CYII=":IMAGE_PATH+
"/format-hide.png";App.prototype.fullscreenImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAQMAAAAlPW0iAAAABlBMVEUAAAAAAAClZ7nPAAAAAXRSTlMAQObYZgAAABpJREFUCNdjgAAbGxAy4AEh5gNwBBGByoIBAIueBd12TUjqAAAAAElFTkSuQmCC":IMAGE_PATH+"/fullscreen.png";App.prototype.warnInterval=3E5;App.prototype.compactMode=!1;App.prototype.fullscreenMode=!1;"1"!=urlParams.embed?App.prototype.menubarHeight=64:App.prototype.footerHeight=0;
App.initPluginCallback=function(){null==App.DrawPlugins&&(App.DrawPlugins=[],window.Draw={},window.Draw.loadPlugin=function(a){App.DrawPlugins.push(a)})};App.pluginsLoaded={};App.embedModePluginsCount=0;
-App.loadPlugins=function(a,d){EditorUi.debug("Loading plugins",a);for(var c=0;c<a.length;c++)if(null!=a[c]&&0<a[c].length)try{var b=PLUGINS_BASE_PATH+App.pluginRegistry[a[c]];null!=b?null==App.pluginsLoaded[b]&&(App.pluginsLoaded[b]=!0,App.embedModePluginsCount++,"undefined"===typeof window.drawDevUrl?d?mxinclude(b):mxscript(b):d?mxinclude(b):mxscript(drawDevUrl+b)):null!=window.console&&console.log("Unknown plugin:",a[c])}catch(f){null!=window.console&&console.log("Error loading plugin:",a[c],f)}};
+App.loadPlugins=function(a,d){EditorUi.debug("Loading plugins",a);for(var c=0;c<a.length;c++)if(null!=a[c]&&0<a[c].length)try{var b=PLUGINS_BASE_PATH+App.pluginRegistry[a[c]];null!=b?null==App.pluginsLoaded[b]&&(App.pluginsLoaded[b]=!0,App.embedModePluginsCount++,"undefined"===typeof window.drawDevUrl?d?mxinclude(b):mxscript(b):d?mxinclude(b):mxscript(drawDevUrl+b)):null!=window.console&&console.log("Unknown plugin:",a[c])}catch(g){null!=window.console&&console.log("Error loading plugin:",a[c],g)}};
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 a=window.opener||window.parent;null!=a&&this.editor.graph.addListener(mxEvent.SIZE,mxUtils.bind(this,function(){a.postMessage(JSON.stringify(this.createLoadMessage("size")),"*")}))};
App.prototype.init=function(){EditorUi.prototype.init.apply(this,arguments);this.defaultLibraryName=mxResources.get("untitledLibrary");this.descriptorChangedListener=mxUtils.bind(this,this.descriptorChanged);this.gitHub=mxClient.IS_IE&&10!=document.documentMode&&!mxClient.IS_IE11&&!mxClient.IS_EDGE||"0"==urlParams.gh||"1"==urlParams.embed&&"1"!=urlParams.gh?null:new GitHubClient(this);null!=this.gitHub&&this.gitHub.addListener("userChanged",mxUtils.bind(this,function(){this.updateUserElement();this.restoreLibraries()}));
this.gitLab=mxClient.IS_IE&&10!=document.documentMode&&!mxClient.IS_IE11&&!mxClient.IS_EDGE||"0"==urlParams.gl||"1"==urlParams.embed&&"1"!=urlParams.gl?null:new GitLabClient(this);null!=this.gitLab&&this.gitLab.addListener("userChanged",mxUtils.bind(this,function(){this.updateUserElement();this.restoreLibraries()}));this.notion="1"==urlParams.ntn?new NotionClient(this):null;null!=this.notion&&this.notion.addListener("userChanged",mxUtils.bind(this,function(){this.updateUserElement();this.restoreLibraries()}));
if("1"!=urlParams.embed||"1"==urlParams.od){var a=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=a)});a()}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(g){null!=window.console&&console.error(g)}else null==window.DrawTrelloClientCallback&&(window.DrawTrelloClientCallback=d)});d()}if("1"!=urlParams.embed||"1"==urlParams.gapi){var c=mxUtils.bind(this,function(){if("undefined"!==typeof gapi){var a=
+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(f){null!=window.console&&console.error(f)}else null==window.DrawTrelloClientCallback&&(window.DrawTrelloClientCallback=d)});d()}if("1"!=urlParams.embed||"1"==urlParams.gapi){var c=mxUtils.bind(this,function(){if("undefined"!==typeof gapi){var a=
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,a),window.DrawGapiClientCallback=null):a()}else null==window.DrawGapiClientCallback&&(window.DrawGapiClientCallback=c)});c()}if("1"!=
-urlParams.embed||"1"==urlParams.db){var b=mxUtils.bind(this,function(){if("function"===typeof Dropbox&&"undefined"!==typeof Dropbox.choose){window.DrawDropboxClientCallback=null;try{this.dropbox=new DropboxClient(this),this.dropbox.addListener("userChanged",mxUtils.bind(this,function(){this.updateUserElement();this.restoreLibraries()})),this.fireEvent(new mxEventObject("clientLoaded","client",this.dropbox))}catch(g){null!=window.console&&console.error(g)}}else null==window.DrawDropboxClientCallback&&
+urlParams.embed||"1"==urlParams.db){var b=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(f){null!=window.console&&console.error(f)}}else null==window.DrawDropboxClientCallback&&
(window.DrawDropboxClientCallback=b)});b()}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(a){this.showBanner("AddToHomeScreenFooter",mxResources.get("installApp"),function(){a.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 a=this.getCurrentFile(),a=null!=a?a.getMode():null;a==App.MODE_DEVICE||
-a==App.MODE_BROWSER?this.showDownloadDesktopBanner():"1"!=urlParams.embed&&this.getServiceName()})),!(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 f=window.setTimeout(mxUtils.bind(this,function(){DrawioFile.SYNC="manual";var a=this.getCurrentFile();null!=a&&null!=a.sync&&(a.sync.destroy(),a.sync=null,a=mxUtils.htmlEntities(mxResources.get("timeout")),
-this.editor.setStatus('<div title="'+a+'" class="geStatusAlert" style="overflow:hidden;">'+a+"</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(a){window.clearTimeout(f)}))}}else null!=this.menubar&&(this.menubar.container.style.paddingTop="0px");this.updateHeader();null!=this.menubar&&(this.buttonContainer=document.createElement("div"),this.buttonContainer.style.display=
+a==App.MODE_BROWSER?this.showDownloadDesktopBanner():"1"!=urlParams.embed&&this.getServiceName()})),!(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"1"==urlParams.embed||"auto"!=DrawioFile.SYNC||"1"==urlParams.local||"1"==urlParams.stealth||this.isOffline()||this.editor.chromeless&&!this.editor.editable)){var g=window.setTimeout(mxUtils.bind(this,function(){DrawioFile.SYNC="manual";var a=this.getCurrentFile();null!=a&&null!=a.sync&&(a.sync.destroy(),a.sync=null,a=mxUtils.htmlEntities(mxResources.get("timeout")),
+this.editor.setStatus('<div title="'+a+'" class="geStatusAlert" style="overflow:hidden;">'+a+"</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(a){window.clearTimeout(g)}))}}else null!=this.menubar&&(this.menubar.container.style.paddingTop="0px");this.updateHeader();null!=this.menubar&&(this.buttonContainer=document.createElement("div"),this.buttonContainer.style.display=
"inline-block",this.buttonContainer.style.paddingRight="48px",this.buttonContainer.style.position="absolute",this.buttonContainer.style.right="0px",this.menubar.container.appendChild(this.buttonContainer));"atlas"==uiTheme&&null!=this.menubar&&(null!=this.toggleElement&&(this.toggleElement.click(),this.toggleElement.style.display="none"),this.icon=document.createElement("img"),this.icon.setAttribute("src",IMAGE_PATH+"/logo-flat-small.png"),this.icon.setAttribute("title",mxResources.get("draw.io")),
this.icon.style.padding="6px",this.icon.style.cursor="pointer",mxEvent.addListener(this.icon,"click",mxUtils.bind(this,function(a){this.appIconClicked(a)})),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)};
@@ -11327,10 +11330,10 @@ App.prototype.showRatingBanner=function(){if(!(this.bannerShowing||this.hideBann
"transform","translate(-50%,120%)");mxUtils.setPrefixedStyle(a.style,"transition","all 1s ease");a.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;";a.appendChild(d);mxUtils.write(a,"Please rate us");document.body.appendChild(a);var c=document.createElement("img");
c.setAttribute("border","0");c.setAttribute("align","absmiddle");c.setAttribute("title","1 star");c.setAttribute("style","margin-top:-6px;cursor:pointer;margin-left:8px;");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==");
a.appendChild(c);var b=document.createElement("img");b.setAttribute("border","0");b.setAttribute("align","absmiddle");b.setAttribute("title","2 star");b.setAttribute("style","margin-top:-6px;margin-left:3px;cursor:pointer;");b.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==");
-a.appendChild(b);var f=document.createElement("img");f.setAttribute("border","0");f.setAttribute("align","absmiddle");f.setAttribute("title","3 star");f.setAttribute("style","margin-top:-6px;margin-left:3px;cursor:pointer;");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==");
-a.appendChild(f);var g=document.createElement("img");g.setAttribute("border","0");g.setAttribute("align","absmiddle");g.setAttribute("title","4 star");g.setAttribute("style","margin-top:-6px;margin-left:3px;cursor:pointer;");g.setAttribute("src","data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTM5jWRgMAAAQRdEVYdFhNTDpjb20uYWRvYmUueG1wADw/eHBhY2tldCBiZWdpbj0iICAgIiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+Cjx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDQuMS1jMDM0IDQ2LjI3Mjk3NiwgU2F0IEphbiAyNyAyMDA3IDIyOjExOjQxICAgICAgICAiPgogICA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPgogICAgICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgICAgICAgICB4bWxuczp4YXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iPgogICAgICAgICA8eGFwOkNyZWF0b3JUb29sPkFkb2JlIEZpcmV3b3JrcyBDUzM8L3hhcDpDcmVhdG9yVG9vbD4KICAgICAgICAgPHhhcDpDcmVhdGVEYXRlPjIwMDgtMDItMTdUMDI6MzY6NDVaPC94YXA6Q3JlYXRlRGF0ZT4KICAgICAgICAgPHhhcDpNb2RpZnlEYXRlPjIwMDktMDMtMTdUMTQ6MTI6MDJaPC94YXA6TW9kaWZ5RGF0ZT4KICAgICAgPC9yZGY6RGVzY3JpcHRpb24+CiAgICAgIDxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PSIiCiAgICAgICAgICAgIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyI+CiAgICAgICAgIDxkYzpmb3JtYXQ+aW1hZ2UvcG5nPC9kYzpmb3JtYXQ+CiAgICAgIDwvcmRmOkRlc2NyaXB0aW9uPgogICA8L3JkZjpSREY+CjwveDp4bXBtZXRhPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIIImu8AAAAAVdEVYdENyZWF0aW9uIFRpbWUAMi8xNy8wOCCcqlgAAAHuSURBVDiNlZJBi1JRGIbfk+fc0ZuMXorJe4XujWoMdREaA23HICj6AQeLINr0C4I27ab27VqOI9+q/sH8gMDceG1RkIwgClEXFMbRc5zTZgZURmG+5fu9PN/7Hg6wZohoh4h21nn4uqXW+q0xZgzg+SrPlTXX73uet+26bp6ICpcGaK1fua57M5vN3tZav7gUgIiSqVTqcRAEm0EQbCaTyQoRXb3Iy4hoG8CT6XSaY4xtMMaSQohMPp8v+r7vAEC3243CMGwqpfoApsaYE8uyfgM45ABOjDEvXdfNlMvlzFINAIDneY7neZVzvdlsDgaDQYtzfsjOIjtKqU+e5+0Wi0V3VV8ACMOw3+/3v3HOX0sp/7K53te11h/S6fRuoVAIhBAL76OUOm2320dRFH0VQuxJKf8BAFu+UKvVvpRKpWe2bYt5fTweq0ajQUKIN1LK43N94SMR0Y1YLLYlhBBKqQUw51wkEol7WmuzoC8FuJtIJLaUUoii6Ljb7f4yxpz6vp9zHMe2bfvacDi8BeDHKkBuNps5rVbr52QyaVuW9ZExttHpdN73ej0/Ho+nADxYCdBaV0aj0RGAz5ZlHUgpx2erR/V6/d1wOHwK4CGA/QsBnPN9AN+llH+WkqFare4R0QGAO/M6M8Ysey81/wGqa8MlVvHPNAAAAABJRU5ErkJggg==");
-a.appendChild(g);this.bannerShowing=!0;var m=mxUtils.bind(this,function(){null!=a.parentNode&&(a.parentNode.removeChild(a),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(a){mxEvent.consume(a);m()}));mxEvent.addListener(c,"click",mxUtils.bind(this,function(a){mxEvent.consume(a);m()}));mxEvent.addListener(b,"click",mxUtils.bind(this,
-function(a){mxEvent.consume(a);m()}));mxEvent.addListener(f,"click",mxUtils.bind(this,function(a){mxEvent.consume(a);m()}));mxEvent.addListener(g,"click",mxUtils.bind(this,function(a){mxEvent.consume(a);window.open("https://marketplace.atlassian.com/apps/1210933/draw-io-diagrams-for-confluence?hosting=datacenter&tab=reviews");m()}));d=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(a.style,"transform","translate(-50%,120%)");window.setTimeout(mxUtils.bind(this,function(){m()}),1E3)});window.setTimeout(mxUtils.bind(this,
+a.appendChild(b);var g=document.createElement("img");g.setAttribute("border","0");g.setAttribute("align","absmiddle");g.setAttribute("title","3 star");g.setAttribute("style","margin-top:-6px;margin-left:3px;cursor:pointer;");g.setAttribute("src","data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTM5jWRgMAAAQRdEVYdFhNTDpjb20uYWRvYmUueG1wADw/eHBhY2tldCBiZWdpbj0iICAgIiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+Cjx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDQuMS1jMDM0IDQ2LjI3Mjk3NiwgU2F0IEphbiAyNyAyMDA3IDIyOjExOjQxICAgICAgICAiPgogICA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPgogICAgICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgICAgICAgICB4bWxuczp4YXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iPgogICAgICAgICA8eGFwOkNyZWF0b3JUb29sPkFkb2JlIEZpcmV3b3JrcyBDUzM8L3hhcDpDcmVhdG9yVG9vbD4KICAgICAgICAgPHhhcDpDcmVhdGVEYXRlPjIwMDgtMDItMTdUMDI6MzY6NDVaPC94YXA6Q3JlYXRlRGF0ZT4KICAgICAgICAgPHhhcDpNb2RpZnlEYXRlPjIwMDktMDMtMTdUMTQ6MTI6MDJaPC94YXA6TW9kaWZ5RGF0ZT4KICAgICAgPC9yZGY6RGVzY3JpcHRpb24+CiAgICAgIDxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PSIiCiAgICAgICAgICAgIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyI+CiAgICAgICAgIDxkYzpmb3JtYXQ+aW1hZ2UvcG5nPC9kYzpmb3JtYXQ+CiAgICAgIDwvcmRmOkRlc2NyaXB0aW9uPgogICA8L3JkZjpSREY+CjwveDp4bXBtZXRhPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIIImu8AAAAAVdEVYdENyZWF0aW9uIFRpbWUAMi8xNy8wOCCcqlgAAAHuSURBVDiNlZJBi1JRGIbfk+fc0ZuMXorJe4XujWoMdREaA23HICj6AQeLINr0C4I27ab27VqOI9+q/sH8gMDceG1RkIwgClEXFMbRc5zTZgZURmG+5fu9PN/7Hg6wZohoh4h21nn4uqXW+q0xZgzg+SrPlTXX73uet+26bp6ICpcGaK1fua57M5vN3tZav7gUgIiSqVTqcRAEm0EQbCaTyQoRXb3Iy4hoG8CT6XSaY4xtMMaSQohMPp8v+r7vAEC3243CMGwqpfoApsaYE8uyfgM45ABOjDEvXdfNlMvlzFINAIDneY7neZVzvdlsDgaDQYtzfsjOIjtKqU+e5+0Wi0V3VV8ACMOw3+/3v3HOX0sp/7K53te11h/S6fRuoVAIhBAL76OUOm2320dRFH0VQuxJKf8BAFu+UKvVvpRKpWe2bYt5fTweq0ajQUKIN1LK43N94SMR0Y1YLLYlhBBKqQUw51wkEol7WmuzoC8FuJtIJLaUUoii6Ljb7f4yxpz6vp9zHMe2bfvacDi8BeDHKkBuNps5rVbr52QyaVuW9ZExttHpdN73ej0/Ho+nADxYCdBaV0aj0RGAz5ZlHUgpx2erR/V6/d1wOHwK4CGA/QsBnPN9AN+llH+WkqFare4R0QGAO/M6M8Ysey81/wGqa8MlVvHPNAAAAABJRU5ErkJggg==");
+a.appendChild(g);var f=document.createElement("img");f.setAttribute("border","0");f.setAttribute("align","absmiddle");f.setAttribute("title","4 star");f.setAttribute("style","margin-top:-6px;margin-left:3px;cursor:pointer;");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==");
+a.appendChild(f);this.bannerShowing=!0;var m=mxUtils.bind(this,function(){null!=a.parentNode&&(a.parentNode.removeChild(a),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(a){mxEvent.consume(a);m()}));mxEvent.addListener(c,"click",mxUtils.bind(this,function(a){mxEvent.consume(a);m()}));mxEvent.addListener(b,"click",mxUtils.bind(this,
+function(a){mxEvent.consume(a);m()}));mxEvent.addListener(g,"click",mxUtils.bind(this,function(a){mxEvent.consume(a);m()}));mxEvent.addListener(f,"click",mxUtils.bind(this,function(a){mxEvent.consume(a);window.open("https://marketplace.atlassian.com/apps/1210933/draw-io-diagrams-for-confluence?hosting=datacenter&tab=reviews");m()}));d=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(a.style,"transform","translate(-50%,120%)");window.setTimeout(mxUtils.bind(this,function(){m()}),1E3)});window.setTimeout(mxUtils.bind(this,
function(){mxUtils.setPrefixedStyle(a.style,"transform","translate(-50%,0%)")}),500);window.setTimeout(d,6E4)}};
App.prototype.checkLicense=function(){var a=this.drive.getUser(),d=("1"==urlParams.dev?urlParams.lic:null)||(null!=a?a.email:null);if(!this.isOffline()&&!this.editor.chromeless&&null!=d){var c=d.lastIndexOf("@"),b=d;0<=c&&(b=d.substring(c+1),d=Editor.crc32(d.substring(0,c))+"@"+b);mxUtils.post("/license","domain="+encodeURIComponent(b)+"&email="+encodeURIComponent(d)+"&lc="+encodeURIComponent(a.locale)+"&ts="+(new Date).getTime(),mxUtils.bind(this,function(a){try{if(200<=a.getStatus()&&299>=a.getStatus()){var c=
a.getText();if(0<c.length){var d=JSON.parse(c);null!=d&&this.handleLicense(d,b)}}}catch(e){}}))}};App.prototype.handleLicense=function(a,d){null!=a&&null!=a.plugins&&App.loadPlugins(a.plugins.split(";"),!0)};App.prototype.getEditBlankXml=function(){var a=this.getCurrentFile();return null!=a&&this.editor.isChromelessView()&&this.editor.graph.isLightboxView()?a.getData():this.getFileData(!0)};App.prototype.updateActionStates=function(){EditorUi.prototype.updateActionStates.apply(this,arguments);this.actions.get("revisionHistory").setEnabled(this.isRevisionHistoryEnabled())};
@@ -11338,14 +11341,14 @@ App.prototype.addRecent=function(a){if(isLocalStorage&&null!=localStorage){var d
App.prototype.resetRecent=function(a){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 a=this.getCurrentFile();if(null!=a)if(a.constructor!=LocalFile||""!=a.getHash()||a.isModified()||"1"==urlParams.nowarn||this.isDiagramEmpty()||null!=urlParams.url||this.editor.isChromelessView()||null!=a.fileHandle){if(a.isModified())return mxResources.get("allChangesLost");a.close(!0)}else return mxResources.get("ensureDataSaved")};
App.prototype.updateDocumentTitle=function(){if(!this.editor.graph.isLightboxView()){var a=this.editor.appName,d=this.getCurrentFile();this.isOfflineApp()&&(a+=" app");null!=d&&(a=(null!=d.getTitle()?d.getTitle():this.defaultFilename)+" - "+a);document.title!=a&&(document.title=a,a=this.editor.graph,a.invalidateDescendantsWithPlaceholders(a.model.getRoot()),a.view.validate())}};
-App.prototype.getThumbnail=function(a,d){var c=!1;try{var b=!0,f=window.setTimeout(mxUtils.bind(this,function(){b=!1;d(null)}),this.timeout),g=mxUtils.bind(this,function(a){window.clearTimeout(f);b&&d(a)});null==this.thumbImageCache&&(this.thumbImageCache={});var m=this.editor.graph,e=m.backgroundImage,k=null!=m.themes&&"darkTheme"==m.defaultThemeName;if(null!=this.pages&&(k||this.currentPage!=this.pages[0])){var l=m.getGlobalVariable,m=this.createTemporaryGraph(k?m.getDefaultStylesheet():m.getStylesheet()),
+App.prototype.getThumbnail=function(a,d){var c=!1;try{var b=!0,g=window.setTimeout(mxUtils.bind(this,function(){b=!1;d(null)}),this.timeout),f=mxUtils.bind(this,function(a){window.clearTimeout(g);b&&d(a)});null==this.thumbImageCache&&(this.thumbImageCache={});var m=this.editor.graph,e=m.backgroundImage,k=null!=m.themes&&"darkTheme"==m.defaultThemeName;if(null!=this.pages&&(k||this.currentPage!=this.pages[0])){var l=m.getGlobalVariable,m=this.createTemporaryGraph(k?m.getDefaultStylesheet():m.getStylesheet()),
n=this.pages[0];null!=n.viewState&&null!=n.viewState?(e=n.viewState.backgroundImage,m.backgroundImage=e):this.currentPage==this.pages[0]&&(m.backgroundImage=e);k&&(m.defaultThemeName="default");m.getGlobalVariable=function(a){return"page"==a?n.getName():"pagenumber"==a?1:l.apply(this,arguments)};m.getGlobalVariable=l;document.body.appendChild(m.container);m.model.setRoot(n.root)}if(mxClient.IS_CHROMEAPP||this.useCanvasForExport)this.editor.exportToCanvas(mxUtils.bind(this,function(a){try{m!=this.editor.graph&&
-null!=m.container.parentNode&&m.container.parentNode.removeChild(m.container)}catch(F){a=null}g(a)}),a,this.thumbImageCache,"#ffffff",function(){g()},null,null,null,null,null,null,m,null,null,null,null,"diagram",null),c=!0;else if(this.canvasSupported&&null!=this.getCurrentFile()){var p=document.createElement("canvas"),q=m.getGraphBounds(),u=m.view.translate,t=m.view.scale;null!=e&&q.add(new mxRectangle((u.x+e.x)*t,(u.y+e.y)*t,e.width*t,e.height*t));var v=a/q.width,v=Math.min(1,Math.min(3*a/(4*q.height),
+null!=m.container.parentNode&&m.container.parentNode.removeChild(m.container)}catch(F){a=null}f(a)}),a,this.thumbImageCache,"#ffffff",function(){f()},null,null,null,null,null,null,m,null,null,null,null,"diagram",null),c=!0;else if(this.canvasSupported&&null!=this.getCurrentFile()){var p=document.createElement("canvas"),q=m.getGraphBounds(),u=m.view.translate,t=m.view.scale;null!=e&&q.add(new mxRectangle((u.x+e.x)*t,(u.y+e.y)*t,e.width*t,e.height*t));var v=a/q.width,v=Math.min(1,Math.min(3*a/(4*q.height),
v)),z=Math.floor(q.x),y=Math.floor(q.y);p.setAttribute("width",Math.ceil(v*(q.width+4)));p.setAttribute("height",Math.ceil(v*(q.height+4)));var x=p.getContext("2d");x.scale(v,v);x.translate(-z,-y);var A=m.background;if(null==A||""==A||A==mxConstants.NONE)A="#ffffff";x.save();x.fillStyle=A;x.fillRect(z,y,Math.ceil(q.width+4),Math.ceil(q.height+4));x.restore();if(null!=e){var B=new Image;B.src=e.src;x.drawImage(B,e.x*v,e.y*v,e.width*v,e.height*v)}var C=new mxJsCanvas(p),D=new mxAsyncCanvas(this.thumbImageCache);
-C.images=this.thumbImageCache.images;var G=new mxImageExport;G.drawShape=function(a,b){a.shape instanceof mxShape&&a.shape.checkBounds()&&(b.save(),b.translate(.5,.5),a.shape.paint(b),b.translate(-.5,-.5),b.restore())};G.drawText=function(a,b){};G.drawState(m.getView().getState(m.model.root),D);D.finish(mxUtils.bind(this,function(){try{G.drawState(m.getView().getState(m.model.root),C),m!=this.editor.graph&&null!=m.container.parentNode&&m.container.parentNode.removeChild(m.container)}catch(E){p=null}g(p)}));
-c=!0}}catch(E){c=!1,null!=m&&m!=this.editor.graph&&null!=m.container.parentNode&&m.container.parentNode.removeChild(m.container)}c||window.clearTimeout(f);return c};App.prototype.createBackground=function(){var a=this.createDiv("background");a.style.position="absolute";a.style.background="white";a.style.left="0px";a.style.top="0px";a.style.bottom="0px";a.style.right="0px";mxUtils.setOpacity(a,100);return a};
+C.images=this.thumbImageCache.images;var G=new mxImageExport;G.drawShape=function(a,b){a.shape instanceof mxShape&&a.shape.checkBounds()&&(b.save(),b.translate(.5,.5),a.shape.paint(b),b.translate(-.5,-.5),b.restore())};G.drawText=function(a,b){};G.drawState(m.getView().getState(m.model.root),D);D.finish(mxUtils.bind(this,function(){try{G.drawState(m.getView().getState(m.model.root),C),m!=this.editor.graph&&null!=m.container.parentNode&&m.container.parentNode.removeChild(m.container)}catch(E){p=null}f(p)}));
+c=!0}}catch(E){c=!1,null!=m&&m!=this.editor.graph&&null!=m.container.parentNode&&m.container.parentNode.removeChild(m.container)}c||window.clearTimeout(g);return c};App.prototype.createBackground=function(){var a=this.createDiv("background");a.style.position="absolute";a.style.background="white";a.style.left="0px";a.style.top="0px";a.style.bottom="0px";a.style.right="0px";mxUtils.setOpacity(a,100);return a};
(function(){var a=EditorUi.prototype.setMode;App.prototype.setMode=function(d,c){a.apply(this,arguments);null!=this.mode&&(Editor.useLocalStorage=this.mode==App.MODE_BROWSER);if(null!=this.appIcon){var b=this.getCurrentFile();d=null!=b?b.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(c)try{if(isLocalStorage)localStorage.setItem(".mode",d);else if("undefined"!=typeof Storage){var f=new Date;f.setYear(f.getFullYear()+1);document.cookie="MODE="+d+"; expires="+f.toUTCString()}}catch(g){}}})();
+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(c)try{if(isLocalStorage)localStorage.setItem(".mode",d);else if("undefined"!=typeof Storage){var g=new Date;g.setYear(g.getFullYear()+1);document.cookie="MODE="+d+"; expires="+g.toUTCString()}}catch(f){}}})();
App.prototype.appIconClicked=function(a){if(mxEvent.isAltDown(a))this.showSplash(!0);else{var d=this.getCurrentFile(),c=null!=d?d.getMode():null;c==App.MODE_GOOGLE?null!=d&&null!=d.desc&&null!=d.desc.parents&&0<d.desc.parents.length&&!mxEvent.isShiftDown(a)?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"):c==App.MODE_ONEDRIVE?null!=
d&&null!=d.meta&&null!=d.meta.webUrl?(c=d.meta.webUrl,d=encodeURIComponent(d.meta.name),c.substring(c.length-d.length,c.length)==d&&(c=c.substring(0,c.length-d.length)),this.openLink(c)):this.openLink("https://onedrive.live.com/"):c==App.MODE_DROPBOX?null!=d&&null!=d.stat&&null!=d.stat.path_display?(c="https://www.dropbox.com/home/Apps/drawio"+d.stat.path_display,mxEvent.isShiftDown(a)||(c=c.substring(0,c.length-d.stat.name.length)),this.openLink(c)):this.openLink("https://www.dropbox.com/"):c==App.MODE_TRELLO?
this.openLink("https://trello.com/"):c==App.MODE_NOTION?this.openLink("https://www.notion.so/"):c==App.MODE_GITHUB?null!=d&&d.constructor==GitHubFile?this.openLink(d.meta.html_url):this.openLink("https://github.com/"):c==App.MODE_GITLAB?null!=d&&d.constructor==GitLabFile?this.openLink(d.meta.html_url):this.openLink(DRAWIO_GITLAB_URL):c==App.MODE_DEVICE&&this.openLink("https://get.draw.io/")}mxEvent.consume(a)};
@@ -11358,20 +11361,20 @@ App.prototype.showRefreshDialog=function(a,d){if(!this.showingRefreshDialog&&(th
this.createRealtimeNotice();c.style.left="0";c.style.right="0";c.style.borderRadius="0";c.style.borderLeftStyle="none";c.style.borderRightStyle="none";c.style.marginBottom="26px";c.style.padding="8px 0 8px 0";this.dialog.container.appendChild(c)}};
App.prototype.showAlert=function(a){if(null!=a&&0<a.length){var d=document.createElement("div");d.className="geAlert";d.style.zIndex=2E9;d.style.left="50%";d.style.top="-100%";mxUtils.setPrefixedStyle(d.style,"transform","translate(-50%,0%)");mxUtils.setPrefixedStyle(d.style,"transition","all 1s ease");d.innerHTML=a;a=document.createElement("a");a.className="geAlertLink";a.style.textAlign="right";a.style.marginTop="20px";a.style.display="block";a.setAttribute("title",mxResources.get("close"));a.innerHTML=
mxResources.get("close");d.appendChild(a);mxEvent.addListener(a,"click",function(a){null!=d.parentNode&&(d.parentNode.removeChild(d),mxEvent.consume(a))});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 a=this;window.onerror=function(b,c,d,f,l){"ResizeObserver loop limit exceeded"!=b&&(EditorUi.logError("Uncaught: "+(null!=b?b:""),c,d,f,l,null,!0),a.handleError({message:b},mxResources.get("unknownError"),null,null,null,null,!0))};if("1"!=urlParams.client&&"1"!=urlParams.embed){try{isLocalStorage&&window.addEventListener("storage",mxUtils.bind(this,
-function(a){var b=this.getCurrentFile();EditorUi.debug("storage event",a,b);null!=b&&".draft-alive-check"==a.key&&null!=a.newValue&&null!=b.draftId&&(this.draftAliveCheck=a.newValue,b.saveDraft())})),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||this.isOfflineApp()||null!=urlParams.open||!/www\.draw\.io$/.test(window.location.hostname)||this.editor.chromeless&&!this.editor.editable||this.showNameChangeBanner()}catch(g){}mxEvent.addListener(window,"hashchange",mxUtils.bind(this,function(a){try{this.hideDialog();
-var b=this.getDiagramId(),c=this.getCurrentFile();null!=c&&c.getHash()==b||this.loadFile(b,!0)}catch(k){null!=document.body&&this.handleError(k,mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var a=this.getCurrentFile();window.location.hash=null!=a?a.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(a){this.handleError(a,mxResources.get("errorLoadingFile"))}))}catch(g){this.handleError(g,
+App.prototype.start=function(){null!=this.bg&&null!=this.bg.parentNode&&this.bg.parentNode.removeChild(this.bg);this.restoreLibraries();this.spinner.stop();try{var a=this;window.onerror=function(b,c,d,g,l){"ResizeObserver loop limit exceeded"!=b&&(EditorUi.logError("Uncaught: "+(null!=b?b:""),c,d,g,l,null,!0),a.handleError({message:b},mxResources.get("unknownError"),null,null,null,null,!0))};if("1"!=urlParams.client&&"1"!=urlParams.embed){try{isLocalStorage&&window.addEventListener("storage",mxUtils.bind(this,
+function(a){var b=this.getCurrentFile();EditorUi.debug("storage event",a,b);null!=b&&".draft-alive-check"==a.key&&null!=a.newValue&&null!=b.draftId&&(this.draftAliveCheck=a.newValue,b.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(f){}mxEvent.addListener(window,"hashchange",mxUtils.bind(this,function(a){try{this.hideDialog();
+var b=this.getDiagramId(),c=this.getCurrentFile();null!=c&&c.getHash()==b||this.loadFile(b,!0)}catch(k){null!=document.body&&this.handleError(k,mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var a=this.getCurrentFile();window.location.hash=null!=a?a.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(a){this.handleError(a,mxResources.get("errorLoadingFile"))}))}catch(f){this.handleError(f,
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 a=mxUtils.bind(this,function(a){"data:image/png;base64,"==a.substring(0,22)&&(a=this.extractGraphModelFromPng(a));var b=urlParams.title,
b=null!=b?decodeURIComponent(b):this.defaultFilename;a=new LocalFile(this,a,b,!0);null!=window.location.hash&&"#P"==window.location.hash.substring(0,2)&&(a.getHash=function(){return window.location.hash.substring(1)});this.fileLoaded(a);this.getCurrentFile().setModified(!this.editor.chromeless)}),b=window.opener||window.parent;if(b!=window){var c=urlParams.create;null!=c?a(b[decodeURIComponent(c)]):(c=urlParams.data,null!=c?a(decodeURIComponent(c)):this.installMessageHandler(mxUtils.bind(this,function(c,
d){d.source==b&&a(c)})))}}else if(null==this.dialog)if("1"==urlParams.demo)c=Editor.useLocalStorage,this.createFile(this.defaultFilename,null,null,null,null,null,null,!0),Editor.useLocalStorage=c;else{c=!1;try{c=null!=window.opener&&null!=window.opener.openFile}catch(k){}c?this.spinner.spin(document.body,mxResources.get("loading")):(c=this.getDiagramId(),!EditorUi.enableDrafts||null!=urlParams.mode&&!EditorUi.isElectronApp||"draw.io"!=this.getServiceName()||null!=c&&0!=c.length||this.editor.isChromelessView()?
null!=c&&0<c.length?this.loadFile(c,null,null,mxUtils.bind(this,function(){var a=decodeURIComponent(urlParams.viewbox||"");if(""!=a)try{var b=JSON.parse(a);this.editor.graph.fitWindow(b,b.border)}catch(n){console.error(n)}})):"0"!=urlParams.splash?this.loadFile():this.createFile(this.defaultFilename,this.getFileData(),null,null,null,null,null,!0):this.checkDrafts())}}),c=decodeURIComponent(urlParams.create||"");if((null==window.location.hash||1>=window.location.hash.length)&&null!=c&&0<c.length&&
-this.spinner.spin(document.body,mxResources.get("loading"))){var b=mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("reconnecting"))&&(window.location.search=this.getSearch(["create","title"]))}),f=mxUtils.bind(this,function(a){this.spinner.stop();if("0"!=urlParams.splash){this.fileLoaded(new LocalFile(this,a,null));this.editor.graph.setEnabled(!1);this.mode=urlParams.mode;var b=urlParams.title,b=null!=b?decodeURIComponent(b):this.defaultFilename;a=this.getServiceCount(!0);
+this.spinner.spin(document.body,mxResources.get("loading"))){var b=mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("reconnecting"))&&(window.location.search=this.getSearch(["create","title"]))}),g=mxUtils.bind(this,function(a){this.spinner.stop();if("0"!=urlParams.splash){this.fileLoaded(new LocalFile(this,a,null));this.editor.graph.setEnabled(!1);this.mode=urlParams.mode;var b=urlParams.title,b=null!=b?decodeURIComponent(b):this.defaultFilename;a=this.getServiceCount(!0);
isLocalStorage&&a++;var c=4>=a?2:6<a?4:3,b=new CreateDialog(this,b,mxUtils.bind(this,function(a,b){if(null==b){this.hideDialog();var c=Editor.useLocalStorage;this.createFile(0<a.length?a:this.defaultFilename,this.getFileData(),null,null,null,!0,null,!0);Editor.useLocalStorage=c}else this.pickFolder(b,mxUtils.bind(this,function(c){this.createFile(a,this.getFileData(!0),null,b,null,!0,c)}))}),null,null,null,null,"1"==urlParams.browser,null,null,!0,c,null,null,null,this.editor.fileExtensions);this.showDialog(b.container,
-400,a>c?390:270,!0,!1,mxUtils.bind(this,function(a){a&&null==this.getCurrentFile()&&this.showSplash()}));b.init()}}),c=decodeURIComponent(c);if("http://"!=c.substring(0,7)&&"https://"!=c.substring(0,8))try{null!=window.opener&&null!=window.opener[c]?f(window.opener[c]):this.handleError(null,mxResources.get("errorLoadingFile"))}catch(g){this.handleError(g,mxResources.get("errorLoadingFile"))}else this.loadTemplate(c,function(a){f(a)},mxUtils.bind(this,function(){this.handleError(null,mxResources.get("errorLoadingFile"),
+400,a>c?390:270,!0,!1,mxUtils.bind(this,function(a){a&&null==this.getCurrentFile()&&this.showSplash()}));b.init()}}),c=decodeURIComponent(c);if("http://"!=c.substring(0,7)&&"https://"!=c.substring(0,8))try{null!=window.opener&&null!=window.opener[c]?g(window.opener[c]):this.handleError(null,mxResources.get("errorLoadingFile"))}catch(f){this.handleError(f,mxResources.get("errorLoadingFile"))}else this.loadTemplate(c,function(a){g(a)},mxUtils.bind(this,function(){this.handleError(null,mxResources.get("errorLoadingFile"),
b)}))}else(null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.state&&null!=this.stateArg&&"open"==this.stateArg.action?null!=this.stateArg.ids&&(window.history&&window.history.replaceState&&window.history.replaceState(null,null,window.location.pathname+this.getSearch(["state"])),window.location.hash="G"+this.stateArg.ids[0]):(null==window.location.hash||1>=window.location.hash.length)&&null!=this.drive&&null!=this.stateArg&&"create"==this.stateArg.action?(window.history&&
-window.history.replaceState&&window.history.replaceState(null,null,window.location.pathname+this.getSearch(["state"])),this.setMode(App.MODE_GOOGLE),"0"==urlParams.splash?this.createFile(null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename):this.actions.get("new").funct()):(null!=urlParams.open&&window.history&&window.history.replaceState&&(window.history.replaceState(null,null,window.location.pathname+this.getSearch(["open"])),window.location.hash=urlParams.open),d())}}catch(g){this.handleError(g)}};
+window.history.replaceState&&window.history.replaceState(null,null,window.location.pathname+this.getSearch(["state"])),this.setMode(App.MODE_GOOGLE),"0"==urlParams.splash?this.createFile(null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename):this.actions.get("new").funct()):(null!=urlParams.open&&window.history&&window.history.replaceState&&(window.history.replaceState(null,null,window.location.pathname+this.getSearch(["open"])),window.location.hash=urlParams.open),d())}}catch(f){this.handleError(f)}};
App.prototype.loadDraft=function(a,d){this.createFile(this.defaultFilename,a,null,null,mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,function(){var a=this.getCurrentFile();null!=a&&(a.fileChanged(),null!=d&&d())}),0)}),null,null,!0)};
-App.prototype.checkDrafts=function(){try{var a=Editor.guid();localStorage.setItem(".draft-alive-check",a);window.setTimeout(mxUtils.bind(this,function(){localStorage.removeItem(".draft-alive-check");this.getDatabaseItems(mxUtils.bind(this,function(d){for(var c=[],b=0;b<d.length;b++)try{var f=d[b].key;if(null!=f&&".draft_"==f.substring(0,7)){var g=JSON.parse(d[b].data);null!=g&&"draft"==g.type&&g.aliveCheck!=a&&(g.key=f,c.push(g))}}catch(m){}1==c.length?this.loadDraft(c[0].data,mxUtils.bind(this,function(){this.removeDatabaseItem(c[0].key)})):
+App.prototype.checkDrafts=function(){try{var a=Editor.guid();localStorage.setItem(".draft-alive-check",a);window.setTimeout(mxUtils.bind(this,function(){localStorage.removeItem(".draft-alive-check");this.getDatabaseItems(mxUtils.bind(this,function(d){for(var c=[],b=0;b<d.length;b++)try{var g=d[b].key;if(null!=g&&".draft_"==g.substring(0,7)){var f=JSON.parse(d[b].data);null!=f&&"draft"==f.type&&f.aliveCheck!=a&&(f.key=g,c.push(f))}}catch(m){}1==c.length?this.loadDraft(c[0].data,mxUtils.bind(this,function(){this.removeDatabaseItem(c[0].key)})):
1<c.length?(d=new Date(c[0].modified),d=new DraftDialog(this,1<c.length?mxResources.get("selectDraft"):mxResources.get("draftFound",[d.toLocaleDateString()+" "+d.toLocaleTimeString()]),1<c.length?null:c[0].data,mxUtils.bind(this,function(a){this.hideDialog();a=""!=a?a:0;this.loadDraft(c[a].data,mxUtils.bind(this,function(){this.removeDatabaseItem(c[a].key)}))}),mxUtils.bind(this,function(a,b){a=""!=a?a:0;this.confirm(mxResources.get("areYouSure"),null,mxUtils.bind(this,function(){this.removeDatabaseItem(c[a].key);
null!=b&&b()}),mxResources.get("no"),mxResources.get("yes"))}),null,null,null,1<c.length?c:null),this.showDialog(d.container,640,480,!0,!1,mxUtils.bind(this,function(a){"0"!=urlParams.splash?this.loadFile():this.createFile(this.defaultFilename,this.getFileData(),null,null,null,null,null,!0)})),d.init()):"0"!=urlParams.splash?this.loadFile():this.createFile(this.defaultFilename,this.getFileData(),null,null,null,null,null,!0)}),mxUtils.bind(this,function(){"0"!=urlParams.splash?this.loadFile():this.createFile(this.defaultFilename,
this.getFileData(),null,null,null,null,null,!0)}))}),0)}catch(d){}};
@@ -11380,44 +11383,44 @@ mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){this.showSplash
App.prototype.addLanguageMenu=function(a,d){var c=null;if(null!=this.menus.get("language")){c=document.createElement("div");c.setAttribute("title",mxResources.get("language"));c.className="geIcon geSprite geSprite-globe";c.style.position="absolute";c.style.cursor="pointer";c.style.bottom="20px";c.style.right="20px";if(d){c.style.direction="rtl";c.style.textAlign="right";c.style.right="24px";var b=document.createElement("span");b.style.display="inline-block";b.style.fontSize="12px";b.style.margin=
"5px 24px 0 0";b.style.color="gray";b.style.userSelect="none";mxUtils.write(b,mxResources.get("language"));c.appendChild(b)}mxEvent.addListener(c,"click",mxUtils.bind(this,function(a){this.editor.graph.popupMenuHandler.hideMenu();var b=new mxPopupMenu(this.menus.get("language").funct);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 d=mxUtils.getOffset(c);
b.popup(d.x,d.y+c.offsetHeight,null,a);this.setCurrentMenu(b)}));a.appendChild(c)}return c};
-App.prototype.loadFileSystemEntry=function(a,d,c){c=null!=c?c:mxUtils.bind(this,function(a){this.handleError(a)});try{a.getFile().then(mxUtils.bind(this,function(b){var f=new FileReader;f.onload=mxUtils.bind(this,function(f){try{if(null!=d){var g=f.target.result;"image/png"==b.type&&(g=this.extractGraphModelFromPng(g));d(new LocalFile(this,g,b.name,null,a,b))}else this.openFileHandle(f.target.result,b.name,b,!1,a)}catch(e){c(e)}});f.onerror=c;"image"!==b.type.substring(0,5)&&"application/pdf"!==b.type||
-"image/svg"===b.type.substring(0,9)?f.readAsText(b):f.readAsDataURL(b)}),c)}catch(b){c(b)}};
-App.prototype.createFileSystemOptions=function(a){var d=[],c=null;if(null!=a){var b=a.lastIndexOf(".");0<b&&(c=a.substring(b+1))}for(b=0;b<this.editor.diagramFileTypes.length;b++){var f={description:mxResources.get(this.editor.diagramFileTypes[b].description)+(mxClient.IS_MAC?" (."+this.editor.diagramFileTypes[b].extension+")":""),accept:{}};f.accept[this.editor.diagramFileTypes[b].mimeType]=["."+this.editor.diagramFileTypes[b].extension];this.editor.diagramFileTypes[b].extension==c?d.splice(0,0,
-f):this.editor.diagramFileTypes[b].extension==c?d.splice(0,0,f):d.push(f)}return{types:d,fileName:a}};App.prototype.showSaveFilePicker=function(a,d,c){d=null!=d?d:mxUtils.bind(this,function(a){"AbortError"!=a.name&&this.handleError(a)});c=null!=c?c:this.createFileSystemOptions();window.showSaveFilePicker(c).then(mxUtils.bind(this,function(b){null!=b&&b.getFile().then(mxUtils.bind(this,function(c){a(b,c)}),d)}),d)};
+App.prototype.loadFileSystemEntry=function(a,d,c){c=null!=c?c:mxUtils.bind(this,function(a){this.handleError(a)});try{a.getFile().then(mxUtils.bind(this,function(b){var g=new FileReader;g.onload=mxUtils.bind(this,function(f){try{if(null!=d){var g=f.target.result;"image/png"==b.type&&(g=this.extractGraphModelFromPng(g));d(new LocalFile(this,g,b.name,null,a,b))}else this.openFileHandle(f.target.result,b.name,b,!1,a)}catch(e){c(e)}});g.onerror=c;"image"!==b.type.substring(0,5)&&"application/pdf"!==b.type||
+"image/svg"===b.type.substring(0,9)?g.readAsText(b):g.readAsDataURL(b)}),c)}catch(b){c(b)}};
+App.prototype.createFileSystemOptions=function(a){var d=[],c=null;if(null!=a){var b=a.lastIndexOf(".");0<b&&(c=a.substring(b+1))}for(b=0;b<this.editor.diagramFileTypes.length;b++){var g={description:mxResources.get(this.editor.diagramFileTypes[b].description)+(mxClient.IS_MAC?" (."+this.editor.diagramFileTypes[b].extension+")":""),accept:{}};g.accept[this.editor.diagramFileTypes[b].mimeType]=["."+this.editor.diagramFileTypes[b].extension];this.editor.diagramFileTypes[b].extension==c?d.splice(0,0,
+g):this.editor.diagramFileTypes[b].extension==c?d.splice(0,0,g):d.push(g)}return{types:d,fileName:a}};App.prototype.showSaveFilePicker=function(a,d,c){d=null!=d?d:mxUtils.bind(this,function(a){"AbortError"!=a.name&&this.handleError(a)});c=null!=c?c:this.createFileSystemOptions();window.showSaveFilePicker(c).then(mxUtils.bind(this,function(b){null!=b&&b.getFile().then(mxUtils.bind(this,function(c){a(b,c)}),d)}),d)};
App.prototype.pickFile=function(a){try{if(a=null!=a?a:this.mode,a==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(a);if(null!=d)d.pickFile();else if(a==App.MODE_DEVICE&&EditorUi.nativeFileSupport)window.showOpenFilePicker().then(mxUtils.bind(this,function(a){null!=a&&0<a.length&&this.spinner.spin(document.body,mxResources.get("loading"))&&this.loadFileSystemEntry(a[0])}),
mxUtils.bind(this,function(a){"AbortError"!=a.name&&this.handleError(a)}));else if(a==App.MODE_DEVICE&&Graph.fileSupport){if(null==this.openFileInputElt){var c=document.createElement("input");c.setAttribute("type","file");mxEvent.addListener(c,"change",mxUtils.bind(this,function(){null!=c.files&&(this.openFiles(c.files),c.type="",c.type="file",c.value="")}));c.style.display="none";document.body.appendChild(c);this.openFileInputElt=c}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(a,b){StorageFile.listFiles(this,"F",a,b)});window.openBrowserFile=mxUtils.bind(this,function(a,b,c){StorageFile.getFileContent(this,a,b,c)});window.deleteBrowserFile=mxUtils.bind(this,function(a,b,c){StorageFile.deleteFile(this,a,b,c)});var b=Editor.useLocalStorage;Editor.useLocalStorage=a==App.MODE_BROWSER;this.openFile();window.openFile.setConsumer(mxUtils.bind(this,
-function(b,c){var d=mxUtils.bind(this,function(){this.useCanvasForExport||".png"!=c.substring(c.length-4)||(c=c.substring(0,c.length-4)+".drawio");this.fileLoaded(a==App.MODE_BROWSER?new StorageFile(this,b,c):new LocalFile(this,b,c))}),e=this.getCurrentFile();null!=e&&e.isModified()?this.confirm(mxResources.get("allChangesLost"),null,d,mxResources.get("cancel"),mxResources.get("discardChanges")):d()}));var f=this.dialog,g=f.close;this.dialog.close=mxUtils.bind(this,function(a){Editor.useLocalStorage=
-b;g.apply(f,arguments);null==this.getCurrentFile()&&this.showSplash()})}}}catch(m){this.handleError(m)}};
+function(b,c){var d=mxUtils.bind(this,function(){this.useCanvasForExport||".png"!=c.substring(c.length-4)||(c=c.substring(0,c.length-4)+".drawio");this.fileLoaded(a==App.MODE_BROWSER?new StorageFile(this,b,c):new LocalFile(this,b,c))}),e=this.getCurrentFile();null!=e&&e.isModified()?this.confirm(mxResources.get("allChangesLost"),null,d,mxResources.get("cancel"),mxResources.get("discardChanges")):d()}));var g=this.dialog,f=g.close;this.dialog.close=mxUtils.bind(this,function(a){Editor.useLocalStorage=
+b;f.apply(g,arguments);null==this.getCurrentFile()&&this.showSplash()})}}}catch(m){this.handleError(m)}};
App.prototype.pickLibrary=function(a){a=null!=a?a:this.mode;if(a==App.MODE_GOOGLE||a==App.MODE_DROPBOX||a==App.MODE_ONEDRIVE||a==App.MODE_GITHUB||a==App.MODE_GITLAB||a==App.MODE_TRELLO||a==App.MODE_NOTION){var d=a==App.MODE_GOOGLE?this.drive:a==App.MODE_ONEDRIVE?this.oneDrive:a==App.MODE_GITHUB?this.gitHub:a==App.MODE_GITLAB?this.gitLab:a==App.MODE_TRELLO?this.trello:a==App.MODE_NOTION?this.notion:this.dropbox;null!=d&&d.pickLibrary(mxUtils.bind(this,function(a,b){if(null!=b)try{this.loadLibrary(b)}catch(m){this.handleError(m,
mxResources.get("errorLoadingFile"))}else this.spinner.spin(document.body,mxResources.get("loading"))&&d.getLibrary(a,mxUtils.bind(this,function(a){this.spinner.stop();try{this.loadLibrary(a)}catch(e){this.handleError(e,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(a){this.handleError(a,null!=a?mxResources.get("errorLoadingFile"):null)}))}))}else if(a==App.MODE_DEVICE&&Graph.fileSupport){if(null==this.libFileInputElt){var c=document.createElement("input");c.setAttribute("type",
"file");mxEvent.addListener(c,"change",mxUtils.bind(this,function(){if(null!=c.files){for(var a=0;a<c.files.length;a++)mxUtils.bind(this,function(a){var b=new FileReader;b.onload=mxUtils.bind(this,function(b){try{this.loadLibrary(new LocalLibrary(this,b.target.result,a.name))}catch(k){this.handleError(k,mxResources.get("errorLoadingFile"))}});b.readAsText(a)})(c.files[a]);c.type="";c.type="file";c.value=""}}));c.style.display="none";document.body.appendChild(c);this.libFileInputElt=c}this.libFileInputElt.click()}else{window.openNew=
!1;window.openKey="open";window.listBrowserFiles=mxUtils.bind(this,function(a,b){StorageFile.listFiles(this,"L",a,b)});window.openBrowserFile=mxUtils.bind(this,function(a,b,c){StorageFile.getFileContent(this,a,b,c)});window.deleteBrowserFile=mxUtils.bind(this,function(a,b,c){StorageFile.deleteFile(this,a,b,c)});var b=Editor.useLocalStorage;Editor.useLocalStorage=a==App.MODE_BROWSER;window.openFile=new OpenFile(mxUtils.bind(this,function(a){this.hideDialog(a)}));window.openFile.setConsumer(mxUtils.bind(this,
function(b,c){try{this.loadLibrary(a==App.MODE_BROWSER?new StorageLibrary(this,b,c):new LocalLibrary(this,b,c))}catch(m){this.handleError(m,mxResources.get("errorLoadingFile"))}}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:360,Editor.useLocalStorage?480:220,!0,!0,function(){Editor.useLocalStorage=b;window.openFile=null})}};
-App.prototype.saveLibrary=function(a,d,c,b,f,g,m){try{b=null!=b?b:this.mode;f=null!=f?f:!1;g=null!=g?g:!1;var e=this.createLibraryDataFromImages(d),k=mxUtils.bind(this,function(a){this.spinner.stop();null!=m&&m();this.handleError(a,null!=a?mxResources.get("errorSavingFile"):null)});null==c&&b==App.MODE_DEVICE&&(c=new LocalLibrary(this,e,a));if(null==c)this.pickFolder(b,mxUtils.bind(this,function(c){b==App.MODE_GOOGLE&&null!=this.drive&&this.spinner.spin(document.body,mxResources.get("inserting"))?
+App.prototype.saveLibrary=function(a,d,c,b,g,f,m){try{b=null!=b?b:this.mode;g=null!=g?g:!1;f=null!=f?f:!1;var e=this.createLibraryDataFromImages(d),k=mxUtils.bind(this,function(a){this.spinner.stop();null!=m&&m();this.handleError(a,null!=a?mxResources.get("errorSavingFile"):null)});null==c&&b==App.MODE_DEVICE&&(c=new LocalLibrary(this,e,a));if(null==c)this.pickFolder(b,mxUtils.bind(this,function(c){b==App.MODE_GOOGLE&&null!=this.drive&&this.spinner.spin(document.body,mxResources.get("inserting"))?
this.drive.insertFile(a,e,c,mxUtils.bind(this,function(a){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(a,d)}),k,this.drive.libraryMimeType):b==App.MODE_GITHUB&&null!=this.gitHub&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.gitHub.insertLibrary(a,e,mxUtils.bind(this,function(a){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(a,d)}),k,c):b==App.MODE_GITLAB&&null!=this.gitLab&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.gitLab.insertLibrary(a,
e,mxUtils.bind(this,function(a){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(a,d)}),k,c):b==App.MODE_NOTION&&null!=this.notion&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.notion.insertLibrary(a,e,mxUtils.bind(this,function(a){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(a,d)}),k,c):b==App.MODE_TRELLO&&null!=this.trello&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.trello.insertLibrary(a,e,mxUtils.bind(this,function(a){this.spinner.stop();
this.hideDialog(!0);this.libraryLoaded(a,d)}),k,c):b==App.MODE_DROPBOX&&null!=this.dropbox&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.dropbox.insertLibrary(a,e,mxUtils.bind(this,function(a){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(a,d)}),k,c):b==App.MODE_ONEDRIVE&&null!=this.oneDrive&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.oneDrive.insertLibrary(a,e,mxUtils.bind(this,function(a){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(a,
-d)}),k,c):b==App.MODE_BROWSER?(c=mxUtils.bind(this,function(){var b=new StorageLibrary(this,e,a);b.saveFile(a,!1,mxUtils.bind(this,function(){this.hideDialog(!0);this.libraryLoaded(b,d)}),k)}),null==localStorage.getItem(a)?c():this.confirm(mxResources.get("replaceIt",[a]),c)):this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})}));else if(f||this.spinner.spin(document.body,mxResources.get("saving"))){c.setData(e);var l=mxUtils.bind(this,function(){c.save(!0,mxUtils.bind(this,
-function(a){this.spinner.stop();this.hideDialog(!0);g||this.libraryLoaded(c,d);null!=m&&m()}),k)});if(a!=c.getTitle()){var n=c.getHash();c.rename(a,mxUtils.bind(this,function(a){c.constructor!=LocalLibrary&&n!=c.getHash()&&(mxSettings.removeCustomLibrary(n),mxSettings.addCustomLibrary(c.getHash()));this.removeLibrarySidebar(n);l()}),k)}else l()}}catch(p){this.handleError(p)}};
+d)}),k,c):b==App.MODE_BROWSER?(c=mxUtils.bind(this,function(){var b=new StorageLibrary(this,e,a);b.saveFile(a,!1,mxUtils.bind(this,function(){this.hideDialog(!0);this.libraryLoaded(b,d)}),k)}),null==localStorage.getItem(a)?c():this.confirm(mxResources.get("replaceIt",[a]),c)):this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})}));else if(g||this.spinner.spin(document.body,mxResources.get("saving"))){c.setData(e);var l=mxUtils.bind(this,function(){c.save(!0,mxUtils.bind(this,
+function(a){this.spinner.stop();this.hideDialog(!0);f||this.libraryLoaded(c,d);null!=m&&m()}),k)});if(a!=c.getTitle()){var n=c.getHash();c.rename(a,mxUtils.bind(this,function(a){c.constructor!=LocalLibrary&&n!=c.getHash()&&(mxSettings.removeCustomLibrary(n),mxSettings.addCustomLibrary(c.getHash()));this.removeLibrarySidebar(n);l()}),k)}else l()}}catch(p){this.handleError(p)}};
App.prototype.saveFile=function(a,d){var c=this.getCurrentFile();if(null!=c){var b=mxUtils.bind(this,function(){EditorUi.enableDrafts&&c.removeDraft();this.getCurrentFile()==c||c.isModified()||(c.getMode()!=App.MODE_DEVICE?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("allChangesSaved"))):this.editor.setStatus(""));null!=d&&d()});if(a||null==c.getTitle()||null!=c.invalidFileHandle||null==this.mode)if(null!=c&&c.constructor==LocalFile&&null!=c.fileHandle)this.showSaveFilePicker(mxUtils.bind(this,
-function(a,d){c.invalidFileHandle=null;c.fileHandle=a;c.title=d.name;c.desc=d;this.save(d.name,b)}),null,this.createFileSystemOptions(c.getTitle()));else{var f=null!=c.getTitle()?c.getTitle():this.defaultFilename,g=!mxClient.IS_IOS||!navigator.standalone,m=this.mode,e=this.getServiceCount(!0);isLocalStorage&&e++;var k=4>=e?2:6<e?4:3,f=new CreateDialog(this,f,mxUtils.bind(this,function(a,d,e){null!=a&&0<a.length&&(/(\.pdf)$/i.test(a)?this.confirm(mxResources.get("didYouMeanToExportToPdf"),mxUtils.bind(this,
+function(a,d){c.invalidFileHandle=null;c.fileHandle=a;c.title=d.name;c.desc=d;this.save(d.name,b)}),null,this.createFileSystemOptions(c.getTitle()));else{var g=null!=c.getTitle()?c.getTitle():this.defaultFilename,f=!mxClient.IS_IOS||!navigator.standalone,m=this.mode,e=this.getServiceCount(!0);isLocalStorage&&e++;var k=4>=e?2:6<e?4:3,g=new CreateDialog(this,g,mxUtils.bind(this,function(a,d,e){null!=a&&0<a.length&&(/(\.pdf)$/i.test(a)?this.confirm(mxResources.get("didYouMeanToExportToPdf"),mxUtils.bind(this,
function(){this.hideDialog();this.actions.get("exportPdf").funct()}),mxUtils.bind(this,function(){e.value=a.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==m&&d==App.MODE_DEVICE?null!=c&&EditorUi.nativeFileSupport?this.showSaveFilePicker(mxUtils.bind(this,function(a,d){c.fileHandle=a;c.mode=App.MODE_DEVICE;c.title=d.name;
c.desc=d;this.setMode(App.MODE_DEVICE);this.save(d.name,b)}),mxUtils.bind(this,function(a){"AbortError"!=a.name&&this.handleError(a)}),this.createFileSystemOptions(a)):(this.setMode(App.MODE_DEVICE),this.save(a,b)):"download"==d?(new LocalFile(this,null,a)).save():"_blank"==d?(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(this.getFileData(!0)),this.openLink(this.getUrl(window.location.pathname),null,!0)):m!=d?this.pickFolder(d,mxUtils.bind(this,function(c){this.createFile(a,
-this.getFileData(/(\.xml)$/i.test(a)||0>a.indexOf(".")||/(\.drawio)$/i.test(a),/(\.svg)$/i.test(a),/(\.html)$/i.test(a)),null,d,b,null==this.mode,c)})):null!=d&&this.save(a,b)))}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),null,null,g,null,!0,k,null,null,null,this.editor.fileExtensions,!1);this.showDialog(f.container,400,e>k?390:270,!0,!0);f.init()}else this.save(c.getTitle(),b)}};
-App.prototype.loadTemplate=function(a,d,c,b,f){var g=!1,m=a;this.editor.isCorsEnabledForUrl(m)||(m="t="+(new Date).getTime(),m=PROXY_URL+"?url="+encodeURIComponent(a)+"&base64=1&"+m,g=!0);var e=null!=b?b:a;this.editor.loadUrl(m,mxUtils.bind(this,function(b){try{var k=g?!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(b):atob(b):b,m=/(\.v(dx|sdx?))($|\?)/i.test(e)||/(\.vs(x|sx?))($|\?)/i.test(e);if(m||this.isVisioData(k))m||(e=f?this.isRemoteVisioData(k)?"raw.vss":"raw.vssx":this.isRemoteVisioData(k)?
+this.getFileData(/(\.xml)$/i.test(a)||0>a.indexOf(".")||/(\.drawio)$/i.test(a),/(\.svg)$/i.test(a),/(\.html)$/i.test(a)),null,d,b,null==this.mode,c)})):null!=d&&this.save(a,b)))}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),null,null,f,null,!0,k,null,null,null,this.editor.fileExtensions,!1);this.showDialog(g.container,400,e>k?390:270,!0,!0);g.init()}else this.save(c.getTitle(),b)}};
+App.prototype.loadTemplate=function(a,d,c,b,g){var f=!1,m=a;this.editor.isCorsEnabledForUrl(m)||(m="t="+(new Date).getTime(),m=PROXY_URL+"?url="+encodeURIComponent(a)+"&base64=1&"+m,f=!0);var e=null!=b?b:a;this.editor.loadUrl(m,mxUtils.bind(this,function(b){try{var k=f?!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(b):atob(b):b,m=/(\.v(dx|sdx?))($|\?)/i.test(e)||/(\.vs(x|sx?))($|\?)/i.test(e);if(m||this.isVisioData(k))m||(e=g?this.isRemoteVisioData(k)?"raw.vss":"raw.vssx":this.isRemoteVisioData(k)?
"raw.vsd":"raw.vsdx"),this.importVisio(this.base64ToBlob(b.substring(b.indexOf(",")+1)),function(a){d(a)},c,e);else if(!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(k,e))this.parseFile(new Blob([k],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&200<=a.status&&299>=a.status&&"<mxGraphModel"==a.responseText.substring(0,13)&&d(a.responseText)}),a);else if(this.isLucidChartData(k))this.convertLucidChart(k,mxUtils.bind(this,function(a){d(a)}),
-mxUtils.bind(this,function(a){c(a)}));else{if(/(\.png)($|\?)/i.test(e)||this.isPngData(k))k=this.extractGraphModelFromPng(b);d(k)}}catch(p){c(p)}}),c,/(\.png)($|\?)/i.test(e)||/(\.v(dx|sdx?))($|\?)/i.test(e)||/(\.vs(x|sx?))($|\?)/i.test(e),null,null,g)};
+mxUtils.bind(this,function(a){c(a)}));else{if(/(\.png)($|\?)/i.test(e)||this.isPngData(k))k=this.extractGraphModelFromPng(b);d(k)}}catch(p){c(p)}}),c,/(\.png)($|\?)/i.test(e)||/(\.v(dx|sdx?))($|\?)/i.test(e)||/(\.vs(x|sx?))($|\?)/i.test(e),null,null,f)};
App.prototype.getPeerForMode=function(a){return a==App.MODE_GOOGLE?this.drive:a==App.MODE_GITHUB?this.gitHub:a==App.MODE_GITLAB?this.gitLab:a==App.MODE_DROPBOX?this.dropbox:a==App.MODE_ONEDRIVE?this.oneDrive:a==App.MODE_TRELLO?this.trello:a==App.MODE_NOTION?this.notion:null};
-App.prototype.createFile=function(a,d,c,b,f,g,m,e,k){b=e?null:null!=b?b:this.mode;if(null!=a&&this.spinner.spin(document.body,mxResources.get("inserting"))){d=null!=d?d:this.emptyDiagramXml;var l=mxUtils.bind(this,function(){this.spinner.stop()}),n=mxUtils.bind(this,function(a){l();null==a&&null==this.getCurrentFile()&&null==this.dialog?this.showSplash():null!=a&&this.handleError(a)});try{b==App.MODE_GOOGLE&&null!=this.drive?(null==m&&null!=this.stateArg&&null!=this.stateArg.folderId&&(m=this.stateArg.folderId),
-this.drive.insertFile(a,d,m,mxUtils.bind(this,function(a){l();this.fileCreated(a,c,g,f,k)}),n)):b==App.MODE_GITHUB&&null!=this.gitHub?this.gitHub.insertFile(a,d,mxUtils.bind(this,function(a){l();this.fileCreated(a,c,g,f,k)}),n,!1,m):b==App.MODE_GITLAB&&null!=this.gitLab?this.gitLab.insertFile(a,d,mxUtils.bind(this,function(a){l();this.fileCreated(a,c,g,f,k)}),n,!1,m):b==App.MODE_NOTION&&null!=this.notion?this.notion.insertFile(a,d,mxUtils.bind(this,function(a){l();this.fileCreated(a,c,g,f,k)}),n,
-!1,m):b==App.MODE_TRELLO&&null!=this.trello?this.trello.insertFile(a,d,mxUtils.bind(this,function(a){l();this.fileCreated(a,c,g,f,k)}),n,!1,m):b==App.MODE_DROPBOX&&null!=this.dropbox?this.dropbox.insertFile(a,d,mxUtils.bind(this,function(a){l();this.fileCreated(a,c,g,f,k)}),n):b==App.MODE_ONEDRIVE&&null!=this.oneDrive?this.oneDrive.insertFile(a,d,mxUtils.bind(this,function(a){l();this.fileCreated(a,c,g,f,k)}),n,!1,m):b==App.MODE_BROWSER?StorageFile.insertFile(this,a,d,mxUtils.bind(this,function(a){l();
-this.fileCreated(a,c,g,f,k)}),n):!e&&b==App.MODE_DEVICE&&EditorUi.nativeFileSupport?(l(),this.showSaveFilePicker(mxUtils.bind(this,function(a,b){var e=new LocalFile(this,d,b.name,null,a,b);e.saveFile(b.name,!1,mxUtils.bind(this,function(){this.fileCreated(e,c,g,f,k)}),n,!0)}),mxUtils.bind(this,function(a){"AbortError"!=a.name&&n(a)}),this.createFileSystemOptions(a))):(l(),this.fileCreated(new LocalFile(this,d,a,null==b),c,g,f,k))}catch(p){l(),this.handleError(p)}}};
-App.prototype.fileCreated=function(a,d,c,b,f){var g=window.location.pathname;null!=d&&0<d.length&&(g+="?libs="+d);null!=f&&0<f.length&&(g+="?clibs="+f);g=this.getUrl(g);a.getMode()!=App.MODE_DEVICE&&(g+="#"+a.getHash());if(this.spinner.spin(document.body,mxResources.get("inserting"))){var m=a.getData(),m=0<m.length?this.editor.extractGraphModel(mxUtils.parseXml(m).documentElement,!0):null,e=window.location.protocol+"//"+window.location.hostname+g,k=m,l=null;null!=m&&/\.svg$/i.test(a.getTitle())&&
+App.prototype.createFile=function(a,d,c,b,g,f,m,e,k){b=e?null:null!=b?b:this.mode;if(null!=a&&this.spinner.spin(document.body,mxResources.get("inserting"))){d=null!=d?d:this.emptyDiagramXml;var l=mxUtils.bind(this,function(){this.spinner.stop()}),n=mxUtils.bind(this,function(a){l();null==a&&null==this.getCurrentFile()&&null==this.dialog?this.showSplash():null!=a&&this.handleError(a)});try{b==App.MODE_GOOGLE&&null!=this.drive?(null==m&&null!=this.stateArg&&null!=this.stateArg.folderId&&(m=this.stateArg.folderId),
+this.drive.insertFile(a,d,m,mxUtils.bind(this,function(a){l();this.fileCreated(a,c,f,g,k)}),n)):b==App.MODE_GITHUB&&null!=this.gitHub?this.gitHub.insertFile(a,d,mxUtils.bind(this,function(a){l();this.fileCreated(a,c,f,g,k)}),n,!1,m):b==App.MODE_GITLAB&&null!=this.gitLab?this.gitLab.insertFile(a,d,mxUtils.bind(this,function(a){l();this.fileCreated(a,c,f,g,k)}),n,!1,m):b==App.MODE_NOTION&&null!=this.notion?this.notion.insertFile(a,d,mxUtils.bind(this,function(a){l();this.fileCreated(a,c,f,g,k)}),n,
+!1,m):b==App.MODE_TRELLO&&null!=this.trello?this.trello.insertFile(a,d,mxUtils.bind(this,function(a){l();this.fileCreated(a,c,f,g,k)}),n,!1,m):b==App.MODE_DROPBOX&&null!=this.dropbox?this.dropbox.insertFile(a,d,mxUtils.bind(this,function(a){l();this.fileCreated(a,c,f,g,k)}),n):b==App.MODE_ONEDRIVE&&null!=this.oneDrive?this.oneDrive.insertFile(a,d,mxUtils.bind(this,function(a){l();this.fileCreated(a,c,f,g,k)}),n,!1,m):b==App.MODE_BROWSER?StorageFile.insertFile(this,a,d,mxUtils.bind(this,function(a){l();
+this.fileCreated(a,c,f,g,k)}),n):!e&&b==App.MODE_DEVICE&&EditorUi.nativeFileSupport?(l(),this.showSaveFilePicker(mxUtils.bind(this,function(a,b){var e=new LocalFile(this,d,b.name,null,a,b);e.saveFile(b.name,!1,mxUtils.bind(this,function(){this.fileCreated(e,c,f,g,k)}),n,!0)}),mxUtils.bind(this,function(a){"AbortError"!=a.name&&n(a)}),this.createFileSystemOptions(a))):(l(),this.fileCreated(new LocalFile(this,d,a,null==b),c,f,g,k))}catch(p){l(),this.handleError(p)}}};
+App.prototype.fileCreated=function(a,d,c,b,g){var f=window.location.pathname;null!=d&&0<d.length&&(f+="?libs="+d);null!=g&&0<g.length&&(f+="?clibs="+g);f=this.getUrl(f);a.getMode()!=App.MODE_DEVICE&&(f+="#"+a.getHash());if(this.spinner.spin(document.body,mxResources.get("inserting"))){var m=a.getData(),m=0<m.length?this.editor.extractGraphModel(mxUtils.parseXml(m).documentElement,!0):null,e=window.location.protocol+"//"+window.location.hostname+f,k=m,l=null;null!=m&&/\.svg$/i.test(a.getTitle())&&
(l=this.createTemporaryGraph(this.editor.graph.getStylesheet()),document.body.appendChild(l.container),k=this.decodeNodeIntoGraph(k,l));a.setData(this.createFileData(m,l,a,e));null!=l&&l.container.parentNode.removeChild(l.container);var n=mxUtils.bind(this,function(){this.spinner.stop()}),p=mxUtils.bind(this,function(){n();var e=this.getCurrentFile();null==c&&null!=e&&(c=!e.isModified()&&null==e.getMode());var k=mxUtils.bind(this,function(){window.openFile=null;this.fileLoaded(a);c&&a.addAllSavedStatus();
-null!=d&&this.sidebar.showEntries(d);if(null!=f){for(var b=[],e=f.split(";"),g=0;g<e.length;g++)b.push(decodeURIComponent(e[g]));this.loadLibraries(b)}}),m=mxUtils.bind(this,function(){c||null==e||!e.isModified()?k():this.confirm(mxResources.get("allChangesLost"),null,k,mxResources.get("cancel"),mxResources.get("discardChanges"))});null!=b&&b();null==c||c?m():(a.constructor==LocalFile&&(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(a.getData(),a.getTitle(),
-null==a.getMode())),null!=b&&b(),window.openWindow(g,null,m))});a.constructor==LocalFile?p():a.saveFile(a.getTitle(),!1,mxUtils.bind(this,function(){p()}),mxUtils.bind(this,function(a){n();this.handleError(a)}))}};
-App.prototype.loadFile=function(a,d,c,b,f){if("1"==urlParams.openInSameWin||navigator.standalone)d=!0;this.hideDialog();var g=mxUtils.bind(this,function(){if(null==a||0==a.length)this.editor.setStatus(""),this.fileLoaded(null);else if(this.spinner.spin(document.body,mxResources.get("loading")))if("L"==a.charAt(0))if(this.spinner.stop(),isLocalStorage){var e=mxUtils.bind(this,function(a){this.handleError(a,mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var a=this.getCurrentFile();
+null!=d&&this.sidebar.showEntries(d);if(null!=g){for(var b=[],e=g.split(";"),f=0;f<e.length;f++)b.push(decodeURIComponent(e[f]));this.loadLibraries(b)}}),m=mxUtils.bind(this,function(){c||null==e||!e.isModified()?k():this.confirm(mxResources.get("allChangesLost"),null,k,mxResources.get("cancel"),mxResources.get("discardChanges"))});null!=b&&b();null==c||c?m():(a.constructor==LocalFile&&(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(a.getData(),a.getTitle(),
+null==a.getMode())),null!=b&&b(),window.openWindow(f,null,m))});a.constructor==LocalFile?p():a.saveFile(a.getTitle(),!1,mxUtils.bind(this,function(){p()}),mxUtils.bind(this,function(a){n();this.handleError(a)}))}};
+App.prototype.loadFile=function(a,d,c,b,g){if("1"==urlParams.openInSameWin||navigator.standalone)d=!0;this.hideDialog();var f=mxUtils.bind(this,function(){if(null==a||0==a.length)this.editor.setStatus(""),this.fileLoaded(null);else if(this.spinner.spin(document.body,mxResources.get("loading")))if("L"==a.charAt(0))if(this.spinner.stop(),isLocalStorage){var e=mxUtils.bind(this,function(a){this.handleError(a,mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var a=this.getCurrentFile();
window.location.hash=null!=a?a.getHash():""}))});a=decodeURIComponent(a.substring(1));StorageFile.getFileContent(this,a,mxUtils.bind(this,function(c){null!=c?(this.fileLoaded(new StorageFile(this,c,a)),null!=b&&b()):e({message:mxResources.get("fileNotFound")})}),e)}else this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var a=this.getCurrentFile();window.location.hash=null!=a?a.getHash():""}));else if(null!=c)this.spinner.stop(),
this.fileLoaded(c),null!=b&&b();else if("S"==a.charAt(0))this.spinner.stop(),this.alert("[Deprecation] #S is no longer supported, go to https://app.diagrams.net/?desc="+a.substring(1).substring(0,10),mxUtils.bind(this,function(){window.location.href="https://app.diagrams.net/?desc="+a.substring(1)}));else if("R"==a.charAt(0)){this.spinner.stop();var f=decodeURIComponent(a.substring(1));"<"!=f.charAt(0)&&(f=Graph.decompress(f));f=new LocalFile(this,f,null!=urlParams.title?decodeURIComponent(urlParams.title):
this.defaultFilename,!0);f.getHash=function(){return a};this.fileLoaded(f);null!=b&&b()}else if("E"==a.charAt(0))null==this.getCurrentFile()?this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},mxResources.get("errorLoadingFile")):this.remoteInvoke("getDraftFileContent",null,null,mxUtils.bind(this,function(a,c){this.spinner.stop();this.fileLoaded(new EmbedFile(this,a,c));null!=b&&b()}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},
@@ -11427,14 +11430,14 @@ this.useCanvasForExport||".png"!=f||(f=".drawio"),".svg"===f||".xml"===f||".html
function(){m()||(this.spinner.stop(),this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile")))}),null!=urlParams["template-filename"]?decodeURIComponent(urlParams["template-filename"]):null)}else if(f=null,"G"==a.charAt(0)?f=this.drive:"D"==a.charAt(0)?f=this.dropbox:"W"==a.charAt(0)?f=this.oneDrive:"H"==a.charAt(0)?f=this.gitHub:"A"==a.charAt(0)?f=this.gitLab:"T"==a.charAt(0)?f=this.trello:"N"==a.charAt(0)&&(f=this.notion),null==f)this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},
mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var a=this.getCurrentFile();window.location.hash=null!=a?a.getHash():""}));else{var q=a.charAt(0);a=decodeURIComponent(a.substring(1));f.getFile(a,mxUtils.bind(this,function(c){this.spinner.stop();this.fileLoaded(c);var d=this.getCurrentFile();null==d?(window.location.hash="",this.showSplash()):this.editor.chromeless&&!this.editor.editable?(d.getHash=function(){return q+a},window.location.hash="#"+d.getHash()):c==d&&null==c.getMode()&&
(c=mxResources.get("copyCreated"),this.editor.setStatus('<div title="'+c+'" class="geStatusAlert" style="overflow:hidden;">'+c+"</div>"));null!=b&&b()}),mxUtils.bind(this,function(b){null!=window.console&&null!=b&&console.log("error in loadFile:",a,b);this.handleError(b,null!=b?mxResources.get("errorLoadingFile"):null,mxUtils.bind(this,function(){var a=this.getCurrentFile();null==a?(window.location.hash="",this.showSplash()):window.location.hash="#"+a.getHash()}),null,null,"#"+q+a)}))}}),m=this.getCurrentFile(),
-e=mxUtils.bind(this,function(){f||null==m||!m.isModified()?g():this.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){null!=m&&(window.location.hash=m.getHash())}),g,mxResources.get("cancel"),mxResources.get("discardChanges"))});null==a||0==a.length?e():null==m||d?e():this.showDialog((new PopupDialog(this,this.getUrl()+"#"+a,null,e)).container,320,140,!0,!0)};
+e=mxUtils.bind(this,function(){g||null==m||!m.isModified()?f():this.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){null!=m&&(window.location.hash=m.getHash())}),f,mxResources.get("cancel"),mxResources.get("discardChanges"))});null==a||0==a.length?e():null==m||d?e():this.showDialog((new PopupDialog(this,this.getUrl()+"#"+a,null,e)).container,320,140,!0,!0)};
App.prototype.getLibraryStorageHint=function(a){var d=a.getTitle();a.constructor!=LocalLibrary&&(d+="\n"+a.getHash());a.constructor==DriveLibrary?d+=" ("+mxResources.get("googleDrive")+")":a.constructor==GitHubLibrary?d+=" ("+mxResources.get("github")+")":a.constructor==TrelloLibrary?d+=" ("+mxResources.get("trello")+")":a.constructor==DropboxLibrary?d+=" ("+mxResources.get("dropbox")+")":a.constructor==OneDriveLibrary?d+=" ("+mxResources.get("oneDrive")+")":a.constructor==StorageLibrary?d+=" ("+
mxResources.get("browser")+")":a.constructor==LocalLibrary&&(d+=" ("+mxResources.get("device")+")");return d};App.prototype.restoreLibraries=function(){this.loadLibraries(mxSettings.getCustomLibraries(),mxUtils.bind(this,function(){this.loadLibraries((urlParams.clibs||"").split(";"))}))};
-App.prototype.loadLibraries=function(a,d){if(null!=this.sidebar){null==this.pendingLibraries&&(this.pendingLibraries={});var c=mxUtils.bind(this,function(a,b){b||mxSettings.removeCustomLibrary(a);delete this.pendingLibraries[a]}),b=0,f=[],g=mxUtils.bind(this,function(){if(0==b){if(null!=a)for(var c=a.length-1;0<=c;c--)null!=f[c]&&this.loadLibrary(f[c]);null!=d&&d()}});if(null!=a)for(var m=0;m<a.length;m++){var e=encodeURIComponent(decodeURIComponent(a[m]));mxUtils.bind(this,function(a,d){if(null!=
-a&&0<a.length&&null==this.pendingLibraries[a]&&null==this.sidebar.palettes[a]){b++;var e=mxUtils.bind(this,function(c){delete this.pendingLibraries[a];f[d]=c;b--;g()}),k=mxUtils.bind(this,function(d){c(a,d);b--;g()});this.pendingLibraries[a]=!0;var m=a.substring(0,1);if("L"==m)(isLocalStorage||mxClient.IS_CHROMEAPP)&&window.setTimeout(mxUtils.bind(this,function(){try{var b=decodeURIComponent(a.substring(1));StorageFile.getFileContent(this,b,mxUtils.bind(this,function(a){".scratchpad"==b&&null==a&&
+App.prototype.loadLibraries=function(a,d){if(null!=this.sidebar){null==this.pendingLibraries&&(this.pendingLibraries={});var c=mxUtils.bind(this,function(a,b){b||mxSettings.removeCustomLibrary(a);delete this.pendingLibraries[a]}),b=0,g=[],f=mxUtils.bind(this,function(){if(0==b){if(null!=a)for(var c=a.length-1;0<=c;c--)null!=g[c]&&this.loadLibrary(g[c]);null!=d&&d()}});if(null!=a)for(var m=0;m<a.length;m++){var e=encodeURIComponent(decodeURIComponent(a[m]));mxUtils.bind(this,function(a,d){if(null!=
+a&&0<a.length&&null==this.pendingLibraries[a]&&null==this.sidebar.palettes[a]){b++;var e=mxUtils.bind(this,function(c){delete this.pendingLibraries[a];g[d]=c;b--;f()}),k=mxUtils.bind(this,function(d){c(a,d);b--;f()});this.pendingLibraries[a]=!0;var m=a.substring(0,1);if("L"==m)(isLocalStorage||mxClient.IS_CHROMEAPP)&&window.setTimeout(mxUtils.bind(this,function(){try{var b=decodeURIComponent(a.substring(1));StorageFile.getFileContent(this,b,mxUtils.bind(this,function(a){".scratchpad"==b&&null==a&&
(a=this.emptyLibraryXml);null!=a?e(new StorageLibrary(this,a,b)):k()}),k)}catch(y){k()}}),0);else if("U"==m){var l=decodeURIComponent(a.substring(1));this.isOffline()||this.loadTemplate(l,mxUtils.bind(this,function(a){null!=a&&0<a.length?e(new UrlLibrary(this,a,l)):k()}),function(){k()},null,!0)}else if("R"==m){m=decodeURIComponent(a.substring(1));try{var m=JSON.parse(m),t={id:m[0],title:m[1],downloadUrl:m[2]};this.remoteInvoke("getFileContent",[t.downloadUrl],null,mxUtils.bind(this,function(a){try{e(new RemoteLibrary(this,
a,t))}catch(y){k()}}),function(){k()})}catch(z){k()}}else if("S"==m&&null!=this.loadDesktopLib)try{this.loadDesktopLib(decodeURIComponent(a.substring(1)),function(a){e(a)},k)}catch(z){k()}else{var v=null;"G"==m?null!=this.drive&&null!=this.drive.user&&(v=this.drive):"H"==m?null!=this.gitHub&&null!=this.gitHub.getUser()&&(v=this.gitHub):"T"==m?null!=this.trello&&this.trello.isAuthorized()&&(v=this.trello):"D"==m?null!=this.dropbox&&null!=this.dropbox.getUser()&&(v=this.dropbox):"W"==m&&null!=this.oneDrive&&
-null!=this.oneDrive.getUser()&&(v=this.oneDrive);null!=v?v.getLibrary(decodeURIComponent(a.substring(1)),mxUtils.bind(this,function(a){try{e(a)}catch(y){k()}}),function(a){k()}):k(!0)}}})(e,m)}g()}};
+null!=this.oneDrive.getUser()&&(v=this.oneDrive);null!=v?v.getLibrary(decodeURIComponent(a.substring(1)),mxUtils.bind(this,function(a){try{e(a)}catch(y){k()}}),function(a){k()}):k(!0)}}})(e,m)}f()}};
App.prototype.updateButtonContainer=function(){if(null!=this.buttonContainer){var a=this.getCurrentFile();this.commentsSupported()&&"1"!=urlParams.sketch?null==this.commentButton&&(this.commentButton=document.createElement("a"),this.commentButton.setAttribute("title",mxResources.get("comments")),this.commentButton.className="geToolbarButton",this.commentButton.style.cssText="display:inline-block;position:relative;box-sizing:border-box;margin-right:4px;float:left;cursor:pointer;width:24px;height:24px;background-size:24px 24px;background-position:center center;background-repeat:no-repeat;background-image:url("+
Editor.commentImage+");","atlas"==uiTheme?(this.commentButton.style.marginRight="10px",this.commentButton.style.marginTop="-3px"):this.commentButton.style.marginTop="min"==uiTheme?"1px":"-5px",mxEvent.addListener(this.commentButton,"click",mxUtils.bind(this,function(){this.actions.get("comments").funct()})),this.buttonContainer.appendChild(this.commentButton),"dark"==uiTheme||"atlas"==uiTheme)&&(this.commentButton.style.filter="invert(100%)"):null!=this.commentButton&&(this.commentButton.parentNode.removeChild(this.commentButton),
this.commentButton=null);"1"==urlParams.embed||"draw.io"!=this.getServiceName()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||this.isOfflineApp()?null!=urlParams.notif&&this.fetchAndShowNotification(urlParams.notif):(null!=a?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=
@@ -11444,28 +11447,28 @@ this.mode:null))}};
App.prototype.fetchAndShowNotification=function(a){if(!this.fetchingNotif){a=a||"online";var d=null,c=mxUtils.bind(this,function(b){b=b.filter(function(b){return!b.targets||-1<b.targets.indexOf(a)});for(var c=a+"NotifReadTS",d=parseInt(localStorage.getItem(c)),m=0;m<b.length;m++)b[m].isNew=!d||b[m].timestamp>d;this.showNotification(b,c)});try{d=JSON.parse(localStorage.getItem(".notifCache"))}catch(b){}null==d||d.ts+864E5<Date.now()?(this.fetchingNotif=!0,mxUtils.get(NOTIFICATIONS_URL,mxUtils.bind(this,
function(a){200<=a.getStatus()&&299>=a.getStatus()&&(a=JSON.parse(a.getText()),a.sort(function(a,b){return b.timestamp-a.timestamp}),localStorage.setItem(".notifCache",JSON.stringify({ts:Date.now(),notifs:a})),this.fetchingNotif=!1,c(a))}))):c(d.notifs)}};
App.prototype.showNotification=function(a,d){function c(a){var b=document.querySelector(".geNotification-count");null==b?EditorUi.logError("Error: element (.geNotification-count) is null in showNotification in shouldAnimate",null,5769):(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 b=mxUtils.bind(this,function(){this.notificationWin.style.display="none";for(var b=this.notificationWin.querySelectorAll(".circle.active"),c=0;c<b.length;c++)b[c].className="circle";a[0]&&localStorage.setItem(d,a[0].timestamp)});if(null==this.notificationBtn){this.notificationBtn=document.createElement("div");this.notificationBtn.className="geNotification-box";"min"==uiTheme&&(this.notificationBtn.style.width="30px",this.notificationBtn.style.top="4px");var f=document.createElement("span");f.className=
-"geNotification-count";this.notificationBtn.appendChild(f);f=document.createElement("div");f.className="geNotification-bell";f.style.opacity="min"==uiTheme?"0.5":"";var g=document.createElement("span");g.className="geBell-top";f.appendChild(g);g=document.createElement("span");g.className="geBell-middle";f.appendChild(g);g=document.createElement("span");g.className="geBell-bottom";f.appendChild(g);g=document.createElement("span");g.className="geBell-rad";f.appendChild(g);this.notificationBtn.appendChild(f);
-this.buttonContainer.insertBefore(this.notificationBtn,this.buttonContainer.firstChild);this.notificationWin=document.createElement("div");this.notificationWin.className="geNotifPanel";this.notificationWin.style.display="none";document.body.appendChild(this.notificationWin);g=document.createElement("div");g.className="header";f=document.createElement("span");f.className="title";f.textContent=mxResources.get("notifications");g.appendChild(f);f=document.createElement("span");f.className="closeBtn";
-f.textContent="x";g.appendChild(f);this.notificationWin.appendChild(g);g=document.createElement("div");g.className="notifications clearfix";var m=document.createElement("div");m.setAttribute("id","geNotifList");m.style.position="relative";g.appendChild(m);this.notificationWin.appendChild(g);mxEvent.addListener(this.notificationBtn,"click",mxUtils.bind(this,function(){if("none"==this.notificationWin.style.display){this.notificationWin.style.display="";document.querySelector(".notifications").scrollTop=
-0;var a=this.notificationBtn.getBoundingClientRect();this.notificationWin.style.top=a.top+this.notificationBtn.clientHeight+"px";this.notificationWin.style.left=a.right-this.notificationWin.clientWidth+"px";c(0)}else b()}));mxEvent.addListener(f,"click",b)}var e=0,k=document.getElementById("geNotifList");if(null==k)EditorUi.logError("Error: element (geNotifList) is null in showNotification",null,5859);else if(0==a.length)k.innerHTML='<div class="line"></div><div class="notification">'+mxUtils.htmlEntities(mxResources.get("none"))+
-"</div>";else for(k.innerHTML='<div class="line"></div>',f=0;f<a.length;f++)(function(a,b){b.isNew&&e++;var c=document.createElement("div");c.className="notification";var d=a.timeSince(new Date(b.timestamp));null==d&&(d=mxResources.get("lessThanAMinute"));c.innerHTML='<div class="circle'+(b.isNew?" active":"")+'"></div><span class="time">'+mxUtils.htmlEntities(mxResources.get("timeAgo",[d],"{1} ago"))+"</span><p>"+mxUtils.htmlEntities(b.content)+"</p>";b.link&&mxEvent.addListener(c,"click",function(){window.open(b.link,
-"notifWin")});k.appendChild(c)})(this,a[f]);c(e)};
-App.prototype.save=function(a,d){var c=this.getCurrentFile();if(null!=c&&this.spinner.spin(document.body,mxResources.get("saving"))){this.editor.setStatus("");this.editor.graph.isEditing()&&this.editor.graph.stopEditing();var b=mxUtils.bind(this,function(){c.handleFileSuccess(!0);null!=d&&d()}),f=mxUtils.bind(this,function(b){c.isModified()&&Editor.addRetryToError(b,mxUtils.bind(this,function(){this.save(a,d)}));c.handleFileError(b,!0)});try{a==c.getTitle()?c.save(!0,b,f):c.saveAs(a,b,f)}catch(g){f(g)}}};
-App.prototype.pickFolder=function(a,d,c,b,f){c=null!=c?c:!0;var g=this.spinner.pause();c&&a==App.MODE_GOOGLE&&null!=this.drive?this.drive.pickFolder(mxUtils.bind(this,function(a){g();if(a.action==google.picker.Action.PICKED){var b=null;null!=a.docs&&0<a.docs.length&&"folder"==a.docs[0].type&&(b=a.docs[0].id);d(b)}}),f):c&&a==App.MODE_ONEDRIVE&&null!=this.oneDrive?this.oneDrive.pickFolder(mxUtils.bind(this,function(a){g();null!=a&&null!=a.value&&0<a.value.length&&(a=OneDriveFile.prototype.getIdOf(a.value[0]),
-d(a))}),b):c&&a==App.MODE_GITHUB&&null!=this.gitHub?this.gitHub.pickFolder(mxUtils.bind(this,function(a){g();d(a)})):c&&a==App.MODE_GITLAB&&null!=this.gitLab?this.gitLab.pickFolder(mxUtils.bind(this,function(a){g();d(a)})):c&&a==App.MODE_NOTION&&null!=this.notion?this.notion.pickFolder(mxUtils.bind(this,function(a){g();d(a)})):c&&a==App.MODE_TRELLO&&null!=this.trello?this.trello.pickFolder(mxUtils.bind(this,function(a){g();d(a)})):EditorUi.prototype.pickFolder.apply(this,arguments)};
-App.prototype.exportFile=function(a,d,c,b,f,g){f==App.MODE_DROPBOX?null!=this.dropbox&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.dropbox.insertFile(d,b?this.base64ToBlob(a,c):a,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)})):f==App.MODE_GOOGLE?null!=this.drive&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.drive.insertFile(d,a,g,mxUtils.bind(this,function(a){this.spinner.stop()}),
-mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),c,b):f==App.MODE_ONEDRIVE?null!=this.oneDrive&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.oneDrive.insertFile(d,b?this.base64ToBlob(a,c):a,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),!1,g):f==App.MODE_GITHUB?null!=this.gitHub&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.gitHub.insertFile(d,a,mxUtils.bind(this,
-function(){this.spinner.stop()}),mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),!0,g,b):f==App.MODE_TRELLO?null!=this.trello&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.trello.insertFile(d,b?this.base64ToBlob(a,c):a,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),!1,g):f==App.MODE_BROWSER&&(c=mxUtils.bind(this,function(){localStorage.setItem(d,a)}),null==localStorage.getItem(d)?
+var b=mxUtils.bind(this,function(){this.notificationWin.style.display="none";for(var b=this.notificationWin.querySelectorAll(".circle.active"),c=0;c<b.length;c++)b[c].className="circle";a[0]&&localStorage.setItem(d,a[0].timestamp)});if(null==this.notificationBtn){this.notificationBtn=document.createElement("div");this.notificationBtn.className="geNotification-box";"min"==uiTheme&&(this.notificationBtn.style.width="30px",this.notificationBtn.style.top="4px");var g=document.createElement("span");g.className=
+"geNotification-count";this.notificationBtn.appendChild(g);g=document.createElement("div");g.className="geNotification-bell";g.style.opacity="min"==uiTheme?"0.5":"";var f=document.createElement("span");f.className="geBell-top";g.appendChild(f);f=document.createElement("span");f.className="geBell-middle";g.appendChild(f);f=document.createElement("span");f.className="geBell-bottom";g.appendChild(f);f=document.createElement("span");f.className="geBell-rad";g.appendChild(f);this.notificationBtn.appendChild(g);
+this.buttonContainer.insertBefore(this.notificationBtn,this.buttonContainer.firstChild);this.notificationWin=document.createElement("div");this.notificationWin.className="geNotifPanel";this.notificationWin.style.display="none";document.body.appendChild(this.notificationWin);f=document.createElement("div");f.className="header";g=document.createElement("span");g.className="title";g.textContent=mxResources.get("notifications");f.appendChild(g);g=document.createElement("span");g.className="closeBtn";
+g.textContent="x";f.appendChild(g);this.notificationWin.appendChild(f);f=document.createElement("div");f.className="notifications clearfix";var m=document.createElement("div");m.setAttribute("id","geNotifList");m.style.position="relative";f.appendChild(m);this.notificationWin.appendChild(f);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";c(0)}else b()}));mxEvent.addListener(g,"click",b)}var e=0,k=document.getElementById("geNotifList");if(null==k)EditorUi.logError("Error: element (geNotifList) is null in showNotification",null,5859);else if(0==a.length)k.innerHTML='<div class="line"></div><div class="notification">'+mxUtils.htmlEntities(mxResources.get("none"))+
+"</div>";else for(k.innerHTML='<div class="line"></div>',g=0;g<a.length;g++)(function(a,b){b.isNew&&e++;var c=document.createElement("div");c.className="notification";var d=a.timeSince(new Date(b.timestamp));null==d&&(d=mxResources.get("lessThanAMinute"));c.innerHTML='<div class="circle'+(b.isNew?" active":"")+'"></div><span class="time">'+mxUtils.htmlEntities(mxResources.get("timeAgo",[d],"{1} ago"))+"</span><p>"+mxUtils.htmlEntities(b.content)+"</p>";b.link&&mxEvent.addListener(c,"click",function(){window.open(b.link,
+"notifWin")});k.appendChild(c)})(this,a[g]);c(e)};
+App.prototype.save=function(a,d){var c=this.getCurrentFile();if(null!=c&&this.spinner.spin(document.body,mxResources.get("saving"))){this.editor.setStatus("");this.editor.graph.isEditing()&&this.editor.graph.stopEditing();var b=mxUtils.bind(this,function(){c.handleFileSuccess(!0);null!=d&&d()}),g=mxUtils.bind(this,function(b){c.isModified()&&Editor.addRetryToError(b,mxUtils.bind(this,function(){this.save(a,d)}));c.handleFileError(b,!0)});try{a==c.getTitle()?c.save(!0,b,g):c.saveAs(a,b,g)}catch(f){g(f)}}};
+App.prototype.pickFolder=function(a,d,c,b,g){c=null!=c?c:!0;var f=this.spinner.pause();c&&a==App.MODE_GOOGLE&&null!=this.drive?this.drive.pickFolder(mxUtils.bind(this,function(a){f();if(a.action==google.picker.Action.PICKED){var b=null;null!=a.docs&&0<a.docs.length&&"folder"==a.docs[0].type&&(b=a.docs[0].id);d(b)}}),g):c&&a==App.MODE_ONEDRIVE&&null!=this.oneDrive?this.oneDrive.pickFolder(mxUtils.bind(this,function(a){f();null!=a&&null!=a.value&&0<a.value.length&&(a=OneDriveFile.prototype.getIdOf(a.value[0]),
+d(a))}),b):c&&a==App.MODE_GITHUB&&null!=this.gitHub?this.gitHub.pickFolder(mxUtils.bind(this,function(a){f();d(a)})):c&&a==App.MODE_GITLAB&&null!=this.gitLab?this.gitLab.pickFolder(mxUtils.bind(this,function(a){f();d(a)})):c&&a==App.MODE_NOTION&&null!=this.notion?this.notion.pickFolder(mxUtils.bind(this,function(a){f();d(a)})):c&&a==App.MODE_TRELLO&&null!=this.trello?this.trello.pickFolder(mxUtils.bind(this,function(a){f();d(a)})):EditorUi.prototype.pickFolder.apply(this,arguments)};
+App.prototype.exportFile=function(a,d,c,b,g,f){g==App.MODE_DROPBOX?null!=this.dropbox&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.dropbox.insertFile(d,b?this.base64ToBlob(a,c):a,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)})):g==App.MODE_GOOGLE?null!=this.drive&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.drive.insertFile(d,a,f,mxUtils.bind(this,function(a){this.spinner.stop()}),
+mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),c,b):g==App.MODE_ONEDRIVE?null!=this.oneDrive&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.oneDrive.insertFile(d,b?this.base64ToBlob(a,c):a,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),!1,f):g==App.MODE_GITHUB?null!=this.gitHub&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.gitHub.insertFile(d,a,mxUtils.bind(this,
+function(){this.spinner.stop()}),mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),!0,f,b):g==App.MODE_TRELLO?null!=this.trello&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.trello.insertFile(d,b?this.base64ToBlob(a,c):a,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),!1,f):g==App.MODE_BROWSER&&(c=mxUtils.bind(this,function(){localStorage.setItem(d,a)}),null==localStorage.getItem(d)?
c():this.confirm(mxResources.get("replaceIt",[d]),c))};
App.prototype.descriptorChanged=function(){var a=this.getCurrentFile();if(null!=a){if(null!=this.fname){this.fnameWrapper.style.display="block";this.fname.innerHTML="";var d=null!=a.getTitle()?a.getTitle():this.defaultFilename;mxUtils.write(this.fname,d);this.fname.setAttribute("title",d+" - "+mxResources.get("rename"))}var d=this.editor.graph,c=a.isEditable()&&!a.invalidChecksum;d.isEnabled()&&!c&&d.reset();d.setEnabled(c);null==urlParams.rev&&(this.updateDocumentTitle(),d=a.getHash(),0<d.length?
window.location.hash=d:0<window.location.hash.length&&(window.location.hash=""))}this.updateUi();null==this.format||null!=a&&this.fileEditable==a.isEditable()||!this.editor.graph.isSelectionEmpty()||(this.format.refresh(),this.fileEditable=null!=a?a.isEditable():null);this.fireEvent(new mxEventObject("fileDescriptorChanged","file",a))};
-App.prototype.showAuthDialog=function(a,d,c,b){var f=this.spinner.pause();this.showDialog((new AuthDialog(this,a,d,mxUtils.bind(this,function(a){try{null!=c&&c(a,mxUtils.bind(this,function(){this.hideDialog();f()}))}catch(m){this.editor.setStatus(mxUtils.htmlEntities(m.message))}}))).container,300,d?180:140,!0,!0,mxUtils.bind(this,function(a){null!=b&&b(a);a&&null==this.getCurrentFile()&&null==this.dialog&&this.showSplash()}))};
-App.prototype.convertFile=function(a,d,c,b,f,g,m,e){var k=d;/\.svg$/i.test(k)||(k=k.substring(0,d.lastIndexOf("."))+b);var l=!1;null!=this.gitHub&&a.substring(0,this.gitHub.baseUrl.length)==this.gitHub.baseUrl&&(l=!0);if(/\.v(dx|sdx?)$/i.test(d)&&Graph.fileSupport&&(new XMLHttpRequest).upload&&"string"===typeof(new XMLHttpRequest).responseType){var n=new XMLHttpRequest;n.open("GET",a,!0);l||(n.responseType="blob");if(e)for(var p in e)n.setRequestHeader(p,e[p]);n.onload=mxUtils.bind(this,function(){if(200<=
-n.status&&299>=n.status){var a=null;l?(a=JSON.parse(n.responseText),a=this.base64ToBlob(a.content,"application/octet-stream")):a=new Blob([n.response],{type:"application/octet-stream"});this.importVisio(a,mxUtils.bind(this,function(a){f(new LocalFile(this,a,k,!0))}),g,d)}else null!=g&&g({message:mxResources.get("errorLoadingFile")})});n.onerror=g;n.send()}else{var q=mxUtils.bind(this,function(b){try{if(/\.pdf$/i.test(d)){var c=Editor.extractGraphModelFromPdf(b);null!=c&&0<c.length&&f(new LocalFile(this,
-c,k,!0))}else/\.png$/i.test(d)?(c=this.extractGraphModelFromPng(b),null!=c?f(new LocalFile(this,c,k,!0)):f(new LocalFile(this,b,d,!0))):Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(b,a)?this.parseFile(new Blob([b],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&(200<=a.status&&299>=a.status?f(new LocalFile(this,a.responseText,k,!0)):null!=g&&g({message:mxResources.get("errorLoadingFile")}))}),d):f(new LocalFile(this,b,k,!0))}catch(v){null!=
-g&&g(v)}});c=/\.png$/i.test(d)||/\.jpe?g$/i.test(d)||/\.pdf$/i.test(d)||null!=c&&"image/"==c.substring(0,6);l?mxUtils.get(a,mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus()){if(null!=f){a=JSON.parse(a.getText());var b=a.content;"base64"===a.encoding&&(b=/\.png$/i.test(d)?"data:image/png;base64,"+b:/\.pdf$/i.test(d)?"data:application/pdf;base64,"+b:!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(b):atob(b));q(b)}}else null!=g&&g({code:App.ERROR_UNKNOWN})}),function(){null!=
-g&&g({code:App.ERROR_UNKNOWN})},!1,this.timeout,function(){null!=g&&g({code:App.ERROR_TIMEOUT,retry:fn})},e):null!=m?m(a,q,g,c):this.editor.loadUrl(a,q,g,c,null,null,null,e)}};
+App.prototype.showAuthDialog=function(a,d,c,b){var g=this.spinner.pause();this.showDialog((new AuthDialog(this,a,d,mxUtils.bind(this,function(a){try{null!=c&&c(a,mxUtils.bind(this,function(){this.hideDialog();g()}))}catch(m){this.editor.setStatus(mxUtils.htmlEntities(m.message))}}))).container,300,d?180:140,!0,!0,mxUtils.bind(this,function(a){null!=b&&b(a);a&&null==this.getCurrentFile()&&null==this.dialog&&this.showSplash()}))};
+App.prototype.convertFile=function(a,d,c,b,g,f,m,e){var k=d;/\.svg$/i.test(k)||(k=k.substring(0,d.lastIndexOf("."))+b);var l=!1;null!=this.gitHub&&a.substring(0,this.gitHub.baseUrl.length)==this.gitHub.baseUrl&&(l=!0);if(/\.v(dx|sdx?)$/i.test(d)&&Graph.fileSupport&&(new XMLHttpRequest).upload&&"string"===typeof(new XMLHttpRequest).responseType){var n=new XMLHttpRequest;n.open("GET",a,!0);l||(n.responseType="blob");if(e)for(var p in e)n.setRequestHeader(p,e[p]);n.onload=mxUtils.bind(this,function(){if(200<=
+n.status&&299>=n.status){var a=null;l?(a=JSON.parse(n.responseText),a=this.base64ToBlob(a.content,"application/octet-stream")):a=new Blob([n.response],{type:"application/octet-stream"});this.importVisio(a,mxUtils.bind(this,function(a){g(new LocalFile(this,a,k,!0))}),f,d)}else null!=f&&f({message:mxResources.get("errorLoadingFile")})});n.onerror=f;n.send()}else{var q=mxUtils.bind(this,function(b){try{if(/\.pdf$/i.test(d)){var c=Editor.extractGraphModelFromPdf(b);null!=c&&0<c.length&&g(new LocalFile(this,
+c,k,!0))}else/\.png$/i.test(d)?(c=this.extractGraphModelFromPng(b),null!=c?g(new LocalFile(this,c,k,!0)):g(new LocalFile(this,b,d,!0))):Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(b,a)?this.parseFile(new Blob([b],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&(200<=a.status&&299>=a.status?g(new LocalFile(this,a.responseText,k,!0)):null!=f&&f({message:mxResources.get("errorLoadingFile")}))}),d):g(new LocalFile(this,b,k,!0))}catch(v){null!=
+f&&f(v)}});c=/\.png$/i.test(d)||/\.jpe?g$/i.test(d)||/\.pdf$/i.test(d)||null!=c&&"image/"==c.substring(0,6);l?mxUtils.get(a,mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus()){if(null!=g){a=JSON.parse(a.getText());var b=a.content;"base64"===a.encoding&&(b=/\.png$/i.test(d)?"data:image/png;base64,"+b:/\.pdf$/i.test(d)?"data:application/pdf;base64,"+b:!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(b):atob(b));q(b)}}else null!=f&&f({code:App.ERROR_UNKNOWN})}),function(){null!=
+f&&f({code:App.ERROR_UNKNOWN})},!1,this.timeout,function(){null!=f&&f({code:App.ERROR_TIMEOUT,retry:fn})},e):null!=m?m(a,q,f,c):this.editor.loadUrl(a,q,f,c,null,null,null,e)}};
App.prototype.updateHeader=function(){if(null!=this.menubar){this.appIcon=document.createElement("a");this.appIcon.style.display="block";this.appIcon.style.position="absolute";this.appIcon.style.width="32px";this.appIcon.style.height=this.menubarHeight-28+"px";this.appIcon.style.margin="14px 0px 8px 16px";this.appIcon.style.opacity="0.85";this.appIcon.style.borderRadius="3px";"dark"!=uiTheme&&(this.appIcon.style.backgroundColor="#f08705");mxEvent.disableContextMenu(this.appIcon);mxEvent.addListener(this.appIcon,
"click",mxUtils.bind(this,function(a){this.appIconClicked(a)}));var a=mxClient.IS_SVG?"dark"==uiTheme?"url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjxzdmcKICAgeG1sbnM6ZGM9Imh0dHA6Ly9wdXJsLm9yZy9kYy9lbGVtZW50cy8xLjEvIgogICB4bWxuczpjYz0iaHR0cDovL2NyZWF0aXZlY29tbW9ucy5vcmcvbnMjIgogICB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiCiAgIHhtbG5zOnN2Zz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciCiAgIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIKICAgeG1sOnNwYWNlPSJwcmVzZXJ2ZSIKICAgZW5hYmxlLWJhY2tncm91bmQ9Im5ldyAwIDAgMzA2LjE4NSAxMjAuMjk2IgogICB2aWV3Qm94PSIyNCAyNiA2OCA2OCIKICAgeT0iMHB4IgogICB4PSIwcHgiCiAgIHZlcnNpb249IjEuMSI+CiAgIAkgPGc+PGxpbmUKICAgICAgIHkyPSI3Mi4zOTQiCiAgICAgICB4Mj0iNDEuMDYxIgogICAgICAgeTE9IjQzLjM4NCIKICAgICAgIHgxPSI1OC4wNjkiCiAgICAgICBzdHJva2UtbWl0ZXJsaW1pdD0iMTAiCiAgICAgICBzdHJva2Utd2lkdGg9IjMuNTUyOCIKICAgICAgIHN0cm9rZT0iI0ZGRkZGRiIKICAgICAgIGZpbGw9Im5vbmUiIC8+PGxpbmUKICAgICAgIHkyPSI3Mi4zOTQiCiAgICAgICB4Mj0iNzUuMDc2IgogICAgICAgeTE9IjQzLjM4NCIKICAgICAgIHgxPSI1OC4wNjgiCiAgICAgICBzdHJva2UtbWl0ZXJsaW1pdD0iMTAiCiAgICAgICBzdHJva2Utd2lkdGg9IjMuNTAwOCIKICAgICAgIHN0cm9rZT0iI0ZGRkZGRiIKICAgICAgIGZpbGw9Im5vbmUiIC8+PGc+PHBhdGgKICAgICAgICAgZD0iTTUyLjc3Myw3Ny4wODRjMCwxLjk1NC0xLjU5OSwzLjU1My0zLjU1MywzLjU1M0gzNi45OTljLTEuOTU0LDAtMy41NTMtMS41OTktMy41NTMtMy41NTN2LTkuMzc5ICAgIGMwLTEuOTU0LDEuNTk5LTMuNTUzLDMuNTUzLTMuNTUzaDEyLjIyMmMxLjk1NCwwLDMuNTUzLDEuNTk5LDMuNTUzLDMuNTUzVjc3LjA4NHoiCiAgICAgICAgIGZpbGw9IiNGRkZGRkYiIC8+PC9nPjxnCiAgICAgICBpZD0iZzM0MTkiPjxwYXRoCiAgICAgICAgIGQ9Ik02Ny43NjIsNDguMDc0YzAsMS45NTQtMS41OTksMy41NTMtMy41NTMsMy41NTNINTEuOTg4Yy0xLjk1NCwwLTMuNTUzLTEuNTk5LTMuNTUzLTMuNTUzdi05LjM3OSAgICBjMC0xLjk1NCwxLjU5OS0zLjU1MywzLjU1My0zLjU1M0g2NC4yMWMxLjk1NCwwLDMuNTUzLDEuNTk5LDMuNTUzLDMuNTUzVjQ4LjA3NHoiCiAgICAgICAgIGZpbGw9IiNGRkZGRkYiIC8+PC9nPjxnPjxwYXRoCiAgICAgICAgIGQ9Ik04Mi43NTIsNzcuMDg0YzAsMS45NTQtMS41OTksMy41NTMtMy41NTMsMy41NTNINjYuOTc3Yy0xLjk1NCwwLTMuNTUzLTEuNTk5LTMuNTUzLTMuNTUzdi05LjM3OSAgICBjMC0xLjk1NCwxLjU5OS0zLjU1MywzLjU1My0zLjU1M2gxMi4yMjJjMS45NTQsMCwzLjU1MywxLjU5OSwzLjU1MywzLjU1M1Y3Ny4wODR6IgogICAgICAgICBmaWxsPSIjRkZGRkZGIiAvPjwvZz48L2c+PC9zdmc+)":
"url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPHN2ZyB2ZXJzaW9uPSIxLjEiIGlkPSJFYmVuZV8xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4PSIwcHgiIHk9IjBweCIKCSB2aWV3Qm94PSIwIDAgMjI1IDIyNSIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAgMjI1IDIyNTsiIHhtbDpzcGFjZT0icHJlc2VydmUiPgo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPgoJLnN0MXtmaWxsOiNERjZDMEM7fQoJLnN0MntmaWxsOiNGRkZGRkY7fQo8L3N0eWxlPgo8cGF0aCBjbGFzcz0ic3QxIiBkPSJNMjI1LDIxNS40YzAsNS4zLTQuMyw5LjYtOS41LDkuNmwwLDBINzcuMWwtNDQuOC00NS41TDYwLjIsMTM0bDgyLjctMTAyLjdsODIuMSw4NC41VjIxNS40eiIvPgo8cGF0aCBjbGFzcz0ic3QyIiBkPSJNMTg0LjYsMTI1LjhoLTIzLjdsLTI1LTQyLjdjNS43LTEuMiw5LjgtNi4yLDkuNy0xMlYzOWMwLTYuOC01LjQtMTIuMy0xMi4yLTEyLjNoLTAuMUg5MS42CgljLTYuOCwwLTEyLjMsNS40LTEyLjMsMTIuMlYzOXYzMi4xYzAsNS44LDQsMTAuOCw5LjcsMTJsLTI1LDQyLjdINDAuNGMtNi44LDAtMTIuMyw1LjQtMTIuMywxMi4ydjAuMXYzMi4xCgljMCw2LjgsNS40LDEyLjMsMTIuMiwxMi4zaDAuMWg0MS43YzYuOCwwLDEyLjMtNS40LDEyLjMtMTIuMnYtMC4xdi0zMi4xYzAtNi44LTUuNC0xMi4zLTEyLjItMTIuM2gtMC4xaC00bDI0LjgtNDIuNGgxOS4zCglsMjQuOSw0Mi40SDE0M2MtNi44LDAtMTIuMyw1LjQtMTIuMywxMi4ydjAuMXYzMi4xYzAsNi44LDUuNCwxMi4zLDEyLjIsMTIuM2gwLjFoNDEuN2M2LjgsMCwxMi4zLTUuNCwxMi4zLTEyLjJ2LTAuMXYtMzIuMQoJYzAtNi44LTUuNC0xMi4zLTEyLjItMTIuM0MxODQuNywxMjUuOCwxODQuNywxMjUuOCwxODQuNiwxMjUuOHoiLz4KPC9zdmc+Cg==)":
@@ -11491,58 +11494,58 @@ App.prototype.updateUserElement=function(){if(null!=this.drive&&null!=this.drive
"absolute",this.userElement.style.fontSize="8pt",this.userElement.style.top="atlas"==uiTheme?"8px":"2px",this.userElement.style.right="30px",this.userElement.style.margin="4px",this.userElement.style.padding="2px",this.userElement.style.paddingRight="16px",this.userElement.style.verticalAlign="middle",this.userElement.style.backgroundImage="url("+IMAGE_PATH+"/expanded.gif)",this.userElement.style.backgroundPosition="100% 60%",this.userElement.style.backgroundRepeat="no-repeat",this.menubarContainer.appendChild(this.userElement),
mxEvent.addListener(this.userElement,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(a){a.preventDefault()})),mxEvent.addListener(this.userElement,"click",mxUtils.bind(this,function(a){if(null==this.userPanel){var c=document.createElement("div");c.className="geDialog";c.style.position="absolute";c.style.top=this.userElement.clientTop+this.userElement.clientHeight+6+"px";c.style.right="36px";c.style.padding="0px";c.style.cursor="default";this.userPanel=c}if(null!=this.userPanel.parentNode)this.userPanel.parentNode.removeChild(this.userPanel);
else{var b=!1;this.userPanel.innerHTML="";c=document.createElement("img");c.setAttribute("src",Dialog.prototype.closeImage);c.setAttribute("title",mxResources.get("close"));c.className="geDialogClose";c.style.top="8px";c.style.right="8px";mxEvent.addListener(c,"click",mxUtils.bind(this,function(){null!=this.userPanel.parentNode&&this.userPanel.parentNode.removeChild(this.userPanel)}));this.userPanel.appendChild(c);if(null!=this.drive&&(c=this.drive.getUsersList(),0<c.length)){var d=mxUtils.bind(this,
-function(a,b){var c=this.getCurrentFile();null!=c&&c.constructor==DriveFile?(this.spinner.spin(document.body,b),this.fileLoaded(null),window.setTimeout(mxUtils.bind(this,function(){this.spinner.stop();a()}),2E3)):a()}),g=mxUtils.bind(this,function(a){var b=document.createElement("tr");b.style.cssText=a.isCurrent?"":"background-color: whitesmoke; cursor: pointer";b.setAttribute("title","User ID: "+a.id);b.innerHTML='<td valign="middle" style="height: 59px;width: 66px;'+(a.isCurrent?"":"border-top: 1px solid rgb(224, 224, 224);")+
+function(a,b){var c=this.getCurrentFile();null!=c&&c.constructor==DriveFile?(this.spinner.spin(document.body,b),this.fileLoaded(null),window.setTimeout(mxUtils.bind(this,function(){this.spinner.stop();a()}),2E3)):a()}),f=mxUtils.bind(this,function(a){var b=document.createElement("tr");b.style.cssText=a.isCurrent?"":"background-color: whitesmoke; cursor: pointer";b.setAttribute("title","User ID: "+a.id);b.innerHTML='<td valign="middle" style="height: 59px;width: 66px;'+(a.isCurrent?"":"border-top: 1px solid rgb(224, 224, 224);")+
'"><img width="50" height="50" style="margin: 4px 8px 0 8px;border-radius:50%;" src="'+(null!=a.pictureUrl?a.pictureUrl:this.defaultUserPicture)+'"/></td><td valign="middle" style="white-space:nowrap;'+(null!=a.pictureUrl?"padding-top:4px;":"")+(a.isCurrent?"":"border-top: 1px solid rgb(224, 224, 224);")+'">'+mxUtils.htmlEntities(a.displayName)+'<br><small style="color:gray;">'+mxUtils.htmlEntities(a.email)+'</small><div style="margin-top:4px;"><i>'+mxResources.get("googleDrive")+"</i></div>";a.isCurrent||
mxEvent.addListener(b,"click",mxUtils.bind(this,function(b){d(mxUtils.bind(this,function(){this.stateArg=null;this.drive.setUser(a);this.drive.authorize(!0,mxUtils.bind(this,function(){this.setMode(App.MODE_GOOGLE);this.hideDialog();this.showSplash()}),mxUtils.bind(this,function(a){this.handleError(a)}),!0)}),mxResources.get("closingFile")+"...");mxEvent.consume(b)}));return b}),b=!0,m=document.createElement("table");m.style.cssText="font-size:10pt;padding: 20px 0 0 0;min-width: 300px;border-spacing: 0;";
-for(var e=0;e<c.length;e++)m.appendChild(g(c[e]));this.userPanel.appendChild(m);c=document.createElement("div");c.style.textAlign="left";c.style.padding="8px";c.style.whiteSpace="nowrap";c.style.borderTop="1px solid rgb(224, 224, 224)";g=mxUtils.button(mxResources.get("signOut"),mxUtils.bind(this,function(){this.confirm(mxResources.get("areYouSure"),mxUtils.bind(this,function(){d(mxUtils.bind(this,function(){this.stateArg=null;this.drive.logout();this.setMode(App.MODE_GOOGLE);this.hideDialog();this.showSplash()}),
-mxResources.get("signOut"))}))}));g.className="geBtn";g.style["float"]="right";c.appendChild(g);g=mxUtils.button(mxResources.get("addAccount"),mxUtils.bind(this,function(){var a=this.drive.createAuthWin();a.blur();window.focus();d(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,a)}),mxResources.get("closingFile")+"...")}));
-g.className="geBtn";g.style.margin="0px";c.appendChild(g);this.userPanel.appendChild(c)}c=mxUtils.bind(this,function(a,c,d,e){if(null!=a){b&&this.userPanel.appendChild(document.createElement("hr"));b=!0;var f=document.createElement("table");f.style.cssText="font-size:10pt;padding:"+(b?"10":"20")+"px 20px 10px 10px;";f.innerHTML+='<tr><td valign="top">'+(null!=c?'<img style="margin-right:6px;" src="'+c+'" width="40" height="40"/></td>':"")+'<td valign="middle" style="white-space:nowrap;">'+mxUtils.htmlEntities(a.displayName)+
+for(var e=0;e<c.length;e++)m.appendChild(f(c[e]));this.userPanel.appendChild(m);c=document.createElement("div");c.style.textAlign="left";c.style.padding="8px";c.style.whiteSpace="nowrap";c.style.borderTop="1px solid rgb(224, 224, 224)";f=mxUtils.button(mxResources.get("signOut"),mxUtils.bind(this,function(){this.confirm(mxResources.get("areYouSure"),mxUtils.bind(this,function(){d(mxUtils.bind(this,function(){this.stateArg=null;this.drive.logout();this.setMode(App.MODE_GOOGLE);this.hideDialog();this.showSplash()}),
+mxResources.get("signOut"))}))}));f.className="geBtn";f.style["float"]="right";c.appendChild(f);f=mxUtils.button(mxResources.get("addAccount"),mxUtils.bind(this,function(){var a=this.drive.createAuthWin();a.blur();window.focus();d(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,a)}),mxResources.get("closingFile")+"...")}));
+f.className="geBtn";f.style.margin="0px";c.appendChild(f);this.userPanel.appendChild(c)}c=mxUtils.bind(this,function(a,c,d,e){if(null!=a){b&&this.userPanel.appendChild(document.createElement("hr"));b=!0;var f=document.createElement("table");f.style.cssText="font-size:10pt;padding:"+(b?"10":"20")+"px 20px 10px 10px;";f.innerHTML+='<tr><td valign="top">'+(null!=c?'<img style="margin-right:6px;" src="'+c+'" width="40" height="40"/></td>':"")+'<td valign="middle" style="white-space:nowrap;">'+mxUtils.htmlEntities(a.displayName)+
(null!=a.email?'<br><small style="color:gray;">'+mxUtils.htmlEntities(a.email)+"</small>":"")+(null!=e?'<div style="margin-top:4px;"><i>'+mxUtils.htmlEntities(e)+"</i></div>":"")+"</td></tr>";this.userPanel.appendChild(f);a=document.createElement("div");a.style.textAlign="center";a.style.paddingBottom="12px";a.style.whiteSpace="nowrap";null!=d&&(d=mxUtils.button(mxResources.get("signOut"),d),d.className="geBtn",a.appendChild(d));this.userPanel.appendChild(a)}});null!=this.dropbox&&c(this.dropbox.getUser(),
IMAGE_PATH+"/dropbox-logo.svg",mxUtils.bind(this,function(){var a=this.getCurrentFile();if(null!=a&&a.constructor==DropboxFile){var b=mxUtils.bind(this,function(){this.dropbox.logout();window.location.hash=""});a.isModified()?this.confirm(mxResources.get("allChangesLost"),null,b,mxResources.get("cancel"),mxResources.get("discardChanges")):b()}else this.dropbox.logout()}),mxResources.get("dropbox"));null!=this.oneDrive&&c(this.oneDrive.getUser(),IMAGE_PATH+"/onedrive-logo.svg",this.oneDrive.noLogout?
null:mxUtils.bind(this,function(){var a=this.getCurrentFile();if(null!=a&&a.constructor==OneDriveFile){var b=mxUtils.bind(this,function(){this.oneDrive.logout();window.location.hash=""});a.isModified()?this.confirm(mxResources.get("allChangesLost"),null,b,mxResources.get("cancel"),mxResources.get("discardChanges")):b()}else this.oneDrive.logout()}),mxResources.get("oneDrive"));null!=this.gitHub&&c(this.gitHub.getUser(),IMAGE_PATH+"/github-logo.svg",mxUtils.bind(this,function(){var a=this.getCurrentFile();
if(null!=a&&a.constructor==GitHubFile){var b=mxUtils.bind(this,function(){this.gitHub.logout();window.location.hash=""});a.isModified()?this.confirm(mxResources.get("allChangesLost"),null,b,mxResources.get("cancel"),mxResources.get("discardChanges")):b()}else this.gitHub.logout()}),mxResources.get("github"));null!=this.gitLab&&c(this.gitLab.getUser(),IMAGE_PATH+"/gitlab-logo.svg",mxUtils.bind(this,function(){var a=this.getCurrentFile();if(null!=a&&a.constructor==GitLabFile){var b=mxUtils.bind(this,
function(){this.gitLab.logout();window.location.hash=""});a.isModified()?this.confirm(mxResources.get("allChangesLost"),null,b,mxResources.get("cancel"),mxResources.get("discardChanges")):b()}else this.gitLab.logout()}),mxResources.get("gitlab"));null!=this.notion&&c(this.notion.getUser(),IMAGE_PATH+"/notion-logo.svg",mxUtils.bind(this,function(){var a=this.getCurrentFile();if(null!=a&&a.constructor==NotionFile){var b=mxUtils.bind(this,function(){this.notion.logout();window.location.hash=""});a.isModified()?
this.confirm(mxResources.get("allChangesLost"),null,b,mxResources.get("cancel"),mxResources.get("discardChanges")):b()}else this.notion.logout()}),mxResources.get("notion"));null!=this.trello&&c(this.trello.getUser(),IMAGE_PATH+"/trello-logo.svg",mxUtils.bind(this,function(){var a=this.getCurrentFile();if(null!=a&&a.constructor==TrelloFile){var b=mxUtils.bind(this,function(){this.trello.logout();window.location.hash=""});a.isModified()?this.confirm(mxResources.get("allChangesLost"),null,b,mxResources.get("cancel"),
-mxResources.get("discardChanges")):b()}else this.trello.logout()}),mxResources.get("trello"));b||(c=document.createElement("div"),c.style.textAlign="center",c.style.padding="20px 20px 10px 10px",c.innerHTML=mxResources.get("notConnected"),this.userPanel.appendChild(c));c=document.createElement("div");c.style.textAlign="center";c.style.padding="12px";c.style.background=Editor.isDarkMode()?"":"whiteSmoke";c.style.borderTop="1px solid #e0e0e0";c.style.whiteSpace="nowrap";"1"==urlParams.sketch?(g=mxUtils.button(mxResources.get("share"),
-mxUtils.bind(this,function(){this.actions.get("share").funct()})),g.className="geBtn",c.appendChild(g),this.userPanel.appendChild(c),this.commentsSupported()&&(g=mxUtils.button(mxResources.get("comments"),mxUtils.bind(this,function(){this.actions.get("comments").funct()})),g.className="geBtn",c.appendChild(g),this.userPanel.appendChild(c))):(g=mxUtils.button(mxResources.get("close"),mxUtils.bind(this,function(){mxEvent.isConsumed(a)||null==this.userPanel||null==this.userPanel.parentNode||this.userPanel.parentNode.removeChild(this.userPanel)})),
-g.className="geBtn",c.appendChild(g),this.userPanel.appendChild(c));document.body.appendChild(this.userPanel)}mxEvent.consume(a)})),mxEvent.addListener(document.body,"click",mxUtils.bind(this,function(a){mxEvent.isConsumed(a)||null==this.userPanel||null==this.userPanel.parentNode||this.userPanel.parentNode.removeChild(this.userPanel)})));var a=null;null!=this.drive&&null!=this.drive.getUser()?a=this.drive.getUser():null!=this.oneDrive&&null!=this.oneDrive.getUser()?a=this.oneDrive.getUser():null!=
+mxResources.get("discardChanges")):b()}else this.trello.logout()}),mxResources.get("trello"));b||(c=document.createElement("div"),c.style.textAlign="center",c.style.padding="20px 20px 10px 10px",c.innerHTML=mxResources.get("notConnected"),this.userPanel.appendChild(c));c=document.createElement("div");c.style.textAlign="center";c.style.padding="12px";c.style.background=Editor.isDarkMode()?"":"whiteSmoke";c.style.borderTop="1px solid #e0e0e0";c.style.whiteSpace="nowrap";"1"==urlParams.sketch?(f=mxUtils.button(mxResources.get("share"),
+mxUtils.bind(this,function(){this.actions.get("share").funct()})),f.className="geBtn",c.appendChild(f),this.userPanel.appendChild(c),this.commentsSupported()&&(f=mxUtils.button(mxResources.get("comments"),mxUtils.bind(this,function(){this.actions.get("comments").funct()})),f.className="geBtn",c.appendChild(f),this.userPanel.appendChild(c))):(f=mxUtils.button(mxResources.get("close"),mxUtils.bind(this,function(){mxEvent.isConsumed(a)||null==this.userPanel||null==this.userPanel.parentNode||this.userPanel.parentNode.removeChild(this.userPanel)})),
+f.className="geBtn",c.appendChild(f),this.userPanel.appendChild(c));document.body.appendChild(this.userPanel)}mxEvent.consume(a)})),mxEvent.addListener(document.body,"click",mxUtils.bind(this,function(a){mxEvent.isConsumed(a)||null==this.userPanel||null==this.userPanel.parentNode||this.userPanel.parentNode.removeChild(this.userPanel)})));var a=null;null!=this.drive&&null!=this.drive.getUser()?a=this.drive.getUser():null!=this.oneDrive&&null!=this.oneDrive.getUser()?a=this.oneDrive.getUser():null!=
this.dropbox&&null!=this.dropbox.getUser()?a=this.dropbox.getUser():null!=this.gitHub&&null!=this.gitHub.getUser()?a=this.gitHub.getUser():null!=this.gitLab&&null!=this.gitLab.getUser()?a=this.gitLab.getUser():null!=this.notion&&null!=this.notion.getUser()&&(a=this.notion.getUser());null!=a?(this.userElement.innerHTML="",560<screen.width&&(mxUtils.write(this.userElement,a.displayName),this.userElement.style.display="block")):this.userElement.style.display="none"}else null!=this.userElement&&(this.userElement.parentNode.removeChild(this.userElement),
this.userElement=null)};App.prototype.getCurrentUser=function(){var a=null;null!=this.drive&&null!=this.drive.getUser()?a=this.drive.getUser():null!=this.oneDrive&&null!=this.oneDrive.getUser()?a=this.oneDrive.getUser():null!=this.dropbox&&null!=this.dropbox.getUser()?a=this.dropbox.getUser():null!=this.gitHub&&null!=this.gitHub.getUser()&&(a=this.gitHub.getUser());return a};var editorResetGraph=Editor.prototype.resetGraph;
Editor.prototype.resetGraph=function(){editorResetGraph.apply(this,arguments);null==this.graph.defaultPageFormat&&(this.graph.pageFormat=mxSettings.getPageFormat())};(function(){var a=mxPopupMenu.prototype.showMenu;mxPopupMenu.prototype.showMenu=function(){a.apply(this,arguments);this.div.style.overflowY="auto";this.div.style.overflowX="hidden";this.div.style.maxHeight=Math.max(document.body.clientHeight,document.documentElement.clientHeight)-10+"px"};Menus.prototype.createHelpLink=function(a){var b=document.createElement("span");b.setAttribute("title",mxResources.get("help"));b.style.cssText="color:blue;text-decoration:underline;margin-left:8px;cursor:help;";
var c=document.createElement("img");mxUtils.setOpacity(c,50);c.style.height="16px";c.style.width="16px";c.setAttribute("border","0");c.setAttribute("valign","bottom");c.setAttribute("src",Editor.helpImage);b.appendChild(c);mxEvent.addGestureListeners(b,mxUtils.bind(this,function(b){this.editorUi.hideCurrentMenu();this.editorUi.openLink(a);mxEvent.consume(b)}));return b};Menus.prototype.addLinkToItem=function(a,b){null!=a&&a.firstChild.nextSibling.appendChild(this.createHelpLink(b))};var d=Menus.prototype.init;
-Menus.prototype.init=function(){function a(a,b,c){this.ui=a;this.previousExtFonts=this.extFonts=b;this.prevCustomFonts=this.customFonts=c}d.apply(this,arguments);var b=this.editorUi,f=b.editor.graph,g=mxUtils.bind(f,f.isEnabled),m=("1"!=urlParams.embed&&"0"!=urlParams.gapi||"1"==urlParams.embed&&"1"==urlParams.gapi)&&mxClient.IS_SVG&&isLocalStorage&&(null==document.documentMode||10<=document.documentMode),e=("1"!=urlParams.embed&&"0"!=urlParams.db||"1"==urlParams.embed&&"1"==urlParams.db)&&mxClient.IS_SVG&&
+Menus.prototype.init=function(){function a(a,b,c){this.ui=a;this.previousExtFonts=this.extFonts=b;this.prevCustomFonts=this.customFonts=c}d.apply(this,arguments);var b=this.editorUi,g=b.editor.graph,f=mxUtils.bind(g,g.isEnabled),m=("1"!=urlParams.embed&&"0"!=urlParams.gapi||"1"==urlParams.embed&&"1"==urlParams.gapi)&&mxClient.IS_SVG&&isLocalStorage&&(null==document.documentMode||10<=document.documentMode),e=("1"!=urlParams.embed&&"0"!=urlParams.db||"1"==urlParams.embed&&"1"==urlParams.db)&&mxClient.IS_SVG&&
(null==document.documentMode||9<document.documentMode),k=("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),l="1"==urlParams.tr&&mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode);mxClient.IS_SVG||
b.isOffline()||((new Image).src=IMAGE_PATH+"/help.png");"1"==urlParams.noFileMenu&&(this.defaultMenuItems=this.defaultMenuItems.filter(function(a){return"file"!=a}));b.actions.addAction("new...",function(){var a=b.isOffline();if(a||"1"!=urlParams.newTempDlg||b.mode!=App.MODE_GOOGLE){var c=new NewDialog(b,a,!(b.mode==App.MODE_DEVICE&&"chooseFileSystemEntries"in window));b.showDialog(c.container,a?350:620,a?70:460,!0,!0,function(a){b.sidebar.hideTooltip();a&&null==b.getCurrentFile()&&b.showSplash()});
c.init()}else{var d=function(a){return{id:a.id,isExt:!0,url:a.downloadUrl,title:a.title,imgUrl:a.thumbnailLink,changedBy:a.lastModifyingUserName,lastModifiedOn:a.modifiedDate}},a=new TemplatesDialog(b,function(a,c,d){var e=d.libs,f=d.clibs;b.pickFolder(b.mode,function(d){b.createFile(c,a,null!=e&&0<e.length?e:null,null,function(){b.hideDialog()},null,d,null,null!=f&&0<f.length?f:null)},null==b.stateArg||null==b.stateArg.folderId)},null,null,null,"user",function(a,c,e){var f=new Date;f.setDate(f.getDate()-
-7);b.drive.listFiles(null,f,e?!0:!1,function(b){for(var c=[],e=0;e<b.items.length;e++)c.push(d(b.items[e]));a(c)},c)},function(a,c,e,f){b.drive.listFiles(a,null,f?!0:!1,function(a){for(var b=[],e=0;e<a.items.length;e++)b.push(d(a.items[e]));c(b)},e)},function(a,c,d){b.drive.getFile(a.id,function(a){c(a.data)},d)},null,null,!1,!1);b.showDialog(a.container,window.innerWidth,window.innerHeight,!0,!1,null,!1,!0)}});b.actions.put("insertTemplate",new Action(mxResources.get("template")+"...",function(){if(f.isEnabled()&&
-!f.isCellLocked(f.getDefaultParent())){var a=new NewDialog(b,null,!1,function(a){b.hideDialog();if(null!=a){var c=b.editor.graph.getFreeInsertPoint();f.setSelectionCells(b.importXml(a,Math.max(c.x,20),Math.max(c.y,20),!0,null,null,!0));f.scrollCellToVisible(f.getSelectionCell())}},null,null,null,null,null,null,null,null,null,null,!1,mxResources.get("insert"));b.showDialog(a.container,620,460,!0,!0,function(){b.sidebar.hideTooltip()});a.init()}})).isEnabled=g;var n=b.actions.addAction("points",function(){b.editor.graph.view.setUnit(mxConstants.POINTS)});
+7);b.drive.listFiles(null,f,e?!0:!1,function(b){for(var c=[],e=0;e<b.items.length;e++)c.push(d(b.items[e]));a(c)},c)},function(a,c,e,f){b.drive.listFiles(a,null,f?!0:!1,function(a){for(var b=[],e=0;e<a.items.length;e++)b.push(d(a.items[e]));c(b)},e)},function(a,c,d){b.drive.getFile(a.id,function(a){c(a.data)},d)},null,null,!1,!1);b.showDialog(a.container,window.innerWidth,window.innerHeight,!0,!1,null,!1,!0)}});b.actions.put("insertTemplate",new Action(mxResources.get("template")+"...",function(){if(g.isEnabled()&&
+!g.isCellLocked(g.getDefaultParent())){var a=new NewDialog(b,null,!1,function(a){b.hideDialog();if(null!=a){var c=b.editor.graph.getFreeInsertPoint();g.setSelectionCells(b.importXml(a,Math.max(c.x,20),Math.max(c.y,20),!0,null,null,!0));g.scrollCellToVisible(g.getSelectionCell())}},null,null,null,null,null,null,null,null,null,null,!1,mxResources.get("insert"));b.showDialog(a.container,620,460,!0,!0,function(){b.sidebar.hideTooltip()});a.init()}})).isEnabled=f;var n=b.actions.addAction("points",function(){b.editor.graph.view.setUnit(mxConstants.POINTS)});
n.setToggleAction(!0);n.setSelectedCallback(function(){return b.editor.graph.view.unit==mxConstants.POINTS});n=b.actions.addAction("inches",function(){b.editor.graph.view.setUnit(mxConstants.INCHES)});n.setToggleAction(!0);n.setSelectedCallback(function(){return b.editor.graph.view.unit==mxConstants.INCHES});n=b.actions.addAction("millimeters",function(){b.editor.graph.view.setUnit(mxConstants.MILLIMETERS)});n.setToggleAction(!0);n.setSelectedCallback(function(){return b.editor.graph.view.unit==mxConstants.MILLIMETERS});
this.put("units",new Menu(mxUtils.bind(this,function(a,b){this.addMenuItems(a,["points","millimeters"],b)})));n=b.actions.addAction("ruler",function(){mxSettings.setRulerOn(!mxSettings.isRulerOn());mxSettings.save();null!=b.ruler?(b.ruler.destroy(),b.ruler=null):b.ruler=new mxDualRuler(b,b.editor.graph.view.unit);b.refresh()});n.setEnabled(b.canvasSupported&&9!=document.documentMode);n.setToggleAction(!0);n.setSelectedCallback(function(){return null!=b.ruler});n=b.actions.addAction("fullscreen",function(){null==
-document.fullscreenElement?document.body.requestFullscreen():document.exitFullscreen()});n.visible=document.fullscreenEnabled&&null!=document.body.requestFullscreen;n.setToggleAction(!0);n.setSelectedCallback(function(){return null!=document.fullscreenElement});b.actions.addAction("properties...",function(){var a=new FilePropertiesDialog(b);b.showDialog(a.container,320,120,!0,!0);a.init()}).isEnabled=g;window.mxFreehand&&(b.actions.put("insertFreehand",new Action(mxResources.get("freehand")+"...",
-function(a){f.isEnabled()&&(null==this.freehandWindow&&(this.freehandWindow=new FreehandWindow(b,document.body.offsetWidth-420,102,176,84)),f.freehand.isDrawing()?f.freehand.stopDrawing():f.freehand.startDrawing(),this.freehandWindow.window.setVisible(f.freehand.isDrawing()))})).isEnabled=function(){return g()&&mxClient.IS_SVG});b.actions.put("exportXml",new Action(mxResources.get("formatXml")+"...",function(){var a=document.createElement("div");a.style.whiteSpace="nowrap";var c=null==b.pages||1>=
-b.pages.length,d=document.createElement("h3");mxUtils.write(d,mxResources.get("formatXml"));d.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";a.appendChild(d);var e=b.addCheckbox(a,mxResources.get("selectionOnly"),!1,f.isSelectionEmpty()),g=b.addCheckbox(a,mxResources.get("compressed"),!0),k=b.addCheckbox(a,mxResources.get("allPages"),!c,c);k.style.marginBottom="16px";mxEvent.addListener(e,"change",function(){e.checked?k.setAttribute("disabled","disabled"):k.removeAttribute("disabled")});
-a=new CustomDialog(b,a,mxUtils.bind(this,function(){b.downloadFile("xml",!g.checked,null,!e.checked,c||!k.checked)}),null,mxResources.get("export"));b.showDialog(a.container,300,180,!0,!0)}));b.actions.put("exportUrl",new Action(mxResources.get("url")+"...",function(){b.showPublishLinkDialog(mxResources.get("url"),!0,null,null,function(a,c,d,e,f,g){a=new EmbedDialog(b,b.createLink(a,c,d,e,f,g,null,!0));b.showDialog(a.container,440,240,!0,!0);a.init()})}));b.actions.put("exportHtml",new Action(mxResources.get("formatHtmlEmbedded")+
+document.fullscreenElement?document.body.requestFullscreen():document.exitFullscreen()});n.visible=document.fullscreenEnabled&&null!=document.body.requestFullscreen;n.setToggleAction(!0);n.setSelectedCallback(function(){return null!=document.fullscreenElement});b.actions.addAction("properties...",function(){var a=new FilePropertiesDialog(b);b.showDialog(a.container,320,120,!0,!0);a.init()}).isEnabled=f;window.mxFreehand&&(b.actions.put("insertFreehand",new Action(mxResources.get("freehand")+"...",
+function(a){g.isEnabled()&&(null==this.freehandWindow&&(this.freehandWindow=new FreehandWindow(b,document.body.offsetWidth-420,102,176,84)),g.freehand.isDrawing()?g.freehand.stopDrawing():g.freehand.startDrawing(),this.freehandWindow.window.setVisible(g.freehand.isDrawing()))})).isEnabled=function(){return f()&&mxClient.IS_SVG});b.actions.put("exportXml",new Action(mxResources.get("formatXml")+"...",function(){var a=document.createElement("div");a.style.whiteSpace="nowrap";var c=null==b.pages||1>=
+b.pages.length,d=document.createElement("h3");mxUtils.write(d,mxResources.get("formatXml"));d.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";a.appendChild(d);var e=b.addCheckbox(a,mxResources.get("selectionOnly"),!1,g.isSelectionEmpty()),f=b.addCheckbox(a,mxResources.get("compressed"),!0),k=b.addCheckbox(a,mxResources.get("allPages"),!c,c);k.style.marginBottom="16px";mxEvent.addListener(e,"change",function(){e.checked?k.setAttribute("disabled","disabled"):k.removeAttribute("disabled")});
+a=new CustomDialog(b,a,mxUtils.bind(this,function(){b.downloadFile("xml",!f.checked,null,!e.checked,c||!k.checked)}),null,mxResources.get("export"));b.showDialog(a.container,300,180,!0,!0)}));b.actions.put("exportUrl",new Action(mxResources.get("url")+"...",function(){b.showPublishLinkDialog(mxResources.get("url"),!0,null,null,function(a,c,d,e,f,g){a=new EmbedDialog(b,b.createLink(a,c,d,e,f,g,null,!0));b.showDialog(a.container,440,240,!0,!0);a.init()})}));b.actions.put("exportHtml",new Action(mxResources.get("formatHtmlEmbedded")+
"...",function(){b.spinner.spin(document.body,mxResources.get("loading"))&&b.getPublicUrl(b.getCurrentFile(),function(a){b.spinner.stop();b.showHtmlDialog(mxResources.get("export"),null,a,function(a,c,d,e,f,g,k,m,l,n){b.createHtml(a,c,d,e,f,g,k,m,l,n,mxUtils.bind(this,function(a,c){var d=b.getBaseFilename(k),e='\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(d)+'</title>\n<meta charset="utf-8"/>\n</head>\n<body>'+
-a+"\n"+c+"\n</body>\n</html>";b.saveData(d+".html","html",e,"text/html")}))})})}));b.actions.put("exportPdf",new Action(mxResources.get("formatPdf")+"...",function(){if(EditorUi.isElectronApp||!b.isOffline()&&!b.printPdfExport){var a=null==b.pages||1>=b.pages.length,c=document.createElement("div");c.style.whiteSpace="nowrap";var d=document.createElement("h3");mxUtils.write(d,mxResources.get("formatPdf"));d.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";c.appendChild(d);
-var e=function(){g!=this&&this.checked?(l.removeAttribute("disabled"),l.checked=!f.pageVisible):(l.setAttribute("disabled","disabled"),l.checked=!1)},d=180;if(b.pdfPageExport&&!a){var g=b.addRadiobox(c,"pages",mxResources.get("allPages"),!0),k=b.addRadiobox(c,"pages",mxResources.get("currentPage"),!1),m=b.addRadiobox(c,"pages",mxResources.get("selectionOnly"),!1,f.isSelectionEmpty()),l=b.addCheckbox(c,mxResources.get("crop"),!1,!0),n=b.addCheckbox(c,mxResources.get("grid"),!1,!1);mxEvent.addListener(g,
-"change",e);mxEvent.addListener(k,"change",e);mxEvent.addListener(m,"change",e);d+=60}else m=b.addCheckbox(c,mxResources.get("selectionOnly"),!1,f.isSelectionEmpty()),l=b.addCheckbox(c,mxResources.get("crop"),!f.pageVisible||!b.pdfPageExport,!b.pdfPageExport),n=b.addCheckbox(c,mxResources.get("grid"),!1,!1),b.pdfPageExport||mxEvent.addListener(m,"change",e);var e=!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&"draw.io"==b.getServiceName(),p=null,t=null;if(EditorUi.isElectronApp||e)t=b.addCheckbox(c,
-mxResources.get("includeCopyOfMyDiagram"),!0),d+=30;e&&(p=b.addCheckbox(c,mxResources.get("transparentBackground"),!1),d+=30);c=new CustomDialog(b,c,mxUtils.bind(this,function(){b.downloadFile("pdf",null,null,!m.checked,a?!0:!g.checked,!l.checked,null!=p&&p.checked,null,null,n.checked,null!=t&&t.checked)}),null,mxResources.get("export"));b.showDialog(c.container,300,d,!0,!0)}else b.showDialog((new PrintDialog(b,mxResources.get("formatPdf"))).container,360,null!=b.pages&&1<b.pages.length&&(b.editor.editable||
-"1"!=urlParams["hide-pages"])?450:370,!0,!0)}));b.actions.addAction("open...",function(){b.pickFile()});b.actions.addAction("close",function(){function a(){null!=c&&c.removeDraft();b.fileLoaded(null)}var c=b.getCurrentFile();null!=c&&c.isModified()?b.confirm(mxResources.get("allChangesLost"),null,a,mxResources.get("cancel"),mxResources.get("discardChanges")):a()});b.actions.addAction("editShape...",mxUtils.bind(this,function(){f.getSelectionCells();if(1==f.getSelectionCount()){var a=f.getSelectionCell(),
-c=f.view.getState(a);null!=c&&null!=c.shape&&null!=c.shape.stencil&&(a=new EditShapeDialog(b,a,mxResources.get("editShape")+":",630,400),b.showDialog(a.container,640,480,!0,!1),a.init())}}));b.actions.addAction("revisionHistory...",function(){b.isRevisionHistorySupported()?b.spinner.spin(document.body,mxResources.get("loading"))&&b.getRevisions(mxUtils.bind(this,function(a,c){b.spinner.stop();var d=new RevisionDialog(b,a,c);b.showDialog(d.container,640,480,!0,!0);d.init()}),mxUtils.bind(this,function(a){b.handleError(a)})):
-b.showError(mxResources.get("error"),mxResources.get("notAvailable"),mxResources.get("ok"))});b.actions.addAction("createRevision",function(){b.actions.get("save").funct()},null,null,Editor.ctrlKey+"+S");n=b.actions.addAction("synchronize",function(){b.synchronizeCurrentFile("none"==DrawioFile.SYNC)},null,null,"Alt+Shift+S");"none"==DrawioFile.SYNC&&(n.label=mxResources.get("refresh"));b.actions.addAction("upload...",function(){var a=b.getCurrentFile();null!=a&&(window.drawdata=b.getFileData(),a=
-null!=a.getTitle()?a.getTitle():b.defaultFilename,b.openLink(window.location.protocol+"//"+window.location.host+"/?create=drawdata&"+(b.mode==App.MODE_DROPBOX?"mode=dropbox&":"")+"title="+encodeURIComponent(a),null,!0))});"undefined"!==typeof MathJax&&(n=b.actions.addAction("mathematicalTypesetting",function(){var a=new ChangePageSetup(b);a.ignoreColor=!0;a.ignoreImage=!0;a.mathEnabled=!b.isMathEnabled();f.model.execute(a)}),n.setToggleAction(!0),n.setSelectedCallback(function(){return b.isMathEnabled()}),
-n.isEnabled=g);isLocalStorage&&(n=b.actions.addAction("showStartScreen",function(){mxSettings.setShowStartScreen(!mxSettings.getShowStartScreen());mxSettings.save()}),n.setToggleAction(!0),n.setSelectedCallback(function(){return mxSettings.getShowStartScreen()}));var p=b.actions.addAction("autosave",function(){b.editor.setAutosave(!b.editor.autosave)});p.setToggleAction(!0);p.setSelectedCallback(function(){return p.isEnabled()&&b.editor.autosave});b.actions.addAction("editGeometry...",function(){for(var a=
-f.getSelectionCells(),c=[],d=0;d<a.length;d++)f.getModel().isVertex(a[d])&&c.push(a[d]);0<c.length&&(a=new EditGeometryDialog(b,c),b.showDialog(a.container,200,270,!0,!0),a.init())},null,null,Editor.ctrlKey+"+Shift+M");var q=null;b.actions.addAction("copyStyle",function(){f.isEnabled()&&!f.isSelectionEmpty()&&(q=f.copyStyle(f.getSelectionCell()))},null,null,Editor.ctrlKey+"+Shift+C");b.actions.addAction("pasteStyle",function(){f.isEnabled()&&!f.isSelectionEmpty()&&null!=q&&f.pasteStyle(q,f.getSelectionCells())},
-null,null,Editor.ctrlKey+"+Shift+V");b.actions.put("pageBackgroundImage",new Action(mxResources.get("backgroundImage")+"...",function(){if(!b.isOffline()){var a=new BackgroundImageDialog(b,function(a){b.setBackgroundImage(a)});b.showDialog(a.container,320,170,!0,!0);a.init()}}));b.actions.put("exportSvg",new Action(mxResources.get("formatSvg")+"...",function(){b.showExportDialog(mxResources.get("formatSvg"),!0,mxResources.get("export"),"https://www.diagrams.net/doc/faq/export-diagram",mxUtils.bind(this,
-function(a,c,d,e,f,g,k,m,l,n,p,t,q){a=parseInt(a);!isNaN(a)&&0<a&&b.exportSvg(a/100,c,d,e,f,g,k,!m,!1,n,t,q)}),!0,null,"svg",!0)}));b.actions.put("exportPng",new Action(mxResources.get("formatPng")+"...",function(){b.isExportToCanvas()?b.showExportDialog(mxResources.get("image"),!1,mxResources.get("export"),"https://www.diagrams.net/doc/faq/export-diagram",mxUtils.bind(this,function(a,c,d,e,f,g,k,m,l,n,p,t,q){a=parseInt(a);!isNaN(a)&&0<a&&b.exportImage(a/100,c,d,e,f,k,!m,!1,null,p,null,t,q)}),!0,
-!0,"png",!0):b.isOffline()||mxClient.IS_IOS&&navigator.standalone||b.showRemoteExportDialog(mxResources.get("export"),null,mxUtils.bind(this,function(a,c,d,e,f){b.downloadFile(c?"xmlpng":"png",null,null,a,null,null,d,e,f)}),!1,!0)}));b.actions.put("exportJpg",new Action(mxResources.get("formatJpg")+"...",function(){b.isExportToCanvas()?b.showExportDialog(mxResources.get("image"),!1,mxResources.get("export"),"https://www.diagrams.net/doc/faq/export-diagram",mxUtils.bind(this,function(a,c,d,e,f,g,k,
-m,l,n,p,t,q){a=parseInt(a);!isNaN(a)&&0<a&&b.exportImage(a/100,!1,d,e,!1,k,!m,!1,"jpeg",p,null,t,q)}),!0,!1,"jpeg",!0):b.isOffline()||mxClient.IS_IOS&&navigator.standalone||b.showRemoteExportDialog(mxResources.get("export"),null,mxUtils.bind(this,function(a,c,d,e,f){b.downloadFile("jpeg",null,null,a,null,null,null,e,f)}),!0,!0)}));n=b.actions.addAction("copyAsImage",mxUtils.bind(this,function(){var a=mxUtils.sortCells(f.model.getTopmostCells(f.getSelectionCells())),c=mxUtils.getXml(0==a.length?b.editor.getGraphXml():
-f.encodeCells(a));b.copyImage(a,c)}));n.visible=Editor.enableNativeCipboard&&b.isExportToCanvas()&&!mxClient.IS_SF;n=b.actions.put("shadowVisible",new Action(mxResources.get("shadow"),function(){f.setShadowVisible(!f.shadowVisible)}));n.setToggleAction(!0);n.setSelectedCallback(function(){return f.shadowVisible});b.actions.put("about",new Action(mxResources.get("about")+" "+EditorUi.VERSION+"...",function(){b.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?b.alert(b.editor.appName+" "+
-EditorUi.VERSION):b.openLink("https://www.diagrams.net/")}));b.actions.addAction("support...",function(){EditorUi.isElectronApp?b.openLink("https://github.com/jgraph/drawio-desktop/wiki/Getting-Support"):b.openLink("https://github.com/jgraph/drawio/wiki/Getting-Support")});b.actions.addAction("exportOptionsDisabled...",function(){b.handleError({message:mxResources.get("exportOptionsDisabledDetails")},mxResources.get("exportOptionsDisabled"))});b.actions.addAction("keyboardShortcuts...",function(){!mxClient.IS_SVG||
-mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?b.openLink("https://viewer.diagrams.net/#Uhttps%3A%2F%2Fviewer.diagrams.net%2Fshortcuts.svg"):b.openLink("shortcuts.svg")});b.actions.addAction("feedback...",function(){var a=new FeedbackDialog(b);b.showDialog(a.container,610,360,!0,!1);a.init()});b.actions.addAction("quickStart...",function(){b.openLink("https://www.youtube.com/watch?v=Z0D96ZikMkc")});b.actions.addAction("forkme",function(){EditorUi.isElectronApp?b.openLink("https://github.com/jgraph/drawio-desktop"):
+a+"\n"+c+"\n</body>\n</html>";b.saveData(d+(".drawio"==d.substring(d.lenth-7)?"":".drawio")+".html","html",e,"text/html")}))})})}));b.actions.put("exportPdf",new Action(mxResources.get("formatPdf")+"...",function(){if(EditorUi.isElectronApp||!b.isOffline()&&!b.printPdfExport){var a=null==b.pages||1>=b.pages.length,c=document.createElement("div");c.style.whiteSpace="nowrap";var d=document.createElement("h3");mxUtils.write(d,mxResources.get("formatPdf"));d.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";
+c.appendChild(d);var e=function(){f!=this&&this.checked?(l.removeAttribute("disabled"),l.checked=!g.pageVisible):(l.setAttribute("disabled","disabled"),l.checked=!1)},d=180;if(b.pdfPageExport&&!a){var f=b.addRadiobox(c,"pages",mxResources.get("allPages"),!0),k=b.addRadiobox(c,"pages",mxResources.get("currentPage"),!1),m=b.addRadiobox(c,"pages",mxResources.get("selectionOnly"),!1,g.isSelectionEmpty()),l=b.addCheckbox(c,mxResources.get("crop"),!1,!0),n=b.addCheckbox(c,mxResources.get("grid"),!1,!1);
+mxEvent.addListener(f,"change",e);mxEvent.addListener(k,"change",e);mxEvent.addListener(m,"change",e);d+=60}else m=b.addCheckbox(c,mxResources.get("selectionOnly"),!1,g.isSelectionEmpty()),l=b.addCheckbox(c,mxResources.get("crop"),!g.pageVisible||!b.pdfPageExport,!b.pdfPageExport),n=b.addCheckbox(c,mxResources.get("grid"),!1,!1),b.pdfPageExport||mxEvent.addListener(m,"change",e);var e=!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&"draw.io"==b.getServiceName(),p=null,q=null;if(EditorUi.isElectronApp||
+e)q=b.addCheckbox(c,mxResources.get("includeCopyOfMyDiagram"),Editor.defaultIncludeDiagram),d+=30;e&&(p=b.addCheckbox(c,mxResources.get("transparentBackground"),!1),d+=30);c=new CustomDialog(b,c,mxUtils.bind(this,function(){b.downloadFile("pdf",null,null,!m.checked,a?!0:!f.checked,!l.checked,null!=p&&p.checked,null,null,n.checked,null!=q&&q.checked)}),null,mxResources.get("export"));b.showDialog(c.container,300,d,!0,!0)}else b.showDialog((new PrintDialog(b,mxResources.get("formatPdf"))).container,
+360,null!=b.pages&&1<b.pages.length&&(b.editor.editable||"1"!=urlParams["hide-pages"])?450:370,!0,!0)}));b.actions.addAction("open...",function(){b.pickFile()});b.actions.addAction("close",function(){function a(){null!=c&&c.removeDraft();b.fileLoaded(null)}var c=b.getCurrentFile();null!=c&&c.isModified()?b.confirm(mxResources.get("allChangesLost"),null,a,mxResources.get("cancel"),mxResources.get("discardChanges")):a()});b.actions.addAction("editShape...",mxUtils.bind(this,function(){g.getSelectionCells();
+if(1==g.getSelectionCount()){var a=g.getSelectionCell(),c=g.view.getState(a);null!=c&&null!=c.shape&&null!=c.shape.stencil&&(a=new EditShapeDialog(b,a,mxResources.get("editShape")+":",630,400),b.showDialog(a.container,640,480,!0,!1),a.init())}}));b.actions.addAction("revisionHistory...",function(){b.isRevisionHistorySupported()?b.spinner.spin(document.body,mxResources.get("loading"))&&b.getRevisions(mxUtils.bind(this,function(a,c){b.spinner.stop();var d=new RevisionDialog(b,a,c);b.showDialog(d.container,
+640,480,!0,!0);d.init()}),mxUtils.bind(this,function(a){b.handleError(a)})):b.showError(mxResources.get("error"),mxResources.get("notAvailable"),mxResources.get("ok"))});b.actions.addAction("createRevision",function(){b.actions.get("save").funct()},null,null,Editor.ctrlKey+"+S");n=b.actions.addAction("synchronize",function(){b.synchronizeCurrentFile("none"==DrawioFile.SYNC)},null,null,"Alt+Shift+S");"none"==DrawioFile.SYNC&&(n.label=mxResources.get("refresh"));b.actions.addAction("upload...",function(){var a=
+b.getCurrentFile();null!=a&&(window.drawdata=b.getFileData(),a=null!=a.getTitle()?a.getTitle():b.defaultFilename,b.openLink(window.location.protocol+"//"+window.location.host+"/?create=drawdata&"+(b.mode==App.MODE_DROPBOX?"mode=dropbox&":"")+"title="+encodeURIComponent(a),null,!0))});"undefined"!==typeof MathJax&&(n=b.actions.addAction("mathematicalTypesetting",function(){var a=new ChangePageSetup(b);a.ignoreColor=!0;a.ignoreImage=!0;a.mathEnabled=!b.isMathEnabled();g.model.execute(a)}),n.setToggleAction(!0),
+n.setSelectedCallback(function(){return b.isMathEnabled()}),n.isEnabled=f);isLocalStorage&&(n=b.actions.addAction("showStartScreen",function(){mxSettings.setShowStartScreen(!mxSettings.getShowStartScreen());mxSettings.save()}),n.setToggleAction(!0),n.setSelectedCallback(function(){return mxSettings.getShowStartScreen()}));var p=b.actions.addAction("autosave",function(){b.editor.setAutosave(!b.editor.autosave)});p.setToggleAction(!0);p.setSelectedCallback(function(){return p.isEnabled()&&b.editor.autosave});
+b.actions.addAction("editGeometry...",function(){for(var a=g.getSelectionCells(),c=[],d=0;d<a.length;d++)g.getModel().isVertex(a[d])&&c.push(a[d]);0<c.length&&(a=new EditGeometryDialog(b,c),b.showDialog(a.container,200,270,!0,!0),a.init())},null,null,Editor.ctrlKey+"+Shift+M");var q=null;b.actions.addAction("copyStyle",function(){g.isEnabled()&&!g.isSelectionEmpty()&&(q=g.copyStyle(g.getSelectionCell()))},null,null,Editor.ctrlKey+"+Shift+C");b.actions.addAction("pasteStyle",function(){g.isEnabled()&&
+!g.isSelectionEmpty()&&null!=q&&g.pasteStyle(q,g.getSelectionCells())},null,null,Editor.ctrlKey+"+Shift+V");b.actions.put("pageBackgroundImage",new Action(mxResources.get("backgroundImage")+"...",function(){if(!b.isOffline()){var a=new BackgroundImageDialog(b,function(a){b.setBackgroundImage(a)});b.showDialog(a.container,320,170,!0,!0);a.init()}}));b.actions.put("exportSvg",new Action(mxResources.get("formatSvg")+"...",function(){b.showExportDialog(mxResources.get("formatSvg"),!0,mxResources.get("export"),
+"https://www.diagrams.net/doc/faq/export-diagram",mxUtils.bind(this,function(a,c,d,e,f,g,k,m,l,n,p,q,t){a=parseInt(a);!isNaN(a)&&0<a&&b.exportSvg(a/100,c,d,e,f,g,k,!m,!1,n,q,t)}),!0,null,"svg",!0)}));b.actions.put("exportPng",new Action(mxResources.get("formatPng")+"...",function(){b.isExportToCanvas()?b.showExportDialog(mxResources.get("image"),!1,mxResources.get("export"),"https://www.diagrams.net/doc/faq/export-diagram",mxUtils.bind(this,function(a,c,d,e,f,g,k,m,l,n,p,q,t){a=parseInt(a);!isNaN(a)&&
+0<a&&b.exportImage(a/100,c,d,e,f,k,!m,!1,null,p,null,q,t)}),!0,Editor.defaultIncludeDiagram,"png",!0):b.isOffline()||mxClient.IS_IOS&&navigator.standalone||b.showRemoteExportDialog(mxResources.get("export"),null,mxUtils.bind(this,function(a,c,d,e,f){b.downloadFile(c?"xmlpng":"png",null,null,a,null,null,d,e,f)}),!1,!0)}));b.actions.put("exportJpg",new Action(mxResources.get("formatJpg")+"...",function(){b.isExportToCanvas()?b.showExportDialog(mxResources.get("image"),!1,mxResources.get("export"),"https://www.diagrams.net/doc/faq/export-diagram",
+mxUtils.bind(this,function(a,c,d,e,f,g,k,m,l,n,p,q,t){a=parseInt(a);!isNaN(a)&&0<a&&b.exportImage(a/100,!1,d,e,!1,k,!m,!1,"jpeg",p,null,q,t)}),!0,!1,"jpeg",!0):b.isOffline()||mxClient.IS_IOS&&navigator.standalone||b.showRemoteExportDialog(mxResources.get("export"),null,mxUtils.bind(this,function(a,c,d,e,f){b.downloadFile("jpeg",null,null,a,null,null,null,e,f)}),!0,!0)}));n=b.actions.addAction("copyAsImage",mxUtils.bind(this,function(){var a=mxUtils.sortCells(g.model.getTopmostCells(g.getSelectionCells())),
+c=mxUtils.getXml(0==a.length?b.editor.getGraphXml():g.encodeCells(a));b.copyImage(a,c)}));n.visible=Editor.enableNativeCipboard&&b.isExportToCanvas()&&!mxClient.IS_SF;n=b.actions.put("shadowVisible",new Action(mxResources.get("shadow"),function(){g.setShadowVisible(!g.shadowVisible)}));n.setToggleAction(!0);n.setSelectedCallback(function(){return g.shadowVisible});b.actions.put("about",new Action(mxResources.get("about")+" "+EditorUi.VERSION+"...",function(){b.isOffline()||mxClient.IS_CHROMEAPP||
+EditorUi.isElectronApp?b.alert(b.editor.appName+" "+EditorUi.VERSION):b.openLink("https://www.diagrams.net/")}));b.actions.addAction("support...",function(){EditorUi.isElectronApp?b.openLink("https://github.com/jgraph/drawio-desktop/wiki/Getting-Support"):b.openLink("https://github.com/jgraph/drawio/wiki/Getting-Support")});b.actions.addAction("exportOptionsDisabled...",function(){b.handleError({message:mxResources.get("exportOptionsDisabledDetails")},mxResources.get("exportOptionsDisabled"))});b.actions.addAction("keyboardShortcuts...",
+function(){!mxClient.IS_SVG||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?b.openLink("https://viewer.diagrams.net/#Uhttps%3A%2F%2Fviewer.diagrams.net%2Fshortcuts.svg"):b.openLink("shortcuts.svg")});b.actions.addAction("feedback...",function(){var a=new FeedbackDialog(b);b.showDialog(a.container,610,360,!0,!1);a.init()});b.actions.addAction("quickStart...",function(){b.openLink("https://www.youtube.com/watch?v=Z0D96ZikMkc")});b.actions.addAction("forkme",function(){EditorUi.isElectronApp?b.openLink("https://github.com/jgraph/drawio-desktop"):
b.openLink("https://github.com/jgraph/drawio")}).label="Fork me on GitHub...";b.actions.addAction("downloadDesktop...",function(){b.openLink("https://get.diagrams.net/")});n=b.actions.addAction("tags...",mxUtils.bind(this,function(){null==this.tagsWindow?(this.tagsWindow=new TagsWindow(b,document.body.offsetWidth-380,230,300,120),this.tagsWindow.window.addListener("show",function(){b.fireEvent(new mxEventObject("tags"))}),this.tagsWindow.window.addListener("hide",function(){b.fireEvent(new mxEventObject("tags"))}),
-this.tagsWindow.window.setVisible(!0),b.fireEvent(new mxEventObject("tags"))):this.tagsWindow.window.setVisible(!this.tagsWindow.window.isVisible())}));n.setToggleAction(!0);n.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.tagsWindow&&this.tagsWindow.window.isVisible()}));n=b.actions.addAction("findReplace...",mxUtils.bind(this,function(a,c){var d=f.isEnabled()&&(null==c||!mxEvent.isShiftDown(c)),e=d?"findReplace":"find",g=e+"Window";if(null==this[g]){var k=d?"min"==uiTheme?330:
-300:240;this[g]=new FindWindow(b,document.body.offsetWidth-(k+20),100,k,d?"min"==uiTheme?304:288:170,d);this[g].window.addListener("show",function(){b.fireEvent(new mxEventObject(e))});this[g].window.addListener("hide",function(){b.fireEvent(new mxEventObject(e))});this[g].window.setVisible(!0)}else this[g].window.setVisible(!this[g].window.isVisible())}),null,null,Editor.ctrlKey+"+F");n.setToggleAction(!0);n.setSelectedCallback(mxUtils.bind(this,function(){var a=f.isEnabled()?"findReplaceWindow":
+this.tagsWindow.window.setVisible(!0),b.fireEvent(new mxEventObject("tags"))):this.tagsWindow.window.setVisible(!this.tagsWindow.window.isVisible())}));n.setToggleAction(!0);n.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.tagsWindow&&this.tagsWindow.window.isVisible()}));n=b.actions.addAction("findReplace...",mxUtils.bind(this,function(a,c){var d=g.isEnabled()&&(null==c||!mxEvent.isShiftDown(c)),e=d?"findReplace":"find",f=e+"Window";if(null==this[f]){var k=d?"min"==uiTheme?330:
+300:240;this[f]=new FindWindow(b,document.body.offsetWidth-(k+20),100,k,d?"min"==uiTheme?304:288:170,d);this[f].window.addListener("show",function(){b.fireEvent(new mxEventObject(e))});this[f].window.addListener("hide",function(){b.fireEvent(new mxEventObject(e))});this[f].window.setVisible(!0)}else this[f].window.setVisible(!this[f].window.isVisible())}),null,null,Editor.ctrlKey+"+F");n.setToggleAction(!0);n.setSelectedCallback(mxUtils.bind(this,function(){var a=g.isEnabled()?"findReplaceWindow":
"findWindow";return null!=this[a]&&this[a].window.isVisible()}));b.actions.put("exportVsdx",new Action(mxResources.get("formatVsdx")+" (beta)...",function(){var a=null==b.pages||1>=b.pages.length;if(a)b.exportVisio();else{var c=document.createElement("div");c.style.whiteSpace="nowrap";var d=document.createElement("h3");mxUtils.write(d,mxResources.get("formatVsdx"));d.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";c.appendChild(d);var e=b.addCheckbox(c,mxResources.get("allPages"),
!a,a);e.style.marginBottom="16px";a=new CustomDialog(b,c,mxUtils.bind(this,function(){b.exportVisio(!e.checked)}),null,mxResources.get("export"));b.showDialog(a.container,300,110,!0,!0)}}));isLocalStorage&&null!=localStorage&&"1"!=urlParams.embed&&b.actions.addAction("configuration...",function(){var a=localStorage.getItem(Editor.configurationKey),c=[[mxResources.get("reset"),function(a,c){b.confirm(mxResources.get("areYouSure"),function(){try{localStorage.removeItem(Editor.configurationKey),mxEvent.isShiftDown(a)&&
(localStorage.removeItem(".drawio-config"),localStorage.removeItem(".mode")),b.hideDialog(),b.alert(mxResources.get("restartForChangeRequired"))}catch(D){b.handleError(D)}})}]];EditorUi.isElectronApp||c.push([mxResources.get("share"),function(a,c){if(0<c.value.length)try{var d=JSON.parse(c.value),e=window.location.protocol+"//"+window.location.host+"/"+b.getSearch()+"#_CONFIG_"+Graph.compress(JSON.stringify(d)),f=new EmbedDialog(b,e);b.showDialog(f.container,440,240,!0);f.init()}catch(F){b.handleError(F)}else b.handleError({message:mxResources.get("invalidInput")})}]);
@@ -11556,59 +11559,59 @@ b.loadingOrgChart||b.isOffline(!0)?g():b.spinner.spin(document.body,mxResources.
null!=c&&f){var a=b.editor.graph,g=new mxOrgChartLayout(a,c,d,e),k=a.getDefaultParent();1<a.model.getChildCount(a.getSelectionCell())&&(k=a.getSelectionCell());g.execute(k);f=!1}},k=document.createElement("div"),m=document.createElement("div");m.style.marginTop="6px";m.style.display="inline-block";m.style.width="140px";mxUtils.write(m,mxResources.get("orgChartType")+": ");k.appendChild(m);var l=document.createElement("select");l.style.width="200px";l.style.boxSizing="border-box";for(var m=[mxResources.get("linear"),
mxResources.get("hanger2"),mxResources.get("hanger4"),mxResources.get("fishbone1"),mxResources.get("fishbone2"),mxResources.get("1ColumnLeft"),mxResources.get("1ColumnRight"),mxResources.get("smart")],n=0;n<m.length;n++){var x=document.createElement("option");mxUtils.write(x,m[n]);x.value=n;2==n&&x.setAttribute("selected","selected");l.appendChild(x)}mxEvent.addListener(l,"change",function(){c=l.value});k.appendChild(l);m=document.createElement("div");m.style.marginTop="6px";m.style.display="inline-block";
m.style.width="140px";mxUtils.write(m,mxResources.get("parentChildSpacing")+": ");k.appendChild(m);var p=document.createElement("input");p.type="number";p.value=d;p.style.width="200px";p.style.boxSizing="border-box";k.appendChild(p);mxEvent.addListener(p,"change",function(){d=p.value});m=document.createElement("div");m.style.marginTop="6px";m.style.display="inline-block";m.style.width="140px";mxUtils.write(m,mxResources.get("siblingSpacing")+": ");k.appendChild(m);var A=document.createElement("input");
-A.type="number";A.value=e;A.style.width="200px";A.style.boxSizing="border-box";k.appendChild(A);mxEvent.addListener(A,"change",function(){e=A.value});k=new CustomDialog(b,k,function(){null==c&&(c=2);a()});b.showDialog(k.container,355,125,!0,!0)},c,null,g());a.addSeparator(c);a.addItem(mxResources.get("parallels"),null,mxUtils.bind(this,function(){var a=new mxParallelEdgeLayout(f);a.checkOverlap=!0;a.spacing=20;b.executeLayout(function(){a.execute(f.getDefaultParent(),f.isSelectionEmpty()?null:f.getSelectionCells())},
+A.type="number";A.value=e;A.style.width="200px";A.style.boxSizing="border-box";k.appendChild(A);mxEvent.addListener(A,"change",function(){e=A.value});k=new CustomDialog(b,k,function(){null==c&&(c=2);a()});b.showDialog(k.container,355,125,!0,!0)},c,null,f());a.addSeparator(c);a.addItem(mxResources.get("parallels"),null,mxUtils.bind(this,function(){var a=new mxParallelEdgeLayout(g);a.checkOverlap=!0;a.spacing=20;b.executeLayout(function(){a.execute(g.getDefaultParent(),g.isSelectionEmpty()?null:g.getSelectionCells())},
!1)}),c);a.addSeparator(c);b.menus.addMenuItem(a,"runLayout",c,null,null,mxResources.get("apply")+"...")};this.put("help",new Menu(mxUtils.bind(this,function(a,c){if(!mxClient.IS_CHROMEAPP&&b.isOffline())this.addMenuItems(a,["about"],c);else{var d=a.addItem("Search:",null,null,c,null,null,!1);d.style.backgroundColor=Editor.isDarkMode()?"#505759":"whiteSmoke";d.style.cursor="default";var e=document.createElement("input");e.setAttribute("type","text");e.setAttribute("size","25");e.style.marginLeft=
"8px";mxEvent.addListener(e,"keydown",mxUtils.bind(this,function(a){var b=mxUtils.trim(e.value);13==a.keyCode&&0<b.length?(this.editorUi.openLink("https://www.google.com/search?q=site%3Adiagrams.net+inurl%3A%2Fdoc%2Ffaq%2F+"+encodeURIComponent(b)),e.value="",EditorUi.logEvent({category:"SEARCH-HELP",action:"search",label:b}),window.setTimeout(mxUtils.bind(this,function(){this.editorUi.hideCurrentMenu()}),0)):27==a.keyCode&&(e.value="")}));d.firstChild.nextSibling.appendChild(e);mxEvent.addGestureListeners(e,
function(a){document.activeElement!=e&&e.focus();mxEvent.consume(a)},function(a){mxEvent.consume(a)},function(a){mxEvent.consume(a)});window.setTimeout(function(){e.focus()},0);EditorUi.isElectronApp?(console.log("electron help menu"),this.addMenuItems(a,"- keyboardShortcuts quickStart support - forkme - about".split(" "),c)):this.addMenuItems(a,"- keyboardShortcuts quickStart support - forkme downloadDesktop - about".split(" "),c)}"1"==urlParams.test&&(a.addSeparator(c),this.addSubmenu("testDevelop",
-a,c))})));mxResources.parse("diagramLanguage=Diagram Language");b.actions.addAction("diagramLanguage...",function(){var a=prompt("Language Code",Graph.diagramLanguage||"");null!=a&&(Graph.diagramLanguage=0<a.length?a:null,f.refresh())});if("1"==urlParams.test){mxResources.parse("testDevelop=Develop");mxResources.parse("showBoundingBox=Show bounding box");mxResources.parse("createSidebarEntry=Create Sidebar Entry");mxResources.parse("testCheckFile=Check File");mxResources.parse("testDiff=Diff/Sync");
-mxResources.parse("testInspect=Inspect");mxResources.parse("testShowConsole=Show Console");mxResources.parse("testXmlImageExport=XML Image Export");mxResources.parse("testDownloadRtModel=Export RT model");mxResources.parse("testImportRtModel=Import RT model");b.actions.addAction("createSidebarEntry",mxUtils.bind(this,function(){if(!f.isSelectionEmpty()){var a=f.cloneCells(f.getSelectionCells()),c=f.getBoundingBoxFromGeometry(a),a=f.moveCells(a,-c.x,-c.y);b.showTextDialog("Create Sidebar Entry","this.addDataEntry('tag1 tag2', "+
-c.width+", "+c.height+", 'The Title', '"+Graph.compress(mxUtils.getXml(f.encodeCells(a)))+"'),")}}));b.actions.addAction("showBoundingBox",mxUtils.bind(this,function(){var a=f.getGraphBounds(),b=f.view.translate,c=f.view.scale;f.insertVertex(f.getDefaultParent(),null,"",a.x/c-b.x,a.y/c-b.y,a.width/c,a.height/c,"fillColor=none;strokeColor=red;")}));b.actions.addAction("testCheckFile",mxUtils.bind(this,function(){var a=null!=b.pages&&null!=b.getCurrentFile()?b.getCurrentFile().getAnonymizedXmlForPages(b.pages):
+a,c))})));mxResources.parse("diagramLanguage=Diagram Language");b.actions.addAction("diagramLanguage...",function(){var a=prompt("Language Code",Graph.diagramLanguage||"");null!=a&&(Graph.diagramLanguage=0<a.length?a:null,g.refresh())});if("1"==urlParams.test){mxResources.parse("testDevelop=Develop");mxResources.parse("showBoundingBox=Show bounding box");mxResources.parse("createSidebarEntry=Create Sidebar Entry");mxResources.parse("testCheckFile=Check File");mxResources.parse("testDiff=Diff/Sync");
+mxResources.parse("testInspect=Inspect");mxResources.parse("testShowConsole=Show Console");mxResources.parse("testXmlImageExport=XML Image Export");mxResources.parse("testDownloadRtModel=Export RT model");mxResources.parse("testImportRtModel=Import RT model");b.actions.addAction("createSidebarEntry",mxUtils.bind(this,function(){if(!g.isSelectionEmpty()){var a=g.cloneCells(g.getSelectionCells()),c=g.getBoundingBoxFromGeometry(a),a=g.moveCells(a,-c.x,-c.y);b.showTextDialog("Create Sidebar Entry","this.addDataEntry('tag1 tag2', "+
+c.width+", "+c.height+", 'The Title', '"+Graph.compress(mxUtils.getXml(g.encodeCells(a)))+"'),")}}));b.actions.addAction("showBoundingBox",mxUtils.bind(this,function(){var a=g.getGraphBounds(),b=g.view.translate,c=g.view.scale;g.insertVertex(g.getDefaultParent(),null,"",a.x/c-b.x,a.y/c-b.y,a.width/c,a.height/c,"fillColor=none;strokeColor=red;")}));b.actions.addAction("testCheckFile",mxUtils.bind(this,function(){var a=null!=b.pages&&null!=b.getCurrentFile()?b.getCurrentFile().getAnonymizedXmlForPages(b.pages):
"",a=new TextareaDialog(b,"Paste Data:",a,function(a){if(0<a.length)try{var c=function(a){function b(a){if(null==n[a]){if(n[a]=!0,null!=e[a]){for(;0<e[a].length;){var d=e[a].pop();b(d)}delete e[a]}}else mxLog.debug(c+": Visited: "+a)}var c=a.parentNode.id,d=a.childNodes;a={};for(var e={},f=null,g={},k=0;k<d.length;k++){var m=d[k];if(null!=m.id&&0<m.id.length)if(null==a[m.id]){a[m.id]=m.id;var l=m.getAttribute("parent");null==l?null!=f?mxLog.debug(c+": Multiple roots: "+m.id):f=m.id:(null==e[l]&&(e[l]=
[]),e[l].push(m.id))}else g[m.id]=m.id}0<Object.keys(g).length?(d=c+": "+Object.keys(g).length+" Duplicates: "+Object.keys(g).join(", "),mxLog.debug(d+" (see console)")):mxLog.debug(c+": Checked");var n={};null==f?mxLog.debug(c+": No root"):(b(f),Object.keys(n).length!=Object.keys(a).length&&(mxLog.debug(c+": Invalid tree: (see console)"),console.log(c+": Invalid tree",e)))};"<"!=a.charAt(0)&&(a=Graph.decompress(a),mxLog.debug("See console for uncompressed XML"),console.log("xml",a));var d=mxUtils.parseXml(a),
e=b.getPagesForNode(d.documentElement,"mxGraphModel");if(null!=e&&0<e.length)try{var f=b.getHashValueForPages(e);mxLog.debug("Checksum: ",f)}catch(F){mxLog.debug("Error: ",F.message)}else mxLog.debug("No pages found for checksum");var g=d.getElementsByTagName("root");for(a=0;a<g.length;a++)c(g[a]);mxLog.show()}catch(F){b.handleError(F),null!=window.console&&console.error(F)}});a.textarea.style.width="600px";a.textarea.style.height="380px";b.showDialog(a.container,620,460,!0,!0);a.init()}));var v=
null;b.actions.addAction("testDiff",mxUtils.bind(this,function(){if(null!=b.pages){var a=new TextareaDialog(b,"Diff/Sync:","",function(a){var c=b.getCurrentFile();if(0<a.length&&null!=c)try{var d=JSON.parse(a);c.patch([d],null,!0);b.hideDialog()}catch(D){b.handleError(D)}},null,"Close",null,null,null,!0,null,"Patch",null,[["Snapshot",function(c,d){v=b.getPagesForNode(mxUtils.parseXml(b.getFileData(!0)).documentElement);a.textarea.value="Snapshot updated "+(new Date).toLocaleString()}],["Diff",function(c,
d){try{a.textarea.value=JSON.stringify(b.diffPages(v,b.pages),null,2)}catch(C){b.handleError(C)}}]]);a.textarea.style.width="600px";a.textarea.style.height="380px";null==v?(v=b.getPagesForNode(mxUtils.parseXml(b.getFileData(!0)).documentElement),a.textarea.value="Snapshot created "+(new Date).toLocaleString()):a.textarea.value=JSON.stringify(b.diffPages(v,b.pages),null,2);b.showDialog(a.container,620,460,!0,!0);a.init()}else b.alert("No pages")}));b.actions.addAction("testInspect",mxUtils.bind(this,
-function(){console.log(b,f.getModel())}));b.actions.addAction("testXmlImageExport",mxUtils.bind(this,function(){var a=new mxImageExport,b=f.getGraphBounds(),c=f.view.scale,d=mxUtils.createXmlDocument(),e=d.createElement("output");d.appendChild(e);d=new mxXmlCanvas2D(e);d.translate(Math.floor((1-b.x)/c),Math.floor((1-b.y)/c));d.scale(1/c);var g=0,k=d.save;d.save=function(){g++;k.apply(this,arguments)};var m=d.restore;d.restore=function(){g--;m.apply(this,arguments)};var l=a.drawShape;a.drawShape=function(a){mxLog.debug("entering shape",
-a,g);l.apply(this,arguments);mxLog.debug("leaving shape",a,g)};a.drawState(f.getView().getState(f.model.root),d);mxLog.show();mxLog.debug(mxUtils.getXml(e));mxLog.debug("stateCounter",g)}));b.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(a,b){this.addMenuItems(a,"createSidebarEntry showBoundingBox - testCheckFile testDiff - testInspect - testXmlImageExport - testShowConsole".split(" "),
-b)})))}b.actions.addAction("shapes...",function(){mxClient.IS_CHROMEAPP||!b.isOffline()?b.showDialog((new MoreShapesDialog(b,!0)).container,640,isLocalStorage?mxClient.IS_IOS?480:460:440,!0,!0):b.showDialog((new MoreShapesDialog(b,!1)).container,360,isLocalStorage?mxClient.IS_IOS?300:280:260,!0,!0)});b.actions.put("createShape",new Action(mxResources.get("shape")+"...",function(a){f.isEnabled()&&(a=new mxCell("",new mxGeometry(0,0,120,120),b.defaultCustomShapeStyle),a.vertex=!0,a=new EditShapeDialog(b,
-a,mxResources.get("editShape")+":",630,400),b.showDialog(a.container,640,480,!0,!1),a.init())})).isEnabled=g;b.actions.put("embedHtml",new Action(mxResources.get("html")+"...",function(){b.spinner.spin(document.body,mxResources.get("loading"))&&b.getPublicUrl(b.getCurrentFile(),function(a){b.spinner.stop();b.showHtmlDialog(mxResources.get("create"),"https://www.diagrams.net/doc/faq/embed-html-options",a,function(a,c,d,e,f,g,k,m,l,n){b.createHtml(a,c,d,e,f,g,k,m,l,n,mxUtils.bind(this,function(a,c){var d=
+function(){console.log(b,g.getModel())}));b.actions.addAction("testXmlImageExport",mxUtils.bind(this,function(){var a=new mxImageExport,b=g.getGraphBounds(),c=g.view.scale,d=mxUtils.createXmlDocument(),e=d.createElement("output");d.appendChild(e);d=new mxXmlCanvas2D(e);d.translate(Math.floor((1-b.x)/c),Math.floor((1-b.y)/c));d.scale(1/c);var f=0,k=d.save;d.save=function(){f++;k.apply(this,arguments)};var m=d.restore;d.restore=function(){f--;m.apply(this,arguments)};var l=a.drawShape;a.drawShape=function(a){mxLog.debug("entering shape",
+a,f);l.apply(this,arguments);mxLog.debug("leaving shape",a,f)};a.drawState(g.getView().getState(g.model.root),d);mxLog.show();mxLog.debug(mxUtils.getXml(e));mxLog.debug("stateCounter",f)}));b.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(a,b){this.addMenuItems(a,"createSidebarEntry showBoundingBox - testCheckFile testDiff - testInspect - testXmlImageExport - testShowConsole".split(" "),
+b)})))}b.actions.addAction("shapes...",function(){mxClient.IS_CHROMEAPP||!b.isOffline()?b.showDialog((new MoreShapesDialog(b,!0)).container,640,isLocalStorage?mxClient.IS_IOS?480:460:440,!0,!0):b.showDialog((new MoreShapesDialog(b,!1)).container,360,isLocalStorage?mxClient.IS_IOS?300:280:260,!0,!0)});b.actions.put("createShape",new Action(mxResources.get("shape")+"...",function(a){g.isEnabled()&&(a=new mxCell("",new mxGeometry(0,0,120,120),b.defaultCustomShapeStyle),a.vertex=!0,a=new EditShapeDialog(b,
+a,mxResources.get("editShape")+":",630,400),b.showDialog(a.container,640,480,!0,!1),a.init())})).isEnabled=f;b.actions.put("embedHtml",new Action(mxResources.get("html")+"...",function(){b.spinner.spin(document.body,mxResources.get("loading"))&&b.getPublicUrl(b.getCurrentFile(),function(a){b.spinner.stop();b.showHtmlDialog(mxResources.get("create"),"https://www.diagrams.net/doc/faq/embed-html-options",a,function(a,c,d,e,f,g,k,m,l,n){b.createHtml(a,c,d,e,f,g,k,m,l,n,mxUtils.bind(this,function(a,c){var d=
new EmbedDialog(b,a+"\n"+c,null,null,function(){var d=window.open(),e=d.document;if(null!=e){"CSS1Compat"===document.compatMode&&e.writeln("<!DOCTYPE html>");e.writeln("<html>");e.writeln("<head><title>"+encodeURIComponent(mxResources.get("preview"))+'</title><meta charset="utf-8"></head>');e.writeln("<body>");e.writeln(a);var f=mxClient.IS_IE||mxClient.IS_EDGE||null!=document.documentMode;f&&e.writeln(c);e.writeln("</body>");e.writeln("</html>");e.close();if(!f){var g=d.document.createElement("div");
g.marginLeft="26px";g.marginTop="26px";mxUtils.write(g,mxResources.get("updatingDocument"));f=d.document.createElement("img");f.setAttribute("src",window.location.protocol+"//"+window.location.hostname+"/"+IMAGE_PATH+"/spin.gif");f.style.marginLeft="6px";g.appendChild(f);d.document.body.insertBefore(g,d.document.body.firstChild);window.setTimeout(function(){var a=document.createElement("script");a.type="text/javascript";a.src=/<script.*?src="(.*?)"/.exec(c)[1];e.body.appendChild(a);g.parentNode.removeChild(g)},
20)}}else b.handleError({message:mxResources.get("errorUpdatingPreview")})});b.showDialog(d.container,440,240,!0,!0);d.init()}))})})}));b.actions.put("liveImage",new Action("Live image...",function(){var a=b.getCurrentFile();null!=a&&b.spinner.spin(document.body,mxResources.get("loading"))&&b.getPublicUrl(b.getCurrentFile(),function(c){b.spinner.stop();null!=c?(c=new EmbedDialog(b,'<img src="'+(a.constructor!=DriveFile?c:"https://drive.google.com/uc?id="+a.getId())+'"/>'),b.showDialog(c.container,
440,240,!0,!0),c.init()):b.handleError({message:mxResources.get("invalidPublicUrl")})})}));b.actions.put("embedImage",new Action(mxResources.get("image")+"...",function(){b.showEmbedImageDialog(function(a,c,d,e,f,g){b.spinner.spin(document.body,mxResources.get("loading"))&&b.createEmbedImage(a,c,d,e,f,g,function(a){b.spinner.stop();a=new EmbedDialog(b,a);b.showDialog(a.container,440,240,!0,!0);a.init()},function(a){b.spinner.stop();b.handleError(a)})},mxResources.get("image"),mxResources.get("retina"),
b.isExportToCanvas())}));b.actions.put("embedSvg",new Action(mxResources.get("formatSvg")+"...",function(){b.showEmbedImageDialog(function(a,c,d,e,f,g){b.spinner.spin(document.body,mxResources.get("loading"))&&b.createEmbedSvg(a,c,d,e,f,g,function(a){b.spinner.stop();a=new EmbedDialog(b,a);b.showDialog(a.container,440,240,!0,!0);a.init()},function(a){b.spinner.stop();b.handleError(a)})},mxResources.get("formatSvg"),mxResources.get("image"),!0,"https://www.diagrams.net/doc/faq/embed-svg.html")}));
-b.actions.put("embedIframe",new Action(mxResources.get("iframe")+"...",function(){var a=f.getGraphBounds();b.showPublishLinkDialog(mxResources.get("iframe"),null,"100%",Math.ceil(a.height/f.view.scale)+2,function(a,c,d,e,f,g,k,m){b.spinner.spin(document.body,mxResources.get("loading"))&&b.getPublicUrl(b.getCurrentFile(),function(l){b.spinner.stop();l=new EmbedDialog(b,'<iframe frameborder="0" style="width:'+k+";height:"+m+';" src="'+b.createLink(a,c,d,e,f,g,l)+'"></iframe>');b.showDialog(l.container,
+b.actions.put("embedIframe",new Action(mxResources.get("iframe")+"...",function(){var a=g.getGraphBounds();b.showPublishLinkDialog(mxResources.get("iframe"),null,"100%",Math.ceil(a.height/g.view.scale)+2,function(a,c,d,e,f,g,k,m){b.spinner.spin(document.body,mxResources.get("loading"))&&b.getPublicUrl(b.getCurrentFile(),function(l){b.spinner.stop();l=new EmbedDialog(b,'<iframe frameborder="0" style="width:'+k+";height:"+m+';" src="'+b.createLink(a,c,d,e,f,g,l)+'"></iframe>');b.showDialog(l.container,
440,240,!0,!0);l.init()})},!0)}));b.actions.put("embedNotion",new Action(mxResources.get("notion")+"...",function(){b.showPublishLinkDialog(mxResources.get("notion"),null,null,null,function(a,c,d,e,f,g,k,m){b.spinner.spin(document.body,mxResources.get("loading"))&&b.getPublicUrl(b.getCurrentFile(),function(k){b.spinner.stop();k=new EmbedDialog(b,b.createLink(a,c,d,e,f,g,k,null,["border=0"],!0));b.showDialog(k.container,440,240,!0,!0);k.init()})},!0)}));b.actions.put("publishLink",new Action(mxResources.get("link")+
"...",function(){b.showPublishLinkDialog(null,null,null,null,function(a,c,d,e,f,g){b.spinner.spin(document.body,mxResources.get("loading"))&&b.getPublicUrl(b.getCurrentFile(),function(k){b.spinner.stop();k=new EmbedDialog(b,b.createLink(a,c,d,e,f,g,k));b.showDialog(k.container,440,240,!0,!0);k.init()})})}));b.actions.addAction("microsoftOffice...",function(){b.openLink("https://office.draw.io")});b.actions.addAction("googleDocs...",function(){b.openLink("http://docsaddon.draw.io")});b.actions.addAction("googleSlides...",
function(){b.openLink("https://slidesaddon.draw.io")});b.actions.addAction("googleSheets...",function(){b.openLink("https://sheetsaddon.draw.io")});b.actions.addAction("googleSites...",function(){b.spinner.spin(document.body,mxResources.get("loading"))&&b.getPublicUrl(b.getCurrentFile(),function(a){b.spinner.stop();a=new GoogleSitesDialog(b,a);b.showDialog(a.container,420,256,!0,!0);a.init()})});if(isLocalStorage||mxClient.IS_CHROMEAPP)n=b.actions.addAction("scratchpad",function(){b.toggleScratchpad()}),
n.setToggleAction(!0),n.setSelectedCallback(function(){return null!=b.scratchpad}),"0"!=urlParams.plugins&&b.actions.addAction("plugins...",function(){b.showDialog((new PluginsDialog(b)).container,360,170,!0,!1)});n=b.actions.addAction("search",function(){var a=b.sidebar.isEntryVisible("search");b.sidebar.showPalette("search",!a);isLocalStorage&&(mxSettings.settings.search=!a,mxSettings.save())});n.label=mxResources.get("searchShapes");n.setToggleAction(!0);n.setSelectedCallback(function(){return b.sidebar.isEntryVisible("search")});
-"1"==urlParams.embed&&(b.actions.get("save").funct=function(a){f.isEditing()&&f.stopEditing();var c="0"!=urlParams.pages||null!=b.pages&&1<b.pages.length?b.getFileData(!0):mxUtils.getXml(b.editor.getGraphXml());if("json"==urlParams.proto){var d=b.createLoadMessage("save");d.xml=c;a&&(d.exit=!0);c=JSON.stringify(d)}(window.opener||window.parent).postMessage(c,"*");"0"!=urlParams.modified&&"1"!=urlParams.keepmodified&&(b.editor.modified=!1,b.editor.setStatus(""));a=b.getCurrentFile();null==a||a.constructor==
+"1"==urlParams.embed&&(b.actions.get("save").funct=function(a){g.isEditing()&&g.stopEditing();var c="0"!=urlParams.pages||null!=b.pages&&1<b.pages.length?b.getFileData(!0):mxUtils.getXml(b.editor.getGraphXml());if("json"==urlParams.proto){var d=b.createLoadMessage("save");d.xml=c;a&&(d.exit=!0);c=JSON.stringify(d)}(window.opener||window.parent).postMessage(c,"*");"0"!=urlParams.modified&&"1"!=urlParams.keepmodified&&(b.editor.modified=!1,b.editor.setStatus(""));a=b.getCurrentFile();null==a||a.constructor==
EmbedFile||a.constructor==LocalFile&&null==a.mode||b.saveFile()},b.actions.addAction("saveAndExit",function(){b.actions.get("save").funct(!0)}).label="1"==urlParams.publishClose?mxResources.get("publish"):mxResources.get("saveAndExit"),b.actions.addAction("exit",function(){var a=function(){b.editor.modified=!1;var a="json"==urlParams.proto?JSON.stringify({event:"exit",modified:b.editor.modified}):"";(window.opener||window.parent).postMessage(a,"*")};b.editor.modified?b.confirm(mxResources.get("allChangesLost"),
null,a,mxResources.get("cancel"),mxResources.get("discardChanges")):a()}));this.put("exportAs",new Menu(mxUtils.bind(this,function(a,c){b.isExportToCanvas()?(this.addMenuItems(a,["exportPng"],c),b.jpgSupported&&this.addMenuItems(a,["exportJpg"],c)):b.isOffline()||mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(a,["exportPng","exportJpg"],c);this.addMenuItems(a,["exportSvg","-"],c);b.isOffline()||b.printPdfExport?this.addMenuItems(a,["exportPdf"],c):b.isOffline()||mxClient.IS_IOS&&navigator.standalone||
this.addMenuItems(a,["exportPdf"],c);mxClient.IS_IE||"undefined"===typeof VsdxExport&&b.isOffline()||this.addMenuItems(a,["exportVsdx"],c);this.addMenuItems(a,["-","exportHtml","exportXml","exportUrl"],c);b.isOffline()||(a.addSeparator(c),this.addMenuItem(a,"export",c).firstChild.nextSibling.innerHTML=mxResources.get("advanced")+"...")})));this.put("importFrom",new Menu(mxUtils.bind(this,function(a,c){function d(a){a.pickFile(function(c){b.spinner.spin(document.body,mxResources.get("loading"))&&a.getFile(c,
-function(a){var c="data:image/"==a.getData().substring(0,11)?n(a.getTitle()):"text/xml";/\.svg$/i.test(a.getTitle())&&!b.editor.isDataSvg(a.getData())&&(a.setData(Editor.createSvgDataUri(a.getData())),c="image/svg+xml");g(a.getData(),c,a.getTitle())},function(a){b.handleError(a,null!=a?mxResources.get("errorLoadingFile"):null)},a==b.drive)},!0)}var g=mxUtils.bind(this,function(a,c,d){var e=f.view,g=f.getGraphBounds(),k=f.snap(Math.ceil(Math.max(0,g.x/e.scale-e.translate.x)+4*f.gridSize)),m=f.snap(Math.ceil(Math.max(0,
-(g.y+g.height)/e.scale-e.translate.y)+4*f.gridSize));"data:image/"==a.substring(0,11)?b.loadImage(a,mxUtils.bind(this,function(e){var g=!0,l=mxUtils.bind(this,function(){b.resizeImage(e,a,mxUtils.bind(this,function(e,l,n){e=g?Math.min(1,Math.min(b.maxImageSize/l,b.maxImageSize/n)):1;b.importFile(a,c,k,m,Math.round(l*e),Math.round(n*e),d,function(a){b.spinner.stop();f.setSelectionCells(a);f.scrollCellToVisible(f.getSelectionCell())})}),g)});a.length>b.resampleThreshold?b.confirmImageResize(function(a){g=
-a;l()}):l()}),mxUtils.bind(this,function(){b.handleError({message:mxResources.get("cannotOpenFile")})})):b.importFile(a,c,k,m,0,0,d,function(a){b.spinner.stop();f.setSelectionCells(a);f.scrollCellToVisible(f.getSelectionCell())})}),n=mxUtils.bind(this,function(a){var b="text/xml";/\.png$/i.test(a)?b="image/png":/\.jpe?g$/i.test(a)?b="image/jpg":/\.gif$/i.test(a)?b="image/gif":/\.pdf$/i.test(a)&&(b="application/pdf");return b});"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=
+function(a){var c="data:image/"==a.getData().substring(0,11)?n(a.getTitle()):"text/xml";/\.svg$/i.test(a.getTitle())&&!b.editor.isDataSvg(a.getData())&&(a.setData(Editor.createSvgDataUri(a.getData())),c="image/svg+xml");f(a.getData(),c,a.getTitle())},function(a){b.handleError(a,null!=a?mxResources.get("errorLoadingFile"):null)},a==b.drive)},!0)}var f=mxUtils.bind(this,function(a,c,d){var e=g.view,f=g.getGraphBounds(),k=g.snap(Math.ceil(Math.max(0,f.x/e.scale-e.translate.x)+4*g.gridSize)),m=g.snap(Math.ceil(Math.max(0,
+(f.y+f.height)/e.scale-e.translate.y)+4*g.gridSize));"data:image/"==a.substring(0,11)?b.loadImage(a,mxUtils.bind(this,function(e){var f=!0,l=mxUtils.bind(this,function(){b.resizeImage(e,a,mxUtils.bind(this,function(e,l,n){e=f?Math.min(1,Math.min(b.maxImageSize/l,b.maxImageSize/n)):1;b.importFile(a,c,k,m,Math.round(l*e),Math.round(n*e),d,function(a){b.spinner.stop();g.setSelectionCells(a);g.scrollCellToVisible(g.getSelectionCell())})}),f)});a.length>b.resampleThreshold?b.confirmImageResize(function(a){f=
+a;l()}):l()}),mxUtils.bind(this,function(){b.handleError({message:mxResources.get("cannotOpenFile")})})):b.importFile(a,c,k,m,0,0,d,function(a){b.spinner.stop();g.setSelectionCells(a);g.scrollCellToVisible(g.getSelectionCell())})}),n=mxUtils.bind(this,function(a){var b="text/xml";/\.png$/i.test(a)?b="image/png":/\.jpe?g$/i.test(a)?b="image/jpg":/\.gif$/i.test(a)?b="image/gif":/\.pdf$/i.test(a)&&(b="application/pdf");return b});"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=
b.drive?a.addItem(mxResources.get("googleDrive")+"...",null,function(){d(b.drive)},c):m&&"function"===typeof window.DriveClient&&a.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1));null!=b.oneDrive?a.addItem(mxResources.get("oneDrive")+"...",null,function(){d(b.oneDrive)},c):k&&"function"===typeof window.OneDriveClient&&a.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=b.dropbox?
a.addItem(mxResources.get("dropbox")+"...",null,function(){d(b.dropbox)},c):e&&"function"===typeof window.DropboxClient&&a.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);a.addSeparator(c);null!=b.gitHub&&a.addItem(mxResources.get("github")+"...",null,function(){d(b.gitHub)},c);null!=b.gitLab&&a.addItem(mxResources.get("gitlab")+"...",null,function(){d(b.gitLab)},c);null!=b.notion&&(a.addSeparator(c),a.addItem(mxResources.get("notion")+"...",
null,function(){d(b.notion)},c));null!=b.trello?a.addItem(mxResources.get("trello")+"...",null,function(){d(b.trello)},c):l&&"function"===typeof window.TrelloClient&&a.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);a.addSeparator(c);isLocalStorage&&"0"!=urlParams.browser&&a.addItem(mxResources.get("browser")+"...",null,function(){b.importLocalFile(!1)},c);a.addItem(mxResources.get("device")+"...",null,function(){b.importLocalFile(!0)},c);b.isOffline()||
-(a.addSeparator(c),a.addItem(mxResources.get("url")+"...",null,function(){var a=new FilenameDialog(b,"",mxResources.get("import"),function(a){if(null!=a&&0<a.length&&b.spinner.spin(document.body,mxResources.get("loading"))){var c=/(\.png)($|\?)/i.test(a)?"image/png":"text/xml";b.editor.loadUrl(PROXY_URL+"?url="+encodeURIComponent(a),function(b){g(b,c,a)},function(){b.spinner.stop();b.handleError(null,mxResources.get("errorLoadingFile"))},"image/png"==c)}},mxResources.get("url"));b.showDialog(a.container,
-300,80,!0,!0);a.init()},c))}))).isEnabled=g;this.put("theme",new Menu(mxUtils.bind(this,function(a,c){var d="1"==urlParams.sketch?"sketch":mxSettings.getUi(),e=a.addItem(mxResources.get("automatic"),null,function(){mxSettings.setUi("");b.alert(mxResources.get("restartForChangeRequired"))},c);"kennedy"!=d&&"atlas"!=d&&"dark"!=d&&"min"!=d&&"sketch"!=d&&a.addCheckmark(e,Editor.checkmarkImage);a.addSeparator(c);e=a.addItem(mxResources.get("default"),null,function(){mxSettings.setUi("kennedy");b.alert(mxResources.get("restartForChangeRequired"))},
+(a.addSeparator(c),a.addItem(mxResources.get("url")+"...",null,function(){var a=new FilenameDialog(b,"",mxResources.get("import"),function(a){if(null!=a&&0<a.length&&b.spinner.spin(document.body,mxResources.get("loading"))){var c=/(\.png)($|\?)/i.test(a)?"image/png":"text/xml";b.editor.loadUrl(PROXY_URL+"?url="+encodeURIComponent(a),function(b){f(b,c,a)},function(){b.spinner.stop();b.handleError(null,mxResources.get("errorLoadingFile"))},"image/png"==c)}},mxResources.get("url"));b.showDialog(a.container,
+300,80,!0,!0);a.init()},c))}))).isEnabled=f;this.put("theme",new Menu(mxUtils.bind(this,function(a,c){var d="1"==urlParams.sketch?"sketch":mxSettings.getUi(),e=a.addItem(mxResources.get("automatic"),null,function(){mxSettings.setUi("");b.alert(mxResources.get("restartForChangeRequired"))},c);"kennedy"!=d&&"atlas"!=d&&"dark"!=d&&"min"!=d&&"sketch"!=d&&a.addCheckmark(e,Editor.checkmarkImage);a.addSeparator(c);e=a.addItem(mxResources.get("default"),null,function(){mxSettings.setUi("kennedy");b.alert(mxResources.get("restartForChangeRequired"))},
c);"kennedy"==d&&a.addCheckmark(e,Editor.checkmarkImage);e=a.addItem(mxResources.get("minimal"),null,function(){mxSettings.setUi("min");b.alert(mxResources.get("restartForChangeRequired"))},c);"min"==d&&a.addCheckmark(e,Editor.checkmarkImage);e=a.addItem(mxResources.get("atlas"),null,function(){mxSettings.setUi("atlas");b.alert(mxResources.get("restartForChangeRequired"))},c);"atlas"==d&&a.addCheckmark(e,Editor.checkmarkImage);e=a.addItem(mxResources.get("dark"),null,function(){mxSettings.setUi("dark");
b.alert(mxResources.get("restartForChangeRequired"))},c);"dark"==d&&a.addCheckmark(e,Editor.checkmarkImage);a.addSeparator(c);e=a.addItem(mxResources.get("sketch"),null,function(){mxSettings.setUi("sketch");b.alert(mxResources.get("restartForChangeRequired"))},c);"sketch"==d&&a.addCheckmark(e,Editor.checkmarkImage)})));n=this.editorUi.actions.addAction("rename...",mxUtils.bind(this,function(){var a=this.editorUi.getCurrentFile();if(null!=a)if(a.constructor==LocalFile&&null!=a.fileHandle)b.showSaveFilePicker(mxUtils.bind(b,
function(c,d){a.invalidFileHandle=null;a.fileHandle=c;a.title=d.name;a.desc=d;b.save(d.name)}),null,b.createFileSystemOptions(a.getTitle()));else{var c=null!=a.getTitle()?a.getTitle():this.editorUi.defaultFilename,c=new FilenameDialog(this.editorUi,c,mxResources.get("rename"),mxUtils.bind(this,function(b){null!=b&&0<b.length&&null!=a&&b!=a.getTitle()&&this.editorUi.spinner.spin(document.body,mxResources.get("renaming"))&&a.rename(b,mxUtils.bind(this,function(a){this.editorUi.spinner.stop()}),mxUtils.bind(this,
-function(a){this.editorUi.handleError(a,null!=a?mxResources.get("errorRenamingFile"):null)}))}),a.constructor==DriveFile||a.constructor==StorageFile?mxResources.get("diagramName"):null,function(a){if(null!=a&&0<a.length)return!0;b.showError(mxResources.get("error"),mxResources.get("invalidName"),mxResources.get("ok"));return!1},null,null,null,null,b.editor.fileExtensions);this.editorUi.showDialog(c.container,340,90,!0,!0);c.init()}}));n.isEnabled=function(){return this.enabled&&g.apply(this,arguments)};
+function(a){this.editorUi.handleError(a,null!=a?mxResources.get("errorRenamingFile"):null)}))}),a.constructor==DriveFile||a.constructor==StorageFile?mxResources.get("diagramName"):null,function(a){if(null!=a&&0<a.length)return!0;b.showError(mxResources.get("error"),mxResources.get("invalidName"),mxResources.get("ok"));return!1},null,null,null,null,b.editor.fileExtensions);this.editorUi.showDialog(c.container,340,96,!0,!0);c.init()}}));n.isEnabled=function(){return this.enabled&&f.apply(this,arguments)};
n.visible="1"!=urlParams.embed;b.actions.addAction("makeCopy...",mxUtils.bind(this,function(){var a=b.getCurrentFile();if(null!=a){var c=b.getCopyFilename(a);a.constructor==DriveFile?(c=new CreateDialog(b,c,mxUtils.bind(this,function(c,d){"_blank"==d?b.editor.editAsNew(b.getFileData(),c):("download"==d&&(d=App.MODE_GOOGLE),null!=c&&0<c.length&&(d==App.MODE_GOOGLE?b.spinner.spin(document.body,mxResources.get("saving"))&&a.saveAs(c,mxUtils.bind(this,function(c){a.desc=c;a.save(!1,mxUtils.bind(this,
function(){b.spinner.stop();a.setModified(!1);a.addAllSavedStatus()}),mxUtils.bind(this,function(a){b.handleError(a)}))}),mxUtils.bind(this,function(a){b.handleError(a)})):b.createFile(c,b.getFileData(!0),null,d)))}),mxUtils.bind(this,function(){b.hideDialog()}),mxResources.get("makeCopy"),mxResources.get("create"),null,null,!0,null,!0,null,null,null,null,b.editor.fileExtensions),b.showDialog(c.container,420,380,!0,!0),c.init()):b.editor.editAsNew(this.editorUi.getFileData(!0),c)}}));b.actions.addAction("moveToFolder...",
mxUtils.bind(this,function(){var a=b.getCurrentFile();if(a.getMode()==App.MODE_GOOGLE||a.getMode()==App.MODE_ONEDRIVE){var c=!1;if(a.getMode()==App.MODE_GOOGLE&&null!=a.desc.parents)for(var d=0;d<a.desc.parents.length;d++)if(a.desc.parents[d].isRoot){c=!0;break}b.pickFolder(a.getMode(),mxUtils.bind(this,function(c){b.spinner.spin(document.body,mxResources.get("moving"))&&a.move(c,mxUtils.bind(this,function(a){b.spinner.stop()}),mxUtils.bind(this,function(a){b.handleError(a)}))}),null,!0,c)}}));this.put("publish",
new Menu(mxUtils.bind(this,function(a,b){this.addMenuItems(a,["publishLink"],b)})));b.actions.put("useOffline",new Action(mxResources.get("useOffline")+"...",function(){b.openLink("https://app.draw.io/")}));b.actions.put("downloadDesktop",new Action(mxResources.get("downloadDesktop")+"...",function(){b.openLink("https://get.draw.io/")}));this.editorUi.actions.addAction("share...",mxUtils.bind(this,function(){try{var a=b.getCurrentFile();null!=a&&a.share()}catch(A){b.handleError(A)}}));this.put("embed",
new Menu(mxUtils.bind(this,function(a,c){var d=b.getCurrentFile();null==d||d.getMode()!=App.MODE_GOOGLE&&d.getMode()!=App.MODE_GITHUB||!/(\.png)$/i.test(d.getTitle())||this.addMenuItems(a,["liveImage","-"],c);this.addMenuItems(a,["embedImage","embedSvg","-","embedHtml"],c);navigator.standalone||b.isOffline()||this.addMenuItems(a,["embedIframe"],c);"1"==urlParams.embed||b.isOffline()||this.addMenuItems(a,"- googleDocs googleSlides googleSheets - microsoftOffice - embedNotion".split(" "),c)})));b.addInsertItem=
-function(a,c,d,e){("plantUml"!=e||EditorUi.enablePlantUml&&!b.isOffline())&&a.addItem(d,null,mxUtils.bind(this,function(){if("fromText"==e||"formatSql"==e||"plantUml"==e||"mermaid"==e){var a=new ParseDialog(b,d,e);b.showDialog(a.container,620,420,!0,!1);b.dialog.container.style.overflow="auto"}else a=new CreateGraphDialog(b,d,e),b.showDialog(a.container,620,420,!0,!1);a.init()}),c,null,g())};var z=function(a,c,d,e){var g=new mxCell(a,new mxGeometry(0,0,c,d),e);g.vertex=!0;a=f.getCenterInsertPoint(f.getBoundingBoxFromGeometry([g],
-!0));g.geometry.x=a.x;g.geometry.y=a.y;f.getModel().beginUpdate();try{g=f.addCell(g),f.fireEvent(new mxEventObject("cellsInserted","cells",[g]))}finally{f.getModel().endUpdate()}f.scrollCellToVisible(g);f.setSelectionCell(g);f.container.focus();f.editAfterInsert&&f.startEditing(g);window.setTimeout(function(){null!=b.hoverIcons&&b.hoverIcons.update(f.view.getState(g))},0);return g};b.actions.put("insertText",new Action(mxResources.get("text"),function(){f.isEnabled()&&!f.isCellLocked(f.getDefaultParent())&&
-f.startEditingAtCell(z("Text",40,20,"text;html=1;resizable=0;autosize=1;align=center;verticalAlign=middle;points=[];fillColor=none;strokeColor=none;rounded=0;"))}),null,null,Editor.ctrlKey+"+Shift+X").isEnabled=g;b.actions.put("insertRectangle",new Action(mxResources.get("rectangle"),function(){f.isEnabled()&&!f.isCellLocked(f.getDefaultParent())&&z("",120,60,"whiteSpace=wrap;html=1;")}),null,null,Editor.ctrlKey+"+K").isEnabled=g;b.actions.put("insertEllipse",new Action(mxResources.get("ellipse"),
-function(){f.isEnabled()&&!f.isCellLocked(f.getDefaultParent())&&z("",80,80,"ellipse;whiteSpace=wrap;html=1;")}),null,null,Editor.ctrlKey+"+Shift+K").isEnabled=g;b.actions.put("insertRhombus",new Action(mxResources.get("rhombus"),function(){f.isEnabled()&&!f.isCellLocked(f.getDefaultParent())&&z("",80,80,"rhombus;whiteSpace=wrap;html=1;")})).isEnabled=g;b.addInsertMenuItems=mxUtils.bind(this,function(a,c,d){for(var e=0;e<d.length;e++)"-"==d[e]?a.addSeparator(c):b.addInsertItem(a,c,mxResources.get(d[e])+
+function(a,c,d,e){("plantUml"!=e||EditorUi.enablePlantUml&&!b.isOffline())&&a.addItem(d,null,mxUtils.bind(this,function(){if("fromText"==e||"formatSql"==e||"plantUml"==e||"mermaid"==e){var a=new ParseDialog(b,d,e);b.showDialog(a.container,620,420,!0,!1);b.dialog.container.style.overflow="auto"}else a=new CreateGraphDialog(b,d,e),b.showDialog(a.container,620,420,!0,!1);a.init()}),c,null,f())};var z=function(a,c,d,e){var f=new mxCell(a,new mxGeometry(0,0,c,d),e);f.vertex=!0;a=g.getCenterInsertPoint(g.getBoundingBoxFromGeometry([f],
+!0));f.geometry.x=a.x;f.geometry.y=a.y;g.getModel().beginUpdate();try{f=g.addCell(f),g.fireEvent(new mxEventObject("cellsInserted","cells",[f]))}finally{g.getModel().endUpdate()}g.scrollCellToVisible(f);g.setSelectionCell(f);g.container.focus();g.editAfterInsert&&g.startEditing(f);window.setTimeout(function(){null!=b.hoverIcons&&b.hoverIcons.update(g.view.getState(f))},0);return f};b.actions.put("insertText",new Action(mxResources.get("text"),function(){g.isEnabled()&&!g.isCellLocked(g.getDefaultParent())&&
+g.startEditingAtCell(z("Text",40,20,"text;html=1;resizable=0;autosize=1;align=center;verticalAlign=middle;points=[];fillColor=none;strokeColor=none;rounded=0;"))}),null,null,Editor.ctrlKey+"+Shift+X").isEnabled=f;b.actions.put("insertRectangle",new Action(mxResources.get("rectangle"),function(){g.isEnabled()&&!g.isCellLocked(g.getDefaultParent())&&z("",120,60,"whiteSpace=wrap;html=1;")}),null,null,Editor.ctrlKey+"+K").isEnabled=f;b.actions.put("insertEllipse",new Action(mxResources.get("ellipse"),
+function(){g.isEnabled()&&!g.isCellLocked(g.getDefaultParent())&&z("",80,80,"ellipse;whiteSpace=wrap;html=1;")}),null,null,Editor.ctrlKey+"+Shift+K").isEnabled=f;b.actions.put("insertRhombus",new Action(mxResources.get("rhombus"),function(){g.isEnabled()&&!g.isCellLocked(g.getDefaultParent())&&z("",80,80,"rhombus;whiteSpace=wrap;html=1;")})).isEnabled=f;b.addInsertMenuItems=mxUtils.bind(this,function(a,c,d){for(var e=0;e<d.length;e++)"-"==d[e]?a.addSeparator(c):b.addInsertItem(a,c,mxResources.get(d[e])+
"...",d[e])});this.put("insert",new Menu(mxUtils.bind(this,function(a,c){this.addMenuItems(a,"insertRectangle insertEllipse insertRhombus - insertText insertLink - createShape insertFreehand - insertImage".split(" "),c);b.insertTemplateEnabled&&!b.isOffline()&&this.addMenuItems(a,["insertTemplate"],c);a.addSeparator(c);this.addSubmenu("insertLayout",a,c,mxResources.get("layout"));this.addSubmenu("insertAdvanced",a,c,mxResources.get("advanced"))})));this.put("insertLayout",new Menu(mxUtils.bind(this,
-function(a,c){b.addInsertMenuItems(a,c,"horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "))})));this.put("insertAdvanced",new Menu(mxUtils.bind(this,function(a,c){b.addInsertMenuItems(a,c,["fromText","plantUml","mermaid","-","formatSql"]);a.addItem(mxResources.get("csv")+"...",null,function(){b.showImportCsvDialog()},c,null,g())})));this.put("openRecent",new Menu(function(a,c){var d=b.getRecent();if(null!=d){for(var e=0;e<d.length;e++)(function(d){var e=
+function(a,c){b.addInsertMenuItems(a,c,"horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "))})));this.put("insertAdvanced",new Menu(mxUtils.bind(this,function(a,c){b.addInsertMenuItems(a,c,["fromText","plantUml","mermaid","-","formatSql"]);a.addItem(mxResources.get("csv")+"...",null,function(){b.showImportCsvDialog()},c,null,f())})));this.put("openRecent",new Menu(function(a,c){var d=b.getRecent();if(null!=d){for(var e=0;e<d.length;e++)(function(d){var e=
d.mode;e==App.MODE_GOOGLE?e="googleDrive":e==App.MODE_ONEDRIVE&&(e="oneDrive");a.addItem(d.title+" ("+mxResources.get(e)+")",null,function(){b.loadFile(d.id)},c)})(d[e]);a.addSeparator(c)}a.addItem(mxResources.get("reset"),null,function(){b.resetRecent()},c)}));this.put("openFrom",new Menu(function(a,c){null!=b.drive?a.addItem(mxResources.get("googleDrive")+"...",null,function(){b.pickFile(App.MODE_GOOGLE)},c):m&&"function"===typeof window.DriveClient&&a.addItem(mxResources.get("googleDrive")+" ("+
mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=b.oneDrive?a.addItem(mxResources.get("oneDrive")+"...",null,function(){b.pickFile(App.MODE_ONEDRIVE)},c):k&&"function"===typeof window.OneDriveClient&&a.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=b.dropbox?a.addItem(mxResources.get("dropbox")+"...",null,function(){b.pickFile(App.MODE_DROPBOX)},c):e&&"function"===typeof window.DropboxClient&&a.addItem(mxResources.get("dropbox")+
" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);a.addSeparator(c);null!=b.gitHub&&a.addItem(mxResources.get("github")+"...",null,function(){b.pickFile(App.MODE_GITHUB)},c);null!=b.gitLab&&a.addItem(mxResources.get("gitlab")+"...",null,function(){b.pickFile(App.MODE_GITLAB)},c);null!=b.notion&&(a.addSeparator(c),a.addItem(mxResources.get("notion")+"...",null,function(){b.pickFile(App.MODE_NOTION)},c));null!=b.trello?a.addItem(mxResources.get("trello")+"...",null,function(){b.pickFile(App.MODE_TRELLO)},
@@ -11643,7 +11646,7 @@ g.style.cursor="pointer",g.style.display="inline-block",k.firstChild.nextSibling
if(null!=g&&0<g.length)for(d=0;d<g.length;d++)if(g[d].name==e){g.splice(d,1);break}for(var k=mxUtils.clone(this.customFonts),d=0;d<k.length;d++)if(k[d].name==e){k.splice(d,1);break}d=new a(this.editorUi,g,k);this.editorUi.editor.graph.model.execute(d)}this.editorUi.hideCurrentMenu();mxEvent.consume(c)})));Graph.addFont(e,f);k.firstChild.nextSibling.style.fontFamily=e;null!=m&&k.setAttribute("title",m)}),f={},g=0;g<this.defaultFonts.length;g++){var k=this.defaultFonts[g];"string"===typeof k?e(k):null!=
k.fontFamily&&null!=k.fontUrl&&(f[encodeURIComponent(k.fontFamily)+"@"+encodeURIComponent(k.fontUrl)]=!0,e(k.fontFamily,k.fontUrl))}c.addSeparator(d);if("1"!=urlParams["ext-fonts"]){for(var k=function(a){var b=encodeURIComponent(a.name)+(null==a.url?"":"@"+encodeURIComponent(a.url));if(!f[b]){for(var c=a.name,d=0;null!=l[c.toLowerCase()];)c=a.name+" ("+ ++d+")";null==m[b]&&(n.push({name:a.name,url:a.url,label:c,title:a.url}),l[c.toLowerCase()]=a,m[b]=a)}},m={},l={},n=[],g=0;g<this.customFonts.length;g++)k(this.customFonts[g]);
for(var p in Graph.recentCustomFonts)k(Graph.recentCustomFonts[p]);n.sort(function(a,b){return a.label<b.label?-1:a.label>b.label?1:0});if(0<n.length){for(g=0;g<n.length;g++)e(n[g].name,n[g].url,!0,n[g].label,n[g].url);c.addSeparator(d)}c.addItem(mxResources.get("reset"),null,mxUtils.bind(this,function(){Graph.recentCustomFonts={};this.customFonts=[];b.fireEvent(new mxEventObject("customFontsChanged"))}),d);c.addSeparator(d)}else{p=this.editorUi.editor.graph.extFonts;if(null!=p&&0<p.length){for(var k=
-{},t=!1,g=0;g<this.customFonts.length;g++)k[this.customFonts[g].name]=!0;for(g=0;g<p.length;g++)k[p[g].name]||(this.customFonts.push(p[g]),t=!0);t&&this.editorUi.fireEvent(new mxEventObject("customFontsChanged","customFonts",this.customFonts))}if(0<this.customFonts.length){for(g=0;g<this.customFonts.length;g++)p=this.customFonts[g].name,k=this.customFonts[g].url,e(p,k,!0),this.editorUi.editor.graph.addExtFont(p,k,!0);c.addSeparator(d);c.addItem(mxResources.get("reset"),null,mxUtils.bind(this,function(){var c=
+{},q=!1,g=0;g<this.customFonts.length;g++)k[this.customFonts[g].name]=!0;for(g=0;g<p.length;g++)k[p[g].name]||(this.customFonts.push(p[g]),q=!0);q&&this.editorUi.fireEvent(new mxEventObject("customFontsChanged","customFonts",this.customFonts))}if(0<this.customFonts.length){for(g=0;g<this.customFonts.length;g++)p=this.customFonts[g].name,k=this.customFonts[g].url,e(p,k,!0),this.editorUi.editor.graph.addExtFont(p,k,!0);c.addSeparator(d);c.addItem(mxResources.get("reset"),null,mxUtils.bind(this,function(){var c=
new a(this.editorUi,[],[]);b.editor.graph.model.execute(c)}),d);c.addSeparator(d)}}c.addItem(mxResources.get("custom")+"...",null,mxUtils.bind(this,function(){var a=this.editorUi.editor.graph,b=a.getStylesheet().getDefaultVertexStyle()[mxConstants.STYLE_FONTFAMILY],c="s",d=null;if("1"!=urlParams["ext-fonts"]&&a.isEditing()){var e=a.getSelectedEditingElement();null!=e&&(e=mxUtils.getCurrentStyle(e),null!=e&&(b=Graph.stripQuotes(e.fontFamily),d=Graph.getFontUrl(b,null),null!=d&&(Graph.isGoogleFontUrl(d)?
(d=null,c="g"):c="w")))}else e=a.getView().getState(a.getSelectionCell()),null!=e&&(b=e.style[mxConstants.STYLE_FONTFAMILY]||b,"1"!=urlParams["ext-fonts"]?(e=e.style.fontSource,null!=e&&(e=decodeURIComponent(e),Graph.isGoogleFontUrl(e)?c="g":(c="w",d=e))):(c=e.style.FType||c,"w"==c&&(d=this.editorUi.editor.graph.extFonts,e=null,null!=d&&(e=d.find(function(a){return a.name==b})),d=null!=e?e.url:mxResources.get("urlNotFound",null,"URL not found"))));null!=d&&d.substring(0,PROXY_URL.length)==PROXY_URL&&
(d=decodeURIComponent(d.substr((PROXY_URL+"?url=").length)));var f=null;document.activeElement==a.cellEditor.textarea&&(f=a.cellEditor.saveSelection());c=new FontDialog(this.editorUi,b,d,c,mxUtils.bind(this,function(b,c,d){null!=f&&(a.cellEditor.restoreSelection(f),f=null);if(null!=b&&0<b.length)if("1"!=urlParams["ext-fonts"]&&a.isEditing())a.setFont(b,c);else{a.getModel().beginUpdate();try{a.stopEditing(!1);"1"!=urlParams["ext-fonts"]?(a.setCellStyles(mxConstants.STYLE_FONTFAMILY,b),a.setCellStyles("fontSource",
@@ -11654,7 +11657,7 @@ function MovePage(a,d,c){this.ui=a;this.oldIndex=d;this.newIndex=c}MovePage.prot
function SelectPage(a,d,c){this.ui=a;this.previousPage=this.page=d;this.neverShown=!0;null!=d&&(this.neverShown=null==d.viewState,this.ui.updatePageRoot(d),null!=c&&(d.viewState=c,this.neverShown=!1))}
SelectPage.prototype.execute=function(){var a=mxUtils.indexOf(this.ui.pages,this.previousPage);if(null!=this.page&&0<=a){var a=this.ui.currentPage,d=this.ui.editor,c=d.graph,b=Graph.compressNode(d.getGraphXml(!0));mxUtils.setTextContent(a.node,b);a.viewState=c.getViewState();a.root=c.model.root;null!=a.model&&a.model.rootChanged(a.root);c.view.clear(a.root,!0);c.clearSelection();this.ui.currentPage=this.previousPage;this.previousPage=a;a=this.ui.currentPage;c.model.prefix=Editor.guid()+"-";c.model.rootChanged(a.root);
c.setViewState(a.viewState);c.gridEnabled=c.gridEnabled&&(!this.ui.editor.isChromelessView()||"1"==urlParams.grid);d.updateGraphComponents();c.view.validate();c.blockMathRender=!0;c.sizeDidChange();c.blockMathRender=!1;this.neverShown&&(this.neverShown=!1,c.selectUnlockedLayer());d.graph.fireEvent(new mxEventObject(mxEvent.ROOT));d.fireEvent(new mxEventObject("pageSelected","change",this))}};
-function ChangePage(a,d,c,b,f){SelectPage.call(this,a,c);this.relatedPage=d;this.index=b;this.previousIndex=null;this.noSelect=f}mxUtils.extend(ChangePage,SelectPage);
+function ChangePage(a,d,c,b,g){SelectPage.call(this,a,c);this.relatedPage=d;this.index=b;this.previousIndex=null;this.noSelect=g}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 a=mxUtils.indexOf(this.ui.pages,this.relatedPage);this.ui.pages.splice(a,1);this.index=a}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(){var a=null;if(null!=this.pages&&null!=this.currentPage)for(var d=0;d<this.pages.length;d++)if(this.pages[d]==this.currentPage){a=d;break}return a};EditorUi.prototype.getPageById=function(a){if(null!=this.pages)for(var d=0;d<this.pages.length;d++)if(this.pages[d].getId()==a)return this.pages[d];return null};
EditorUi.prototype.createImageForPageLink=function(a){var d=a.indexOf(","),c=null;0<d&&(d=this.getPageById(a.substring(d+1)),null!=d&&d!=this.currentPage&&(c=this.getImageForPage(d),c.originalSrc=a));null==c&&(c={originalSrc:a});return c};
@@ -11664,34 +11667,34 @@ this.tabContainer.style.height;this.tabContainer.style.height=null==this.fileNod
(a.container.scrollLeft=0,a.container.scrollTop=0,this.chromelessResize())):(a.container.scrollLeft=a.view.translate.x*a.view.scale+b.viewState.scrollLeft,a.container.scrollTop=a.view.translate.y*a.view.scale+b.viewState.scrollTop),c=b);null!=this.actions.layersWindow&&this.actions.layersWindow.refreshLayers();"undefined"!==typeof MathJax&&"undefined"!==typeof MathJax.Hub?1!=MathJax.Hub.queue.pending||null==this.editor||this.editor.graph.mathEnabled||MathJax.Hub.Queue(mxUtils.bind(this,function(){null!=
this.editor&&this.editor.graph.refresh()})):"undefined"===typeof Editor.MathJaxClear||null!=this.editor&&this.editor.graph.mathEnabled||Editor.MathJaxClear()});this.editor.graph.model.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(a,c){for(var d=c.getProperty("edit").changes,e=0;e<d.length;e++)if(d[e]instanceof SelectPage||d[e]instanceof RenamePage||d[e]instanceof MovePage||d[e]instanceof mxRootChange){b();break}}));null!=this.toolbar&&this.editor.addListener("pageSelected",this.toolbar.updateZoom)}};
EditorUi.prototype.restoreViewState=function(a,d,c){a=null!=a?this.getPageById(a.getId()):null;var b=this.editor.graph;null!=a&&null!=this.currentPage&&null!=this.pages&&(a!=this.currentPage?this.selectPage(a,!0,d):(b.setViewState(d),this.editor.updateGraphComponents(),b.view.revalidate(),b.sizeDidChange()),b.container.scrollLeft=b.view.translate.x*b.view.scale+d.scrollLeft,b.container.scrollTop=b.view.translate.y*b.view.scale+d.scrollTop,b.restoreSelection(c))};
-Graph.prototype.createViewState=function(a){var d=a.getAttribute("page"),c=parseFloat(a.getAttribute("pageScale")),b=parseFloat(a.getAttribute("pageWidth")),f=parseFloat(a.getAttribute("pageHeight")),g=a.getAttribute("background"),m=this.parseBackgroundImage(a.getAttribute("backgroundImage")),e=a.getAttribute("extFonts");if(e)try{e=e.split("|").map(function(a){a=a.split("^");return{name:a[0],url:a[1]}})}catch(k){console.log("ExtFonts format error: "+k.message)}return{gridEnabled:"0"!=a.getAttribute("grid"),
-gridSize:parseFloat(a.getAttribute("gridSize"))||mxGraph.prototype.gridSize,guidesEnabled:"0"!=a.getAttribute("guides"),foldingEnabled:"0"!=a.getAttribute("fold"),shadowVisible:"1"==a.getAttribute("shadow"),pageVisible:this.isLightboxView()?!1:null!=d?"0"!=d:this.defaultPageVisible,background:null!=g&&0<g.length?g:null,backgroundImage:m,pageScale:isNaN(c)?mxGraph.prototype.pageScale:c,pageFormat:isNaN(b)||isNaN(f)?"undefined"===typeof mxSettings||null!=this.defaultPageFormat?mxGraph.prototype.pageFormat:
-mxSettings.getPageFormat():new mxRectangle(0,0,b,f),tooltips:"0"!=a.getAttribute("tooltips"),connect:"0"!=a.getAttribute("connect"),arrows:"0"!=a.getAttribute("arrows"),mathEnabled:"1"==a.getAttribute("math"),selectionCells:null,defaultParent:null,scrollbars:this.defaultScrollbars,scale:1,extFonts:e||[]}};
-Graph.prototype.saveViewState=function(a,d,c){c||(d.setAttribute("grid",null==a||a.gridEnabled?"1":"0"),d.setAttribute("gridSize",null!=a?a.gridSize:mxGraph.prototype.gridSize),d.setAttribute("guides",null==a||a.guidesEnabled?"1":"0"),d.setAttribute("tooltips",null==a||a.tooltips?"1":"0"),d.setAttribute("connect",null==a||a.connect?"1":"0"),d.setAttribute("arrows",null==a||a.arrows?"1":"0"),d.setAttribute("page",null==a&&this.defaultPageVisible||null!=a&&a.pageVisible?"1":"0"),d.setAttribute("fold",
-null==a||a.foldingEnabled?"1":"0"));d.setAttribute("pageScale",null!=a&&null!=a.pageScale?a.pageScale:mxGraph.prototype.pageScale);c=null!=a?a.pageFormat:"undefined"===typeof mxSettings||null!=this.defaultPageFormat?mxGraph.prototype.pageFormat:mxSettings.getPageFormat();null!=c&&(d.setAttribute("pageWidth",c.width),d.setAttribute("pageHeight",c.height));null!=a&&null!=a.background&&d.setAttribute("background",a.background);c=this.getBackgroundImageObject(a.backgroundImage);null!=c&&d.setAttribute("backgroundImage",
-JSON.stringify(c));d.setAttribute("math",null!=a&&a.mathEnabled?"1":"0");d.setAttribute("shadow",null!=a&&a.shadowVisible?"1":"0");null!=a&&null!=a.extFonts&&0<a.extFonts.length&&d.setAttribute("extFonts",a.extFonts.map(function(a){return a.name+"^"+a.url}).join("|"))};
+Graph.prototype.createViewState=function(a){var d=a.getAttribute("page"),c=parseFloat(a.getAttribute("pageScale")),b=parseFloat(a.getAttribute("pageWidth")),g=parseFloat(a.getAttribute("pageHeight")),f=a.getAttribute("background"),m=this.parseBackgroundImage(a.getAttribute("backgroundImage")),e=a.getAttribute("extFonts");if(e)try{e=e.split("|").map(function(a){a=a.split("^");return{name:a[0],url:a[1]}})}catch(k){console.log("ExtFonts format error: "+k.message)}return{gridEnabled:"0"!=a.getAttribute("grid"),
+gridSize:parseFloat(a.getAttribute("gridSize"))||mxGraph.prototype.gridSize,guidesEnabled:"0"!=a.getAttribute("guides"),foldingEnabled:"0"!=a.getAttribute("fold"),shadowVisible:"1"==a.getAttribute("shadow"),pageVisible:this.isLightboxView()?!1:null!=d?"0"!=d:this.defaultPageVisible,background:null!=f&&0<f.length?f:null,backgroundImage:m,pageScale:isNaN(c)?mxGraph.prototype.pageScale:c,pageFormat:isNaN(b)||isNaN(g)?"undefined"===typeof mxSettings||null!=this.defaultPageFormat?mxGraph.prototype.pageFormat:
+mxSettings.getPageFormat():new mxRectangle(0,0,b,g),tooltips:"0"!=a.getAttribute("tooltips"),connect:"0"!=a.getAttribute("connect"),arrows:"0"!=a.getAttribute("arrows"),mathEnabled:"1"==a.getAttribute("math"),selectionCells:null,defaultParent:null,scrollbars:this.defaultScrollbars,scale:1,extFonts:e||[]}};
+Graph.prototype.saveViewState=function(a,d,c,b){c||(d.setAttribute("grid",null==a||a.gridEnabled?"1":"0"),d.setAttribute("gridSize",null!=a?a.gridSize:mxGraph.prototype.gridSize),d.setAttribute("guides",null==a||a.guidesEnabled?"1":"0"),d.setAttribute("tooltips",null==a||a.tooltips?"1":"0"),d.setAttribute("connect",null==a||a.connect?"1":"0"),d.setAttribute("arrows",null==a||a.arrows?"1":"0"),d.setAttribute("page",null==a&&this.defaultPageVisible||null!=a&&a.pageVisible?"1":"0"),d.setAttribute("fold",
+null==a||a.foldingEnabled?"1":"0"));d.setAttribute("pageScale",null!=a&&null!=a.pageScale?a.pageScale:mxGraph.prototype.pageScale);c=null!=a?a.pageFormat:"undefined"===typeof mxSettings||null!=this.defaultPageFormat?mxGraph.prototype.pageFormat:mxSettings.getPageFormat();null!=c&&(d.setAttribute("pageWidth",c.width),d.setAttribute("pageHeight",c.height));null!=a&&null!=a.background&&d.setAttribute("background",a.background);b=this.getBackgroundImageObject(a.backgroundImage,b);null!=b&&d.setAttribute("backgroundImage",
+JSON.stringify(b));d.setAttribute("math",null!=a&&a.mathEnabled?"1":"0");d.setAttribute("shadow",null!=a&&a.shadowVisible?"1":"0");null!=a&&null!=a.extFonts&&0<a.extFonts.length&&d.setAttribute("extFonts",a.extFonts.map(function(a){return a.name+"^"+a.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,extFonts:this.extFonts}};
Graph.prototype.setViewState=function(a,d){if(null!=a){this.lastPasteXml=a.lastPasteXml;this.pasteCounter=a.pasteCounter||0;this.mathEnabled=a.mathEnabled;this.gridEnabled=a.gridEnabled;this.gridSize=a.gridSize;this.graphHandler.guidesEnabled=a.guidesEnabled;this.foldingEnabled=a.foldingEnabled;this.setShadowVisible(a.shadowVisible,!1);this.scrollbars=a.scrollbars;this.pageVisible=!this.isViewer()&&a.pageVisible;this.background=a.background;this.pageScale=a.pageScale;this.pageFormat=a.pageFormat;
-this.view.currentRoot=a.currentRoot;this.defaultParent=a.defaultParent;this.connectionArrowsEnabled=a.arrows;this.setTooltips(a.tooltips);this.setConnectable(a.connect);this.setBackgroundImage(a.backgroundImage);var c=this.extFonts;this.extFonts=a.extFonts||[];if(d&&null!=c)for(var b=0;b<c.length;b++){var f=document.getElementById("extFont_"+c[b].name);null!=f&&f.parentNode.removeChild(f)}for(b=0;b<this.extFonts.length;b++)this.addExtFont(this.extFonts[b].name,this.extFonts[b].url,!0);this.view.scale=
+this.view.currentRoot=a.currentRoot;this.defaultParent=a.defaultParent;this.connectionArrowsEnabled=a.arrows;this.setTooltips(a.tooltips);this.setConnectable(a.connect);this.setBackgroundImage(a.backgroundImage);var c=this.extFonts;this.extFonts=a.extFonts||[];if(d&&null!=c)for(var b=0;b<c.length;b++){var g=document.getElementById("extFont_"+c[b].name);null!=g&&g.parentNode.removeChild(g)}for(b=0;b<this.extFonts.length;b++)this.addExtFont(this.extFonts[b].name,this.extFonts[b].url,!0);this.view.scale=
null!=a.scale?a.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!=a.translate&&(this.view.translate=a.translate)}else this.view.currentRoot=null,this.view.scale=1,this.gridEnabled=this.defaultGridEnabled,this.gridSize=mxGraph.prototype.gridSize,this.pageScale=mxGraph.prototype.pageScale,this.pageFormat="undefined"===
typeof mxSettings||null!=this.defaultPageFormat?mxGraph.prototype.pageFormat:mxSettings.getPageFormat(),this.pageVisible=this.defaultPageVisible,this.backgroundImage=this.background=null,this.scrollbars=this.defaultScrollbars,this.foldingEnabled=this.graphHandler.guidesEnabled=!0,this.setShadowVisible(!1,!1),this.defaultParent=null,this.setTooltips(!0),this.setConnectable(!0),this.lastPasteXml=null,this.pasteCounter=0,this.mathEnabled=!1,this.connectionArrowsEnabled=!0,this.extFonts=[];this.preferPageSize=
this.pageBreaksVisible=this.pageVisible;this.fireEvent(new mxEventObject("viewStateChanged","state",a))};
-Graph.prototype.addExtFont=function(a,d,c){if(a&&d){"1"!=urlParams["ext-fonts"]&&(Graph.recentCustomFonts[a.toLowerCase()]={name:a,url:d});var b="extFont_"+a;if(null==document.getElementById(b))if(0==d.indexOf(Editor.GOOGLE_FONTS))mxClient.link("stylesheet",d,null,b);else{document.getElementsByTagName("head");var f=document.createElement("style");f.appendChild(document.createTextNode('@font-face {\n\tfont-family: "'+a+'";\n\tsrc: url("'+d+'");\n}'));f.setAttribute("id",b);document.getElementsByTagName("head")[0].appendChild(f)}if(!c){null==
-this.extFonts&&(this.extFonts=[]);c=this.extFonts;b=!0;for(f=0;f<c.length;f++)if(c[f].name==a){b=!1;break}b&&this.extFonts.push({name:a,url:d})}}};
+Graph.prototype.addExtFont=function(a,d,c){if(a&&d){"1"!=urlParams["ext-fonts"]&&(Graph.recentCustomFonts[a.toLowerCase()]={name:a,url:d});var b="extFont_"+a;if(null==document.getElementById(b))if(0==d.indexOf(Editor.GOOGLE_FONTS))mxClient.link("stylesheet",d,null,b);else{document.getElementsByTagName("head");var g=document.createElement("style");g.appendChild(document.createTextNode('@font-face {\n\tfont-family: "'+a+'";\n\tsrc: url("'+d+'");\n}'));g.setAttribute("id",b);document.getElementsByTagName("head")[0].appendChild(g)}if(!c){null==
+this.extFonts&&(this.extFonts=[]);c=this.extFonts;b=!0;for(g=0;g<c.length;g++)if(c[g].name==a){b=!1;break}b&&this.extFonts.push({name:a,url:d})}}};
EditorUi.prototype.updatePageRoot=function(a,d){if(null==a.root){var c=this.editor.extractGraphModel(a.node,null,d),b=Editor.extractParserError(c);if(b)throw Error(b);null!=c?(a.graphModelNode=c,a.viewState=this.editor.graph.createViewState(c),b=new mxCodec(c.ownerDocument),a.root=b.decode(c).root):a.root=this.editor.graph.model.createRoot()}else if(null==a.viewState){if(null==a.graphModelNode){c=this.editor.extractGraphModel(a.node);if(b=Editor.extractParserError(c))throw Error(b);null!=c&&(a.graphModelNode=
c)}null!=a.graphModelNode&&(a.viewState=this.editor.graph.createViewState(a.graphModelNode))}return a};
-EditorUi.prototype.selectPage=function(a,d,c){try{if(a!=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 b=this.editor.graph.model.createUndoableEdit();b.ignoreEdit=!0;var f=new SelectPage(this,a,c);f.execute();b.add(f);b.notify();this.editor.graph.tooltipHandler.hide();d||this.editor.graph.model.fireEvent(new mxEventObject(mxEvent.UNDO,"edit",b))}}catch(g){this.handleError(g)}};
+EditorUi.prototype.selectPage=function(a,d,c){try{if(a!=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 b=this.editor.graph.model.createUndoableEdit();b.ignoreEdit=!0;var g=new SelectPage(this,a,c);g.execute();b.add(g);b.notify();this.editor.graph.tooltipHandler.hide();d||this.editor.graph.model.fireEvent(new mxEventObject(mxEvent.UNDO,"edit",b))}}catch(f){this.handleError(f)}};
EditorUi.prototype.selectNextPage=function(a){var d=this.currentPage;null!=d&&null!=this.pages&&(d=mxUtils.indexOf(this.pages,d),a?this.selectPage(this.pages[mxUtils.mod(d+1,this.pages.length)]):a||this.selectPage(this.pages[mxUtils.mod(d-1,this.pages.length)]))};
EditorUi.prototype.insertPage=function(a,d){if(this.editor.graph.isEnabled()){this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1);a=null!=a?a:this.createPage(null,this.createPageId());d=null!=d?d:this.pages.length;var c=new ChangePage(this,a,a,d);this.editor.graph.model.execute(c)}return a};EditorUi.prototype.createPageId=function(){var a;do a=Editor.guid();while(null!=this.getPageById(a));return a};
EditorUi.prototype.createPage=function(a,d){var c=new DiagramPage(this.fileNode.ownerDocument.createElement("diagram"),d);c.setName(null!=a?a:this.createPageName());return c};EditorUi.prototype.createPageName=function(){for(var a={},d=0;d<this.pages.length;d++){var c=this.pages[d].getName();null!=c&&0<c.length&&(a[c]=c)}d=this.pages.length;do c=mxResources.get("pageWithNumber",[++d]);while(null!=a[c]);return c};
-EditorUi.prototype.removePage=function(a){try{var d=this.editor.graph,c=mxUtils.indexOf(this.pages,a);if(d.isEnabled()&&0<=c){this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1);d.model.beginUpdate();try{var b=this.currentPage;b==a&&1<this.pages.length?(c==this.pages.length-1?c--:c++,b=this.pages[c]):1>=this.pages.length&&(b=this.insertPage(),d.model.execute(new RenamePage(this,b,mxResources.get("pageWithNumber",[1]))));d.model.execute(new ChangePage(this,a,b))}finally{d.model.endUpdate()}}}catch(f){this.handleError(f)}return a};
-EditorUi.prototype.duplicatePage=function(a,d){var c=null;try{var b=this.editor.graph;if(b.isEnabled()){b.isEditing()&&b.stopEditing();var f=a.node.cloneNode(!1);f.removeAttribute("id");var g={},m=b.createCellLookup([b.model.root]),c=new DiagramPage(f);c.root=b.cloneCell(b.model.root,null,g);c.viewState=b.getViewState();c.viewState.scale=1;c.viewState.scrollLeft=null;c.viewState.scrollTop=null;c.viewState.currentRoot=null;c.viewState.defaultParent=null;c.setName(d);c=this.insertPage(c,mxUtils.indexOf(this.pages,
-a)+1);b.updateCustomLinks(b.createCellMapping(g,m),[c.root])}}catch(e){this.handleError(e)}return c};EditorUi.prototype.renamePage=function(a){if(this.editor.graph.isEnabled()){var d=new FilenameDialog(this,a.getName(),mxResources.get("rename"),mxUtils.bind(this,function(c){null!=c&&0<c.length&&this.editor.graph.model.execute(new RenamePage(this,a,c))}),mxResources.get("rename"));this.showDialog(d.container,300,80,!0,!0);d.init()}return a};
+EditorUi.prototype.removePage=function(a){try{var d=this.editor.graph,c=mxUtils.indexOf(this.pages,a);if(d.isEnabled()&&0<=c){this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1);d.model.beginUpdate();try{var b=this.currentPage;b==a&&1<this.pages.length?(c==this.pages.length-1?c--:c++,b=this.pages[c]):1>=this.pages.length&&(b=this.insertPage(),d.model.execute(new RenamePage(this,b,mxResources.get("pageWithNumber",[1]))));d.model.execute(new ChangePage(this,a,b))}finally{d.model.endUpdate()}}}catch(g){this.handleError(g)}return a};
+EditorUi.prototype.duplicatePage=function(a,d){var c=null;try{var b=this.editor.graph;if(b.isEnabled()){b.isEditing()&&b.stopEditing();var g=a.node.cloneNode(!1);g.removeAttribute("id");var f={},m=b.createCellLookup([b.model.root]),c=new DiagramPage(g);c.root=b.cloneCell(b.model.root,null,f);c.viewState=b.getViewState();c.viewState.scale=1;c.viewState.scrollLeft=null;c.viewState.scrollTop=null;c.viewState.currentRoot=null;c.viewState.defaultParent=null;c.setName(d);c=this.insertPage(c,mxUtils.indexOf(this.pages,
+a)+1);b.updateCustomLinks(b.createCellMapping(f,m),[c.root])}}catch(e){this.handleError(e)}return c};EditorUi.prototype.renamePage=function(a){if(this.editor.graph.isEnabled()){var d=new FilenameDialog(this,a.getName(),mxResources.get("rename"),mxUtils.bind(this,function(c){null!=c&&0<c.length&&this.editor.graph.model.execute(new RenamePage(this,a,c))}),mxResources.get("rename"));this.showDialog(d.container,300,80,!0,!0);d.init()}return a};
EditorUi.prototype.movePage=function(a,d){this.editor.graph.model.execute(new MovePage(this,a,d))};EditorUi.prototype.createTabContainer=function(){var a=document.createElement("div");a.className="geTabContainer";a.style.position="absolute";a.style.whiteSpace="nowrap";a.style.overflow="hidden";a.style.height="0px";return a};
EditorUi.prototype.updateTabContainer=function(){if(null!=this.tabContainer&&null!=this.pages){var a=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 c=this.editor.isChromelessView()?29:59,b=Math.min(140,Math.max(20,(this.tabContainer.clientWidth-c)/this.pages.length)+
-1),f=null,g=0;g<this.pages.length;g++)mxUtils.bind(this,function(b,c){this.pages[b]==this.currentPage?(c.className="geActivePage",c.style.backgroundColor=Editor.isDarkMode()?"#2a2a2a":"#fff"):c.className="geInactivePage";c.setAttribute("draggable","true");mxEvent.addListener(c,"dragstart",mxUtils.bind(this,function(c){a.isEnabled()?(mxClient.IS_FF&&c.dataTransfer.setData("Text","<diagram/>"),f=b):mxEvent.consume(c)}));mxEvent.addListener(c,"dragend",mxUtils.bind(this,function(a){f=null;a.stopPropagation();
-a.preventDefault()}));mxEvent.addListener(c,"dragover",mxUtils.bind(this,function(a){null!=f&&(a.dataTransfer.dropEffect="move");a.stopPropagation();a.preventDefault()}));mxEvent.addListener(c,"drop",mxUtils.bind(this,function(a){null!=f&&b!=f&&this.movePage(f,b);a.stopPropagation();a.preventDefault()}));d.appendChild(c)})(g,this.createTabForPage(this.pages[g],b,this.pages[g]!=this.currentPage,g+1));this.tabContainer.innerHTML="";this.tabContainer.appendChild(d);b=this.createPageMenuTab();this.tabContainer.appendChild(b);
+1),g=null,f=0;f<this.pages.length;f++)mxUtils.bind(this,function(b,c){this.pages[b]==this.currentPage?(c.className="geActivePage",c.style.backgroundColor=Editor.isDarkMode()?"#2a2a2a":"#fff"):c.className="geInactivePage";c.setAttribute("draggable","true");mxEvent.addListener(c,"dragstart",mxUtils.bind(this,function(c){a.isEnabled()?(mxClient.IS_FF&&c.dataTransfer.setData("Text","<diagram/>"),g=b):mxEvent.consume(c)}));mxEvent.addListener(c,"dragend",mxUtils.bind(this,function(a){g=null;a.stopPropagation();
+a.preventDefault()}));mxEvent.addListener(c,"dragover",mxUtils.bind(this,function(a){null!=g&&(a.dataTransfer.dropEffect="move");a.stopPropagation();a.preventDefault()}));mxEvent.addListener(c,"drop",mxUtils.bind(this,function(a){null!=g&&b!=g&&this.movePage(g,b);a.stopPropagation();a.preventDefault()}));d.appendChild(c)})(f,this.createTabForPage(this.pages[f],b,this.pages[f]!=this.currentPage,f+1));this.tabContainer.innerHTML="";this.tabContainer.appendChild(d);b=this.createPageMenuTab();this.tabContainer.appendChild(b);
b=null;this.isPageInsertTabVisible()&&(b=this.createPageInsertTab(),this.tabContainer.appendChild(b));if(d.clientWidth>this.tabContainer.clientWidth-c){null!=b&&(b.style.position="absolute",b.style.right="0px",d.style.marginRight="30px");var m=this.createControlTab(4,"&nbsp;&#10094;&nbsp;");m.style.position="absolute";m.style.right=this.editor.chromeless?"29px":"55px";m.style.fontSize="13pt";this.tabContainer.appendChild(m);var e=this.createControlTab(4,"&nbsp;&#10095;");e.style.position="absolute";
e.style.right=this.editor.chromeless?"0px":"29px";e.style.fontSize="13pt";this.tabContainer.appendChild(e);var k=Math.max(0,this.tabContainer.clientWidth-(this.editor.chromeless?86:116));d.style.width=k+"px";mxEvent.addListener(m,"click",mxUtils.bind(this,function(a){d.scrollLeft-=Math.max(20,k-20);mxUtils.setOpacity(m,0<d.scrollLeft?100:50);mxUtils.setOpacity(e,d.scrollLeft<d.scrollWidth-d.clientWidth?100:50);mxEvent.consume(a)}));mxUtils.setOpacity(m,0<d.scrollLeft?100:50);mxUtils.setOpacity(e,
d.scrollLeft<d.scrollWidth-d.clientWidth?100:50);mxEvent.addListener(e,"click",mxUtils.bind(this,function(a){d.scrollLeft+=Math.max(20,k-20);mxUtils.setOpacity(m,0<d.scrollLeft?100:50);mxUtils.setOpacity(e,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()};
@@ -11703,19 +11706,19 @@ this.pages.length;c++)mxUtils.bind(this,function(c){var d=a.addItem(this.pages[c
this.currentPage;null!=d&&(a.addSeparator(b),c=d.getName(),a.addItem(mxResources.get("removeIt",[c]),null,mxUtils.bind(this,function(){this.removePage(d)}),b),a.addItem(mxResources.get("renameIt",[c]),null,mxUtils.bind(this,function(){this.renamePage(d,d.getName())}),b),a.addSeparator(b),a.addItem(mxResources.get("duplicateIt",[c]),null,mxUtils.bind(this,function(){this.duplicatePage(d,mxResources.get("copyOf",[d.getName()]))}),b))}}));c.div.className+=" geMenubarMenu";c.smartSeparators=!0;c.showDisabled=
!0;c.autoExpand=!0;c.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(c,arguments);c.destroy()});var b=mxEvent.getClientX(a),d=mxEvent.getClientY(a);c.popup(b,d,null,a);this.setCurrentMenu(c);mxEvent.consume(a)}));return a};
EditorUi.prototype.createPageInsertTab=function(){var a=this.createControlTab(4,'<div class="geSprite geSprite-plus" style="display:inline-block;width:21px;height:21px;"></div>');a.setAttribute("title",mxResources.get("insertPage"));mxEvent.addListener(a,"click",mxUtils.bind(this,function(a){this.insertPage();mxEvent.consume(a)}));return a};
-EditorUi.prototype.createTabForPage=function(a,d,c,b){c=this.createTab(c);var f=a.getName()||mxResources.get("untitled"),g=a.getId();c.setAttribute("title",f+(null!=g?" ("+g+")":"")+" ["+b+"]");mxUtils.write(c,f);c.style.maxWidth=d+"px";c.style.width=d+"px";this.addTabListeners(a,c);42<d&&(c.style.textOverflow="ellipsis");return c};
-EditorUi.prototype.addTabListeners=function(a,d){mxEvent.disableContextMenu(d);var c=this.editor.graph;mxEvent.addListener(d,"dblclick",mxUtils.bind(this,function(b){this.renamePage(a);mxEvent.consume(b)}));var b=!1,f=!1;mxEvent.addGestureListeners(d,mxUtils.bind(this,function(d){b=null!=this.currentMenu;f=a==this.currentPage;c.isMouseDown||f||this.selectPage(a)}),null,mxUtils.bind(this,function(g){if(c.isEnabled()&&!c.isMouseDown&&(mxEvent.isTouchEvent(g)&&f||mxEvent.isPopupTrigger(g))){c.popupMenuHandler.hideMenu();
-this.hideCurrentMenu();if(!mxEvent.isTouchEvent(g)||!b){var m=new mxPopupMenu(this.createPageMenu(a));m.div.className+=" geMenubarMenu";m.smartSeparators=!0;m.showDisabled=!0;m.autoExpand=!0;m.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(m,arguments);this.resetCurrentMenu();m.destroy()});var e=mxEvent.getClientX(g),k=mxEvent.getClientY(g);m.popup(e,k,null,g);this.setCurrentMenu(m,d)}mxEvent.consume(g)}}))};
-EditorUi.prototype.getLinkForPage=function(a,d,c){if(!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp){var b=this.getCurrentFile();if(null!=b&&b.constructor!=LocalFile&&"draw.io"==this.getServiceName()){var f=this.getSearch("create title mode url drive splash state clibs ui viewbox hide-pages".split(" ")),f=f+((0==f.length?"?":"&")+"page-id="+a.getId());null!=d&&(f+="&"+d.join("&"));return(c&&"1"!=urlParams.dev?EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?
-EditorUi.drawHost:"https://"+window.location.host)+"/"+f+"#"+b.getHash()}}return null};
-EditorUi.prototype.createPageMenu=function(a,d){return mxUtils.bind(this,function(c,b){var f=this.editor.graph;c.addItem(mxResources.get("insert"),null,mxUtils.bind(this,function(){this.insertPage(null,mxUtils.indexOf(this.pages,a)+1)}),b);c.addItem(mxResources.get("delete"),null,mxUtils.bind(this,function(){this.removePage(a)}),b);c.addItem(mxResources.get("rename"),null,mxUtils.bind(this,function(){this.renamePage(a,d)}),b);null!=this.getLinkForPage(a)&&(c.addSeparator(b),c.addItem(mxResources.get("link"),
-null,mxUtils.bind(this,function(){this.showPublishLinkDialog(mxResources.get("url"),!0,null,null,mxUtils.bind(this,function(b,c,d,k,l,n){b=this.createUrlParameters(b,c,d,k,l,n);d||b.push("hide-pages=1");f.isSelectionEmpty()||(d=f.getBoundingBox(f.getSelectionCells()),c=f.view.translate,l=f.view.scale,d.width/=l,d.height/=l,d.x=d.x/l-c.x,d.y=d.y/l-c.y,b.push("viewbox="+encodeURIComponent(JSON.stringify({x:Math.round(d.x),y:Math.round(d.y),width:Math.round(d.width),height:Math.round(d.height),border:100}))));
+EditorUi.prototype.createTabForPage=function(a,d,c,b){c=this.createTab(c);var g=a.getName()||mxResources.get("untitled"),f=a.getId();c.setAttribute("title",g+(null!=f?" ("+f+")":"")+" ["+b+"]");mxUtils.write(c,g);c.style.maxWidth=d+"px";c.style.width=d+"px";this.addTabListeners(a,c);42<d&&(c.style.textOverflow="ellipsis");return c};
+EditorUi.prototype.addTabListeners=function(a,d){mxEvent.disableContextMenu(d);var c=this.editor.graph;mxEvent.addListener(d,"dblclick",mxUtils.bind(this,function(b){this.renamePage(a);mxEvent.consume(b)}));var b=!1,g=!1;mxEvent.addGestureListeners(d,mxUtils.bind(this,function(d){b=null!=this.currentMenu;g=a==this.currentPage;c.isMouseDown||g||this.selectPage(a)}),null,mxUtils.bind(this,function(f){if(c.isEnabled()&&!c.isMouseDown&&(mxEvent.isTouchEvent(f)&&g||mxEvent.isPopupTrigger(f))){c.popupMenuHandler.hideMenu();
+this.hideCurrentMenu();if(!mxEvent.isTouchEvent(f)||!b){var m=new mxPopupMenu(this.createPageMenu(a));m.div.className+=" geMenubarMenu";m.smartSeparators=!0;m.showDisabled=!0;m.autoExpand=!0;m.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(m,arguments);this.resetCurrentMenu();m.destroy()});var e=mxEvent.getClientX(f),k=mxEvent.getClientY(f);m.popup(e,k,null,f);this.setCurrentMenu(m,d)}mxEvent.consume(f)}}))};
+EditorUi.prototype.getLinkForPage=function(a,d,c){if(!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp){var b=this.getCurrentFile();if(null!=b&&b.constructor!=LocalFile&&"draw.io"==this.getServiceName()){var g=this.getSearch("create title mode url drive splash state clibs ui viewbox hide-pages".split(" ")),g=g+((0==g.length?"?":"&")+"page-id="+a.getId());null!=d&&(g+="&"+d.join("&"));return(c&&"1"!=urlParams.dev?EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?
+EditorUi.drawHost:"https://"+window.location.host)+"/"+g+"#"+b.getHash()}}return null};
+EditorUi.prototype.createPageMenu=function(a,d){return mxUtils.bind(this,function(c,b){var g=this.editor.graph;c.addItem(mxResources.get("insert"),null,mxUtils.bind(this,function(){this.insertPage(null,mxUtils.indexOf(this.pages,a)+1)}),b);c.addItem(mxResources.get("delete"),null,mxUtils.bind(this,function(){this.removePage(a)}),b);c.addItem(mxResources.get("rename"),null,mxUtils.bind(this,function(){this.renamePage(a,d)}),b);null!=this.getLinkForPage(a)&&(c.addSeparator(b),c.addItem(mxResources.get("link"),
+null,mxUtils.bind(this,function(){this.showPublishLinkDialog(mxResources.get("url"),!0,null,null,mxUtils.bind(this,function(b,c,d,k,l,n){b=this.createUrlParameters(b,c,d,k,l,n);d||b.push("hide-pages=1");g.isSelectionEmpty()||(d=g.getBoundingBox(g.getSelectionCells()),c=g.view.translate,l=g.view.scale,d.width/=l,d.height/=l,d.x=d.x/l-c.x,d.y=d.y/l-c.y,b.push("viewbox="+encodeURIComponent(JSON.stringify({x:Math.round(d.x),y:Math.round(d.y),width:Math.round(d.width),height:Math.round(d.height),border:100}))));
k=new EmbedDialog(this,this.getLinkForPage(a,b,k));this.showDialog(k.container,440,240,!0,!0);k.init()}))})));c.addSeparator(b);c.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){this.duplicatePage(a,mxResources.get("copyOf",[a.getName()]))}),b);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"draw.io"!=this.getServiceName()||(c.addSeparator(b),c.addItem(mxResources.get("openInNewWindow"),null,mxUtils.bind(this,function(){this.editor.editAsNew(this.getFileData(!0,null,null,null,
!0,!0))}),b))})};(function(){var a=EditorUi.prototype.refresh;EditorUi.prototype.refresh=function(d){a.apply(this,arguments);this.updateTabContainer()}})();(function(){mxCodecRegistry.getCodec(ChangePageSetup).exclude.push("page")})();(function(){var a=new mxObjectCodec(new MovePage,["ui"]);a.beforeDecode=function(a,c,b){b.ui=a.ui;return c};a.afterDecode=function(a,c,b){a=b.oldIndex;b.oldIndex=b.newIndex;b.newIndex=a;return b};mxCodecRegistry.register(a)})();
(function(){var a=new mxObjectCodec(new RenamePage,["ui","page"]);a.beforeDecode=function(a,c,b){b.ui=a.ui;return c};a.afterDecode=function(a,c,b){a=b.previous;b.previous=b.name;b.name=a;return b};mxCodecRegistry.register(a)})();
-(function(){var a=new mxObjectCodec(new ChangePage,"ui relatedPage index neverShown page previousPage".split(" ")),d="defaultParent currentRoot scrollLeft scrollTop scale translate lastPasteXml pasteCounter".split(" ");a.afterEncode=function(a,b,f){f.setAttribute("relatedPage",b.relatedPage.getId());null==b.index&&(f.setAttribute("name",b.relatedPage.getName()),null!=b.relatedPage.viewState&&f.setAttribute("viewState",JSON.stringify(b.relatedPage.viewState,function(a,b){return 0>mxUtils.indexOf(d,
-a)?b:void 0})),null!=b.relatedPage.root&&a.encodeCell(b.relatedPage.root,f));return f};a.beforeDecode=function(a,b,d){d.ui=a.ui;d.relatedPage=d.ui.getPageById(b.getAttribute("relatedPage"));if(null==d.relatedPage){var c=b.ownerDocument.createElement("diagram");c.setAttribute("id",b.getAttribute("relatedPage"));c.setAttribute("name",b.getAttribute("name"));d.relatedPage=new DiagramPage(c);c=b.getAttribute("viewState");null!=c&&(d.relatedPage.viewState=JSON.parse(c),b.removeAttribute("viewState"));
-b=b.cloneNode(!0);c=b.firstChild;if(null!=c)for(d.relatedPage.root=a.decodeCell(c,!1),d=c.nextSibling,c.parentNode.removeChild(c),c=d;null!=c;){d=c.nextSibling;if(c.nodeType==mxConstants.NODETYPE_ELEMENT){var f=c.getAttribute("id");null==a.lookup(f)&&a.decodeCell(c)}c.parentNode.removeChild(c);c=d}}return b};a.afterDecode=function(a,b,d){d.index=d.previousIndex;return d};mxCodecRegistry.register(a)})();(function(){EditorUi.prototype.altShiftActions[68]="selectDescendants";var a=Graph.prototype.foldCells;Graph.prototype.foldCells=function(b,c,d,m,e){c=null!=c?c:!1;null==d&&(d=this.getFoldableCells(this.getSelectionCells(),b));this.stopEditing();this.model.beginUpdate();try{for(var f=d.slice(),g=0;g<d.length;g++)"1"==mxUtils.getValue(this.getCurrentCellStyle(d[g]),"treeFolding","0")&&this.foldTreeCell(b,d[g]);d=f;d=a.apply(this,arguments)}finally{this.model.endUpdate()}return d};Graph.prototype.foldTreeCell=
+(function(){var a=new mxObjectCodec(new ChangePage,"ui relatedPage index neverShown page previousPage".split(" ")),d="defaultParent currentRoot scrollLeft scrollTop scale translate lastPasteXml pasteCounter".split(" ");a.afterEncode=function(a,b,g){g.setAttribute("relatedPage",b.relatedPage.getId());null==b.index&&(g.setAttribute("name",b.relatedPage.getName()),null!=b.relatedPage.viewState&&g.setAttribute("viewState",JSON.stringify(b.relatedPage.viewState,function(a,b){return 0>mxUtils.indexOf(d,
+a)?b:void 0})),null!=b.relatedPage.root&&a.encodeCell(b.relatedPage.root,g));return g};a.beforeDecode=function(a,b,d){d.ui=a.ui;d.relatedPage=d.ui.getPageById(b.getAttribute("relatedPage"));if(null==d.relatedPage){var c=b.ownerDocument.createElement("diagram");c.setAttribute("id",b.getAttribute("relatedPage"));c.setAttribute("name",b.getAttribute("name"));d.relatedPage=new DiagramPage(c);c=b.getAttribute("viewState");null!=c&&(d.relatedPage.viewState=JSON.parse(c),b.removeAttribute("viewState"));
+b=b.cloneNode(!0);c=b.firstChild;if(null!=c)for(d.relatedPage.root=a.decodeCell(c,!1),d=c.nextSibling,c.parentNode.removeChild(c),c=d;null!=c;){d=c.nextSibling;if(c.nodeType==mxConstants.NODETYPE_ELEMENT){var g=c.getAttribute("id");null==a.lookup(g)&&a.decodeCell(c)}c.parentNode.removeChild(c);c=d}}return b};a.afterDecode=function(a,b,d){d.index=d.previousIndex;return d};mxCodecRegistry.register(a)})();(function(){EditorUi.prototype.altShiftActions[68]="selectDescendants";var a=Graph.prototype.foldCells;Graph.prototype.foldCells=function(b,c,d,m,e){c=null!=c?c:!1;null==d&&(d=this.getFoldableCells(this.getSelectionCells(),b));this.stopEditing();this.model.beginUpdate();try{for(var f=d.slice(),g=0;g<d.length;g++)"1"==mxUtils.getValue(this.getCurrentCellStyle(d[g]),"treeFolding","0")&&this.foldTreeCell(b,d[g]);d=f;d=a.apply(this,arguments)}finally{this.model.endUpdate()}return d};Graph.prototype.foldTreeCell=
function(a,c){this.model.beginUpdate();try{var b=[];this.traverse(c,!0,mxUtils.bind(this,function(a,d){var e=null!=d&&this.isTreeEdge(d);e&&b.push(d);a==c||null!=d&&!e||b.push(a);return(null==d||e)&&(a==c||!this.model.isCollapsed(a))}));this.model.setCollapsed(c,a);for(var d=0;d<b.length;d++)this.model.setVisible(b[d],!a)}finally{this.model.endUpdate()}};Graph.prototype.isTreeEdge=function(a){return!this.isEdgeIgnored(a)};Graph.prototype.getTreeEdges=function(a,c,d,m,e,k){return this.model.filterCells(this.getEdges(a,
c,d,m,e,k),mxUtils.bind(this,function(a){return this.isTreeEdge(a)}))};Graph.prototype.getIncomingTreeEdges=function(a,c){return this.getTreeEdges(a,c,!0,!1,!1)};Graph.prototype.getOutgoingTreeEdges=function(a,c){return this.getTreeEdges(a,c,!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 a(a){return v.isVertex(a)&&d(a)}function c(a){var b=
!1;null!=a&&(b="1"==t.getCurrentCellStyle(a).treeMoving);return b}function d(a){var b=!1;null!=a&&(a=v.getParent(a),b=t.view.getState(a),b="tree"==(null!=b?b.style:t.getCellStyle(a)).containerType);return b}function m(a){var b=!1;null!=a&&(a=v.getParent(a),b=t.view.getState(a),t.view.getState(a),b=null!=(null!=b?b.style:t.getCellStyle(a)).childLayout);return b}function e(a){a=t.view.getState(a);if(null!=a){var b=t.getIncomingTreeEdges(a.cell);if(0<b.length&&(b=t.view.getState(b[0]),null!=b&&(b=b.absolutePoints,
@@ -11744,21 +11747,21 @@ t.startEditingAtCell(t.getSelectionCell()),mxEvent.consume(b);else if(mxEvent.is
mxEvent.consume(b))}}catch(H){u.handleError(H)}mxEvent.isConsumed(b)||D.apply(this,arguments)};var G=t.connectVertex;t.connectVertex=function(b,c,d,f,g,m,p){var q=t.getIncomingTreeEdges(b);if(a(b)){var u=e(b),x=u==mxConstants.DIRECTION_EAST||u==mxConstants.DIRECTION_WEST,v=c==mxConstants.DIRECTION_EAST||c==mxConstants.DIRECTION_WEST;return u==c||0==q.length?n(b,c):x==v?l(b):k(b,c!=mxConstants.DIRECTION_NORTH&&c!=mxConstants.DIRECTION_WEST)}return G.apply(this,arguments)};t.getSubtree=function(b){var d=
[b];!c(b)&&!a(b)||m(b)||t.traverse(b,!0,function(a,b){var c=null!=b&&t.isTreeEdge(b);c&&0>mxUtils.indexOf(d,b)&&d.push(b);(null==b||c)&&0>mxUtils.indexOf(d,a)&&d.push(a);return null==b||c});return d};var E=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){E.apply(this,arguments);(c(this.state.cell)||a(this.state.cell))&&!m(this.state.cell)&&0<this.graph.getOutgoingTreeEdges(this.state.cell).length&&(this.moveHandle=mxUtils.createImage(Editor.moveImage),this.moveHandle.setAttribute("title",
"Move Subtree"),this.moveHandle.style.position="absolute",this.moveHandle.style.cursor="pointer",this.moveHandle.style.width="24px",this.moveHandle.style.height="24px",this.graph.container.appendChild(this.moveHandle),mxEvent.addGestureListeners(this.moveHandle,mxUtils.bind(this,function(a){this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(a),mxEvent.getClientY(a),this.graph.getSubtree(this.state.cell));this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(a);
-this.graph.isMouseDown=!0;u.hoverIcons.reset();mxEvent.consume(a)})))};var F=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){F.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(a){K.apply(this,
+this.graph.isMouseDown=!0;u.hoverIcons.reset();mxEvent.consume(a)})))};var F=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){F.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(a){J.apply(this,
arguments);null!=this.moveHandle&&(this.moveHandle.style.display=a?"":"none")};var M=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(a,b){M.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)}};if("undefined"!==typeof Sidebar){var c=Sidebar.prototype.createAdvancedShapes;Sidebar.prototype.createAdvancedShapes=function(){var a=c.apply(this,arguments),d=this.graph;return a.concat([this.addEntry("tree container",
function(){var a=new mxCell("Tree Container",new mxGeometry(0,0,400,320),"swimlane;startSize=20;horizontal=1;containerType=tree;");a.vertex=!0;var b=new mxCell("Parent",new mxGeometry(140,60,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');b.vertex=!0;var c=new mxCell("Child",new mxGeometry(140,140,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');
c.vertex=!0;var d=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");d.geometry.relative=!0;d.edge=!0;b.insertEdge(d,!0);c.insertEdge(d,!1);a.insert(d);a.insert(b);a.insert(c);return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap mindmaps central idea branch topic",function(){var a=new mxCell("Mindmap",new mxGeometry(0,0,420,126),"swimlane;startSize=20;horizontal=1;containerType=tree;");
a.vertex=!0;var b=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};');b.vertex=!0;var c=new mxCell("Topic",new mxGeometry(320,40,80,20),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
-c.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;b.insertEdge(d,!0);c.insertEdge(d,!1);var f=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};');
-f.vertex=!0;var n=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");n.geometry.relative=!0;n.edge=!0;b.insertEdge(n,!0);f.insertEdge(n,!1);var p=new mxCell("Topic",new mxGeometry(20,40,80,20),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
+c.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;b.insertEdge(d,!0);c.insertEdge(d,!1);var g=new mxCell("Branch",new mxGeometry(320,80,72,26),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
+g.vertex=!0;var n=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");n.geometry.relative=!0;n.edge=!0;b.insertEdge(n,!0);g.insertEdge(n,!1);var p=new mxCell("Topic",new mxGeometry(20,40,80,20),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
p.vertex=!0;var q=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");q.geometry.relative=!0;q.edge=!0;b.insertEdge(q,!0);p.insertEdge(q,!1);var u=new mxCell("Branch",new mxGeometry(20,80,72,26),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
-u.vertex=!0;var t=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");t.geometry.relative=!0;t.edge=!0;b.insertEdge(t,!0);u.insertEdge(t,!1);a.insert(d);a.insert(n);a.insert(q);a.insert(t);a.insert(b);a.insert(c);a.insert(f);a.insert(p);a.insert(u);return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap mindmaps central idea",function(){var a=new mxCell("Central Idea",
+u.vertex=!0;var t=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");t.geometry.relative=!0;t.edge=!0;b.insertEdge(t,!0);u.insertEdge(t,!1);a.insert(d);a.insert(n);a.insert(q);a.insert(t);a.insert(b);a.insert(c);a.insert(g);a.insert(p);a.insert(u);return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap mindmaps central idea",function(){var a=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;');a.vertex=!0;return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap mindmaps branch",function(){var a=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};');
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.setTerminalPoint(new mxPoint(-40,40),!0);b.geometry.relative=!0;b.edge=!0;a.insertEdge(b,!1);return sb.createVertexTemplateFromCells([a,b],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap mindmaps sub topic",function(){var a=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};');
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.setTerminalPoint(new mxPoint(-40,40),!0);b.geometry.relative=!0;b.edge=!0;a.insertEdge(b,!1);return sb.createVertexTemplateFromCells([a,b],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree orgchart organization division",function(){var a=new mxCell("Orgchart",new mxGeometry(0,0,280,220),'swimlane;startSize=20;horizontal=1;containerType=tree;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');
a.vertex=!0;var b=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"};');d.setAttributeForCell(b,"treeRoot","1");b.vertex=!0;var c=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"};');
-c.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;b.insertEdge(f,!0);c.insertEdge(f,!1);var l=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"};');l.vertex=!0;var n=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");
-n.geometry.relative=!0;n.edge=!0;b.insertEdge(n,!0);l.insertEdge(n,!1);a.insert(f);a.insert(n);a.insert(b);a.insert(c);a.insert(l);return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree root",function(){var a=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"};');d.setAttributeForCell(a,"treeRoot",
+c.vertex=!0;var g=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");g.geometry.relative=!0;g.edge=!0;b.insertEdge(g,!0);c.insertEdge(g,!1);var l=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"};');l.vertex=!0;var n=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");
+n.geometry.relative=!0;n.edge=!0;b.insertEdge(n,!0);l.insertEdge(n,!1);a.insert(g);a.insert(n);a.insert(b);a.insert(c);a.insert(l);return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree root",function(){var a=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"};');d.setAttributeForCell(a,"treeRoot",
"1");a.vertex=!0;return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree division",function(){var a=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"};');a.vertex=!0;var b=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");
b.geometry.setTerminalPoint(new mxPoint(0,0),!0);b.geometry.relative=!0;b.edge=!0;a.insertEdge(b,!1);return sb.createVertexTemplateFromCells([a,b],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree sub sections",function(){var a=new mxCell("Sub Section",new mxGeometry(0,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");a.vertex=!0;var b=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;startArrow=none;endArrow=none;rounded=0;targetPortConstraint=eastwest;sourcePortConstraint=northsouth;");
b.geometry.setTerminalPoint(new mxPoint(110,-40),!0);b.geometry.relative=!0;b.edge=!0;a.insertEdge(b,!1);var c=new mxCell("Sub Section",new mxGeometry(120,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");c.vertex=!0;var d=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;startArrow=none;endArrow=none;rounded=0;targetPortConstraint=eastwest;sourcePortConstraint=northsouth;");d.geometry.setTerminalPoint(new mxPoint(110,-40),!0);d.geometry.relative=
@@ -11775,18 +11778,18 @@ this.getX()==a&&this.getY()==b||mxWindow.prototype.setLocation.apply(this,argume
Graph.createSvgImage(18,10,'<path d="M 5 1 L 13 9 M 13 1 L 5 9" stroke="#C0C0C0" stroke-width="2"/>').src;mxWindow.prototype.minimizeImage=Graph.createSvgImage(14,10,'<path d="M 3 7 L 7 3 L 11 7" stroke="#C0C0C0" stroke-width="2" fill="none"/>').src;mxWindow.prototype.normalizeImage=Graph.createSvgImage(14,10,'<path d="M 3 3 L 7 7 L 11 3" stroke="#C0C0C0" stroke-width="2" fill="none"/>').src;mxConstraintHandler.prototype.pointImage=Graph.createSvgImage(5,5,'<path d="m 0 0 L 5 5 M 0 5 L 5 0" stroke="#29b6f2"/>');
mxOutline.prototype.sizerImage=null;mxConstants.VERTEX_SELECTION_COLOR="#C0C0C0";mxConstants.EDGE_SELECTION_COLOR="#C0C0C0";mxConstants.CONNECT_HANDLE_FILLCOLOR="#cee7ff";mxConstants.DEFAULT_VALID_COLOR="#29b6f2";mxConstants.GUIDE_COLOR="#C0C0C0";mxConstants.HIGHLIGHT_STROKEWIDTH=5;mxConstants.HIGHLIGHT_OPACITY=35;mxConstants.OUTLINE_COLOR="#29b6f2";mxConstants.OUTLINE_HANDLE_FILLCOLOR="#29b6f2";mxConstants.OUTLINE_HANDLE_STROKECOLOR="#fff";Graph.prototype.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity=
"0.4";Graph.prototype.svgShadowSize="0.6";Graph.prototype.svgShadowBlur="1.2";Format.inactiveTabBackgroundColor="#f0f0f0";mxGraphHandler.prototype.previewColor="#C0C0C0";mxRubberband.prototype.defaultOpacity=50;HoverIcons.prototype.inactiveOpacity=25;Format.prototype.showCloseButton=!1;EditorUi.prototype.closableScratchpad=!1;EditorUi.prototype.toolbarHeight="1"==urlParams.sketch?1:46;EditorUi.prototype.footerHeight=0;Graph.prototype.editAfterInsert="1"!=urlParams.sketch&&!mxClient.IS_IOS&&!mxClient.IS_ANDROID;
-EditorUi.prototype.setDarkMode=function(a){this.spinner.spin(document.body,mxResources.get("working")+"...")&&window.setTimeout(mxUtils.bind(this,function(){this.spinner.stop();this.doSetDarkMode(a);mxSettings.settings.darkMode=a;mxSettings.save();this.fireEvent(new mxEventObject("darkModeChanged"))}),0)};var f=document.createElement("link");f.setAttribute("rel","stylesheet");f.setAttribute("href",STYLE_PATH+"/dark.css");f.setAttribute("charset","UTF-8");f.setAttribute("type","text/css");EditorUi.prototype.doSetDarkMode=
+EditorUi.prototype.setDarkMode=function(a){this.spinner.spin(document.body,mxResources.get("working")+"...")&&window.setTimeout(mxUtils.bind(this,function(){this.spinner.stop();this.doSetDarkMode(a);mxSettings.settings.darkMode=a;mxSettings.save();this.fireEvent(new mxEventObject("darkModeChanged"))}),0)};var g=document.createElement("link");g.setAttribute("rel","stylesheet");g.setAttribute("href",STYLE_PATH+"/dark.css");g.setAttribute("charset","UTF-8");g.setAttribute("type","text/css");EditorUi.prototype.doSetDarkMode=
function(a){if(Editor.darkMode!=a){var b=this.editor.graph;Editor.darkMode=a;this.spinner.opts.color=Editor.isDarkMode()?"#c0c0c0":"#000";this.setGridColor(Editor.isDarkMode()?b.view.defaultDarkGridColor:b.view.defaultGridColor);b.defaultPageBackgroundColor=Editor.isDarkMode()?"#2a2a2a":"#ffffff";b.defaultPageBorderColor=Editor.isDarkMode()?"#505759":"#ffffff";b.defaultThemeName=Editor.isDarkMode()?"darkTheme":"default-style2";b.graphHandler.previewColor=Editor.isDarkMode()?"#cccccc":"black";b.loadStylesheet();
null!=this.actions.layersWindow&&(a=this.actions.layersWindow.window.isVisible(),this.actions.layersWindow.window.setVisible(!1),this.actions.layersWindow.destroy(),this.actions.layersWindow=null,a&&window.setTimeout(this.actions.get("layers").funct,0));null!=this.menus.commentsWindow&&(this.menus.commentsWindow.window.setVisible(!1),this.menus.commentsWindow.destroy(),this.menus.commentsWindow=null);null!=this.ruler&&this.ruler.updateStyle();Dialog.backdropColor=Editor.isDarkMode()?"#2a2a2a":"white";
StyleFormatPanel.prototype.defaultStrokeColor=Editor.isDarkMode()?"#cccccc":"black";BaseFormatPanel.prototype.buttonBackgroundColor=Editor.isDarkMode()?"#2a2a2a":"white";Format.inactiveTabBackgroundColor=Editor.isDarkMode()?"black":"#f0f0f0";mxConstants.DROP_TARGET_COLOR=Editor.isDarkMode()?"#00ff00":"#0000FF";Editor.helpImage=Editor.isDarkMode()&&mxClient.IS_SVG?Editor.darkHelpImage:Editor.lightHelpImage;Editor.checkmarkImage=Editor.isDarkMode()&&mxClient.IS_SVG?Editor.darkCheckmarkImage:Editor.lightCheckmarkImage;
-document.body.style.backgroundColor=Editor.isDarkMode()?"#2a2a2a":"#ffffff";g.innerHTML=Editor.createMinimalCss();Editor.darkMode?null==f.parentNode&&document.getElementsByTagName("head")[0].appendChild(f):null!=f.parentNode&&f.parentNode.removeChild(f)}};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 .geMenubarContainer .geMenuItem .geMenuItem, html body .geMenubarContainer a.geMenuItem { color: #353535; }html > body > div > .geToolbarContainer { border: 1px solid #c0c0c0 !important; box-shadow: none !important; }html > body.geEditor > div > a.geItem { background-color: #2a2a2a; color: #cccccc; border-color: #505759; }html body .geTabContainer, html body .geTabContainer div, html body .geMenubarContainer { border-color: #505759 !important; }":
+document.body.style.backgroundColor=Editor.isDarkMode()?"#2a2a2a":"#ffffff";f.innerHTML=Editor.createMinimalCss();Editor.darkMode?null==g.parentNode&&document.getElementsByTagName("head")[0].appendChild(g):null!=g.parentNode&&g.parentNode.removeChild(g)}};Editor.createMinimalCss=function(){return"* { -webkit-font-smoothing: antialiased; }html body td.mxWindowTitle > div > img { padding: 8px 4px; }"+(Editor.isDarkMode()?"html body td.mxWindowTitle > div > img { margin: -4px; }html body .geToolbarContainer .geMenuItem, html body .geToolbarContainer .geToolbarButton, html body .geMenubarContainer .geMenuItem .geMenuItem, html body .geMenubarContainer a.geMenuItem,html body .geMenubarContainer .geToolbarButton { filter: invert(1); }html body .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.geEditor .geTabContainer div { border-color: #e5e5e5 !important; }")+'html > body > div > a.geItem { background-color: #ffffff; color: #707070; border-top: 1px solid lightgray; border-left: 1px solid lightgray; }html body .geMenubarContainer { border-bottom:1px solid lightgray;background-color:#ffffff; }html body .mxWindow button.geBtn { font-size:12px !important; margin-left: 0; }html body table.mxWindow td.mxWindowPane div.mxWindowPane *:not(svg *) { font-size:9pt; }table.mxWindow * :not(svg *) { font-size:13px; }html body .mxWindow { z-index: 3; }html body div.diagramContainer button, html body button.geBtn { font-size:14px; font-weight:700; border-radius: 5px; }html body button.geBtn:active { opacity: 0.6; }html body a.geMenuItem { opacity: 0.75; cursor: pointer; user-select: none; }html body a.geMenuItem[disabled] { opacity: 0.2; }html body a.geMenuItem[disabled]:active { opacity: 0.2; }html body div.geActivePage { opacity: 0.7; }html body a.geMenuItem:active { opacity: 0.2; }html body .geToolbarButton { opacity: 0.3; }html body .geToolbarButton:active { opacity: 0.15; }html body .geStatus:active { opacity: 0.5; }html body .geMenubarContainer .geStatus { margin-top: 0px !important; }html table.mxPopupMenu tr.mxPopupMenuItemHover:active { opacity: 0.7; }html body .geDialog input, html body .geToolbarContainer input, html body .mxWindow input {padding: 2px; display: inline-block; }html body .mxWindow input[type="checkbox"] {padding: 0px; }div.geDialog { border-radius: 5px; }html body div.geDialog button.geBigButton { color: '+
(Editor.isDarkMode()?"#2a2a2a":"#fff")+" !important; border: none !important; }.mxWindow button, .geDialog select, .mxWindow select { display:inline-block; }html body .mxWindow .geColorBtn, html body .geDialog .geColorBtn { background: none; }html body div.diagramContainer button, html body .mxWindow button, html body .geDialog button { min-width: 0px; border-radius: 5px; color: "+(Editor.isDarkMode()?"#cccccc":"#353535")+" !important; border-style: solid; border-width: 1px; border-color: rgb(216, 216, 216); }html body div.diagramContainer button:hover, html body .mxWindow button:hover, html body .geDialog button:hover { border-color: rgb(177, 177, 177); }html body div.diagramContainer button:active, html body .mxWindow button:active, html body .geDialog button:active { opacity: 0.6; }div.diagramContainer button.geBtn, .mxWindow button.geBtn, .geDialog button.geBtn { min-width:72px; font-weight: 600; background: none; }div.diagramContainer button.gePrimaryBtn, .mxWindow button.gePrimaryBtn, .geDialog button.gePrimaryBtn, html body .gePrimaryBtn { background: #29b6f2; color: #fff !important; border: none; box-shadow: none; }html body .gePrimaryBtn:hover { background: #29b6f2; border: none; box-shadow: inherit; }html body button.gePrimaryBtn:hover { background: #29b6f2; border: none; }.geBtn button { min-width:72px !important; }div.geToolbarContainer a.geButton { margin:0px; padding: 0 2px 4px 2px; } .geDialog, .mxWindow td.mxWindowPane *, div.geSprite, td.mxWindowTitle, .geDiagramContainer { box-sizing:content-box; }.mxWindow div button.geStyleButton { box-sizing: border-box; }table.mxWindow td.mxWindowPane button.geColorBtn { padding:0px; box-sizing: border-box; }td.mxWindowPane .geSidebarContainer button { padding:2px; box-sizing: border-box; }html body .geMenuItem { font-size:14px; text-decoration: none; font-weight: normal; padding: 6px 10px 6px 10px; border: none; border-radius: 5px; color: #353535; box-shadow: inset 0 0 0 1px rgba(0,0,0,.11), inset 0 -1px 0 0 rgba(0,0,0,.08), 0 1px 2px 0 rgba(0,0,0,.04); }.geTabContainer { border-bottom:1px solid lightgray; border-top:1px solid lightgray; background: "+
(Editor.isDarkMode()?"#2a2a2a":"#fff")+" !important; }.geToolbarContainer { background: "+(Editor.isDarkMode()?"#2a2a2a":"#fff")+"; }div.geSidebarContainer { background-color: "+(Editor.isDarkMode()?"#2a2a2a":"#fff")+"; }div.geSidebarContainer .geTitle { background-color: "+(Editor.isDarkMode()?"#2a2a2a":"#fdfdfd")+"; }div.mxWindow td.mxWindowPane button { background-image: none; float: none; }td.mxWindowTitle { height: 22px !important; background: none !important; font-size: 13px !important; text-align:center !important; border-bottom:1px solid lightgray; }div.mxWindow, div.mxWindowTitle { background-image: none !important; background-color:"+
(Editor.isDarkMode()?"#2a2a2a":"#fff")+" !important; }div.mxWindow { border-radius:5px; box-shadow: 0px 0px 2px #C0C0C0 !important;}div.mxWindow *:not(svg *) { font-family: inherit !important; }html div.geVerticalHandle { position:absolute;bottom:0px;left:50%;cursor:row-resize;width:11px;height:11px;background:white;margin-bottom:-6px; margin-left:-6px; border: none; border-radius: 6px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.11), inset 0 -1px 0 0 rgba(0,0,0,.08), 0 1px 2px 0 rgba(0,0,0,.04); }html div.geInactivePage { background: "+
(Editor.isDarkMode()?"#2a2a2a":"rgb(249, 249, 249)")+" !important; color: #A0A0A0 !important; } html div.geActivePage { background: "+(Editor.isDarkMode()?"#2a2a2a":"#fff")+" !important; "+(Editor.isDarkMode()?"":"color: #353535 !important; } ")+"html div.mxRubberband { border:1px solid; border-color: #29b6f2 !important; background:rgba(41,182,242,0.4) !important; } html body div.mxPopupMenu { border-radius:5px; border:1px solid #c0c0c0; padding:5px 0 5px 0; box-shadow: 0px 4px 17px -4px rgba(96,96,96,1); } html table.mxPopupMenu td.mxPopupMenuItem { color: "+
(Editor.isDarkMode()?"#cccccc":"#353535")+"; font-size: 14px; padding-top: 4px; padding-bottom: 4px; }html table.mxPopupMenu tr.mxPopupMenuItemHover { background-color: "+(Editor.isDarkMode()?"#000000":"#29b6f2")+"; }html tr.mxPopupMenuItemHover td.mxPopupMenuItem, html tr.mxPopupMenuItemHover td.mxPopupMenuItem span { color: "+(Editor.isDarkMode()?"#cccccc":"#ffffff")+" !important; }html tr.mxPopupMenuItem, html td.mxPopupMenuItem { transition-property: none !important; }html table.mxPopupMenu hr { height: 2px; background-color: rgba(0,0,0,.07); margin: 5px 0; }html body td.mxWindowTitle { padding-right: 14px; }html td.mxWindowTitle div { top: 0px !important; }"+
-(mxClient.IS_IOS?"html input[type=checkbox], html input[type=radio] { height:12px; }":"")+("1"==urlParams.sketch?"html .geStatusAlertOrange, html .geStatusAlert { margin-top: -2px; }a.geStatus > div { overflow: hidden; text-overflow: ellipsis; max-width: 100%; }":"")};var g=document.createElement("style");g.type="text/css";g.innerHTML=Editor.createMinimalCss();document.getElementsByTagName("head")[0].appendChild(g);Editor.prototype.isChromelessView=function(){return!1};Graph.prototype.isLightboxView=
+(mxClient.IS_IOS?"html input[type=checkbox], html input[type=radio] { height:12px; }":"")+("1"==urlParams.sketch?"html .geStatusAlertOrange, html .geStatusAlert { margin-top: -2px; }a.geStatus > div { overflow: hidden; text-overflow: ellipsis; max-width: 100%; }":"")};var f=document.createElement("style");f.type="text/css";f.innerHTML=Editor.createMinimalCss();document.getElementsByTagName("head")[0].appendChild(f);Editor.prototype.isChromelessView=function(){return!1};Graph.prototype.isLightboxView=
function(){return!1};var m=EditorUi.prototype.updateTabContainer;EditorUi.prototype.updateTabContainer=function(){null!=this.tabContainer&&(this.tabContainer.style.right="70px",this.diagramContainer.style.bottom="1"==urlParams.sketch?"0px":this.tabContainerHeight+"px");m.apply(this,arguments)};var e=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){e.apply(this,arguments);this.menus.get("save").setEnabled(null!=this.getCurrentFile()||"1"==urlParams.embed)};var k=
Menus.prototype.addShortcut;Menus.prototype.addShortcut=function(a,b){null!=b.shortcut&&900>c&&!mxClient.IS_IOS?a.firstChild.nextSibling.setAttribute("title",b.shortcut):k.apply(this,arguments)};var l=App.prototype.updateUserElement;App.prototype.updateUserElement=function(){l.apply(this,arguments);if(null!=this.userElement){var a=this.userElement;a.style.cssText="position:relative;margin-right:4px;cursor:pointer;display:"+a.style.display;a.className="geToolbarButton";a.innerHTML="";a.style.backgroundImage=
"url("+Editor.userImage+")";a.style.backgroundPosition="center center";a.style.backgroundRepeat="no-repeat";a.style.backgroundSize="24px 24px";a.style.height="24px";a.style.width="24px";a.style.cssFloat="right";a.setAttribute("title",mxResources.get("changeUser"));"none"!=a.style.display&&(a.style.display="inline-block")}};var n=App.prototype.updateButtonContainer;App.prototype.updateButtonContainer=function(){n.apply(this,arguments);if(null!=this.shareButton){var a=this.shareButton;a.style.cssText=
@@ -11802,7 +11805,7 @@ Menus.prototype.addPopupMenuEditItems=function(a,b,c){u.apply(this,arguments);th
this.actions.layersWindow=null);null!=this.menus.tagsWindow&&(this.menus.tagsWindow.window.setVisible(!1),this.menus.tagsWindow.window.destroy(),this.menus.tagsWindow=null);null!=this.menus.findWindow&&(this.menus.findWindow.window.setVisible(!1),this.menus.findWindow.window.destroy(),this.menus.findWindow=null);null!=this.menus.findReplaceWindow&&(this.menus.findReplaceWindow.window.setVisible(!1),this.menus.findReplaceWindow.window.destroy(),this.menus.findReplaceWindow=null);t.apply(this,arguments)};
var v=EditorUi.prototype.setGraphEnabled;EditorUi.prototype.setGraphEnabled=function(a){v.apply(this,arguments);if(a){var b=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;1E3<=b&&null!=this.sidebarWindow&&"1"!=urlParams.sketch&&this.sidebarWindow.window.setVisible(!0);null!=this.formatWindow&&(1E3<=b||"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 z=Menus.prototype.init;Menus.prototype.init=function(){z.apply(this,arguments);var b=this.editorUi,c=b.editor.graph;b.actions.get("editDiagram").label=mxResources.get("formatXml")+"...";b.actions.get("createShape").label=mxResources.get("shape")+"...";b.actions.get("outline").label=mxResources.get("outline")+"...";b.actions.get("layers").label=mxResources.get("layers")+"...";b.actions.get("forkme").visible="1"!=urlParams.sketch;b.actions.get("downloadDesktop").visible=
-"1"!=urlParams.sketch;var e=b.actions.put("toggleDarkMode",new Action(mxResources.get("dark"),function(){b.setDarkMode(!Editor.darkMode)}));e.setToggleAction(!0);e.setSelectedCallback(function(){return Editor.isDarkMode()});b.actions.put("importCsv",new Action(mxResources.get("csv")+"...",function(){c.popupMenuHandler.hideMenu();b.showImportCsvDialog()}));b.actions.put("importText",new Action(mxResources.get("text")+"...",function(){var a=new ParseDialog(b,"Insert from Text");b.showDialog(a.container,
+"1"!=urlParams.sketch;var e=b.actions.put("toggleDarkMode",new Action(mxResources.get("dark"),function(a){b.setDarkMode(!Editor.darkMode)}));e.setToggleAction(!0);e.setSelectedCallback(function(){return Editor.isDarkMode()});b.actions.put("importCsv",new Action(mxResources.get("csv")+"...",function(){c.popupMenuHandler.hideMenu();b.showImportCsvDialog()}));b.actions.put("importText",new Action(mxResources.get("text")+"...",function(){var a=new ParseDialog(b,"Insert from Text");b.showDialog(a.container,
620,420,!0,!1);a.init()}));b.actions.put("formatSql",new Action(mxResources.get("formatSql")+"...",function(){var a=new ParseDialog(b,"Insert from Text","formatSql");b.showDialog(a.container,620,420,!0,!1);a.init()}));b.actions.put("toggleShapes",new Action(mxResources.get("1"==urlParams.sketch?"moreShapes":"shapes")+"...",function(){d(b)},null,null,Editor.ctrlKey+"+Shift+K"));b.actions.put("toggleFormat",new Action(mxResources.get("format")+"...",function(){a(b)})).shortcut=b.actions.get("formatPanel").shortcut;
EditorUi.enablePlantUml&&!b.isOffline()&&b.actions.put("plantUml",new Action(mxResources.get("plantUml")+"...",function(){var a=new ParseDialog(b,mxResources.get("plantUml")+"...","plantUml");b.showDialog(a.container,620,420,!0,!1);a.init()}));b.actions.put("mermaid",new Action(mxResources.get("mermaid")+"...",function(){var a=new ParseDialog(b,mxResources.get("mermaid")+"...","mermaid");b.showDialog(a.container,620,420,!0,!1);a.init()}));var f=this.addPopupMenuCellEditItems;this.put("editCell",new Menu(mxUtils.bind(this,
function(a,b){var c=this.editorUi.editor.graph,d=c.getSelectionCell();f.call(this,a,d,null,b);this.addMenuItems(a,["editTooltip"],b);c.model.isVertex(d)&&this.addMenuItems(a,["editGeometry"],b);this.addMenuItems(a,["-","edit"],b)})));this.addPopupMenuCellEditItems=function(a,b,c,d){a.addSeparator();this.addSubmenu("editCell",a,d,mxResources.get("edit"))};this.put("diagram",new Menu(mxUtils.bind(this,function(a,c){var d=b.getCurrentFile();"1"!=urlParams.sketch&&(b.menus.addSubmenu("extras",a,c,mxResources.get("preferences")),
@@ -11823,30 +11826,31 @@ e.style.top="6px";e.style.marginRight="6px";e.style.height="30px";e.style.paddin
p.insertBefore(g,l.statusContainer):p.appendChild(g);null!=f?(g.style.backgroundImage="url("+f+")",g.style.backgroundPosition="center center",g.style.backgroundRepeat="no-repeat",g.style.backgroundSize="24px 24px",g.style.width="34px"):mxUtils.write(g,a);mxEvent.addListener(g,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(a){a.preventDefault()}));mxEvent.addListener(g,"click",function(a){"disabled"!=g.getAttribute("disabled")&&b(a);mxEvent.consume(a)});null==c&&(g.style.marginRight=
"4px");null!=d&&g.setAttribute("title",d);null!=e&&(a=function(){e.isEnabled()?(g.removeAttribute("disabled"),g.style.cursor="pointer"):(g.setAttribute("disabled","disabled"),g.style.cursor="default")},e.addListener("stateChanged",a),n.addListener("enabledChanged",a),a());return g}function f(a,b,c){c=document.createElement("div");c.className="geMenuItem";c.style.display="inline-block";c.style.verticalAlign="top";c.style.marginRight="6px";c.style.padding="0 4px 0 4px";c.style.height="30px";c.style.position=
"relative";c.style.top="0px";"1"==urlParams.sketch&&(c.style.boxShadow="none");for(var d=0;d<a.length;d++)null!=a[d]&&("1"==urlParams.sketch&&(a[d].style.padding="10px 8px",a[d].style.width="30px"),a[d].style.margin="0px",a[d].style.boxShadow="none",c.appendChild(a[d]));null!=b&&mxUtils.setOpacity(c,b);null!=l.statusContainer&&"1"!=urlParams.sketch?p.insertBefore(c,l.statusContainer):p.appendChild(c);return c}function g(){for(var a=p.firstChild;null!=a;){var d=a.nextSibling;"geMenuItem"!=a.className&&
-"geItem"!=a.className||a.parentNode.removeChild(a);a=d}q=p.firstChild;c=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;(a=1E3>c||"1"==urlParams.sketch)||b("diagram");if("1"==urlParams.sketch)W.style.left=58>P.offsetTop-P.offsetHeight/2?"70px":"10px";else if(f([a?b("diagram",null,IMAGE_PATH+"/drawlogo.svg"):null,e(mxResources.get("shapes"),l.actions.get("toggleShapes").funct,null,mxResources.get("shapes"),l.actions.get("image"),a?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTMgMTN2OGg4di04aC04ek0zIDIxaDh2LThIM3Y4ek0zIDN2OGg4VjNIM3ptMTMuNjYtMS4zMUwxMSA3LjM0IDE2LjY2IDEzbDUuNjYtNS42Ni01LjY2LTUuNjV6Ii8+PC9zdmc+":
-null),e(mxResources.get("format"),l.actions.get("toggleFormat").funct,null,mxResources.get("format")+" ("+l.actions.get("formatPanel").shortcut+")",l.actions.get("image"),a?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTIgM2MtNC45NyAwLTkgNC4wMy05IDlzNC4wMyA5IDkgOWMuODMgMCAxLjUtLjY3IDEuNS0xLjUgMC0uMzktLjE1LS43NC0uMzktMS4wMS0uMjMtLjI2LS4zOC0uNjEtLjM4LS45OSAwLS44My42Ny0xLjUgMS41LTEuNUgxNmMyLjc2IDAgNS0yLjI0IDUtNSAwLTQuNDItNC4wMy04LTktOHptLTUuNSA5Yy0uODMgMC0xLjUtLjY3LTEuNS0xLjVTNS42NyA5IDYuNSA5IDggOS42NyA4IDEwLjUgNy4zMyAxMiA2LjUgMTJ6bTMtNEM4LjY3IDggOCA3LjMzIDggNi41UzguNjcgNSA5LjUgNXMxLjUuNjcgMS41IDEuNVMxMC4zMyA4IDkuNSA4em01IDBjLS44MyAwLTEuNS0uNjctMS41LTEuNVMxMy42NyA1IDE0LjUgNXMxLjUuNjcgMS41IDEuNVMxNS4zMyA4IDE0LjUgOHptMyA0Yy0uODMgMC0xLjUtLjY3LTEuNS0xLjVTMTYuNjcgOSAxNy41IDlzMS41LjY3IDEuNSAxLjUtLjY3IDEuNS0xLjUgMS41eiIvPjwvc3ZnPg==":
-null)],a?60:null),d=b("insert",!0,a?V:null),f([d,e(mxResources.get("delete"),l.actions.get("delete").funct,null,mxResources.get("delete"),l.actions.get("delete"),a?ia:null)],a?60:null),411<=c&&(f([oa,ka],60),520<=c&&(f([pa,640<=c?e("",Q.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +)",Q,ma):null,640<=c?e("",T.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",T,fa):null],60),720<=c))){var g=e("",S.funct,null,mxResources.get("dark"),S,Editor.isDarkMode()?ca:aa);g.style.opacity=
-"0.4";l.addListener("darkModeChanged",mxUtils.bind(this,function(){g.style.backgroundImage="url("+(Editor.isDarkMode()?ca:aa)+")"}));null!=l.statusContainer&&"1"!=urlParams.sketch?p.insertBefore(g,l.statusContainer):p.appendChild(g)}a=l.menus.get("language");null!=a&&!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&600<=c&&"1"!=urlParams.sketch?(null==va&&(d=t.addMenu("",a.funct),d.setAttribute("title",mxResources.get("language")),d.className="geToolbarButton",d.style.backgroundImage="url("+Editor.globeImage+
-")",d.style.backgroundPosition="center center",d.style.backgroundRepeat="no-repeat",d.style.backgroundSize="24px 24px",d.style.position="absolute",d.style.height="24px",d.style.width="24px",d.style.zIndex="1",d.style.right="8px",d.style.cursor="pointer",d.style.top="1"==urlParams.embed?"12px":"11px",p.appendChild(d),va=d),l.buttonContainer.style.paddingRight="34px"):(l.buttonContainer.style.paddingRight="4px",null!=va&&(va.parentNode.removeChild(va),va=null))}y.apply(this,arguments);this.doSetDarkMode(null!=
-urlParams.dark?1==urlParams.dark:mxSettings.settings.darkMode);var k=document.createElement("div");k.style.cssText="position:absolute;left:0px;right:0px;top:0px;overflow-y:auto;overflow-x:hidden;";k.style.bottom="1"!=urlParams.embed||"1"==urlParams.libraries?"63px":"32px";this.sidebar=this.createSidebar(k);"1"==urlParams.sketch&&(this.toggleScratchpad(),this.editor.graph.isZoomWheelEvent=function(a){return!mxEvent.isShiftDown(a)&&!mxEvent.isMetaDown(a)&&!mxEvent.isAltDown(a)&&(!mxEvent.isControlDown(a)||
-mxClient.IS_MAC)});if("1"!=urlParams.sketch&&1E3<=c||null!=urlParams.clibs||null!=urlParams.libs||null!=urlParams["search-shapes"])d(this,!0),null!=this.sidebar&&null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes&&(this.sidebar.searchShapes(urlParams["search-shapes"]),this.sidebar.showEntries("search"));this.keyHandler.bindAction(75,!0,"toggleShapes",!0);if("1"==urlParams.sketch||1E3<=c)if(a(this,!0),"1"==urlParams.sketch){this.formatWindow.window.setClosable(!1);var m=this.formatWindow.window.toggleMinimized;
-this.formatWindow.window.toggleMinimized=function(){m.apply(this,arguments);this.minimized?(this.div.style.width="90px",this.table.style.width="90px",this.div.style.left=parseInt(this.div.style.left)+150+"px"):(this.div.style.width="240px",this.table.style.width="240px",this.div.style.left=parseInt(this.div.style.left)-150+"px");this.fit()};mxEvent.addListener(this.formatWindow.window.title,"dblclick",mxUtils.bind(this,function(a){mxEvent.getSource(a)==this.formatWindow.window.title&&this.formatWindow.window.toggleMinimized()}));
-this.formatWindow.window.toggleMinimized()}var l=this,n=l.editor.graph;l.toolbar=this.createToolbar(l.createDiv("geToolbar"));l.defaultLibraryName=mxResources.get("untitledLibrary");var p=document.createElement("div");p.className="geMenubarContainer";var q=null,t=new Menubar(l,p);l.statusContainer=l.createStatusContainer();l.statusContainer.style.position="relative";l.statusContainer.style.maxWidth="";l.statusContainer.style.marginTop="7px";l.statusContainer.style.marginLeft="6px";l.statusContainer.style.color=
-"gray";l.statusContainer.style.cursor="default";var u=l.hideCurrentMenu;l.hideCurrentMenu=function(){u.apply(this,arguments);this.editor.graph.popupMenuHandler.hideMenu()};var v=l.descriptorChanged;l.descriptorChanged=function(){v.apply(this,arguments);var a=l.getCurrentFile();if(null!=a&&null!=a.getTitle()){var b=a.getMode();"google"==b?b="googleDrive":"github"==b?b="gitHub":"gitlab"==b?b="gitLab":"onedrive"==b&&(b="oneDrive");b=mxResources.get(b);p.setAttribute("title",a.getTitle()+(null!=b?" ("+
-b+")":""))}else p.removeAttribute("title")};l.setStatusText(l.editor.getStatus());p.appendChild(l.statusContainer);l.buttonContainer=document.createElement("div");l.buttonContainer.style.cssText="position:absolute;right:0px;padding-right:34px;top:10px;white-space:nowrap;padding-top:2px;background-color:inherit;";p.appendChild(l.buttonContainer);l.menubarContainer=l.buttonContainer;l.tabContainer=document.createElement("div");l.tabContainer.className="geTabContainer";l.tabContainer.style.cssText="position:absolute;left:0px;right:0px;bottom:0px;height:30px;white-space:nowrap;margin-bottom:-2px;visibility:hidden;";
-var k=l.diagramContainer.parentNode,z=document.createElement("div");z.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";l.diagramContainer.style.top="1"==urlParams.sketch?"0px":"47px";var L=l.menus.get("viewZoom"),V="1"!=urlParams.sketch?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTkgMTNoLTZ2NmgtMnYtNkg1di0yaDZWNWgydjZoNnYyeiIvPjwvc3ZnPg==":"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGVuYWJsZS1iYWNrZ3JvdW5kPSJuZXcgMCAwIDI0IDI0IiBoZWlnaHQ9IjI0cHgiIHZpZXdCb3g9IjAgMCAyNCAyNCIgd2lkdGg9IjI0cHgiIGZpbGw9IiMwMDAwMDAiPjxnPjxwYXRoIGQ9Ik0wLDBoMjR2MjRIMFYweiIgZmlsbD0ibm9uZSIvPjwvZz48Zz48Zz48cGF0aCBkPSJNMywxMWg4VjNIM1YxMXogTTUsNWg0djRINVY1eiIvPjxwYXRoIGQ9Ik0xMywzdjhoOFYzSDEzeiBNMTksOWgtNFY1aDRWOXoiLz48cGF0aCBkPSJNMywyMWg4di04SDNWMjF6IE01LDE1aDR2NEg1VjE1eiIvPjxwb2x5Z29uIHBvaW50cz0iMTgsMTMgMTYsMTMgMTYsMTYgMTMsMTYgMTMsMTggMTYsMTggMTYsMjEgMTgsMjEgMTgsMTggMjEsMTggMjEsMTYgMTgsMTYiLz48L2c+PC9nPjwvc3ZnPg==",
+"geItem"!=a.className||a.parentNode.removeChild(a);a=d}q=p.firstChild;c=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;var a=1E3>c||"1"==urlParams.sketch,g=null;a||(g=b("diagram"));if("1"==urlParams.sketch)W.style.left=58>P.offsetTop-P.offsetHeight/2?"70px":"10px";else if(d=a?b("diagram",null,IMAGE_PATH+"/drawlogo.svg"):null,null!=d&&(g=d),f([g,e(mxResources.get("shapes"),l.actions.get("toggleShapes").funct,null,mxResources.get("shapes"),l.actions.get("image"),
+a?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTMgMTN2OGg4di04aC04ek0zIDIxaDh2LThIM3Y4ek0zIDN2OGg4VjNIM3ptMTMuNjYtMS4zMUwxMSA3LjM0IDE2LjY2IDEzbDUuNjYtNS42Ni01LjY2LTUuNjV6Ii8+PC9zdmc+":null),e(mxResources.get("format"),l.actions.get("toggleFormat").funct,null,mxResources.get("format")+" ("+l.actions.get("formatPanel").shortcut+")",l.actions.get("image"),a?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTIgM2MtNC45NyAwLTkgNC4wMy05IDlzNC4wMyA5IDkgOWMuODMgMCAxLjUtLjY3IDEuNS0xLjUgMC0uMzktLjE1LS43NC0uMzktMS4wMS0uMjMtLjI2LS4zOC0uNjEtLjM4LS45OSAwLS44My42Ny0xLjUgMS41LTEuNUgxNmMyLjc2IDAgNS0yLjI0IDUtNSAwLTQuNDItNC4wMy04LTktOHptLTUuNSA5Yy0uODMgMC0xLjUtLjY3LTEuNS0xLjVTNS42NyA5IDYuNSA5IDggOS42NyA4IDEwLjUgNy4zMyAxMiA2LjUgMTJ6bTMtNEM4LjY3IDggOCA3LjMzIDggNi41UzguNjcgNSA5LjUgNXMxLjUuNjcgMS41IDEuNVMxMC4zMyA4IDkuNSA4em01IDBjLS44MyAwLTEuNS0uNjctMS41LTEuNVMxMy42NyA1IDE0LjUgNXMxLjUuNjcgMS41IDEuNVMxNS4zMyA4IDE0LjUgOHptMyA0Yy0uODMgMC0xLjUtLjY3LTEuNS0xLjVTMTYuNjcgOSAxNy41IDlzMS41LjY3IDEuNSAxLjUtLjY3IDEuNS0xLjUgMS41eiIvPjwvc3ZnPg==":
+null)],a?60:null),d=b("insert",!0,a?V:null),f([d,e(mxResources.get("delete"),l.actions.get("delete").funct,null,mxResources.get("delete"),l.actions.get("delete"),a?ia:null)],a?60:null),411<=c&&(f([oa,ka],60),520<=c&&(f([pa,640<=c?e("",Q.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +)",Q,ma):null,640<=c?e("",T.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",T,fa):null],60),720<=c))){var k=e("",S.funct,null,mxResources.get("dark"),S,Editor.isDarkMode()?ca:aa);k.style.opacity=
+"0.4";l.addListener("darkModeChanged",mxUtils.bind(this,function(){k.style.backgroundImage="url("+(Editor.isDarkMode()?ca:aa)+")"}));null!=l.statusContainer&&"1"!=urlParams.sketch?p.insertBefore(k,l.statusContainer):p.appendChild(k)}null!=g&&(mxEvent.disableContextMenu(g),mxEvent.addGestureListeners(g,mxUtils.bind(this,function(a){(mxEvent.isShiftDown(a)||mxEvent.isAltDown(a)||mxEvent.isMetaDown(a)||mxEvent.isControlDown(a)||mxEvent.isPopupTrigger(a))&&l.appIconClicked(a)}),null,null));d=l.menus.get("language");
+null!=d&&!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&600<=c&&"1"!=urlParams.sketch?(null==va&&(d=t.addMenu("",d.funct),d.setAttribute("title",mxResources.get("language")),d.className="geToolbarButton",d.style.backgroundImage="url("+Editor.globeImage+")",d.style.backgroundPosition="center center",d.style.backgroundRepeat="no-repeat",d.style.backgroundSize="24px 24px",d.style.position="absolute",d.style.height="24px",d.style.width="24px",d.style.zIndex="1",d.style.right="8px",d.style.cursor="pointer",
+d.style.top="1"==urlParams.embed?"12px":"11px",p.appendChild(d),va=d),l.buttonContainer.style.paddingRight="34px"):(l.buttonContainer.style.paddingRight="4px",null!=va&&(va.parentNode.removeChild(va),va=null))}y.apply(this,arguments);this.doSetDarkMode(null!=urlParams.dark?1==urlParams.dark:mxSettings.settings.darkMode);var k=document.createElement("div");k.style.cssText="position:absolute;left:0px;right:0px;top:0px;overflow-y:auto;overflow-x:hidden;";k.style.bottom="1"!=urlParams.embed||"1"==urlParams.libraries?
+"63px":"32px";this.sidebar=this.createSidebar(k);"1"==urlParams.sketch&&(this.toggleScratchpad(),this.editor.graph.isZoomWheelEvent=function(a){return!mxEvent.isShiftDown(a)&&!mxEvent.isMetaDown(a)&&!mxEvent.isAltDown(a)&&(!mxEvent.isControlDown(a)||mxClient.IS_MAC)});if("1"!=urlParams.sketch&&1E3<=c||null!=urlParams.clibs||null!=urlParams.libs||null!=urlParams["search-shapes"])d(this,!0),null!=this.sidebar&&null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes&&(this.sidebar.searchShapes(urlParams["search-shapes"]),
+this.sidebar.showEntries("search"));this.keyHandler.bindAction(75,!0,"toggleShapes",!0);if("1"==urlParams.sketch||1E3<=c)if(a(this,!0),"1"==urlParams.sketch){this.formatWindow.window.setClosable(!1);var m=this.formatWindow.window.toggleMinimized;this.formatWindow.window.toggleMinimized=function(){m.apply(this,arguments);this.minimized?(this.div.style.width="90px",this.table.style.width="90px",this.div.style.left=parseInt(this.div.style.left)+150+"px"):(this.div.style.width="240px",this.table.style.width=
+"240px",this.div.style.left=parseInt(this.div.style.left)-150+"px");this.fit()};mxEvent.addListener(this.formatWindow.window.title,"dblclick",mxUtils.bind(this,function(a){mxEvent.getSource(a)==this.formatWindow.window.title&&this.formatWindow.window.toggleMinimized()}));this.formatWindow.window.toggleMinimized()}var l=this,n=l.editor.graph;l.toolbar=this.createToolbar(l.createDiv("geToolbar"));l.defaultLibraryName=mxResources.get("untitledLibrary");var p=document.createElement("div");p.className=
+"geMenubarContainer";var q=null,t=new Menubar(l,p);l.statusContainer=l.createStatusContainer();l.statusContainer.style.position="relative";l.statusContainer.style.maxWidth="";l.statusContainer.style.marginTop="7px";l.statusContainer.style.marginLeft="6px";l.statusContainer.style.color="gray";l.statusContainer.style.cursor="default";var u=l.hideCurrentMenu;l.hideCurrentMenu=function(){u.apply(this,arguments);this.editor.graph.popupMenuHandler.hideMenu()};var v=l.descriptorChanged;l.descriptorChanged=
+function(){v.apply(this,arguments);var a=l.getCurrentFile();if(null!=a&&null!=a.getTitle()){var b=a.getMode();"google"==b?b="googleDrive":"github"==b?b="gitHub":"gitlab"==b?b="gitLab":"onedrive"==b&&(b="oneDrive");b=mxResources.get(b);p.setAttribute("title",a.getTitle()+(null!=b?" ("+b+")":""))}else p.removeAttribute("title")};l.setStatusText(l.editor.getStatus());p.appendChild(l.statusContainer);l.buttonContainer=document.createElement("div");l.buttonContainer.style.cssText="position:absolute;right:0px;padding-right:34px;top:10px;white-space:nowrap;padding-top:2px;background-color:inherit;";
+p.appendChild(l.buttonContainer);l.menubarContainer=l.buttonContainer;l.tabContainer=document.createElement("div");l.tabContainer.className="geTabContainer";l.tabContainer.style.cssText="position:absolute;left:0px;right:0px;bottom:0px;height:30px;white-space:nowrap;margin-bottom:-2px;visibility:hidden;";var k=l.diagramContainer.parentNode,z=document.createElement("div");z.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";l.diagramContainer.style.top="1"==urlParams.sketch?
+"0px":"47px";var L=l.menus.get("viewZoom"),V="1"!=urlParams.sketch?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTkgMTNoLTZ2NmgtMnYtNkg1di0yaDZWNWgydjZoNnYyeiIvPjwvc3ZnPg==":"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGVuYWJsZS1iYWNrZ3JvdW5kPSJuZXcgMCAwIDI0IDI0IiBoZWlnaHQ9IjI0cHgiIHZpZXdCb3g9IjAgMCAyNCAyNCIgd2lkdGg9IjI0cHgiIGZpbGw9IiMwMDAwMDAiPjxnPjxwYXRoIGQ9Ik0wLDBoMjR2MjRIMFYweiIgZmlsbD0ibm9uZSIvPjwvZz48Zz48Zz48cGF0aCBkPSJNMywxMWg4VjNIM1YxMXogTTUsNWg0djRINVY1eiIvPjxwYXRoIGQ9Ik0xMywzdjhoOFYzSDEzeiBNMTksOWgtNFY1aDRWOXoiLz48cGF0aCBkPSJNMywyMWg4di04SDNWMjF6IE01LDE1aDR2NEg1VjE1eiIvPjxwb2x5Z29uIHBvaW50cz0iMTgsMTMgMTYsMTMgMTYsMTYgMTMsMTYgMTMsMTggMTYsMTggMTYsMjEgMTgsMjEgMTgsMTggMjEsMTggMjEsMTYgMTgsMTYiLz48L2c+PC9nPjwvc3ZnPg==",
U="1"==urlParams.sketch?document.createElement("div"):null,P="1"==urlParams.sketch?document.createElement("div"):null,W="1"==urlParams.sketch?document.createElement("div"):null;l.addListener("darkModeChanged",mxUtils.bind(this,function(){null!=this.sidebar&&(this.sidebar.graph.stylesheet.styles=mxUtils.clone(n.stylesheet.styles),this.sidebar.container.innerHTML="",this.sidebar.palettes={},this.sidebar.init(),"1"==urlParams.sketch&&(this.scratchpad=null,this.toggleScratchpad()));n.refresh();n.refreshBackgroundImage();
n.view.validateBackground()}));Graph.touchStyle&&(n.panningHandler.isPanningTrigger=function(a){var b=a.getEvent();return null==a.getState()&&!mxEvent.isMouseEvent(b)&&!n.freehand.isDrawing()||mxEvent.isPopupTrigger(b)&&(null==a.getState()||mxEvent.isControlDown(b)||mxEvent.isShiftDown(b))});if(null!=l.hoverIcons){var ha=l.hoverIcons.update;l.hoverIcons.update=function(){n.freehand.isDrawing()||ha.apply(this,arguments)}}if(null!=n.freehand){var ea=n.freehand.createStyle;n.freehand.createStyle=function(a){return ea.apply(this,
arguments)+"sketch=0;"}}if("1"==urlParams.sketch){P.className="geToolbarContainer";U.className="geToolbarContainer";W.className="geToolbarContainer";p.className="geToolbarContainer";l.picker=P;var X=!1;mxEvent.addListener(p,"mouseenter",function(){l.statusContainer.style.display="inline-block"});mxEvent.addListener(p,"mouseleave",function(){X||(l.statusContainer.style.display="none")});var Z=mxUtils.bind(this,function(a){null!=l.notificationBtn&&(null!=a?l.notificationBtn.setAttribute("title",a):
l.notificationBtn.removeAttribute("title"))});"1"!=urlParams.embed&&l.editor.addListener("statusChanged",mxUtils.bind(this,function(){l.setStatusText(l.editor.getStatus());if(0==l.statusContainer.children.length||1==l.statusContainer.children.length&&null==l.statusContainer.firstChild.getAttribute("class")){null!=l.statusContainer.firstChild?Z(l.statusContainer.firstChild.getAttribute("title")):Z(l.editor.getStatus());var a=l.getCurrentFile(),a=null!=a?a.savingStatusKey:DrawioFile.prototype.savingStatusKey;
null!=l.notificationBtn&&l.notificationBtn.getAttribute("title")==mxResources.get(a)+"..."?(l.statusContainer.innerHTML='<img title="'+mxUtils.htmlEntities(mxResources.get(a))+'..."src="'+IMAGE_PATH+'/spin.gif">',l.statusContainer.style.display="inline-block",X=!0):(l.statusContainer.style.display="none",X=!1)}else l.statusContainer.style.display="inline-block",Z(null),X=!0}));R=b("diagram",null,IMAGE_PATH+"/drawlogo.svg");R.style.boxShadow="none";R.style.opacity="0.4";R.style.padding="6px";R.style.margin=
-"0px";W.appendChild(R);l.statusContainer.style.position="";l.statusContainer.style.display="none";l.statusContainer.style.margin="0px";l.statusContainer.style.padding="6px 0px";l.statusContainer.style.maxWidth=Math.min(c-240,280)+"px";l.statusContainer.style.display="inline-block";l.statusContainer.style.textOverflow="ellipsis";l.buttonContainer.style.position="";l.buttonContainer.style.paddingRight="0px";l.buttonContainer.style.display="inline-block";var Y=document.createElement("a");Y.style.padding=
-"0px";Y.style.boxShadow="none";Y.className="geMenuItem";Y.style.display="inline-block";Y.style.width="40px";Y.style.height="12px";Y.style.marginBottom="-2px";Y.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")";Y.style.backgroundPosition="top center";Y.style.backgroundRepeat="no-repeat";Y.setAttribute("title","Minimize");var ga=!1,ba=mxUtils.bind(this,function(){P.innerHTML="";if(!ga){var a=function(a,c,d){a=e("",a.funct,null,c,a,d);a.style.width="40px";return b(a,null,"pointer")},
-b=function(a,b,c){null!=b&&a.setAttribute("title",b);a.style.cursor=null!=c?c:"default";a.style.margin="2px 0px";P.appendChild(a);mxUtils.br(P);return a};b(l.sidebar.createVertexTemplate("text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;",40,20,"Text",mxResources.get("text"),!0,!0,null,!0),mxResources.get("text")+" ("+Editor.ctrlKey+"+Shift+X)");b(l.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;fontSize=24;pointerEvents=1;"+
-("0"!=urlParams.rough?"sketch=1;jiggle=2;":""),140,160,"",mxResources.get("note"),!0,!0,null,!0),mxResources.get("note"));b(l.sidebar.createVertexTemplate("rounded=0;whiteSpace=wrap;html=1;",160,80,"",mxResources.get("rectangle"),!0,!0,null,!0),mxResources.get("rectangle")+" ("+Editor.ctrlKey+"+K)");b(l.sidebar.createVertexTemplate("ellipse;whiteSpace=wrap;html=1;",160,100,"",mxResources.get("ellipse"),!0,!0,null,!0),mxResources.get("ellipse"));(function(){var a=new mxCell("",new mxGeometry(0,0,n.defaultEdgeLength,
-0),"edgeStyle=none;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;endArrow=open;sourcePerimeterSpacing=8;targetPerimeterSpacing=8;fontSize=16;"+("0"!=urlParams.rough?"sketch=1;":""));a.geometry.setTerminalPoint(new mxPoint(0,0),!0);a.geometry.setTerminalPoint(new mxPoint(a.geometry.width,0),!1);a.geometry.points=[];a.geometry.relative=!0;a.edge=!0;b(l.sidebar.createEdgeTemplateFromCells([a],a.geometry.width,a.geometry.height,mxResources.get("line"),!1,null,!0),mxResources.get("line"));
-a=a.clone();a.style+="shape=flexArrow;rounded=1;startSize=8;endSize=8;";a.geometry.width=n.defaultEdgeLength+20;a.geometry.setTerminalPoint(new mxPoint(0,20),!0);a.geometry.setTerminalPoint(new mxPoint(a.geometry.width,20),!1);a=b(l.sidebar.createEdgeTemplateFromCells([a],a.geometry.width,40,mxResources.get("arrow"),!1,null,!0),mxResources.get("arrow"));a.style.borderBottom="1px solid lightgray";a.style.paddingBottom="14px";a.style.marginBottom="14px"})();a(l.actions.get("insertFreehand"),mxResources.get("freehand"),
-"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMjRweCIgZmlsbD0iIzAwMDAwMCI+PHJlY3QgZmlsbD0ibm9uZSIgaGVpZ2h0PSIyNCIgd2lkdGg9IjI0Ii8+PHBhdGggZD0iTTQuNSw4YzEuMDQsMCwyLjM0LTEuNSw0LjI1LTEuNWMxLjUyLDAsMi43NSwxLjIzLDIuNzUsMi43NWMwLDIuMDQtMS45OSwzLjE1LTMuOTEsNC4yMkM1LjQyLDE0LjY3LDQsMTUuNTcsNCwxNyBjMCwxLjEsMC45LDIsMiwydjJjLTIuMjEsMC00LTEuNzktNC00YzAtMi43MSwyLjU2LTQuMTQsNC42Mi01LjI4YzEuNDItMC43OSwyLjg4LTEuNiwyLjg4LTIuNDdjMC0wLjQxLTAuMzQtMC43NS0wLjc1LTAuNzUgQzcuNSw4LjUsNi4yNSwxMCw0LjUsMTBDMy4xMiwxMCwyLDguODgsMiw3LjVDMiw1LjQ1LDQuMTcsMi44Myw1LDJsMS40MSwxLjQxQzUuNDEsNC40Miw0LDYuNDMsNCw3LjVDNCw3Ljc4LDQuMjIsOCw0LjUsOHogTTgsMjEgbDMuNzUsMGw4LjA2LTguMDZsLTMuNzUtMy43NUw4LDE3LjI1TDgsMjF6IE0xMCwxOC4wOGw2LjA2LTYuMDZsMC45MiwwLjkyTDEwLjkyLDE5TDEwLDE5TDEwLDE4LjA4eiBNMjAuMzcsNi4yOSBjLTAuMzktMC4zOS0xLjAyLTAuMzktMS40MSwwbC0xLjgzLDEuODNsMy43NSwzLjc1bDEuODMtMS44M2MwLjM5LTAuMzksMC4zOS0xLjAyLDAtMS40MUwyMC4zNyw2LjI5eiIvPjwvc3ZnPg==");
+"0px";W.appendChild(R);mxEvent.disableContextMenu(R);mxEvent.addGestureListeners(R,mxUtils.bind(this,function(a){(mxEvent.isShiftDown(a)||mxEvent.isAltDown(a)||mxEvent.isMetaDown(a)||mxEvent.isControlDown(a)||mxEvent.isPopupTrigger(a))&&this.appIconClicked(a)}),null,null);l.statusContainer.style.position="";l.statusContainer.style.display="none";l.statusContainer.style.margin="0px";l.statusContainer.style.padding="6px 0px";l.statusContainer.style.maxWidth=Math.min(c-240,280)+"px";l.statusContainer.style.display=
+"inline-block";l.statusContainer.style.textOverflow="ellipsis";l.buttonContainer.style.position="";l.buttonContainer.style.paddingRight="0px";l.buttonContainer.style.display="inline-block";var Y=document.createElement("a");Y.style.padding="0px";Y.style.boxShadow="none";Y.className="geMenuItem";Y.style.display="inline-block";Y.style.width="40px";Y.style.height="12px";Y.style.marginBottom="-2px";Y.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")";Y.style.backgroundPosition="top center";
+Y.style.backgroundRepeat="no-repeat";Y.setAttribute("title","Minimize");var ga=!1,ba=mxUtils.bind(this,function(){P.innerHTML="";if(!ga){var a=function(a,c,d){a=e("",a.funct,null,c,a,d);a.style.width="40px";return b(a,null,"pointer")},b=function(a,b,c){null!=b&&a.setAttribute("title",b);a.style.cursor=null!=c?c:"default";a.style.margin="2px 0px";P.appendChild(a);mxUtils.br(P);return a};b(l.sidebar.createVertexTemplate("text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;",
+40,20,"Text",mxResources.get("text"),!0,!0,null,!0),mxResources.get("text")+" ("+Editor.ctrlKey+"+Shift+X)");b(l.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;fontSize=24;pointerEvents=1;"+("0"!=urlParams.rough?"sketch=1;jiggle=2;":""),140,160,"",mxResources.get("note"),!0,!0,null,!0),mxResources.get("note"));
+b(l.sidebar.createVertexTemplate("rounded=0;whiteSpace=wrap;html=1;",160,80,"",mxResources.get("rectangle"),!0,!0,null,!0),mxResources.get("rectangle")+" ("+Editor.ctrlKey+"+K)");b(l.sidebar.createVertexTemplate("ellipse;whiteSpace=wrap;html=1;",160,100,"",mxResources.get("ellipse"),!0,!0,null,!0),mxResources.get("ellipse"));(function(){var a=new mxCell("",new mxGeometry(0,0,n.defaultEdgeLength,0),"edgeStyle=none;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;endArrow=open;sourcePerimeterSpacing=8;targetPerimeterSpacing=8;fontSize=16;"+
+("0"!=urlParams.rough?"sketch=1;":""));a.geometry.setTerminalPoint(new mxPoint(0,0),!0);a.geometry.setTerminalPoint(new mxPoint(a.geometry.width,0),!1);a.geometry.points=[];a.geometry.relative=!0;a.edge=!0;b(l.sidebar.createEdgeTemplateFromCells([a],a.geometry.width,a.geometry.height,mxResources.get("line"),!1,null,!0),mxResources.get("line"));a=a.clone();a.style+="shape=flexArrow;rounded=1;startSize=8;endSize=8;";a.geometry.width=n.defaultEdgeLength+20;a.geometry.setTerminalPoint(new mxPoint(0,20),
+!0);a.geometry.setTerminalPoint(new mxPoint(a.geometry.width,20),!1);a=b(l.sidebar.createEdgeTemplateFromCells([a],a.geometry.width,40,mxResources.get("arrow"),!1,null,!0),mxResources.get("arrow"));a.style.borderBottom="1px solid "+(Editor.isDarkMode()?"#505050":"lightgray");a.style.paddingBottom="14px";a.style.marginBottom="14px"})();a(l.actions.get("insertFreehand"),mxResources.get("freehand"),"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMjRweCIgZmlsbD0iIzAwMDAwMCI+PHJlY3QgZmlsbD0ibm9uZSIgaGVpZ2h0PSIyNCIgd2lkdGg9IjI0Ii8+PHBhdGggZD0iTTQuNSw4YzEuMDQsMCwyLjM0LTEuNSw0LjI1LTEuNWMxLjUyLDAsMi43NSwxLjIzLDIuNzUsMi43NWMwLDIuMDQtMS45OSwzLjE1LTMuOTEsNC4yMkM1LjQyLDE0LjY3LDQsMTUuNTcsNCwxNyBjMCwxLjEsMC45LDIsMiwydjJjLTIuMjEsMC00LTEuNzktNC00YzAtMi43MSwyLjU2LTQuMTQsNC42Mi01LjI4YzEuNDItMC43OSwyLjg4LTEuNiwyLjg4LTIuNDdjMC0wLjQxLTAuMzQtMC43NS0wLjc1LTAuNzUgQzcuNSw4LjUsNi4yNSwxMCw0LjUsMTBDMy4xMiwxMCwyLDguODgsMiw3LjVDMiw1LjQ1LDQuMTcsMi44Myw1LDJsMS40MSwxLjQxQzUuNDEsNC40Miw0LDYuNDMsNCw3LjVDNCw3Ljc4LDQuMjIsOCw0LjUsOHogTTgsMjEgbDMuNzUsMGw4LjA2LTguMDZsLTMuNzUtMy43NUw4LDE3LjI1TDgsMjF6IE0xMCwxOC4wOGw2LjA2LTYuMDZsMC45MiwwLjkyTDEwLjkyLDE5TDEwLDE5TDEwLDE4LjA4eiBNMjAuMzcsNi4yOSBjLTAuMzktMC4zOS0xLjAyLTAuMzktMS40MSwwbC0xLjgzLDEuODNsMy43NSwzLjc1bDEuODMtMS44M2MwLjM5LTAuMzksMC4zOS0xLjAyLDAtMS40MUwyMC4zNyw2LjI5eiIvPjwvc3ZnPg==");
var c=l.actions.get("toggleShapes");a(c,mxResources.get("shapes")+" ("+c.shortcut+")",V);a(l.actions.get("insertTemplate"),mxResources.get("template"),"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMjRweCIgZmlsbD0iIzAwMDAwMCI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTEzIDExaC0ydjNIOHYyaDN2M2gydi0zaDN2LTJoLTN6bTEtOUg2Yy0xLjEgMC0yIC45LTIgMnYxNmMwIDEuMS44OSAyIDEuOTkgMkgxOGMxLjEgMCAyLS45IDItMlY4bC02LTZ6bTQgMThINlY0aDd2NWg1djExeiIvPjwvc3ZnPg==")}P.appendChild(Y)});
mxEvent.addListener(Y,"click",mxUtils.bind(this,function(){ga?(mxUtils.setPrefixedStyle(P.style,"transform","translate(0, -50%)"),P.style.padding="8px 6px 4px",P.style.top="50%",P.style.bottom="",P.style.height="",Y.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",Y.style.width="40px",Y.style.height="12px",Y.setAttribute("title","Minimize"),ga=!1,ba()):(P.innerHTML="",P.appendChild(Y),mxUtils.setPrefixedStyle(P.style,"transform","translate(0, 0)"),P.style.top="",P.style.bottom="12px",
P.style.padding="0px",P.style.height="24px",Y.style.height="24px",Y.style.backgroundImage="url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTkgMTNoLTZ2NmgtMnYtNkg1di0yaDZWNWgydjZoNnYyeiIvPjwvc3ZnPg==)",Y.setAttribute("title",mxResources.get("insert")),Y.style.width="24px",ga=!0)}));ba();l.addListener("darkModeChanged",mxUtils.bind(this,function(){ba()}))}else l.editor.addListener("statusChanged",
@@ -11869,22 +11873,22 @@ R.style.visibility="hidden",R.style.textAlign="center",R.style.cursor="pointer",
function(){R.innerHTML=Math.round(100*l.editor.graph.view.scale)+"%"});l.editor.graph.view.addListener(mxEvent.EVENT_SCALE,na);l.editor.addListener("resetGraphView",na);l.editor.addListener("pageSelected",na);var ua=l.setGraphEnabled;l.setGraphEnabled=function(){ua.apply(this,arguments);null!=this.tabContainer&&(R.style.visibility=this.tabContainer.style.visibility,this.diagramContainer.style.bottom="hidden"!=this.tabContainer.style.visibility&&null==U?this.tabContainerHeight+"px":"0px")}}z.appendChild(p);
z.appendChild(l.diagramContainer);k.appendChild(z);l.updateTabContainer();null==U&&z.appendChild(l.tabContainer);var va=null;g();mxEvent.addListener(window,"resize",function(){g();null!=l.sidebarWindow&&l.sidebarWindow.window.fit();null!=l.formatWindow&&l.formatWindow.window.fit();null!=l.actions.outlineWindow&&l.actions.outlineWindow.window.fit();null!=l.actions.layersWindow&&l.actions.layersWindow.window.fit();null!=l.menus.tagsWindow&&l.menus.tagsWindow.window.fit();null!=l.menus.findWindow&&l.menus.findWindow.window.fit();
null!=l.menus.findReplaceWindow&&l.menus.findReplaceWindow.window.fit()})}}};(function(){var a=!1;"min"!=uiTheme||a||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),a=!0);var d=EditorUi.initTheme;EditorUi.initTheme=function(){d.apply(this,arguments);"min"!=uiTheme||a||(this.initMinimalTheme(),a=!0)}})();(function(){var a=mxGuide.prototype.move;mxGuide.prototype.move=function(b,c,d,m){var e=c.y,f=c.x,g=!1,n=!1;if(null!=this.states&&null!=b&&null!=c){var p=this,q=new mxCellState,u=this.graph.getView().scale,t=Math.max(2,this.getGuideTolerance()/2);q.x=b.x+f;q.y=b.y+e;q.width=b.width;q.height=b.height;for(var v=[],z=[],y=0;y<this.states.length;y++){var x=this.states[y];x instanceof mxCellState&&(m||!this.graph.isCellSelected(x.cell))&&((q.x>=x.x&&q.x<=x.x+x.width||x.x>=q.x&&x.x<=q.x+q.width)&&(q.y>
-x.y+x.height+4||q.y+q.height+4<x.y)?v.push(x):(q.y>=x.y&&q.y<=x.y+x.height||x.y>=q.y&&x.y<=q.y+q.height)&&(q.x>x.x+x.width+4||q.x+q.width+4<x.x)&&z.push(x))}var A=0,B=0,C=x=0,D=0,G=0,E=0,F=0,K=5*u;if(1<v.length){v.push(q);v.sort(function(a,b){return a.y-b.y});var M=!1,y=q==v[0],u=q==v[v.length-1];if(!y&&!u)for(y=1;y<v.length-1;y++)if(q==v[y]){u=v[y-1];y=v[y+1];x=B=C=(y.y-u.y-u.height-q.height)/2;break}for(y=0;y<v.length-1;y++){var u=v[y],J=v[y+1],I=q==u||q==J,J=J.y-u.y-u.height,M=M|q==u;if(0==B&&
-0==A)B=J,A=1;else if(Math.abs(B-J)<=(I||1==y&&M?t:0))A+=1;else if(1<A&&M){v=v.slice(0,y+1);break}else if(3<=v.length-y&&!M)A=0,x=B=0!=C?C:0,v.splice(0,0==y?1:y),y=-1;else break;0!=x||I||(B=x=J)}3==v.length&&v[1]==q&&(x=0)}if(1<z.length){z.push(q);z.sort(function(a,b){return a.x-b.x});M=!1;y=q==z[0];u=q==z[z.length-1];if(!y&&!u)for(y=1;y<z.length-1;y++)if(q==z[y]){u=z[y-1];y=z[y+1];E=G=F=(y.x-u.x-u.width-q.width)/2;break}for(y=0;y<z.length-1;y++){u=z[y];J=z[y+1];I=q==u||q==J;J=J.x-u.x-u.width;M|=q==
-u;if(0==G&&0==D)G=J,D=1;else if(Math.abs(G-J)<=(I||1==y&&M?t:0))D+=1;else if(1<D&&M){z=z.slice(0,y+1);break}else if(3<=z.length-y&&!M)D=0,E=G=0!=F?F:0,z.splice(0,0==y?1:y),y=-1;else break;0!=E||I||(G=E=J)}3==z.length&&z[1]==q&&(E=0)}t=function(a,b,c,d){var e=[],f;d?(d=K,f=0):(d=0,f=K);e.push(new mxPoint(a.x-d,a.y-f));e.push(new mxPoint(a.x+d,a.y+f));e.push(a);e.push(b);e.push(new mxPoint(b.x-d,b.y-f));e.push(new mxPoint(b.x+d,b.y+f));if(null!=c)return c.points=e,c;a=new mxPolyline(e,mxConstants.GUIDE_COLOR,
+x.y+x.height+4||q.y+q.height+4<x.y)?v.push(x):(q.y>=x.y&&q.y<=x.y+x.height||x.y>=q.y&&x.y<=q.y+q.height)&&(q.x>x.x+x.width+4||q.x+q.width+4<x.x)&&z.push(x))}var A=0,B=0,C=x=0,D=0,G=0,E=0,F=0,J=5*u;if(1<v.length){v.push(q);v.sort(function(a,b){return a.y-b.y});var M=!1,y=q==v[0],u=q==v[v.length-1];if(!y&&!u)for(y=1;y<v.length-1;y++)if(q==v[y]){u=v[y-1];y=v[y+1];x=B=C=(y.y-u.y-u.height-q.height)/2;break}for(y=0;y<v.length-1;y++){var u=v[y],K=v[y+1],I=q==u||q==K,K=K.y-u.y-u.height,M=M|q==u;if(0==B&&
+0==A)B=K,A=1;else if(Math.abs(B-K)<=(I||1==y&&M?t:0))A+=1;else if(1<A&&M){v=v.slice(0,y+1);break}else if(3<=v.length-y&&!M)A=0,x=B=0!=C?C:0,v.splice(0,0==y?1:y),y=-1;else break;0!=x||I||(B=x=K)}3==v.length&&v[1]==q&&(x=0)}if(1<z.length){z.push(q);z.sort(function(a,b){return a.x-b.x});M=!1;y=q==z[0];u=q==z[z.length-1];if(!y&&!u)for(y=1;y<z.length-1;y++)if(q==z[y]){u=z[y-1];y=z[y+1];E=G=F=(y.x-u.x-u.width-q.width)/2;break}for(y=0;y<z.length-1;y++){u=z[y];K=z[y+1];I=q==u||q==K;K=K.x-u.x-u.width;M|=q==
+u;if(0==G&&0==D)G=K,D=1;else if(Math.abs(G-K)<=(I||1==y&&M?t:0))D+=1;else if(1<D&&M){z=z.slice(0,y+1);break}else if(3<=z.length-y&&!M)D=0,E=G=0!=F?F:0,z.splice(0,0==y?1:y),y=-1;else break;0!=E||I||(G=E=K)}3==z.length&&z[1]==q&&(E=0)}t=function(a,b,c,d){var e=[],f;d?(d=J,f=0):(d=0,f=J);e.push(new mxPoint(a.x-d,a.y-f));e.push(new mxPoint(a.x+d,a.y+f));e.push(a);e.push(b);e.push(new mxPoint(b.x-d,b.y-f));e.push(new mxPoint(b.x+d,b.y+f));if(null!=c)return c.points=e,c;a=new mxPolyline(e,mxConstants.GUIDE_COLOR,
mxConstants.GUIDE_STROKEWIDTH);a.dialect=mxConstants.DIALECT_SVG;a.pointerEvents=!1;a.init(p.graph.getView().getOverlayPane());return a};G=function(a,b){if(a&&null!=p.guidesArrHor)for(var c=0;c<p.guidesArrHor.length;c++)p.guidesArrHor[c].node.style.visibility="hidden";if(b&&null!=p.guidesArrVer)for(c=0;c<p.guidesArrVer.length;c++)p.guidesArrVer[c].node.style.visibility="hidden"};if(1<D&&D==z.length-1){D=[];F=p.guidesArrHor;g=[];f=0;y=z[0]==q?1:0;M=z[y].y+z[y].height;if(0<E)for(y=0;y<z.length-1;y++)u=
-z[y],J=z[y+1],q==u?(f=J.x-u.width-E,g.push(new mxPoint(f+u.width+K,M)),g.push(new mxPoint(J.x-K,M))):q==J?(g.push(new mxPoint(u.x+u.width+K,M)),f=u.x+u.width+E,g.push(new mxPoint(f-K,M))):(g.push(new mxPoint(u.x+u.width+K,M)),g.push(new mxPoint(J.x-K,M)));else u=z[0],y=z[2],f=u.x+u.width+(y.x-u.x-u.width-q.width)/2,g.push(new mxPoint(u.x+u.width+K,M)),g.push(new mxPoint(f-K,M)),g.push(new mxPoint(f+q.width+K,M)),g.push(new mxPoint(y.x-K,M));for(y=0;y<g.length;y+=2)z=g[y],E=g[y+1],z=t(z,E,null!=F?
-F[y/2]:null),z.node.style.visibility="visible",z.redraw(),D.push(z);for(y=g.length/2;null!=F&&y<F.length;y++)F[y].destroy();p.guidesArrHor=D;f-=b.x;g=!0}else G(!0);if(1<A&&A==v.length-1){D=[];F=p.guidesArrVer;n=[];e=0;y=v[0]==q?1:0;A=v[y].x+v[y].width;if(0<x)for(y=0;y<v.length-1;y++)u=v[y],J=v[y+1],q==u?(e=J.y-u.height-x,n.push(new mxPoint(A,e+u.height+K)),n.push(new mxPoint(A,J.y-K))):q==J?(n.push(new mxPoint(A,u.y+u.height+K)),e=u.y+u.height+x,n.push(new mxPoint(A,e-K))):(n.push(new mxPoint(A,u.y+
-u.height+K)),n.push(new mxPoint(A,J.y-K)));else u=v[0],y=v[2],e=u.y+u.height+(y.y-u.y-u.height-q.height)/2,n.push(new mxPoint(A,u.y+u.height+K)),n.push(new mxPoint(A,e-K)),n.push(new mxPoint(A,e+q.height+K)),n.push(new mxPoint(A,y.y-K));for(y=0;y<n.length;y+=2)z=n[y],E=n[y+1],z=t(z,E,null!=F?F[y/2]:null,!0),z.node.style.visibility="visible",z.redraw(),D.push(z);for(y=n.length/2;null!=F&&y<F.length;y++)F[y].destroy();p.guidesArrVer=D;e-=b.y;n=!0}else G(!1,!0)}if(g||n)return q=new mxPoint(f,e),v=a.call(this,
+z[y],K=z[y+1],q==u?(f=K.x-u.width-E,g.push(new mxPoint(f+u.width+J,M)),g.push(new mxPoint(K.x-J,M))):q==K?(g.push(new mxPoint(u.x+u.width+J,M)),f=u.x+u.width+E,g.push(new mxPoint(f-J,M))):(g.push(new mxPoint(u.x+u.width+J,M)),g.push(new mxPoint(K.x-J,M)));else u=z[0],y=z[2],f=u.x+u.width+(y.x-u.x-u.width-q.width)/2,g.push(new mxPoint(u.x+u.width+J,M)),g.push(new mxPoint(f-J,M)),g.push(new mxPoint(f+q.width+J,M)),g.push(new mxPoint(y.x-J,M));for(y=0;y<g.length;y+=2)z=g[y],E=g[y+1],z=t(z,E,null!=F?
+F[y/2]:null),z.node.style.visibility="visible",z.redraw(),D.push(z);for(y=g.length/2;null!=F&&y<F.length;y++)F[y].destroy();p.guidesArrHor=D;f-=b.x;g=!0}else G(!0);if(1<A&&A==v.length-1){D=[];F=p.guidesArrVer;n=[];e=0;y=v[0]==q?1:0;A=v[y].x+v[y].width;if(0<x)for(y=0;y<v.length-1;y++)u=v[y],K=v[y+1],q==u?(e=K.y-u.height-x,n.push(new mxPoint(A,e+u.height+J)),n.push(new mxPoint(A,K.y-J))):q==K?(n.push(new mxPoint(A,u.y+u.height+J)),e=u.y+u.height+x,n.push(new mxPoint(A,e-J))):(n.push(new mxPoint(A,u.y+
+u.height+J)),n.push(new mxPoint(A,K.y-J)));else u=v[0],y=v[2],e=u.y+u.height+(y.y-u.y-u.height-q.height)/2,n.push(new mxPoint(A,u.y+u.height+J)),n.push(new mxPoint(A,e-J)),n.push(new mxPoint(A,e+q.height+J)),n.push(new mxPoint(A,y.y-J));for(y=0;y<n.length;y+=2)z=n[y],E=n[y+1],z=t(z,E,null!=F?F[y/2]:null,!0),z.node.style.visibility="visible",z.redraw(),D.push(z);for(y=n.length/2;null!=F&&y<F.length;y++)F[y].destroy();p.guidesArrVer=D;e-=b.y;n=!0}else G(!1,!0)}if(g||n)return q=new mxPoint(f,e),v=a.call(this,
b,q,d,m),g&&!n?q.y=v.y:n&&!g&&(q.x=v.x),v.y!=q.y&&null!=this.guideY&&null!=this.guideY.node&&(this.guideY.node.style.visibility="hidden"),v.x!=q.x&&null!=this.guideX&&null!=this.guideX.node&&(this.guideX.node.style.visibility="hidden"),q;G(!0,!0);return a.apply(this,arguments)};var d=mxGuide.prototype.setVisible;mxGuide.prototype.setVisible=function(a){d.call(this,a);var b=this.guidesArrVer,c=this.guidesArrHor;if(null!=b)for(var m=0;m<b.length;m++)b[m].node.style.visibility=a?"visible":"hidden";if(null!=
-c)for(m=0;m<c.length;m++)c[m].node.style.visibility=a?"visible":"hidden"};var c=mxGuide.prototype.destroy;mxGuide.prototype.destroy=function(){c.call(this);var a=this.guidesArrVer,d=this.guidesArrHor;if(null!=a){for(var g=0;g<a.length;g++)a[g].destroy();this.guidesArrVer=null}if(null!=d){for(g=0;g<d.length;g++)d[g].destroy();this.guidesArrHor=null}}})();function mxRuler(a,d,c,b){function f(){var b=a.diagramContainer;p.style.top=b.offsetTop-k+"px";p.style.left=b.offsetLeft-k+"px";p.style.width=(c?0:b.offsetWidth)+k+"px";p.style.height=(c?b.offsetHeight:0)+k+"px"}function g(a,b,c){if(null!=m)return a;var d;return function(){var e=this,f=arguments,g=c&&!d;clearTimeout(d);d=setTimeout(function(){d=null;c||a.apply(e,f)},b);g&&a.apply(e,f)}}var m=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame,
+c)for(m=0;m<c.length;m++)c[m].node.style.visibility=a?"visible":"hidden"};var c=mxGuide.prototype.destroy;mxGuide.prototype.destroy=function(){c.call(this);var a=this.guidesArrVer,d=this.guidesArrHor;if(null!=a){for(var f=0;f<a.length;f++)a[f].destroy();this.guidesArrVer=null}if(null!=d){for(f=0;f<d.length;f++)d[f].destroy();this.guidesArrHor=null}}})();function mxRuler(a,d,c,b){function g(){var b=a.diagramContainer;p.style.top=b.offsetTop-k+"px";p.style.left=b.offsetLeft-k+"px";p.style.width=(c?0:b.offsetWidth)+k+"px";p.style.height=(c?b.offsetHeight:0)+k+"px"}function f(a,b,c){if(null!=m)return a;var d;return function(){var e=this,f=arguments,g=c&&!d;clearTimeout(d);d=setTimeout(function(){d=null;c||a.apply(e,f)},b);g&&a.apply(e,f)}}var m=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame,
e=window.cancelAnimationFrame||window.mozCancelAnimationFrame,k=this.RULER_THICKNESS,l=this;this.unit=d;var n=Editor.isDarkMode()?{bkgClr:"#202020",outBkgClr:"#2a2a2a",cornerClr:"#2a2a2a",strokeClr:"#505759",fontClr:"#BBBBBB",guideClr:"#0088cf"}:{bkgClr:"#ffffff",outBkgClr:"#e8e9ed",cornerClr:"#fbfbfb",strokeClr:"#dadce0",fontClr:"#BBBBBB",guideClr:"#0000BB"},p=document.createElement("div");p.style.position="absolute";this.updateStyle=mxUtils.bind(this,function(){n=Editor.isDarkMode()?{bkgClr:"#202020",
outBkgClr:"#2a2a2a",cornerClr:"#2a2a2a",strokeClr:"#505759",fontClr:"#BBBBBB",guideClr:"#0088cf"}:{bkgClr:"#ffffff",outBkgClr:"#e8e9ed",cornerClr:"#fbfbfb",strokeClr:"#dadce0",fontClr:"#BBBBBB",guideClr:"#0000BB"};p.style.background=n.bkgClr;p.style[c?"borderRight":"borderBottom"]="0.5px solid "+n.strokeClr;p.style.borderLeft="0.5px solid "+n.strokeClr});this.updateStyle();document.body.appendChild(p);mxEvent.disableContextMenu(p);this.editorUiRefresh=a.refresh;a.refresh=function(b){l.editorUiRefresh.apply(a,
-arguments);f()};f();var q=document.createElement("canvas");q.width=p.offsetWidth;q.height=p.offsetHeight;p.style.overflow="hidden";q.style.position="relative";p.appendChild(q);var u=q.getContext("2d");this.ui=a;var t=a.editor.graph;this.graph=t;this.container=p;this.canvas=q;var v=function(a,b,d,e,f){a=Math.round(a);b=Math.round(b);d=Math.round(d);e=Math.round(e);u.beginPath();u.moveTo(a+.5,b+.5);u.lineTo(d+.5,e+.5);u.stroke();f&&(c?(u.save(),u.translate(a,b),u.rotate(-Math.PI/2),u.fillText(f,0,0),
+arguments);g()};g();var q=document.createElement("canvas");q.width=p.offsetWidth;q.height=p.offsetHeight;p.style.overflow="hidden";q.style.position="relative";p.appendChild(q);var u=q.getContext("2d");this.ui=a;var t=a.editor.graph;this.graph=t;this.container=p;this.canvas=q;var v=function(a,b,d,e,f){a=Math.round(a);b=Math.round(b);d=Math.round(d);e=Math.round(e);u.beginPath();u.moveTo(a+.5,b+.5);u.lineTo(d+.5,e+.5);u.stroke();f&&(c?(u.save(),u.translate(a,b),u.rotate(-Math.PI/2),u.fillText(f,0,0),
u.restore()):u.fillText(f,a,b))},z=function(){u.clearRect(0,0,q.width,q.height);u.beginPath();u.lineWidth=.7;u.strokeStyle=n.strokeClr;u.setLineDash([]);u.font="9px Arial";u.textAlign="center";var a=t.view.scale,b=t.view.getBackgroundPageBounds(),d=t.view.translate,e=t.pageVisible,d=e?k+(c?b.y-t.container.scrollTop:b.x-t.container.scrollLeft):k+(c?d.y*a-t.container.scrollTop:d.x*a-t.container.scrollLeft),f=0;e&&(f=t.getPageLayout(),f=c?f.y*t.pageFormat.height:f.x*t.pageFormat.width);var g,m,p;switch(l.unit){case mxConstants.POINTS:g=
p=10;m=[3,5,5,5,5,10,5,5,5,5];break;case mxConstants.MILLIMETERS:p=10;g=mxConstants.PIXELS_PER_MM;m=[5,3,3,3,3,6,3,3,3,3];break;case mxConstants.INCHES:p=.5>=a||4<=a?8:16,g=mxConstants.PIXELS_PER_INCH/p,m=[5,3,5,3,7,3,5,3,7,3,5,3,7,3,5,3]}var x=g;2<=a?x=g/(2*Math.floor(a/2)):.5>=a&&(x=g*Math.floor(1/a/2)*(l.unit==mxConstants.MILLIMETERS?2:1));g=null;b=e?Math.min(d+(c?b.height:b.width),c?q.height:q.width):c?q.height:q.width;if(e)if(u.fillStyle=n.outBkgClr,c){var y=d-k;0<y&&u.fillRect(0,k,k,y);b<q.height&&
-u.fillRect(0,b,k,q.height)}else y=d-k,0<y&&u.fillRect(k,0,y,k),b<q.width&&u.fillRect(b,0,q.width,k);u.fillStyle=n.fontClr;for(e=e?d:d%(x*a);e<=b;e+=x*a)if(y=Math.round((e-d)/a/x),!(e<k||y==g)){g=y;var z=null;0==y%p&&(z=l.formatText(f+y*x)+"");c?v(k-m[Math.abs(y)%p],e,k,e,z):v(e,k-m[Math.abs(y)%p],e,k,z)}u.lineWidth=1;v(c?0:k,c?k:0,k,k);u.fillStyle=n.cornerClr;u.fillRect(0,0,k,k)},y=-1,x=function(){null!=m?(null!=e&&e(y),y=m(z)):z()};this.drawRuler=x;this.sizeListener=d=g(function(){var a=t.container;
-c?(a=a.offsetHeight+k,q.height!=a&&(q.height=a,p.style.height=a+"px",x())):(a=a.offsetWidth+k,q.width!=a&&(q.width=a,p.style.width=a+"px",x()))},10);this.pageListener=function(){x()};this.scrollListener=b=g(function(){var a=c?t.container.scrollTop:t.container.scrollLeft;l.lastScroll!=a&&(l.lastScroll=a,x())},10);this.unitListener=function(a,b){l.setUnit(b.getProperty("unit"))};t.addListener(mxEvent.SIZE,d);t.container.addEventListener("scroll",b);t.view.addListener("unitChanged",this.unitListener);
+u.fillRect(0,b,k,q.height)}else y=d-k,0<y&&u.fillRect(k,0,y,k),b<q.width&&u.fillRect(b,0,q.width,k);u.fillStyle=n.fontClr;for(e=e?d:d%(x*a);e<=b;e+=x*a)if(y=Math.round((e-d)/a/x),!(e<k||y==g)){g=y;var z=null;0==y%p&&(z=l.formatText(f+y*x)+"");c?v(k-m[Math.abs(y)%p],e,k,e,z):v(e,k-m[Math.abs(y)%p],e,k,z)}u.lineWidth=1;v(c?0:k,c?k:0,k,k);u.fillStyle=n.cornerClr;u.fillRect(0,0,k,k)},y=-1,x=function(){null!=m?(null!=e&&e(y),y=m(z)):z()};this.drawRuler=x;this.sizeListener=d=f(function(){var a=t.container;
+c?(a=a.offsetHeight+k,q.height!=a&&(q.height=a,p.style.height=a+"px",x())):(a=a.offsetWidth+k,q.width!=a&&(q.width=a,p.style.width=a+"px",x()))},10);this.pageListener=function(){x()};this.scrollListener=b=f(function(){var a=c?t.container.scrollTop:t.container.scrollLeft;l.lastScroll!=a&&(l.lastScroll=a,x())},10);this.unitListener=function(a,b){l.setUnit(b.getProperty("unit"))};t.addListener(mxEvent.SIZE,d);t.container.addEventListener("scroll",b);t.view.addListener("unitChanged",this.unitListener);
a.addListener("pageViewChanged",this.pageListener);a.addListener("pageScaleChanged",this.pageListener);a.addListener("pageFormatChanged",this.pageListener);this.setStyle=function(a){n=a;p.style.background=n.bkgClr;z()};this.origGuideMove=mxGuide.prototype.move;mxGuide.prototype.move=function(a,b,d,e){var f;if(c&&4<a.height||!c&&4<a.width){if(null!=l.guidePart)try{u.putImageData(l.guidePart.imgData1,l.guidePart.x1,l.guidePart.y1),u.putImageData(l.guidePart.imgData2,l.guidePart.x2,l.guidePart.y2),u.putImageData(l.guidePart.imgData3,
l.guidePart.x3,l.guidePart.y3)}catch(V){}f=l.origGuideMove.apply(this,arguments);try{var g,m,p,q,t,x,y,z,A;u.lineWidth=.5;u.strokeStyle=n.guideClr;u.setLineDash([2]);c?(m=a.y+f.y+k-this.graph.container.scrollTop,g=0,t=m+a.height/2,q=k/2,z=m+a.height,y=0,p=u.getImageData(g,m-1,k,3),v(g,m,k,m),m--,x=u.getImageData(q,t-1,k,3),v(q,t,k,t),t--,A=u.getImageData(y,z-1,k,3),v(y,z,k,z),z--):(m=0,g=a.x+f.x+k-this.graph.container.scrollLeft,t=k/2,q=g+a.width/2,z=0,y=g+a.width,p=u.getImageData(g-1,m,3,k),v(g,
m,g,k),g--,x=u.getImageData(q-1,t,3,k),v(q,t,q,k),q--,A=u.getImageData(y-1,z,3,k),v(y,z,y,k),y--);if(null==l.guidePart||l.guidePart.x1!=g||l.guidePart.y1!=m)l.guidePart={imgData1:p,x1:g,y1:m,imgData2:x,x2:q,y2:t,imgData3:A,x3:y,y3:z}}catch(V){}}else f=l.origGuideMove.apply(this,arguments);return f};this.origGuideDestroy=mxGuide.prototype.destroy;mxGuide.prototype.destroy=function(){var a=l.origGuideDestroy.apply(this,arguments);if(null!=l.guidePart)try{u.putImageData(l.guidePart.imgData1,l.guidePart.x1,
@@ -11895,13 +11899,13 @@ this.pageListener);null!=this.container&&this.container.parentNode.removeChild(t
function mxDualRuler(a,d){var c=new mxPoint(mxRuler.prototype.RULER_THICKNESS,mxRuler.prototype.RULER_THICKNESS);this.editorUiGetDiagContOffset=a.getDiagramContainerOffset;a.getDiagramContainerOffset=function(){return c};this.editorUiRefresh=a.refresh;this.ui=a;this.origGuideMove=mxGuide.prototype.move;this.origGuideDestroy=mxGuide.prototype.destroy;this.vRuler=new mxRuler(a,d,!0);this.hRuler=new mxRuler(a,d,!1,!0);var b=mxUtils.bind(this,function(b){var c=!1;mxEvent.addGestureListeners(b,mxUtils.bind(this,
function(b){c=null!=a.currentMenu;mxEvent.consume(b)}),null,mxUtils.bind(this,function(d){if(a.editor.graph.isEnabled()&&!a.editor.graph.isMouseDown&&(mxEvent.isTouchEvent(d)||mxEvent.isPopupTrigger(d))){a.editor.graph.popupMenuHandler.hideMenu();a.hideCurrentMenu();if(!mxEvent.isTouchEvent(d)||!c){var e=new mxPopupMenu(mxUtils.bind(this,function(b,c){a.menus.addMenuItems(b,["points","millimeters"],c)}));e.div.className+=" geMenubarMenu";e.smartSeparators=!0;e.showDisabled=!0;e.autoExpand=!0;e.hideMenu=
mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(e,arguments);a.resetCurrentMenu();e.destroy()});var f=mxEvent.getClientX(d),g=mxEvent.getClientY(d);e.popup(f,g,null,d);a.setCurrentMenu(e,b)}mxEvent.consume(d)}}))});b(this.hRuler.container);b(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(a){this.vRuler.setUnit(a);this.hRuler.setUnit(a)};mxDualRuler.prototype.setStyle=function(a){this.vRuler.setStyle(a);this.hRuler.setStyle(a)};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(a){var d=null!=a.view&&null!=a.view.canvas?a.view.canvas.ownerSVGElement:null;if(null!=a.container&&null!=d){a.addListener(mxEvent.ESCAPE,mxUtils.bind(this,function(){this.stopDrawing()}));var c=mxFreehand.prototype.NORMAL_SMOOTHING,b=null,f=[],g,m=[],e,k=!1,l=!0,n=!0,p=!0,q=!0,u=[],t=!1,v=!0;this.setClosedPath=function(a){k=a};this.setAutoClose=function(a){l=a};this.setAutoInsert=function(a){n=a};this.setAutoScroll=function(a){p=a};this.setOpenFill=function(a){q=a};this.setStopClickEnabled=
-function(a){v=a};this.setSmoothing=function(a){c=a};var z=function(b){t=b;a.getRubberband().setEnabled(!b);a.graphHandler.setSelectEnabled(!b);a.graphHandler.setMoveEnabled(!b);a.container.style.cursor=b?"crosshair":"";a.fireEvent(new mxEventObject("freehandStateChanged"))};this.startDrawing=function(){z(!0)};this.isDrawing=function(){return t};var y=mxUtils.bind(this,function(a){if(b){var c=e.length,d=v&&0<m.length&&null!=e&&2>e.length;d||m.push.apply(m,e);e=[];m.push(null);f.push(b);b=null;(d||
-n)&&this.stopDrawing();n&&2<=c&&this.startDrawing();mxEvent.consume(a)}});this.createStyle=function(a){return mxConstants.STYLE_SHAPE+"="+a+";fillColor=none;"};this.stopDrawing=function(){if(0<f.length){for(var c=m[0].x,d=m[0].x,e=m[0].y,g=m[0].y,n=1;n<m.length;n++)null!=m[n]&&(c=Math.max(c,m[n].x),d=Math.min(d,m[n].x),e=Math.max(e,m[n].y),g=Math.min(g,m[n].y));c-=d;e-=g;if(0<c&&0<e){var p=100/c,t=100/e;m.map(function(a){if(null==a)return a;a.x=(a.x-d)*p;a.y=(a.y-g)*t;return a});for(var u='<shape strokewidth="inherit"><foreground>',
+mxDualRuler.prototype.setUnit=function(a){this.vRuler.setUnit(a);this.hRuler.setUnit(a)};mxDualRuler.prototype.setStyle=function(a){this.vRuler.setStyle(a);this.hRuler.setStyle(a)};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(a){var d=null!=a.view&&null!=a.view.canvas?a.view.canvas.ownerSVGElement:null;if(null!=a.container&&null!=d){a.addListener(mxEvent.ESCAPE,mxUtils.bind(this,function(){this.stopDrawing()}));var c=mxFreehand.prototype.NORMAL_SMOOTHING,b=null,g=[],f,m=[],e,k=!1,l=!0,n=!0,p=!0,q=!0,u=[],t=!1,v=!0;this.setClosedPath=function(a){k=a};this.setAutoClose=function(a){l=a};this.setAutoInsert=function(a){n=a};this.setAutoScroll=function(a){p=a};this.setOpenFill=function(a){q=a};this.setStopClickEnabled=
+function(a){v=a};this.setSmoothing=function(a){c=a};var z=function(b){t=b;a.getRubberband().setEnabled(!b);a.graphHandler.setSelectEnabled(!b);a.graphHandler.setMoveEnabled(!b);a.container.style.cursor=b?"crosshair":"";a.fireEvent(new mxEventObject("freehandStateChanged"))};this.startDrawing=function(){z(!0)};this.isDrawing=function(){return t};var y=mxUtils.bind(this,function(a){if(b){var c=e.length,d=v&&0<m.length&&null!=e&&2>e.length;d||m.push.apply(m,e);e=[];m.push(null);g.push(b);b=null;(d||
+n)&&this.stopDrawing();n&&2<=c&&this.startDrawing();mxEvent.consume(a)}});this.createStyle=function(a){return mxConstants.STYLE_SHAPE+"="+a+";fillColor=none;"};this.stopDrawing=function(){if(0<g.length){for(var c=m[0].x,d=m[0].x,e=m[0].y,f=m[0].y,n=1;n<m.length;n++)null!=m[n]&&(c=Math.max(c,m[n].x),d=Math.min(d,m[n].x),e=Math.max(e,m[n].y),f=Math.min(f,m[n].y));c-=d;e-=f;if(0<c&&0<e){var p=100/c,t=100/e;m.map(function(a){if(null==a)return a;a.x=(a.x-d)*p;a.y=(a.y-f)*t;return a});for(var u='<shape strokewidth="inherit"><foreground>',
v=0,n=0;n<m.length;n++){var x=m[n];if(null==x){var x=!1,v=m[v],y=m[n-1];!k&&l&&(x=v.x-y.x,y=v.y-y.y,x=Math.sqrt(x*x+y*y)<=a.tolerance);if(k||x)u+='<line x="'+v.x.toFixed(2)+'" y="'+v.y.toFixed(2)+'"/>';u+="</path>"+(q||k||x?"<fillstroke/>":"<stroke/>");v=n+1}else u=n==v?u+('<path><move x="'+x.x.toFixed(2)+'" y="'+x.y.toFixed(2)+'"/>'):u+('<line x="'+x.x.toFixed(2)+'" y="'+x.y.toFixed(2)+'"/>')}u+="</foreground></shape>";if(a.isEnabled()&&!a.isCellLocked(a.getDefaultParent())){n=this.createStyle("stencil("+
-Graph.compress(u)+")");u=a.view.scale;v=a.view.translate;c=new mxCell("",new mxGeometry(d/u-v.x,g/u-v.y,c/u,e/u),n);c.vertex=1;a.model.beginUpdate();try{c=a.addCell(c),a.fireEvent(new mxEventObject("cellsInserted","cells",[c])),a.fireEvent(new mxEventObject("freehandInserted","cell",c))}finally{a.model.endUpdate()}a.setSelectionCells([c])}}for(n=0;n<f.length;n++)f[n].parentNode.removeChild(f[n]);b=null;f=[];m=[]}z(!1)};a.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(a,b){var c=b.getProperty("eventName"),
-d=b.getProperty("event");c==mxEvent.MOUSE_MOVE&&t&&(null!=d.sourceState&&d.sourceState.setCursor("crosshair"),d.consume())}));var x=new mxCell;x.edge=!0;a.addMouseListener({mouseDown:mxUtils.bind(this,function(c,f){if(a.isEnabled()&&!a.isCellLocked(a.getDefaultParent())){var k=f.getEvent();if(t&&!mxEvent.isPopupTrigger(k)&&!mxEvent.isMultiTouchEvent(k)){var l=a.getCurrentCellStyle(x),n=parseFloat(a.currentVertexStyle[mxConstants.STYLE_STROKEWIDTH]||1),n=Math.max(1,n*a.view.scale);b=document.createElementNS("http://www.w3.org/2000/svg",
-"path");b.setAttribute("fill","none");b.setAttribute("stroke",mxUtils.getValue(a.currentVertexStyle,mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(l,mxConstants.STYLE_STROKECOLOR,"#000")));b.setAttribute("stroke-width",n);"1"==a.currentVertexStyle[mxConstants.STYLE_DASHED]&&(l=a.currentVertexStyle[mxConstants.STYLE_DASH_PATTERN]||"3 3",l=l.split(" ").map(function(a){return parseFloat(a)*n}).join(" "),b.setAttribute("stroke-dasharray",l));u=[];k=A(k);B(k);g="M"+k.x+" "+k.y;m.push(k);e=[];b.setAttribute("d",
-g);d.appendChild(b);f.consume()}}}),mouseMove:mxUtils.bind(this,function(c,d){if(b&&a.isEnabled()&&!a.isCellLocked(a.getDefaultParent())){var f=d.getEvent(),f=A(f);B(f);var k=C(0);if(k){g+=" L"+k.x+" "+k.y;m.push(k);var l="";e=[];for(var n=2;n<u.length;n+=2)k=C(n),l+=" L"+k.x+" "+k.y,e.push(k);b.setAttribute("d",g+l)}p&&(k=a.view.translate,a.scrollRectToVisible((new mxRectangle(f.x-k.x,f.y-k.y)).grow(20)));d.consume()}}),mouseUp:mxUtils.bind(this,function(c,d){b&&a.isEnabled()&&!a.isCellLocked(a.getDefaultParent())&&
+Graph.compress(u)+")");u=a.view.scale;v=a.view.translate;c=new mxCell("",new mxGeometry(d/u-v.x,f/u-v.y,c/u,e/u),n);c.vertex=1;a.model.beginUpdate();try{c=a.addCell(c),a.fireEvent(new mxEventObject("cellsInserted","cells",[c])),a.fireEvent(new mxEventObject("freehandInserted","cell",c))}finally{a.model.endUpdate()}a.setSelectionCells([c])}}for(n=0;n<g.length;n++)g[n].parentNode.removeChild(g[n]);b=null;g=[];m=[]}z(!1)};a.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(a,b){var c=b.getProperty("eventName"),
+d=b.getProperty("event");c==mxEvent.MOUSE_MOVE&&t&&(null!=d.sourceState&&d.sourceState.setCursor("crosshair"),d.consume())}));var x=new mxCell;x.edge=!0;a.addMouseListener({mouseDown:mxUtils.bind(this,function(c,g){if(a.isEnabled()&&!a.isCellLocked(a.getDefaultParent())){var k=g.getEvent();if(t&&!mxEvent.isPopupTrigger(k)&&!mxEvent.isMultiTouchEvent(k)){var l=a.getCurrentCellStyle(x),n=parseFloat(a.currentVertexStyle[mxConstants.STYLE_STROKEWIDTH]||1),n=Math.max(1,n*a.view.scale);b=document.createElementNS("http://www.w3.org/2000/svg",
+"path");b.setAttribute("fill","none");b.setAttribute("stroke",mxUtils.getValue(a.currentVertexStyle,mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(l,mxConstants.STYLE_STROKECOLOR,"#000")));b.setAttribute("stroke-width",n);"1"==a.currentVertexStyle[mxConstants.STYLE_DASHED]&&(l=a.currentVertexStyle[mxConstants.STYLE_DASH_PATTERN]||"3 3",l=l.split(" ").map(function(a){return parseFloat(a)*n}).join(" "),b.setAttribute("stroke-dasharray",l));u=[];k=A(k);B(k);f="M"+k.x+" "+k.y;m.push(k);e=[];b.setAttribute("d",
+f);d.appendChild(b);g.consume()}}}),mouseMove:mxUtils.bind(this,function(c,d){if(b&&a.isEnabled()&&!a.isCellLocked(a.getDefaultParent())){var g=d.getEvent(),g=A(g);B(g);var k=C(0);if(k){f+=" L"+k.x+" "+k.y;m.push(k);var l="";e=[];for(var n=2;n<u.length;n+=2)k=C(n),l+=" L"+k.x+" "+k.y,e.push(k);b.setAttribute("d",f+l)}p&&(k=a.view.translate,a.scrollRectToVisible((new mxRectangle(g.x-k.x,g.y-k.y)).grow(20)));d.consume()}}),mouseUp:mxUtils.bind(this,function(c,d){b&&a.isEnabled()&&!a.isCellLocked(a.getDefaultParent())&&
(y(d.getEvent()),d.consume())})});var A=function(b){return mxUtils.convertPoint(a.container,mxEvent.getClientX(b),mxEvent.getClientY(b))},B=function(a){for(u.push(a);u.length>c;)u.shift()},C=function(a){var b=u.length;if(1===b%2||b>=c){var d=0,e=0,f,g=0;for(f=a;f<b;f++)g++,a=u[f],d+=a.x,e+=a.y;return{x:d/g,y:e/g}}return null}}}mxFreehand.prototype.NO_SMOOTHING=1;mxFreehand.prototype.MILD_SMOOTHING=4;mxFreehand.prototype.NORMAL_SMOOTHING=8;mxFreehand.prototype.VERY_SMOOTH_SMOOTHING=12;
mxFreehand.prototype.SUPER_SMOOTH_SMOOTHING=16;mxFreehand.prototype.HYPER_SMOOTH_SMOOTHING=20;
diff --git a/src/main/webapp/js/diagramly/Dialogs.js b/src/main/webapp/js/diagramly/Dialogs.js
index f09bb7a4..3daca886 100644
--- a/src/main/webapp/js/diagramly/Dialogs.js
+++ b/src/main/webapp/js/diagramly/Dialogs.js
@@ -4921,6 +4921,7 @@ var LinkDialog = function(editorUi, initialValue, btnLabel, fn, showPages, showN
linkInput.style.backgroundRepeat = 'no-repeat';
linkInput.style.backgroundPosition = '100% 50%';
linkInput.style.paddingRight = '14px';
+ linkInput.style.marginBottom = '4px';
var cross = document.createElement('div');
cross.setAttribute('title', mxResources.get('reset'));
@@ -5151,7 +5152,7 @@ var LinkDialog = function(editorUi, initialValue, btnLabel, fn, showPages, showN
};
var btns = document.createElement('div');
- btns.style.marginTop = '20px';
+ btns.style.marginTop = '18px';
btns.style.textAlign = 'center';
var helpBtn = mxUtils.button(mxResources.get('help'), function()
diff --git a/src/main/webapp/js/diagramly/Editor.js b/src/main/webapp/js/diagramly/Editor.js
index b78bee9f..6f234573 100644
--- a/src/main/webapp/js/diagramly/Editor.js
+++ b/src/main/webapp/js/diagramly/Editor.js
@@ -224,6 +224,12 @@
Editor.enableCustomProperties = true;
/**
+ * Sets the default value for including a copy of the diagram.
+ * Default is true.
+ */
+ Editor.defaultIncludeDiagram = true;
+
+ /**
* Specifies if custom properties should be enabled.
*/
Editor.enableServiceWorker = urlParams['pwa'] != '0' &&
@@ -1800,6 +1806,11 @@
Editor.compressXml = config.compressXml;
}
+ if (config.includeDiagram != null)
+ {
+ Editor.defaultIncludeDiagram = config.includeDiagram;
+ }
+
if (config.simpleLabels != null)
{
Editor.simpleLabels = config.simpleLabels;
@@ -2194,7 +2205,7 @@
* Adds persistent style to file
*/
var editorGetGraphXml = Editor.prototype.getGraphXml;
- Editor.prototype.getGraphXml = function(ignoreSelection)
+ Editor.prototype.getGraphXml = function(ignoreSelection, resolveReferences)
{
ignoreSelection = (ignoreSelection != null) ? ignoreSelection : true;
var node = editorGetGraphXml.apply(this, arguments);
@@ -2205,7 +2216,9 @@
node.setAttribute('style', this.graph.currentStyle);
}
- var bgImg = this.graph.getBackgroundImageObject(this.graph.backgroundImage);
+ var bgImg = this.graph.getBackgroundImageObject(
+ this.graph.backgroundImage,
+ resolveReferences);
// Adds the background image
if (bgImg != null)
diff --git a/src/main/webapp/js/diagramly/EditorUi.js b/src/main/webapp/js/diagramly/EditorUi.js
index b5051f6f..1138de07 100644
--- a/src/main/webapp/js/diagramly/EditorUi.js
+++ b/src/main/webapp/js/diagramly/EditorUi.js
@@ -1197,14 +1197,14 @@
* @param {number} dx X-coordinate of the translation.
* @param {number} dy Y-coordinate of the translation.
*/
- EditorUi.prototype.getXmlFileData = function(ignoreSelection, currentPage, uncompressed)
+ EditorUi.prototype.getXmlFileData = function(ignoreSelection, currentPage, uncompressed, resolveReferences)
{
ignoreSelection = (ignoreSelection != null) ? ignoreSelection : true;
currentPage = (currentPage != null) ? currentPage : false;
uncompressed = (uncompressed != null) ? uncompressed : !Editor.compressXml;
// Generats graph model XML node for single page export
- var node = this.editor.getGraphXml(ignoreSelection);
+ var node = this.editor.getGraphXml(ignoreSelection, resolveReferences);
if (ignoreSelection && this.fileNode != null && this.currentPage != null)
{
@@ -1259,22 +1259,53 @@
// Restores order of pages
for (var i = 0; i < this.pages.length; i++)
{
- if (this.currentPage != this.pages[i])
+ var page = this.pages[i];
+ var currNode = page.node;
+
+ if (page != this.currentPage)
{
- if (this.pages[i].needsUpdate)
+ if (page.needsUpdate)
{
var enc = new mxCodec(mxUtils.createXmlDocument());
- var temp = enc.encode(new mxGraphModel(this.pages[i].root));
- this.editor.graph.saveViewState(this.pages[i].viewState, temp);
- EditorUi.removeChildNodes(this.pages[i].node);
- mxUtils.setTextContent(this.pages[i].node, Graph.compressNode(temp));
+ var temp = enc.encode(new mxGraphModel(page.root));
+ this.editor.graph.saveViewState(page.viewState,
+ temp, null, resolveReferences);
+ EditorUi.removeChildNodes(page.node);
+ mxUtils.setTextContent(page.node, Graph.compressNode(temp));
// Marks the page as up-to-date
- delete this.pages[i].needsUpdate;
+ delete page.needsUpdate;
+ }
+ else if (resolveReferences)
+ {
+ // Checks for unresolved background page references
+ if (page.viewState == null)
+ {
+ var modelNode = this.editor.extractGraphModel(page.node);
+ page.viewState = this.editor.graph.createViewState(modelNode)
+ }
+
+ if (page.viewState.backgroundImage != null &&
+ Graph.isPageLink(page.viewState.backgroundImage.originalSrc) &&
+ page.viewState.backgroundImage.src == null)
+ {
+ page.viewState.backgroundImage = this.createImageForPageLink(page.viewState.backgroundImage.originalSrc);
+ }
+
+ if (page.viewState.backgroundImage != null &&
+ page.viewState.backgroundImage.originalSrc != null)
+ {
+ var enc = new mxCodec(mxUtils.createXmlDocument());
+ var temp = enc.encode(new mxGraphModel(page.root));
+ this.editor.graph.saveViewState(page.viewState,
+ temp, null, resolveReferences);
+ currNode = currNode.cloneNode(false);
+ mxUtils.setTextContent(node, Graph.compressNode(temp));
+ }
}
}
- appendPage(this.pages[i].node);
+ appendPage(currNode);
}
}
}
@@ -1544,8 +1575,8 @@
* @param {number} dx X-coordinate of the translation.
* @param {number} dy Y-coordinate of the translation.
*/
- EditorUi.prototype.getFileData = function(forceXml, forceSvg, forceHtml, embeddedCallback, ignoreSelection,
- currentPage, node, compact, file, uncompressed)
+ EditorUi.prototype.getFileData = function(forceXml, forceSvg, forceHtml, embeddedCallback,
+ ignoreSelection, currentPage, node, compact, file, uncompressed, resolveReferences)
{
ignoreSelection = (ignoreSelection != null) ? ignoreSelection : true;
currentPage = (currentPage != null) ? currentPage : false;
@@ -1585,8 +1616,9 @@
graph.model.setRoot(page.root);
}
}
-
- node = (node != null) ? node : this.getXmlFileData(ignoreSelection, currentPage, uncompressed);
+
+ node = (node != null) ? node : this.getXmlFileData(ignoreSelection,
+ currentPage, uncompressed, resolveReferences);
file = (file != null) ? file : this.getCurrentFile();
var result = this.createFileData(node, graph, file, window.location.href,
@@ -1857,8 +1889,12 @@
var basename = (file != null && file.getTitle() != null) ? file.getTitle() : this.defaultFilename;
if (/(\.xml)$/i.test(basename) || /(\.html)$/i.test(basename) ||
- /(\.svg)$/i.test(basename) || /(\.png)$/i.test(basename) ||
- /(\.drawio)$/i.test(basename))
+ /(\.svg)$/i.test(basename) || /(\.png)$/i.test(basename))
+ {
+ basename = basename.substring(0, basename.lastIndexOf('.'));
+ }
+
+ if (/(\.drawio)$/i.test(basename))
{
basename = basename.substring(0, basename.lastIndexOf('.'));
}
@@ -1886,7 +1922,8 @@
{
ignoreSelection = (ignoreSelection != null) ? ignoreSelection : this.editor.graph.isSelectionEmpty();
var basename = this.getBaseFilename(!currentPage);
- var filename = basename + '.' + format;
+ var filename = basename + ((format == 'xml' || (format == 'pdf' &&
+ includeXml)) ? '.drawio' : '') + '.' + format;
if (format == 'xml')
{
@@ -2006,8 +2043,8 @@
* @param {number} dx X-coordinate of the translation.
* @param {number} dy Y-coordinate of the translation.
*/
- EditorUi.prototype.createDownloadRequest = function(filename, format, ignoreSelection, base64, transparent,
- currentPage, scale, border, grid, includeXml)
+ EditorUi.prototype.createDownloadRequest = function(filename, format, ignoreSelection,
+ base64, transparent, currentPage, scale, border, grid, includeXml)
{
var graph = this.editor.graph;
var bounds = graph.getGraphBounds();
@@ -2015,7 +2052,9 @@
// Exports only current page for images that does not contain file data, but for
// the other formats with XML included or pdf with all pages, we need to send the complete data and use
// the from/to URL parameters to specify the page to be exported.
- var data = this.getFileData(true, null, null, null, ignoreSelection, currentPage == false? false : format != 'xmlpng');
+ var data = this.getFileData(true, null, null, null, ignoreSelection,
+ currentPage == false ? false : format != 'xmlpng', null, null,
+ null, null, format == 'pdf');
var range = '';
var allPages = '';
@@ -4272,8 +4311,10 @@
EditorUi.prototype.saveCanvas = function(canvas, xml, format, ignorePageName, dpi)
{
var ext = ((format == 'jpeg') ? 'jpg' : format);
- var filename = this.getBaseFilename(ignorePageName) + '.' + ext;
+ var filename = this.getBaseFilename(ignorePageName) +
+ ((xml != null) ? '.drawio' : '') + '.' + ext;
var data = this.createImageDataUri(canvas, xml, format, dpi);
+
this.saveData(filename, ext, data.substring(data.lastIndexOf(',') + 1), 'image/' + format, true);
};
@@ -4909,7 +4950,7 @@
this.editor.graph.addSvgShadow(svgRoot);
}
- var filename = this.getBaseFilename() + '.svg';
+ var filename = this.getBaseFilename() + ((editable) ? '.drawio' : '') + '.svg';
var doSave = mxUtils.bind(this, function(svgRoot)
{
@@ -5725,7 +5766,8 @@
var selection = this.addCheckbox(div, mxResources.get('selectionOnly'), false,
this.editor.graph.isSelectionEmpty());
- var include = (hideInclude) ? null : this.addCheckbox(div, mxResources.get('includeCopyOfMyDiagram'), true);
+ var include = (hideInclude) ? null : this.addCheckbox(div, mxResources.get('includeCopyOfMyDiagram'),
+ Editor.defaultIncludeDiagram);
var graph = this.editor.graph;
var transparent = (hideInclude) ? null : this.addCheckbox(div, mxResources.get('transparentBackground'),
@@ -5753,7 +5795,7 @@
EditorUi.prototype.showExportDialog = function(title, embedOption, btnLabel, helpLink, callback,
cropOption, defaultInclude, format, exportOption)
{
- defaultInclude = (defaultInclude != null) ? defaultInclude : true;
+ defaultInclude = (defaultInclude != null) ? defaultInclude : Editor.defaultIncludeDiagram;
var div = document.createElement('div');
div.style.whiteSpace = 'nowrap';
@@ -9004,13 +9046,13 @@
// Restores background page references in output data
var graphGetBackgroundImageObject = graph.getBackgroundImageObject;
- graph.getBackgroundImageObject = function(obj)
+ graph.getBackgroundImageObject = function(obj, resolveReferences)
{
var result = graphGetBackgroundImageObject.apply(this, arguments);
- if (result != null && result.originalSrc != null)
+ if (result != null && result.originalSrc != null && !resolveReferences)
{
- result = {src: result.originalSrc, width: result.width, height: result.height};
+ result = {src: result.originalSrc};
}
return result;
diff --git a/src/main/webapp/js/diagramly/Menus.js b/src/main/webapp/js/diagramly/Menus.js
index 4b6c9496..a3ca858d 100644
--- a/src/main/webapp/js/diagramly/Menus.js
+++ b/src/main/webapp/js/diagramly/Menus.js
@@ -363,7 +363,8 @@
var result = '<!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]-->\n' +
'<!DOCTYPE html>\n<html>\n<head>\n<title>' + mxUtils.htmlEntities(basename) + '</title>\n' +
'<meta charset="utf-8"/>\n</head>\n<body>' + html + '\n' + scriptTag + '\n</body>\n</html>';
- editorUi.saveData(basename + '.html', 'html', result, 'text/html');
+ editorUi.saveData(basename + ((basename.substring(basename.lenth - 7) ==
+ '.drawio') ? '' : '.drawio') + '.html', 'html', result, 'text/html');
}));
});
});
@@ -443,8 +444,8 @@
if (EditorUi.isElectronApp || isDrawioWeb)
{
- include = editorUi.addCheckbox(div,
- mxResources.get('includeCopyOfMyDiagram'), true);
+ include = editorUi.addCheckbox(div, mxResources.get('includeCopyOfMyDiagram'),
+ Editor.defaultIncludeDiagram);
dlgH += 30;
}
@@ -696,7 +697,7 @@
addShadow, editable, border, !cropImage, false, null, grid, null,
keepTheme, exportType);
}
- }), true, true, 'png', true);
+ }), true, Editor.defaultIncludeDiagram, 'png', true);
}
else if (!editorUi.isOffline() && (!mxClient.IS_IOS || !navigator.standalone))
{
@@ -2608,7 +2609,7 @@
return false;
}, null, null, null, null, editorUi.editor.fileExtensions);
- this.editorUi.showDialog(dlg.container, 340, 90, true, true);
+ this.editorUi.showDialog(dlg.container, 340, 96, true, true);
dlg.init();
}
}
diff --git a/src/main/webapp/js/diagramly/Minimal.js b/src/main/webapp/js/diagramly/Minimal.js
index c4e255a9..f50c7841 100644
--- a/src/main/webapp/js/diagramly/Minimal.js
+++ b/src/main/webapp/js/diagramly/Minimal.js
@@ -910,7 +910,7 @@ EditorUi.initMinimalTheme = function()
ui.actions.get('forkme').visible = urlParams['sketch'] != '1';
ui.actions.get('downloadDesktop').visible = urlParams['sketch'] != '1';
- var toggleDarkModeAction = ui.actions.put('toggleDarkMode', new Action(mxResources.get('dark'), function()
+ var toggleDarkModeAction = ui.actions.put('toggleDarkMode', new Action(mxResources.get('dark'), function(e)
{
ui.setDarkMode(!Editor.darkMode);
}));
@@ -1887,7 +1887,19 @@ EditorUi.initMinimalTheme = function()
elt.style.padding = '6px';
elt.style.margin = '0px';
toolbar.appendChild(elt);
-
+
+ mxEvent.disableContextMenu(elt);
+
+ mxEvent.addGestureListeners(elt, mxUtils.bind(this, function(evt)
+ {
+ if (mxEvent.isShiftDown(evt) || mxEvent.isAltDown(evt) ||
+ mxEvent.isMetaDown(evt) || mxEvent.isControlDown(evt) ||
+ mxEvent.isPopupTrigger(evt))
+ {
+ this.appIconClicked(evt);
+ }
+ }), null, null);
+
ui.statusContainer.style.position = '';
ui.statusContainer.style.display = 'none';
ui.statusContainer.style.margin = '0px';
@@ -1977,7 +1989,7 @@ EditorUi.initMinimalTheme = function()
var elt = addElt(ui.sidebar.createEdgeTemplateFromCells([cell],
cell.geometry.width, 40, mxResources.get('arrow'),
false, null, true), mxResources.get('arrow'));
- elt.style.borderBottom = '1px solid lightgray';
+ elt.style.borderBottom = '1px solid ' + (Editor.isDarkMode() ? '#505050' : 'lightgray');
elt.style.paddingBottom = '14px';
elt.style.marginBottom = '14px';
})();
@@ -2306,10 +2318,11 @@ EditorUi.initMinimalTheme = function()
before = menubar.firstChild;
iw = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth;
var small = iw < 1000 || urlParams['sketch'] == '1';
+ var appElt = null;
if (!small)
{
- addMenu('diagram');
+ appElt = addMenu('diagram');
}
if (urlParams['sketch'] == '1')
@@ -2318,9 +2331,15 @@ EditorUi.initMinimalTheme = function()
}
else
{
- createGroup([((small) ? addMenu('diagram', null, IMAGE_PATH + '/drawlogo.svg') : null),
- addMenuItem(mxResources.get('shapes'), ui.actions.get('toggleShapes').funct, null, mxResources.get('shapes'), ui.actions.get('image'),
- (small) ? shapesImage : null),
+ var temp = (small) ? addMenu('diagram', null, IMAGE_PATH + '/drawlogo.svg') : null;
+
+ if (temp != null)
+ {
+ appElt = temp;
+ }
+
+ createGroup([appElt, addMenuItem(mxResources.get('shapes'), ui.actions.get('toggleShapes').funct, null,
+ mxResources.get('shapes'), ui.actions.get('image'), (small) ? shapesImage : null),
addMenuItem(mxResources.get('format'), ui.actions.get('toggleFormat').funct, null,
mxResources.get('format') + ' (' + ui.actions.get('formatPanel').shortcut + ')', ui.actions.get('image'),
(small) ? formatImage : null)],
@@ -2366,6 +2385,21 @@ EditorUi.initMinimalTheme = function()
}
}
}
+
+ if (appElt != null)
+ {
+ mxEvent.disableContextMenu(appElt);
+
+ mxEvent.addGestureListeners(appElt, mxUtils.bind(this, function(evt)
+ {
+ if (mxEvent.isShiftDown(evt) || mxEvent.isAltDown(evt) ||
+ mxEvent.isMetaDown(evt) || mxEvent.isControlDown(evt) ||
+ mxEvent.isPopupTrigger(evt))
+ {
+ ui.appIconClicked(evt);
+ }
+ }), null, null);
+ }
var langMenu = ui.menus.get('language');
diff --git a/src/main/webapp/js/diagramly/Pages.js b/src/main/webapp/js/diagramly/Pages.js
index 9a3becc8..2d5daf8d 100644
--- a/src/main/webapp/js/diagramly/Pages.js
+++ b/src/main/webapp/js/diagramly/Pages.js
@@ -598,7 +598,7 @@ Graph.prototype.createViewState = function(node)
/**
* Writes the graph properties from the realtime model to the given mxGraphModel node.
*/
-Graph.prototype.saveViewState = function(vs, node, ignoreTransient)
+Graph.prototype.saveViewState = function(vs, node, ignoreTransient, resolveReferences)
{
if (!ignoreTransient)
{
@@ -632,7 +632,7 @@ Graph.prototype.saveViewState = function(vs, node, ignoreTransient)
node.setAttribute('background', vs.background);
}
- var bgImg = this.getBackgroundImageObject(vs.backgroundImage);
+ var bgImg = this.getBackgroundImageObject(vs.backgroundImage, resolveReferences);
if (bgImg != null)
{
diff --git a/src/main/webapp/js/export.js b/src/main/webapp/js/export.js
index 3a22ae21..5f6fd8e2 100644
--- a/src/main/webapp/js/export.js
+++ b/src/main/webapp/js/export.js
@@ -429,7 +429,8 @@ function render(data)
if (bgImg != null)
{
bgImg = JSON.parse(bgImg);
- graph.setBackgroundImage(new mxImage(bgImg.src, bgImg.width, bgImg.height));
+ graph.setBackgroundImage(new mxImage(bgImg.src, bgImg.width,
+ bgImg.height, bgImg.x, bgImg.y));
}
// Parses XML into graph
@@ -745,6 +746,7 @@ function render(data)
preview.autoOrigin = autoOrigin;
preview.appendGraph(graph, scale, x0, y0);
}
+
// Adds shadow
// NOTE: Shadow rasterizes output
/*if (mxClient.IS_SVG && xmlDoc.documentElement.getAttribute('shadow') == '1')
@@ -768,6 +770,18 @@ function render(data)
}
else
{
+ var bgImg = graph.backgroundImage;
+
+ if (bgImg != null)
+ {
+ var t = graph.view.translate;
+ var s = graph.view.scale;
+
+ bounds.add(new mxRectangle(
+ (t.x + bgImg.x) * s, (t.y + bgImg.y) * s,
+ bgImg.width * s, bgImg.height * s));
+ }
+
// Adds shadow
// NOTE: PDF shadow rasterizes output so it's disabled
if (data.format != 'pdf' && mxClient.IS_SVG && xmlDoc.documentElement.getAttribute('shadow') == '1')
@@ -781,7 +795,7 @@ function render(data)
document.body.style.width = Math.ceil(bounds.x + bounds.width) + 'px';
document.body.style.height = Math.ceil(bounds.y + bounds.height) + 'px';
}
- }
+ };
if (diagrams != null && diagrams.length > 0)
{
diff --git a/src/main/webapp/js/grapheditor/Editor.js b/src/main/webapp/js/grapheditor/Editor.js
index c3750d99..48ecfaa9 100644
--- a/src/main/webapp/js/grapheditor/Editor.js
+++ b/src/main/webapp/js/grapheditor/Editor.js
@@ -2032,14 +2032,17 @@ var FilenameDialog = function(editorUi, filename, buttonText, fn, label, validat
var table = document.createElement('table');
var tbody = document.createElement('tbody');
- table.style.marginTop = '8px';
+ table.style.position = 'absolute';
+ table.style.top = '30px';
+ table.style.left = '20px';
row = document.createElement('tr');
td = document.createElement('td');
td.style.whiteSpace = 'nowrap';
+ td.style.maxWidth = '100px';
+ td.style.textOverflow = 'ellipsis';
td.style.fontSize = '10pt';
- td.style.width = (hints) ? '80px' : '120px';
mxUtils.write(td, (label || mxResources.get('filename')) + ':');
row.appendChild(td);
@@ -2148,18 +2151,36 @@ var FilenameDialog = function(editorUi, filename, buttonText, fn, label, validat
tbody.appendChild(row);
if (hints != null)
- {
+ {
+ td.appendChild(FilenameDialog.createTypeHint(editorUi, nameInput, hints));
+
if (editorUi.editor.diagramFileTypes != null)
{
- var typeSelect = FilenameDialog.createFileTypes(editorUi, nameInput, editorUi.editor.diagramFileTypes);
- typeSelect.style.marginLeft = '6px';
- typeSelect.style.width = '74px';
-
+ row = document.createElement('tr');
+
+ td = document.createElement('td');
+ td.style.whiteSpace = 'nowrap';
+ td.style.maxWidth = '100px';
+ td.style.textOverflow = 'ellipsis';
+ td.style.fontSize = '10pt';
+ mxUtils.write(td, mxResources.get('type') + ':');
+ row.appendChild(td);
+
+ td = document.createElement('td');
+ td.style.whiteSpace = 'nowrap';
+ row.appendChild(td);
+
+ var typeSelect = FilenameDialog.createFileTypes(editorUi,
+ nameInput, editorUi.editor.diagramFileTypes);
+ typeSelect.style.marginLeft = '4px';
+ typeSelect.style.width = '198px';
+
td.appendChild(typeSelect);
- nameInput.style.width = (w != null) ? (w - 40) + 'px' : '140px';
- }
+ nameInput.style.width = (w != null) ? (w - 40) + 'px' : '190px';
- td.appendChild(FilenameDialog.createTypeHint(editorUi, nameInput, hints));
+ row.appendChild(td);
+ tbody.appendChild(row);
+ }
}
}
@@ -2176,7 +2197,7 @@ var FilenameDialog = function(editorUi, filename, buttonText, fn, label, validat
row = document.createElement('tr');
td = document.createElement('td');
td.colSpan = 2;
- td.style.paddingTop = '20px';
+ td.style.paddingTop = (hints != null) ? '12px' : '20px';
td.style.whiteSpace = 'nowrap';
td.setAttribute('align', 'right');
@@ -2240,7 +2261,13 @@ FilenameDialog.filenameHelpLink = null;
FilenameDialog.createTypeHint = function(ui, nameInput, hints)
{
var hint = document.createElement('img');
- hint.style.cssText = 'vertical-align:top;height:16px;width:16px;margin-left:4px;background-repeat:no-repeat;background-position:center bottom;cursor:pointer;';
+ hint.style.backgroundPosition = 'center bottom';
+ hint.style.backgroundRepeat = 'no-repeat';
+ hint.style.margin = '2px 0 0 4px';
+ hint.style.verticalAlign = 'top';
+ hint.style.cursor = 'pointer';
+ hint.style.height = '16px';
+ hint.style.width = '16px';
mxUtils.setOpacity(hint, 70);
var nameChanged = function()
@@ -2253,7 +2280,6 @@ FilenameDialog.createTypeHint = function(ui, nameInput, hints)
if (hints[i].ext.length > 0 && nameInput.value.toLowerCase().substring(
nameInput.value.length - hints[i].ext.length - 1) == '.' + hints[i].ext)
{
- hint.setAttribute('src', mxClient.imageBasePath + '/warning.png');
hint.setAttribute('title', mxResources.get(hints[i].title));
break;
}
@@ -2292,7 +2318,7 @@ FilenameDialog.createTypeHint = function(ui, nameInput, hints)
FilenameDialog.createFileTypes = function(editorUi, nameInput, types)
{
var typeSelect = document.createElement('select');
-
+
for (var i = 0; i < types.length; i++)
{
var typeOption = document.createElement('option');
@@ -2305,11 +2331,16 @@ FilenameDialog.createFileTypes = function(editorUi, nameInput, types)
mxEvent.addListener(typeSelect, 'change', function(evt)
{
var ext = types[typeSelect.value].extension;
- var idx = nameInput.value.lastIndexOf('.');
+ var idx2 = nameInput.value.lastIndexOf('.drawio.');
+ var idx = (idx2 > 0) ? idx2 : nameInput.value.lastIndexOf('.');
+
+ if (ext != 'drawio')
+ {
+ ext = 'drawio.' + ext;
+ }
if (idx > 0)
{
- var ext = types[typeSelect.value].extension;
nameInput.value = nameInput.value.substring(0, idx + 1) + ext;
}
else
@@ -2331,21 +2362,26 @@ FilenameDialog.createFileTypes = function(editorUi, nameInput, types)
var nameInputChanged = function(evt)
{
- var idx = nameInput.value.lastIndexOf('.');
+ var name = nameInput.value.toLowerCase();
var active = 0;
// Finds current extension
- if (idx > 0)
+ for (var i = 0; i < types.length; i++)
{
- var ext = nameInput.value.toLowerCase().substring(idx + 1);
-
- for (var i = 0; i < types.length; i++)
+ var ext = types[i].extension;
+ var subExt = null;
+
+ if (ext != 'drawio')
{
- if (ext == types[i].extension)
- {
- active = i;
- break;
- }
+ subExt = ext;
+ ext = '.drawio.' + ext;
+ }
+
+ if (name.substring(name.length - ext.length - 1) == '.' + ext ||
+ (subExt != null && name.substring(name.length - subExt.length - 1) == '.' + subExt))
+ {
+ active = i;
+ break;
}
}
diff --git a/src/main/webapp/js/grapheditor/Format.js b/src/main/webapp/js/grapheditor/Format.js
index 17504059..bc84e96b 100644
--- a/src/main/webapp/js/grapheditor/Format.js
+++ b/src/main/webapp/js/grapheditor/Format.js
@@ -1080,7 +1080,7 @@ BaseFormatPanel.prototype.createColorOption = function(label, getColorFn, setCol
mxUtils.write(span, label);
div.appendChild(span);
- var title = 'Shift+Click for Color Picker';
+ var title = 'Shift+Click for Color Dropper';
var value = getColorFn();
var applying = false;
var btn = null;
diff --git a/src/main/webapp/js/viewer-static.min.js b/src/main/webapp/js/viewer-static.min.js
index ce45c154..07b43a38 100644
--- a/src/main/webapp/js/viewer-static.min.js
+++ b/src/main/webapp/js/viewer-static.min.js
@@ -200,7 +200,7 @@ null!=a&&(DRAWIO_GITLAB_ID=a);window.DRAWIO_LOG_URL=window.DRAWIO_LOG_URL||"";a=
if("1"==urlParams.offline||"1"==urlParams.demo||"1"==urlParams.stealth||"1"==urlParams.local||"1"==urlParams.lockdown)urlParams.picker="0",urlParams.gapi="0",urlParams.db="0",urlParams.od="0",urlParams.gh="0",urlParams.gl="0",urlParams.tr="0";
"se.diagrams.net"==window.location.hostname&&(urlParams.db="0",urlParams.od="0",urlParams.gh="0",urlParams.gl="0",urlParams.tr="0",urlParams.plugins="0",urlParams.mode="google",urlParams.lockdown="1",window.DRAWIO_GOOGLE_APP_ID=window.DRAWIO_GOOGLE_APP_ID||"184079235871",window.DRAWIO_GOOGLE_CLIENT_ID=window.DRAWIO_GOOGLE_CLIENT_ID||"184079235871-pjf5nn0lff27lk8qf0770gmffiv9gt61.apps.googleusercontent.com");"trello"==urlParams.mode&&(urlParams.tr="1");
"embed.diagrams.net"==window.location.hostname&&(urlParams.embed="1");(null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.open&&(window.location.hash=urlParams.open);window.urlParams=window.urlParams||{};window.MAX_REQUEST_SIZE=window.MAX_REQUEST_SIZE||10485760;window.MAX_AREA=window.MAX_AREA||225E6;window.EXPORT_URL=window.EXPORT_URL||"/export";window.SAVE_URL=window.SAVE_URL||"/save";window.OPEN_URL=window.OPEN_URL||"/open";window.RESOURCES_PATH=window.RESOURCES_PATH||"resources";window.RESOURCE_BASE=window.RESOURCE_BASE||window.RESOURCES_PATH+"/grapheditor";window.STENCIL_PATH=window.STENCIL_PATH||"stencils";window.IMAGE_PATH=window.IMAGE_PATH||"images";
-window.STYLE_PATH=window.STYLE_PATH||"styles";window.CSS_PATH=window.CSS_PATH||"styles";window.OPEN_FORM=window.OPEN_FORM||"open.html";window.mxBasePath=window.mxBasePath||"mxgraph";window.mxImageBasePath=window.mxImageBasePath||"mxgraph/images";window.mxLanguage=window.mxLanguage||urlParams.lang;window.mxLanguages=window.mxLanguages||["de","se"];var mxClient={VERSION:"15.0.3",IS_IE:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE"),IS_IE11:null!=navigator.userAgent&&!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:null!=navigator.userAgent&&!!navigator.userAgent.match(/Edge\//),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&0>navigator.userAgent.indexOf("Edge/"),
+window.STYLE_PATH=window.STYLE_PATH||"styles";window.CSS_PATH=window.CSS_PATH||"styles";window.OPEN_FORM=window.OPEN_FORM||"open.html";window.mxBasePath=window.mxBasePath||"mxgraph";window.mxImageBasePath=window.mxImageBasePath||"mxgraph/images";window.mxLanguage=window.mxLanguage||urlParams.lang;window.mxLanguages=window.mxLanguages||["de","se"];var mxClient={VERSION:"15.0.4",IS_IE:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE"),IS_IE11:null!=navigator.userAgent&&!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:null!=navigator.userAgent&&!!navigator.userAgent.match(/Edge\//),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&0>navigator.userAgent.indexOf("Edge/"),
IS_OP:null!=navigator.userAgent&&(0<=navigator.userAgent.indexOf("Opera/")||0<=navigator.userAgent.indexOf("OPR/")),IS_OT:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Presto/")&&0>navigator.userAgent.indexOf("Presto/2.4.")&&0>navigator.userAgent.indexOf("Presto/2.3.")&&0>navigator.userAgent.indexOf("Presto/2.2.")&&0>navigator.userAgent.indexOf("Presto/2.1.")&&0>navigator.userAgent.indexOf("Presto/2.0.")&&0>navigator.userAgent.indexOf("Presto/1."),IS_SF:/Apple Computer, Inc/.test(navigator.vendor),
IS_ANDROID:0<=navigator.appVersion.indexOf("Android"),IS_IOS:/iP(hone|od|ad)/.test(navigator.platform),IS_GC:/Google Inc/.test(navigator.vendor),IS_CHROMEAPP:null!=window.chrome&&null!=chrome.app&&null!=chrome.app.runtime,IS_FF:"undefined"!==typeof InstallTrigger,IS_MT:0<=navigator.userAgent.indexOf("Firefox/")&&0>navigator.userAgent.indexOf("Firefox/1.")&&0>navigator.userAgent.indexOf("Firefox/2.")||0<=navigator.userAgent.indexOf("Iceweasel/")&&0>navigator.userAgent.indexOf("Iceweasel/1.")&&0>navigator.userAgent.indexOf("Iceweasel/2.")||
0<=navigator.userAgent.indexOf("SeaMonkey/")&&0>navigator.userAgent.indexOf("SeaMonkey/1.")||0<=navigator.userAgent.indexOf("Iceape/")&&0>navigator.userAgent.indexOf("Iceape/1."),IS_SVG:"MICROSOFT INTERNET EXPLORER"!=navigator.appName.toUpperCase(),NO_FO:!document.createElementNS||"[object SVGForeignObjectElement]"!=document.createElementNS("http://www.w3.org/2000/svg","foreignObject")||0<=navigator.userAgent.indexOf("Opera/"),IS_WIN:0<navigator.appVersion.indexOf("Win"),IS_MAC:0<navigator.appVersion.indexOf("Mac"),
@@ -1036,7 +1036,7 @@ q=g.isEventsEnabled();g.setEventsEnabled(!1);var r=this.graph.isEnabled();this.g
null;try{var B=[this.getRoot()];a=new mxTemporaryCellStates(g,c,B,null,mxUtils.bind(this,function(a){return this.getLinkForCellState(a)}))}finally{if(mxClient.IS_IE)g.overlayPane.innerHTML="",g.canvas.style.overflow="hidden",g.canvas.style.position="relative",g.canvas.style.top=this.marginTop+"px",g.canvas.style.width=f.width+"px",g.canvas.style.height=f.height+"px";else for(c=e.firstChild;null!=c;)B=c.nextSibling,b=c.nodeName.toLowerCase(),"svg"==b?(c.style.overflow="hidden",c.style.position="relative",
c.style.top=this.marginTop+"px",c.setAttribute("width",f.width),c.setAttribute("height",f.height),c.style.width="",c.style.height=""):"default"!=c.style.cursor&&"div"!=b&&c.parentNode.removeChild(c),c=B;this.printBackgroundImage&&(e=e.getElementsByTagName("svg"),0<e.length&&(e[0].style.position="absolute"));g.overlayPane.parentNode.removeChild(g.overlayPane);this.graph.setEnabled(r);this.graph.container=d;this.graph.cellRenderer.redraw=u;g.canvas=k;g.backgroundPane=l;g.drawPane=m;g.overlayPane=n;
g.translate=t;a.destroy();g.setEventsEnabled(q)}};mxPrintPreview.prototype.getLinkForCellState=function(a){return this.graph.getLinkForCell(a.cell)};
-mxPrintPreview.prototype.insertBackgroundImage=function(a,b,c){var d=this.graph.backgroundImage;if(null!=d){var e=document.createElement("img");e.style.position="absolute";e.style.marginLeft=Math.round(b*this.scale)+"px";e.style.marginTop=Math.round(c*this.scale)+"px";e.setAttribute("width",Math.round(this.scale*d.width));e.setAttribute("height",Math.round(this.scale*d.height));e.src=d.src;a.insertBefore(e,a.firstChild)}};mxPrintPreview.prototype.getCoverPages=function(){return null};
+mxPrintPreview.prototype.insertBackgroundImage=function(a,b,c){var d=this.graph.backgroundImage;if(null!=d){var e=document.createElement("img");e.style.position="absolute";e.style.marginLeft=Math.round((b+d.x)*this.scale)+"px";e.style.marginTop=Math.round((c+d.y)*this.scale)+"px";e.setAttribute("width",Math.round(d.width*this.scale));e.setAttribute("height",Math.round(d.height*this.scale));e.src=d.src;a.insertBefore(e,a.firstChild)}};mxPrintPreview.prototype.getCoverPages=function(){return null};
mxPrintPreview.prototype.getAppendices=function(){return null};mxPrintPreview.prototype.print=function(a){a=this.open(a);null!=a&&a.print()};mxPrintPreview.prototype.close=function(){null!=this.wnd&&(this.wnd.close(),this.wnd=null)};function mxStylesheet(){this.styles={};this.putDefaultVertexStyle(this.createDefaultVertexStyle());this.putDefaultEdgeStyle(this.createDefaultEdgeStyle())}
mxStylesheet.prototype.createDefaultVertexStyle=function(){var a={};a[mxConstants.STYLE_SHAPE]=mxConstants.SHAPE_RECTANGLE;a[mxConstants.STYLE_PERIMETER]=mxPerimeter.RectanglePerimeter;a[mxConstants.STYLE_VERTICAL_ALIGN]=mxConstants.ALIGN_MIDDLE;a[mxConstants.STYLE_ALIGN]=mxConstants.ALIGN_CENTER;a[mxConstants.STYLE_FILLCOLOR]="#C3D9FF";a[mxConstants.STYLE_STROKECOLOR]="#6482B9";a[mxConstants.STYLE_FONTCOLOR]="#774400";return a};
mxStylesheet.prototype.createDefaultEdgeStyle=function(){var a={};a[mxConstants.STYLE_SHAPE]=mxConstants.SHAPE_CONNECTOR;a[mxConstants.STYLE_ENDARROW]=mxConstants.ARROW_CLASSIC;a[mxConstants.STYLE_VERTICAL_ALIGN]=mxConstants.ALIGN_MIDDLE;a[mxConstants.STYLE_ALIGN]=mxConstants.ALIGN_CENTER;a[mxConstants.STYLE_STROKECOLOR]="#6482B9";a[mxConstants.STYLE_FONTCOLOR]="#446299";return a};mxStylesheet.prototype.putDefaultVertexStyle=function(a){this.putCellStyle("defaultVertex",a)};
@@ -2002,7 +2002,7 @@ d);this.exportColor(e)};this.fromRGB=function(a,b,c,d){0>a&&(a=0);1<a&&(a=1);0>b
function(a,b){var c=a.match(/^\W*([0-9A-F]{3}([0-9A-F]{3})?)\W*$/i);return c?(6===c[1].length?this.fromRGB(parseInt(c[1].substr(0,2),16)/255,parseInt(c[1].substr(2,2),16)/255,parseInt(c[1].substr(4,2),16)/255,b):this.fromRGB(parseInt(c[1].charAt(0)+c[1].charAt(0),16)/255,parseInt(c[1].charAt(1)+c[1].charAt(1),16)/255,parseInt(c[1].charAt(2)+c[1].charAt(2),16)/255,b),!0):!1};this.toString=function(){return(256|Math.round(255*this.rgb[0])).toString(16).substr(1)+(256|Math.round(255*this.rgb[1])).toString(16).substr(1)+
(256|Math.round(255*this.rgb[2])).toString(16).substr(1)};var r=this,t="hvs"===this.pickerMode.toLowerCase()?1:0,u=mxJSColor.fetchElement(this.valueElement),x=mxJSColor.fetchElement(this.styleElement),y=!1,B=!1,A=1,z=2,C=4,v=8;u&&(q=function(){r.fromString(u.value,A);p()},mxJSColor.addEvent(u,"keyup",q),mxJSColor.addEvent(u,"input",q),mxJSColor.addEvent(u,"blur",l),u.setAttribute("autocomplete","off"));x&&(x.jscStyle={backgroundImage:x.style.backgroundImage,backgroundColor:x.style.backgroundColor,
color:x.style.color});switch(t){case 0:mxJSColor.requireImage("hs.png");break;case 1:mxJSColor.requireImage("hv.png")}this.importColor()}};mxJSColor.install();
-Editor=function(a,b,d,k,f){mxEventSource.call(this);this.chromeless=null!=a?a:this.chromeless;this.initStencilRegistry();this.graph=k||this.createGraph(b,d);this.editable=null!=f?f:!a;this.undoManager=this.createUndoManager();this.status="";this.getOrCreateFilename=function(){return this.filename||mxResources.get("drawing",[Editor.pageCounter])+".xml"};this.getFilename=function(){return this.filename};this.setStatus=function(a){this.status=a;this.fireEvent(new mxEventObject("statusChanged"))};this.getStatus=
+Editor=function(a,b,d,g,f){mxEventSource.call(this);this.chromeless=null!=a?a:this.chromeless;this.initStencilRegistry();this.graph=g||this.createGraph(b,d);this.editable=null!=f?f:!a;this.undoManager=this.createUndoManager();this.status="";this.getOrCreateFilename=function(){return this.filename||mxResources.get("drawing",[Editor.pageCounter])+".xml"};this.getFilename=function(){return this.filename};this.setStatus=function(a){this.status=a;this.fireEvent(new mxEventObject("statusChanged"))};this.getStatus=
function(){return this.status};this.graphChangeListener=function(a,b){var c=null!=b?b.getProperty("edit"):null;null!=c&&c.ignoreEdit||this.setModified(!0)};this.graph.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){this.graphChangeListener.apply(this,arguments)}));this.graph.resetViewOnRootChange=!1;this.init()};Editor.pageCounter=0;
(function(){try{for(var a=window;null!=a.opener&&"undefined"!==typeof a.opener.Editor&&!isNaN(a.opener.Editor.pageCounter)&&a.opener!=a;)a=a.opener;null!=a&&(a.Editor.pageCounter++,Editor.pageCounter=a.Editor.pageCounter)}catch(b){}})();Editor.useLocalStorage="undefined"!=typeof Storage&&mxClient.IS_IOS;
Editor.moveImage=mxClient.IS_SVG?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCIgd2lkdGg9IjI4cHgiIGhlaWdodD0iMjhweCI+PGc+PC9nPjxnPjxnPjxnPjxwYXRoIHRyYW5zZm9ybT0idHJhbnNsYXRlKDIuNCwyLjQpc2NhbGUoMC44KXJvdGF0ZSg0NSwxMiwxMikiIHN0cm9rZT0iIzI5YjZmMiIgZmlsbD0iIzI5YjZmMiIgZD0iTTE1LDNsMi4zLDIuM2wtMi44OSwyLjg3bDEuNDIsMS40MkwxOC43LDYuN0wyMSw5VjNIMTV6IE0zLDlsMi4zLTIuM2wyLjg3LDIuODlsMS40Mi0xLjQyTDYuNyw1LjNMOSwzSDNWOXogTTksMjEgbC0yLjMtMi4zbDIuODktMi44N2wtMS40Mi0xLjQyTDUuMywxNy4zTDMsMTV2Nkg5eiBNMjEsMTVsLTIuMywyLjNsLTIuODctMi44OWwtMS40MiwxLjQybDIuODksMi44N0wxNSwyMWg2VjE1eiIvPjwvZz48L2c+PC9nPjwvc3ZnPgo=":IMAGE_PATH+
@@ -2030,7 +2030,7 @@ Editor.roughFillStyles=[{val:"auto",dispName:"Auto"},{val:"hachure",dispName:"Ha
Editor.enableNativeCipboard=window==window.top&&!mxClient.IS_FF&&null!=navigator.clipboard;Editor.darkMode=!1;Editor.isDarkMode=function(a){return Editor.darkMode||"dark"==uiTheme};Editor.helpImage=Editor.isDarkMode()&&mxClient.IS_SVG?Editor.darkHelpImage:Editor.lightHelpImage;Editor.checkmarkImage=Editor.isDarkMode()&&mxClient.IS_SVG?Editor.darkCheckmarkImage:Editor.lightCheckmarkImage;mxUtils.extend(Editor,mxEventSource);Editor.prototype.originalNoForeignObject=mxClient.NO_FO;
Editor.prototype.transparentImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhMAAwAIAAAP///wAAACH5BAEAAAAALAAAAAAwADAAAAIxhI+py+0Po5y02ouz3rz7D4biSJbmiabqyrbuC8fyTNf2jef6zvf+DwwKh8Si8egpAAA7":IMAGE_PATH+"/transparent.gif";Editor.prototype.extendCanvas=!0;Editor.prototype.chromeless=!1;Editor.prototype.cancelFirst=!0;Editor.prototype.enabled=!0;Editor.prototype.filename=null;Editor.prototype.modified=!1;Editor.prototype.autosave=!0;Editor.prototype.initialTopSpacing=0;Editor.prototype.appName=document.title;
Editor.prototype.editBlankUrl=window.location.protocol+"//"+window.location.host+"/";Editor.prototype.defaultGraphOverflow="hidden";Editor.prototype.init=function(){};Editor.prototype.isChromelessView=function(){return this.chromeless};Editor.prototype.setAutosave=function(a){this.autosave=a;this.fireEvent(new mxEventObject("autosaveChanged"))};Editor.prototype.getEditBlankUrl=function(a){return this.editBlankUrl+a};
-Editor.prototype.editAsNew=function(a,b){var d=null!=b?"?title="+encodeURIComponent(b):"";null!=urlParams.ui&&(d+=(0<d.length?"&":"?")+"ui="+urlParams.ui);if("undefined"!==typeof window.postMessage&&(null==document.documentMode||10<=document.documentMode)){var k=null,f=mxUtils.bind(this,function(b){"ready"==b.data&&b.source==k&&(mxEvent.removeListener(window,"message",f),k.postMessage(a,"*"))});mxEvent.addListener(window,"message",f);k=this.graph.openLink(this.getEditBlankUrl(d+(0<d.length?"&":"?")+
+Editor.prototype.editAsNew=function(a,b){var d=null!=b?"?title="+encodeURIComponent(b):"";null!=urlParams.ui&&(d+=(0<d.length?"&":"?")+"ui="+urlParams.ui);if("undefined"!==typeof window.postMessage&&(null==document.documentMode||10<=document.documentMode)){var g=null,f=mxUtils.bind(this,function(b){"ready"==b.data&&b.source==g&&(mxEvent.removeListener(window,"message",f),g.postMessage(a,"*"))});mxEvent.addListener(window,"message",f);g=this.graph.openLink(this.getEditBlankUrl(d+(0<d.length?"&":"?")+
"client=1"),null,!0)}else this.graph.openLink(this.getEditBlankUrl(d)+"#R"+encodeURIComponent(a))};Editor.prototype.createGraph=function(a,b){var d=new Graph(null,b,null,null,a);d.transparentBackground=!1;this.chromeless||(d.isBlankLink=function(a){return!this.isExternalProtocol(a)});return d};
Editor.prototype.resetGraph=function(){this.graph.gridEnabled=this.graph.defaultGridEnabled&&(!this.isChromelessView()||"1"==urlParams.grid);this.graph.graphHandler.guidesEnabled=!0;this.graph.setTooltips(!0);this.graph.setConnectable(!0);this.graph.foldingEnabled=!0;this.graph.scrollbars=this.graph.defaultScrollbars;this.graph.pageVisible=this.graph.defaultPageVisible;this.graph.pageBreaksVisible=this.graph.pageVisible;this.graph.preferPageSize=this.graph.pageBreaksVisible;this.graph.background=
null;this.graph.pageScale=mxGraph.prototype.pageScale;this.graph.pageFormat=mxGraph.prototype.pageFormat;this.graph.currentScale=1;this.graph.currentTranslate.x=0;this.graph.currentTranslate.y=0;this.updateGraphComponents();this.graph.view.setScale(1)};
@@ -2043,14 +2043,14 @@ 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(a,d){b.undoableEditHappened(d.getProperty("edit"))};var d=mxUtils.bind(this,function(a,b){this.undoListener.apply(this,arguments)});a.getModel().addListener(mxEvent.UNDO,d);a.getView().addListener(mxEvent.UNDO,d);d=function(b,d){var f=a.getSelectionCellsForChanges(d.getProperty("edit").changes,function(a){return!(a instanceof mxChildChange)});if(0<f.length){a.getModel();for(var k=[],c=0;c<
-f.length;c++)null!=a.view.getState(f[c])&&k.push(f[c]);a.setSelectionCells(k)}};b.addListener(mxEvent.UNDO,d);b.addListener(mxEvent.REDO,d);return b};Editor.prototype.initStencilRegistry=function(){};Editor.prototype.destroy=function(){null!=this.graph&&(this.graph.destroy(),this.graph=null)};OpenFile=function(a){this.consumer=this.producer=null;this.done=a;this.args=null};OpenFile.prototype.setConsumer=function(a){this.consumer=a;this.execute()};
+Editor.prototype.createUndoManager=function(){var a=this.graph,b=new mxUndoManager;this.undoListener=function(a,d){b.undoableEditHappened(d.getProperty("edit"))};var d=mxUtils.bind(this,function(a,b){this.undoListener.apply(this,arguments)});a.getModel().addListener(mxEvent.UNDO,d);a.getView().addListener(mxEvent.UNDO,d);d=function(b,d){var f=a.getSelectionCellsForChanges(d.getProperty("edit").changes,function(a){return!(a instanceof mxChildChange)});if(0<f.length){a.getModel();for(var g=[],c=0;c<
+f.length;c++)null!=a.view.getState(f[c])&&g.push(f[c]);a.setSelectionCells(g)}};b.addListener(mxEvent.UNDO,d);b.addListener(mxEvent.REDO,d);return b};Editor.prototype.initStencilRegistry=function(){};Editor.prototype.destroy=function(){null!=this.graph&&(this.graph.destroy(),this.graph=null)};OpenFile=function(a){this.consumer=this.producer=null;this.done=a;this.args=null};OpenFile.prototype.setConsumer=function(a){this.consumer=a;this.execute()};
OpenFile.prototype.setData=function(){this.args=arguments;this.execute()};OpenFile.prototype.error=function(a){this.cancel(!0);mxUtils.alert(a)};OpenFile.prototype.execute=function(){null!=this.consumer&&null!=this.args&&(this.cancel(!1),this.consumer.apply(this,this.args))};OpenFile.prototype.cancel=function(a){null!=this.done&&this.done(null!=a?a:!0)};
-function Dialog(a,b,d,k,f,m,p,c,e,g,n){var l=e?57:0,q=d,u=k,t=e?0:64,A=mxUtils.getDocumentSize();null!=window.innerHeight&&(A.height=window.innerHeight);var x=A.height,G=Math.max(1,Math.round((A.width-d-t)/2)),z=Math.max(1,Math.round((x-k-a.footerHeight)/3));b.style.maxHeight="100%";d=null!=document.body?Math.min(d,document.body.scrollWidth-t):d;k=Math.min(k,x-t);0<a.dialogs.length&&(this.zIndex+=2*a.dialogs.length);null==this.bg&&(this.bg=a.createDiv("background"),this.bg.style.position="absolute",
-this.bg.style.background=Dialog.backdropColor,this.bg.style.height=x+"px",this.bg.style.right="0px",this.bg.style.zIndex=this.zIndex-2,mxUtils.setOpacity(this.bg,this.bgOpacity));A=mxUtils.getDocumentScrollOrigin(document);this.bg.style.left=A.x+"px";this.bg.style.top=A.y+"px";G+=A.x;z+=A.y;f&&document.body.appendChild(this.bg);var E=a.createDiv(e?"geTransDialog":"geDialog");f=this.getPosition(G,z,d,k);G=f.x;z=f.y;E.style.width=d+"px";E.style.height=k+"px";E.style.left=G+"px";E.style.top=z+"px";E.style.zIndex=
+function Dialog(a,b,d,g,f,m,p,c,e,k,n){var l=e?57:0,q=d,u=g,t=e?0:64,A=mxUtils.getDocumentSize();null!=window.innerHeight&&(A.height=window.innerHeight);var x=A.height,G=Math.max(1,Math.round((A.width-d-t)/2)),z=Math.max(1,Math.round((x-g-a.footerHeight)/3));b.style.maxHeight="100%";d=null!=document.body?Math.min(d,document.body.scrollWidth-t):d;g=Math.min(g,x-t);0<a.dialogs.length&&(this.zIndex+=2*a.dialogs.length);null==this.bg&&(this.bg=a.createDiv("background"),this.bg.style.position="absolute",
+this.bg.style.background=Dialog.backdropColor,this.bg.style.height=x+"px",this.bg.style.right="0px",this.bg.style.zIndex=this.zIndex-2,mxUtils.setOpacity(this.bg,this.bgOpacity));A=mxUtils.getDocumentScrollOrigin(document);this.bg.style.left=A.x+"px";this.bg.style.top=A.y+"px";G+=A.x;z+=A.y;f&&document.body.appendChild(this.bg);var E=a.createDiv(e?"geTransDialog":"geDialog");f=this.getPosition(G,z,d,g);G=f.x;z=f.y;E.style.width=d+"px";E.style.height=g+"px";E.style.left=G+"px";E.style.top=z+"px";E.style.zIndex=
this.zIndex;E.appendChild(b);document.body.appendChild(E);!c&&b.clientHeight>E.clientHeight-t&&(b.style.overflowY="auto");if(m&&(m=document.createElement("img"),m.setAttribute("src",Dialog.prototype.closeImage),m.setAttribute("title",mxResources.get("close")),m.className="geDialogClose",m.style.top=z+14+"px",m.style.left=G+d+38-l+"px",m.style.zIndex=this.zIndex,mxEvent.addListener(m,"click",mxUtils.bind(this,function(){a.hideDialog(!0)})),document.body.appendChild(m),this.dialogImg=m,!n)){var H=!1;
-mxEvent.addGestureListeners(this.bg,mxUtils.bind(this,function(a){H=!0}),null,mxUtils.bind(this,function(c){H&&(a.hideDialog(!0),H=!1)}))}this.resizeListener=mxUtils.bind(this,function(){if(null!=g){var e=g();null!=e&&(q=d=e.w,u=k=e.h)}e=mxUtils.getDocumentSize();x=e.height;this.bg.style.height=x+"px";G=Math.max(1,Math.round((e.width-d-t)/2));z=Math.max(1,Math.round((x-k-a.footerHeight)/3));d=null!=document.body?Math.min(q,document.body.scrollWidth-t):q;k=Math.min(u,x-t);e=this.getPosition(G,z,d,
-k);G=e.x;z=e.y;E.style.left=G+"px";E.style.top=z+"px";E.style.width=d+"px";E.style.height=k+"px";!c&&b.clientHeight>E.clientHeight-t&&(b.style.overflowY="auto");null!=this.dialogImg&&(this.dialogImg.style.top=z+14+"px",this.dialogImg.style.left=G+d+38-l+"px")});mxEvent.addListener(window,"resize",this.resizeListener);this.onDialogClose=p;this.container=E;a.editor.fireEvent(new mxEventObject("showDialog"))}Dialog.backdropColor="white";Dialog.prototype.zIndex=mxPopupMenu.prototype.zIndex-2;
+mxEvent.addGestureListeners(this.bg,mxUtils.bind(this,function(a){H=!0}),null,mxUtils.bind(this,function(c){H&&(a.hideDialog(!0),H=!1)}))}this.resizeListener=mxUtils.bind(this,function(){if(null!=k){var e=k();null!=e&&(q=d=e.w,u=g=e.h)}e=mxUtils.getDocumentSize();x=e.height;this.bg.style.height=x+"px";G=Math.max(1,Math.round((e.width-d-t)/2));z=Math.max(1,Math.round((x-g-a.footerHeight)/3));d=null!=document.body?Math.min(q,document.body.scrollWidth-t):q;g=Math.min(u,x-t);e=this.getPosition(G,z,d,
+g);G=e.x;z=e.y;E.style.left=G+"px";E.style.top=z+"px";E.style.width=d+"px";E.style.height=g+"px";!c&&b.clientHeight>E.clientHeight-t&&(b.style.overflowY="auto");null!=this.dialogImg&&(this.dialogImg.style.top=z+14+"px",this.dialogImg.style.left=G+d+38-l+"px")});mxEvent.addListener(window,"resize",this.resizeListener);this.onDialogClose=p;this.container=E;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+
@@ -2059,48 +2059,49 @@ Dialog.prototype.lockedImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoA
"/locked.png";
Dialog.prototype.unlockedImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAMAAABhq6zVAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MzdDMDZCN0QxNzIxMTFFNUI0RTk5NTg4OTcyMUUyODEiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MzdDMDZCN0UxNzIxMTFFNUI0RTk5NTg4OTcyMUUyODEiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDozN0MwNkI3QjE3MjExMUU1QjRFOTk1ODg5NzIxRTI4MSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDozN0MwNkI3QzE3MjExMUU1QjRFOTk1ODg5NzIxRTI4MSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PkKMpVwAAAAYUExURZmZmbKysr+/v6ysrOXl5czMzLGxsf///zHN5lwAAAAIdFJOU/////////8A3oO9WQAAADxJREFUeNpUzFESACAEBNBVsfe/cZJU+8Mzs8CIABCidtfGOndnYsT40HDSiCcbPdoJo10o9aI677cpwACRoAF3dFNlswAAAABJRU5ErkJggg==":IMAGE_PATH+
"/unlocked.png";Dialog.prototype.bgOpacity=80;Dialog.prototype.getPosition=function(a,b){return new mxPoint(a,b)};Dialog.prototype.close=function(a,b){if(null!=this.onDialogClose){if(0==this.onDialogClose(a,b))return!1;this.onDialogClose=null}null!=this.dialogImg&&(this.dialogImg.parentNode.removeChild(this.dialogImg),this.dialogImg=null);null!=this.bg&&null!=this.bg.parentNode&&this.bg.parentNode.removeChild(this.bg);mxEvent.removeListener(window,"resize",this.resizeListener);this.container.parentNode.removeChild(this.container)};
-var ErrorDialog=function(a,b,d,k,f,m,p,c,e,g,n){e=null!=e?e:!0;var l=document.createElement("div");l.style.textAlign="center";if(null!=b){var q=document.createElement("div");q.style.padding="0px";q.style.margin="0px";q.style.fontSize="18px";q.style.paddingBottom="16px";q.style.marginBottom="10px";q.style.borderBottom="1px solid #c0c0c0";q.style.color="gray";q.style.whiteSpace="nowrap";q.style.textOverflow="ellipsis";q.style.overflow="hidden";mxUtils.write(q,b);q.setAttribute("title",b);l.appendChild(q)}b=
-document.createElement("div");b.style.lineHeight="1.2em";b.style.padding="6px";b.innerHTML=d;l.appendChild(b);d=document.createElement("div");d.style.marginTop="12px";d.style.textAlign="center";null!=m&&(b=mxUtils.button(mxResources.get("tryAgain"),function(){a.hideDialog();m()}),b.className="geBtn",d.appendChild(b),d.style.textAlign="center");null!=g&&(g=mxUtils.button(g,function(){null!=n&&n()}),g.className="geBtn",d.appendChild(g));var u=mxUtils.button(k,function(){e&&a.hideDialog();null!=f&&f()});
-u.className="geBtn";d.appendChild(u);null!=p&&(k=mxUtils.button(p,function(){e&&a.hideDialog();null!=c&&c()}),k.className="geBtn gePrimaryBtn",d.appendChild(k));this.init=function(){u.focus()};l.appendChild(d);this.container=l},PrintDialog=function(a,b){this.create(a,b)};
-PrintDialog.prototype.create=function(a){function b(a){var e=c.checked||g.checked,b=parseInt(l.value)/100;isNaN(b)&&(b=1,l.value="100%");var b=.75*b,f=d.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,k=1/d.pageScale;if(e){var q=c.checked?1:parseInt(n.value);isNaN(q)||(k=mxUtils.getScaleForPageCount(q,d,f))}d.getGraphBounds();var m=q=0,f=mxRectangle.fromRectangle(f);f.width=Math.ceil(f.width*b);f.height=Math.ceil(f.height*b);k*=b;!e&&d.pageVisible?(b=d.getPageLayout(),q-=b.x*f.width,m-=b.y*f.height):
-e=!0;e=PrintDialog.createPrintPreview(d,k,f,0,q,m,e);e.open();a&&PrintDialog.printPreview(e)}var d=a.editor.graph,k,f,m=document.createElement("table");m.style.width="100%";m.style.height="100%";var p=document.createElement("tbody");k=document.createElement("tr");var c=document.createElement("input");c.setAttribute("type","checkbox");f=document.createElement("td");f.setAttribute("colspan","2");f.style.fontSize="10pt";f.appendChild(c);var e=document.createElement("span");mxUtils.write(e," "+mxResources.get("fitPage"));
-f.appendChild(e);mxEvent.addListener(e,"click",function(a){c.checked=!c.checked;g.checked=!c.checked;mxEvent.consume(a)});mxEvent.addListener(c,"change",function(){g.checked=!c.checked});k.appendChild(f);p.appendChild(k);k=k.cloneNode(!1);var g=document.createElement("input");g.setAttribute("type","checkbox");f=document.createElement("td");f.style.fontSize="10pt";f.appendChild(g);e=document.createElement("span");mxUtils.write(e," "+mxResources.get("posterPrint")+":");f.appendChild(e);mxEvent.addListener(e,
-"click",function(a){g.checked=!g.checked;c.checked=!g.checked;mxEvent.consume(a)});k.appendChild(f);var n=document.createElement("input");n.setAttribute("value","1");n.setAttribute("type","number");n.setAttribute("min","1");n.setAttribute("size","4");n.setAttribute("disabled","disabled");n.style.width="50px";f=document.createElement("td");f.style.fontSize="10pt";f.appendChild(n);mxUtils.write(f," "+mxResources.get("pages")+" (max)");k.appendChild(f);p.appendChild(k);mxEvent.addListener(g,"change",
-function(){g.checked?n.removeAttribute("disabled"):n.setAttribute("disabled","disabled");c.checked=!g.checked});k=k.cloneNode(!1);f=document.createElement("td");mxUtils.write(f,mxResources.get("pageScale")+":");k.appendChild(f);f=document.createElement("td");var l=document.createElement("input");l.setAttribute("value","100 %");l.setAttribute("size","5");l.style.width="50px";f.appendChild(l);k.appendChild(f);p.appendChild(k);k=document.createElement("tr");f=document.createElement("td");f.colSpan=2;
+var ErrorDialog=function(a,b,d,g,f,m,p,c,e,k,n){e=null!=e?e:!0;var l=document.createElement("div");l.style.textAlign="center";if(null!=b){var q=document.createElement("div");q.style.padding="0px";q.style.margin="0px";q.style.fontSize="18px";q.style.paddingBottom="16px";q.style.marginBottom="10px";q.style.borderBottom="1px solid #c0c0c0";q.style.color="gray";q.style.whiteSpace="nowrap";q.style.textOverflow="ellipsis";q.style.overflow="hidden";mxUtils.write(q,b);q.setAttribute("title",b);l.appendChild(q)}b=
+document.createElement("div");b.style.lineHeight="1.2em";b.style.padding="6px";b.innerHTML=d;l.appendChild(b);d=document.createElement("div");d.style.marginTop="12px";d.style.textAlign="center";null!=m&&(b=mxUtils.button(mxResources.get("tryAgain"),function(){a.hideDialog();m()}),b.className="geBtn",d.appendChild(b),d.style.textAlign="center");null!=k&&(k=mxUtils.button(k,function(){null!=n&&n()}),k.className="geBtn",d.appendChild(k));var u=mxUtils.button(g,function(){e&&a.hideDialog();null!=f&&f()});
+u.className="geBtn";d.appendChild(u);null!=p&&(g=mxUtils.button(p,function(){e&&a.hideDialog();null!=c&&c()}),g.className="geBtn gePrimaryBtn",d.appendChild(g));this.init=function(){u.focus()};l.appendChild(d);this.container=l},PrintDialog=function(a,b){this.create(a,b)};
+PrintDialog.prototype.create=function(a){function b(a){var e=c.checked||k.checked,b=parseInt(l.value)/100;isNaN(b)&&(b=1,l.value="100%");var b=.75*b,f=d.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,g=1/d.pageScale;if(e){var q=c.checked?1:parseInt(n.value);isNaN(q)||(g=mxUtils.getScaleForPageCount(q,d,f))}d.getGraphBounds();var m=q=0,f=mxRectangle.fromRectangle(f);f.width=Math.ceil(f.width*b);f.height=Math.ceil(f.height*b);g*=b;!e&&d.pageVisible?(b=d.getPageLayout(),q-=b.x*f.width,m-=b.y*f.height):
+e=!0;e=PrintDialog.createPrintPreview(d,g,f,0,q,m,e);e.open();a&&PrintDialog.printPreview(e)}var d=a.editor.graph,g,f,m=document.createElement("table");m.style.width="100%";m.style.height="100%";var p=document.createElement("tbody");g=document.createElement("tr");var c=document.createElement("input");c.setAttribute("type","checkbox");f=document.createElement("td");f.setAttribute("colspan","2");f.style.fontSize="10pt";f.appendChild(c);var e=document.createElement("span");mxUtils.write(e," "+mxResources.get("fitPage"));
+f.appendChild(e);mxEvent.addListener(e,"click",function(a){c.checked=!c.checked;k.checked=!c.checked;mxEvent.consume(a)});mxEvent.addListener(c,"change",function(){k.checked=!c.checked});g.appendChild(f);p.appendChild(g);g=g.cloneNode(!1);var k=document.createElement("input");k.setAttribute("type","checkbox");f=document.createElement("td");f.style.fontSize="10pt";f.appendChild(k);e=document.createElement("span");mxUtils.write(e," "+mxResources.get("posterPrint")+":");f.appendChild(e);mxEvent.addListener(e,
+"click",function(a){k.checked=!k.checked;c.checked=!k.checked;mxEvent.consume(a)});g.appendChild(f);var n=document.createElement("input");n.setAttribute("value","1");n.setAttribute("type","number");n.setAttribute("min","1");n.setAttribute("size","4");n.setAttribute("disabled","disabled");n.style.width="50px";f=document.createElement("td");f.style.fontSize="10pt";f.appendChild(n);mxUtils.write(f," "+mxResources.get("pages")+" (max)");g.appendChild(f);p.appendChild(g);mxEvent.addListener(k,"change",
+function(){k.checked?n.removeAttribute("disabled"):n.setAttribute("disabled","disabled");c.checked=!k.checked});g=g.cloneNode(!1);f=document.createElement("td");mxUtils.write(f,mxResources.get("pageScale")+":");g.appendChild(f);f=document.createElement("td");var l=document.createElement("input");l.setAttribute("value","100 %");l.setAttribute("size","5");l.style.width="50px";f.appendChild(l);g.appendChild(f);p.appendChild(g);g=document.createElement("tr");f=document.createElement("td");f.colSpan=2;
f.style.paddingTop="20px";f.setAttribute("align","right");e=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});e.className="geBtn";a.editor.cancelFirst&&f.appendChild(e);if(PrintDialog.previewEnabled){var q=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog();b(!1)});q.className="geBtn";f.appendChild(q)}q=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){a.hideDialog();b(!0)});q.className="geBtn gePrimaryBtn";f.appendChild(q);a.editor.cancelFirst||
-f.appendChild(e);k.appendChild(f);p.appendChild(k);m.appendChild(p);this.container=m};PrintDialog.printPreview=function(a){try{if(null!=a.wnd){var b=function(){a.wnd.focus();a.wnd.print();a.wnd.close()};mxClient.IS_GC?window.setTimeout(b,500):b()}}catch(d){}};
-PrintDialog.createPrintPreview=function(a,b,d,k,f,m,p){b=new mxPrintPreview(a,b,d,k,f,m);b.title=mxResources.get("preview");b.printBackgroundImage=!0;b.autoOrigin=p;a=a.background;if(null==a||""==a||a==mxConstants.NONE)a="#ffffff";b.backgroundColor=a;var c=b.writeHead;b.writeHead=function(a){c.apply(this,arguments);a.writeln('<style type="text/css">');a.writeln("@media screen {");a.writeln(" body > div { padding:30px;box-sizing:content-box; }");a.writeln("}");a.writeln("</style>")};return b};
+f.appendChild(e);g.appendChild(f);p.appendChild(g);m.appendChild(p);this.container=m};PrintDialog.printPreview=function(a){try{if(null!=a.wnd){var b=function(){a.wnd.focus();a.wnd.print();a.wnd.close()};mxClient.IS_GC?window.setTimeout(b,500):b()}}catch(d){}};
+PrintDialog.createPrintPreview=function(a,b,d,g,f,m,p){b=new mxPrintPreview(a,b,d,g,f,m);b.title=mxResources.get("preview");b.printBackgroundImage=!0;b.autoOrigin=p;a=a.background;if(null==a||""==a||a==mxConstants.NONE)a="#ffffff";b.backgroundColor=a;var c=b.writeHead;b.writeHead=function(a){c.apply(this,arguments);a.writeln('<style type="text/css">');a.writeln("@media screen {");a.writeln(" body > div { padding:30px;box-sizing:content-box; }");a.writeln("}");a.writeln("</style>")};return b};
PrintDialog.previewEnabled=!0;
-var PageSetupDialog=function(a){function b(){null==n||n==mxConstants.NONE?(g.style.backgroundColor="",g.style.backgroundImage="url('"+Dialog.prototype.noColorImage+"')"):(g.style.backgroundColor=n,g.style.backgroundImage="")}function d(){var c=t;null!=c&&Graph.isPageLink(c.src)&&(c=a.createImageForPageLink(c.src));null!=c&&null!=c.src?(u.setAttribute("src",c.src),u.style.display=""):(u.removeAttribute("src"),u.style.display="none")}var k=a.editor.graph,f,m,p=document.createElement("table");p.style.width=
-"100%";p.style.height="100%";var c=document.createElement("tbody");f=document.createElement("tr");m=document.createElement("td");m.style.verticalAlign="top";m.style.fontSize="10pt";mxUtils.write(m,mxResources.get("paperSize")+":");f.appendChild(m);m=document.createElement("td");m.style.verticalAlign="top";m.style.fontSize="10pt";var e=PageSetupDialog.addPageFormatPanel(m,"pagesetupdialog",k.pageFormat);f.appendChild(m);c.appendChild(f);f=document.createElement("tr");m=document.createElement("td");
-mxUtils.write(m,mxResources.get("background")+":");f.appendChild(m);m=document.createElement("td");m.style.whiteSpace="nowrap";document.createElement("input").setAttribute("type","text");var g=document.createElement("button");g.style.width="22px";g.style.height="22px";g.style.cursor="pointer";g.style.marginRight="20px";g.style.backgroundPosition="center center";g.style.backgroundRepeat="no-repeat";mxClient.IS_FF&&(g.style.position="relative",g.style.top="-6px");var n=k.background;b();mxEvent.addListener(g,
-"click",function(c){a.pickColor(n||"none",function(a){n=a;b()});mxEvent.consume(c)});m.appendChild(g);mxUtils.write(m,mxResources.get("gridSize")+":");var l=document.createElement("input");l.setAttribute("type","number");l.setAttribute("min","0");l.style.width="40px";l.style.marginLeft="6px";l.value=k.getGridSize();m.appendChild(l);mxEvent.addListener(l,"change",function(){var a=parseInt(l.value);l.value=Math.max(1,isNaN(a)?k.getGridSize():a)});f.appendChild(m);c.appendChild(f);f=document.createElement("tr");
+var PageSetupDialog=function(a){function b(){null==n||n==mxConstants.NONE?(k.style.backgroundColor="",k.style.backgroundImage="url('"+Dialog.prototype.noColorImage+"')"):(k.style.backgroundColor=n,k.style.backgroundImage="")}function d(){var c=t;null!=c&&Graph.isPageLink(c.src)&&(c=a.createImageForPageLink(c.src));null!=c&&null!=c.src?(u.setAttribute("src",c.src),u.style.display=""):(u.removeAttribute("src"),u.style.display="none")}var g=a.editor.graph,f,m,p=document.createElement("table");p.style.width=
+"100%";p.style.height="100%";var c=document.createElement("tbody");f=document.createElement("tr");m=document.createElement("td");m.style.verticalAlign="top";m.style.fontSize="10pt";mxUtils.write(m,mxResources.get("paperSize")+":");f.appendChild(m);m=document.createElement("td");m.style.verticalAlign="top";m.style.fontSize="10pt";var e=PageSetupDialog.addPageFormatPanel(m,"pagesetupdialog",g.pageFormat);f.appendChild(m);c.appendChild(f);f=document.createElement("tr");m=document.createElement("td");
+mxUtils.write(m,mxResources.get("background")+":");f.appendChild(m);m=document.createElement("td");m.style.whiteSpace="nowrap";document.createElement("input").setAttribute("type","text");var k=document.createElement("button");k.style.width="22px";k.style.height="22px";k.style.cursor="pointer";k.style.marginRight="20px";k.style.backgroundPosition="center center";k.style.backgroundRepeat="no-repeat";mxClient.IS_FF&&(k.style.position="relative",k.style.top="-6px");var n=g.background;b();mxEvent.addListener(k,
+"click",function(c){a.pickColor(n||"none",function(a){n=a;b()});mxEvent.consume(c)});m.appendChild(k);mxUtils.write(m,mxResources.get("gridSize")+":");var l=document.createElement("input");l.setAttribute("type","number");l.setAttribute("min","0");l.style.width="40px";l.style.marginLeft="6px";l.value=g.getGridSize();m.appendChild(l);mxEvent.addListener(l,"change",function(){var a=parseInt(l.value);l.value=Math.max(1,isNaN(a)?g.getGridSize():a)});f.appendChild(m);c.appendChild(f);f=document.createElement("tr");
m=document.createElement("td");mxUtils.write(m,mxResources.get("image")+":");f.appendChild(m);m=document.createElement("td");var q=document.createElement("button");q.className="geBtn";q.style.margin="0px";mxUtils.write(q,mxResources.get("change")+"...");var u=document.createElement("img");u.setAttribute("valign","middle");u.style.verticalAlign="middle";u.style.border="1px solid lightGray";u.style.borderRadius="4px";u.style.marginRight="14px";u.style.maxWidth="100px";u.style.cursor="pointer";u.style.height=
-"60px";u.style.padding="4px";var t=k.backgroundImage,A=function(c){a.showBackgroundImageDialog(function(a,c){c||(t=a,d())},t);mxEvent.consume(c)};mxEvent.addListener(q,"click",A);mxEvent.addListener(u,"click",A);d();m.appendChild(u);m.appendChild(q);f.appendChild(m);c.appendChild(f);f=document.createElement("tr");m=document.createElement("td");m.colSpan=2;m.style.paddingTop="16px";m.setAttribute("align","right");q=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});q.className="geBtn";
-a.editor.cancelFirst&&m.appendChild(q);A=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();var c=parseInt(l.value);isNaN(c)||k.gridSize===c||k.setGridSize(c);c=new ChangePageSetup(a,n,t,e.get());c.ignoreColor=k.background==n;c.ignoreImage=(null!=k.backgroundImage?k.backgroundImage.src:null)===(null!=t?t.src:null);k.pageFormat.width==c.previousFormat.width&&k.pageFormat.height==c.previousFormat.height&&c.ignoreColor&&c.ignoreImage||k.model.execute(c)});A.className="geBtn gePrimaryBtn";
+"60px";u.style.padding="4px";var t=g.backgroundImage,A=function(c){a.showBackgroundImageDialog(function(a,c){c||(t=a,d())},t);mxEvent.consume(c)};mxEvent.addListener(q,"click",A);mxEvent.addListener(u,"click",A);d();m.appendChild(u);m.appendChild(q);f.appendChild(m);c.appendChild(f);f=document.createElement("tr");m=document.createElement("td");m.colSpan=2;m.style.paddingTop="16px";m.setAttribute("align","right");q=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});q.className="geBtn";
+a.editor.cancelFirst&&m.appendChild(q);A=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();var c=parseInt(l.value);isNaN(c)||g.gridSize===c||g.setGridSize(c);c=new ChangePageSetup(a,n,t,e.get());c.ignoreColor=g.background==n;c.ignoreImage=(null!=g.backgroundImage?g.backgroundImage.src:null)===(null!=t?t.src:null);g.pageFormat.width==c.previousFormat.width&&g.pageFormat.height==c.previousFormat.height&&c.ignoreColor&&c.ignoreImage||g.model.execute(c)});A.className="geBtn gePrimaryBtn";
m.appendChild(A);a.editor.cancelFirst||m.appendChild(q);f.appendChild(m);c.appendChild(f);p.appendChild(c);this.container=p};
-PageSetupDialog.addPageFormatPanel=function(a,b,d,k){function f(a,b,g){if(g||l!=document.activeElement&&q!=document.activeElement){a=!1;for(b=0;b<t.length;b++)g=t[b],z?"custom"==g.key&&(c.value=g.key,z=!1):null!=g.format&&("a4"==g.key?826==d.width?(d=mxRectangle.fromRectangle(d),d.width=827):826==d.height&&(d=mxRectangle.fromRectangle(d),d.height=827):"a5"==g.key&&(584==d.width?(d=mxRectangle.fromRectangle(d),d.width=583):584==d.height&&(d=mxRectangle.fromRectangle(d),d.height=583)),d.width==g.format.width&&
-d.height==g.format.height?(c.value=g.key,m.setAttribute("checked","checked"),m.defaultChecked=!0,m.checked=!0,p.removeAttribute("checked"),p.defaultChecked=!1,p.checked=!1,a=!0):d.width==g.format.height&&d.height==g.format.width&&(c.value=g.key,m.removeAttribute("checked"),m.defaultChecked=!1,m.checked=!1,p.setAttribute("checked","checked"),p.defaultChecked=!0,a=p.checked=!0));a?(e.style.display="",n.style.display="none"):(l.value=d.width/100,q.value=d.height/100,m.setAttribute("checked","checked"),
+PageSetupDialog.addPageFormatPanel=function(a,b,d,g){function f(a,b,k){if(k||l!=document.activeElement&&q!=document.activeElement){a=!1;for(b=0;b<t.length;b++)k=t[b],z?"custom"==k.key&&(c.value=k.key,z=!1):null!=k.format&&("a4"==k.key?826==d.width?(d=mxRectangle.fromRectangle(d),d.width=827):826==d.height&&(d=mxRectangle.fromRectangle(d),d.height=827):"a5"==k.key&&(584==d.width?(d=mxRectangle.fromRectangle(d),d.width=583):584==d.height&&(d=mxRectangle.fromRectangle(d),d.height=583)),d.width==k.format.width&&
+d.height==k.format.height?(c.value=k.key,m.setAttribute("checked","checked"),m.defaultChecked=!0,m.checked=!0,p.removeAttribute("checked"),p.defaultChecked=!1,p.checked=!1,a=!0):d.width==k.format.height&&d.height==k.format.width&&(c.value=k.key,m.removeAttribute("checked"),m.defaultChecked=!1,m.checked=!1,p.setAttribute("checked","checked"),p.defaultChecked=!0,a=p.checked=!0));a?(e.style.display="",n.style.display="none"):(l.value=d.width/100,q.value=d.height/100,m.setAttribute("checked","checked"),
c.value="custom",e.style.display="none",n.style.display="")}}b="format-"+b;var m=document.createElement("input");m.setAttribute("name",b);m.setAttribute("type","radio");m.setAttribute("value","portrait");var p=document.createElement("input");p.setAttribute("name",b);p.setAttribute("type","radio");p.setAttribute("value","landscape");var c=document.createElement("select");c.style.marginBottom="8px";c.style.width="202px";var e=document.createElement("div");e.style.marginLeft="4px";e.style.width="210px";
-e.style.height="24px";m.style.marginRight="6px";e.appendChild(m);b=document.createElement("span");b.style.maxWidth="100px";mxUtils.write(b,mxResources.get("portrait"));e.appendChild(b);p.style.marginLeft="10px";p.style.marginRight="6px";e.appendChild(p);var g=document.createElement("span");g.style.width="100px";mxUtils.write(g,mxResources.get("landscape"));e.appendChild(g);var n=document.createElement("div");n.style.marginLeft="4px";n.style.width="210px";n.style.height="24px";var l=document.createElement("input");
+e.style.height="24px";m.style.marginRight="6px";e.appendChild(m);b=document.createElement("span");b.style.maxWidth="100px";mxUtils.write(b,mxResources.get("portrait"));e.appendChild(b);p.style.marginLeft="10px";p.style.marginRight="6px";e.appendChild(p);var k=document.createElement("span");k.style.width="100px";mxUtils.write(k,mxResources.get("landscape"));e.appendChild(k);var n=document.createElement("div");n.style.marginLeft="4px";n.style.width="210px";n.style.height="24px";var l=document.createElement("input");
l.setAttribute("size","7");l.style.textAlign="right";n.appendChild(l);mxUtils.write(n," in x ");var q=document.createElement("input");q.setAttribute("size","7");q.style.textAlign="right";n.appendChild(q);mxUtils.write(n," in");e.style.display="none";n.style.display="none";for(var u={},t=PageSetupDialog.getFormats(),A=0;A<t.length;A++){var x=t[A];u[x.key]=x;var G=document.createElement("option");G.setAttribute("value",x.key);mxUtils.write(G,x.title);c.appendChild(G)}var z=!1;f();a.appendChild(c);mxUtils.br(a);
-a.appendChild(e);a.appendChild(n);var E=d,H=function(a,b){var g=u[c.value];null!=g.format?(l.value=g.format.width/100,q.value=g.format.height/100,n.style.display="none",e.style.display=""):(e.style.display="none",n.style.display="");g=parseFloat(l.value);if(isNaN(g)||0>=g)l.value=d.width/100;g=parseFloat(q.value);if(isNaN(g)||0>=g)q.value=d.height/100;g=new mxRectangle(0,0,Math.floor(100*parseFloat(l.value)),Math.floor(100*parseFloat(q.value)));"custom"!=c.value&&p.checked&&(g=new mxRectangle(0,0,
-g.height,g.width));b&&z||g.width==E.width&&g.height==E.height||(E=g,null!=k&&k(E))};mxEvent.addListener(b,"click",function(a){m.checked=!0;H(a);mxEvent.consume(a)});mxEvent.addListener(g,"click",function(a){p.checked=!0;H(a);mxEvent.consume(a)});mxEvent.addListener(l,"blur",H);mxEvent.addListener(l,"click",H);mxEvent.addListener(q,"blur",H);mxEvent.addListener(q,"click",H);mxEvent.addListener(p,"change",H);mxEvent.addListener(m,"change",H);mxEvent.addListener(c,"change",function(a){z="custom"==c.value;
+a.appendChild(e);a.appendChild(n);var E=d,H=function(a,b){var k=u[c.value];null!=k.format?(l.value=k.format.width/100,q.value=k.format.height/100,n.style.display="none",e.style.display=""):(e.style.display="none",n.style.display="");k=parseFloat(l.value);if(isNaN(k)||0>=k)l.value=d.width/100;k=parseFloat(q.value);if(isNaN(k)||0>=k)q.value=d.height/100;k=new mxRectangle(0,0,Math.floor(100*parseFloat(l.value)),Math.floor(100*parseFloat(q.value)));"custom"!=c.value&&p.checked&&(k=new mxRectangle(0,0,
+k.height,k.width));b&&z||k.width==E.width&&k.height==E.height||(E=k,null!=g&&g(E))};mxEvent.addListener(b,"click",function(a){m.checked=!0;H(a);mxEvent.consume(a)});mxEvent.addListener(k,"click",function(a){p.checked=!0;H(a);mxEvent.consume(a)});mxEvent.addListener(l,"blur",H);mxEvent.addListener(l,"click",H);mxEvent.addListener(q,"blur",H);mxEvent.addListener(q,"click",H);mxEvent.addListener(p,"change",H);mxEvent.addListener(m,"change",H);mxEvent.addListener(c,"change",function(a){z="custom"==c.value;
H(a,!0)});H();return{set:function(a){d=a;f(null,null,!0)},get:function(){return E},widthInput:l,heightInput:q}};
PageSetupDialog.getFormats=function(){return[{key:"letter",title:'US-Letter (8,5" x 11")',format:mxConstants.PAGE_FORMAT_LETTER_PORTRAIT},{key:"legal",title:'US-Legal (8,5" x 14")',format:new mxRectangle(0,0,850,1400)},{key:"tabloid",title:'US-Tabloid (11" x 17")',format:new mxRectangle(0,0,1100,1700)},{key:"executive",title:'US-Executive (7" x 10")',format:new mxRectangle(0,0,700,1E3)},{key:"a0",title:"A0 (841 mm x 1189 mm)",format:new mxRectangle(0,0,3300,4681)},{key:"a1",title:"A1 (594 mm x 841 mm)",
format:new mxRectangle(0,0,2339,3300)},{key:"a2",title:"A2 (420 mm x 594 mm)",format:new mxRectangle(0,0,1654,2336)},{key:"a3",title:"A3 (297 mm x 420 mm)",format:new mxRectangle(0,0,1169,1654)},{key:"a4",title:"A4 (210 mm x 297 mm)",format:mxConstants.PAGE_FORMAT_A4_PORTRAIT},{key:"a5",title:"A5 (148 mm x 210 mm)",format:new mxRectangle(0,0,583,827)},{key:"a6",title:"A6 (105 mm x 148 mm)",format:new mxRectangle(0,0,413,583)},{key:"a7",title:"A7 (74 mm x 105 mm)",format:new mxRectangle(0,0,291,413)},
{key:"b4",title:"B4 (250 mm x 353 mm)",format:new mxRectangle(0,0,980,1390)},{key:"b5",title:"B5 (176 mm x 250 mm)",format:new mxRectangle(0,0,690,980)},{key:"16-9",title:"16:9 (1600 x 900)",format:new mxRectangle(0,0,900,1600)},{key:"16-10",title:"16:10 (1920 x 1200)",format:new mxRectangle(0,0,1200,1920)},{key:"4-3",title:"4:3 (1600 x 1200)",format:new mxRectangle(0,0,1200,1600)},{key:"custom",title:mxResources.get("custom"),format:null}]};
-var FilenameDialog=function(a,b,d,k,f,m,p,c,e,g,n,l){e=null!=e?e:!0;var q,u,t=document.createElement("table"),A=document.createElement("tbody");t.style.marginTop="8px";q=document.createElement("tr");u=document.createElement("td");u.style.whiteSpace="nowrap";u.style.fontSize="10pt";u.style.width=n?"80px":"120px";mxUtils.write(u,(f||mxResources.get("filename"))+":");q.appendChild(u);var x=document.createElement("input");x.setAttribute("value",b||"");x.style.marginLeft="4px";x.style.width=null!=l?l+
-"px":"180px";var G=mxUtils.button(d,function(){if(null==m||m(x.value))e&&a.hideDialog(),k(x.value)});G.className="geBtn gePrimaryBtn";this.init=function(){if(null!=f||null==p)if(x.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?x.select():document.execCommand("selectAll",!1,null),Graph.fileSupport){var a=t.parentNode;if(null!=a){var c=null;mxEvent.addListener(a,"dragleave",function(a){null!=c&&(c.style.backgroundColor="",c=null);a.stopPropagation();a.preventDefault()});mxEvent.addListener(a,
-"dragover",mxUtils.bind(this,function(a){null==c&&(!mxClient.IS_IE||10<document.documentMode)&&(c=x,c.style.backgroundColor="#ebf2f9");a.stopPropagation();a.preventDefault()}));mxEvent.addListener(a,"drop",mxUtils.bind(this,function(a){null!=c&&(c.style.backgroundColor="",c=null);0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")&&(x.value=decodeURIComponent(a.dataTransfer.getData("text/uri-list")),G.click());a.stopPropagation();a.preventDefault()}))}}};u=document.createElement("td");u.style.whiteSpace=
-"nowrap";u.appendChild(x);q.appendChild(u);if(null!=f||null==p)A.appendChild(q),null!=n&&(null!=a.editor.diagramFileTypes&&(q=FilenameDialog.createFileTypes(a,x,a.editor.diagramFileTypes),q.style.marginLeft="6px",q.style.width="74px",u.appendChild(q),x.style.width=null!=l?l-40+"px":"140px"),u.appendChild(FilenameDialog.createTypeHint(a,x,n)));null!=p&&(q=document.createElement("tr"),u=document.createElement("td"),u.colSpan=2,u.appendChild(p),q.appendChild(u),A.appendChild(q));q=document.createElement("tr");
-u=document.createElement("td");u.colSpan=2;u.style.paddingTop="20px";u.style.whiteSpace="nowrap";u.setAttribute("align","right");n=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog();null!=g&&g()});n.className="geBtn";a.editor.cancelFirst&&u.appendChild(n);null!=c&&(l=mxUtils.button(mxResources.get("help"),function(){a.editor.graph.openLink(c)}),l.className="geBtn",u.appendChild(l));mxEvent.addListener(x,"keypress",function(a){13==a.keyCode&&G.click()});u.appendChild(G);a.editor.cancelFirst||
-u.appendChild(n);q.appendChild(u);A.appendChild(q);t.appendChild(A);this.container=t};FilenameDialog.filenameHelpLink=null;
-FilenameDialog.createTypeHint=function(a,b,d){var k=document.createElement("img");k.style.cssText="vertical-align:top;height:16px;width:16px;margin-left:4px;background-repeat:no-repeat;background-position:center bottom;cursor:pointer;";mxUtils.setOpacity(k,70);var f=function(){k.setAttribute("src",Editor.helpImage);k.setAttribute("title",mxResources.get("help"));for(var a=0;a<d.length;a++)if(0<d[a].ext.length&&b.value.toLowerCase().substring(b.value.length-d[a].ext.length-1)=="."+d[a].ext){k.setAttribute("src",
-mxClient.imageBasePath+"/warning.png");k.setAttribute("title",mxResources.get(d[a].title));break}};mxEvent.addListener(b,"keyup",f);mxEvent.addListener(b,"change",f);mxEvent.addListener(k,"click",function(b){var d=k.getAttribute("title");k.getAttribute("src")==Editor.helpImage?a.editor.graph.openLink(FilenameDialog.filenameHelpLink):""!=d&&a.showError(null,d,mxResources.get("help"),function(){a.editor.graph.openLink(FilenameDialog.filenameHelpLink)},null,mxResources.get("ok"),null,null,null,340,90);
-mxEvent.consume(b)});f();return k};
-FilenameDialog.createFileTypes=function(a,b,d){var k=document.createElement("select");for(a=0;a<d.length;a++){var f=document.createElement("option");f.setAttribute("value",a);mxUtils.write(f,mxResources.get(d[a].description)+" (."+d[a].extension+")");k.appendChild(f)}mxEvent.addListener(k,"change",function(a){a=d[k.value].extension;var f=b.value.lastIndexOf(".");0<f?(a=d[k.value].extension,b.value=b.value.substring(0,f+1)+a):b.value=b.value+"."+a;"createEvent"in document?(a=document.createEvent("HTMLEvents"),
-a.initEvent("change",!1,!0),b.dispatchEvent(a)):b.fireEvent("onchange")});a=function(a){var f=b.value.lastIndexOf(".");a=0;if(0<f)for(var f=b.value.toLowerCase().substring(f+1),c=0;c<d.length;c++)if(f==d[c].extension){a=c;break}k.value=a};mxEvent.addListener(b,"change",a);mxEvent.addListener(b,"keyup",a);a();return k};
+var FilenameDialog=function(a,b,d,g,f,m,p,c,e,k,n,l){e=null!=e?e:!0;var q,u,t=document.createElement("table"),A=document.createElement("tbody");t.style.position="absolute";t.style.top="30px";t.style.left="20px";q=document.createElement("tr");u=document.createElement("td");u.style.whiteSpace="nowrap";u.style.maxWidth="100px";u.style.textOverflow="ellipsis";u.style.fontSize="10pt";mxUtils.write(u,(f||mxResources.get("filename"))+":");q.appendChild(u);var x=document.createElement("input");x.setAttribute("value",
+b||"");x.style.marginLeft="4px";x.style.width=null!=l?l+"px":"180px";var G=mxUtils.button(d,function(){if(null==m||m(x.value))e&&a.hideDialog(),g(x.value)});G.className="geBtn gePrimaryBtn";this.init=function(){if(null!=f||null==p)if(x.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?x.select():document.execCommand("selectAll",!1,null),Graph.fileSupport){var a=t.parentNode;if(null!=a){var c=null;mxEvent.addListener(a,"dragleave",function(a){null!=c&&(c.style.backgroundColor="",c=null);
+a.stopPropagation();a.preventDefault()});mxEvent.addListener(a,"dragover",mxUtils.bind(this,function(a){null==c&&(!mxClient.IS_IE||10<document.documentMode)&&(c=x,c.style.backgroundColor="#ebf2f9");a.stopPropagation();a.preventDefault()}));mxEvent.addListener(a,"drop",mxUtils.bind(this,function(a){null!=c&&(c.style.backgroundColor="",c=null);0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")&&(x.value=decodeURIComponent(a.dataTransfer.getData("text/uri-list")),G.click());a.stopPropagation();
+a.preventDefault()}))}}};u=document.createElement("td");u.style.whiteSpace="nowrap";u.appendChild(x);q.appendChild(u);if(null!=f||null==p)A.appendChild(q),null!=n&&(u.appendChild(FilenameDialog.createTypeHint(a,x,n)),null!=a.editor.diagramFileTypes&&(q=document.createElement("tr"),u=document.createElement("td"),u.style.whiteSpace="nowrap",u.style.maxWidth="100px",u.style.textOverflow="ellipsis",u.style.fontSize="10pt",mxUtils.write(u,mxResources.get("type")+":"),q.appendChild(u),u=document.createElement("td"),
+u.style.whiteSpace="nowrap",q.appendChild(u),b=FilenameDialog.createFileTypes(a,x,a.editor.diagramFileTypes),b.style.marginLeft="4px",b.style.width="198px",u.appendChild(b),x.style.width=null!=l?l-40+"px":"190px",q.appendChild(u),A.appendChild(q)));null!=p&&(q=document.createElement("tr"),u=document.createElement("td"),u.colSpan=2,u.appendChild(p),q.appendChild(u),A.appendChild(q));q=document.createElement("tr");u=document.createElement("td");u.colSpan=2;u.style.paddingTop=null!=n?"12px":"20px";u.style.whiteSpace=
+"nowrap";u.setAttribute("align","right");n=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog();null!=k&&k()});n.className="geBtn";a.editor.cancelFirst&&u.appendChild(n);null!=c&&(l=mxUtils.button(mxResources.get("help"),function(){a.editor.graph.openLink(c)}),l.className="geBtn",u.appendChild(l));mxEvent.addListener(x,"keypress",function(a){13==a.keyCode&&G.click()});u.appendChild(G);a.editor.cancelFirst||u.appendChild(n);q.appendChild(u);A.appendChild(q);t.appendChild(A);this.container=
+t};FilenameDialog.filenameHelpLink=null;
+FilenameDialog.createTypeHint=function(a,b,d){var g=document.createElement("img");g.style.backgroundPosition="center bottom";g.style.backgroundRepeat="no-repeat";g.style.margin="2px 0 0 4px";g.style.verticalAlign="top";g.style.cursor="pointer";g.style.height="16px";g.style.width="16px";mxUtils.setOpacity(g,70);var f=function(){g.setAttribute("src",Editor.helpImage);g.setAttribute("title",mxResources.get("help"));for(var a=0;a<d.length;a++)if(0<d[a].ext.length&&b.value.toLowerCase().substring(b.value.length-
+d[a].ext.length-1)=="."+d[a].ext){g.setAttribute("title",mxResources.get(d[a].title));break}};mxEvent.addListener(b,"keyup",f);mxEvent.addListener(b,"change",f);mxEvent.addListener(g,"click",function(b){var d=g.getAttribute("title");g.getAttribute("src")==Editor.helpImage?a.editor.graph.openLink(FilenameDialog.filenameHelpLink):""!=d&&a.showError(null,d,mxResources.get("help"),function(){a.editor.graph.openLink(FilenameDialog.filenameHelpLink)},null,mxResources.get("ok"),null,null,null,340,90);mxEvent.consume(b)});
+f();return g};
+FilenameDialog.createFileTypes=function(a,b,d){var g=document.createElement("select");for(a=0;a<d.length;a++){var f=document.createElement("option");f.setAttribute("value",a);mxUtils.write(f,mxResources.get(d[a].description)+" (."+d[a].extension+")");g.appendChild(f)}mxEvent.addListener(g,"change",function(a){a=d[g.value].extension;var f=b.value.lastIndexOf(".drawio."),f=0<f?f:b.value.lastIndexOf(".");"drawio"!=a&&(a="drawio."+a);b.value=0<f?b.value.substring(0,f+1)+a:b.value+"."+a;"createEvent"in
+document?(a=document.createEvent("HTMLEvents"),a.initEvent("change",!1,!0),b.dispatchEvent(a)):b.fireEvent("onchange")});a=function(a){a=b.value.toLowerCase();for(var f=0,c=0;c<d.length;c++){var e=d[c].extension,k=null;"drawio"!=e&&(k=e,e=".drawio."+e);if(a.substring(a.length-e.length-1)=="."+e||null!=k&&a.substring(a.length-k.length-1)=="."+k){f=c;break}}g.value=f};mxEvent.addListener(b,"change",a);mxEvent.addListener(b,"keyup",a);a();return g};
(function(){mxGraphView.prototype.validateBackgroundPage=function(){var a=this.graph;if(null!=a.container&&!a.transparentBackground){if(a.pageVisible){var c=this.getBackgroundPageBounds();if(null==this.backgroundPageShape){for(var e=a.container.firstChild;null!=e&&e.nodeType!=mxConstants.NODETYPE_ELEMENT;)e=e.nextSibling;null!=e&&(this.backgroundPageShape=this.createBackgroundPageShape(c),this.backgroundPageShape.scale=1,this.backgroundPageShape.isShadow=!0,this.backgroundPageShape.dialect=mxConstants.DIALECT_STRICTHTML,
this.backgroundPageShape.init(a.container),e.style.position="absolute",a.container.insertBefore(this.backgroundPageShape.node,e),this.backgroundPageShape.redraw(),this.backgroundPageShape.node.className="geBackgroundPage",mxEvent.addListener(this.backgroundPageShape.node,"dblclick",mxUtils.bind(this,function(c){a.dblClick(c)})),mxEvent.addGestureListeners(this.backgroundPageShape.node,mxUtils.bind(this,function(c){a.fireMouseEvent(mxEvent.MOUSE_DOWN,new mxMouseEvent(c))}),mxUtils.bind(this,function(c){null!=
a.tooltipHandler&&a.tooltipHandler.isHideOnHover()&&a.tooltipHandler.hide();a.isMouseDown&&!mxEvent.isConsumed(c)&&a.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(c))}),mxUtils.bind(this,function(c){a.fireMouseEvent(mxEvent.MOUSE_UP,new mxMouseEvent(c))})))}else this.backgroundPageShape.scale=1,this.backgroundPageShape.bounds=c,this.backgroundPageShape.redraw()}else null!=this.backgroundPageShape&&(this.backgroundPageShape.destroy(),this.backgroundPageShape=null);this.validateBackgroundStyles()}};
@@ -2108,54 +2109,54 @@ mxGraphView.prototype.validateBackgroundStyles=function(){var a=this.graph,c=nul
")";var f=e=0;null!=a.view.backgroundPageShape&&(f=this.getBackgroundPageBounds(),e=1+f.x,f=1+f.y);d=-Math.round(d-mxUtils.mod(this.translate.x*this.scale-e,d))+"px "+-Math.round(d-mxUtils.mod(this.translate.y*this.scale-f,d))+"px"}e=a.view.canvas;null!=e.ownerSVGElement&&(e=e.ownerSVGElement);null!=a.view.backgroundPageShape?(a.view.backgroundPageShape.node.style.backgroundPosition=d,a.view.backgroundPageShape.node.style.backgroundImage=b,a.view.backgroundPageShape.node.style.backgroundColor=c,a.view.backgroundPageShape.node.style.borderColor=
a.defaultPageBorderColor,a.container.className="geDiagramContainer geDiagramBackdrop",e.style.backgroundImage="none",e.style.backgroundColor=""):(a.container.className="geDiagramContainer",e.style.backgroundPosition=d,e.style.backgroundColor=c,e.style.backgroundImage=b)};mxGraphView.prototype.createSvgGrid=function(a){for(var c=this.graph.gridSize*this.scale;c<this.minGridSize;)c*=2;for(var e=this.gridSteps*c,b=[],d=1;d<this.gridSteps;d++){var f=d*c;b.push("M 0 "+f+" L "+e+" "+f+" M "+f+" 0 L "+f+
" "+e)}return'<svg width="'+e+'" height="'+e+'" xmlns="'+mxConstants.NS_SVG+'"><defs><pattern id="grid" width="'+e+'" height="'+e+'" patternUnits="userSpaceOnUse"><path d="'+b.join(" ")+'" fill="none" stroke="'+a+'" opacity="0.2" stroke-width="1"/><path d="M '+e+" 0 L 0 0 0 "+e+'" fill="none" stroke="'+a+'" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(#grid)"/></svg>'};var a=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(b,c){a.apply(this,arguments);
-if(null!=this.shiftPreview1){var e=this.view.canvas;null!=e.ownerSVGElement&&(e=e.ownerSVGElement);var g=this.gridSize*this.view.scale*this.view.gridSteps,g=-Math.round(g-mxUtils.mod(this.view.translate.x*this.view.scale+b,g))+"px "+-Math.round(g-mxUtils.mod(this.view.translate.y*this.view.scale+c,g))+"px";e.style.backgroundPosition=g}};mxGraph.prototype.updatePageBreaks=function(a,c,e){var b=this.view.scale,d=this.view.translate,f=this.pageFormat,k=b*this.pageScale,m=this.view.getBackgroundPageBounds();
-c=m.width;e=m.height;var t=new mxRectangle(b*d.x,b*d.y,f.width*k,f.height*k),p=(a=a&&Math.min(t.width,t.height)>this.minPageBreakDist)?Math.ceil(e/t.height)-1:0,x=a?Math.ceil(c/t.width)-1:0,G=m.x+c,z=m.y+e;null==this.horizontalPageBreaks&&0<p&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<x&&(this.verticalPageBreaks=[]);a=mxUtils.bind(this,function(a){if(null!=a){for(var c=a==this.horizontalPageBreaks?p:x,e=0;e<=c;e++){var b=a==this.horizontalPageBreaks?[new mxPoint(Math.round(m.x),
+if(null!=this.shiftPreview1){var e=this.view.canvas;null!=e.ownerSVGElement&&(e=e.ownerSVGElement);var k=this.gridSize*this.view.scale*this.view.gridSteps,k=-Math.round(k-mxUtils.mod(this.view.translate.x*this.view.scale+b,k))+"px "+-Math.round(k-mxUtils.mod(this.view.translate.y*this.view.scale+c,k))+"px";e.style.backgroundPosition=k}};mxGraph.prototype.updatePageBreaks=function(a,c,e){var b=this.view.scale,d=this.view.translate,f=this.pageFormat,g=b*this.pageScale,m=this.view.getBackgroundPageBounds();
+c=m.width;e=m.height;var t=new mxRectangle(b*d.x,b*d.y,f.width*g,f.height*g),p=(a=a&&Math.min(t.width,t.height)>this.minPageBreakDist)?Math.ceil(e/t.height)-1:0,x=a?Math.ceil(c/t.width)-1:0,G=m.x+c,z=m.y+e;null==this.horizontalPageBreaks&&0<p&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<x&&(this.verticalPageBreaks=[]);a=mxUtils.bind(this,function(a){if(null!=a){for(var c=a==this.horizontalPageBreaks?p:x,e=0;e<=c;e++){var b=a==this.horizontalPageBreaks?[new mxPoint(Math.round(m.x),
Math.round(m.y+(e+1)*t.height)),new mxPoint(Math.round(G),Math.round(m.y+(e+1)*t.height))]:[new mxPoint(Math.round(m.x+(e+1)*t.width),Math.round(m.y)),new mxPoint(Math.round(m.x+(e+1)*t.width),Math.round(z))];null!=a[e]?(a[e].points=b,a[e].redraw()):(b=new mxPolyline(b,this.pageBreakColor),b.dialect=this.dialect,b.isDashed=this.pageBreakDashed,b.pointerEvents=!1,b.init(this.view.backgroundPane),b.redraw(),a[e]=b)}for(e=c;e<a.length;e++)a[e].destroy();a.splice(c,a.length-c)}});a(this.horizontalPageBreaks);
-a(this.verticalPageBreaks)};var b=mxGraphHandler.prototype.shouldRemoveCellsFromParent;mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(a,c,e){for(var g=0;g<c.length;g++){if(this.graph.isTableCell(c[g])||this.graph.isTableRow(c[g]))return!1;if(this.graph.getModel().isVertex(c[g])){var d=this.graph.getCellGeometry(c[g]);if(null!=d&&d.relative)return!1}}return b.apply(this,arguments)};var d=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var a=
+a(this.verticalPageBreaks)};var b=mxGraphHandler.prototype.shouldRemoveCellsFromParent;mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(a,c,e){for(var k=0;k<c.length;k++){if(this.graph.isTableCell(c[k])||this.graph.isTableRow(c[k]))return!1;if(this.graph.getModel().isVertex(c[k])){var d=this.graph.getCellGeometry(c[k]);if(null!=d&&d.relative)return!1}}return b.apply(this,arguments)};var d=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var a=
d.apply(this,arguments);a.intersects=mxUtils.bind(this,function(c,e){return this.isConnecting()?!0:mxCellMarker.prototype.intersects.apply(a,arguments)});return a};mxGraphView.prototype.createBackgroundPageShape=function(a){return new mxRectangleShape(a,"#ffffff",this.graph.defaultPageBorderColor)};mxGraphView.prototype.getBackgroundPageBounds=function(){var a=this.getGraphBounds(),c=0<a.width?a.x/this.scale-this.translate.x:0,e=0<a.height?a.y/this.scale-this.translate.y:0,b=this.graph.pageFormat,
-d=this.graph.pageScale,f=b.width*d,b=b.height*d,d=Math.floor(Math.min(0,c)/f),k=Math.floor(Math.min(0,e)/b);return new mxRectangle(this.scale*(this.translate.x+d*f),this.scale*(this.translate.y+k*b),this.scale*(Math.ceil(Math.max(1,c+a.width/this.scale)/f)-d)*f,this.scale*(Math.ceil(Math.max(1,e+a.height/this.scale)/b)-k)*b)};var k=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(a,c){k.apply(this,arguments);this.dialect==mxConstants.DIALECT_SVG||null==this.view.backgroundPageShape||
-this.useScrollbarsForPanning&&mxUtils.hasScrollbars(this.container)||(this.view.backgroundPageShape.node.style.marginLeft=a+"px",this.view.backgroundPageShape.node.style.marginTop=c+"px")};var f=mxPopupMenu.prototype.addItem;mxPopupMenu.prototype.addItem=function(a,c,e,b,d,k){var g=f.apply(this,arguments);null==k||k||mxEvent.addListener(g,"mousedown",function(a){mxEvent.consume(a)});return g};var m=mxGraphHandler.prototype.isPropagateSelectionCell;mxGraphHandler.prototype.isPropagateSelectionCell=
+d=this.graph.pageScale,f=b.width*d,b=b.height*d,d=Math.floor(Math.min(0,c)/f),g=Math.floor(Math.min(0,e)/b);return new mxRectangle(this.scale*(this.translate.x+d*f),this.scale*(this.translate.y+g*b),this.scale*(Math.ceil(Math.max(1,c+a.width/this.scale)/f)-d)*f,this.scale*(Math.ceil(Math.max(1,e+a.height/this.scale)/b)-g)*b)};var g=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(a,c){g.apply(this,arguments);this.dialect==mxConstants.DIALECT_SVG||null==this.view.backgroundPageShape||
+this.useScrollbarsForPanning&&mxUtils.hasScrollbars(this.container)||(this.view.backgroundPageShape.node.style.marginLeft=a+"px",this.view.backgroundPageShape.node.style.marginTop=c+"px")};var f=mxPopupMenu.prototype.addItem;mxPopupMenu.prototype.addItem=function(a,c,e,b,d,g){var k=f.apply(this,arguments);null==g||g||mxEvent.addListener(k,"mousedown",function(a){mxEvent.consume(a)});return k};var m=mxGraphHandler.prototype.isPropagateSelectionCell;mxGraphHandler.prototype.isPropagateSelectionCell=
function(a,c,e){var b,d=this.graph.model.getParent(a);if(c)b=this.graph.model.isEdge(a)?null:this.graph.getCellGeometry(a),b=!this.graph.model.isEdge(d)&&!this.graph.isSiblingSelected(a)&&(null!=b&&b.relative||!this.graph.isContainer(d)||this.graph.isPart(a));else if(b=m.apply(this,arguments),this.graph.isTableCell(a)||this.graph.isTableRow(a))b=d,this.graph.isTable(b)||(b=this.graph.model.getParent(b)),b=!this.graph.selectionCellsHandler.isHandled(b)||this.graph.isCellSelected(b)&&this.graph.isToggleEvent(e.getEvent())||
-this.graph.isCellSelected(a)&&!this.graph.isToggleEvent(e.getEvent())||this.graph.isTableCell(a)&&this.graph.isCellSelected(d);return b};mxPopupMenuHandler.prototype.getCellForPopupEvent=function(a){a=a.getCell();for(var c=this.graph.getModel(),e=c.getParent(a),b=this.graph.view.getState(e),d=this.graph.isCellSelected(a);null!=b&&(c.isVertex(e)||c.isEdge(e));){var f=this.graph.isCellSelected(e),d=d||f;if(f||!d&&(this.graph.isTableCell(a)||this.graph.isTableRow(a)))a=e;e=c.getParent(e)}return a}})();EditorUi=function(a,b,d){mxEventSource.call(this);this.destroyFunctions=[];this.editor=a||new Editor;this.container=b||document.body;var k=this.editor.graph;k.lightbox=d;this.initialDefaultVertexStyle=mxUtils.clone(k.defaultVertexStyle);this.initialDefaultEdgeStyle=mxUtils.clone(k.defaultEdgeStyle);k.useCssTransforms&&(this.lazyZoomDelay=0);mxClient.IS_SVG?mxPopupMenu.prototype.submenuImage="data:image/gif;base64,R0lGODlhCQAJAIAAAP///zMzMyH5BAEAAAAALAAAAAAJAAkAAAIPhI8WebHsHopSOVgb26AAADs=":(new Image).src=
-mxPopupMenu.prototype.submenuImage;mxClient.IS_SVG||null==mxConnectionHandler.prototype.connectImage||((new Image).src=mxConnectionHandler.prototype.connectImage.src);this.editor.chromeless&&!this.editor.editable&&(this.footerHeight=0,k.isEnabled=function(){return!1},k.panningHandler.isForcePanningEvent=function(a){return!mxEvent.isPopupTrigger(a.getEvent())});this.actions=new Actions(this);this.menus=this.createMenus();if(!k.standalone){var f="rounded shadow glass dashed dashPattern labelBackgroundColor comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification sketchStyle pointerEvents".split(" "),
-m="shape edgeStyle curved rounded elbow jumpStyle jumpSize comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification sketchStyle".split(" ");this.setDefaultStyle=function(a){try{var c=k.view.getState(a);if(null!=c){var e=a.clone();e.style="";var b=k.getCellStyle(e);a=[];var e=[],d;for(d in c.style)b[d]!=c.style[d]&&(a.push(c.style[d]),e.push(d));for(var g=k.getModel().getStyle(c.cell),f=null!=g?g.split(";"):[],g=0;g<f.length;g++){var n=
-f[g],l=n.indexOf("=");if(0<=l){d=n.substring(0,l);var q=n.substring(l+1);null!=b[d]&&"none"==q&&(a.push(q),e.push(d))}}k.getModel().isEdge(c.cell)?k.currentEdgeStyle={}:k.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",e,"values",a,"cells",[c.cell]))}}catch(aa){this.handleError(aa)}};this.clearDefaultStyle=function(){k.currentEdgeStyle=mxUtils.clone(k.defaultEdgeStyle);k.currentVertexStyle=mxUtils.clone(k.defaultVertexStyle);this.fireEvent(new mxEventObject("styleChanged",
+this.graph.isCellSelected(a)&&!this.graph.isToggleEvent(e.getEvent())||this.graph.isTableCell(a)&&this.graph.isCellSelected(d);return b};mxPopupMenuHandler.prototype.getCellForPopupEvent=function(a){a=a.getCell();for(var c=this.graph.getModel(),e=c.getParent(a),b=this.graph.view.getState(e),d=this.graph.isCellSelected(a);null!=b&&(c.isVertex(e)||c.isEdge(e));){var f=this.graph.isCellSelected(e),d=d||f;if(f||!d&&(this.graph.isTableCell(a)||this.graph.isTableRow(a)))a=e;e=c.getParent(e)}return a}})();EditorUi=function(a,b,d){mxEventSource.call(this);this.destroyFunctions=[];this.editor=a||new Editor;this.container=b||document.body;var g=this.editor.graph;g.lightbox=d;this.initialDefaultVertexStyle=mxUtils.clone(g.defaultVertexStyle);this.initialDefaultEdgeStyle=mxUtils.clone(g.defaultEdgeStyle);g.useCssTransforms&&(this.lazyZoomDelay=0);mxClient.IS_SVG?mxPopupMenu.prototype.submenuImage="data:image/gif;base64,R0lGODlhCQAJAIAAAP///zMzMyH5BAEAAAAALAAAAAAJAAkAAAIPhI8WebHsHopSOVgb26AAADs=":(new Image).src=
+mxPopupMenu.prototype.submenuImage;mxClient.IS_SVG||null==mxConnectionHandler.prototype.connectImage||((new Image).src=mxConnectionHandler.prototype.connectImage.src);this.editor.chromeless&&!this.editor.editable&&(this.footerHeight=0,g.isEnabled=function(){return!1},g.panningHandler.isForcePanningEvent=function(a){return!mxEvent.isPopupTrigger(a.getEvent())});this.actions=new Actions(this);this.menus=this.createMenus();if(!g.standalone){var f="rounded shadow glass dashed dashPattern labelBackgroundColor comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification sketchStyle pointerEvents".split(" "),
+m="shape edgeStyle curved rounded elbow jumpStyle jumpSize comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification sketchStyle".split(" ");this.setDefaultStyle=function(a){try{var c=g.view.getState(a);if(null!=c){var e=a.clone();e.style="";var b=g.getCellStyle(e);a=[];var e=[],d;for(d in c.style)b[d]!=c.style[d]&&(a.push(c.style[d]),e.push(d));for(var k=g.getModel().getStyle(c.cell),f=null!=k?k.split(";"):[],k=0;k<f.length;k++){var n=
+f[k],l=n.indexOf("=");if(0<=l){d=n.substring(0,l);var q=n.substring(l+1);null!=b[d]&&"none"==q&&(a.push(q),e.push(d))}}g.getModel().isEdge(c.cell)?g.currentEdgeStyle={}:g.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",e,"values",a,"cells",[c.cell]))}}catch(Z){this.handleError(Z)}};this.clearDefaultStyle=function(){g.currentEdgeStyle=mxUtils.clone(g.defaultEdgeStyle);g.currentVertexStyle=mxUtils.clone(g.defaultVertexStyle);this.fireEvent(new mxEventObject("styleChanged",
"keys",[],"values",[],"cells",[]))};var p=["fontFamily","fontSource","fontSize","fontColor"];for(b=0;b<p.length;b++)0>mxUtils.indexOf(f,p[b])&&f.push(p[b]);var c="edgeStyle startArrow startFill startSize endArrow endFill endSize".split(" "),e=[["startArrow","startFill","endArrow","endFill"],["startSize","endSize"],["sourcePerimeterSpacing","targetPerimeterSpacing"],["strokeColor","strokeWidth"],["fillColor","gradientColor","gradientDirection"],["align","verticalAlign"],["opacity"],["html"]];for(b=
-0;b<e.length;b++)for(d=0;d<e[b].length;d++)f.push(e[b][d]);for(b=0;b<m.length;b++)0>mxUtils.indexOf(f,m[b])&&f.push(m[b]);var g=function(a,c,b,d,g,n,l){d=null!=d?d:k.currentVertexStyle;g=null!=g?g:k.currentEdgeStyle;b=null!=b?b:k.getModel();if(l){l=[];for(var v=0;v<a.length;v++)l=l.concat(b.getDescendants(a[v]));a=l}b.beginUpdate();try{for(v=0;v<a.length;v++){var q=a[v],B;if(c)B=["fontSize","fontFamily","fontColor"];else{var t=b.getStyle(q),u=null!=t?t.split(";"):[];B=f.slice();for(var D=0;D<u.length;D++){var J=
-u[D],p=J.indexOf("=");if(0<=p){var x=J.substring(0,p),N=mxUtils.indexOf(B,x);0<=N&&B.splice(N,1);for(l=0;l<e.length;l++){var z=e[l];if(0<=mxUtils.indexOf(z,x))for(var A=0;A<z.length;A++){var C=mxUtils.indexOf(B,z[A]);0<=C&&B.splice(C,1)}}}}}var E=b.isEdge(q);l=E?g:d;for(var H=b.getStyle(q),D=0;D<B.length;D++){var x=B[D],G=l[x];null!=G&&("shape"!=x||E)&&(!E||n||0>mxUtils.indexOf(m,x))&&(H=mxUtils.setStyle(H,x,G))}Editor.simpleLabels&&(H=mxUtils.setStyle(mxUtils.setStyle(H,"html",null),"whiteSpace",
-null));b.setStyle(q,H)}}finally{b.endUpdate()}};k.addListener("cellsInserted",function(a,c){g(c.getProperty("cells"))});k.addListener("textInserted",function(a,c){g(c.getProperty("cells"),!0)});this.insertHandler=g;this.createDivs();this.createUi();this.refresh();var n=mxUtils.bind(this,function(a){null==a&&(a=window.event);return k.isEditing()||null!=a&&this.isSelectionAllowed(a)});this.container==document.body&&(this.menubarContainer.onselectstart=n,this.menubarContainer.onmousedown=n,this.toolbarContainer.onselectstart=
+0;b<e.length;b++)for(d=0;d<e[b].length;d++)f.push(e[b][d]);for(b=0;b<m.length;b++)0>mxUtils.indexOf(f,m[b])&&f.push(m[b]);var k=function(a,c,b,d,k,n,l){d=null!=d?d:g.currentVertexStyle;k=null!=k?k:g.currentEdgeStyle;b=null!=b?b:g.getModel();if(l){l=[];for(var v=0;v<a.length;v++)l=l.concat(b.getDescendants(a[v]));a=l}b.beginUpdate();try{for(v=0;v<a.length;v++){var q=a[v],B;if(c)B=["fontSize","fontFamily","fontColor"];else{var t=b.getStyle(q),u=null!=t?t.split(";"):[];B=f.slice();for(var C=0;C<u.length;C++){var J=
+u[C],x=J.indexOf("=");if(0<=x){var p=J.substring(0,x),z=mxUtils.indexOf(B,p);0<=z&&B.splice(z,1);for(l=0;l<e.length;l++){var N=e[l];if(0<=mxUtils.indexOf(N,p))for(var A=0;A<N.length;A++){var D=mxUtils.indexOf(B,N[A]);0<=D&&B.splice(D,1)}}}}}var E=b.isEdge(q);l=E?k:d;for(var H=b.getStyle(q),C=0;C<B.length;C++){var p=B[C],G=l[p];null!=G&&("shape"!=p||E)&&(!E||n||0>mxUtils.indexOf(m,p))&&(H=mxUtils.setStyle(H,p,G))}Editor.simpleLabels&&(H=mxUtils.setStyle(mxUtils.setStyle(H,"html",null),"whiteSpace",
+null));b.setStyle(q,H)}}finally{b.endUpdate()}};g.addListener("cellsInserted",function(a,c){k(c.getProperty("cells"))});g.addListener("textInserted",function(a,c){k(c.getProperty("cells"),!0)});this.insertHandler=k;this.createDivs();this.createUi();this.refresh();var n=mxUtils.bind(this,function(a){null==a&&(a=window.event);return g.isEditing()||null!=a&&this.isSelectionAllowed(a)});this.container==document.body&&(this.menubarContainer.onselectstart=n,this.menubarContainer.onmousedown=n,this.toolbarContainer.onselectstart=
n,this.toolbarContainer.onmousedown=n,this.diagramContainer.onselectstart=n,this.diagramContainer.onmousedown=n,this.sidebarContainer.onselectstart=n,this.sidebarContainer.onmousedown=n,this.formatContainer.onselectstart=n,this.formatContainer.onmousedown=n,this.footerContainer.onselectstart=n,this.footerContainer.onmousedown=n,null!=this.tabContainer&&(this.tabContainer.onselectstart=n));!this.editor.chromeless||this.editor.editable?(b=function(a){if(null!=a){var c=mxEvent.getSource(a);if("A"==c.nodeName)for(;null!=
-c;){if("geHint"==c.className)return!0;c=c.parentNode}}return n(a)},mxClient.IS_IE&&("undefined"===typeof document.documentMode||9>document.documentMode)?mxEvent.addListener(this.diagramContainer,"contextmenu",b):this.diagramContainer.oncontextmenu=b):k.panningHandler.usePopupTrigger=!1;k.init(this.diagramContainer);mxClient.IS_SVG&&null!=k.view.getDrawPane()&&(b=k.view.getDrawPane().ownerSVGElement,null!=b&&(b.style.position="absolute"));this.hoverIcons=this.createHoverIcons();if(null!=k.graphHandler){var l=
-k.graphHandler.start;k.graphHandler.start=function(){null!=F.hoverIcons&&F.hoverIcons.reset();l.apply(this,arguments)}}mxEvent.addListener(this.diagramContainer,"mousemove",mxUtils.bind(this,function(a){var c=mxUtils.getOffset(this.diagramContainer);0<mxEvent.getClientX(a)-c.x-this.diagramContainer.clientWidth||0<mxEvent.getClientY(a)-c.y-this.diagramContainer.clientHeight?this.diagramContainer.setAttribute("title",mxResources.get("panTooltip")):this.diagramContainer.removeAttribute("title")}));var q=
-!1,u=this.hoverIcons.isResetEvent;this.hoverIcons.isResetEvent=function(a,c){return q||u.apply(this,arguments)};this.keydownHandler=mxUtils.bind(this,function(a){32!=a.which||k.isEditing()?mxEvent.isConsumed(a)||27!=a.keyCode||this.hideDialog(null,!0):(q=!0,this.hoverIcons.reset(),k.container.style.cursor="move",k.isEditing()||mxEvent.getSource(a)!=k.container||mxEvent.consume(a))});mxEvent.addListener(document,"keydown",this.keydownHandler);this.keyupHandler=mxUtils.bind(this,function(a){k.container.style.cursor=
-"";q=!1});mxEvent.addListener(document,"keyup",this.keyupHandler);var t=k.panningHandler.isForcePanningEvent;k.panningHandler.isForcePanningEvent=function(a){return t.apply(this,arguments)||q||mxEvent.isMouseEvent(a.getEvent())&&(this.usePopupTrigger||!mxEvent.isPopupTrigger(a.getEvent()))&&(!mxEvent.isControlDown(a.getEvent())&&mxEvent.isRightMouseButton(a.getEvent())||mxEvent.isMiddleMouseButton(a.getEvent()))};var A=k.cellEditor.isStopEditingEvent;k.cellEditor.isStopEditingEvent=function(a){return A.apply(this,
-arguments)||13==a.keyCode&&(!mxClient.IS_SF&&mxEvent.isControlDown(a)||mxClient.IS_MAC&&mxEvent.isMetaDown(a)||mxClient.IS_SF&&mxEvent.isShiftDown(a))};var x=k.isZoomWheelEvent;k.isZoomWheelEvent=function(){return q||x.apply(this,arguments)};var G=!1,z=null,E=null,H=null,K=mxUtils.bind(this,function(){if(null!=this.toolbar&&G!=k.cellEditor.isContentEditing()){for(var a=this.toolbar.container.firstChild,c=[];null!=a;){var e=a.nextSibling;0>mxUtils.indexOf(this.toolbar.staticElements,a)&&(a.parentNode.removeChild(a),
-c.push(a));a=e}a=this.toolbar.fontMenu;e=this.toolbar.sizeMenu;if(null==H)this.toolbar.createTextToolbar();else{for(var b=0;b<H.length;b++)this.toolbar.container.appendChild(H[b]);this.toolbar.fontMenu=z;this.toolbar.sizeMenu=E}G=k.cellEditor.isContentEditing();z=a;E=e;H=c}}),F=this,I=k.cellEditor.startEditing;k.cellEditor.startEditing=function(){I.apply(this,arguments);K();if(k.cellEditor.isContentEditing()){var a=!1,c=function(){a||(a=!0,window.setTimeout(function(){var c=k.getSelectedEditingElement();
-null!=c&&(c=mxUtils.getCurrentStyle(c),null!=c&&null!=F.toolbar&&(F.toolbar.setFontName(Graph.stripQuotes(c.fontFamily)),F.toolbar.setFontSize(parseInt(c.fontSize))));a=!1},0))};mxEvent.addListener(k.cellEditor.textarea,"input",c);mxEvent.addListener(k.cellEditor.textarea,"touchend",c);mxEvent.addListener(k.cellEditor.textarea,"mouseup",c);mxEvent.addListener(k.cellEditor.textarea,"keyup",c);c()}};var C=k.cellEditor.stopEditing;k.cellEditor.stopEditing=function(a,c){try{C.apply(this,arguments),K()}catch(N){F.handleError(N)}};
-k.container.setAttribute("tabindex","0");k.container.style.cursor="default";if(window.self===window.top&&null!=k.container.parentNode)try{k.container.focus()}catch(U){}var M=k.fireMouseEvent;k.fireMouseEvent=function(a,c,e){a==mxEvent.MOUSE_DOWN&&this.container.focus();M.apply(this,arguments)};k.popupMenuHandler.autoExpand=!0;null!=this.menus&&(k.popupMenuHandler.factoryMethod=mxUtils.bind(this,function(a,c,e){this.menus.createPopupMenu(a,c,e)}));mxEvent.addGestureListeners(document,mxUtils.bind(this,
-function(a){k.popupMenuHandler.hideMenu()}));this.keyHandler=this.createKeyHandler(a);this.getKeyHandler=function(){return keyHandler};k.connectionHandler.addListener(mxEvent.CONNECT,function(a,c){var e=[c.getProperty("cell")];c.getProperty("terminalInserted")&&(e.push(c.getProperty("terminal")),window.setTimeout(function(){null!=F.hoverIcons&&F.hoverIcons.update(k.view.getState(e[e.length-1]))},0));g(e)});this.addListener("styleChanged",mxUtils.bind(this,function(a,e){var b=e.getProperty("cells"),
-d=!1,g=!1;if(0<b.length)for(var n=0;n<b.length&&(d=k.getModel().isVertex(b[n])||d,!(g=k.getModel().isEdge(b[n])||g)||!d);n++);else g=d=!0;for(var b=e.getProperty("keys"),l=e.getProperty("values"),n=0;n<b.length;n++){var q=0<=mxUtils.indexOf(p,b[n]);if("strokeColor"!=b[n]||null!=l[n]&&"none"!=l[n])if(0<=mxUtils.indexOf(m,b[n]))g||0<=mxUtils.indexOf(c,b[n])?null==l[n]?delete k.currentEdgeStyle[b[n]]:k.currentEdgeStyle[b[n]]=l[n]:d&&0<=mxUtils.indexOf(f,b[n])&&(null==l[n]?delete k.currentVertexStyle[b[n]]:
-k.currentVertexStyle[b[n]]=l[n]);else if(0<=mxUtils.indexOf(f,b[n])){if(d||q)null==l[n]?delete k.currentVertexStyle[b[n]]:k.currentVertexStyle[b[n]]=l[n];if(g||q||0<=mxUtils.indexOf(c,b[n]))null==l[n]?delete k.currentEdgeStyle[b[n]]:k.currentEdgeStyle[b[n]]=l[n]}}null!=this.toolbar&&(this.toolbar.setFontName(k.currentVertexStyle.fontFamily||Menus.prototype.defaultFont),this.toolbar.setFontSize(k.currentVertexStyle.fontSize||Menus.prototype.defaultFontSize),null!=this.toolbar.edgeStyleMenu&&(this.toolbar.edgeStyleMenu.getElementsByTagName("div")[0].className=
-"orthogonalEdgeStyle"==k.currentEdgeStyle.edgeStyle&&"1"==k.currentEdgeStyle.curved?"geSprite geSprite-curved":"straight"==k.currentEdgeStyle.edgeStyle||"none"==k.currentEdgeStyle.edgeStyle||null==k.currentEdgeStyle.edgeStyle?"geSprite geSprite-straight":"entityRelationEdgeStyle"==k.currentEdgeStyle.edgeStyle?"geSprite geSprite-entity":"elbowEdgeStyle"==k.currentEdgeStyle.edgeStyle?"geSprite geSprite-"+("vertical"==k.currentEdgeStyle.elbow?"verticalelbow":"horizontalelbow"):"isometricEdgeStyle"==
-k.currentEdgeStyle.edgeStyle?"geSprite geSprite-"+("vertical"==k.currentEdgeStyle.elbow?"verticalisometric":"horizontalisometric"):"geSprite geSprite-orthogonal"),null!=this.toolbar.edgeShapeMenu&&(this.toolbar.edgeShapeMenu.getElementsByTagName("div")[0].className="link"==k.currentEdgeStyle.shape?"geSprite geSprite-linkedge":"flexArrow"==k.currentEdgeStyle.shape?"geSprite geSprite-arrow":"arrow"==k.currentEdgeStyle.shape?"geSprite geSprite-simplearrow":"geSprite geSprite-connection"),null!=this.toolbar.lineStartMenu&&
-(this.toolbar.lineStartMenu.getElementsByTagName("div")[0].className=this.getCssClassForMarker("start",k.currentEdgeStyle.shape,k.currentEdgeStyle[mxConstants.STYLE_STARTARROW],mxUtils.getValue(k.currentEdgeStyle,"startFill","1"))),null!=this.toolbar.lineEndMenu&&(this.toolbar.lineEndMenu.getElementsByTagName("div")[0].className=this.getCssClassForMarker("end",k.currentEdgeStyle.shape,k.currentEdgeStyle[mxConstants.STYLE_ENDARROW],mxUtils.getValue(k.currentEdgeStyle,"endFill","1"))))}));null!=this.toolbar&&
-(a=mxUtils.bind(this,function(){var a=k.currentVertexStyle.fontFamily||"Helvetica",c=String(k.currentVertexStyle.fontSize||"12"),e=k.getView().getState(k.getSelectionCell());null!=e&&(a=e.style[mxConstants.STYLE_FONTFAMILY]||a,c=e.style[mxConstants.STYLE_FONTSIZE]||c,10<a.length&&(a=a.substring(0,8)+"..."));this.toolbar.setFontName(a);this.toolbar.setFontSize(c)}),k.getSelectionModel().addListener(mxEvent.CHANGE,a),k.getModel().addListener(mxEvent.CHANGE,a));k.addListener(mxEvent.CELLS_ADDED,function(a,
-c){var e=c.getProperty("cells"),b=c.getProperty("parent");k.getModel().isLayer(b)&&!k.isCellVisible(b)&&null!=e&&0<e.length&&k.getModel().setVisible(b,!0)});this.gestureHandler=mxUtils.bind(this,function(a){null!=this.currentMenu&&mxEvent.getSource(a)!=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,
+c;){if("geHint"==c.className)return!0;c=c.parentNode}}return n(a)},mxClient.IS_IE&&("undefined"===typeof document.documentMode||9>document.documentMode)?mxEvent.addListener(this.diagramContainer,"contextmenu",b):this.diagramContainer.oncontextmenu=b):g.panningHandler.usePopupTrigger=!1;g.init(this.diagramContainer);mxClient.IS_SVG&&null!=g.view.getDrawPane()&&(b=g.view.getDrawPane().ownerSVGElement,null!=b&&(b.style.position="absolute"));this.hoverIcons=this.createHoverIcons();if(null!=g.graphHandler){var l=
+g.graphHandler.start;g.graphHandler.start=function(){null!=F.hoverIcons&&F.hoverIcons.reset();l.apply(this,arguments)}}mxEvent.addListener(this.diagramContainer,"mousemove",mxUtils.bind(this,function(a){var c=mxUtils.getOffset(this.diagramContainer);0<mxEvent.getClientX(a)-c.x-this.diagramContainer.clientWidth||0<mxEvent.getClientY(a)-c.y-this.diagramContainer.clientHeight?this.diagramContainer.setAttribute("title",mxResources.get("panTooltip")):this.diagramContainer.removeAttribute("title")}));var q=
+!1,u=this.hoverIcons.isResetEvent;this.hoverIcons.isResetEvent=function(a,c){return q||u.apply(this,arguments)};this.keydownHandler=mxUtils.bind(this,function(a){32!=a.which||g.isEditing()?mxEvent.isConsumed(a)||27!=a.keyCode||this.hideDialog(null,!0):(q=!0,this.hoverIcons.reset(),g.container.style.cursor="move",g.isEditing()||mxEvent.getSource(a)!=g.container||mxEvent.consume(a))});mxEvent.addListener(document,"keydown",this.keydownHandler);this.keyupHandler=mxUtils.bind(this,function(a){g.container.style.cursor=
+"";q=!1});mxEvent.addListener(document,"keyup",this.keyupHandler);var t=g.panningHandler.isForcePanningEvent;g.panningHandler.isForcePanningEvent=function(a){return t.apply(this,arguments)||q||mxEvent.isMouseEvent(a.getEvent())&&(this.usePopupTrigger||!mxEvent.isPopupTrigger(a.getEvent()))&&(!mxEvent.isControlDown(a.getEvent())&&mxEvent.isRightMouseButton(a.getEvent())||mxEvent.isMiddleMouseButton(a.getEvent()))};var A=g.cellEditor.isStopEditingEvent;g.cellEditor.isStopEditingEvent=function(a){return A.apply(this,
+arguments)||13==a.keyCode&&(!mxClient.IS_SF&&mxEvent.isControlDown(a)||mxClient.IS_MAC&&mxEvent.isMetaDown(a)||mxClient.IS_SF&&mxEvent.isShiftDown(a))};var x=g.isZoomWheelEvent;g.isZoomWheelEvent=function(){return q||x.apply(this,arguments)};var G=!1,z=null,E=null,H=null,K=mxUtils.bind(this,function(){if(null!=this.toolbar&&G!=g.cellEditor.isContentEditing()){for(var a=this.toolbar.container.firstChild,c=[];null!=a;){var e=a.nextSibling;0>mxUtils.indexOf(this.toolbar.staticElements,a)&&(a.parentNode.removeChild(a),
+c.push(a));a=e}a=this.toolbar.fontMenu;e=this.toolbar.sizeMenu;if(null==H)this.toolbar.createTextToolbar();else{for(var b=0;b<H.length;b++)this.toolbar.container.appendChild(H[b]);this.toolbar.fontMenu=z;this.toolbar.sizeMenu=E}G=g.cellEditor.isContentEditing();z=a;E=e;H=c}}),F=this,I=g.cellEditor.startEditing;g.cellEditor.startEditing=function(){I.apply(this,arguments);K();if(g.cellEditor.isContentEditing()){var a=!1,c=function(){a||(a=!0,window.setTimeout(function(){var c=g.getSelectedEditingElement();
+null!=c&&(c=mxUtils.getCurrentStyle(c),null!=c&&null!=F.toolbar&&(F.toolbar.setFontName(Graph.stripQuotes(c.fontFamily)),F.toolbar.setFontSize(parseInt(c.fontSize))));a=!1},0))};mxEvent.addListener(g.cellEditor.textarea,"input",c);mxEvent.addListener(g.cellEditor.textarea,"touchend",c);mxEvent.addListener(g.cellEditor.textarea,"mouseup",c);mxEvent.addListener(g.cellEditor.textarea,"keyup",c);c()}};var D=g.cellEditor.stopEditing;g.cellEditor.stopEditing=function(a,c){try{D.apply(this,arguments),K()}catch(N){F.handleError(N)}};
+g.container.setAttribute("tabindex","0");g.container.style.cursor="default";if(window.self===window.top&&null!=g.container.parentNode)try{g.container.focus()}catch(U){}var M=g.fireMouseEvent;g.fireMouseEvent=function(a,c,e){a==mxEvent.MOUSE_DOWN&&this.container.focus();M.apply(this,arguments)};g.popupMenuHandler.autoExpand=!0;null!=this.menus&&(g.popupMenuHandler.factoryMethod=mxUtils.bind(this,function(a,c,e){this.menus.createPopupMenu(a,c,e)}));mxEvent.addGestureListeners(document,mxUtils.bind(this,
+function(a){g.popupMenuHandler.hideMenu()}));this.keyHandler=this.createKeyHandler(a);this.getKeyHandler=function(){return keyHandler};g.connectionHandler.addListener(mxEvent.CONNECT,function(a,c){var e=[c.getProperty("cell")];c.getProperty("terminalInserted")&&(e.push(c.getProperty("terminal")),window.setTimeout(function(){null!=F.hoverIcons&&F.hoverIcons.update(g.view.getState(e[e.length-1]))},0));k(e)});this.addListener("styleChanged",mxUtils.bind(this,function(a,e){var b=e.getProperty("cells"),
+d=!1,k=!1;if(0<b.length)for(var n=0;n<b.length&&(d=g.getModel().isVertex(b[n])||d,!(k=g.getModel().isEdge(b[n])||k)||!d);n++);else k=d=!0;for(var b=e.getProperty("keys"),l=e.getProperty("values"),n=0;n<b.length;n++){var q=0<=mxUtils.indexOf(p,b[n]);if("strokeColor"!=b[n]||null!=l[n]&&"none"!=l[n])if(0<=mxUtils.indexOf(m,b[n]))k||0<=mxUtils.indexOf(c,b[n])?null==l[n]?delete g.currentEdgeStyle[b[n]]:g.currentEdgeStyle[b[n]]=l[n]:d&&0<=mxUtils.indexOf(f,b[n])&&(null==l[n]?delete g.currentVertexStyle[b[n]]:
+g.currentVertexStyle[b[n]]=l[n]);else if(0<=mxUtils.indexOf(f,b[n])){if(d||q)null==l[n]?delete g.currentVertexStyle[b[n]]:g.currentVertexStyle[b[n]]=l[n];if(k||q||0<=mxUtils.indexOf(c,b[n]))null==l[n]?delete g.currentEdgeStyle[b[n]]:g.currentEdgeStyle[b[n]]=l[n]}}null!=this.toolbar&&(this.toolbar.setFontName(g.currentVertexStyle.fontFamily||Menus.prototype.defaultFont),this.toolbar.setFontSize(g.currentVertexStyle.fontSize||Menus.prototype.defaultFontSize),null!=this.toolbar.edgeStyleMenu&&(this.toolbar.edgeStyleMenu.getElementsByTagName("div")[0].className=
+"orthogonalEdgeStyle"==g.currentEdgeStyle.edgeStyle&&"1"==g.currentEdgeStyle.curved?"geSprite geSprite-curved":"straight"==g.currentEdgeStyle.edgeStyle||"none"==g.currentEdgeStyle.edgeStyle||null==g.currentEdgeStyle.edgeStyle?"geSprite geSprite-straight":"entityRelationEdgeStyle"==g.currentEdgeStyle.edgeStyle?"geSprite geSprite-entity":"elbowEdgeStyle"==g.currentEdgeStyle.edgeStyle?"geSprite geSprite-"+("vertical"==g.currentEdgeStyle.elbow?"verticalelbow":"horizontalelbow"):"isometricEdgeStyle"==
+g.currentEdgeStyle.edgeStyle?"geSprite geSprite-"+("vertical"==g.currentEdgeStyle.elbow?"verticalisometric":"horizontalisometric"):"geSprite geSprite-orthogonal"),null!=this.toolbar.edgeShapeMenu&&(this.toolbar.edgeShapeMenu.getElementsByTagName("div")[0].className="link"==g.currentEdgeStyle.shape?"geSprite geSprite-linkedge":"flexArrow"==g.currentEdgeStyle.shape?"geSprite geSprite-arrow":"arrow"==g.currentEdgeStyle.shape?"geSprite geSprite-simplearrow":"geSprite geSprite-connection"),null!=this.toolbar.lineStartMenu&&
+(this.toolbar.lineStartMenu.getElementsByTagName("div")[0].className=this.getCssClassForMarker("start",g.currentEdgeStyle.shape,g.currentEdgeStyle[mxConstants.STYLE_STARTARROW],mxUtils.getValue(g.currentEdgeStyle,"startFill","1"))),null!=this.toolbar.lineEndMenu&&(this.toolbar.lineEndMenu.getElementsByTagName("div")[0].className=this.getCssClassForMarker("end",g.currentEdgeStyle.shape,g.currentEdgeStyle[mxConstants.STYLE_ENDARROW],mxUtils.getValue(g.currentEdgeStyle,"endFill","1"))))}));null!=this.toolbar&&
+(a=mxUtils.bind(this,function(){var a=g.currentVertexStyle.fontFamily||"Helvetica",c=String(g.currentVertexStyle.fontSize||"12"),e=g.getView().getState(g.getSelectionCell());null!=e&&(a=e.style[mxConstants.STYLE_FONTFAMILY]||a,c=e.style[mxConstants.STYLE_FONTSIZE]||c,10<a.length&&(a=a.substring(0,8)+"..."));this.toolbar.setFontName(a);this.toolbar.setFontSize(c)}),g.getSelectionModel().addListener(mxEvent.CHANGE,a),g.getModel().addListener(mxEvent.CHANGE,a));g.addListener(mxEvent.CELLS_ADDED,function(a,
+c){var e=c.getProperty("cells"),b=c.getProperty("parent");g.getModel().isLayer(b)&&!g.isCellVisible(b)&&null!=e&&0<e.length&&g.getModel().setVisible(b,!0)});this.gestureHandler=mxUtils.bind(this,function(a){null!=this.currentMenu&&mxEvent.getSource(a)!=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&&(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(){k.view.validateBackground()}));this.addListener("backgroundColorChanged",mxUtils.bind(this,function(){k.view.validateBackground()}));k.addListener("gridSizeChanged",mxUtils.bind(this,function(){k.isGridEnabled()&&k.view.validateBackground()}));this.editor.resetGraph()}this.init();k.standalone||this.open()};mxUtils.extend(EditorUi,mxEventSource);EditorUi.compactUi=!0;EditorUi.prototype.splitSize=mxClient.IS_TOUCH||mxClient.IS_POINTER?12:8;EditorUi.prototype.menubarHeight=30;
+function(){g.view.validateBackground()}));this.addListener("backgroundColorChanged",mxUtils.bind(this,function(){g.view.validateBackground()}));g.addListener("gridSizeChanged",mxUtils.bind(this,function(){g.isGridEnabled()&&g.view.validateBackground()}));this.editor.resetGraph()}this.init();g.standalone||this.open()};mxUtils.extend(EditorUi,mxEventSource);EditorUi.compactUi=!0;EditorUi.prototype.splitSize=mxClient.IS_TOUCH||mxClient.IS_POINTER?12:8;EditorUi.prototype.menubarHeight=30;
EditorUi.prototype.formatEnabled=!0;EditorUi.prototype.formatWidth=240;EditorUi.prototype.toolbarHeight=38;EditorUi.prototype.footerHeight=28;EditorUi.prototype.sidebarFooterHeight=34;EditorUi.prototype.hsplitPosition=640>=screen.width?118:"large"!=urlParams["sidebar-entries"]?212:240;EditorUi.prototype.allowAnimation=!0;EditorUi.prototype.lightboxMaxFitScale=2;EditorUi.prototype.lightboxVerticalDivider=4;EditorUi.prototype.hsplitClickEnabled=!1;
EditorUi.prototype.init=function(){var a=this.editor.graph;if(!a.standalone){"0"!=urlParams["shape-picker"]&&this.installShapePicker();mxEvent.addListener(a.container,"scroll",mxUtils.bind(this,function(){a.tooltipHandler.hide();null!=a.connectionHandler&&null!=a.connectionHandler.constraintHandler&&a.connectionHandler.constraintHandler.reset()}));a.addListener(mxEvent.ESCAPE,mxUtils.bind(this,function(){a.tooltipHandler.hide();var b=a.getRubberband();null!=b&&b.cancel()}));mxEvent.addListener(a.container,
"keydown",mxUtils.bind(this,function(a){this.onKeyDown(a)}));mxEvent.addListener(a.container,"keypress",mxUtils.bind(this,function(a){this.onKeyPress(a)}));this.addUndoListener();this.addBeforeUnloadListener();a.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){this.updateActionStates()}));a.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){this.updateActionStates()}));var b=a.setDefaultParent,d=this;this.editor.graph.setDefaultParent=function(){b.apply(this,
arguments);d.updateActionStates()};a.editLink=d.actions.get("editLink").funct;this.updateActionStates();this.initClipboard();this.initCanvas();null!=this.format&&this.format.init()}};
EditorUi.prototype.installShapePicker=function(){var a=this.editor.graph,b=this;a.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(a,c){"mouseDown"==c.getProperty("eventName")&&b.hideShapePicker()}));a.addListener(mxEvent.ESCAPE,mxUtils.bind(this,function(){b.hideShapePicker(!0)}));a.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){b.hideShapePicker(!0)}));a.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){b.hideShapePicker(!0)}));var d=
-a.popupMenuHandler.isMenuShowing;a.popupMenuHandler.isMenuShowing=function(){return d.apply(this,arguments)||null!=b.shapePicker};var k=a.dblClick;a.dblClick=function(d,c){if(this.isEnabled())if(null!=c||null==b.sidebar||mxEvent.isShiftDown(d)||a.isCellLocked(a.getDefaultParent()))k.apply(this,arguments);else{mxEvent.consume(d);var e=mxUtils.convertPoint(this.container,mxEvent.getClientX(d),mxEvent.getClientY(d));window.setTimeout(mxUtils.bind(this,function(){b.showShapePicker(e.x,e.y)}),30)}};if(null!=
-this.hoverIcons){var f=this.hoverIcons.drag;this.hoverIcons.drag=function(){b.hideShapePicker();f.apply(this,arguments)};var m=this.hoverIcons.execute;this.hoverIcons.execute=function(d,c,e){var g=e.getEvent();this.graph.isCloneEvent(g)||mxEvent.isShiftDown(g)?m.apply(this,arguments):this.graph.connectVertex(d.cell,c,this.graph.defaultEdgeLength,g,null,null,mxUtils.bind(this,function(g,f,k){var n=a.getCompositeParent(d.cell);g=a.getCellGeometry(n);for(e.consume();null!=n&&a.model.isVertex(n)&&null!=
-g&&g.relative;)cell=n,n=a.model.getParent(cell),g=a.getCellGeometry(n);window.setTimeout(mxUtils.bind(this,function(){b.showShapePicker(e.getGraphX(),e.getGraphY(),n,mxUtils.bind(this,function(c){k(c);null!=b.hoverIcons&&b.hoverIcons.update(a.view.getState(c))}),c)}),30)}),mxUtils.bind(this,function(a){this.graph.selectCellsForConnectVertex(a,g,this)}))}}};
-EditorUi.prototype.showShapePicker=function(a,b,d,k,f){a=this.createShapePicker(a,b,d,k,f,mxUtils.bind(this,function(){this.hideShapePicker()}),this.getCellsForShapePicker(d));null!=a&&(null!=this.hoverIcons&&this.hoverIcons.reset(),b=this.editor.graph,b.popupMenuHandler.hideMenu(),b.tooltipHandler.hideTooltip(),this.hideCurrentMenu(),this.hideShapePicker(),this.shapePickerCallback=k,this.shapePicker=a)};
-EditorUi.prototype.createShapePicker=function(a,b,d,k,f,m,p){var c=null;if(null!=p&&0<p.length){var e=this,g=this.editor.graph,c=document.createElement("div");f=g.view.getState(d);var n=null==d||null!=f&&g.isTransparentState(f)?null:g.copyStyle(d);d=6>p.length?35*p.length:140;c.className="geToolbarContainer geSidebarContainer geSidebar";c.style.cssText="position:absolute;left:"+a+"px;top:"+b+"px;width:"+d+"px;border-radius:10px;padding:4px;text-align:center;box-shadow:0px 0px 3px 1px #d1d1d1;padding: 6px 0 8px 0;z-index: "+
-mxPopupMenu.prototype.zIndex+1+";";mxUtils.setPrefixedStyle(c.style,"transform","translate(-22px,-22px)");null!=g.background&&g.background!=mxConstants.NONE&&(c.style.backgroundColor=g.background);g.container.appendChild(c);d=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;";c.appendChild(f);null!=n&&"1"!=urlParams.sketch?
-this.sidebar.graph.pasteStyle(n,[d]):e.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 c=g.cloneCell(d);if(null!=k)k(c);else{c.geometry.x=g.snap(Math.round(a/g.view.scale)-g.view.translate.x-d.geometry.width/2);c.geometry.y=g.snap(Math.round(b/g.view.scale)-g.view.translate.y-d.geometry.height/2);g.model.beginUpdate();try{g.addCell(c)}finally{g.model.endUpdate()}g.setSelectionCell(c);
-g.scrollCellToVisible(c);g.startEditingAtCell(c);null!=e.hoverIcons&&e.hoverIcons.update(g.view.getState(c))}null!=m&&m()})});for(f=0;f<p.length;f++)d(p[f]);p=c.offsetTop+c.clientHeight-(g.container.scrollTop+g.container.offsetHeight);0<p&&(c.style.top=Math.max(g.container.scrollTop+22,b-p)+"px");p=c.offsetLeft+c.clientWidth-(g.container.scrollLeft+g.container.offsetWidth);0<p&&(c.style.left=Math.max(g.container.scrollLeft+22,a-p)+"px")}return c};
+a.popupMenuHandler.isMenuShowing;a.popupMenuHandler.isMenuShowing=function(){return d.apply(this,arguments)||null!=b.shapePicker};var g=a.dblClick;a.dblClick=function(d,c){if(this.isEnabled())if(null!=c||null==b.sidebar||mxEvent.isShiftDown(d)||a.isCellLocked(a.getDefaultParent()))g.apply(this,arguments);else{mxEvent.consume(d);var e=mxUtils.convertPoint(this.container,mxEvent.getClientX(d),mxEvent.getClientY(d));window.setTimeout(mxUtils.bind(this,function(){b.showShapePicker(e.x,e.y)}),30)}};if(null!=
+this.hoverIcons){var f=this.hoverIcons.drag;this.hoverIcons.drag=function(){b.hideShapePicker();f.apply(this,arguments)};var m=this.hoverIcons.execute;this.hoverIcons.execute=function(d,c,e){var k=e.getEvent();this.graph.isCloneEvent(k)||mxEvent.isShiftDown(k)?m.apply(this,arguments):this.graph.connectVertex(d.cell,c,this.graph.defaultEdgeLength,k,null,null,mxUtils.bind(this,function(k,f,g){var n=a.getCompositeParent(d.cell);k=a.getCellGeometry(n);for(e.consume();null!=n&&a.model.isVertex(n)&&null!=
+k&&k.relative;)cell=n,n=a.model.getParent(cell),k=a.getCellGeometry(n);window.setTimeout(mxUtils.bind(this,function(){b.showShapePicker(e.getGraphX(),e.getGraphY(),n,mxUtils.bind(this,function(c){g(c);null!=b.hoverIcons&&b.hoverIcons.update(a.view.getState(c))}),c)}),30)}),mxUtils.bind(this,function(a){this.graph.selectCellsForConnectVertex(a,k,this)}))}}};
+EditorUi.prototype.showShapePicker=function(a,b,d,g,f){a=this.createShapePicker(a,b,d,g,f,mxUtils.bind(this,function(){this.hideShapePicker()}),this.getCellsForShapePicker(d));null!=a&&(null!=this.hoverIcons&&this.hoverIcons.reset(),b=this.editor.graph,b.popupMenuHandler.hideMenu(),b.tooltipHandler.hideTooltip(),this.hideCurrentMenu(),this.hideShapePicker(),this.shapePickerCallback=g,this.shapePicker=a)};
+EditorUi.prototype.createShapePicker=function(a,b,d,g,f,m,p){var c=null;if(null!=p&&0<p.length){var e=this,k=this.editor.graph,c=document.createElement("div");f=k.view.getState(d);var n=null==d||null!=f&&k.isTransparentState(f)?null:k.copyStyle(d);d=6>p.length?35*p.length:140;c.className="geToolbarContainer geSidebarContainer geSidebar";c.style.cssText="position:absolute;left:"+a+"px;top:"+b+"px;width:"+d+"px;border-radius:10px;padding:4px;text-align:center;box-shadow:0px 0px 3px 1px #d1d1d1;padding: 6px 0 8px 0;z-index: "+
+mxPopupMenu.prototype.zIndex+1+";";mxUtils.setPrefixedStyle(c.style,"transform","translate(-22px,-22px)");null!=k.background&&k.background!=mxConstants.NONE&&(c.style.backgroundColor=k.background);k.container.appendChild(c);d=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;";c.appendChild(f);null!=n&&"1"!=urlParams.sketch?
+this.sidebar.graph.pasteStyle(n,[d]):e.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 c=k.cloneCell(d);if(null!=g)g(c);else{c.geometry.x=k.snap(Math.round(a/k.view.scale)-k.view.translate.x-d.geometry.width/2);c.geometry.y=k.snap(Math.round(b/k.view.scale)-k.view.translate.y-d.geometry.height/2);k.model.beginUpdate();try{k.addCell(c)}finally{k.model.endUpdate()}k.setSelectionCell(c);
+k.scrollCellToVisible(c);k.startEditingAtCell(c);null!=e.hoverIcons&&e.hoverIcons.update(k.view.getState(c))}null!=m&&m()})});for(f=0;f<p.length;f++)d(p[f]);p=c.offsetTop+c.clientHeight-(k.container.scrollTop+k.container.offsetHeight);0<p&&(c.style.top=Math.max(k.container.scrollTop+22,b-p)+"px");p=c.offsetLeft+c.clientWidth-(k.container.scrollLeft+k.container.offsetWidth);0<p&&(c.style.left=Math.max(k.container.scrollLeft+22,a-p)+"px")}return c};
EditorUi.prototype.getCellsForShapePicker=function(a){var b=mxUtils.bind(this,function(a,b,f,m){return this.editor.graph.createVertex(null,null,m||"",0,0,b||120,f||60,a,!1)});return[null!=a?this.editor.graph.cloneCell(a):b("text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;",40,20,"Text"),b("whiteSpace=wrap;html=1;"),b("rounded=1;whiteSpace=wrap;html=1;"),b("ellipse;whiteSpace=wrap;html=1;"),b("rhombus;whiteSpace=wrap;html=1;",80,80),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=cylinder;whiteSpace=wrap;html=1;boundedLbl=1;backgroundOutline=1;",60,80),b("shape=callout;rounded=1;whiteSpace=wrap;html=1;perimeter=calloutPerimeter;",120,80),b("shape=doubleArrow;whiteSpace=wrap;html=1;arrowWidth=0.4;arrowSize=0.3;"),b("shape=singleArrow;whiteSpace=wrap;html=1;arrowWidth=0.4;arrowSize=0.4;",80,60),b("shape=singleArrow;whiteSpace=wrap;html=1;arrowWidth=0.4;arrowSize=0.4;flipH=1;",80,60),b("shape=waypoint;sketch=0;size=6;pointerEvents=1;points=[];fillColor=none;resizable=0;rotatable=0;perimeter=centerPerimeter;snapToPoint=1;",
@@ -2164,25 +2165,25 @@ EditorUi.prototype.onKeyDown=function(a){var b=this.editor.graph;if(9==a.which&&
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.getCssClassForMarker=function(a,b,d,k){return"flexArrow"==b?null!=d&&d!=mxConstants.NONE?"geSprite geSprite-"+a+"blocktrans":"geSprite geSprite-noarrow":"box"==d||"halfCircle"==d?"geSprite geSvgSprite geSprite-"+d+("end"==a?" geFlipSprite":""):d==mxConstants.ARROW_CLASSIC?"1"==k?"geSprite geSprite-"+a+"classic":"geSprite geSprite-"+a+"classictrans":d==mxConstants.ARROW_CLASSIC_THIN?"1"==k?"geSprite geSprite-"+a+"classicthin":"geSprite geSprite-"+a+"classicthintrans":d==mxConstants.ARROW_OPEN?
-"geSprite geSprite-"+a+"open":d==mxConstants.ARROW_OPEN_THIN?"geSprite geSprite-"+a+"openthin":d==mxConstants.ARROW_BLOCK?"1"==k?"geSprite geSprite-"+a+"block":"geSprite geSprite-"+a+"blocktrans":d==mxConstants.ARROW_BLOCK_THIN?"1"==k?"geSprite geSprite-"+a+"blockthin":"geSprite geSprite-"+a+"blockthintrans":d==mxConstants.ARROW_OVAL?"1"==k?"geSprite geSprite-"+a+"oval":"geSprite geSprite-"+a+"ovaltrans":d==mxConstants.ARROW_DIAMOND?"1"==k?"geSprite geSprite-"+a+"diamond":"geSprite geSprite-"+a+"diamondtrans":
-d==mxConstants.ARROW_DIAMOND_THIN?"1"==k?"geSprite geSprite-"+a+"thindiamond":"geSprite geSprite-"+a+"thindiamondtrans":"openAsync"==d?"geSprite geSprite-"+a+"openasync":"dash"==d?"geSprite geSprite-"+a+"dash":"cross"==d?"geSprite geSprite-"+a+"cross":"async"==d?"1"==k?"geSprite geSprite-"+a+"async":"geSprite geSprite-"+a+"asynctrans":"circle"==d||"circlePlus"==d?"1"==k||"circle"==d?"geSprite geSprite-"+a+"circle":"geSprite geSprite-"+a+"circleplus":"ERone"==d?"geSprite geSprite-"+a+"erone":"ERmandOne"==
+EditorUi.prototype.getCssClassForMarker=function(a,b,d,g){return"flexArrow"==b?null!=d&&d!=mxConstants.NONE?"geSprite geSprite-"+a+"blocktrans":"geSprite geSprite-noarrow":"box"==d||"halfCircle"==d?"geSprite geSvgSprite geSprite-"+d+("end"==a?" geFlipSprite":""):d==mxConstants.ARROW_CLASSIC?"1"==g?"geSprite geSprite-"+a+"classic":"geSprite geSprite-"+a+"classictrans":d==mxConstants.ARROW_CLASSIC_THIN?"1"==g?"geSprite geSprite-"+a+"classicthin":"geSprite geSprite-"+a+"classicthintrans":d==mxConstants.ARROW_OPEN?
+"geSprite geSprite-"+a+"open":d==mxConstants.ARROW_OPEN_THIN?"geSprite geSprite-"+a+"openthin":d==mxConstants.ARROW_BLOCK?"1"==g?"geSprite geSprite-"+a+"block":"geSprite geSprite-"+a+"blocktrans":d==mxConstants.ARROW_BLOCK_THIN?"1"==g?"geSprite geSprite-"+a+"blockthin":"geSprite geSprite-"+a+"blockthintrans":d==mxConstants.ARROW_OVAL?"1"==g?"geSprite geSprite-"+a+"oval":"geSprite geSprite-"+a+"ovaltrans":d==mxConstants.ARROW_DIAMOND?"1"==g?"geSprite geSprite-"+a+"diamond":"geSprite geSprite-"+a+"diamondtrans":
+d==mxConstants.ARROW_DIAMOND_THIN?"1"==g?"geSprite geSprite-"+a+"thindiamond":"geSprite geSprite-"+a+"thindiamondtrans":"openAsync"==d?"geSprite geSprite-"+a+"openasync":"dash"==d?"geSprite geSprite-"+a+"dash":"cross"==d?"geSprite geSprite-"+a+"cross":"async"==d?"1"==g?"geSprite geSprite-"+a+"async":"geSprite geSprite-"+a+"asynctrans":"circle"==d||"circlePlus"==d?"1"==g||"circle"==d?"geSprite geSprite-"+a+"circle":"geSprite geSprite-"+a+"circleplus":"ERone"==d?"geSprite geSprite-"+a+"erone":"ERmandOne"==
d?"geSprite geSprite-"+a+"eronetoone":"ERmany"==d?"geSprite geSprite-"+a+"ermany":"ERoneToMany"==d?"geSprite geSprite-"+a+"eronetomany":"ERzeroToOne"==d?"geSprite geSprite-"+a+"eroneopt":"ERzeroToMany"==d?"geSprite geSprite-"+a+"ermanyopt":"geSprite geSprite-noarrow"};EditorUi.prototype.createMenus=function(){return null};
EditorUi.prototype.updatePasteActionStates=function(){var a=this.editor.graph,b=this.actions.get("paste"),d=this.actions.get("pasteHere");b.setEnabled(this.editor.graph.cellEditor.isContentEditing()||(!mxClient.IS_FF&&null!=navigator.clipboard||!mxClipboard.isEmpty())&&a.isEnabled()&&!a.isCellLocked(a.getDefaultParent()));d.setEnabled(b.isEnabled())};
-EditorUi.prototype.initClipboard=function(){var a=this,b=mxClipboard.cut;mxClipboard.cut=function(d){d.cellEditor.isContentEditing()?document.execCommand("cut",!1,null):b.apply(this,arguments);a.updatePasteActionStates()};mxClipboard.copy=function(b){var d=null;if(b.cellEditor.isContentEditing())document.execCommand("copy",!1,null);else{for(var d=d||b.getSelectionCells(),d=b.getExportableCells(b.model.getTopmostCells(d)),c={},e=b.createCellLookup(d),g=b.cloneCells(d,null,c),f=new mxGraphModel,k=f.getChildAt(f.getRoot(),
-0),q=0;q<g.length;q++){f.add(k,g[q]);var m=b.view.getState(d[q]);if(null!=m){var t=b.getCellGeometry(g[q]);null!=t&&t.relative&&!f.isEdge(d[q])&&null==e[mxObjectIdentity.get(f.getParent(d[q]))]&&(t.offset=null,t.relative=!1,t.x=m.x/m.view.scale-m.view.translate.x,t.y=m.y/m.view.scale-m.view.translate.y)}}b.updateCustomLinks(b.createCellMapping(c,e),g);mxClipboard.insertCount=1;mxClipboard.setCells(g)}a.updatePasteActionStates();return d};var d=mxClipboard.paste;mxClipboard.paste=function(b){var f=
-null;b.cellEditor.isContentEditing()?document.execCommand("paste",!1,null):f=d.apply(this,arguments);a.updatePasteActionStates();return f};var k=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){k.apply(this,arguments);a.updatePasteActionStates()};var f=this.editor.graph.cellEditor.stopEditing;this.editor.graph.cellEditor.stopEditing=function(b,d){f.apply(this,arguments);a.updatePasteActionStates()};this.updatePasteActionStates()};
+EditorUi.prototype.initClipboard=function(){var a=this,b=mxClipboard.cut;mxClipboard.cut=function(d){d.cellEditor.isContentEditing()?document.execCommand("cut",!1,null):b.apply(this,arguments);a.updatePasteActionStates()};mxClipboard.copy=function(b){var d=null;if(b.cellEditor.isContentEditing())document.execCommand("copy",!1,null);else{for(var d=d||b.getSelectionCells(),d=b.getExportableCells(b.model.getTopmostCells(d)),c={},e=b.createCellLookup(d),k=b.cloneCells(d,null,c),f=new mxGraphModel,g=f.getChildAt(f.getRoot(),
+0),q=0;q<k.length;q++){f.add(g,k[q]);var m=b.view.getState(d[q]);if(null!=m){var t=b.getCellGeometry(k[q]);null!=t&&t.relative&&!f.isEdge(d[q])&&null==e[mxObjectIdentity.get(f.getParent(d[q]))]&&(t.offset=null,t.relative=!1,t.x=m.x/m.view.scale-m.view.translate.x,t.y=m.y/m.view.scale-m.view.translate.y)}}b.updateCustomLinks(b.createCellMapping(c,e),k);mxClipboard.insertCount=1;mxClipboard.setCells(k)}a.updatePasteActionStates();return d};var d=mxClipboard.paste;mxClipboard.paste=function(b){var f=
+null;b.cellEditor.isContentEditing()?document.execCommand("paste",!1,null):f=d.apply(this,arguments);a.updatePasteActionStates();return f};var g=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){g.apply(this,arguments);a.updatePasteActionStates()};var f=this.editor.graph.cellEditor.stopEditing;this.editor.graph.cellEditor.stopEditing=function(b,d){f.apply(this,arguments);a.updatePasteActionStates()};this.updatePasteActionStates()};
EditorUi.prototype.lazyZoomDelay=20;EditorUi.prototype.wheelZoomDelay=400;EditorUi.prototype.buttonZoomDelay=600;
EditorUi.prototype.initCanvas=function(){var a=this.editor.graph;a.timerAutoScroll=!0;a.getPagePadding=function(){return new mxPoint(Math.max(0,Math.round((a.container.offsetWidth-34)/a.view.scale)),Math.max(0,Math.round((a.container.offsetHeight-34)/a.view.scale)))};a.view.getBackgroundPageBounds=function(){var a=this.graph.getPageLayout(),c=this.graph.getPageSize();return new mxRectangle(this.scale*(this.translate.x+a.x*c.width),this.scale*(this.translate.y+a.y*c.height),this.scale*a.width*c.width,
-this.scale*a.height*c.height)};a.getPreferredPageSize=function(a,c,e){a=this.getPageLayout();c=this.getPageSize();return new mxRectangle(0,0,a.width*c.width,a.height*c.height)};var b=null,d=this;if(this.editor.isChromelessView()){this.chromelessResize=b=mxUtils.bind(this,function(c,e,b,d){if(null!=a.container&&!a.isViewer()){b=null!=b?b:0;d=null!=d?d:0;var g=a.pageVisible?a.view.getBackgroundPageBounds():a.getGraphBounds(),f=mxUtils.hasScrollbars(a.container),n=a.view.translate,k=a.view.scale,v=mxRectangle.fromRectangle(g);
-v.x=v.x/k-n.x;v.y=v.y/k-n.y;v.width/=k;v.height/=k;var n=a.container.scrollTop,l=a.container.scrollLeft,q=8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)q+=3;var B=a.container.offsetWidth-q,q=a.container.offsetHeight-q;c=c?Math.max(.3,Math.min(e||1,B/v.width)):k;e=(B-c*v.width)/2/c;var m=0==this.lightboxVerticalDivider?0:(q-c*v.height)/this.lightboxVerticalDivider/c;f&&(e=Math.max(e,0),m=Math.max(m,0));if(f||g.width<B||g.height<q)a.view.scaleAndTranslate(c,Math.floor(e-
-v.x),Math.floor(m-v.y)),a.container.scrollTop=n*c/k,a.container.scrollLeft=l*c/k;else if(0!=b||0!=d)g=a.view.translate,a.view.setTranslate(Math.floor(g.x+b/k),Math.floor(g.y+d/k))}});this.chromelessWindowResize=mxUtils.bind(this,function(){this.chromelessResize(!1)});var k=mxUtils.bind(this,function(){this.chromelessWindowResize(!1)});mxEvent.addListener(window,"resize",k);this.destroyFunctions.push(function(){mxEvent.removeListener(window,"resize",k)});this.editor.addListener("resetGraphView",mxUtils.bind(this,
+this.scale*a.height*c.height)};a.getPreferredPageSize=function(a,c,e){a=this.getPageLayout();c=this.getPageSize();return new mxRectangle(0,0,a.width*c.width,a.height*c.height)};var b=null,d=this;if(this.editor.isChromelessView()){this.chromelessResize=b=mxUtils.bind(this,function(c,e,b,d){if(null!=a.container&&!a.isViewer()){b=null!=b?b:0;d=null!=d?d:0;var k=a.pageVisible?a.view.getBackgroundPageBounds():a.getGraphBounds(),f=mxUtils.hasScrollbars(a.container),n=a.view.translate,g=a.view.scale,v=mxRectangle.fromRectangle(k);
+v.x=v.x/g-n.x;v.y=v.y/g-n.y;v.width/=g;v.height/=g;var n=a.container.scrollTop,l=a.container.scrollLeft,q=8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)q+=3;var B=a.container.offsetWidth-q,q=a.container.offsetHeight-q;c=c?Math.max(.3,Math.min(e||1,B/v.width)):g;e=(B-c*v.width)/2/c;var t=0==this.lightboxVerticalDivider?0:(q-c*v.height)/this.lightboxVerticalDivider/c;f&&(e=Math.max(e,0),t=Math.max(t,0));if(f||k.width<B||k.height<q)a.view.scaleAndTranslate(c,Math.floor(e-
+v.x),Math.floor(t-v.y)),a.container.scrollTop=n*c/g,a.container.scrollLeft=l*c/g;else if(0!=b||0!=d)k=a.view.translate,a.view.setTranslate(Math.floor(k.x+b/g),Math.floor(k.y+d/g))}});this.chromelessWindowResize=mxUtils.bind(this,function(){this.chromelessResize(!1)});var g=mxUtils.bind(this,function(){this.chromelessWindowResize(!1)});mxEvent.addListener(window,"resize",g);this.destroyFunctions.push(function(){mxEvent.removeListener(window,"resize",g)});this.editor.addListener("resetGraphView",mxUtils.bind(this,
function(){this.chromelessResize(!0)}));this.actions.get("zoomIn").funct=mxUtils.bind(this,function(c){a.zoomIn();this.chromelessResize(!1)});this.actions.get("zoomOut").funct=mxUtils.bind(this,function(c){a.zoomOut();this.chromelessResize(!1)});if("0"!=urlParams.toolbar){var f=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.backgroundColor="#000000";this.chromelessToolbar.style.padding="10px 10px 8px 10px";this.chromelessToolbar.style.left=a.isViewer()?"0":"50%";mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"borderRadius","20px");mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transition","opacity 600ms ease-in-out");var m=mxUtils.bind(this,function(){var c=mxUtils.getCurrentStyle(a.container);a.isViewer()?this.chromelessToolbar.style.top=
"0":this.chromelessToolbar.style.bottom=(null!=c?parseInt(c["margin-bottom"]||0):0)+(null!=this.tabContainer?20+parseInt(this.tabContainer.style.height):20)+"px"});this.editor.addListener("resetGraphView",m);m();var p=0,m=mxUtils.bind(this,function(a,c,e){p++;var b=document.createElement("span");b.style.paddingLeft="8px";b.style.paddingRight="8px";b.style.cursor="pointer";mxEvent.addListener(b,"click",a);null!=e&&b.setAttribute("title",e);a=document.createElement("img");a.setAttribute("border","0");
a.setAttribute("src",c);b.appendChild(a);this.chromelessToolbar.appendChild(b);return b});null!=f.backBtn&&m(mxUtils.bind(this,function(a){window.location.href=f.backBtn.url;mxEvent.consume(a)}),Editor.backLargeImage,mxResources.get("back",null,"Back"));if(this.isPagesEnabled()){var c=m(mxUtils.bind(this,function(a){this.actions.get("previousPage").funct();mxEvent.consume(a)}),Editor.previousLargeImage,mxResources.get("previousPage")),e=document.createElement("div");e.style.display="inline-block";
-e.style.verticalAlign="top";e.style.fontFamily="Helvetica,Arial";e.style.marginTop="8px";e.style.fontSize="14px";e.style.color="#ffffff";this.chromelessToolbar.appendChild(e);var g=m(mxUtils.bind(this,function(a){this.actions.get("nextPage").funct();mxEvent.consume(a)}),Editor.nextLargeImage,mxResources.get("nextPage")),n=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&(e.innerHTML="",mxUtils.write(e,mxUtils.indexOf(this.pages,this.currentPage)+1+" / "+
-this.pages.length))});c.style.paddingLeft="0px";c.style.paddingRight="4px";g.style.paddingLeft="4px";g.style.paddingRight="0px";var l=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage?(g.style.display="",c.style.display="",e.style.display="inline-block"):(g.style.display="none",c.style.display="none",e.style.display="none");n()});this.editor.addListener("resetGraphView",l);this.editor.addListener("pageSelected",n)}m(mxUtils.bind(this,function(a){this.actions.get("zoomOut").funct();
+e.style.verticalAlign="top";e.style.fontFamily="Helvetica,Arial";e.style.marginTop="8px";e.style.fontSize="14px";e.style.color="#ffffff";this.chromelessToolbar.appendChild(e);var k=m(mxUtils.bind(this,function(a){this.actions.get("nextPage").funct();mxEvent.consume(a)}),Editor.nextLargeImage,mxResources.get("nextPage")),n=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&(e.innerHTML="",mxUtils.write(e,mxUtils.indexOf(this.pages,this.currentPage)+1+" / "+
+this.pages.length))});c.style.paddingLeft="0px";c.style.paddingRight="4px";k.style.paddingLeft="4px";k.style.paddingRight="0px";var l=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage?(k.style.display="",c.style.display="",e.style.display="inline-block"):(k.style.display="none",c.style.display="none",e.style.display="none");n()});this.editor.addListener("resetGraphView",l);this.editor.addListener("pageSelected",n)}m(mxUtils.bind(this,function(a){this.actions.get("zoomOut").funct();
mxEvent.consume(a)}),Editor.zoomOutLargeImage,mxResources.get("zoomOut")+" (Alt+Mousewheel)");m(mxUtils.bind(this,function(a){this.actions.get("zoomIn").funct();mxEvent.consume(a)}),Editor.zoomInLargeImage,mxResources.get("zoomIn")+" (Alt+Mousewheel)");m(mxUtils.bind(this,function(c){a.isLightboxView()?(1==a.view.scale?this.lightboxFit():a.zoomTo(1),this.chromelessResize(!1)):this.chromelessResize(!0);mxEvent.consume(c)}),Editor.actualSizeLargeImage,mxResources.get("fit"));var q=null,u=null,t=mxUtils.bind(this,
function(a){null!=q&&(window.clearTimeout(q),q=null);null!=u&&(window.clearTimeout(u),u=null);q=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(this.chromelessToolbar,0);q=null;u=window.setTimeout(mxUtils.bind(this,function(){this.chromelessToolbar.style.display="none";u=null}),600)}),a||200)}),A=mxUtils.bind(this,function(a){null!=q&&(window.clearTimeout(q),q=null);null!=u&&(window.clearTimeout(u),u=null);this.chromelessToolbar.style.display="";mxUtils.setOpacity(this.chromelessToolbar,
a||30)});if("1"==urlParams.layers){this.layersDialog=null;var x=m(mxUtils.bind(this,function(c){if(null!=this.layersDialog)this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null;else{this.layersDialog=a.createLayersDialog();mxEvent.addListener(this.layersDialog,"mouseleave",mxUtils.bind(this,function(){this.layersDialog.parentNode.removeChild(this.layersDialog);this.layersDialog=null}));var e=x.getBoundingClientRect();mxUtils.setPrefixedStyle(this.layersDialog.style,"borderRadius",
@@ -2194,52 +2195,52 @@ f.closeBtn?window.close():(this.destroy(),mxEvent.consume(a))}),Editor.closeLarg
mxClient.IS_POINTER?"pointermove":"mousemove",function(a){mxEvent.consume(a)});mxEvent.addListener(this.chromelessToolbar,"mouseenter",mxUtils.bind(this,function(a){mxEvent.isShiftDown(a)?t():A(100)}));mxEvent.addListener(this.chromelessToolbar,"mousemove",mxUtils.bind(this,function(a){mxEvent.isShiftDown(a)?t():A(100);mxEvent.consume(a)}));mxEvent.addListener(this.chromelessToolbar,"mouseleave",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||A(30)}));var E=a.getTolerance();a.addMouseListener({startX:0,
startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(c,e){this.startX=e.getGraphX();this.startY=e.getGraphY();this.scrollLeft=a.container.scrollLeft;this.scrollTop=a.container.scrollTop},mouseMove:function(a,c){},mouseUp:function(c,e){mxEvent.isTouchEvent(e.getEvent())&&Math.abs(this.scrollLeft-a.container.scrollLeft)<E&&Math.abs(this.scrollTop-a.container.scrollTop)<E&&Math.abs(this.startX-e.getGraphX())<E&&Math.abs(this.startY-e.getGraphY())<E&&(0<parseFloat(d.chromelessToolbar.style.opacity||0)?
t():A(30))}})}this.editor.editable||this.addChromelessClickHandler()}else if(this.editor.extendCanvas){var H=a.view.validate;a.view.validate=function(){if(null!=this.graph.container&&mxUtils.hasScrollbars(this.graph.container)){var a=this.graph.getPagePadding(),c=this.graph.getPageSize();this.translate.x=a.x-(this.x0||0)*c.width;this.translate.y=a.y-(this.y0||0)*c.height}H.apply(this,arguments)};if(!a.isViewer()){var K=a.sizeDidChange;a.sizeDidChange=function(){if(null!=this.container&&mxUtils.hasScrollbars(this.container)){var c=
-this.getPageLayout(),e=this.getPagePadding(),b=this.getPageSize(),d=Math.ceil(2*e.x+c.width*b.width),g=Math.ceil(2*e.y+c.height*b.height),f=a.minimumGraphSize;if(null==f||f.width!=d||f.height!=g)a.minimumGraphSize=new mxRectangle(0,0,d,g);d=e.x-c.x*b.width;e=e.y-c.y*b.height;this.autoTranslate||this.view.translate.x==d&&this.view.translate.y==e?K.apply(this,arguments):(this.autoTranslate=!0,this.view.x0=c.x,this.view.y0=c.y,c=a.view.translate.x,b=a.view.translate.y,a.view.setTranslate(d,e),a.container.scrollLeft+=
-Math.round((d-c)*a.view.scale),a.container.scrollTop+=Math.round((e-b)*a.view.scale),this.autoTranslate=!1)}else this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",this.getGraphBounds()))}}}var F=a.view.getBackgroundPane(),I=a.view.getDrawPane();a.cumulativeZoomFactor=1;var C=null,M=null,U=null,O=null,N=null,v=function(c){null!=C&&window.clearTimeout(C);window.setTimeout(function(){if(!a.isMouseDown||O)C=window.setTimeout(mxUtils.bind(this,function(){a.isFastZoomEnabled()&&(null!=a.view.backgroundPageShape&&
+this.getPageLayout(),e=this.getPagePadding(),b=this.getPageSize(),d=Math.ceil(2*e.x+c.width*b.width),k=Math.ceil(2*e.y+c.height*b.height),f=a.minimumGraphSize;if(null==f||f.width!=d||f.height!=k)a.minimumGraphSize=new mxRectangle(0,0,d,k);d=e.x-c.x*b.width;e=e.y-c.y*b.height;this.autoTranslate||this.view.translate.x==d&&this.view.translate.y==e?K.apply(this,arguments):(this.autoTranslate=!0,this.view.x0=c.x,this.view.y0=c.y,c=a.view.translate.x,b=a.view.translate.y,a.view.setTranslate(d,e),a.container.scrollLeft+=
+Math.round((d-c)*a.view.scale),a.container.scrollTop+=Math.round((e-b)*a.view.scale),this.autoTranslate=!1)}else this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",this.getGraphBounds()))}}}var F=a.view.getBackgroundPane(),I=a.view.getDrawPane();a.cumulativeZoomFactor=1;var D=null,M=null,U=null,O=null,N=null,v=function(c){null!=D&&window.clearTimeout(D);window.setTimeout(function(){if(!a.isMouseDown||O)D=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)),I.style.transformOrigin="",F.style.transformOrigin="",mxClient.IS_SF?(I.style.transform="scale(1)",F.style.transform="scale(1)",window.setTimeout(function(){I.style.transform="";F.style.transform=""},0)):(I.style.transform="",F.style.transform=""),a.view.getDecoratorPane().style.opacity="",
-a.view.getOverlayPane().style.opacity="");var c=new mxPoint(a.container.scrollLeft,a.container.scrollTop),e=mxUtils.getOffset(a.container),g=a.view.scale,f=0,n=0;null!=M&&(f=a.container.offsetWidth/2-M.x+e.x,n=a.container.offsetHeight/2-M.y+e.y);a.zoom(a.cumulativeZoomFactor);a.view.scale!=g&&(null!=U&&(f+=c.x-U.x,n+=c.y-U.y),null!=b&&d.chromelessResize(!1,null,f*(a.cumulativeZoomFactor-1),n*(a.cumulativeZoomFactor-1)),!mxUtils.hasScrollbars(a.container)||0==f&&0==n||(a.container.scrollLeft-=f*(a.cumulativeZoomFactor-
-1),a.container.scrollTop-=n*(a.cumulativeZoomFactor-1)));null!=N&&I.setAttribute("filter",N);a.cumulativeZoomFactor=1;N=O=M=U=C=null}),null!=c?c:a.isFastZoomEnabled()?d.wheelZoomDelay:d.lazyZoomDelay)},0)},D=Date.now();a.lazyZoom=function(c,e,b){(e=e||!a.scrollbars)&&(M=new mxPoint(a.container.offsetLeft+a.container.clientWidth/2,a.container.offsetTop+a.container.clientHeight/2));if(mxClient.IS_IOS||!(15>Date.now()-D)){D=Date.now();c?.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=
+a.view.getOverlayPane().style.opacity="");var c=new mxPoint(a.container.scrollLeft,a.container.scrollTop),e=mxUtils.getOffset(a.container),k=a.view.scale,f=0,n=0;null!=M&&(f=a.container.offsetWidth/2-M.x+e.x,n=a.container.offsetHeight/2-M.y+e.y);a.zoom(a.cumulativeZoomFactor);a.view.scale!=k&&(null!=U&&(f+=c.x-U.x,n+=c.y-U.y),null!=b&&d.chromelessResize(!1,null,f*(a.cumulativeZoomFactor-1),n*(a.cumulativeZoomFactor-1)),!mxUtils.hasScrollbars(a.container)||0==f&&0==n||(a.container.scrollLeft-=f*(a.cumulativeZoomFactor-
+1),a.container.scrollTop-=n*(a.cumulativeZoomFactor-1)));null!=N&&I.setAttribute("filter",N);a.cumulativeZoomFactor=1;N=O=M=U=D=null}),null!=c?c:a.isFastZoomEnabled()?d.wheelZoomDelay:d.lazyZoomDelay)},0)},C=Date.now();a.lazyZoom=function(c,e,b){(e=e||!a.scrollbars)&&(M=new mxPoint(a.container.offsetLeft+a.container.clientWidth/2,a.container.offsetTop+a.container.clientHeight/2));if(mxClient.IS_IOS||!(15>Date.now()-C)){C=Date.now();c?.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=
(this.view.scale+.05)/this.view.scale:(this.cumulativeZoomFactor*=this.zoomFactor,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*20)/20/this.view.scale):.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=(this.view.scale-.05)/this.view.scale:(this.cumulativeZoomFactor/=this.zoomFactor,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*20)/20/this.view.scale);this.cumulativeZoomFactor=Math.max(.05,Math.min(this.view.scale*
-this.cumulativeZoomFactor,160))/this.view.scale;if(a.isFastZoomEnabled()){null==N&&""!=I.getAttribute("filter")&&(N=I.getAttribute("filter"),I.removeAttribute("filter"));U=new mxPoint(a.container.scrollLeft,a.container.scrollTop);c=e?a.container.scrollLeft+a.container.clientWidth/2:M.x+a.container.scrollLeft-a.container.offsetLeft;var g=e?a.container.scrollTop+a.container.clientHeight/2:M.y+a.container.scrollTop-a.container.offsetTop;I.style.transformOrigin=c+"px "+g+"px";I.style.transform="scale("+
-this.cumulativeZoomFactor+")";F.style.transformOrigin=c+"px "+g+"px";F.style.transform="scale("+this.cumulativeZoomFactor+")";null!=a.view.backgroundPageShape&&null!=a.view.backgroundPageShape.node&&(c=a.view.backgroundPageShape.node,mxUtils.setPrefixedStyle(c.style,"transform-origin",(e?a.container.clientWidth/2+a.container.scrollLeft-c.offsetLeft+"px":M.x+a.container.scrollLeft-c.offsetLeft-a.container.offsetLeft+"px")+" "+(e?a.container.clientHeight/2+a.container.scrollTop-c.offsetTop+"px":M.y+
-a.container.scrollTop-c.offsetTop-a.container.offsetTop+"px")),mxUtils.setPrefixedStyle(c.style,"transform","scale("+this.cumulativeZoomFactor+")"));a.view.getDecoratorPane().style.opacity="0";a.view.getOverlayPane().style.opacity="0";null!=d.hoverIcons&&d.hoverIcons.reset()}v(b)}};mxEvent.addGestureListeners(a.container,function(a){null!=C&&window.clearTimeout(C)},null,function(c){1!=a.cumulativeZoomFactor&&v(0)});mxEvent.addListener(a.container,"scroll",function(c){null==C||a.isMouseDown||1==a.cumulativeZoomFactor||
-v(0)});mxEvent.addMouseWheelListener(mxUtils.bind(this,function(c,e,b,d,g){if(null==this.dialogs||0==this.dialogs.length)if(!a.scrollbars&&!b&&a.isScrollWheelEvent(c))b=a.view.getTranslate(),d=40/a.view.scale,mxEvent.isShiftDown(c)?a.view.setTranslate(b.x+(e?-d:d),b.y):a.view.setTranslate(b.x,b.y+(e?d:-d));else if(b||a.isZoomWheelEvent(c))for(var f=mxEvent.getSource(c);null!=f;){if(f==a.container)return a.tooltipHandler.hideTooltip(),M=null!=d&&null!=g?new mxPoint(d,g):new mxPoint(mxEvent.getClientX(c),
+this.cumulativeZoomFactor,160))/this.view.scale;if(a.isFastZoomEnabled()){null==N&&""!=I.getAttribute("filter")&&(N=I.getAttribute("filter"),I.removeAttribute("filter"));U=new mxPoint(a.container.scrollLeft,a.container.scrollTop);c=e?a.container.scrollLeft+a.container.clientWidth/2:M.x+a.container.scrollLeft-a.container.offsetLeft;var k=e?a.container.scrollTop+a.container.clientHeight/2:M.y+a.container.scrollTop-a.container.offsetTop;I.style.transformOrigin=c+"px "+k+"px";I.style.transform="scale("+
+this.cumulativeZoomFactor+")";F.style.transformOrigin=c+"px "+k+"px";F.style.transform="scale("+this.cumulativeZoomFactor+")";null!=a.view.backgroundPageShape&&null!=a.view.backgroundPageShape.node&&(c=a.view.backgroundPageShape.node,mxUtils.setPrefixedStyle(c.style,"transform-origin",(e?a.container.clientWidth/2+a.container.scrollLeft-c.offsetLeft+"px":M.x+a.container.scrollLeft-c.offsetLeft-a.container.offsetLeft+"px")+" "+(e?a.container.clientHeight/2+a.container.scrollTop-c.offsetTop+"px":M.y+
+a.container.scrollTop-c.offsetTop-a.container.offsetTop+"px")),mxUtils.setPrefixedStyle(c.style,"transform","scale("+this.cumulativeZoomFactor+")"));a.view.getDecoratorPane().style.opacity="0";a.view.getOverlayPane().style.opacity="0";null!=d.hoverIcons&&d.hoverIcons.reset()}v(b)}};mxEvent.addGestureListeners(a.container,function(a){null!=D&&window.clearTimeout(D)},null,function(c){1!=a.cumulativeZoomFactor&&v(0)});mxEvent.addListener(a.container,"scroll",function(c){null==D||a.isMouseDown||1==a.cumulativeZoomFactor||
+v(0)});mxEvent.addMouseWheelListener(mxUtils.bind(this,function(c,e,b,d,k){if(null==this.dialogs||0==this.dialogs.length)if(!a.scrollbars&&!b&&a.isScrollWheelEvent(c))b=a.view.getTranslate(),d=40/a.view.scale,mxEvent.isShiftDown(c)?a.view.setTranslate(b.x+(e?-d:d),b.y):a.view.setTranslate(b.x,b.y+(e?d:-d));else if(b||a.isZoomWheelEvent(c))for(var f=mxEvent.getSource(c);null!=f;){if(f==a.container)return a.tooltipHandler.hideTooltip(),M=null!=d&&null!=k?new mxPoint(d,k):new mxPoint(mxEvent.getClientX(c),
mxEvent.getClientY(c)),O=b,a.lazyZoom(e),mxEvent.consume(c),!1;f=f.parentNode}}),a.container);a.panningHandler.zoomGraph=function(c){a.cumulativeZoomFactor=c.scale;a.lazyZoom(0<c.scale,!0);mxEvent.consume(c)}};EditorUi.prototype.addChromelessToolbarItems=function(a){a(mxUtils.bind(this,function(a){this.actions.get("print").funct();mxEvent.consume(a)}),Editor.printLargeImage,mxResources.get("print"))};EditorUi.prototype.isPagesEnabled=function(){return this.editor.editable||"1"!=urlParams["hide-pages"]};
EditorUi.prototype.createTemporaryGraph=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};
EditorUi.prototype.addChromelessClickHandler=function(){var a=urlParams.highlight;null!=a&&0<a.length&&(a="#"+a);this.editor.graph.addClickHandler(a)};EditorUi.prototype.toggleFormatPanel=function(a){a=null!=a?a:0==this.formatWidth;null!=this.format&&(this.formatWidth=a?240:0,this.formatContainer.style.display=a?"":"none",this.refresh(),this.format.refresh(),this.fireEvent(new mxEventObject("formatWidthChanged")))};
EditorUi.prototype.lightboxFit=function(a){if(this.isDiagramEmpty())this.editor.graph.view.setScale(1);else{var b=urlParams.border,d=60;null!=b&&(d=parseInt(b));this.editor.graph.maxFitScale=this.lightboxMaxFitScale;this.editor.graph.fit(d,null,null,null,null,null,a);this.editor.graph.maxFitScale=null}};EditorUi.prototype.isDiagramEmpty=function(){var a=this.editor.graph.getModel();return 1==a.getChildCount(a.root)&&0==a.getChildCount(a.getChildAt(a.root,0))};
EditorUi.prototype.isSelectionAllowed=function(a){return"SELECT"==mxEvent.getSource(a).nodeName||"INPUT"==mxEvent.getSource(a).nodeName&&mxUtils.isAncestorNode(this.formatContainer,mxEvent.getSource(a))};EditorUi.prototype.addBeforeUnloadListener=function(){window.onbeforeunload=mxUtils.bind(this,function(){if(!this.editor.isChromelessView())return this.onBeforeUnload()})};EditorUi.prototype.onBeforeUnload=function(){if(this.editor.modified)return mxResources.get("allChangesLost")};
-EditorUi.prototype.open=function(){try{null!=window.opener&&null!=window.opener.openFile&&window.opener.openFile.setConsumer(mxUtils.bind(this,function(a,b){try{var d=mxUtils.parseXml(a);this.editor.setGraphXml(d.documentElement);this.editor.setModified(!1);this.editor.undoManager.clear();null!=b&&(this.editor.setFilename(b),this.updateDocumentTitle())}catch(k){mxUtils.alert(mxResources.get("invalidOrMissingFile")+": "+k.message)}}))}catch(a){}this.editor.graph.view.validate();this.editor.graph.sizeDidChange();
-this.editor.fireEvent(new mxEventObject("resetGraphView"))};EditorUi.prototype.showPopupMenu=function(a,b,d,k){this.editor.graph.popupMenuHandler.hideMenu();var f=new mxPopupMenu(a);f.div.className+=" geMenubarMenu";f.smartSeparators=!0;f.showDisabled=!0;f.autoExpand=!0;f.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(f,arguments);f.destroy()});f.popup(b,d,null,k);this.setCurrentMenu(f)};
+EditorUi.prototype.open=function(){try{null!=window.opener&&null!=window.opener.openFile&&window.opener.openFile.setConsumer(mxUtils.bind(this,function(a,b){try{var d=mxUtils.parseXml(a);this.editor.setGraphXml(d.documentElement);this.editor.setModified(!1);this.editor.undoManager.clear();null!=b&&(this.editor.setFilename(b),this.updateDocumentTitle())}catch(g){mxUtils.alert(mxResources.get("invalidOrMissingFile")+": "+g.message)}}))}catch(a){}this.editor.graph.view.validate();this.editor.graph.sizeDidChange();
+this.editor.fireEvent(new mxEventObject("resetGraphView"))};EditorUi.prototype.showPopupMenu=function(a,b,d,g){this.editor.graph.popupMenuHandler.hideMenu();var f=new mxPopupMenu(a);f.div.className+=" geMenubarMenu";f.smartSeparators=!0;f.showDisabled=!0;f.autoExpand=!0;f.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(f,arguments);f.destroy()});f.popup(b,d,null,g);this.setCurrentMenu(f)};
EditorUi.prototype.setCurrentMenu=function(a,b){this.currentMenuElt=b;this.currentMenu=a};EditorUi.prototype.resetCurrentMenu=function(){this.currentMenu=this.currentMenuElt=null};EditorUi.prototype.hideCurrentMenu=function(){null!=this.currentMenu&&(this.currentMenu.hideMenu(),this.resetCurrentMenu())};EditorUi.prototype.updateDocumentTitle=function(){var a=this.editor.getOrCreateFilename();null!=this.editor.appName&&(a+=" - "+this.editor.appName);document.title=a};
EditorUi.prototype.createHoverIcons=function(){return new HoverIcons(this.editor.graph)};EditorUi.prototype.redo=function(){try{this.editor.graph.isEditing()?document.execCommand("redo",!1,null):this.editor.undoManager.redo()}catch(a){}};EditorUi.prototype.undo=function(){try{var a=this.editor.graph;if(a.isEditing()){var b=a.cellEditor.textarea.innerHTML;document.execCommand("undo",!1,null);b==a.cellEditor.textarea.innerHTML&&(a.stopEditing(!0),this.editor.undoManager.undo())}else this.editor.undoManager.undo()}catch(d){}};
EditorUi.prototype.canRedo=function(){return this.editor.graph.isEditing()||this.editor.undoManager.canRedo()};EditorUi.prototype.canUndo=function(){return this.editor.graph.isEditing()||this.editor.undoManager.canUndo()};EditorUi.prototype.getEditBlankXml=function(){return mxUtils.getXml(this.editor.getGraphXml())};EditorUi.prototype.getUrl=function(a){a=null!=a?a:window.location.pathname;var b=0<a.indexOf("?")?1:0,d;for(d in urlParams)a=0==b?a+"?":a+"&",a+=d+"="+urlParams[d],b++;return a};
EditorUi.prototype.setScrollbars=function(a){var b=this.editor.graph,d=b.container.style.overflow;b.scrollbars=a;this.editor.updateGraphComponents();d!=b.container.style.overflow&&(b.container.scrollTop=0,b.container.scrollLeft=0,b.view.scaleAndTranslate(1,0,0),this.resetScrollbars());this.fireEvent(new mxEventObject("scrollbarsChanged"))};EditorUi.prototype.hasScrollbars=function(){return this.editor.graph.scrollbars};
EditorUi.prototype.resetScrollbars=function(){var a=this.editor.graph;if(!this.editor.extendCanvas)a.container.scrollTop=0,a.container.scrollLeft=0,mxUtils.hasScrollbars(a.container)||a.view.setTranslate(0,0);else if(!this.editor.isChromelessView())if(mxUtils.hasScrollbars(a.container))if(a.pageVisible){var b=a.getPagePadding();a.container.scrollTop=Math.floor(b.y-this.editor.initialTopSpacing)-1;a.container.scrollLeft=Math.floor(Math.min(b.x,(a.container.scrollWidth-a.container.clientWidth)/2))-
1;b=a.getGraphBounds();0<b.width&&0<b.height&&(b.x>a.container.scrollLeft+.9*a.container.clientWidth&&(a.container.scrollLeft=Math.min(b.x+b.width-a.container.clientWidth,b.x-10)),b.y>a.container.scrollTop+.9*a.container.clientHeight&&(a.container.scrollTop=Math.min(b.y+b.height-a.container.clientHeight,b.y-10)))}else{var b=a.getGraphBounds(),d=Math.max(b.width,a.scrollTileSize.width*a.view.scale);a.container.scrollTop=Math.floor(Math.max(0,b.y-Math.max(20,(a.container.clientHeight-Math.max(b.height,
-a.scrollTileSize.height*a.view.scale))/4)));a.container.scrollLeft=Math.floor(Math.max(0,b.x-Math.max(0,(a.container.clientWidth-d)/2)))}else{var b=mxRectangle.fromRectangle(a.pageVisible?a.view.getBackgroundPageBounds():a.getGraphBounds()),d=a.view.translate,k=a.view.scale;b.x=b.x/k-d.x;b.y=b.y/k-d.y;b.width/=k;b.height/=k;a.view.setTranslate(Math.floor(Math.max(0,(a.container.clientWidth-b.width)/2)-b.x+2),Math.floor((a.pageVisible?0:Math.max(0,(a.container.clientHeight-b.height)/4))-b.y+1))}};
-EditorUi.prototype.setPageVisible=function(a){var b=this.editor.graph,d=mxUtils.hasScrollbars(b.container),k=0,f=0;d&&(k=b.view.translate.x*b.view.scale-b.container.scrollLeft,f=b.view.translate.y*b.view.scale-b.container.scrollTop);b.pageVisible=a;b.pageBreaksVisible=a;b.preferPageSize=a;b.view.validateBackground();d&&(a=b.getSelectionCells(),b.clearSelection(),b.setSelectionCells(a));b.sizeDidChange();d&&(b.container.scrollLeft=b.view.translate.x*b.view.scale-k,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-d)/2)))}else{var b=mxRectangle.fromRectangle(a.pageVisible?a.view.getBackgroundPageBounds():a.getGraphBounds()),d=a.view.translate,g=a.view.scale;b.x=b.x/g-d.x;b.y=b.y/g-d.y;b.width/=g;b.height/=g;a.view.setTranslate(Math.floor(Math.max(0,(a.container.clientWidth-b.width)/2)-b.x+2),Math.floor((a.pageVisible?0:Math.max(0,(a.container.clientHeight-b.height)/4))-b.y+1))}};
+EditorUi.prototype.setPageVisible=function(a){var b=this.editor.graph,d=mxUtils.hasScrollbars(b.container),g=0,f=0;d&&(g=b.view.translate.x*b.view.scale-b.container.scrollLeft,f=b.view.translate.y*b.view.scale-b.container.scrollTop);b.pageVisible=a;b.pageBreaksVisible=a;b.preferPageSize=a;b.view.validateBackground();d&&(a=b.getSelectionCells(),b.clearSelection(),b.setSelectionCells(a));b.sizeDidChange();d&&(b.container.scrollLeft=b.view.translate.x*b.view.scale-g,b.container.scrollTop=b.view.translate.y*
b.view.scale-f);this.fireEvent(new mxEventObject("pageViewChanged"))};function ChangeGridColor(a,b){this.ui=a;this.color=b}ChangeGridColor.prototype.execute=function(){var a=this.ui.editor.graph.view.gridColor;this.ui.setGridColor(this.color);this.color=a};(function(){var a=new mxObjectCodec(new ChangeGridColor,["ui"]);mxCodecRegistry.register(a)})();
-function ChangePageSetup(a,b,d,k,f){this.ui=a;this.previousColor=this.color=b;this.previousImage=this.image=d;this.previousFormat=this.format=k;this.previousPageScale=this.pageScale=f;this.ignoreImage=this.ignoreColor=!1}
+function ChangePageSetup(a,b,d,g,f){this.ui=a;this.previousColor=this.color=b;this.previousImage=this.image=d;this.previousFormat=this.format=g;this.previousPageScale=this.pageScale=f;this.ignoreImage=this.ignoreColor=!1}
ChangePageSetup.prototype.execute=function(){var a=this.ui.editor.graph;if(!this.ignoreColor){this.color=this.previousColor;var b=a.background;this.ui.setBackgroundColor(this.previousColor);this.previousColor=b}if(!this.ignoreImage){this.image=this.previousImage;var b=a.backgroundImage,d=this.previousImage;null!=d&&null!=d.src&&"data:page/id,"==d.src.substring(0,13)&&(d=this.ui.createImageForPageLink(d.src));this.ui.setBackgroundImage(d);this.previousImage=b}null!=this.previousFormat&&(this.format=
this.previousFormat,b=a.pageFormat,this.previousFormat.width!=b.width||this.previousFormat.height!=b.height)&&(this.ui.setPageFormat(this.previousFormat),this.previousFormat=b);null!=this.foldingEnabled&&this.foldingEnabled!=this.ui.editor.graph.foldingEnabled&&(this.ui.setFoldingEnabled(this.foldingEnabled),this.foldingEnabled=!this.foldingEnabled);null!=this.previousPageScale&&(a=this.ui.editor.graph.pageScale,this.previousPageScale!=a&&(this.ui.setPageScale(this.previousPageScale),this.previousPageScale=
-a))};(function(){var a=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat","previousPageScale"]);a.afterDecode=function(a,d,k){k.previousColor=k.color;k.previousImage=k.image;k.previousFormat=k.format;k.previousPageScale=k.pageScale;null!=k.foldingEnabled&&(k.foldingEnabled=!k.foldingEnabled);return k};mxCodecRegistry.register(a)})();
+a))};(function(){var a=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat","previousPageScale"]);a.afterDecode=function(a,d,g){g.previousColor=g.color;g.previousImage=g.image;g.previousFormat=g.format;g.previousPageScale=g.pageScale;null!=g.foldingEnabled&&(g.foldingEnabled=!g.foldingEnabled);return g};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"),d=this.editor.undoManager,k=mxUtils.bind(this,function(){a.setEnabled(this.canUndo());b.setEnabled(this.canRedo())});d.addListener(mxEvent.ADD,k);d.addListener(mxEvent.UNDO,k);d.addListener(mxEvent.REDO,k);d.addListener(mxEvent.CLEAR,k);var f=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){f.apply(this,arguments);k()};var m=this.editor.graph.cellEditor.stopEditing;
-this.editor.graph.cellEditor.stopEditing=function(a,c){m.apply(this,arguments);k()};k()};
-EditorUi.prototype.updateActionStates=function(){var a=this.editor.graph,b=!1,d=!1,k=!1,f=!1,m=[],p=a.getSelectionCells();if(null!=p)for(var c=0;c<p.length;c++){var e=p[c];a.isCellEditable(e)&&(m.push(e),f=!0,a.getModel().isEdge(e)&&(k=!0),a.getModel().isVertex(e)&&(b=!0,0<a.getModel().getChildCount(e)||a.isContainer(e)))&&(d=!0)}p="cut copy bold italic underline delete duplicate editStyle editTooltip editLink backgroundColor borderColor edit toFront toBack solid dashed pasteSize dotted fillColor gradientColor shadow fontColor formattedText rounded toggleRounded sharp strokeColor".split(" ");for(c=
+EditorUi.prototype.addUndoListener=function(){var a=this.actions.get("undo"),b=this.actions.get("redo"),d=this.editor.undoManager,g=mxUtils.bind(this,function(){a.setEnabled(this.canUndo());b.setEnabled(this.canRedo())});d.addListener(mxEvent.ADD,g);d.addListener(mxEvent.UNDO,g);d.addListener(mxEvent.REDO,g);d.addListener(mxEvent.CLEAR,g);var f=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){f.apply(this,arguments);g()};var m=this.editor.graph.cellEditor.stopEditing;
+this.editor.graph.cellEditor.stopEditing=function(a,c){m.apply(this,arguments);g()};g()};
+EditorUi.prototype.updateActionStates=function(){var a=this.editor.graph,b=!1,d=!1,g=!1,f=!1,m=[],p=a.getSelectionCells();if(null!=p)for(var c=0;c<p.length;c++){var e=p[c];a.isCellEditable(e)&&(m.push(e),f=!0,a.getModel().isEdge(e)&&(g=!0),a.getModel().isVertex(e)&&(b=!0,0<a.getModel().getChildCount(e)||a.isContainer(e)))&&(d=!0)}p="cut copy bold italic underline delete duplicate editStyle editTooltip editLink backgroundColor borderColor edit toFront toBack solid dashed pasteSize dotted fillColor gradientColor shadow fontColor formattedText rounded toggleRounded sharp strokeColor".split(" ");for(c=
0;c<p.length;c++)this.actions.get(p[c]).setEnabled(f);this.actions.get("lockUnlock").setEnabled(!a.isSelectionEmpty());this.actions.get("setAsDefaultStyle").setEnabled(1==a.getSelectionCount());this.actions.get("clearWaypoints").setEnabled(f);this.actions.get("copySize").setEnabled(1==a.getSelectionCount());this.actions.get("bringForward").setEnabled(1==m.length);this.actions.get("sendBackward").setEnabled(1==m.length);this.actions.get("turn").setEnabled(0<a.getResizableCells(a.getSelectionCells()).length);
-this.actions.get("curved").setEnabled(k);this.actions.get("rotation").setEnabled(b);this.actions.get("wordWrap").setEnabled(b);this.actions.get("autosize").setEnabled(b);k=b&&1==a.getSelectionCount();this.actions.get("group").setEnabled(1<a.getSelectionCount()||k&&!a.isContainer(a.getSelectionCell()));this.actions.get("ungroup").setEnabled(d);this.actions.get("removeFromGroup").setEnabled(k&&a.getModel().isVertex(a.getModel().getParent(m[0])));a.view.getState(a.getSelectionCell());this.menus.get("navigation").setEnabled(f||
+this.actions.get("curved").setEnabled(g);this.actions.get("rotation").setEnabled(b);this.actions.get("wordWrap").setEnabled(b);this.actions.get("autosize").setEnabled(b);g=b&&1==a.getSelectionCount();this.actions.get("group").setEnabled(1<a.getSelectionCount()||g&&!a.isContainer(a.getSelectionCell()));this.actions.get("ungroup").setEnabled(d);this.actions.get("removeFromGroup").setEnabled(g&&a.getModel().isVertex(a.getModel().getParent(m[0])));a.view.getState(a.getSelectionCell());this.menus.get("navigation").setEnabled(f||
null!=a.view.currentRoot);this.actions.get("collapsible").setEnabled(b&&(a.isContainer(a.getSelectionCell())||0<a.model.getChildCount(a.getSelectionCell())));this.actions.get("home").setEnabled(null!=a.view.currentRoot);this.actions.get("exitGroup").setEnabled(null!=a.view.currentRoot);this.actions.get("enterGroup").setEnabled(1==a.getSelectionCount()&&a.isValidRoot(a.getSelectionCell()));d=1==a.getSelectionCount()&&a.isCellFoldable(a.getSelectionCell());this.actions.get("expand").setEnabled(d);this.actions.get("collapse").setEnabled(d);
this.actions.get("editLink").setEnabled(1==m.length);this.actions.get("openLink").setEnabled(1==a.getSelectionCount()&&null!=a.getLinkForCell(a.getSelectionCell()));this.actions.get("guides").setEnabled(a.isEnabled());this.actions.get("grid").setEnabled(!this.editor.chromeless||this.editor.editable);m=a.isEnabled()&&!a.isCellLocked(a.getDefaultParent());this.menus.get("layout").setEnabled(m);this.menus.get("insert").setEnabled(m);this.menus.get("direction").setEnabled(m&&b);this.menus.get("align").setEnabled(m&&
b&&1<a.getSelectionCount());this.menus.get("distribute").setEnabled(m&&b&&1<a.getSelectionCount());this.actions.get("selectVertices").setEnabled(m);this.actions.get("selectEdges").setEnabled(m);this.actions.get("selectAll").setEnabled(m);this.actions.get("selectNone").setEnabled(m);this.updatePasteActionStates()};EditorUi.prototype.zeroOffset=new mxPoint(0,0);EditorUi.prototype.getDiagramContainerOffset=function(){return this.zeroOffset};
-EditorUi.prototype.refresh=function(a){a=null!=a?a:!0;var b=this.container.clientWidth,d=this.container.clientHeight;this.container==document.body&&(b=document.body.clientWidth||document.documentElement.clientWidth,d=document.documentElement.clientHeight);var k=0;mxClient.IS_IOS&&!window.navigator.standalone&&window.innerHeight!=document.documentElement.clientHeight&&(k=document.documentElement.clientHeight-window.innerHeight,window.scrollTo(0,0));var f=Math.max(0,Math.min(this.hsplitPosition,b-this.splitSize-
-20)),m=0;null!=this.menubar&&(this.menubarContainer.style.height=this.menubarHeight+"px",m+=this.menubarHeight);null!=this.toolbar&&(this.toolbarContainer.style.top=this.menubarHeight+"px",this.toolbarContainer.style.height=this.toolbarHeight+"px",m+=this.toolbarHeight);0<m&&(m+=1);b=0;if(null!=this.sidebarFooterContainer){var p=this.footerHeight+k,b=Math.max(0,Math.min(d-m-p,this.sidebarFooterHeight));this.sidebarFooterContainer.style.width=f+"px";this.sidebarFooterContainer.style.height=b+"px";
+EditorUi.prototype.refresh=function(a){a=null!=a?a:!0;var b=this.container.clientWidth,d=this.container.clientHeight;this.container==document.body&&(b=document.body.clientWidth||document.documentElement.clientWidth,d=document.documentElement.clientHeight);var g=0;mxClient.IS_IOS&&!window.navigator.standalone&&window.innerHeight!=document.documentElement.clientHeight&&(g=document.documentElement.clientHeight-window.innerHeight,window.scrollTo(0,0));var f=Math.max(0,Math.min(this.hsplitPosition,b-this.splitSize-
+20)),m=0;null!=this.menubar&&(this.menubarContainer.style.height=this.menubarHeight+"px",m+=this.menubarHeight);null!=this.toolbar&&(this.toolbarContainer.style.top=this.menubarHeight+"px",this.toolbarContainer.style.height=this.toolbarHeight+"px",m+=this.toolbarHeight);0<m&&(m+=1);b=0;if(null!=this.sidebarFooterContainer){var p=this.footerHeight+g,b=Math.max(0,Math.min(d-m-p,this.sidebarFooterHeight));this.sidebarFooterContainer.style.width=f+"px";this.sidebarFooterContainer.style.height=b+"px";
this.sidebarFooterContainer.style.bottom=p+"px"}d=null!=this.format?this.formatWidth:0;this.sidebarContainer.style.top=m+"px";this.sidebarContainer.style.width=f+"px";this.formatContainer.style.top=m+"px";this.formatContainer.style.width=d+"px";this.formatContainer.style.display=null!=this.format?"":"none";var p=this.getDiagramContainerOffset(),c=null!=this.hsplit.parentNode?f+this.splitSize:0;this.diagramContainer.style.left=c+p.x+"px";this.diagramContainer.style.top=m+p.y+"px";this.footerContainer.style.height=
-this.footerHeight+"px";this.hsplit.style.top=this.sidebarContainer.style.top;this.hsplit.style.bottom=this.footerHeight+k+"px";this.hsplit.style.left=f+"px";this.footerContainer.style.display=0==this.footerHeight?"none":"";null!=this.tabContainer&&(this.tabContainer.style.left=c+"px");0<this.footerHeight&&(this.footerContainer.style.bottom=k+"px");this.diagramContainer.style.right=d+"px";f=0;null!=this.tabContainer&&(this.tabContainer.style.bottom=this.footerHeight+k+"px",this.tabContainer.style.right=
-this.diagramContainer.style.right,f=this.tabContainer.clientHeight);this.sidebarContainer.style.bottom=this.footerHeight+b+k+"px";this.formatContainer.style.bottom=this.footerHeight+k+"px";this.diagramContainer.style.bottom=this.footerHeight+k+f+"px";a&&this.editor.graph.sizeDidChange()};EditorUi.prototype.createTabContainer=function(){return null};
+this.footerHeight+"px";this.hsplit.style.top=this.sidebarContainer.style.top;this.hsplit.style.bottom=this.footerHeight+g+"px";this.hsplit.style.left=f+"px";this.footerContainer.style.display=0==this.footerHeight?"none":"";null!=this.tabContainer&&(this.tabContainer.style.left=c+"px");0<this.footerHeight&&(this.footerContainer.style.bottom=g+"px");this.diagramContainer.style.right=d+"px";f=0;null!=this.tabContainer&&(this.tabContainer.style.bottom=this.footerHeight+g+"px",this.tabContainer.style.right=
+this.diagramContainer.style.right,f=this.tabContainer.clientHeight);this.sidebarContainer.style.bottom=this.footerHeight+b+g+"px";this.formatContainer.style.bottom=this.footerHeight+g+"px";this.diagramContainer.style.bottom=this.footerHeight+g+f+"px";a&&this.editor.graph.sizeDidChange()};EditorUi.prototype.createTabContainer=function(){return null};
EditorUi.prototype.createDivs=function(){this.menubarContainer=this.createDiv("geMenubarContainer");this.toolbarContainer=this.createDiv("geToolbarContainer");this.sidebarContainer=this.createDiv("geSidebarContainer");this.formatContainer=this.createDiv("geSidebarContainer geFormatContainer");this.diagramContainer=this.createDiv("geDiagramContainer");this.footerContainer=this.createDiv("geFooterContainer");this.hsplit=this.createDiv("geHsplit");this.hsplit.setAttribute("title",mxResources.get("collapseExpand"));
this.menubarContainer.style.top="0px";this.menubarContainer.style.left="0px";this.menubarContainer.style.right="0px";this.toolbarContainer.style.left="0px";this.toolbarContainer.style.right="0px";this.sidebarContainer.style.left="0px";this.formatContainer.style.right="0px";this.formatContainer.style.zIndex="1";this.diagramContainer.style.right=(null!=this.format?this.formatWidth:0)+"px";this.footerContainer.style.left="0px";this.footerContainer.style.right="0px";this.footerContainer.style.bottom=
"0px";this.footerContainer.style.zIndex=mxPopupMenu.prototype.zIndex-3;this.hsplit.style.width=this.splitSize+"px";if(this.sidebarFooterContainer=this.createSidebarFooterContainer())this.sidebarFooterContainer.style.left="0px";this.editor.chromeless?this.diagramContainer.style.border="none":this.tabContainer=this.createTabContainer()};EditorUi.prototype.createSidebarFooterContainer=function(){return null};
@@ -2248,18 +2249,18 @@ this.sidebar=this.editor.chromeless?null:this.createSidebar(this.sidebarContaine
this.container.appendChild(this.sidebarFooterContainer);this.container.appendChild(this.diagramContainer);null!=this.container&&null!=this.tabContainer&&this.container.appendChild(this.tabContainer);this.toolbar=this.editor.chromeless?null:this.createToolbar(this.createDiv("geToolbar"));null!=this.toolbar&&(this.toolbarContainer.appendChild(this.toolbar.container),this.container.appendChild(this.toolbarContainer));null!=this.sidebar&&(this.container.appendChild(this.hsplit),this.addSplitHandler(this.hsplit,
!0,0,mxUtils.bind(this,function(a){this.hsplitPosition=a;this.refresh()})))};EditorUi.prototype.createStatusContainer=function(){var a=document.createElement("a");a.className="geItem geStatus";return a};EditorUi.prototype.setStatusText=function(a){this.statusContainer.innerHTML=a};EditorUi.prototype.createToolbar=function(a){return new Toolbar(this,a)};EditorUi.prototype.createSidebar=function(a){return new Sidebar(this,a)};EditorUi.prototype.createFormat=function(a){return new Format(this,a)};
EditorUi.prototype.createFooter=function(){return this.createDiv("geFooter")};EditorUi.prototype.createDiv=function(a){var b=document.createElement("div");b.className=a;return b};
-EditorUi.prototype.addSplitHandler=function(a,b,d,k){function f(a){if(null!=p){var f=new mxPoint(mxEvent.getClientX(a),mxEvent.getClientY(a));k(Math.max(0,c+(b?f.x-p.x:p.y-f.y)-d));mxEvent.consume(a);c!=n()&&(e=!0,g=null)}}function m(a){f(a);p=c=null}var p=null,c=null,e=!0,g=null;mxClient.IS_POINTER&&(a.style.touchAction="none");var n=mxUtils.bind(this,function(){var c=parseInt(b?a.style.left:a.style.bottom);b||(c=c+d-this.footerHeight);return c});mxEvent.addGestureListeners(a,function(a){p=new mxPoint(mxEvent.getClientX(a),
-mxEvent.getClientY(a));c=n();e=!1;mxEvent.consume(a)});mxEvent.addListener(a,"click",mxUtils.bind(this,function(a){if(!e&&this.hsplitClickEnabled){var c=null!=g?g-d:0;g=n();k(c);mxEvent.consume(a)}}));mxEvent.addGestureListeners(document,null,f,m);this.destroyFunctions.push(function(){mxEvent.removeGestureListeners(document,null,f,m)})};
-EditorUi.prototype.handleError=function(a,b,d,k,f){a=null!=a&&null!=a.error?a.error:a;if(null!=a||null!=b){f=mxUtils.htmlEntities(mxResources.get("unknownError"));var m=mxResources.get("ok");b=null!=b?b:mxResources.get("error");null!=a&&null!=a.message&&(f=mxUtils.htmlEntities(a.message));this.showError(b,f,m,d,null,null,null,null,null,null,null,null,k?d:null)}else null!=d&&d()};
-EditorUi.prototype.showError=function(a,b,d,k,f,m,p,c,e,g,n,l,q){a=new ErrorDialog(this,a,b,d||mxResources.get("ok"),k,f,m,p,l,c,e);b=Math.ceil(null!=b?b.length/50:1);this.showDialog(a.container,g||340,n||100+20*b,!0,!1,q);a.init()};EditorUi.prototype.showDialog=function(a,b,d,k,f,m,p,c,e,g){this.editor.graph.tooltipHandler.resetTimer();this.editor.graph.tooltipHandler.hideTooltip();null==this.dialogs&&(this.dialogs=[]);this.dialog=new Dialog(this,a,b,d,k,f,m,p,c,e,g);this.dialogs.push(this.dialog)};
+EditorUi.prototype.addSplitHandler=function(a,b,d,g){function f(a){if(null!=p){var f=new mxPoint(mxEvent.getClientX(a),mxEvent.getClientY(a));g(Math.max(0,c+(b?f.x-p.x:p.y-f.y)-d));mxEvent.consume(a);c!=n()&&(e=!0,k=null)}}function m(a){f(a);p=c=null}var p=null,c=null,e=!0,k=null;mxClient.IS_POINTER&&(a.style.touchAction="none");var n=mxUtils.bind(this,function(){var c=parseInt(b?a.style.left:a.style.bottom);b||(c=c+d-this.footerHeight);return c});mxEvent.addGestureListeners(a,function(a){p=new mxPoint(mxEvent.getClientX(a),
+mxEvent.getClientY(a));c=n();e=!1;mxEvent.consume(a)});mxEvent.addListener(a,"click",mxUtils.bind(this,function(a){if(!e&&this.hsplitClickEnabled){var c=null!=k?k-d:0;k=n();g(c);mxEvent.consume(a)}}));mxEvent.addGestureListeners(document,null,f,m);this.destroyFunctions.push(function(){mxEvent.removeGestureListeners(document,null,f,m)})};
+EditorUi.prototype.handleError=function(a,b,d,g,f){a=null!=a&&null!=a.error?a.error:a;if(null!=a||null!=b){f=mxUtils.htmlEntities(mxResources.get("unknownError"));var m=mxResources.get("ok");b=null!=b?b:mxResources.get("error");null!=a&&null!=a.message&&(f=mxUtils.htmlEntities(a.message));this.showError(b,f,m,d,null,null,null,null,null,null,null,null,g?d:null)}else null!=d&&d()};
+EditorUi.prototype.showError=function(a,b,d,g,f,m,p,c,e,k,n,l,q){a=new ErrorDialog(this,a,b,d||mxResources.get("ok"),g,f,m,p,l,c,e);b=Math.ceil(null!=b?b.length/50:1);this.showDialog(a.container,k||340,n||100+20*b,!0,!1,q);a.init()};EditorUi.prototype.showDialog=function(a,b,d,g,f,m,p,c,e,k){this.editor.graph.tooltipHandler.resetTimer();this.editor.graph.tooltipHandler.hideTooltip();null==this.dialogs&&(this.dialogs=[]);this.dialog=new Dialog(this,a,b,d,g,f,m,p,c,e,k);this.dialogs.push(this.dialog)};
EditorUi.prototype.hideDialog=function(a,b,d){null!=this.dialogs&&0<this.dialogs.length&&(null==d||d==this.dialog.container.firstChild)&&(d=this.dialogs.pop(),0==d.close(a,b)?this.dialogs.push(d):(this.dialog=0<this.dialogs.length?this.dialogs[this.dialogs.length-1]:null,this.editor.fireEvent(new mxEventObject("hideDialog")),null==this.dialog&&"hidden"!=this.editor.graph.container.style.visibility&&window.setTimeout(mxUtils.bind(this,function(){this.editor.graph.isEditing()&&null!=this.editor.graph.cellEditor.textarea?
-this.editor.graph.cellEditor.textarea.focus():(mxUtils.clearSelection(),this.editor.graph.container.focus())}),0)))};EditorUi.prototype.ctrlEnter=function(){var a=this.editor.graph;if(a.isEnabled())try{for(var b=a.getSelectionCells(),d=new mxDictionary,k=[],f=0;f<b.length;f++){var m=a.isTableCell(b[f])?a.model.getParent(b[f]):b[f];null==m||d.get(m)||(d.put(m,!0),k.push(m))}a.setSelectionCells(a.duplicateCells(k,!1))}catch(p){this.handleError(p)}};
-EditorUi.prototype.pickColor=function(a,b){var d=this.editor.graph,k=d.cellEditor.saveSelection(),f=230+17*(Math.ceil(ColorDialog.prototype.presetColors.length/12)+Math.ceil(ColorDialog.prototype.defaultColors.length/12)),m=new ColorDialog(this,a||"none",function(a){d.cellEditor.restoreSelection(k);b(a)},function(){d.cellEditor.restoreSelection(k)});this.showDialog(m.container,230,f,!0,!1);m.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(),d=new mxDictionary,g=[],f=0;f<b.length;f++){var m=a.isTableCell(b[f])?a.model.getParent(b[f]):b[f];null==m||d.get(m)||(d.put(m,!0),g.push(m))}a.setSelectionCells(a.duplicateCells(g,!1))}catch(p){this.handleError(p)}};
+EditorUi.prototype.pickColor=function(a,b){var d=this.editor.graph,g=d.cellEditor.saveSelection(),f=230+17*(Math.ceil(ColorDialog.prototype.presetColors.length/12)+Math.ceil(ColorDialog.prototype.defaultColors.length/12)),m=new ColorDialog(this,a||"none",function(a){d.cellEditor.restoreSelection(g);b(a)},function(){d.cellEditor.restoreSelection(g)});this.showDialog(m.container,230,f,!0,!1);m.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 d=a.indexOf("&lt;mxGraphModel ");if(0<=d){var k=a.lastIndexOf("&lt;/mxGraphModel&gt;");k>d&&(b=a.substring(d,k+21).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}}catch(f){}return b};
+EditorUi.prototype.extractGraphModelFromHtml=function(a){var b=null;try{var d=a.indexOf("&lt;mxGraphModel ");if(0<=d){var g=a.lastIndexOf("&lt;/mxGraphModel&gt;");g>d&&(b=a.substring(d,g+21).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}}catch(f){}return b};
EditorUi.prototype.readGraphModelFromClipboard=function(a){this.readGraphModelFromClipboardWithType(mxUtils.bind(this,function(b){null!=b?a(b):this.readGraphModelFromClipboardWithType(mxUtils.bind(this,function(b){if(null!=b){var d=decodeURIComponent(b);this.isCompatibleString(d)&&(b=d)}a(b)}),"text")}),"html")};
EditorUi.prototype.readGraphModelFromClipboardWithType=function(a,b){navigator.clipboard.read().then(mxUtils.bind(this,function(d){if(null!=d&&0<d.length&&"html"==b&&0<=mxUtils.indexOf(d[0].types,"text/html"))d[0].getType("text/html").then(mxUtils.bind(this,function(b){b.text().then(mxUtils.bind(this,function(b){try{var d=this.parseHtmlData(b),f="text/plain"!=d.getAttribute("data-type")?d.innerHTML:mxUtils.trim(null==d.innerText?mxUtils.getTextContent(d):d.innerText);try{var c=f.lastIndexOf("%3E");
-0<=c&&c<f.length-3&&(f=f.substring(0,c+3))}catch(n){}try{var e=d.getElementsByTagName("span"),g=null!=e&&0<e.length?mxUtils.trim(decodeURIComponent(e[0].textContent)):decodeURIComponent(f);this.isCompatibleString(g)&&(f=g)}catch(n){}}catch(n){}a(this.isCompatibleString(f)?f:null)}))["catch"](function(b){a(null)})}))["catch"](function(b){a(null)});else if(null!=d&&0<d.length&&"text"==b&&0<=mxUtils.indexOf(d[0].types,"text/plain"))d[0].getType("text/plain").then(function(b){b.text().then(function(b){a(b)})["catch"](function(){a(null)})})["catch"](function(){a(null)});
+0<=c&&c<f.length-3&&(f=f.substring(0,c+3))}catch(n){}try{var e=d.getElementsByTagName("span"),k=null!=e&&0<e.length?mxUtils.trim(decodeURIComponent(e[0].textContent)):decodeURIComponent(f);this.isCompatibleString(k)&&(f=k)}catch(n){}}catch(n){}a(this.isCompatibleString(f)?f:null)}))["catch"](function(b){a(null)})}))["catch"](function(b){a(null)});else if(null!=d&&0<d.length&&"text"==b&&0<=mxUtils.indexOf(d[0].types,"text/plain"))d[0].getType("text/plain").then(function(b){b.text().then(function(b){a(b)})["catch"](function(){a(null)})})["catch"](function(){a(null)});
else a(null)}))["catch"](function(b){a(null)})};
EditorUi.prototype.parseHtmlData=function(a){var b=null;if(null!=a&&0<a.length){var d="<meta "==a.substring(0,6),b=document.createElement("div");b.innerHTML=(d?'<meta charset="utf-8">':"")+this.editor.graph.sanitizeHtml(a);asHtml=!0;a=b.getElementsByTagName("style");if(null!=a)for(;0<a.length;)a[0].parentNode.removeChild(a[0]);null!=b.firstChild&&b.firstChild.nodeType==mxConstants.NODETYPE_ELEMENT&&null!=b.firstChild.nextSibling&&b.firstChild.nextSibling.nodeType==mxConstants.NODETYPE_ELEMENT&&"META"==
b.firstChild.nodeName&&"A"==b.firstChild.nextSibling.nodeName&&null==b.firstChild.nextSibling.nextSibling&&(a=null==b.firstChild.nextSibling.innerText?mxUtils.getTextContent(b.firstChild.nextSibling):b.firstChild.nextSibling.innerText,a==b.firstChild.nextSibling.getAttribute("href")&&(mxUtils.setTextContent(b,a),asHtml=!1));d=d&&null!=b.firstChild?b.firstChild.nextSibling:b.firstChild;null!=d&&null==d.nextSibling&&d.nodeType==mxConstants.NODETYPE_ELEMENT&&"IMG"==d.nodeName?(a=d.getAttribute("src"),
@@ -2269,150 +2270,150 @@ EditorUi.prototype.extractGraphModelFromEvent=function(a){var b=null,d=null;null
(b=d);return b};EditorUi.prototype.isCompatibleString=function(a){return!1};EditorUi.prototype.saveFile=function(a){a||null==this.editor.filename?(a=new FilenameDialog(this,this.editor.getOrCreateFilename(),mxResources.get("save"),mxUtils.bind(this,function(a){this.save(a)}),null,mxUtils.bind(this,function(a){if(null!=a&&0<a.length)return!0;mxUtils.confirm(mxResources.get("invalidName"));return!1})),this.showDialog(a.container,300,100,!0,!0),a.init()):this.save(this.editor.getOrCreateFilename())};
EditorUi.prototype.save=function(a){if(null!=a){this.editor.graph.isEditing()&&this.editor.graph.stopEditing();var b=mxUtils.getXml(this.editor.getGraphXml());try{if(Editor.useLocalStorage){if(null!=localStorage.getItem(a)&&!mxUtils.confirm(mxResources.get("replaceIt",[a])))return;localStorage.setItem(a,b);this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("saved"))+" "+new Date)}else if(b.length<MAX_REQUEST_SIZE)(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(a)+"&xml="+encodeURIComponent(b))).simulate(document,
"_blank");else{mxUtils.alert(mxResources.get("drawingTooLarge"));mxUtils.popup(b);return}this.editor.setModified(!1);this.editor.setFilename(a);this.updateDocumentTitle()}catch(d){this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("errorSavingFile")))}}};
-EditorUi.prototype.executeLayout=function(a,b,d){var k=this.editor.graph;if(k.isEnabled()){k.getModel().beginUpdate();try{a()}catch(f){throw f;}finally{this.allowAnimation&&b&&(null==navigator.userAgent||0>navigator.userAgent.indexOf("Camino"))?(a=new mxMorphing(k),a.addListener(mxEvent.DONE,mxUtils.bind(this,function(){k.getModel().endUpdate();null!=d&&d()})),a.startAnimation()):(k.getModel().endUpdate(),null!=d&&d())}}};
-EditorUi.prototype.showImageDialog=function(a,b,d,k){k=this.editor.graph.cellEditor;var f=k.saveSelection(),m=mxUtils.prompt(a,b);k.restoreSelection(f);if(null!=m&&0<m.length){var p=new Image;p.onload=function(){d(m,p.width,p.height)};p.onerror=function(){d(null);mxUtils.alert(mxResources.get("fileNotFound"))};p.src=m}else d(null)};EditorUi.prototype.showLinkDialog=function(a,b,d){a=new LinkDialog(this,a,b,d);this.showDialog(a.container,420,90,!0,!0);a.init()};
+EditorUi.prototype.executeLayout=function(a,b,d){var g=this.editor.graph;if(g.isEnabled()){g.getModel().beginUpdate();try{a()}catch(f){throw f;}finally{this.allowAnimation&&b&&(null==navigator.userAgent||0>navigator.userAgent.indexOf("Camino"))?(a=new mxMorphing(g),a.addListener(mxEvent.DONE,mxUtils.bind(this,function(){g.getModel().endUpdate();null!=d&&d()})),a.startAnimation()):(g.getModel().endUpdate(),null!=d&&d())}}};
+EditorUi.prototype.showImageDialog=function(a,b,d,g){g=this.editor.graph.cellEditor;var f=g.saveSelection(),m=mxUtils.prompt(a,b);g.restoreSelection(f);if(null!=m&&0<m.length){var p=new Image;p.onload=function(){d(m,p.width,p.height)};p.onerror=function(){d(null);mxUtils.alert(mxResources.get("fileNotFound"))};p.src=m}else d(null)};EditorUi.prototype.showLinkDialog=function(a,b,d){a=new LinkDialog(this,a,b,d);this.showDialog(a.container,420,90,!0,!0);a.init()};
EditorUi.prototype.showDataDialog=function(a){null!=a&&(a=new EditDataDialog(this,a),this.showDialog(a.container,480,420,!0,!1,null,!1),a.init())};
EditorUi.prototype.showBackgroundImageDialog=function(a,b){a=null!=a?a:mxUtils.bind(this,function(a){a=new ChangePageSetup(this,null,a);a.ignoreColor=!0;this.editor.graph.model.execute(a)});var d=mxUtils.prompt(mxResources.get("backgroundImage"),null!=b?b.src:"");null!=d&&0<d.length?(b=new Image,b.onload=function(){a(new mxImage(d,b.width,b.height),!1)},b.onerror=function(){a(null,!0);mxUtils.alert(mxResources.get("fileNotFound"))},b.src=d):a(null)};
EditorUi.prototype.setBackgroundImage=function(a){this.editor.graph.setBackgroundImage(a);this.editor.graph.view.validateBackgroundImage();this.fireEvent(new mxEventObject("backgroundImageChanged"))};EditorUi.prototype.confirm=function(a,b,d){mxUtils.confirm(a)?null!=b&&b():null!=d&&d()};EditorUi.prototype.createOutline=function(a){var b=new mxOutline(this.editor.graph);mxEvent.addListener(window,"resize",function(){b.update(!1)});return b};
EditorUi.prototype.altShiftActions={67:"clearWaypoints",65:"connectionArrows",76:"editLink",80:"connectionPoints",84:"editTooltip",86:"pasteSize",88:"copySize",66:"copyData",69:"pasteData"};
-EditorUi.prototype.createKeyHandler=function(a){function b(a,e,b){p.push(function(){if(!k.isSelectionEmpty()&&k.isEnabled())if(e=null!=e?e:1,b){k.getModel().beginUpdate();try{for(var c=k.getSelectionCells(),d=0;d<c.length;d++)if(k.getModel().isVertex(c[d])&&k.isCellResizable(c[d])){var g=k.getCellGeometry(c[d]);null!=g&&(g=g.clone(),37==a?g.width=Math.max(0,g.width-e):38==a?g.height=Math.max(0,g.height-e):39==a?g.width+=e:40==a&&(g.height+=e),k.getModel().setGeometry(c[d],g))}}finally{k.getModel().endUpdate()}}else{var f=
-k.getSelectionCell(),g=k.model.getParent(f),c=null;1==k.getSelectionCount()&&k.model.isVertex(f)&&null!=k.layoutManager&&!k.isCellLocked(f)&&(c=k.layoutManager.getLayout(g));if(null!=c&&c.constructor==mxStackLayout)c=g.getIndex(f),37==a||38==a?k.model.add(g,f,Math.max(0,c-1)):39!=a&&40!=a||k.model.add(g,f,Math.min(k.model.getChildCount(g),c+1));else{c=k.getMovableCells(k.getSelectionCells());f=[];for(d=0;d<c.length;d++)g=k.getCurrentCellStyle(c[d]),"1"==mxUtils.getValue(g,"part","0")?(g=k.model.getParent(c[d]),
-k.model.isVertex(g)&&0>mxUtils.indexOf(c,g)&&f.push(g)):f.push(c[d]);0<f.length&&(c=g=0,37==a?g=-e:38==a?c=-e:39==a?g=e:40==a&&(c=e),k.moveCells(f,g,c))}}});null!=c&&window.clearTimeout(c);c=window.setTimeout(function(){if(0<p.length){k.getModel().beginUpdate();try{for(var a=0;a<p.length;a++)p[a]();p=[]}finally{k.getModel().endUpdate()}}},200)}var d=this,k=this.editor.graph,f=new mxKeyHandler(k),m=f.isEventIgnored;f.isEventIgnored=function(a){return!(mxEvent.isShiftDown(a)&&9==a.keyCode)&&(!this.isControlDown(a)||
+EditorUi.prototype.createKeyHandler=function(a){function b(a,e,b){p.push(function(){if(!g.isSelectionEmpty()&&g.isEnabled())if(e=null!=e?e:1,b){g.getModel().beginUpdate();try{for(var c=g.getSelectionCells(),d=0;d<c.length;d++)if(g.getModel().isVertex(c[d])&&g.isCellResizable(c[d])){var k=g.getCellGeometry(c[d]);null!=k&&(k=k.clone(),37==a?k.width=Math.max(0,k.width-e):38==a?k.height=Math.max(0,k.height-e):39==a?k.width+=e:40==a&&(k.height+=e),g.getModel().setGeometry(c[d],k))}}finally{g.getModel().endUpdate()}}else{var f=
+g.getSelectionCell(),k=g.model.getParent(f),c=null;1==g.getSelectionCount()&&g.model.isVertex(f)&&null!=g.layoutManager&&!g.isCellLocked(f)&&(c=g.layoutManager.getLayout(k));if(null!=c&&c.constructor==mxStackLayout)c=k.getIndex(f),37==a||38==a?g.model.add(k,f,Math.max(0,c-1)):39!=a&&40!=a||g.model.add(k,f,Math.min(g.model.getChildCount(k),c+1));else{c=g.getMovableCells(g.getSelectionCells());f=[];for(d=0;d<c.length;d++)k=g.getCurrentCellStyle(c[d]),"1"==mxUtils.getValue(k,"part","0")?(k=g.model.getParent(c[d]),
+g.model.isVertex(k)&&0>mxUtils.indexOf(c,k)&&f.push(k)):f.push(c[d]);0<f.length&&(c=k=0,37==a?k=-e:38==a?c=-e:39==a?k=e:40==a&&(c=e),g.moveCells(f,k,c))}}});null!=c&&window.clearTimeout(c);c=window.setTimeout(function(){if(0<p.length){g.getModel().beginUpdate();try{for(var a=0;a<p.length;a++)p[a]();p=[]}finally{g.getModel().endUpdate()}}},200)}var d=this,g=this.editor.graph,f=new mxKeyHandler(g),m=f.isEventIgnored;f.isEventIgnored=function(a){return!(mxEvent.isShiftDown(a)&&9==a.keyCode)&&(!this.isControlDown(a)||
mxEvent.isShiftDown(a)||90!=a.keyCode&&89!=a.keyCode&&188!=a.keyCode&&190!=a.keyCode&&85!=a.keyCode)&&(66!=a.keyCode&&73!=a.keyCode||!this.isControlDown(a)||this.graph.cellEditor.isContentEditing()&&!mxClient.IS_FF&&!mxClient.IS_SF)&&m.apply(this,arguments)};f.isEnabledForEvent=function(a){return!mxEvent.isConsumed(a)&&this.isGraphEvent(a)&&this.isEnabled()&&(null==d.dialogs||0==d.dialogs.length)};f.isControlDown=function(a){return mxEvent.isControlDown(a)||mxClient.IS_MAC&&a.metaKey};var p=[],c=
-null,e={37:mxConstants.DIRECTION_WEST,38:mxConstants.DIRECTION_NORTH,39:mxConstants.DIRECTION_EAST,40:mxConstants.DIRECTION_SOUTH},g=f.getFunction;mxKeyHandler.prototype.getFunction=function(a){if(k.isEnabled()){if(mxEvent.isShiftDown(a)&&mxEvent.isAltDown(a)){var c=d.actions.get(d.altShiftActions[a.keyCode]);if(null!=c)return c.funct}if(null!=e[a.keyCode]&&!k.isSelectionEmpty())if(!this.isControlDown(a)&&mxEvent.isShiftDown(a)&&mxEvent.isAltDown(a)){if(k.model.isVertex(k.getSelectionCell()))return function(){var c=
-k.connectVertex(k.getSelectionCell(),e[a.keyCode],k.defaultEdgeLength,a,!0);null!=c&&0<c.length&&(1==c.length&&k.model.isEdge(c[0])?k.setSelectionCell(k.model.getTerminal(c[0],!1)):k.setSelectionCell(c[c.length-1]),k.scrollCellToVisible(k.getSelectionCell()),null!=d.hoverIcons&&d.hoverIcons.update(k.view.getState(k.getSelectionCell())))}}else return this.isControlDown(a)?function(){b(a.keyCode,mxEvent.isShiftDown(a)?k.gridSize:null,!0)}:function(){b(a.keyCode,mxEvent.isShiftDown(a)?k.gridSize:null)}}return g.apply(this,
-arguments)};f.bindAction=mxUtils.bind(this,function(a,c,e,b){var d=this.actions.get(e);null!=d&&(e=function(){d.isEnabled()&&d.funct()},c?b?f.bindControlShiftKey(a,e):f.bindControlKey(a,e):b?f.bindShiftKey(a,e):f.bindKey(a,e))});var n=this,l=f.escape;f.escape=function(a){l.apply(this,arguments)};f.enter=function(){};f.bindControlShiftKey(36,function(){k.exitGroup()});f.bindControlShiftKey(35,function(){k.enterGroup()});f.bindShiftKey(36,function(){k.home()});f.bindKey(35,function(){k.refresh()});
-f.bindAction(107,!0,"zoomIn");f.bindAction(109,!0,"zoomOut");f.bindAction(80,!0,"print");f.bindAction(79,!0,"outline",!0);if(!this.editor.chromeless||this.editor.editable)f.bindControlKey(36,function(){k.isEnabled()&&k.foldCells(!0)}),f.bindControlKey(35,function(){k.isEnabled()&&k.foldCells(!1)}),f.bindControlKey(13,function(){n.ctrlEnter()}),f.bindAction(8,!1,"delete"),f.bindAction(8,!0,"deleteAll"),f.bindAction(8,!1,"deleteLabels",!0),f.bindAction(46,!1,"delete"),f.bindAction(46,!0,"deleteAll"),
+null,e={37:mxConstants.DIRECTION_WEST,38:mxConstants.DIRECTION_NORTH,39:mxConstants.DIRECTION_EAST,40:mxConstants.DIRECTION_SOUTH},k=f.getFunction;mxKeyHandler.prototype.getFunction=function(a){if(g.isEnabled()){if(mxEvent.isShiftDown(a)&&mxEvent.isAltDown(a)){var c=d.actions.get(d.altShiftActions[a.keyCode]);if(null!=c)return c.funct}if(null!=e[a.keyCode]&&!g.isSelectionEmpty())if(!this.isControlDown(a)&&mxEvent.isShiftDown(a)&&mxEvent.isAltDown(a)){if(g.model.isVertex(g.getSelectionCell()))return function(){var c=
+g.connectVertex(g.getSelectionCell(),e[a.keyCode],g.defaultEdgeLength,a,!0);null!=c&&0<c.length&&(1==c.length&&g.model.isEdge(c[0])?g.setSelectionCell(g.model.getTerminal(c[0],!1)):g.setSelectionCell(c[c.length-1]),g.scrollCellToVisible(g.getSelectionCell()),null!=d.hoverIcons&&d.hoverIcons.update(g.view.getState(g.getSelectionCell())))}}else return this.isControlDown(a)?function(){b(a.keyCode,mxEvent.isShiftDown(a)?g.gridSize:null,!0)}:function(){b(a.keyCode,mxEvent.isShiftDown(a)?g.gridSize:null)}}return k.apply(this,
+arguments)};f.bindAction=mxUtils.bind(this,function(a,c,e,b){var d=this.actions.get(e);null!=d&&(e=function(){d.isEnabled()&&d.funct()},c?b?f.bindControlShiftKey(a,e):f.bindControlKey(a,e):b?f.bindShiftKey(a,e):f.bindKey(a,e))});var n=this,l=f.escape;f.escape=function(a){l.apply(this,arguments)};f.enter=function(){};f.bindControlShiftKey(36,function(){g.exitGroup()});f.bindControlShiftKey(35,function(){g.enterGroup()});f.bindShiftKey(36,function(){g.home()});f.bindKey(35,function(){g.refresh()});
+f.bindAction(107,!0,"zoomIn");f.bindAction(109,!0,"zoomOut");f.bindAction(80,!0,"print");f.bindAction(79,!0,"outline",!0);if(!this.editor.chromeless||this.editor.editable)f.bindControlKey(36,function(){g.isEnabled()&&g.foldCells(!0)}),f.bindControlKey(35,function(){g.isEnabled()&&g.foldCells(!1)}),f.bindControlKey(13,function(){n.ctrlEnter()}),f.bindAction(8,!1,"delete"),f.bindAction(8,!0,"deleteAll"),f.bindAction(8,!1,"deleteLabels",!0),f.bindAction(46,!1,"delete"),f.bindAction(46,!0,"deleteAll"),
f.bindAction(46,!1,"deleteLabels",!0),f.bindAction(36,!1,"resetView"),f.bindAction(72,!0,"fitWindow",!0),f.bindAction(74,!0,"fitPage"),f.bindAction(74,!0,"fitTwoPages",!0),f.bindAction(48,!0,"customZoom"),f.bindAction(82,!0,"turn"),f.bindAction(82,!0,"clearDefaultStyle",!0),f.bindAction(83,!0,"save"),f.bindAction(83,!0,"saveAs",!0),f.bindAction(65,!0,"selectAll"),f.bindAction(65,!0,"selectNone",!0),f.bindAction(73,!0,"selectVertices",!0),f.bindAction(69,!0,"selectEdges",!0),f.bindAction(69,!0,"editStyle"),
f.bindAction(66,!0,"bold"),f.bindAction(66,!0,"toBack",!0),f.bindAction(70,!0,"toFront",!0),f.bindAction(68,!0,"duplicate"),f.bindAction(68,!0,"setAsDefaultStyle",!0),f.bindAction(90,!0,"undo"),f.bindAction(89,!0,"autosize",!0),f.bindAction(88,!0,"cut"),f.bindAction(67,!0,"copy"),f.bindAction(86,!0,"paste"),f.bindAction(71,!0,"group"),f.bindAction(77,!0,"editData"),f.bindAction(71,!0,"grid",!0),f.bindAction(73,!0,"italic"),f.bindAction(76,!0,"lockUnlock"),f.bindAction(76,!0,"layers",!0),f.bindAction(80,
-!0,"formatPanel",!0),f.bindAction(85,!0,"underline"),f.bindAction(85,!0,"ungroup",!0),f.bindAction(190,!0,"superscript"),f.bindAction(188,!0,"subscript"),f.bindAction(13,!1,"keyPressEnter"),f.bindKey(113,function(){k.isEnabled()&&k.startEditingAtCell()});mxClient.IS_WIN?f.bindAction(89,!0,"redo"):f.bindAction(90,!0,"redo",!0);return f};
+!0,"formatPanel",!0),f.bindAction(85,!0,"underline"),f.bindAction(85,!0,"ungroup",!0),f.bindAction(190,!0,"superscript"),f.bindAction(188,!0,"subscript"),f.bindAction(13,!1,"keyPressEnter"),f.bindKey(113,function(){g.isEnabled()&&g.startEditingAtCell()});mxClient.IS_WIN?f.bindAction(89,!0,"redo"):f.bindAction(90,!0,"redo",!0);return f};
EditorUi.prototype.destroy=function(){null!=this.editor&&(this.editor.destroy(),this.editor=null);null!=this.menubar&&(this.menubar.destroy(),this.menubar=null);null!=this.toolbar&&(this.toolbar.destroy(),this.toolbar=null);null!=this.sidebar&&(this.sidebar.destroy(),this.sidebar=null);null!=this.keyHandler&&(this.keyHandler.destroy(),this.keyHandler=null);null!=this.keydownHandler&&(mxEvent.removeListener(document,"keydown",this.keydownHandler),this.keydownHandler=null);null!=this.keyupHandler&&
(mxEvent.removeListener(document,"keyup",this.keyupHandler),this.keyupHandler=null);null!=this.resizeHandler&&(mxEvent.removeListener(window,"resize",this.resizeHandler),this.resizeHandler=null);null!=this.gestureHandler&&(mxEvent.removeGestureListeners(document,this.gestureHandler),this.gestureHandler=null);null!=this.orientationChangeHandler&&(mxEvent.removeListener(window,"orientationchange",this.orientationChangeHandler),this.orientationChangeHandler=null);null!=this.scrollHandler&&(mxEvent.removeListener(window,
-"scroll",this.scrollHandler),this.scrollHandler=null);if(null!=this.destroyFunctions){for(var a=0;a<this.destroyFunctions.length;a++)this.destroyFunctions[a]();this.destroyFunctions=null}for(var b=[this.menubarContainer,this.toolbarContainer,this.sidebarContainer,this.formatContainer,this.diagramContainer,this.footerContainer,this.chromelessToolbar,this.hsplit,this.sidebarFooterContainer,this.layersDialog],a=0;a<b.length;a++)null!=b[a]&&null!=b[a].parentNode&&b[a].parentNode.removeChild(b[a])};"undefined"!==typeof html4&&(html4.ATTRIBS["a::target"]=0,html4.ATTRIBS["source::src"]=0,html4.ATTRIBS["video::src"]=0);(function(){var a=[["nbsp","160"],["shy","173"]],b=mxUtils.parseXml;mxUtils.parseXml=function(d){for(var k=0;k<a.length;k++)d=d.replace(new RegExp("&"+a[k][0]+";","g"),"&#"+a[k][1]+";");return b(d)}})();
+"scroll",this.scrollHandler),this.scrollHandler=null);if(null!=this.destroyFunctions){for(var a=0;a<this.destroyFunctions.length;a++)this.destroyFunctions[a]();this.destroyFunctions=null}for(var b=[this.menubarContainer,this.toolbarContainer,this.sidebarContainer,this.formatContainer,this.diagramContainer,this.footerContainer,this.chromelessToolbar,this.hsplit,this.sidebarFooterContainer,this.layersDialog],a=0;a<b.length;a++)null!=b[a]&&null!=b[a].parentNode&&b[a].parentNode.removeChild(b[a])};"undefined"!==typeof html4&&(html4.ATTRIBS["a::target"]=0,html4.ATTRIBS["source::src"]=0,html4.ATTRIBS["video::src"]=0);(function(){var a=[["nbsp","160"],["shy","173"]],b=mxUtils.parseXml;mxUtils.parseXml=function(d){for(var g=0;g<a.length;g++)d=d.replace(new RegExp("&"+a[g][0]+";","g"),"&#"+a[g][1]+";");return b(d)}})();
Date.prototype.toISOString||function(){function a(a){a=String(a);1===a.length&&(a="0"+a);return a}Date.prototype.toISOString=function(){return this.getUTCFullYear()+"-"+a(this.getUTCMonth()+1)+"-"+a(this.getUTCDate())+"T"+a(this.getUTCHours())+":"+a(this.getUTCMinutes())+":"+a(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"}}();Date.now||(Date.now=function(){return(new Date).getTime()});
-Uint8Array.from||(Uint8Array.from=function(){var a=Object.prototype.toString,b=function(b){return"function"===typeof b||"[object Function]"===a.call(b)},d=Math.pow(2,53)-1;return function(a){var f=Object(a);if(null==a)throw new TypeError("Array.from requires an array-like object - not null or undefined");var k=1<arguments.length?arguments[1]:void 0,p;if("undefined"!==typeof k){if(!b(k))throw new TypeError("Array.from: when provided, the second argument must be a function");2<arguments.length&&(p=
-arguments[2])}var c;c=Number(f.length);c=isNaN(c)?0:0!==c&&isFinite(c)?(0<c?1:-1)*Math.floor(Math.abs(c)):c;c=Math.min(Math.max(c,0),d);for(var e=b(this)?Object(new this(c)):Array(c),g=0,n;g<c;)n=f[g],e[g]=k?"undefined"===typeof p?k(n,g):k.call(p,n,g):n,g+=1;e.length=c;return e}}());mxConstants.POINTS=1;mxConstants.MILLIMETERS=2;mxConstants.INCHES=3;mxConstants.PIXELS_PER_MM=3.937;mxConstants.PIXELS_PER_INCH=100;mxConstants.SHADOW_OPACITY=.25;mxConstants.SHADOWCOLOR="#000000";
+Uint8Array.from||(Uint8Array.from=function(){var a=Object.prototype.toString,b=function(b){return"function"===typeof b||"[object Function]"===a.call(b)},d=Math.pow(2,53)-1;return function(a){var f=Object(a);if(null==a)throw new TypeError("Array.from requires an array-like object - not null or undefined");var g=1<arguments.length?arguments[1]:void 0,p;if("undefined"!==typeof g){if(!b(g))throw new TypeError("Array.from: when provided, the second argument must be a function");2<arguments.length&&(p=
+arguments[2])}var c;c=Number(f.length);c=isNaN(c)?0:0!==c&&isFinite(c)?(0<c?1:-1)*Math.floor(Math.abs(c)):c;c=Math.min(Math.max(c,0),d);for(var e=b(this)?Object(new this(c)):Array(c),k=0,n;k<c;)n=f[k],e[k]=g?"undefined"===typeof p?g(n,k):g.call(p,n,k):n,k+=1;e.length=c;return e}}());mxConstants.POINTS=1;mxConstants.MILLIMETERS=2;mxConstants.INCHES=3;mxConstants.PIXELS_PER_MM=3.937;mxConstants.PIXELS_PER_INCH=100;mxConstants.SHADOW_OPACITY=.25;mxConstants.SHADOWCOLOR="#000000";
mxConstants.VML_SHADOWCOLOR="#d0d0d0";mxGraph.prototype.pageBreakColor="#c0c0c0";mxGraph.prototype.pageScale=1;(function(){try{if(null!=navigator&&null!=navigator.language){var a=navigator.language.toLowerCase();mxGraph.prototype.pageFormat="en-us"===a||"en-ca"===a||"es-mx"===a?mxConstants.PAGE_FORMAT_LETTER_PORTRAIT:mxConstants.PAGE_FORMAT_A4_PORTRAIT}}catch(b){}})();mxText.prototype.baseSpacingTop=5;mxText.prototype.baseSpacingBottom=1;mxGraphModel.prototype.ignoreRelativeEdgeParent=!1;
mxGraphView.prototype.gridImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhCgAKAJEAAAAAAP///8zMzP///yH5BAEAAAMALAAAAAAKAAoAAAIJ1I6py+0Po2wFADs=":IMAGE_PATH+"/grid.gif";mxGraphView.prototype.gridSteps=4;mxGraphView.prototype.minGridSize=4;mxGraphView.prototype.defaultGridColor="#d0d0d0";mxGraphView.prototype.defaultDarkGridColor="#6e6e6e";mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultGridColor;mxGraphView.prototype.unit=mxConstants.POINTS;
mxGraphView.prototype.setUnit=function(a){this.unit!=a&&(this.unit=a,this.fireEvent(new mxEventObject("unitChanged","unit",a)))};mxSvgCanvas2D.prototype.foAltText="[Not supported by viewer]";mxShape.prototype.getConstraints=function(a,b,d){return null};
mxImageShape.prototype.getImageDataUri=function(){var a=this.image;if("data:image/svg+xml;base64,"==a.substring(0,26)&&null!=this.style&&"1"==mxUtils.getValue(this.style,"clipSvg","0")){if(null==this.clippedSvg||this.clippedImage!=a)this.clippedSvg=Graph.clipSvgDataUri(a),this.clippedImage=a;a=this.clippedSvg}return a};
-Graph=function(a,b,d,k,f,m){mxGraph.call(this,a,b,d,k);this.themes=f||this.defaultThemes;this.currentEdgeStyle=mxUtils.clone(this.defaultEdgeStyle);this.currentVertexStyle=mxUtils.clone(this.defaultVertexStyle);this.standalone=null!=m?m:!1;a=this.baseUrl;b=a.indexOf("//");this.domainPathUrl=this.domainUrl="";0<b&&(b=a.indexOf("/",b+2),0<b&&(this.domainUrl=a.substring(0,b)),b=a.lastIndexOf("/"),0<b&&(this.domainPathUrl=a.substring(0,b+1)));this.isHtmlLabel=function(a){a=this.getCurrentCellStyle(a);
-return null!=a?"1"==a.html||"wrap"==a[mxConstants.STYLE_WHITE_SPACE]:!1};if(this.edgeMode){var p=null,c=null,e=null,g=null,n=!1;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(a,b){if("mouseDown"==b.getProperty("eventName")&&this.isEnabled()){var d=b.getProperty("event"),f=d.getState();if(!mxEvent.isAltDown(d.getEvent())&&null!=f)if(this.model.isEdge(f.cell))if(p=new mxPoint(d.getGraphX(),d.getGraphY()),n=this.isCellSelected(f.cell),e=f,c=d,null!=f.text&&null!=f.text.boundingBox&&
-mxUtils.contains(f.text.boundingBox,d.getGraphX(),d.getGraphY()))g=mxEvent.LABEL_HANDLE;else{var k=this.selectionCellsHandler.getHandler(f.cell);null!=k&&null!=k.bends&&0<k.bends.length&&(g=k.getHandleForEvent(d))}else if(!this.panningHandler.isActive()&&!mxEvent.isControlDown(d.getEvent())&&(k=this.selectionCellsHandler.getHandler(f.cell),null==k||null==k.getHandleForEvent(d))){var v=new mxRectangle(d.getGraphX()-1,d.getGraphY()-1);v.grow(mxEvent.isTouchEvent(d.getEvent())?mxShape.prototype.svgStrokeTolerance-
-1:(mxShape.prototype.svgStrokeTolerance+1)/2);if(this.isTableCell(f.cell)&&!this.isCellSelected(f.cell)){var l=this.model.getParent(f.cell),k=this.model.getParent(l);if(!this.isCellSelected(k)&&(mxUtils.intersects(v,new mxRectangle(f.x,f.y-2,f.width,3))&&this.model.getChildAt(k,0)!=l||mxUtils.intersects(v,new mxRectangle(f.x,f.y+f.height-2,f.width,3))||mxUtils.intersects(v,new mxRectangle(f.x-2,f.y,2,f.height))&&this.model.getChildAt(l,0)!=f.cell||mxUtils.intersects(v,new mxRectangle(f.x+f.width-
-2,f.y,2,f.height)))&&(l=this.selectionCellsHandler.isHandled(k),this.selectCellForEvent(k,d.getEvent()),k=this.selectionCellsHandler.getHandler(k),null!=k)){var q=k.getHandleForEvent(d);null!=q&&(k.start(d.getGraphX(),d.getGraphY(),q),k.blockDelayedSelection=!l,d.consume())}}for(;!d.isConsumed()&&null!=f&&(this.isTableCell(f.cell)||this.isTableRow(f.cell)||this.isTable(f.cell));)this.isSwimlane(f.cell)&&(k=this.getActualStartSize(f.cell),l=this.view.scale,(0<k.x||0<k.width)&&mxUtils.intersects(v,
-new mxRectangle(f.x+(k.x-k.width-1)*l+(0==k.x?f.width:0),f.y,1,f.height))||(0<k.y||0<k.height)&&mxUtils.intersects(v,new mxRectangle(f.x,f.y+(k.y-k.height-1)*l+(0==k.y?f.height:0),f.width,1)))&&(this.selectCellForEvent(f.cell,d.getEvent()),k=this.selectionCellsHandler.getHandler(f.cell),null!=k&&(q=mxEvent.CUSTOM_HANDLE-k.customHandles.length+1,k.start(d.getGraphX(),d.getGraphY(),q),d.consume())),f=this.view.getState(this.model.getParent(f.cell))}}}));this.addMouseListener({mouseDown:function(a,c){},
-mouseMove:mxUtils.bind(this,function(a,b){var d=this.selectionCellsHandler.handlers.map,f;for(f in d)if(null!=d[f].index)return;if(this.isEnabled()&&!this.panningHandler.isActive()&&!mxEvent.isAltDown(b.getEvent()))if(f=this.tolerance,null!=p&&null!=e&&null!=c){if(d=e,Math.abs(p.x-b.getGraphX())>f||Math.abs(p.y-b.getGraphY())>f){var k=this.selectionCellsHandler.getHandler(d.cell);null==k&&this.model.isEdge(d.cell)&&(k=this.createHandler(d));if(null!=k&&null!=k.bends&&0<k.bends.length){f=k.getHandleForEvent(c);
-var v=this.view.getEdgeStyle(d),l=v==mxEdgeStyle.EntityRelation;n||g!=mxEvent.LABEL_HANDLE||(f=g);if(l&&0!=f&&f!=k.bends.length-1&&f!=mxEvent.LABEL_HANDLE)!l||null==d.visibleSourceState&&null==d.visibleTargetState||(this.graphHandler.reset(),b.consume());else if(f==mxEvent.LABEL_HANDLE||0==f||null!=d.visibleSourceState||f==k.bends.length-1||null!=d.visibleTargetState)l||f==mxEvent.LABEL_HANDLE||(l=d.absolutePoints,null!=l&&(null==v&&null==f||v==mxEdgeStyle.OrthConnector)&&(f=g,null==f&&(f=new mxRectangle(p.x,
-p.y),f.grow(mxEdgeHandler.prototype.handleImage.width/2),mxUtils.contains(f,l[0].x,l[0].y)?f=0:mxUtils.contains(f,l[l.length-1].x,l[l.length-1].y)?f=k.bends.length-1:null!=v&&(2==l.length||3==l.length&&(0==Math.round(l[0].x-l[1].x)&&0==Math.round(l[1].x-l[2].x)||0==Math.round(l[0].y-l[1].y)&&0==Math.round(l[1].y-l[2].y)))?f=2:(f=mxUtils.findNearestSegment(d,p.x,p.y),f=null==v?mxEvent.VIRTUAL_HANDLE-f:f+1))),null==f&&(f=mxEvent.VIRTUAL_HANDLE)),k.start(b.getGraphX(),b.getGraphX(),f),b.consume(),this.graphHandler.reset()}null!=
-k&&(this.selectionCellsHandler.isHandlerActive(k)?this.isCellSelected(d.cell)||(this.selectionCellsHandler.handlers.put(d.cell,k),this.selectCellForEvent(d.cell,b.getEvent())):this.isCellSelected(d.cell)||k.destroy());n=!1;p=c=e=g=null}}else if(d=b.getState(),null!=d&&this.isCellEditable(d.cell)){k=null;if(this.model.isEdge(d.cell)){if(f=new mxRectangle(b.getGraphX(),b.getGraphY()),f.grow(mxEdgeHandler.prototype.handleImage.width/2),l=d.absolutePoints,null!=l)if(null!=d.text&&null!=d.text.boundingBox&&
-mxUtils.contains(d.text.boundingBox,b.getGraphX(),b.getGraphY()))k="move";else if(mxUtils.contains(f,l[0].x,l[0].y)||mxUtils.contains(f,l[l.length-1].x,l[l.length-1].y))k="pointer";else if(null!=d.visibleSourceState||null!=d.visibleTargetState)f=this.view.getEdgeStyle(d),k="crosshair",f!=mxEdgeStyle.EntityRelation&&this.isOrthogonal(d)&&(f=mxUtils.findNearestSegment(d,b.getGraphX(),b.getGraphY()),f<l.length-1&&0<=f&&(k=0==Math.round(l[f].x-l[f+1].x)?"col-resize":"row-resize"))}else if(!mxEvent.isControlDown(b.getEvent())){f=
-new mxRectangle(b.getGraphX()-1,b.getGraphY()-1);f.grow(mxShape.prototype.svgStrokeTolerance/2);if(this.isTableCell(d.cell)&&(l=this.model.getParent(d.cell),v=this.model.getParent(l),!this.isCellSelected(v)))if(mxUtils.intersects(f,new mxRectangle(d.x-2,d.y,2,d.height))&&this.model.getChildAt(l,0)!=d.cell||mxUtils.intersects(f,new mxRectangle(d.x+d.width-2,d.y,2,d.height)))k="col-resize";else if(mxUtils.intersects(f,new mxRectangle(d.x,d.y-2,d.width,3))&&this.model.getChildAt(v,0)!=l||mxUtils.intersects(f,
-new mxRectangle(d.x,d.y+d.height-2,d.width,3)))k="row-resize";for(l=d;null==k&&null!=l&&(this.isTableCell(l.cell)||this.isTableRow(l.cell)||this.isTable(l.cell));){if(this.isSwimlane(l.cell)){var v=this.getActualStartSize(l.cell),q=this.view.scale;(0<v.x||0<v.width)&&mxUtils.intersects(f,new mxRectangle(l.x+(v.x-v.width-1)*q+(0==v.x?l.width*q:0),l.y,1,l.height))?k="col-resize":(0<v.y||0<v.height)&&mxUtils.intersects(f,new mxRectangle(l.x,l.y+(v.y-v.height-1)*q+(0==v.y?l.height:0),l.width,1))&&(k=
-"row-resize")}l=this.view.getState(this.model.getParent(l.cell))}}null!=k&&d.setCursor(k)}}),mouseUp:mxUtils.bind(this,function(a,b){g=p=c=e=null})})}this.cellRenderer.minSvgStrokeWidth=.1;this.cellRenderer.getLabelValue=function(a){var c=mxCellRenderer.prototype.getLabelValue.apply(this,arguments);a.view.graph.isHtmlLabel(a.cell)&&(c=1!=a.style.html?mxUtils.htmlEntities(c,!1):a.view.graph.sanitizeHtml(c));return c};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(a,c){return!1};this.alternateEdgeStyle="vertical";null==k&&this.loadStylesheet();var l=this.graphHandler.getGuideStates;this.graphHandler.getGuideStates=
-function(){var a=l.apply(this,arguments);if(this.graph.pageVisible){for(var c=[],e=this.graph.pageFormat,b=this.graph.pageScale,d=e.width*b,e=e.height*b,b=this.graph.view.translate,g=this.graph.view.scale,f=this.graph.getPageLayout(),k=0;k<f.width;k++)c.push(new mxRectangle(((f.x+k)*d+b.x)*g,(f.y*e+b.y)*g,d*g,e*g));for(k=1;k<f.height;k++)c.push(new mxRectangle((f.x*d+b.x)*g,((f.y+k)*e+b.y)*g,d*g,e*g));a=c.concat(a)}return a};mxDragSource.prototype.dragElementZIndex=mxPopupMenu.prototype.zIndex;mxGuide.prototype.getGuideColor=
-function(a,c){return null==a.cell?"#ffa500":mxConstants.GUIDE_COLOR};this.graphHandler.createPreviewShape=function(a){this.previewColor="#000000"==this.graph.background?"#ffffff":mxGraphHandler.prototype.previewColor;return mxGraphHandler.prototype.createPreviewShape.apply(this,arguments)};var q=this.graphHandler.getCells;this.graphHandler.getCells=function(a){for(var c=q.apply(this,arguments),e=new mxDictionary,b=[],d=0;d<c.length;d++){var g=this.graph.isTableCell(a)&&this.graph.isTableCell(c[d])&&
-this.graph.isCellSelected(c[d])?this.graph.model.getParent(c[d]):this.graph.isTableRow(a)&&this.graph.isTableRow(c[d])&&this.graph.isCellSelected(c[d])?c[d]:this.graph.getCompositeParent(c[d]);null==g||e.get(g)||(e.put(g,!0),b.push(g))}return b};var u=this.graphHandler.start;this.graphHandler.start=function(a,c,e,b){var d=!1;this.graph.isTableCell(a)&&(this.graph.isCellSelected(a)?d=!0:a=this.graph.model.getParent(a));d||this.graph.isTableRow(a)&&this.graph.isCellSelected(a)||(a=this.graph.getCompositeParent(a));
+Graph=function(a,b,d,g,f,m){mxGraph.call(this,a,b,d,g);this.themes=f||this.defaultThemes;this.currentEdgeStyle=mxUtils.clone(this.defaultEdgeStyle);this.currentVertexStyle=mxUtils.clone(this.defaultVertexStyle);this.standalone=null!=m?m:!1;a=this.baseUrl;b=a.indexOf("//");this.domainPathUrl=this.domainUrl="";0<b&&(b=a.indexOf("/",b+2),0<b&&(this.domainUrl=a.substring(0,b)),b=a.lastIndexOf("/"),0<b&&(this.domainPathUrl=a.substring(0,b+1)));this.isHtmlLabel=function(a){a=this.getCurrentCellStyle(a);
+return null!=a?"1"==a.html||"wrap"==a[mxConstants.STYLE_WHITE_SPACE]:!1};if(this.edgeMode){var p=null,c=null,e=null,k=null,n=!1;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(a,b){if("mouseDown"==b.getProperty("eventName")&&this.isEnabled()){var d=b.getProperty("event"),f=d.getState();if(!mxEvent.isAltDown(d.getEvent())&&null!=f)if(this.model.isEdge(f.cell))if(p=new mxPoint(d.getGraphX(),d.getGraphY()),n=this.isCellSelected(f.cell),e=f,c=d,null!=f.text&&null!=f.text.boundingBox&&
+mxUtils.contains(f.text.boundingBox,d.getGraphX(),d.getGraphY()))k=mxEvent.LABEL_HANDLE;else{var g=this.selectionCellsHandler.getHandler(f.cell);null!=g&&null!=g.bends&&0<g.bends.length&&(k=g.getHandleForEvent(d))}else if(!this.panningHandler.isActive()&&!mxEvent.isControlDown(d.getEvent())&&(g=this.selectionCellsHandler.getHandler(f.cell),null==g||null==g.getHandleForEvent(d))){var v=new mxRectangle(d.getGraphX()-1,d.getGraphY()-1);v.grow(mxEvent.isTouchEvent(d.getEvent())?mxShape.prototype.svgStrokeTolerance-
+1:(mxShape.prototype.svgStrokeTolerance+1)/2);if(this.isTableCell(f.cell)&&!this.isCellSelected(f.cell)){var l=this.model.getParent(f.cell),g=this.model.getParent(l);if(!this.isCellSelected(g)&&(mxUtils.intersects(v,new mxRectangle(f.x,f.y-2,f.width,3))&&this.model.getChildAt(g,0)!=l||mxUtils.intersects(v,new mxRectangle(f.x,f.y+f.height-2,f.width,3))||mxUtils.intersects(v,new mxRectangle(f.x-2,f.y,2,f.height))&&this.model.getChildAt(l,0)!=f.cell||mxUtils.intersects(v,new mxRectangle(f.x+f.width-
+2,f.y,2,f.height)))&&(l=this.selectionCellsHandler.isHandled(g),this.selectCellForEvent(g,d.getEvent()),g=this.selectionCellsHandler.getHandler(g),null!=g)){var q=g.getHandleForEvent(d);null!=q&&(g.start(d.getGraphX(),d.getGraphY(),q),g.blockDelayedSelection=!l,d.consume())}}for(;!d.isConsumed()&&null!=f&&(this.isTableCell(f.cell)||this.isTableRow(f.cell)||this.isTable(f.cell));)this.isSwimlane(f.cell)&&(g=this.getActualStartSize(f.cell),l=this.view.scale,(0<g.x||0<g.width)&&mxUtils.intersects(v,
+new mxRectangle(f.x+(g.x-g.width-1)*l+(0==g.x?f.width:0),f.y,1,f.height))||(0<g.y||0<g.height)&&mxUtils.intersects(v,new mxRectangle(f.x,f.y+(g.y-g.height-1)*l+(0==g.y?f.height:0),f.width,1)))&&(this.selectCellForEvent(f.cell,d.getEvent()),g=this.selectionCellsHandler.getHandler(f.cell),null!=g&&(q=mxEvent.CUSTOM_HANDLE-g.customHandles.length+1,g.start(d.getGraphX(),d.getGraphY(),q),d.consume())),f=this.view.getState(this.model.getParent(f.cell))}}}));this.addMouseListener({mouseDown:function(a,c){},
+mouseMove:mxUtils.bind(this,function(a,b){var d=this.selectionCellsHandler.handlers.map,f;for(f in d)if(null!=d[f].index)return;if(this.isEnabled()&&!this.panningHandler.isActive()&&!mxEvent.isAltDown(b.getEvent()))if(f=this.tolerance,null!=p&&null!=e&&null!=c){if(d=e,Math.abs(p.x-b.getGraphX())>f||Math.abs(p.y-b.getGraphY())>f){var g=this.selectionCellsHandler.getHandler(d.cell);null==g&&this.model.isEdge(d.cell)&&(g=this.createHandler(d));if(null!=g&&null!=g.bends&&0<g.bends.length){f=g.getHandleForEvent(c);
+var v=this.view.getEdgeStyle(d),l=v==mxEdgeStyle.EntityRelation;n||k!=mxEvent.LABEL_HANDLE||(f=k);if(l&&0!=f&&f!=g.bends.length-1&&f!=mxEvent.LABEL_HANDLE)!l||null==d.visibleSourceState&&null==d.visibleTargetState||(this.graphHandler.reset(),b.consume());else if(f==mxEvent.LABEL_HANDLE||0==f||null!=d.visibleSourceState||f==g.bends.length-1||null!=d.visibleTargetState)l||f==mxEvent.LABEL_HANDLE||(l=d.absolutePoints,null!=l&&(null==v&&null==f||v==mxEdgeStyle.OrthConnector)&&(f=k,null==f&&(f=new mxRectangle(p.x,
+p.y),f.grow(mxEdgeHandler.prototype.handleImage.width/2),mxUtils.contains(f,l[0].x,l[0].y)?f=0:mxUtils.contains(f,l[l.length-1].x,l[l.length-1].y)?f=g.bends.length-1:null!=v&&(2==l.length||3==l.length&&(0==Math.round(l[0].x-l[1].x)&&0==Math.round(l[1].x-l[2].x)||0==Math.round(l[0].y-l[1].y)&&0==Math.round(l[1].y-l[2].y)))?f=2:(f=mxUtils.findNearestSegment(d,p.x,p.y),f=null==v?mxEvent.VIRTUAL_HANDLE-f:f+1))),null==f&&(f=mxEvent.VIRTUAL_HANDLE)),g.start(b.getGraphX(),b.getGraphX(),f),b.consume(),this.graphHandler.reset()}null!=
+g&&(this.selectionCellsHandler.isHandlerActive(g)?this.isCellSelected(d.cell)||(this.selectionCellsHandler.handlers.put(d.cell,g),this.selectCellForEvent(d.cell,b.getEvent())):this.isCellSelected(d.cell)||g.destroy());n=!1;p=c=e=k=null}}else if(d=b.getState(),null!=d&&this.isCellEditable(d.cell)){g=null;if(this.model.isEdge(d.cell)){if(f=new mxRectangle(b.getGraphX(),b.getGraphY()),f.grow(mxEdgeHandler.prototype.handleImage.width/2),l=d.absolutePoints,null!=l)if(null!=d.text&&null!=d.text.boundingBox&&
+mxUtils.contains(d.text.boundingBox,b.getGraphX(),b.getGraphY()))g="move";else if(mxUtils.contains(f,l[0].x,l[0].y)||mxUtils.contains(f,l[l.length-1].x,l[l.length-1].y))g="pointer";else if(null!=d.visibleSourceState||null!=d.visibleTargetState)f=this.view.getEdgeStyle(d),g="crosshair",f!=mxEdgeStyle.EntityRelation&&this.isOrthogonal(d)&&(f=mxUtils.findNearestSegment(d,b.getGraphX(),b.getGraphY()),f<l.length-1&&0<=f&&(g=0==Math.round(l[f].x-l[f+1].x)?"col-resize":"row-resize"))}else if(!mxEvent.isControlDown(b.getEvent())){f=
+new mxRectangle(b.getGraphX()-1,b.getGraphY()-1);f.grow(mxShape.prototype.svgStrokeTolerance/2);if(this.isTableCell(d.cell)&&(l=this.model.getParent(d.cell),v=this.model.getParent(l),!this.isCellSelected(v)))if(mxUtils.intersects(f,new mxRectangle(d.x-2,d.y,2,d.height))&&this.model.getChildAt(l,0)!=d.cell||mxUtils.intersects(f,new mxRectangle(d.x+d.width-2,d.y,2,d.height)))g="col-resize";else if(mxUtils.intersects(f,new mxRectangle(d.x,d.y-2,d.width,3))&&this.model.getChildAt(v,0)!=l||mxUtils.intersects(f,
+new mxRectangle(d.x,d.y+d.height-2,d.width,3)))g="row-resize";for(l=d;null==g&&null!=l&&(this.isTableCell(l.cell)||this.isTableRow(l.cell)||this.isTable(l.cell));){if(this.isSwimlane(l.cell)){var v=this.getActualStartSize(l.cell),q=this.view.scale;(0<v.x||0<v.width)&&mxUtils.intersects(f,new mxRectangle(l.x+(v.x-v.width-1)*q+(0==v.x?l.width*q:0),l.y,1,l.height))?g="col-resize":(0<v.y||0<v.height)&&mxUtils.intersects(f,new mxRectangle(l.x,l.y+(v.y-v.height-1)*q+(0==v.y?l.height:0),l.width,1))&&(g=
+"row-resize")}l=this.view.getState(this.model.getParent(l.cell))}}null!=g&&d.setCursor(g)}}),mouseUp:mxUtils.bind(this,function(a,b){k=p=c=e=null})})}this.cellRenderer.minSvgStrokeWidth=.1;this.cellRenderer.getLabelValue=function(a){var c=mxCellRenderer.prototype.getLabelValue.apply(this,arguments);a.view.graph.isHtmlLabel(a.cell)&&(c=1!=a.style.html?mxUtils.htmlEntities(c,!1):a.view.graph.sanitizeHtml(c));return c};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(a,c){return!1};this.alternateEdgeStyle="vertical";null==g&&this.loadStylesheet();var l=this.graphHandler.getGuideStates;this.graphHandler.getGuideStates=
+function(){var a=l.apply(this,arguments);if(this.graph.pageVisible){for(var c=[],e=this.graph.pageFormat,b=this.graph.pageScale,d=e.width*b,e=e.height*b,b=this.graph.view.translate,k=this.graph.view.scale,f=this.graph.getPageLayout(),g=0;g<f.width;g++)c.push(new mxRectangle(((f.x+g)*d+b.x)*k,(f.y*e+b.y)*k,d*k,e*k));for(g=1;g<f.height;g++)c.push(new mxRectangle((f.x*d+b.x)*k,((f.y+g)*e+b.y)*k,d*k,e*k));a=c.concat(a)}return a};mxDragSource.prototype.dragElementZIndex=mxPopupMenu.prototype.zIndex;mxGuide.prototype.getGuideColor=
+function(a,c){return null==a.cell?"#ffa500":mxConstants.GUIDE_COLOR};this.graphHandler.createPreviewShape=function(a){this.previewColor="#000000"==this.graph.background?"#ffffff":mxGraphHandler.prototype.previewColor;return mxGraphHandler.prototype.createPreviewShape.apply(this,arguments)};var q=this.graphHandler.getCells;this.graphHandler.getCells=function(a){for(var c=q.apply(this,arguments),e=new mxDictionary,b=[],d=0;d<c.length;d++){var k=this.graph.isTableCell(a)&&this.graph.isTableCell(c[d])&&
+this.graph.isCellSelected(c[d])?this.graph.model.getParent(c[d]):this.graph.isTableRow(a)&&this.graph.isTableRow(c[d])&&this.graph.isCellSelected(c[d])?c[d]:this.graph.getCompositeParent(c[d]);null==k||e.get(k)||(e.put(k,!0),b.push(k))}return b};var u=this.graphHandler.start;this.graphHandler.start=function(a,c,e,b){var d=!1;this.graph.isTableCell(a)&&(this.graph.isCellSelected(a)?d=!0:a=this.graph.model.getParent(a));d||this.graph.isTableRow(a)&&this.graph.isCellSelected(a)||(a=this.graph.getCompositeParent(a));
u.apply(this,arguments)};this.connectionHandler.createTargetVertex=function(a,c){c=this.graph.getCompositeParent(c);return mxConnectionHandler.prototype.createTargetVertex.apply(this,arguments)};var t=new mxRubberband(this);this.getRubberband=function(){return t};var A=(new Date).getTime(),x=0,G=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=function(){var a=this.currentState;G.apply(this,arguments);a!=this.currentState?(A=(new Date).getTime(),x=0):x=(new Date).getTime()-A};var z=
this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=function(a){return null!=this.currentState&&a.getState()==this.currentState&&2E3<x||(null==this.currentState||"0"!=mxUtils.getValue(this.currentState.style,"outlineConnect","1"))&&z.apply(this,arguments)};var E=this.isToggleEvent;this.isToggleEvent=function(a){return E.apply(this,arguments)||!mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(a)};var H=t.isForceRubberbandEvent;t.isForceRubberbandEvent=function(a){return H.apply(this,
arguments)&&!mxEvent.isShiftDown(a.getEvent())&&!mxEvent.isControlDown(a.getEvent())||mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(a.getEvent())||mxUtils.hasScrollbars(this.graph.container)&&mxClient.IS_FF&&mxClient.IS_WIN&&null==a.getState()&&mxEvent.isTouchEvent(a.getEvent())};var K=null;this.panningHandler.addListener(mxEvent.PAN_START,mxUtils.bind(this,function(){this.isEnabled()&&(K=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=K)}));this.popupMenuHandler.autoExpand=!0;this.popupMenuHandler.isSelectOnPopup=function(a){return mxEvent.isMouseEvent(a.getEvent())};var F=this.click;this.click=function(a){var c=null==a.state&&null!=a.sourceState&&this.isCellLocked(a.sourceState.cell);if(this.isEnabled()&&!c||a.isConsumed())return F.apply(this,arguments);var e=c?a.sourceState.cell:a.getCell();null!=e&&(e=this.getClickableLinkForCell(e),null!=e&&(this.isCustomLink(e)?
this.customLinkClicked(e):this.openLink(e)));this.isEnabled()&&c&&this.clearSelection()};this.tooltipHandler.getStateForEvent=function(a){return a.sourceState};var I=this.tooltipHandler.show;this.tooltipHandler.show=function(){I.apply(this,arguments);if(null!=this.div)for(var a=this.div.getElementsByTagName("a"),c=0;c<a.length;c++)null!=a[c].getAttribute("href")&&null==a[c].getAttribute("target")&&a[c].setAttribute("target","_blank")};this.tooltipHandler.getStateForEvent=function(a){return a.sourceState};
-this.getCursorForMouseEvent=function(a){var c=null==a.state&&null!=a.sourceState&&this.isCellLocked(a.sourceState.cell);return this.getCursorForCell(c?a.sourceState.cell:a.getCell())};var C=this.getCursorForCell;this.getCursorForCell=function(a){if(!this.isEnabled()||this.isCellLocked(a)){if(null!=this.getClickableLinkForCell(a))return"pointer";if(this.isCellLocked(a))return"default"}return C.apply(this,arguments)};this.selectRegion=function(a,c){var e=this.getCells(a.x,a.y,a.width,a.height,null,
+this.getCursorForMouseEvent=function(a){var c=null==a.state&&null!=a.sourceState&&this.isCellLocked(a.sourceState.cell);return this.getCursorForCell(c?a.sourceState.cell:a.getCell())};var D=this.getCursorForCell;this.getCursorForCell=function(a){if(!this.isEnabled()||this.isCellLocked(a)){if(null!=this.getClickableLinkForCell(a))return"pointer";if(this.isCellLocked(a))return"default"}return D.apply(this,arguments)};this.selectRegion=function(a,c){var e=this.getCells(a.x,a.y,a.width,a.height,null,
null,null,function(a){return"1"==mxUtils.getValue(a.style,"locked","0")},!0);this.selectCellsForEvent(e,c);return e};var M=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(a,c,e){return this.graph.isCellSelected(a)?!1:M.apply(this,arguments)};this.isCellLocked=function(a){for(;null!=a;){if("1"==mxUtils.getValue(this.getCurrentCellStyle(a),"locked","0"))return!0;a=this.model.getParent(a)}return!1};var U=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,
mxUtils.bind(this,function(a,c){if("mouseDown"==c.getProperty("eventName")){var e=c.getProperty("event").getState();U=null==e||this.isSelectionEmpty()||this.isCellSelected(e.cell)?null:this.getSelectionCells()}}));this.addListener(mxEvent.TAP_AND_HOLD,mxUtils.bind(this,function(a,c){if(!mxEvent.isMultiTouchEvent(c)){var e=c.getProperty("event"),b=c.getProperty("cell");null==b?(e=mxUtils.convertPoint(this.container,mxEvent.getClientX(e),mxEvent.getClientY(e)),t.start(e.x,e.y)):null!=U?this.addSelectionCells(U):
1<this.getSelectionCount()&&this.isCellSelected(b)&&this.removeSelectionCell(b);U=null;c.consume()}}));this.connectionHandler.selectCells=function(a,c){this.graph.setSelectionCell(c||a)};this.connectionHandler.constraintHandler.isStateIgnored=function(a,c){var e=a.view.graph;return c&&(e.isCellSelected(a.cell)||e.isTableRow(a.cell)&&e.selectionCellsHandler.isHandled(e.model.getParent(a.cell)))};this.selectionModel.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){var a=this.connectionHandler.constraintHandler;
null!=a.currentFocus&&a.isStateIgnored(a.currentFocus,!0)&&(a.currentFocus=null,a.constraints=null,a.destroyIcons());a.destroyFocusHighlight()}));Graph.touchStyle&&this.initTouch();var O=this.updateMouseEvent;this.updateMouseEvent=function(a){a=O.apply(this,arguments);null!=a.state&&this.isCellLocked(a.getCell())&&(a.state=null);return a}}this.currentTranslate=new mxPoint(0,0)};
Graph.touchStyle=mxClient.IS_TOUCH||mxClient.IS_FF&&mxClient.IS_WIN||0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints||null==window.urlParams||"1"==urlParams.touch;Graph.fileSupport=null!=window.File&&null!=window.FileReader&&null!=window.FileList&&(null==window.urlParams||"0"!=urlParams.filesupport);Graph.translateDiagram="1"==urlParams["translate-diagram"];Graph.diagramLanguage=null!=urlParams["diagram-language"]?urlParams["diagram-language"]:mxClient.language;Graph.lineJumpsEnabled=!0;
Graph.defaultJumpSize=6;Graph.minTableColumnWidth=20;Graph.minTableRowHeight=20;Graph.foreignObjectWarningText="Viewer does not support full SVG 1.1";Graph.foreignObjectWarningLink="https://www.diagrams.net/doc/faq/svg-export-text-problems";Graph.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.createSvgImage=function(a,b,d,k,f){d=unescape(encodeURIComponent('<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="'+a+'px" height="'+b+'px" '+(null!=k&&null!=f?'viewBox="0 0 '+k+" "+f+'" ':"")+'version="1.1">'+d+"</svg>"));return new mxImage("data:image/svg+xml;base64,"+(window.btoa?btoa(d):Base64.encode(d,!0)),a,b)};
-Graph.zapGremlins=function(a){for(var b=0,d=[],k=0;k<a.length;k++){var f=a.charCodeAt(k);(32<=f||9==f||10==f||13==f)&&65535!=f&&65534!=f||(d.push(a.substring(b,k)),b=k+1)}0<b&&b<a.length&&d.push(a.substring(b));return 0==d.length?a:d.join("")};Graph.stringToBytes=function(a){for(var b=Array(a.length),d=0;d<a.length;d++)b[d]=a.charCodeAt(d);return b};Graph.bytesToString=function(a){for(var b=Array(a.length),d=0;d<a.length;d++)b[d]=String.fromCharCode(a[d]);return b.join("")};
+Graph.createSvgImage=function(a,b,d,g,f){d=unescape(encodeURIComponent('<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="'+a+'px" height="'+b+'px" '+(null!=g&&null!=f?'viewBox="0 0 '+g+" "+f+'" ':"")+'version="1.1">'+d+"</svg>"));return new mxImage("data:image/svg+xml;base64,"+(window.btoa?btoa(d):Base64.encode(d,!0)),a,b)};
+Graph.zapGremlins=function(a){for(var b=0,d=[],g=0;g<a.length;g++){var f=a.charCodeAt(g);(32<=f||9==f||10==f||13==f)&&65535!=f&&65534!=f||(d.push(a.substring(b,g)),b=g+1)}0<b&&b<a.length&&d.push(a.substring(b));return 0==d.length?a:d.join("")};Graph.stringToBytes=function(a){for(var b=Array(a.length),d=0;d<a.length;d++)b[d]=a.charCodeAt(d);return b};Graph.bytesToString=function(a){for(var b=Array(a.length),d=0;d<a.length;d++)b[d]=String.fromCharCode(a[d]);return b.join("")};
Graph.base64EncodeUnicode=function(a){return btoa(encodeURIComponent(a).replace(/%([0-9A-F]{2})/g,function(a,d){return String.fromCharCode(parseInt(d,16))}))};Graph.base64DecodeUnicode=function(a){return decodeURIComponent(Array.prototype.map.call(atob(a),function(a){return"%"+("00"+a.charCodeAt(0).toString(16)).slice(-2)}).join(""))};Graph.compressNode=function(a,b){var d=mxUtils.getXml(a);return Graph.compress(b?d:Graph.zapGremlins(d))};
-Graph.arrayBufferToString=function(a){var b="";a=new Uint8Array(a);for(var d=a.byteLength,k=0;k<d;k++)b+=String.fromCharCode(a[k]);return b};Graph.stringToArrayBuffer=function(a){return Uint8Array.from(a,function(a){return a.charCodeAt(0)})};
-Graph.arrayBufferIndexOfString=function(a,b,d){var k=b.charCodeAt(0),f=1,m=-1;for(d=d||0;d<a.byteLength;d++)if(a[d]==k){m=d;break}for(d=m+1;-1<m&&d<a.byteLength&&d<m+b.length-1;d++){if(a[d]!=b.charCodeAt(f))return Graph.arrayBufferIndexOfString(a,b,m+1);f++}return f==b.length-1?m:-1};Graph.compress=function(a,b){if(null==a||0==a.length||"undefined"===typeof pako)return a;var d=b?pako.deflate(encodeURIComponent(a)):pako.deflateRaw(encodeURIComponent(a));return btoa(Graph.arrayBufferToString(new Uint8Array(d)))};
+Graph.arrayBufferToString=function(a){var b="";a=new Uint8Array(a);for(var d=a.byteLength,g=0;g<d;g++)b+=String.fromCharCode(a[g]);return b};Graph.stringToArrayBuffer=function(a){return Uint8Array.from(a,function(a){return a.charCodeAt(0)})};
+Graph.arrayBufferIndexOfString=function(a,b,d){var g=b.charCodeAt(0),f=1,m=-1;for(d=d||0;d<a.byteLength;d++)if(a[d]==g){m=d;break}for(d=m+1;-1<m&&d<a.byteLength&&d<m+b.length-1;d++){if(a[d]!=b.charCodeAt(f))return Graph.arrayBufferIndexOfString(a,b,m+1);f++}return f==b.length-1?m:-1};Graph.compress=function(a,b){if(null==a||0==a.length||"undefined"===typeof pako)return a;var d=b?pako.deflate(encodeURIComponent(a)):pako.deflateRaw(encodeURIComponent(a));return btoa(Graph.arrayBufferToString(new Uint8Array(d)))};
Graph.decompress=function(a,b,d){if(null==a||0==a.length||"undefined"===typeof pako)return a;a=Graph.stringToArrayBuffer(atob(a));b=decodeURIComponent(b?pako.inflate(a,{to:"string"}):pako.inflateRaw(a,{to:"string"}));return d?b:Graph.zapGremlins(b)};
-Graph.fadeNodes=function(a,b,d,k,f){f=null!=f?f:1E3;Graph.setTransitionForNodes(a,null);Graph.setOpacityForNodes(a,b);window.setTimeout(function(){Graph.setTransitionForNodes(a,"all "+f+"ms ease-in-out");Graph.setOpacityForNodes(a,d);window.setTimeout(function(){Graph.setTransitionForNodes(a,null);null!=k&&k()},f)},0)};Graph.setTransitionForNodes=function(a,b){for(var d=0;d<a.length;d++)mxUtils.setPrefixedStyle(a[d].style,"transition",b)};
+Graph.fadeNodes=function(a,b,d,g,f){f=null!=f?f:1E3;Graph.setTransitionForNodes(a,null);Graph.setOpacityForNodes(a,b);window.setTimeout(function(){Graph.setTransitionForNodes(a,"all "+f+"ms ease-in-out");Graph.setOpacityForNodes(a,d);window.setTimeout(function(){Graph.setTransitionForNodes(a,null);null!=g&&g()},f)},0)};Graph.setTransitionForNodes=function(a,b){for(var d=0;d<a.length;d++)mxUtils.setPrefixedStyle(a[d].style,"transition",b)};
Graph.setOpacityForNodes=function(a,b){for(var d=0;d<a.length;d++)a[d].style.opacity=b};Graph.removePasteFormatting=function(a){for(;null!=a;)null!=a.firstChild&&Graph.removePasteFormatting(a.firstChild),a.nodeType==mxConstants.NODETYPE_ELEMENT&&null!=a.style&&(a.style.whiteSpace="","#000000"==a.style.color&&(a.style.color="")),a=a.nextSibling};Graph.sanitizeHtml=function(a,b){return html_sanitize(a,function(a){return null!=a&&"javascript:"!==a.toString().toLowerCase().substring(0,11)?a:null},function(a){return a})};
-Graph.sanitizeSvg=function(a){for(var b=a.getElementsByTagName("*"),d=0;d<b.length;d++)for(var k=0;k<b[d].attributes.length;k++){var f=b[d].attributes[k];2<f.name.length&&"on"==f.name.toLowerCase().substring(0,2)&&b[d].removeAttribute(f.name)}for(a=a.getElementsByTagName("script");0<a.length;)a[0].parentNode.removeChild(a[0])};
-Graph.clipSvgDataUri=function(a){if(!mxClient.IS_IE&&!mxClient.IS_IE11&&null!=a&&"data:image/svg+xml;base64,"==a.substring(0,26))try{var b=document.createElement("div");b.style.position="absolute";b.style.visibility="hidden";var d=decodeURIComponent(escape(atob(a.substring(26)))),k=d.indexOf("<svg");if(0<=k){b.innerHTML=d.substring(k);Graph.sanitizeSvg(b);var f=b.getElementsByTagName("svg");if(0<f.length){document.body.appendChild(b);try{var m=f[0].getBBox();0<m.width&&0<m.height&&(b.getElementsByTagName("svg")[0].setAttribute("viewBox",
+Graph.sanitizeSvg=function(a){for(var b=a.getElementsByTagName("*"),d=0;d<b.length;d++)for(var g=0;g<b[d].attributes.length;g++){var f=b[d].attributes[g];2<f.name.length&&"on"==f.name.toLowerCase().substring(0,2)&&b[d].removeAttribute(f.name)}for(a=a.getElementsByTagName("script");0<a.length;)a[0].parentNode.removeChild(a[0])};
+Graph.clipSvgDataUri=function(a){if(!mxClient.IS_IE&&!mxClient.IS_IE11&&null!=a&&"data:image/svg+xml;base64,"==a.substring(0,26))try{var b=document.createElement("div");b.style.position="absolute";b.style.visibility="hidden";var d=decodeURIComponent(escape(atob(a.substring(26)))),g=d.indexOf("<svg");if(0<=g){b.innerHTML=d.substring(g);Graph.sanitizeSvg(b);var f=b.getElementsByTagName("svg");if(0<f.length){document.body.appendChild(b);try{var m=f[0].getBBox();0<m.width&&0<m.height&&(b.getElementsByTagName("svg")[0].setAttribute("viewBox",
m.x+" "+m.y+" "+m.width+" "+m.height),b.getElementsByTagName("svg")[0].setAttribute("width",m.width),b.getElementsByTagName("svg")[0].setAttribute("height",m.height))}catch(p){}finally{document.body.removeChild(b)}a=Editor.createSvgDataUri(mxUtils.getXml(f[0]))}}}catch(p){}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.isPageLink=function(a){return null!=a&&"data:page/id,"==a.substring(0,13)};Graph.isLink=function(a){return null!=a&&Graph.linkPattern.test(a)};Graph.linkPattern=/^(https?:\/\/)?((([a-z\d]([a-z\d-]*[a-z\d])*)\.)+[a-z]{2,}|((\d{1,3}\.){3}\d{1,3}))(\:\d+)?(\/[-a-z\d%_.~+]*)*(\?[;&a-z\d%_.~+=-]*)?(\#[-a-z\d_]*)?$/i;
mxUtils.extend(Graph,mxGraph);Graph.prototype.minFitScale=null;Graph.prototype.maxFitScale=null;Graph.prototype.linkPolicy="frame"==urlParams.target?"blank":urlParams.target||"auto";Graph.prototype.linkTarget="frame"==urlParams.target?"_self":"_blank";Graph.prototype.linkRelation="nofollow noopener noreferrer";Graph.prototype.defaultScrollbars=!mxClient.IS_IOS;Graph.prototype.defaultPageVisible=!0;Graph.prototype.defaultGridEnabled=!0;Graph.prototype.lightbox=!1;
Graph.prototype.defaultPageBackgroundColor="#ffffff";Graph.prototype.defaultPageBorderColor="#ffffff";Graph.prototype.scrollTileSize=new mxRectangle(0,0,400,400);Graph.prototype.transparentBackground=!0;Graph.prototype.selectParentAfterDelete=!1;Graph.prototype.defaultEdgeLength=80;Graph.prototype.edgeMode=!1;Graph.prototype.connectionArrowsEnabled=!0;Graph.prototype.placeholderPattern=RegExp("%(date{.*}|[^%^{^}]+)%","g");Graph.prototype.absoluteUrlPattern=/^(?:[a-z]+:)?\/\//i;
Graph.prototype.defaultThemeName="default";Graph.prototype.defaultThemes={};Graph.prototype.baseUrl=null!=urlParams.base?decodeURIComponent(urlParams.base):(window!=window.top?document.referrer:document.location.toString()).split("#")[0];Graph.prototype.editAfterInsert=!1;Graph.prototype.builtInProperties=["label","tooltip","placeholders","placeholder"];Graph.prototype.standalone=!1;Graph.prototype.enableFlowAnimation=!1;
-Graph.prototype.init=function(a){mxGraph.prototype.init.apply(this,arguments);this.cellRenderer.initializeLabel=function(a,b){mxCellRenderer.prototype.initializeLabel.apply(this,arguments);var d=a.view.graph.tolerance,k=!0,p=null,c=mxUtils.bind(this,function(a){k=!0;p=new mxPoint(mxEvent.getClientX(a),mxEvent.getClientY(a))}),e=mxUtils.bind(this,function(a){k=k&&null!=p&&Math.abs(p.x-mxEvent.getClientX(a))<d&&Math.abs(p.y-mxEvent.getClientY(a))<d}),g=mxUtils.bind(this,function(c){if(k)for(var e=mxEvent.getSource(c);null!=
-e&&e!=b.node;){if("a"==e.nodeName.toLowerCase()){a.view.graph.labelLinkClicked(a,e,c);break}e=e.parentNode}});mxEvent.addGestureListeners(b.node,c,e,g);mxEvent.addListener(b.node,"click",function(a){mxEvent.consume(a)})};if(null!=this.tooltipHandler){var b=this.tooltipHandler.init;this.tooltipHandler.init=function(){b.apply(this,arguments);null!=this.div&&mxEvent.addListener(this.div,"click",mxUtils.bind(this,function(a){var b=mxEvent.getSource(a);"A"==b.nodeName&&(b=b.getAttribute("href"),null!=
+Graph.prototype.init=function(a){mxGraph.prototype.init.apply(this,arguments);this.cellRenderer.initializeLabel=function(a,b){mxCellRenderer.prototype.initializeLabel.apply(this,arguments);var d=a.view.graph.tolerance,g=!0,p=null,c=mxUtils.bind(this,function(a){g=!0;p=new mxPoint(mxEvent.getClientX(a),mxEvent.getClientY(a))}),e=mxUtils.bind(this,function(a){g=g&&null!=p&&Math.abs(p.x-mxEvent.getClientX(a))<d&&Math.abs(p.y-mxEvent.getClientY(a))<d}),k=mxUtils.bind(this,function(c){if(g)for(var e=mxEvent.getSource(c);null!=
+e&&e!=b.node;){if("a"==e.nodeName.toLowerCase()){a.view.graph.labelLinkClicked(a,e,c);break}e=e.parentNode}});mxEvent.addGestureListeners(b.node,c,e,k);mxEvent.addListener(b.node,"click",function(a){mxEvent.consume(a)})};if(null!=this.tooltipHandler){var b=this.tooltipHandler.init;this.tooltipHandler.init=function(){b.apply(this,arguments);null!=this.div&&mxEvent.addListener(this.div,"click",mxUtils.bind(this,function(a){var b=mxEvent.getSource(a);"A"==b.nodeName&&(b=b.getAttribute("href"),null!=
b&&this.graph.isCustomLink(b)&&(mxEvent.isTouchEvent(a)||!mxEvent.isPopupTrigger(a))&&this.graph.customLinkClicked(b)&&mxEvent.consume(a))}))}}this.addListener(mxEvent.SIZE,mxUtils.bind(this,function(a,b){if(null!=this.container&&this.flowAnimationStyle){var d=this.flowAnimationStyle.getAttribute("id");this.flowAnimationStyle.innerHTML=this.getFlowAnimationStyleCss(d)}}));this.initLayoutManager()};
(function(){Graph.prototype.useCssTransforms=!1;Graph.prototype.currentScale=1;Graph.prototype.currentTranslate=new mxPoint(0,0);Graph.prototype.getVerticesAndEdges=function(a,b){a=null!=a?a:!0;b=null!=b?b:!0;var c=this.model;return c.filterDescendants(function(e){return a&&c.isVertex(e)||b&&c.isEdge(e)},c.getRoot())};Graph.prototype.getCommonStyle=function(a){for(var b={},c=0;c<a.length;c++){var e=this.view.getState(a[c]);this.mergeStyle(e.style,b,0==c)}return b};Graph.prototype.mergeStyle=function(a,
b,c){if(null!=a){var e={},d;for(d in a){var f=a[d];null!=f&&(e[d]=!0,null==b[d]&&c?b[d]=f:b[d]!=f&&delete b[d])}for(d in b)e[d]||delete b[d]}};Graph.prototype.getStartEditingCell=function(a,b){var c=this.getCellStyle(a),c=parseInt(mxUtils.getValue(c,mxConstants.STYLE_STARTSIZE,0));this.isTable(a)&&(!this.isSwimlane(a)||0==c)&&""==this.getLabel(a)&&0<this.model.getChildCount(a)&&(a=this.model.getChildAt(a,0),c=this.getCellStyle(a),c=parseInt(mxUtils.getValue(c,mxConstants.STYLE_STARTSIZE,0)));if(this.isTableRow(a)&&
(!this.isSwimlane(a)||0==c)&&""==this.getLabel(a)&&0<this.model.getChildCount(a))for(c=0;c<this.model.getChildCount(a);c++){var e=this.model.getChildAt(a,c);if(this.isCellEditable(e)){a=e;break}}return a};Graph.prototype.copyStyle=function(a){var b=null;if(null!=a){b=mxUtils.clone(this.getCurrentCellStyle(a));a=this.model.getStyle(a);a=null!=a?a.split(";"):[];for(var c=0;c<a.length;c++){var e=a[c],d=e.indexOf("=");if(0<=d){var f=e.substring(0,d),e=e.substring(d+1);null==b[f]&&e==mxConstants.NONE&&
-(b[f]=mxConstants.NONE)}}}return b};Graph.prototype.pasteStyle=function(a,b,c){c=null!=c?c:Graph.pasteStyles;this.model.beginUpdate();try{for(var e=0;e<b.length;e++)for(var d=this.getCurrentCellStyle(b[e]),f=0;f<c.length;f++){var k=d[c[f]],q=a[c[f]];k==q||null==k&&q==mxConstants.NONE||this.setCellStyles(c[f],q,[b[e]])}}finally{this.model.endUpdate()}};Graph.prototype.isFastZoomEnabled=function(){return"nocss"!=urlParams.zoom&&!mxClient.NO_FO&&!mxClient.IS_EDGE&&!this.useCssTransforms&&(this.isCssTransformsSupported()||
+(b[f]=mxConstants.NONE)}}}return b};Graph.prototype.pasteStyle=function(a,b,c){c=null!=c?c:Graph.pasteStyles;this.model.beginUpdate();try{for(var e=0;e<b.length;e++)for(var d=this.getCurrentCellStyle(b[e]),f=0;f<c.length;f++){var g=d[c[f]],q=a[c[f]];g==q||null==g&&q==mxConstants.NONE||this.setCellStyles(c[f],q,[b[e]])}}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(a,b,c,e,d,f){this.useCssTransforms&&(a=a/this.currentScale-this.currentTranslate.x,b=b/this.currentScale-this.currentTranslate.y);return this.getScaledCellAt.apply(this,arguments)};Graph.prototype.getScaledCellAt=function(a,b,c,e,d,f){e=null!=e?e:!0;d=null!=d?d:!0;null==c&&(c=this.getCurrentRoot(),
-null==c&&(c=this.getModel().getRoot()));if(null!=c)for(var g=this.model.getChildCount(c)-1;0<=g;g--){var k=this.model.getChildAt(c,g),n=this.getScaledCellAt(a,b,k,e,d,f);if(null!=n)return n;if(this.isCellVisible(k)&&(d&&this.model.isEdge(k)||e&&this.model.isVertex(k))&&(n=this.view.getState(k),null!=n&&(null==f||!f(n,a,b))&&this.intersects(n,a,b)))return k}return null};Graph.prototype.isRecursiveVertexResize=function(a){return!this.isSwimlane(a.cell)&&0<this.model.getChildCount(a.cell)&&!this.isCellCollapsed(a.cell)&&
+null==c&&(c=this.getModel().getRoot()));if(null!=c)for(var k=this.model.getChildCount(c)-1;0<=k;k--){var g=this.model.getChildAt(c,k),n=this.getScaledCellAt(a,b,g,e,d,f);if(null!=n)return n;if(this.isCellVisible(g)&&(d&&this.model.isEdge(g)||e&&this.model.isVertex(g))&&(n=this.view.getState(g),null!=n&&(null==f||!f(n,a,b))&&this.intersects(n,a,b)))return g}return null};Graph.prototype.isRecursiveVertexResize=function(a){return!this.isSwimlane(a.cell)&&0<this.model.getChildCount(a.cell)&&!this.isCellCollapsed(a.cell)&&
"1"==mxUtils.getValue(a.style,"recursiveResize","1")&&null==mxUtils.getValue(a.style,"childLayout",null)};Graph.prototype.getAbsoluteParent=function(a){for(var b=this.getCellGeometry(a);null!=b&&b.relative;)a=this.getModel().getParent(a),b=this.getCellGeometry(cellToClone);return a};Graph.prototype.isPart=function(a){return"1"==mxUtils.getValue(this.getCurrentCellStyle(a),"part","0")||this.isTableCell(a)||this.isTableRow(a)};Graph.prototype.getCompositeParent=function(a){for(;this.isPart(a);){var b=
this.model.getParent(a);if(!this.model.isVertex(b))break;a=b}return a};Graph.prototype.filterSelectionCells=function(a){var b=this.getSelectionCells();if(null!=a){for(var c=[],e=0;e<b.length;e++)a(b[e])||c.push(b[e]);b=c}return b};mxCellHighlight.prototype.getStrokeWidth=function(a){a=this.strokeWidth;this.graph.useCssTransforms&&(a/=this.graph.currentScale);return a};mxGraphView.prototype.getGraphBounds=function(){var a=this.graphBounds;if(this.graph.useCssTransforms)var b=this.graph.currentTranslate,
c=this.graph.currentScale,a=new mxRectangle((a.x+b.x)*c,(a.y+b.y)*c,a.width*c,a.height*c);return a};mxGraphView.prototype.viewStateChanged=function(){this.graph.useCssTransforms?this.validate():this.revalidate();this.graph.sizeDidChange()};var a=mxGraphView.prototype.validate;mxGraphView.prototype.validate=function(b){this.graph.useCssTransforms&&(this.graph.currentScale=this.scale,this.graph.currentTranslate.x=this.translate.x,this.graph.currentTranslate.y=this.translate.y,this.scale=1,this.translate.x=
0,this.translate.y=0);a.apply(this,arguments);this.graph.useCssTransforms&&(this.graph.updateCssTransform(),this.scale=this.graph.currentScale,this.translate.x=this.graph.currentTranslate.x,this.translate.y=this.graph.currentTranslate.y)};var b=mxGraph.prototype.getCellsForGroup;Graph.prototype.getCellsForGroup=function(a){a=b.apply(this,arguments);for(var d=[],c=0;c<a.length;c++)this.isTableRow(a[c])||this.isTableCell(a[c])||d.push(a[c]);return d};var d=mxGraph.prototype.getCellsForUngroup;Graph.prototype.getCellsForUngroup=
function(a){a=d.apply(this,arguments);for(var b=[],c=0;c<a.length;c++)this.isTable(a[c])||this.isTableRow(a[c])||this.isTableCell(a[c])||b.push(a[c]);return b};Graph.prototype.updateCssTransform=function(){var a=this.view.getDrawPane();if(null!=a)if(a=a.parentNode,this.useCssTransforms){var b=a.getAttribute("transform");a.setAttribute("transformOrigin","0 0");var c=Math.round(100*this.currentScale)/100;a.setAttribute("transform","scale("+c+","+c+")translate("+Math.round(100*this.currentTranslate.x)/
-100+","+Math.round(100*this.currentTranslate.y)/100+")");b!=a.getAttribute("transform")&&this.fireEvent(new mxEventObject("cssTransformChanged"),"transform",a.getAttribute("transform"))}else a.removeAttribute("transformOrigin"),a.removeAttribute("transform")};var k=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){var a=this.graph.useCssTransforms,b=this.scale,c=this.translate;a&&(this.scale=this.graph.currentScale,this.translate=this.graph.currentTranslate);
-k.apply(this,arguments);a&&(this.scale=b,this.translate=c)};var f=mxGraph.prototype.updatePageBreaks;mxGraph.prototype.updatePageBreaks=function(a,b,c){var e=this.useCssTransforms,d=this.view.scale,k=this.view.translate;e&&(this.view.scale=1,this.view.translate=new mxPoint(0,0),this.useCssTransforms=!1);f.apply(this,arguments);e&&(this.view.scale=d,this.view.translate=k,this.useCssTransforms=!0)}})();Graph.prototype.isLightboxView=function(){return this.lightbox};Graph.prototype.isViewer=function(){return!1};
+100+","+Math.round(100*this.currentTranslate.y)/100+")");b!=a.getAttribute("transform")&&this.fireEvent(new mxEventObject("cssTransformChanged"),"transform",a.getAttribute("transform"))}else a.removeAttribute("transformOrigin"),a.removeAttribute("transform")};var g=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){var a=this.graph.useCssTransforms,b=this.scale,c=this.translate;a&&(this.scale=this.graph.currentScale,this.translate=this.graph.currentTranslate);
+g.apply(this,arguments);a&&(this.scale=b,this.translate=c)};var f=mxGraph.prototype.updatePageBreaks;mxGraph.prototype.updatePageBreaks=function(a,b,c){var e=this.useCssTransforms,d=this.view.scale,g=this.view.translate;e&&(this.view.scale=1,this.view.translate=new mxPoint(0,0),this.useCssTransforms=!1);f.apply(this,arguments);e&&(this.view.scale=d,this.view.translate=g,this.useCssTransforms=!0)}})();Graph.prototype.isLightboxView=function(){return this.lightbox};Graph.prototype.isViewer=function(){return!1};
Graph.prototype.labelLinkClicked=function(a,b,d){b=b.getAttribute("href");if(null!=b&&!this.isCustomLink(b)&&(mxEvent.isLeftMouseButton(d)&&!mxEvent.isPopupTrigger(d)||mxEvent.isTouchEvent(d))){if(!this.isEnabled()||this.isCellLocked(a.cell))a=this.isBlankLink(b)?this.linkTarget:"_top",this.openLink(this.getAbsoluteUrl(b),a);mxEvent.consume(d)}};
-Graph.prototype.openLink=function(a,b,d){var k=window;try{if("_self"==b&&window!=window.top)window.location.href=a;else if(a.substring(0,this.baseUrl.length)==this.baseUrl&&"#"==a.charAt(this.baseUrl.length)&&"_top"==b&&window==window.top){var f=a.split("#")[1];window.location.hash=="#"+f&&(window.location.hash="");window.location.hash=f}else k=window.open(a,null!=b?b:"_blank"),null==k||d||(k.opener=null)}catch(m){}return k};
+Graph.prototype.openLink=function(a,b,d){var g=window;try{if("_self"==b&&window!=window.top)window.location.href=a;else if(a.substring(0,this.baseUrl.length)==this.baseUrl&&"#"==a.charAt(this.baseUrl.length)&&"_top"==b&&window==window.top){var f=a.split("#")[1];window.location.hash=="#"+f&&(window.location.hash="");window.location.hash=f}else g=window.open(a,null!=b?b:"_blank"),null==g||d||(g.opener=null)}catch(m){}return g};
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,b){return null!=this.graph.getCellStyle(a).childLayout};this.layoutManager.getLayout=function(a,b){var d=this.graph.model.getParent(a);if(b!=mxEvent.BEGIN_UPDATE||this.hasLayout(d,b)){d=this.graph.getCellStyle(a);if("stackLayout"==d.childLayout){var k=new mxStackLayout(this.graph,!0);k.resizeParentMax="1"==mxUtils.getValue(d,"resizeParentMax","1");k.horizontal="1"==mxUtils.getValue(d,
-"horizontalStack","1");k.resizeParent="1"==mxUtils.getValue(d,"resizeParent","1");k.resizeLast="1"==mxUtils.getValue(d,"resizeLast","0");k.spacing=d.stackSpacing||k.spacing;k.border=d.stackBorder||k.border;k.marginLeft=d.marginLeft||0;k.marginRight=d.marginRight||0;k.marginTop=d.marginTop||0;k.marginBottom=d.marginBottom||0;k.allowGaps=d.allowGaps||0;k.fill=!0;k.allowGaps&&(k.gridSize=parseFloat(mxUtils.getValue(d,"stackUnitSize",20)));return k}if("treeLayout"==d.childLayout)return k=new mxCompactTreeLayout(this.graph),
-k.horizontal="1"==mxUtils.getValue(d,"horizontalTree","1"),k.resizeParent="1"==mxUtils.getValue(d,"resizeParent","1"),k.groupPadding=mxUtils.getValue(d,"parentPadding",20),k.levelDistance=mxUtils.getValue(d,"treeLevelDistance",30),k.maintainParentLocation=!0,k.edgeRouting=!1,k.resetEdges=!1,k;if("flowLayout"==d.childLayout)return k=new mxHierarchicalLayout(this.graph,mxUtils.getValue(d,"flowOrientation",mxConstants.DIRECTION_EAST)),k.resizeParent="1"==mxUtils.getValue(d,"resizeParent","1"),k.parentBorder=
-mxUtils.getValue(d,"parentPadding",20),k.maintainParentLocation=!0,k.intraCellSpacing=mxUtils.getValue(d,"intraCellSpacing",mxHierarchicalLayout.prototype.intraCellSpacing),k.interRankCellSpacing=mxUtils.getValue(d,"interRankCellSpacing",mxHierarchicalLayout.prototype.interRankCellSpacing),k.interHierarchySpacing=mxUtils.getValue(d,"interHierarchySpacing",mxHierarchicalLayout.prototype.interHierarchySpacing),k.parallelEdgeSpacing=mxUtils.getValue(d,"parallelEdgeSpacing",mxHierarchicalLayout.prototype.parallelEdgeSpacing),
-k;if("circleLayout"==d.childLayout)return new mxCircleLayout(this.graph);if("organicLayout"==d.childLayout)return new mxFastOrganicLayout(this.graph);if("tableLayout"==d.childLayout)return new TableLayout(this.graph)}return null}};Graph.prototype.getDataForCells=function(a){for(var b=[],d=0;d<a.length;d++){var k=null!=a[d].value?a[d].value.attributes:null,f={};f.id=a[d].id;if(null!=k)for(var m=0;m<k.length;m++)f[k[m].nodeName]=k[m].nodeValue;else f.label=this.convertValueToString(a[d]);b.push(f)}return b};
-Graph.prototype.getNodesForCells=function(a){for(var b=[],d=0;d<a.length;d++){var k=this.view.getState(a[d]);if(null!=k){for(var f=this.cellRenderer.getShapesForState(k),m=0;m<f.length;m++)null!=f[m]&&null!=f[m].node&&b.push(f[m].node);null!=k.control&&null!=k.control.node&&b.push(k.control.node)}}return b};
-Graph.prototype.createWipeAnimations=function(a,b){for(var d=[],k=0;k<a.length;k++){var f=this.view.getState(a[k]);null!=f&&null!=f.shape&&(this.model.isEdge(f.cell)&&null!=f.absolutePoints&&1<f.absolutePoints.length?d.push(this.createEdgeWipeAnimation(f,b)):this.model.isVertex(f.cell)&&null!=f.shape.bounds&&d.push(this.createVertexWipeAnimation(f,b)))}return d};
-Graph.prototype.createEdgeWipeAnimation=function(a,b){var d=a.absolutePoints.slice(),k=a.segments,f=a.length,m=d.length;return{execute:mxUtils.bind(this,function(p,c){if(null!=a.shape){var e=[d[0]],g=p/c;b||(g=1-g);for(var n=f*g,l=1;l<m;l++)if(n<=k[l-1]){e.push(new mxPoint(d[l-1].x+(d[l].x-d[l-1].x)*n/k[l-1],d[l-1].y+(d[l].y-d[l-1].y)*n/k[l-1]));break}else n-=k[l-1],e.push(d[l]);a.shape.points=e;a.shape.redraw();0==p&&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.points=d,a.shape.redraw(),null!=a.text&&null!=a.text.node&&(a.text.node.style.opacity=""),Graph.setOpacityForNodes(this.getNodesForCells([a.cell]),b?1:0))})}};
-Graph.prototype.createVertexWipeAnimation=function(a,b){var d=new mxRectangle.fromRectangle(a.shape.bounds);return{execute:mxUtils.bind(this,function(k,f){if(null!=a.shape){var m=k/f;b||(m=1-m);a.shape.bounds=new mxRectangle(d.x,d.y,d.width*m,d.height);a.shape.redraw();0==k&&Graph.setOpacityForNodes(this.getNodesForCells([a.cell]),1);null!=a.text&&null!=a.text.node&&(a.text.node.style.opacity=m)}}),stop:mxUtils.bind(this,function(){null!=a.shape&&(a.shape.bounds=d,a.shape.redraw(),null!=a.text&&null!=
-a.text.node&&(a.text.node.style.opacity=""),Graph.setOpacityForNodes(this.getNodesForCells([a.cell]),b?1:0))})}};Graph.prototype.executeAnimations=function(a,b,d,k){d=null!=d?d:30;k=null!=k?k:30;var f=null,m=0,p=mxUtils.bind(this,function(){if(m==d||this.stoppingCustomActions){window.clearInterval(f);for(var c=0;c<a.length;c++)a[c].stop();null!=b&&b()}else for(c=0;c<a.length;c++)a[c].execute(m,d);m++}),f=window.setInterval(p,k);p()};
+Graph.prototype.initLayoutManager=function(){this.layoutManager=new mxLayoutManager(this);this.layoutManager.hasLayout=function(a,b){return null!=this.graph.getCellStyle(a).childLayout};this.layoutManager.getLayout=function(a,b){var d=this.graph.model.getParent(a);if(b!=mxEvent.BEGIN_UPDATE||this.hasLayout(d,b)){d=this.graph.getCellStyle(a);if("stackLayout"==d.childLayout){var g=new mxStackLayout(this.graph,!0);g.resizeParentMax="1"==mxUtils.getValue(d,"resizeParentMax","1");g.horizontal="1"==mxUtils.getValue(d,
+"horizontalStack","1");g.resizeParent="1"==mxUtils.getValue(d,"resizeParent","1");g.resizeLast="1"==mxUtils.getValue(d,"resizeLast","0");g.spacing=d.stackSpacing||g.spacing;g.border=d.stackBorder||g.border;g.marginLeft=d.marginLeft||0;g.marginRight=d.marginRight||0;g.marginTop=d.marginTop||0;g.marginBottom=d.marginBottom||0;g.allowGaps=d.allowGaps||0;g.fill=!0;g.allowGaps&&(g.gridSize=parseFloat(mxUtils.getValue(d,"stackUnitSize",20)));return g}if("treeLayout"==d.childLayout)return g=new mxCompactTreeLayout(this.graph),
+g.horizontal="1"==mxUtils.getValue(d,"horizontalTree","1"),g.resizeParent="1"==mxUtils.getValue(d,"resizeParent","1"),g.groupPadding=mxUtils.getValue(d,"parentPadding",20),g.levelDistance=mxUtils.getValue(d,"treeLevelDistance",30),g.maintainParentLocation=!0,g.edgeRouting=!1,g.resetEdges=!1,g;if("flowLayout"==d.childLayout)return g=new mxHierarchicalLayout(this.graph,mxUtils.getValue(d,"flowOrientation",mxConstants.DIRECTION_EAST)),g.resizeParent="1"==mxUtils.getValue(d,"resizeParent","1"),g.parentBorder=
+mxUtils.getValue(d,"parentPadding",20),g.maintainParentLocation=!0,g.intraCellSpacing=mxUtils.getValue(d,"intraCellSpacing",mxHierarchicalLayout.prototype.intraCellSpacing),g.interRankCellSpacing=mxUtils.getValue(d,"interRankCellSpacing",mxHierarchicalLayout.prototype.interRankCellSpacing),g.interHierarchySpacing=mxUtils.getValue(d,"interHierarchySpacing",mxHierarchicalLayout.prototype.interHierarchySpacing),g.parallelEdgeSpacing=mxUtils.getValue(d,"parallelEdgeSpacing",mxHierarchicalLayout.prototype.parallelEdgeSpacing),
+g;if("circleLayout"==d.childLayout)return new mxCircleLayout(this.graph);if("organicLayout"==d.childLayout)return new mxFastOrganicLayout(this.graph);if("tableLayout"==d.childLayout)return new TableLayout(this.graph)}return null}};Graph.prototype.getDataForCells=function(a){for(var b=[],d=0;d<a.length;d++){var g=null!=a[d].value?a[d].value.attributes:null,f={};f.id=a[d].id;if(null!=g)for(var m=0;m<g.length;m++)f[g[m].nodeName]=g[m].nodeValue;else f.label=this.convertValueToString(a[d]);b.push(f)}return b};
+Graph.prototype.getNodesForCells=function(a){for(var b=[],d=0;d<a.length;d++){var g=this.view.getState(a[d]);if(null!=g){for(var f=this.cellRenderer.getShapesForState(g),m=0;m<f.length;m++)null!=f[m]&&null!=f[m].node&&b.push(f[m].node);null!=g.control&&null!=g.control.node&&b.push(g.control.node)}}return b};
+Graph.prototype.createWipeAnimations=function(a,b){for(var d=[],g=0;g<a.length;g++){var f=this.view.getState(a[g]);null!=f&&null!=f.shape&&(this.model.isEdge(f.cell)&&null!=f.absolutePoints&&1<f.absolutePoints.length?d.push(this.createEdgeWipeAnimation(f,b)):this.model.isVertex(f.cell)&&null!=f.shape.bounds&&d.push(this.createVertexWipeAnimation(f,b)))}return d};
+Graph.prototype.createEdgeWipeAnimation=function(a,b){var d=a.absolutePoints.slice(),g=a.segments,f=a.length,m=d.length;return{execute:mxUtils.bind(this,function(p,c){if(null!=a.shape){var e=[d[0]],k=p/c;b||(k=1-k);for(var n=f*k,l=1;l<m;l++)if(n<=g[l-1]){e.push(new mxPoint(d[l-1].x+(d[l].x-d[l-1].x)*n/g[l-1],d[l-1].y+(d[l].y-d[l-1].y)*n/g[l-1]));break}else n-=g[l-1],e.push(d[l]);a.shape.points=e;a.shape.redraw();0==p&&Graph.setOpacityForNodes(this.getNodesForCells([a.cell]),1);null!=a.text&&null!=
+a.text.node&&(a.text.node.style.opacity=k)}}),stop:mxUtils.bind(this,function(){null!=a.shape&&(a.shape.points=d,a.shape.redraw(),null!=a.text&&null!=a.text.node&&(a.text.node.style.opacity=""),Graph.setOpacityForNodes(this.getNodesForCells([a.cell]),b?1:0))})}};
+Graph.prototype.createVertexWipeAnimation=function(a,b){var d=new mxRectangle.fromRectangle(a.shape.bounds);return{execute:mxUtils.bind(this,function(g,f){if(null!=a.shape){var m=g/f;b||(m=1-m);a.shape.bounds=new mxRectangle(d.x,d.y,d.width*m,d.height);a.shape.redraw();0==g&&Graph.setOpacityForNodes(this.getNodesForCells([a.cell]),1);null!=a.text&&null!=a.text.node&&(a.text.node.style.opacity=m)}}),stop:mxUtils.bind(this,function(){null!=a.shape&&(a.shape.bounds=d,a.shape.redraw(),null!=a.text&&null!=
+a.text.node&&(a.text.node.style.opacity=""),Graph.setOpacityForNodes(this.getNodesForCells([a.cell]),b?1:0))})}};Graph.prototype.executeAnimations=function(a,b,d,g){d=null!=d?d:30;g=null!=g?g:30;var f=null,m=0,p=mxUtils.bind(this,function(){if(m==d||this.stoppingCustomActions){window.clearInterval(f);for(var c=0;c<a.length;c++)a[c].stop();null!=b&&b()}else for(c=0;c<a.length;c++)a[c].execute(m,d);m++}),f=window.setInterval(p,g);p()};
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 d=Math.floor(Math.ceil(b.x/this.view.scale-this.view.translate.x)/a.width),k=Math.floor(Math.ceil(b.y/this.view.scale-this.view.translate.y)/a.height);return new mxRectangle(d,k,Math.ceil((Math.floor((b.x+b.width)/this.view.scale)-this.view.translate.x)/a.width)-d,Math.ceil((Math.floor((b.y+b.height)/this.view.scale)-this.view.translate.y)/a.height)-
-k)};Graph.prototype.sanitizeHtml=function(a,b){return Graph.sanitizeHtml(a,b)};Graph.prototype.updatePlaceholders=function(){var a=!1,b;for(b in this.model.cells){var d=this.model.cells[b];this.isReplacePlaceholders(d)&&(this.view.invalidate(d,!1,!1),a=!0)}a&&this.view.validate()};Graph.prototype.isReplacePlaceholders=function(a){return null!=a.value&&"object"==typeof a.value&&"1"==a.value.getAttribute("placeholders")};Graph.prototype.isZoomWheelEvent=function(a){return mxEvent.isAltDown(a)||mxEvent.isControlDown(a)};
+Graph.prototype.getPageLayout=function(){var a=this.getPageSize(),b=this.getGraphBounds();if(0==b.width||0==b.height)return new mxRectangle(0,0,1,1);var d=Math.floor(Math.ceil(b.x/this.view.scale-this.view.translate.x)/a.width),g=Math.floor(Math.ceil(b.y/this.view.scale-this.view.translate.y)/a.height);return new mxRectangle(d,g,Math.ceil((Math.floor((b.x+b.width)/this.view.scale)-this.view.translate.x)/a.width)-d,Math.ceil((Math.floor((b.y+b.height)/this.view.scale)-this.view.translate.y)/a.height)-
+g)};Graph.prototype.sanitizeHtml=function(a,b){return Graph.sanitizeHtml(a,b)};Graph.prototype.updatePlaceholders=function(){var a=!1,b;for(b in this.model.cells){var d=this.model.cells[b];this.isReplacePlaceholders(d)&&(this.view.invalidate(d,!1,!1),a=!0)}a&&this.view.validate()};Graph.prototype.isReplacePlaceholders=function(a){return null!=a.value&&"object"==typeof a.value&&"1"==a.value.getAttribute("placeholders")};Graph.prototype.isZoomWheelEvent=function(a){return 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.isShiftDown(a)&&(mxEvent.isControlDown(a)||mxClient.IS_MAC&&mxEvent.isMetaDown(a))};Graph.prototype.isEdgeIgnored=function(a){var b=!1;null!=a&&(a=this.getCurrentCellStyle(a),b="1"==mxUtils.getValue(a,"ignoreEdge","0"));return b};
Graph.prototype.isSplitTarget=function(a,b,d){return!this.model.isEdge(b[0])&&!mxEvent.isAltDown(d)&&!mxEvent.isShiftDown(d)&&mxGraph.prototype.isSplitTarget.apply(this,arguments)};Graph.prototype.getLabel=function(a){var b=mxGraph.prototype.getLabel.apply(this,arguments);null!=b&&this.isReplacePlaceholders(a)&&null==a.getAttribute("placeholder")&&(b=this.replacePlaceholders(a,b));return b};
Graph.prototype.isLabelMovable=function(a){var b=this.getCurrentCellStyle(a);return!this.isCellLocked(a)&&(this.model.isEdge(a)&&this.edgeLabelsMovable||this.model.isVertex(a)&&(this.vertexLabelsMovable||"1"==mxUtils.getValue(b,"labelMovable","0")))};Graph.prototype.setGridSize=function(a){this.gridSize=a;this.fireEvent(new mxEventObject("gridSizeChanged"))};Graph.prototype.setDefaultParent=function(a){this.defaultParent=a;this.fireEvent(new mxEventObject("defaultParentChanged"))};
Graph.prototype.getClickableLinkForCell=function(a){do{var b=this.getLinkForCell(a);if(null!=b)return b;a=this.model.getParent(a)}while(null!=a);return null};Graph.prototype.getGlobalVariable=function(a){var b=null;"date"==a?b=(new Date).toLocaleDateString():"time"==a?b=(new Date).toLocaleTimeString():"timestamp"==a?b=(new Date).toLocaleString():"date{"==a.substring(0,5)&&(a=a.substring(5,a.length-1),b=this.formatDate(new Date,a));return b};
Graph.prototype.formatDate=function(a,b,d){null==this.dateFormatCache&&(this.dateFormatCache={i18n:{dayNames:"Sun Mon Tue Wed Thu Fri Sat Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),monthNames:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec January February March April May June July August September October November December".split(" ")},masks:{"default":"ddd mmm dd yyyy HH:MM:ss",shortDate:"m/d/yy",mediumDate:"mmm d, yyyy",longDate:"mmmm d, yyyy",fullDate:"dddd, mmmm d, yyyy",
-shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:ss",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'"}});var k=this.dateFormatCache,f=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,m=/[^-+\dA-Z]/g,p=function(a,c){a=String(a);for(c=c||2;a.length<c;)a="0"+a;return a};1!=arguments.length||"[object String]"!=Object.prototype.toString.call(a)||
-/\d/.test(a)||(b=a,a=void 0);a=a?new Date(a):new Date;if(isNaN(a))throw SyntaxError("invalid date");b=String(k.masks[b]||b||k.masks["default"]);"UTC:"==b.slice(0,4)&&(b=b.slice(4),d=!0);var c=d?"getUTC":"get",e=a[c+"Date"](),g=a[c+"Day"](),n=a[c+"Month"](),l=a[c+"FullYear"](),q=a[c+"Hours"](),u=a[c+"Minutes"](),t=a[c+"Seconds"](),c=a[c+"Milliseconds"](),A=d?0:a.getTimezoneOffset(),x={d:e,dd:p(e),ddd:k.i18n.dayNames[g],dddd:k.i18n.dayNames[g+7],m:n+1,mm:p(n+1),mmm:k.i18n.monthNames[n],mmmm:k.i18n.monthNames[n+
+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 g=this.dateFormatCache,f=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,m=/[^-+\dA-Z]/g,p=function(a,c){a=String(a);for(c=c||2;a.length<c;)a="0"+a;return a};1!=arguments.length||"[object String]"!=Object.prototype.toString.call(a)||
+/\d/.test(a)||(b=a,a=void 0);a=a?new Date(a):new Date;if(isNaN(a))throw SyntaxError("invalid date");b=String(g.masks[b]||b||g.masks["default"]);"UTC:"==b.slice(0,4)&&(b=b.slice(4),d=!0);var c=d?"getUTC":"get",e=a[c+"Date"](),k=a[c+"Day"](),n=a[c+"Month"](),l=a[c+"FullYear"](),q=a[c+"Hours"](),u=a[c+"Minutes"](),t=a[c+"Seconds"](),c=a[c+"Milliseconds"](),A=d?0:a.getTimezoneOffset(),x={d:e,dd:p(e),ddd:g.i18n.dayNames[k],dddd:g.i18n.dayNames[k+7],m:n+1,mm:p(n+1),mmm:g.i18n.monthNames[n],mmmm:g.i18n.monthNames[n+
12],yy:String(l).slice(2),yyyy:l,h:q%12||12,hh:p(q%12||12),H:q,HH:p(q),M:u,MM:p(u),s:t,ss:p(t),l:p(c,3),L:p(99<c?Math.round(c/10):c),t:12>q?"a":"p",tt:12>q?"am":"pm",T:12>q?"A":"P",TT:12>q?"AM":"PM",Z:d?"UTC":(String(a).match(f)||[""]).pop().replace(m,""),o:(0<A?"-":"+")+p(100*Math.floor(Math.abs(A)/60)+Math.abs(A)%60,4),S:["th","st","nd","rd"][3<e%10?0:(10!=e%100-e%10)*e%10]};return b.replace(/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,function(a){return a in x?x[a]:a.slice(1,
a.length-1)})};Graph.prototype.getLayerForCells=function(a){var b=null;if(0<a.length){for(b=a[0];!this.model.isLayer(b);)b=this.model.getParent(b);for(var d=1;d<a.length;d++)if(!this.model.isAncestor(b,a[d])){b=null;break}}return b};
-Graph.prototype.createLayersDialog=function(a){var b=document.createElement("div");b.style.position="absolute";for(var d=this.getModel(),k=d.getChildCount(d.root),f=0;f<k;f++)mxUtils.bind(this,function(f){var k=document.createElement("div");k.style.overflow="hidden";k.style.textOverflow="ellipsis";k.style.padding="2px";k.style.whiteSpace="nowrap";var c=document.createElement("input");c.style.display="inline-block";c.setAttribute("type","checkbox");d.isVisible(f)&&(c.setAttribute("checked","checked"),
-c.defaultChecked=!0);k.appendChild(c);var e=this.convertValueToString(f)||mxResources.get("background")||"Background";k.setAttribute("title",e);mxUtils.write(k,e);b.appendChild(k);mxEvent.addListener(c,"click",function(){null!=c.getAttribute("checked")?c.removeAttribute("checked"):c.setAttribute("checked","checked");d.setVisible(f,c.checked);null!=a&&a(f)})})(d.getChildAt(d.root,f));return b};
-Graph.prototype.replacePlaceholders=function(a,b,d,k){k=[];if(null!=b){for(var f=0;match=this.placeholderPattern.exec(b);){var m=match[0];if(2<m.length&&"%label%"!=m&&"%tooltip%"!=m){var p=null;if(match.index>f&&"%"==b.charAt(match.index-1))p=m.substring(1);else{var c=m.substring(1,m.length-1);if("id"==c)p=a.id;else if(0>c.indexOf("{"))for(var e=a;null==p&&null!=e;)null!=e.value&&"object"==typeof e.value&&(Graph.translateDiagram&&null!=Graph.diagramLanguage&&(p=e.getAttribute(c+"_"+Graph.diagramLanguage)),
-null==p&&(p=e.hasAttribute(c)?null!=e.getAttribute(c)?e.getAttribute(c):"":null)),e=this.model.getParent(e);null==p&&(p=this.getGlobalVariable(c));null==p&&null!=d&&(p=d[c])}k.push(b.substring(f,match.index)+(null!=p?p:m));f=match.index+m.length}}k.push(b.substring(f))}return k.join("")};Graph.prototype.restoreSelection=function(a){if(null!=a&&0<a.length){for(var b=[],d=0;d<a.length;d++){var k=this.model.getCell(a[d].id);null!=k&&b.push(k)}this.setSelectionCells(b)}else this.clearSelection()};
+Graph.prototype.createLayersDialog=function(a){var b=document.createElement("div");b.style.position="absolute";for(var d=this.getModel(),g=d.getChildCount(d.root),f=0;f<g;f++)mxUtils.bind(this,function(f){var g=document.createElement("div");g.style.overflow="hidden";g.style.textOverflow="ellipsis";g.style.padding="2px";g.style.whiteSpace="nowrap";var c=document.createElement("input");c.style.display="inline-block";c.setAttribute("type","checkbox");d.isVisible(f)&&(c.setAttribute("checked","checked"),
+c.defaultChecked=!0);g.appendChild(c);var e=this.convertValueToString(f)||mxResources.get("background")||"Background";g.setAttribute("title",e);mxUtils.write(g,e);b.appendChild(g);mxEvent.addListener(c,"click",function(){null!=c.getAttribute("checked")?c.removeAttribute("checked"):c.setAttribute("checked","checked");d.setVisible(f,c.checked);null!=a&&a(f)})})(d.getChildAt(d.root,f));return b};
+Graph.prototype.replacePlaceholders=function(a,b,d,g){g=[];if(null!=b){for(var f=0;match=this.placeholderPattern.exec(b);){var m=match[0];if(2<m.length&&"%label%"!=m&&"%tooltip%"!=m){var p=null;if(match.index>f&&"%"==b.charAt(match.index-1))p=m.substring(1);else{var c=m.substring(1,m.length-1);if("id"==c)p=a.id;else if(0>c.indexOf("{"))for(var e=a;null==p&&null!=e;)null!=e.value&&"object"==typeof e.value&&(Graph.translateDiagram&&null!=Graph.diagramLanguage&&(p=e.getAttribute(c+"_"+Graph.diagramLanguage)),
+null==p&&(p=e.hasAttribute(c)?null!=e.getAttribute(c)?e.getAttribute(c):"":null)),e=this.model.getParent(e);null==p&&(p=this.getGlobalVariable(c));null==p&&null!=d&&(p=d[c])}g.push(b.substring(f,match.index)+(null!=p?p:m));f=match.index+m.length}}g.push(b.substring(f))}return g.join("")};Graph.prototype.restoreSelection=function(a){if(null!=a&&0<a.length){for(var b=[],d=0;d<a.length;d++){var g=this.model.getCell(a[d].id);null!=g&&b.push(g)}this.setSelectionCells(b)}else this.clearSelection()};
Graph.prototype.selectCellsForConnectVertex=function(a,b,d){2==a.length&&this.model.isVertex(a[1])?(this.setSelectionCell(a[1]),this.scrollCellToVisible(a[1]),null!=d&&(mxEvent.isTouchEvent(b)?d.update(d.getState(this.view.getState(a[1]))):d.reset())):this.setSelectionCells(a)};Graph.prototype.isCloneConnectSource=function(a){var b=null;null!=this.layoutManager&&(b=this.layoutManager.getLayout(this.model.getParent(a)));return this.isTableRow(a)||this.isTableCell(a)||null!=b&&b.constructor==mxStackLayout};
-Graph.prototype.connectVertex=function(a,b,d,k,f,m,p,c){m=m?m:!1;if(a.geometry.relative&&this.model.isEdge(a.parent))return[];for(;a.geometry.relative&&this.model.isVertex(a.parent);)a=a.parent;var e=this.isCloneConnectSource(a),g=e?a:this.getCompositeParent(a),n=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(g.geometry.x,g.geometry.y);b==mxConstants.DIRECTION_NORTH?(n.x+=g.geometry.width/2,n.y-=d):b==
-mxConstants.DIRECTION_SOUTH?(n.x+=g.geometry.width/2,n.y+=g.geometry.height+d):(n.x=b==mxConstants.DIRECTION_WEST?n.x-d:n.x+(g.geometry.width+d),n.y+=g.geometry.height/2);var l=this.view.getState(this.model.getParent(a));d=this.view.scale;var q=this.view.translate,g=q.x*d,q=q.y*d;null!=l&&this.model.isVertex(l.cell)&&(g=l.x,q=l.y);this.model.isVertex(a.parent)&&a.geometry.relative&&(n.x+=a.parent.geometry.x,n.y+=a.parent.geometry.y);m=m?null:(new mxRectangle(g+n.x*d,q+n.y*d)).grow(40*d);m=null!=m?
+Graph.prototype.connectVertex=function(a,b,d,g,f,m,p,c){m=m?m:!1;if(a.geometry.relative&&this.model.isEdge(a.parent))return[];for(;a.geometry.relative&&this.model.isVertex(a.parent);)a=a.parent;var e=this.isCloneConnectSource(a),k=e?a:this.getCompositeParent(a),n=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(k.geometry.x,k.geometry.y);b==mxConstants.DIRECTION_NORTH?(n.x+=k.geometry.width/2,n.y-=d):b==
+mxConstants.DIRECTION_SOUTH?(n.x+=k.geometry.width/2,n.y+=k.geometry.height+d):(n.x=b==mxConstants.DIRECTION_WEST?n.x-d:n.x+(k.geometry.width+d),n.y+=k.geometry.height/2);var l=this.view.getState(this.model.getParent(a));d=this.view.scale;var q=this.view.translate,k=q.x*d,q=q.y*d;null!=l&&this.model.isVertex(l.cell)&&(k=l.x,q=l.y);this.model.isVertex(a.parent)&&a.geometry.relative&&(n.x+=a.parent.geometry.x,n.y+=a.parent.geometry.y);m=m?null:(new mxRectangle(k+n.x*d,q+n.y*d)).grow(40*d);m=null!=m?
this.getCells(0,0,0,0,null,null,m,null,!0):null;var l=this.view.getState(a),u=null,t=null;if(null!=m){m=m.reverse();for(var A=0;A<m.length;A++)if(!this.isCellLocked(m[A])&&!this.model.isEdge(m[A])&&m[A]!=a)if(!this.model.isAncestor(a,m[A])&&this.isContainer(m[A])&&(null==u||m[A]==this.model.getParent(a)))u=m[A];else if(null==t&&this.isCellConnectable(m[A])&&!this.model.isAncestor(m[A],a)&&!this.isSwimlane(m[A])){var x=this.view.getState(m[A]);null==l||null==x||mxUtils.intersects(l,x)||(t=m[A])}}var G=
-!mxEvent.isShiftDown(k)||mxEvent.isControlDown(k)||f;G&&("1"!=urlParams.sketch||f)&&(b==mxConstants.DIRECTION_NORTH?n.y-=a.geometry.height/2:b==mxConstants.DIRECTION_SOUTH?n.y+=a.geometry.height/2:n.x=b==mxConstants.DIRECTION_WEST?n.x-a.geometry.width/2:n.x+a.geometry.width/2);var z=[],E=t,t=u;f=mxUtils.bind(this,function(d){if(null==p||null!=d||null==t&&e){this.model.beginUpdate();try{if(null==E&&G){var g=this.getAbsoluteParent(null!=d?d:a),g=e?a:this.getCompositeParent(g);E=null!=d?d:this.duplicateCells([g],
-!1)[0];null!=d&&this.addCells([E],this.model.getParent(a),null,null,null,!0);var f=this.getCellGeometry(E);null!=f&&(null!=d&&"1"==urlParams.sketch&&(b==mxConstants.DIRECTION_NORTH?n.y-=f.height/2:b==mxConstants.DIRECTION_SOUTH?n.y+=f.height/2:n.x=b==mxConstants.DIRECTION_WEST?n.x-f.width/2:n.x+f.width/2),f.x=n.x-f.width/2,f.y=n.y-f.height/2);null!=u?(this.addCells([E],u,null,null,null,!0),t=null):G&&!e&&this.addCells([E],this.getDefaultParent(),null,null,null,!0)}var l=mxEvent.isControlDown(k)&&
-mxEvent.isShiftDown(k)&&G||null==t&&e?null:this.insertEdge(this.model.getParent(a),null,"",a,E,this.createCurrentEdgeStyle());if(null!=l&&this.connectionHandler.insertBeforeSource){var q=null;for(d=a;null!=d.parent&&null!=d.geometry&&d.geometry.relative&&d.parent!=l.parent;)d=this.model.getParent(d);null!=d&&null!=d.parent&&d.parent==l.parent&&(q=d.parent.getIndex(d),this.model.add(d.parent,l,q))}null==t&&null!=E&&null!=a.parent&&e&&b==mxConstants.DIRECTION_WEST&&(q=a.parent.getIndex(a),this.model.add(a.parent,
-E,q));null!=l&&z.push(l);null==t&&null!=E&&z.push(E);null==E&&null!=l&&l.geometry.setTerminalPoint(n,!1);null!=l&&this.fireEvent(new mxEventObject("cellsInserted","cells",[l]))}finally{this.model.endUpdate()}}if(null!=c)c(z);else return z});if(null==p||null!=E||!G||null==t&&e)return f(E);p(g+n.x*d,q+n.y*d,f)};
-Graph.prototype.getIndexableText=function(){var a=document.createElement("div"),b=[],d,k;for(k in this.model.cells)if(d=this.model.cells[k],this.model.isVertex(d)||this.model.isEdge(d))this.isHtmlLabel(d)?(a.innerHTML=this.sanitizeHtml(this.getLabel(d)),d=mxUtils.extractTextWithWhitespace([a])):d=this.getLabel(d),d=mxUtils.trim(d.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")),0<d.length&&b.push(d);return b.join(" ")};
-Graph.prototype.convertValueToString=function(a){var b=this.model.getValue(a);if(null!=b&&"object"==typeof b){var d=null;if(this.isReplacePlaceholders(a)&&null!=a.getAttribute("placeholder"))for(var b=a.getAttribute("placeholder"),k=a;null==d&&null!=k;)null!=k.value&&"object"==typeof k.value&&(d=k.hasAttribute(b)?null!=k.getAttribute(b)?k.getAttribute(b):"":null),k=this.model.getParent(k);else d=null,Graph.translateDiagram&&null!=Graph.diagramLanguage&&(d=b.getAttribute("label_"+Graph.diagramLanguage)),
+!mxEvent.isShiftDown(g)||mxEvent.isControlDown(g)||f;G&&("1"!=urlParams.sketch||f)&&(b==mxConstants.DIRECTION_NORTH?n.y-=a.geometry.height/2:b==mxConstants.DIRECTION_SOUTH?n.y+=a.geometry.height/2:n.x=b==mxConstants.DIRECTION_WEST?n.x-a.geometry.width/2:n.x+a.geometry.width/2);var z=[],E=t,t=u;f=mxUtils.bind(this,function(d){if(null==p||null!=d||null==t&&e){this.model.beginUpdate();try{if(null==E&&G){var k=this.getAbsoluteParent(null!=d?d:a),k=e?a:this.getCompositeParent(k);E=null!=d?d:this.duplicateCells([k],
+!1)[0];null!=d&&this.addCells([E],this.model.getParent(a),null,null,null,!0);var f=this.getCellGeometry(E);null!=f&&(null!=d&&"1"==urlParams.sketch&&(b==mxConstants.DIRECTION_NORTH?n.y-=f.height/2:b==mxConstants.DIRECTION_SOUTH?n.y+=f.height/2:n.x=b==mxConstants.DIRECTION_WEST?n.x-f.width/2:n.x+f.width/2),f.x=n.x-f.width/2,f.y=n.y-f.height/2);null!=u?(this.addCells([E],u,null,null,null,!0),t=null):G&&!e&&this.addCells([E],this.getDefaultParent(),null,null,null,!0)}var l=mxEvent.isControlDown(g)&&
+mxEvent.isShiftDown(g)&&G||null==t&&e?null:this.insertEdge(this.model.getParent(a),null,"",a,E,this.createCurrentEdgeStyle());if(null!=l&&this.connectionHandler.insertBeforeSource){var q=null;for(d=a;null!=d.parent&&null!=d.geometry&&d.geometry.relative&&d.parent!=l.parent;)d=this.model.getParent(d);null!=d&&null!=d.parent&&d.parent==l.parent&&(q=d.parent.getIndex(d),this.model.add(d.parent,l,q))}null==t&&null!=E&&null!=a.parent&&e&&b==mxConstants.DIRECTION_WEST&&(q=a.parent.getIndex(a),this.model.add(a.parent,
+E,q));null!=l&&z.push(l);null==t&&null!=E&&z.push(E);null==E&&null!=l&&l.geometry.setTerminalPoint(n,!1);null!=l&&this.fireEvent(new mxEventObject("cellsInserted","cells",[l]))}finally{this.model.endUpdate()}}if(null!=c)c(z);else return z});if(null==p||null!=E||!G||null==t&&e)return f(E);p(k+n.x*d,q+n.y*d,f)};
+Graph.prototype.getIndexableText=function(){var a=document.createElement("div"),b=[],d,g;for(g in this.model.cells)if(d=this.model.cells[g],this.model.isVertex(d)||this.model.isEdge(d))this.isHtmlLabel(d)?(a.innerHTML=this.sanitizeHtml(this.getLabel(d)),d=mxUtils.extractTextWithWhitespace([a])):d=this.getLabel(d),d=mxUtils.trim(d.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")),0<d.length&&b.push(d);return b.join(" ")};
+Graph.prototype.convertValueToString=function(a){var b=this.model.getValue(a);if(null!=b&&"object"==typeof b){var d=null;if(this.isReplacePlaceholders(a)&&null!=a.getAttribute("placeholder"))for(var b=a.getAttribute("placeholder"),g=a;null==d&&null!=g;)null!=g.value&&"object"==typeof g.value&&(d=g.hasAttribute(b)?null!=g.getAttribute(b)?g.getAttribute(b):"":null),g=this.model.getParent(g);else d=null,Graph.translateDiagram&&null!=Graph.diagramLanguage&&(d=b.getAttribute("label_"+Graph.diagramLanguage)),
null==d&&(d=b.getAttribute("label")||"");return d||""}return mxGraph.prototype.convertValueToString.apply(this,arguments)};Graph.prototype.getLinksForState=function(a){return null!=a&&null!=a.text&&null!=a.text.node?a.text.node.getElementsByTagName("a"):null};Graph.prototype.getLinkForCell=function(a){return null!=a.value&&"object"==typeof a.value?(a=a.value.getAttribute("link"),null!=a&&"javascript:"===a.toLowerCase().substring(0,11)&&(a=a.substring(11)),a):null};
Graph.prototype.getLinkTargetForCell=function(a){return null!=a.value&&"object"==typeof a.value?a.value.getAttribute("linkTarget"):null};Graph.prototype.getCellStyle=function(a){var b=mxGraph.prototype.getCellStyle.apply(this,arguments);if(null!=a&&null!=this.layoutManager){var d=this.model.getParent(a);this.model.isVertex(d)&&this.isCellCollapsed(a)&&(d=this.layoutManager.getLayout(d),null!=d&&d.constructor==mxStackLayout&&(b[mxConstants.STYLE_HORIZONTAL]=!d.horizontal))}return b};
-Graph.prototype.updateAlternateBounds=function(a,b,d){if(null!=a&&null!=b&&null!=this.layoutManager&&null!=b.alternateBounds){var k=this.layoutManager.getLayout(this.model.getParent(a));null!=k&&k.constructor==mxStackLayout&&(k.horizontal?b.alternateBounds.height=0:b.alternateBounds.width=0)}mxGraph.prototype.updateAlternateBounds.apply(this,arguments)};Graph.prototype.isMoveCellsEvent=function(a,b){return mxEvent.isShiftDown(a)||"1"==mxUtils.getValue(b.style,"moveCells","0")};
-Graph.prototype.foldCells=function(a,b,d,k,f){b=null!=b?b:!1;null==d&&(d=this.getFoldableCells(this.getSelectionCells(),a));if(null!=d){this.model.beginUpdate();try{if(mxGraph.prototype.foldCells.apply(this,arguments),null!=this.layoutManager)for(var m=0;m<d.length;m++){var p=this.view.getState(d[m]),c=this.getCellGeometry(d[m]);if(null!=p&&null!=c){var e=Math.round(c.width-p.width/this.view.scale),g=Math.round(c.height-p.height/this.view.scale);if(0!=g||0!=e){var n=this.model.getParent(d[m]),l=this.layoutManager.getLayout(n);
-null==l?null!=f&&this.isMoveCellsEvent(f,p)&&this.moveSiblings(p,n,e,g):null!=f&&mxEvent.isAltDown(f)||l.constructor!=mxStackLayout||l.resizeLast||this.resizeParentStacks(n,l,e,g)}}}}finally{this.model.endUpdate()}this.isEnabled()&&this.setSelectionCells(d)}};
-Graph.prototype.moveSiblings=function(a,b,d,k){this.model.beginUpdate();try{var f=this.getCellsBeyond(a.x,a.y,b,!0,!0);for(b=0;b<f.length;b++)if(f[b]!=a.cell){var m=this.view.getState(f[b]),p=this.getCellGeometry(f[b]);null!=m&&null!=p&&(p=p.clone(),p.translate(Math.round(d*Math.max(0,Math.min(1,(m.x-a.x)/a.width))),Math.round(k*Math.max(0,Math.min(1,(m.y-a.y)/a.height)))),this.model.setGeometry(f[b],p))}}finally{this.model.endUpdate()}};
-Graph.prototype.resizeParentStacks=function(a,b,d,k){if(null!=this.layoutManager&&null!=b&&b.constructor==mxStackLayout&&!b.resizeLast){this.model.beginUpdate();try{for(var f=b.horizontal;null!=a&&null!=b&&b.constructor==mxStackLayout&&b.horizontal==f&&!b.resizeLast;){var m=this.getCellGeometry(a),p=this.view.getState(a);null!=p&&null!=m&&(m=m.clone(),b.horizontal?m.width+=d+Math.min(0,p.width/this.view.scale-m.width):m.height+=k+Math.min(0,p.height/this.view.scale-m.height),this.model.setGeometry(a,
+Graph.prototype.updateAlternateBounds=function(a,b,d){if(null!=a&&null!=b&&null!=this.layoutManager&&null!=b.alternateBounds){var g=this.layoutManager.getLayout(this.model.getParent(a));null!=g&&g.constructor==mxStackLayout&&(g.horizontal?b.alternateBounds.height=0:b.alternateBounds.width=0)}mxGraph.prototype.updateAlternateBounds.apply(this,arguments)};Graph.prototype.isMoveCellsEvent=function(a,b){return mxEvent.isShiftDown(a)||"1"==mxUtils.getValue(b.style,"moveCells","0")};
+Graph.prototype.foldCells=function(a,b,d,g,f){b=null!=b?b:!1;null==d&&(d=this.getFoldableCells(this.getSelectionCells(),a));if(null!=d){this.model.beginUpdate();try{if(mxGraph.prototype.foldCells.apply(this,arguments),null!=this.layoutManager)for(var m=0;m<d.length;m++){var p=this.view.getState(d[m]),c=this.getCellGeometry(d[m]);if(null!=p&&null!=c){var e=Math.round(c.width-p.width/this.view.scale),k=Math.round(c.height-p.height/this.view.scale);if(0!=k||0!=e){var n=this.model.getParent(d[m]),l=this.layoutManager.getLayout(n);
+null==l?null!=f&&this.isMoveCellsEvent(f,p)&&this.moveSiblings(p,n,e,k):null!=f&&mxEvent.isAltDown(f)||l.constructor!=mxStackLayout||l.resizeLast||this.resizeParentStacks(n,l,e,k)}}}}finally{this.model.endUpdate()}this.isEnabled()&&this.setSelectionCells(d)}};
+Graph.prototype.moveSiblings=function(a,b,d,g){this.model.beginUpdate();try{var f=this.getCellsBeyond(a.x,a.y,b,!0,!0);for(b=0;b<f.length;b++)if(f[b]!=a.cell){var m=this.view.getState(f[b]),p=this.getCellGeometry(f[b]);null!=m&&null!=p&&(p=p.clone(),p.translate(Math.round(d*Math.max(0,Math.min(1,(m.x-a.x)/a.width))),Math.round(g*Math.max(0,Math.min(1,(m.y-a.y)/a.height)))),this.model.setGeometry(f[b],p))}}finally{this.model.endUpdate()}};
+Graph.prototype.resizeParentStacks=function(a,b,d,g){if(null!=this.layoutManager&&null!=b&&b.constructor==mxStackLayout&&!b.resizeLast){this.model.beginUpdate();try{for(var f=b.horizontal;null!=a&&null!=b&&b.constructor==mxStackLayout&&b.horizontal==f&&!b.resizeLast;){var m=this.getCellGeometry(a),p=this.view.getState(a);null!=p&&null!=m&&(m=m.clone(),b.horizontal?m.width+=d+Math.min(0,p.width/this.view.scale-m.width):m.height+=g+Math.min(0,p.height/this.view.scale-m.height),this.model.setGeometry(a,
m));a=this.model.getParent(a);b=this.layoutManager.getLayout(a)}}finally{this.model.endUpdate()}}};Graph.prototype.isContainer=function(a){var b=this.getCurrentCellStyle(a);return this.isSwimlane(a)?"0"!=b.container:"1"==b.container};Graph.prototype.isCellConnectable=function(a){var b=this.getCurrentCellStyle(a);return null!=b.connectable?"0"!=b.connectable:mxGraph.prototype.isCellConnectable.apply(this,arguments)};
Graph.prototype.isLabelMovable=function(a){var b=this.getCurrentCellStyle(a);return null!=b.movableLabel?"0"!=b.movableLabel:mxGraph.prototype.isLabelMovable.apply(this,arguments)};Graph.prototype.selectAll=function(a){a=a||this.getDefaultParent();this.isCellLocked(a)||mxGraph.prototype.selectAll.apply(this,arguments)};Graph.prototype.selectCells=function(a,b,d){d=d||this.getDefaultParent();this.isCellLocked(d)||mxGraph.prototype.selectCells.apply(this,arguments)};
-Graph.prototype.getSwimlaneAt=function(a,b,d){var k=mxGraph.prototype.getSwimlaneAt.apply(this,arguments);this.isCellLocked(k)&&(k=null);return k};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,d){var g=mxGraph.prototype.getSwimlaneAt.apply(this,arguments);this.isCellLocked(g)&&(g=null);return g};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 d=this.container.clientWidth-b,k=this.container.clientHeight-b,f=Math.floor(20*Math.min(d/a.width,k/a.height))/20;this.zoomTo(f);if(mxUtils.hasScrollbars(this.container)){var m=this.view.translate;this.container.scrollTop=(a.y+m.y)*f-Math.max((k-a.height*f)/2+b/2,0);this.container.scrollLeft=(a.x+m.x)*f-Math.max((d-a.width*f)/2+b/2,0)}};
-Graph.prototype.getTooltipForCell=function(a){var b="";if(mxUtils.isNode(a.value)){var d=null;Graph.translateDiagram&&null!=Graph.diagramLanguage&&(d=a.value.getAttribute("tooltip_"+Graph.diagramLanguage));null==d&&(d=a.value.getAttribute("tooltip"));if(null!=d)null!=d&&this.isReplacePlaceholders(a)&&(d=this.replacePlaceholders(a,d)),b=this.sanitizeHtml(d);else{d=this.builtInProperties;a=a.value.attributes;var k=[];this.isEnabled()&&(d.push("linkTarget"),d.push("link"));for(var f=0;f<a.length;f++)0>
-mxUtils.indexOf(d,a[f].nodeName)&&0<a[f].nodeValue.length&&k.push({name:a[f].nodeName,value:a[f].nodeValue});k.sort(function(a,b){return a.name<b.name?-1:a.name>b.name?1:0});for(f=0;f<k.length;f++)"link"==k[f].name&&this.isCustomLink(k[f].value)||(b+=("link"!=k[f].name?"<b>"+k[f].name+":</b> ":"")+mxUtils.htmlEntities(k[f].value)+"\n");0<b.length&&(b=b.substring(0,b.length-1),mxClient.IS_SVG&&(b='<div style="max-width:360px;text-overflow:ellipsis;overflow:hidden;">'+b+"</div>"))}}return b};
+Graph.prototype.fitWindow=function(a,b){b=null!=b?b:10;var d=this.container.clientWidth-b,g=this.container.clientHeight-b,f=Math.floor(20*Math.min(d/a.width,g/a.height))/20;this.zoomTo(f);if(mxUtils.hasScrollbars(this.container)){var m=this.view.translate;this.container.scrollTop=(a.y+m.y)*f-Math.max((g-a.height*f)/2+b/2,0);this.container.scrollLeft=(a.x+m.x)*f-Math.max((d-a.width*f)/2+b/2,0)}};
+Graph.prototype.getTooltipForCell=function(a){var b="";if(mxUtils.isNode(a.value)){var d=null;Graph.translateDiagram&&null!=Graph.diagramLanguage&&(d=a.value.getAttribute("tooltip_"+Graph.diagramLanguage));null==d&&(d=a.value.getAttribute("tooltip"));if(null!=d)null!=d&&this.isReplacePlaceholders(a)&&(d=this.replacePlaceholders(a,d)),b=this.sanitizeHtml(d);else{d=this.builtInProperties;a=a.value.attributes;var g=[];this.isEnabled()&&(d.push("linkTarget"),d.push("link"));for(var f=0;f<a.length;f++)0>
+mxUtils.indexOf(d,a[f].nodeName)&&0<a[f].nodeValue.length&&g.push({name:a[f].nodeName,value:a[f].nodeValue});g.sort(function(a,b){return a.name<b.name?-1:a.name>b.name?1:0});for(f=0;f<g.length;f++)"link"==g[f].name&&this.isCustomLink(g[f].value)||(b+=("link"!=g[f].name?"<b>"+g[f].name+":</b> ":"")+mxUtils.htmlEntities(g[f].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){this.graph=a;this.init()};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;
@@ -2424,9 +2425,9 @@ 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"));this.arrowRight=this.createArrow(this.triangleRight,mxResources.get("plusTooltip"));this.arrowDown=this.createArrow(this.triangleDown,mxResources.get("plusTooltip"));this.arrowLeft=this.createArrow(this.triangleLeft,mxResources.get("plusTooltip"));this.elts=[this.arrowUp,this.arrowRight,this.arrowDown,this.arrowLeft];this.resetHandler=mxUtils.bind(this,function(){this.reset()});this.repaintHandler=
mxUtils.bind(this,function(){this.repaint()});this.graph.selectionModel.addListener(mxEvent.CHANGE,this.resetHandler);this.graph.model.addListener(mxEvent.CHANGE,this.repaintHandler);this.graph.view.addListener(mxEvent.SCALE_AND_TRANSLATE,this.repaintHandler);this.graph.view.addListener(mxEvent.TRANSLATE,this.repaintHandler);this.graph.view.addListener(mxEvent.SCALE,this.repaintHandler);this.graph.view.addListener(mxEvent.DOWN,this.repaintHandler);this.graph.view.addListener(mxEvent.UP,this.repaintHandler);
this.graph.addListener(mxEvent.ROOT,this.repaintHandler);this.graph.addListener(mxEvent.ESCAPE,this.resetHandler);mxEvent.addListener(this.graph.container,"scroll",this.resetHandler);this.graph.addListener(mxEvent.ESCAPE,mxUtils.bind(this,function(){this.mouseDownPoint=null}));mxEvent.addListener(this.graph.container,"mouseleave",mxUtils.bind(this,function(a){null!=a.relatedTarget&&mxEvent.getSource(a)==this.graph.container&&this.setDisplay("none")}));this.graph.addListener(mxEvent.START_EDITING,
-mxUtils.bind(this,function(a){this.reset()}));var a=this.graph.click;this.graph.click=mxUtils.bind(this,function(b){a.apply(this.graph,arguments);null==this.currentState||this.graph.isCellSelected(this.currentState.cell)||!mxEvent.isTouchEvent(b.getEvent())||this.graph.model.isVertex(b.getCell())||this.reset()});var b=!1;this.graph.addMouseListener({mouseDown:mxUtils.bind(this,function(a,k){b=!1;var d=k.getEvent();if(this.isResetEvent(d))this.reset();else if(!this.isActive()){var m=this.getState(k.getState());
-null==m&&mxEvent.isTouchEvent(d)||this.update(m)}this.setDisplay("none")}),mouseMove:mxUtils.bind(this,function(a,k){var d=k.getEvent();this.isResetEvent(d)?this.reset():this.graph.isMouseDown||mxEvent.isTouchEvent(d)||this.update(this.getState(k.getState()),k.getGraphX(),k.getGraphY());null!=this.graph.connectionHandler&&null!=this.graph.connectionHandler.shape&&(b=!0)}),mouseUp:mxUtils.bind(this,function(a,k){var d=k.getEvent();mxUtils.convertPoint(this.graph.container,mxEvent.getClientX(d),mxEvent.getClientY(d));
-this.isResetEvent(d)?this.reset():this.isActive()&&!b&&null!=this.mouseDownPoint?this.click(this.currentState,this.getDirection(),k):this.isActive()?1==this.graph.getSelectionCount()&&this.graph.model.isEdge(this.graph.getSelectionCell())?this.reset():this.update(this.getState(this.graph.view.getState(this.graph.getCellAt(k.getGraphX(),k.getGraphY())))):mxEvent.isTouchEvent(d)||null!=this.bbox&&mxUtils.contains(this.bbox,k.getGraphX(),k.getGraphY())?(this.setDisplay(""),this.repaint()):mxEvent.isTouchEvent(d)||
+mxUtils.bind(this,function(a){this.reset()}));var a=this.graph.click;this.graph.click=mxUtils.bind(this,function(b){a.apply(this.graph,arguments);null==this.currentState||this.graph.isCellSelected(this.currentState.cell)||!mxEvent.isTouchEvent(b.getEvent())||this.graph.model.isVertex(b.getCell())||this.reset()});var b=!1;this.graph.addMouseListener({mouseDown:mxUtils.bind(this,function(a,g){b=!1;var d=g.getEvent();if(this.isResetEvent(d))this.reset();else if(!this.isActive()){var m=this.getState(g.getState());
+null==m&&mxEvent.isTouchEvent(d)||this.update(m)}this.setDisplay("none")}),mouseMove:mxUtils.bind(this,function(a,g){var d=g.getEvent();this.isResetEvent(d)?this.reset():this.graph.isMouseDown||mxEvent.isTouchEvent(d)||this.update(this.getState(g.getState()),g.getGraphX(),g.getGraphY());null!=this.graph.connectionHandler&&null!=this.graph.connectionHandler.shape&&(b=!0)}),mouseUp:mxUtils.bind(this,function(a,g){var d=g.getEvent();mxUtils.convertPoint(this.graph.container,mxEvent.getClientX(d),mxEvent.getClientY(d));
+this.isResetEvent(d)?this.reset():this.isActive()&&!b&&null!=this.mouseDownPoint?this.click(this.currentState,this.getDirection(),g):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(g.getGraphX(),g.getGraphY())))):mxEvent.isTouchEvent(d)||null!=this.bbox&&mxUtils.contains(this.bbox,g.getGraphX(),g.getGraphY())?(this.setDisplay(""),this.repaint()):mxEvent.isTouchEvent(d)||
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){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(a){null==this.currentState||this.isResetEvent(a)||(this.mouseDownPoint=mxUtils.convertPoint(this.graph.container,mxEvent.getClientX(a),mxEvent.getClientY(a)),this.drag(a,this.mouseDownPoint.x,
this.mouseDownPoint.y),this.activeArrow=d,this.setDisplay("none"),mxEvent.consume(a))}));mxEvent.redirectMouseEvents(d,this.graph,this.currentState);mxEvent.addListener(d,"mouseenter",mxUtils.bind(this,function(a){mxEvent.isMouseEvent(a)&&(null!=this.activeArrow&&this.activeArrow!=d&&mxUtils.setOpacity(this.activeArrow,this.inactiveOpacity),this.graph.connectionHandler.constraintHandler.reset(),mxUtils.setOpacity(d,100),this.activeArrow=d)}));mxEvent.addListener(d,"mouseleave",mxUtils.bind(this,function(a){this.graph.isMouseDown||
@@ -2434,141 +2435,141 @@ this.resetActiveArrow()}));return d};HoverIcons.prototype.resetActiveArrow=funct
HoverIcons.prototype.visitNodes=function(a){for(var b=0;b<this.elts.length;b++)null!=this.elts[b]&&a(this.elts[b])};HoverIcons.prototype.removeNodes=function(){this.visitNodes(function(a){null!=a.parentNode&&a.parentNode.removeChild(a)})};HoverIcons.prototype.setDisplay=function(a){this.visitNodes(function(b){b.style.display=a})};HoverIcons.prototype.isActive=function(){return null!=this.activeArrow&&null!=this.currentState};
HoverIcons.prototype.drag=function(a,b,d){this.graph.popupMenuHandler.hideMenu();this.graph.stopEditing(!1);null!=this.currentState&&(this.graph.connectionHandler.start(this.currentState,b,d),this.graph.isMouseTrigger=mxEvent.isMouseEvent(a),this.graph.isMouseDown=!0,b=this.graph.selectionCellsHandler.getHandler(this.currentState.cell),null!=b&&b.setHandlesVisible(!1),b=this.graph.connectionHandler.edgeState,null!=a&&mxEvent.isShiftDown(a)&&mxEvent.isControlDown(a)&&null!=b&&"orthogonalEdgeStyle"===
mxUtils.getValue(b.style,mxConstants.STYLE_EDGE,null)&&(a=this.getDirection(),b.cell.style=mxUtils.setStyle(b.cell.style,"sourcePortConstraint",a),b.style.sourcePortConstraint=a))};HoverIcons.prototype.getStateAt=function(a,b,d){return this.graph.view.getState(this.graph.getCellAt(b,d))};
-HoverIcons.prototype.click=function(a,b,d){var k=d.getEvent(),f=d.getGraphX(),m=d.getGraphY(),f=this.getStateAt(a,f,m);null==f||!this.graph.model.isEdge(f.cell)||this.graph.isCloneEvent(k)||f.getVisibleTerminalState(!0)!=a&&f.getVisibleTerminalState(!1)!=a?null!=a&&this.execute(a,b,d):(this.graph.setSelectionCell(f.cell),this.reset());d.consume()};
+HoverIcons.prototype.click=function(a,b,d){var g=d.getEvent(),f=d.getGraphX(),m=d.getGraphY(),f=this.getStateAt(a,f,m);null==f||!this.graph.model.isEdge(f.cell)||this.graph.isCloneEvent(g)||f.getVisibleTerminalState(!0)!=a&&f.getVisibleTerminalState(!1)!=a?null!=a&&this.execute(a,b,d):(this.graph.setSelectionCell(f.cell),this.reset());d.consume()};
HoverIcons.prototype.execute=function(a,b,d){d=d.getEvent();this.graph.selectCellsForConnectVertex(this.graph.connectVertex(a.cell,b,this.graph.defaultEdgeLength,d,this.graph.isCloneEvent(d),this.graph.isCloneEvent(d)),d,this)};HoverIcons.prototype.reset=function(a){null!=a&&!a||null==this.updateThread||window.clearTimeout(this.updateThread);this.activeArrow=this.currentState=this.mouseDownPoint=null;this.removeNodes();this.bbox=null};
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 d=null;null!=b&&(a.x-=b.horizontalOffset/2,a.y-=b.verticalOffset/2,a.width+=b.horizontalOffset,a.height+=b.verticalOffset,null!=b.rotationShape&&null!=b.rotationShape.node&&"hidden"!=b.rotationShape.node.style.visibility&&"none"!=b.rotationShape.node.style.display&&null!=b.rotationShape.boundingBox&&
(d=b.rotationShape.boundingBox));b=mxUtils.bind(this,function(a,e,b){if(null!=d){var c=new mxRectangle(e,b,a.clientWidth,a.clientHeight);mxUtils.intersects(c,d)&&(a==this.arrowUp?b-=c.y+c.height-d.y:a==this.arrowRight?e+=d.x+d.width-c.x:a==this.arrowDown?b+=d.y+d.height-c.y:a==this.arrowLeft&&(e-=c.x+c.width-d.x))}a.style.left=e+"px";a.style.top=b+"px";mxUtils.setOpacity(a,this.inactiveOpacity)});b(this.arrowUp,Math.round(this.currentState.getCenterX()-this.triangleUp.width/2-this.tolerance),Math.round(a.y-
this.triangleUp.height-this.tolerance));b(this.arrowRight,Math.round(a.x+a.width-this.tolerance),Math.round(this.currentState.getCenterY()-this.triangleRight.height/2-this.tolerance));b(this.arrowDown,parseInt(this.arrowUp.style.left),Math.round(a.y+a.height-this.tolerance));b(this.arrowLeft,Math.round(a.x-this.triangleLeft.width-this.tolerance),parseInt(this.arrowRight.style.top));if(this.checkCollisions){var b=this.graph.getCellAt(a.x+a.width+this.triangleRight.width/2,this.currentState.getCenterY()),
-k=this.graph.getCellAt(a.x-this.triangleLeft.width/2,this.currentState.getCenterY()),f=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==k&&k==f&&f==a&&(a=f=k=b=null);var m=this.graph.getCellGeometry(this.currentState.cell),p=mxUtils.bind(this,function(a,e){var c=this.graph.model.isVertex(a)&&this.graph.getCellGeometry(a);null==a||this.graph.model.isAncestor(a,
-this.currentState.cell)||this.graph.isSwimlane(a)||!(null==c||null==m||c.height<3*m.height&&c.width<3*m.width)?e.style.visibility="visible":e.style.visibility="hidden"});p(b,this.arrowRight);p(k,this.arrowLeft);p(f,this.arrowUp);p(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")),
+g=this.graph.getCellAt(a.x-this.triangleLeft.width/2,this.currentState.getCenterY()),f=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==g&&g==f&&f==a&&(a=f=g=b=null);var m=this.graph.getCellGeometry(this.currentState.cell),p=mxUtils.bind(this,function(a,e){var c=this.graph.model.isVertex(a)&&this.graph.getCellGeometry(a);null==a||this.graph.model.isAncestor(a,
+this.currentState.cell)||this.graph.isSwimlane(a)||!(null==c||null==m||c.height<3*m.height&&c.width<3*m.width)?e.style.visibility="visible":e.style.visibility="hidden"});p(b,this.arrowRight);p(g,this.arrowLeft);p(f,this.arrowUp);p(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,d){if(!this.graph.connectionArrowsEnabled||null!=a&&"0"==mxUtils.getValue(a.style,"allowArrows","1"))this.reset();else{null!=a&&null!=a.cell.geometry&&a.cell.geometry.relative&&this.graph.model.isEdge(a.cell.parent)&&(a=null);var k=null;this.prev!=a||this.isActive()?(this.startTime=(new Date).getTime(),this.prev=a,k=0,null!=this.updateThread&&window.clearTimeout(this.updateThread),null!=a&&(this.updateThread=window.setTimeout(mxUtils.bind(this,function(){this.isActive()||
-this.graph.isMouseDown||this.graph.panningHandler.isActive()||(this.prev=a,this.update(a,b,d))}),this.updateDelay+10))):null!=this.startTime&&(k=(new Date).getTime()-this.startTime);this.setDisplay("");null!=this.currentState&&this.currentState!=a&&k<this.activationDelay&&null!=this.bbox&&!mxUtils.contains(this.bbox,b,d)?this.reset(!1):(null!=this.currentState||k>this.activationDelay)&&this.currentState!=a&&(k>this.updateDelay&&null!=a||null==this.bbox||null==b||null==d||!mxUtils.contains(this.bbox,
+HoverIcons.prototype.update=function(a,b,d){if(!this.graph.connectionArrowsEnabled||null!=a&&"0"==mxUtils.getValue(a.style,"allowArrows","1"))this.reset();else{null!=a&&null!=a.cell.geometry&&a.cell.geometry.relative&&this.graph.model.isEdge(a.cell.parent)&&(a=null);var g=null;this.prev!=a||this.isActive()?(this.startTime=(new Date).getTime(),this.prev=a,g=0,null!=this.updateThread&&window.clearTimeout(this.updateThread),null!=a&&(this.updateThread=window.setTimeout(mxUtils.bind(this,function(){this.isActive()||
+this.graph.isMouseDown||this.graph.panningHandler.isActive()||(this.prev=a,this.update(a,b,d))}),this.updateDelay+10))):null!=this.startTime&&(g=(new Date).getTime()-this.startTime);this.setDisplay("");null!=this.currentState&&this.currentState!=a&&g<this.activationDelay&&null!=this.bbox&&!mxUtils.contains(this.bbox,b,d)?this.reset(!1):(null!=this.currentState||g>this.activationDelay)&&this.currentState!=a&&(g>this.updateDelay&&null!=a||null==this.bbox||null==b||null==d||!mxUtils.contains(this.bbox,
b,d))&&(null!=a&&this.graph.isEnabled()?(this.removeNodes(),this.setCurrentState(a),this.repaint(),this.graph.connectionHandler.constraintHandler.currentFocus!=a&&this.graph.connectionHandler.constraintHandler.reset()):this.reset())}};
-HoverIcons.prototype.setCurrentState=function(a){"eastwest"!=a.style.portConstraint&&(this.graph.container.appendChild(this.arrowUp),this.graph.container.appendChild(this.arrowDown));this.graph.container.appendChild(this.arrowRight);this.graph.container.appendChild(this.arrowLeft);this.currentState=a};Graph.prototype.createParent=function(a,b,d,k,f){a=this.cloneCell(a);for(var m=0;m<d;m++){var p=this.cloneCell(b),c=this.getCellGeometry(p);null!=c&&(c.x+=m*k,c.y+=m*f);a.insert(p)}return a};
-Graph.prototype.createTable=function(a,b,d,k,f,m,p,c,e){d=null!=d?d:60;k=null!=k?k:40;m=null!=m?m:30;c=null!=c?c:"shape=partialRectangle;collapsible=0;dropTarget=0;pointerEvents=0;fillColor=none;top=0;left=0;bottom=0;right=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;";e=null!=e?e:"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!=f?f:"",0,0,b*d,
-a*k+(null!=f?m:0),null!=p?p:"shape=table;startSize="+(null!=f?m:"0")+";container=1;collapsible=0;childLayout=tableLayout;"),this.createParent(this.createVertex(null,null,"",0,0,b*d,k,c),this.createVertex(null,null,"",0,0,d,k,e),b,d,0),a,0,k)};Graph.prototype.setTableValues=function(a,b,d){for(var k=this.model.getChildCells(a,!0),f=0;f<k.length;f++)if(null!=d&&(k[f].value=d[f]),null!=b)for(var m=this.model.getChildCells(k[f],!0),p=0;p<m.length;p++)null!=b[f][p]&&(m[p].value=b[f][p]);return a};
-Graph.prototype.createCrossFunctionalSwimlane=function(a,b,d,k,f,m,p,c,e){d=null!=d?d:120;k=null!=k?k:120;var g=null==f?0:40;p=null!=p?p:"swimlane;horizontal=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;startSize="+g+";collapsible=0;recursiveResize=0;expand=0;pointerEvents=0;";c=null!=c?c:"swimlane;connectable=0;startSize=40;collapsible=0;recursiveResize=0;expand=0;pointerEvents=0;";e=null!=e?e:"swimlane;connectable=0;startSize="+(null==f?"40":"0")+";collapsible=0;recursiveResize=0;expand=0;pointerEvents=0;";
-f=this.createVertex(null,null,null!=f?f:"",0,0,b*d,a*k,null!=m?m:"shape=table;childLayout=tableLayout;rowLines=0;columnLines=0;startSize="+g+";"+(null==f?"fillColor=none;":"")+"collapsible=0;recursiveResize=0;expand=0;pointerEvents=0;");m=mxUtils.getValue(this.getCellStyle(f),mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE);f.geometry.width+=m;f.geometry.height+=m;p=this.createVertex(null,null,"",0,m,b*d+m,k,p);f.insert(this.createParent(p,this.createVertex(null,null,"",m,0,d,k,c),b,d,0));
-return 1<a?(p.geometry.y=k+m,this.createParent(f,this.createParent(p,this.createVertex(null,null,"",m,0,d,k,e),b,d,0),a-1,0,k)):f};Graph.prototype.isTableCell=function(a){return this.model.isVertex(a)&&this.isTableRow(this.model.getParent(a))};Graph.prototype.isTableRow=function(a){return this.model.isVertex(a)&&this.isTable(this.model.getParent(a))};Graph.prototype.isTable=function(a){a=this.getCellStyle(a);return null!=a&&"tableLayout"==a.childLayout};
-Graph.prototype.setTableRowHeight=function(a,b,d){d=null!=d?d:!0;var k=this.getModel();k.beginUpdate();try{var f=this.getCellGeometry(a);if(null!=f){f=f.clone();f.height+=b;k.setGeometry(a,f);var m=k.getParent(a),p=k.getChildCells(m,!0);if(!d){var c=mxUtils.indexOf(p,a);if(c<p.length-1){var e=p[c+1],g=this.getCellGeometry(e);null!=g&&(g=g.clone(),g.y+=b,g.height-=b,k.setGeometry(e,g))}}var n=this.getCellGeometry(m);null!=n&&(d||(d=a==p[p.length-1]),d&&(n=n.clone(),n.height+=b,k.setGeometry(m,n)));
-null!=this.layoutManager&&this.layoutManager.executeLayout(m,!0)}}finally{k.endUpdate()}};
-Graph.prototype.setTableColumnWidth=function(a,b,d){d=null!=d?d:!1;var k=this.getModel(),f=k.getParent(a),m=k.getParent(f),p=k.getChildCells(f,!0);a=mxUtils.indexOf(p,a);var c=a==p.length-1;k.beginUpdate();try{for(var e=k.getChildCells(m,!0),g=0;g<e.length;g++){var f=e[g],p=k.getChildCells(f,!0),n=p[a],l=this.getCellGeometry(n);null!=l&&(l=l.clone(),l.width+=b,k.setGeometry(n,l));a<p.length-1&&(n=p[a+1],l=this.getCellGeometry(n),null!=l&&(l=l.clone(),l.x+=b,d||(l.width-=b),k.setGeometry(n,l)))}if(c||
-d){var q=this.getCellGeometry(m);null!=q&&(q=q.clone(),q.width+=b,k.setGeometry(m,q))}null!=this.layoutManager&&this.layoutManager.executeLayout(m,!0)}finally{k.endUpdate()}};function TableLayout(a){mxGraphLayout.call(this,a)}TableLayout.prototype=new mxStackLayout;TableLayout.prototype.constructor=TableLayout;TableLayout.prototype.isHorizontal=function(){return!1};TableLayout.prototype.isVertexIgnored=function(a){return!this.graph.getModel().isVertex(a)||!this.graph.isCellVisible(a)};
-TableLayout.prototype.getSize=function(a,b){for(var d=0,k=0;k<a.length;k++)if(!this.isVertexIgnored(a[k])){var f=this.graph.getCellGeometry(a[k]);null!=f&&(d+=b?f.width:f.height)}return d};TableLayout.prototype.getRowLayout=function(a,b){for(var d=this.graph.model.getChildCells(a,!0),k=this.graph.getActualStartSize(a,!0),f=this.getSize(d,!0),m=b-k.x-k.width,p=[],k=k.x,c=0;c<d.length;c++){var e=this.graph.getCellGeometry(d[c]);null!=e&&(k+=e.width*m/f,p.push(Math.round(k)))}return p};
-TableLayout.prototype.layoutRow=function(a,b,d,k){var f=this.graph.getModel(),m=f.getChildCells(a,!0);a=this.graph.getActualStartSize(a,!0);var p=a.x,c=0;null!=b&&(b=b.slice(),b.splice(0,0,a.x));for(var e=0;e<m.length;e++){var g=this.graph.getCellGeometry(m[e]);null!=g&&(g=g.clone(),g.y=a.y,g.height=d-a.y-a.height,null!=b?(g.x=b[e],g.width=b[e+1]-g.x,e==m.length-1&&e<b.length-2&&(g.width=k-g.x-a.x-a.width)):(g.x=p,p+=g.width,e==m.length-1?g.width=k-a.x-a.width-c:c+=g.width),f.setGeometry(m[e],g))}return c};
-TableLayout.prototype.execute=function(a){if(null!=a){var b=this.graph.getActualStartSize(a,!0),d=this.graph.getCellGeometry(a),k=this.graph.getCellStyle(a),f="1"==mxUtils.getValue(k,"resizeLastRow","0"),m="1"==mxUtils.getValue(k,"resizeLast","0"),k="1"==mxUtils.getValue(k,"fixedRows","0"),p=this.graph.getModel(),c=0;p.beginUpdate();try{var e=d.height-b.y-b.height,g=d.width-b.x-b.width,n=p.getChildCells(a,!0),l=this.getSize(n,!1);if(0<e&&0<g&&0<n.length&&0<l){if(f){var q=this.graph.getCellGeometry(n[n.length-
-1]);null!=q&&(q=q.clone(),q.height=e-l+q.height,p.setGeometry(n[n.length-1],q))}for(var u=m?null:this.getRowLayout(n[0],g),t=b.y,A=0;A<n.length;A++)q=this.graph.getCellGeometry(n[A]),null!=q&&(q=q.clone(),q.x=b.x,q.width=g,q.y=Math.round(t),t=f||k?t+q.height:t+q.height/l*e,q.height=Math.round(t)-q.y,p.setGeometry(n[A],q)),c=Math.max(c,this.layoutRow(n[A],u,q.height,g));k&&e<l&&(d=d.clone(),d.height=t+b.height,p.setGeometry(a,d));m&&g<c+Graph.minTableColumnWidth&&(d=d.clone(),d.width=c+b.width+b.x+
+HoverIcons.prototype.setCurrentState=function(a){"eastwest"!=a.style.portConstraint&&(this.graph.container.appendChild(this.arrowUp),this.graph.container.appendChild(this.arrowDown));this.graph.container.appendChild(this.arrowRight);this.graph.container.appendChild(this.arrowLeft);this.currentState=a};Graph.prototype.createParent=function(a,b,d,g,f){a=this.cloneCell(a);for(var m=0;m<d;m++){var p=this.cloneCell(b),c=this.getCellGeometry(p);null!=c&&(c.x+=m*g,c.y+=m*f);a.insert(p)}return a};
+Graph.prototype.createTable=function(a,b,d,g,f,m,p,c,e){d=null!=d?d:60;g=null!=g?g:40;m=null!=m?m:30;c=null!=c?c:"shape=partialRectangle;collapsible=0;dropTarget=0;pointerEvents=0;fillColor=none;top=0;left=0;bottom=0;right=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;";e=null!=e?e:"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!=f?f:"",0,0,b*d,
+a*g+(null!=f?m:0),null!=p?p:"shape=table;startSize="+(null!=f?m:"0")+";container=1;collapsible=0;childLayout=tableLayout;"),this.createParent(this.createVertex(null,null,"",0,0,b*d,g,c),this.createVertex(null,null,"",0,0,d,g,e),b,d,0),a,0,g)};Graph.prototype.setTableValues=function(a,b,d){for(var g=this.model.getChildCells(a,!0),f=0;f<g.length;f++)if(null!=d&&(g[f].value=d[f]),null!=b)for(var m=this.model.getChildCells(g[f],!0),p=0;p<m.length;p++)null!=b[f][p]&&(m[p].value=b[f][p]);return a};
+Graph.prototype.createCrossFunctionalSwimlane=function(a,b,d,g,f,m,p,c,e){d=null!=d?d:120;g=null!=g?g:120;var k=null==f?0:40;p=null!=p?p:"swimlane;horizontal=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;startSize="+k+";collapsible=0;recursiveResize=0;expand=0;pointerEvents=0;";c=null!=c?c:"swimlane;connectable=0;startSize=40;collapsible=0;recursiveResize=0;expand=0;pointerEvents=0;";e=null!=e?e:"swimlane;connectable=0;startSize="+(null==f?"40":"0")+";collapsible=0;recursiveResize=0;expand=0;pointerEvents=0;";
+f=this.createVertex(null,null,null!=f?f:"",0,0,b*d,a*g,null!=m?m:"shape=table;childLayout=tableLayout;rowLines=0;columnLines=0;startSize="+k+";"+(null==f?"fillColor=none;":"")+"collapsible=0;recursiveResize=0;expand=0;pointerEvents=0;");m=mxUtils.getValue(this.getCellStyle(f),mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE);f.geometry.width+=m;f.geometry.height+=m;p=this.createVertex(null,null,"",0,m,b*d+m,g,p);f.insert(this.createParent(p,this.createVertex(null,null,"",m,0,d,g,c),b,d,0));
+return 1<a?(p.geometry.y=g+m,this.createParent(f,this.createParent(p,this.createVertex(null,null,"",m,0,d,g,e),b,d,0),a-1,0,g)):f};Graph.prototype.isTableCell=function(a){return this.model.isVertex(a)&&this.isTableRow(this.model.getParent(a))};Graph.prototype.isTableRow=function(a){return this.model.isVertex(a)&&this.isTable(this.model.getParent(a))};Graph.prototype.isTable=function(a){a=this.getCellStyle(a);return null!=a&&"tableLayout"==a.childLayout};
+Graph.prototype.setTableRowHeight=function(a,b,d){d=null!=d?d:!0;var g=this.getModel();g.beginUpdate();try{var f=this.getCellGeometry(a);if(null!=f){f=f.clone();f.height+=b;g.setGeometry(a,f);var m=g.getParent(a),p=g.getChildCells(m,!0);if(!d){var c=mxUtils.indexOf(p,a);if(c<p.length-1){var e=p[c+1],k=this.getCellGeometry(e);null!=k&&(k=k.clone(),k.y+=b,k.height-=b,g.setGeometry(e,k))}}var n=this.getCellGeometry(m);null!=n&&(d||(d=a==p[p.length-1]),d&&(n=n.clone(),n.height+=b,g.setGeometry(m,n)));
+null!=this.layoutManager&&this.layoutManager.executeLayout(m,!0)}}finally{g.endUpdate()}};
+Graph.prototype.setTableColumnWidth=function(a,b,d){d=null!=d?d:!1;var g=this.getModel(),f=g.getParent(a),m=g.getParent(f),p=g.getChildCells(f,!0);a=mxUtils.indexOf(p,a);var c=a==p.length-1;g.beginUpdate();try{for(var e=g.getChildCells(m,!0),k=0;k<e.length;k++){var f=e[k],p=g.getChildCells(f,!0),n=p[a],l=this.getCellGeometry(n);null!=l&&(l=l.clone(),l.width+=b,g.setGeometry(n,l));a<p.length-1&&(n=p[a+1],l=this.getCellGeometry(n),null!=l&&(l=l.clone(),l.x+=b,d||(l.width-=b),g.setGeometry(n,l)))}if(c||
+d){var q=this.getCellGeometry(m);null!=q&&(q=q.clone(),q.width+=b,g.setGeometry(m,q))}null!=this.layoutManager&&this.layoutManager.executeLayout(m,!0)}finally{g.endUpdate()}};function TableLayout(a){mxGraphLayout.call(this,a)}TableLayout.prototype=new mxStackLayout;TableLayout.prototype.constructor=TableLayout;TableLayout.prototype.isHorizontal=function(){return!1};TableLayout.prototype.isVertexIgnored=function(a){return!this.graph.getModel().isVertex(a)||!this.graph.isCellVisible(a)};
+TableLayout.prototype.getSize=function(a,b){for(var d=0,g=0;g<a.length;g++)if(!this.isVertexIgnored(a[g])){var f=this.graph.getCellGeometry(a[g]);null!=f&&(d+=b?f.width:f.height)}return d};TableLayout.prototype.getRowLayout=function(a,b){for(var d=this.graph.model.getChildCells(a,!0),g=this.graph.getActualStartSize(a,!0),f=this.getSize(d,!0),m=b-g.x-g.width,p=[],g=g.x,c=0;c<d.length;c++){var e=this.graph.getCellGeometry(d[c]);null!=e&&(g+=e.width*m/f,p.push(Math.round(g)))}return p};
+TableLayout.prototype.layoutRow=function(a,b,d,g){var f=this.graph.getModel(),m=f.getChildCells(a,!0);a=this.graph.getActualStartSize(a,!0);var p=a.x,c=0;null!=b&&(b=b.slice(),b.splice(0,0,a.x));for(var e=0;e<m.length;e++){var k=this.graph.getCellGeometry(m[e]);null!=k&&(k=k.clone(),k.y=a.y,k.height=d-a.y-a.height,null!=b?(k.x=b[e],k.width=b[e+1]-k.x,e==m.length-1&&e<b.length-2&&(k.width=g-k.x-a.x-a.width)):(k.x=p,p+=k.width,e==m.length-1?k.width=g-a.x-a.width-c:c+=k.width),f.setGeometry(m[e],k))}return c};
+TableLayout.prototype.execute=function(a){if(null!=a){var b=this.graph.getActualStartSize(a,!0),d=this.graph.getCellGeometry(a),g=this.graph.getCellStyle(a),f="1"==mxUtils.getValue(g,"resizeLastRow","0"),m="1"==mxUtils.getValue(g,"resizeLast","0"),g="1"==mxUtils.getValue(g,"fixedRows","0"),p=this.graph.getModel(),c=0;p.beginUpdate();try{var e=d.height-b.y-b.height,k=d.width-b.x-b.width,n=p.getChildCells(a,!0),l=this.getSize(n,!1);if(0<e&&0<k&&0<n.length&&0<l){if(f){var q=this.graph.getCellGeometry(n[n.length-
+1]);null!=q&&(q=q.clone(),q.height=e-l+q.height,p.setGeometry(n[n.length-1],q))}for(var u=m?null:this.getRowLayout(n[0],k),t=b.y,A=0;A<n.length;A++)q=this.graph.getCellGeometry(n[A]),null!=q&&(q=q.clone(),q.x=b.x,q.width=k,q.y=Math.round(t),t=f||g?t+q.height:t+q.height/l*e,q.height=Math.round(t)-q.y,p.setGeometry(n[A],q)),c=Math.max(c,this.layoutRow(n[A],u,q.height,k));g&&e<l&&(d=d.clone(),d.height=t+b.height,p.setGeometry(a,d));m&&k<c+Graph.minTableColumnWidth&&(d=d.clone(),d.width=c+b.width+b.x+
Graph.minTableColumnWidth,p.setGeometry(a,d))}}finally{p.endUpdate()}}};
(function(){var a=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){a.apply(this,arguments);this.validEdges=[]};var b=mxGraphView.prototype.validateCellState;mxGraphView.prototype.validateCellState=function(a,c){c=null!=c?c:!0;var e=this.getState(a);null!=e&&c&&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=b.apply(this,
arguments);null!=e&&c&&this.graph.model.isEdge(e.cell)&&null!=e.style&&1!=e.style[mxConstants.STYLE_CURVED]&&this.validEdges.push(e);return e};var d=mxShape.prototype.paint;mxShape.prototype.paint=function(){d.apply(this,arguments);if(null!=this.state&&null!=this.node&&this.state.view.graph.enableFlowAnimation&&this.state.view.graph.model.isEdge(this.state.cell)&&"1"==mxUtils.getValue(this.state.style,"flowAnimation","0")){var a=this.node.getElementsByTagName("path");if(1<a.length){"1"!=mxUtils.getValue(this.state.style,
-mxConstants.STYLE_DASHED,"0")&&a[1].setAttribute("stroke-dasharray",8*this.state.view.scale);var c=this.state.view.graph.getFlowAnimationStyle();null!=c&&a[1].setAttribute("class",c.getAttribute("id"))}}};var k=mxCellRenderer.prototype.isShapeInvalid;mxCellRenderer.prototype.isShapeInvalid=function(a,c){return k.apply(this,arguments)||null!=a.routedPoints&&null!=c.routedPoints&&!mxUtils.equalPoints(c.routedPoints,a.routedPoints)};var f=mxGraphView.prototype.updateCellState;mxGraphView.prototype.updateCellState=
-function(a){f.apply(this,arguments);this.graph.model.isEdge(a.cell)&&1!=a.style[mxConstants.STYLE_CURVED]&&this.updateLineJumps(a)};mxGraphView.prototype.updateLineJumps=function(a){var c=a.absolutePoints;if(Graph.lineJumpsEnabled){var e=null!=a.routedPoints,b=null;if(null!=c&&null!=this.validEdges&&"none"!==mxUtils.getValue(a.style,"jumpStyle","none")){for(var d=function(c,e,d){var g=new mxPoint(e,d);g.type=c;b.push(g);g=null!=a.routedPoints?a.routedPoints[b.length-1]:null;return null==g||g.type!=
-c||g.x!=e||g.y!=d},g=.5*this.scale,e=!1,b=[],f=0;f<c.length-1;f++){for(var k=c[f+1],n=c[f],m=[],p=c[f+2];f<c.length-2&&mxUtils.ptSegDistSq(n.x,n.y,p.x,p.y,k.x,k.y)<1*this.scale*this.scale;)k=p,f++,p=c[f+2];for(var e=d(0,n.x,n.y)||e,K=0;K<this.validEdges.length;K++){var F=this.validEdges[K],I=F.absolutePoints;if(null!=I&&mxUtils.intersects(a,F)&&"1"!=F.style.noJump)for(F=0;F<I.length-1;F++){for(var C=I[F+1],M=I[F],p=I[F+2];F<I.length-2&&mxUtils.ptSegDistSq(M.x,M.y,p.x,p.y,C.x,C.y)<1*this.scale*this.scale;)C=
-p,F++,p=I[F+2];p=mxUtils.intersection(n.x,n.y,k.x,k.y,M.x,M.y,C.x,C.y);if(null!=p&&(Math.abs(p.x-n.x)>g||Math.abs(p.y-n.y)>g)&&(Math.abs(p.x-k.x)>g||Math.abs(p.y-k.y)>g)&&(Math.abs(p.x-M.x)>g||Math.abs(p.y-M.y)>g)&&(Math.abs(p.x-C.x)>g||Math.abs(p.y-C.y)>g)){C=p.x-n.x;M=p.y-n.y;p={distSq:C*C+M*M,x:p.x,y:p.y};for(C=0;C<m.length;C++)if(m[C].distSq>p.distSq){m.splice(C,0,p);p=null;break}null==p||0!=m.length&&m[m.length-1].x===p.x&&m[m.length-1].y===p.y||m.push(p)}}}for(F=0;F<m.length;F++)e=d(1,m[F].x,
+mxConstants.STYLE_DASHED,"0")&&a[1].setAttribute("stroke-dasharray",8*this.state.view.scale);var c=this.state.view.graph.getFlowAnimationStyle();null!=c&&a[1].setAttribute("class",c.getAttribute("id"))}}};var g=mxCellRenderer.prototype.isShapeInvalid;mxCellRenderer.prototype.isShapeInvalid=function(a,c){return g.apply(this,arguments)||null!=a.routedPoints&&null!=c.routedPoints&&!mxUtils.equalPoints(c.routedPoints,a.routedPoints)};var f=mxGraphView.prototype.updateCellState;mxGraphView.prototype.updateCellState=
+function(a){f.apply(this,arguments);this.graph.model.isEdge(a.cell)&&1!=a.style[mxConstants.STYLE_CURVED]&&this.updateLineJumps(a)};mxGraphView.prototype.updateLineJumps=function(a){var c=a.absolutePoints;if(Graph.lineJumpsEnabled){var e=null!=a.routedPoints,b=null;if(null!=c&&null!=this.validEdges&&"none"!==mxUtils.getValue(a.style,"jumpStyle","none")){for(var d=function(c,e,d){var k=new mxPoint(e,d);k.type=c;b.push(k);k=null!=a.routedPoints?a.routedPoints[b.length-1]:null;return null==k||k.type!=
+c||k.x!=e||k.y!=d},k=.5*this.scale,e=!1,b=[],f=0;f<c.length-1;f++){for(var g=c[f+1],n=c[f],m=[],p=c[f+2];f<c.length-2&&mxUtils.ptSegDistSq(n.x,n.y,p.x,p.y,g.x,g.y)<1*this.scale*this.scale;)g=p,f++,p=c[f+2];for(var e=d(0,n.x,n.y)||e,K=0;K<this.validEdges.length;K++){var F=this.validEdges[K],I=F.absolutePoints;if(null!=I&&mxUtils.intersects(a,F)&&"1"!=F.style.noJump)for(F=0;F<I.length-1;F++){for(var D=I[F+1],M=I[F],p=I[F+2];F<I.length-2&&mxUtils.ptSegDistSq(M.x,M.y,p.x,p.y,D.x,D.y)<1*this.scale*this.scale;)D=
+p,F++,p=I[F+2];p=mxUtils.intersection(n.x,n.y,g.x,g.y,M.x,M.y,D.x,D.y);if(null!=p&&(Math.abs(p.x-n.x)>k||Math.abs(p.y-n.y)>k)&&(Math.abs(p.x-g.x)>k||Math.abs(p.y-g.y)>k)&&(Math.abs(p.x-M.x)>k||Math.abs(p.y-M.y)>k)&&(Math.abs(p.x-D.x)>k||Math.abs(p.y-D.y)>k)){D=p.x-n.x;M=p.y-n.y;p={distSq:D*D+M*M,x:p.x,y:p.y};for(D=0;D<m.length;D++)if(m[D].distSq>p.distSq){m.splice(D,0,p);p=null;break}null==p||0!=m.length&&m[m.length-1].x===p.x&&m[m.length-1].y===p.y||m.push(p)}}}for(F=0;F<m.length;F++)e=d(1,m[F].x,
m[F].y)||e}p=c[c.length-1];e=d(0,p.x,p.y)||e}a.routedPoints=b;return e}return!1};var m=mxConnector.prototype.paintLine;mxConnector.prototype.paintLine=function(a,c,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)m.apply(this,arguments);else{var b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2,d=(parseInt(mxUtils.getValue(this.style,
-"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,g=mxUtils.getValue(this.style,"jumpStyle","none"),f=!0,k=null,n=null,l=[],q=null;a.begin();for(var p=0;p<this.state.routedPoints.length;p++){var F=this.state.routedPoints[p],I=new mxPoint(F.x/this.scale,F.y/this.scale);0==p?I=c[0]:p==this.state.routedPoints.length-1&&(I=c[c.length-1]);var C=!1;if(null!=k&&1==F.type){var M=this.state.routedPoints[p+1],F=M.x/this.scale-I.x,M=M.y/this.scale-I.y,F=F*F+M*M;null==q&&(q=new mxPoint(I.x-k.x,I.y-k.y),
-n=Math.sqrt(q.x*q.x+q.y*q.y),0<n?(q.x=q.x*d/n,q.y=q.y*d/n):q=null);F>d*d&&0<n&&(F=k.x-I.x,M=k.y-I.y,F=F*F+M*M,F>d*d&&(C=new mxPoint(I.x-q.x,I.y-q.y),F=new mxPoint(I.x+q.x,I.y+q.y),l.push(C),this.addPoints(a,l,e,b,!1,null,f),l=0>Math.round(q.x)||0==Math.round(q.x)&&0>=Math.round(q.y)?1:-1,f=!1,"sharp"==g?(a.lineTo(C.x-q.y*l,C.y+q.x*l),a.lineTo(F.x-q.y*l,F.y+q.x*l),a.lineTo(F.x,F.y)):"line"==g?(a.moveTo(C.x+q.y*l,C.y-q.x*l),a.lineTo(C.x-q.y*l,C.y+q.x*l),a.moveTo(F.x-q.y*l,F.y+q.x*l),a.lineTo(F.x+q.y*
-l,F.y-q.x*l),a.moveTo(F.x,F.y)):"arc"==g?(l*=1.3,a.curveTo(C.x-q.y*l,C.y+q.x*l,F.x-q.y*l,F.y+q.x*l,F.x,F.y)):(a.moveTo(F.x,F.y),f=!0),l=[F],C=!0))}else q=null;C||(l.push(I),k=I)}this.addPoints(a,l,e,b,!1,null,f);a.stroke()}};var p=mxGraphView.prototype.getFixedTerminalPoint;mxGraphView.prototype.getFixedTerminalPoint=function(a,c,e,b){return null!=c&&"centerPerimeter"==c.style[mxConstants.STYLE_PERIMETER]?new mxPoint(c.getCenterX(),c.getCenterY()):p.apply(this,arguments)};var c=mxGraphView.prototype.updateFloatingTerminalPoint;
-mxGraphView.prototype.updateFloatingTerminalPoint=function(a,e,b,d){if(null==e||null==a||"1"!=e.style.snapToPoint&&"1"!=a.style.snapToPoint)c.apply(this,arguments);else{e=this.getTerminalPort(a,e,d);var g=this.getNextPoint(a,b,d),f=this.graph.isOrthogonal(a),k=mxUtils.toRadians(Number(e.style[mxConstants.STYLE_ROTATION]||"0")),n=new mxPoint(e.getCenterX(),e.getCenterY());if(0!=k)var l=Math.cos(-k),q=Math.sin(-k),g=mxUtils.getRotatedPoint(g,l,q,n);l=parseFloat(a.style[mxConstants.STYLE_PERIMETER_SPACING]||
-0);l+=parseFloat(a.style[d?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||0);g=this.getPerimeterPoint(e,g,0==k&&f,l);0!=k&&(l=Math.cos(k),q=Math.sin(k),g=mxUtils.getRotatedPoint(g,l,q,n));a.setAbsoluteTerminalPoint(this.snapToAnchorPoint(a,e,b,d,g),d)}};mxGraphView.prototype.snapToAnchorPoint=function(a,c,e,b,d){if(null!=c&&null!=a){a=this.graph.getAllConnectionConstraints(c);b=e=null;if(null!=a)for(var g=0;g<a.length;g++){var f=this.graph.getConnectionPoint(c,
-a[g]);if(null!=f){var k=(f.x-d.x)*(f.x-d.x)+(f.y-d.y)*(f.y-d.y);if(null==b||k<b)e=f,b=k}}null!=e&&(d=e)}return d};var e=mxStencil.prototype.evaluateTextAttribute;mxStencil.prototype.evaluateTextAttribute=function(a,c,b){var d=e.apply(this,arguments);"1"==a.getAttribute("placeholders")&&null!=b.state&&(d=b.state.view.graph.replacePlaceholders(b.state.cell,d));return d};var g=mxCellRenderer.prototype.createShape;mxCellRenderer.prototype.createShape=function(a){if(null!=a.style&&"undefined"!==typeof pako){var c=
-mxUtils.getValue(a.style,mxConstants.STYLE_SHAPE,null);if(null!=c&&"string"===typeof c&&"stencil("==c.substring(0,8))try{var e=c.substring(8,c.length-1),b=mxUtils.parseXml(Graph.decompress(e));return new mxShape(new mxStencil(b.documentElement))}catch(t){null!=window.console&&console.log("Error in shape: "+t)}}return g.apply(this,arguments)}})();mxStencilRegistry.libraries={};mxStencilRegistry.dynamicLoading=!0;mxStencilRegistry.allowEval=!0;mxStencilRegistry.packages=[];
+"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,k=mxUtils.getValue(this.style,"jumpStyle","none"),f=!0,g=null,n=null,l=[],q=null;a.begin();for(var p=0;p<this.state.routedPoints.length;p++){var F=this.state.routedPoints[p],I=new mxPoint(F.x/this.scale,F.y/this.scale);0==p?I=c[0]:p==this.state.routedPoints.length-1&&(I=c[c.length-1]);var D=!1;if(null!=g&&1==F.type){var M=this.state.routedPoints[p+1],F=M.x/this.scale-I.x,M=M.y/this.scale-I.y,F=F*F+M*M;null==q&&(q=new mxPoint(I.x-g.x,I.y-g.y),
+n=Math.sqrt(q.x*q.x+q.y*q.y),0<n?(q.x=q.x*d/n,q.y=q.y*d/n):q=null);F>d*d&&0<n&&(F=g.x-I.x,M=g.y-I.y,F=F*F+M*M,F>d*d&&(D=new mxPoint(I.x-q.x,I.y-q.y),F=new mxPoint(I.x+q.x,I.y+q.y),l.push(D),this.addPoints(a,l,e,b,!1,null,f),l=0>Math.round(q.x)||0==Math.round(q.x)&&0>=Math.round(q.y)?1:-1,f=!1,"sharp"==k?(a.lineTo(D.x-q.y*l,D.y+q.x*l),a.lineTo(F.x-q.y*l,F.y+q.x*l),a.lineTo(F.x,F.y)):"line"==k?(a.moveTo(D.x+q.y*l,D.y-q.x*l),a.lineTo(D.x-q.y*l,D.y+q.x*l),a.moveTo(F.x-q.y*l,F.y+q.x*l),a.lineTo(F.x+q.y*
+l,F.y-q.x*l),a.moveTo(F.x,F.y)):"arc"==k?(l*=1.3,a.curveTo(D.x-q.y*l,D.y+q.x*l,F.x-q.y*l,F.y+q.x*l,F.x,F.y)):(a.moveTo(F.x,F.y),f=!0),l=[F],D=!0))}else q=null;D||(l.push(I),g=I)}this.addPoints(a,l,e,b,!1,null,f);a.stroke()}};var p=mxGraphView.prototype.getFixedTerminalPoint;mxGraphView.prototype.getFixedTerminalPoint=function(a,c,e,b){return null!=c&&"centerPerimeter"==c.style[mxConstants.STYLE_PERIMETER]?new mxPoint(c.getCenterX(),c.getCenterY()):p.apply(this,arguments)};var c=mxGraphView.prototype.updateFloatingTerminalPoint;
+mxGraphView.prototype.updateFloatingTerminalPoint=function(a,e,b,d){if(null==e||null==a||"1"!=e.style.snapToPoint&&"1"!=a.style.snapToPoint)c.apply(this,arguments);else{e=this.getTerminalPort(a,e,d);var k=this.getNextPoint(a,b,d),f=this.graph.isOrthogonal(a),g=mxUtils.toRadians(Number(e.style[mxConstants.STYLE_ROTATION]||"0")),n=new mxPoint(e.getCenterX(),e.getCenterY());if(0!=g)var l=Math.cos(-g),q=Math.sin(-g),k=mxUtils.getRotatedPoint(k,l,q,n);l=parseFloat(a.style[mxConstants.STYLE_PERIMETER_SPACING]||
+0);l+=parseFloat(a.style[d?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||0);k=this.getPerimeterPoint(e,k,0==g&&f,l);0!=g&&(l=Math.cos(g),q=Math.sin(g),k=mxUtils.getRotatedPoint(k,l,q,n));a.setAbsoluteTerminalPoint(this.snapToAnchorPoint(a,e,b,d,k),d)}};mxGraphView.prototype.snapToAnchorPoint=function(a,c,e,b,d){if(null!=c&&null!=a){a=this.graph.getAllConnectionConstraints(c);b=e=null;if(null!=a)for(var k=0;k<a.length;k++){var f=this.graph.getConnectionPoint(c,
+a[k]);if(null!=f){var g=(f.x-d.x)*(f.x-d.x)+(f.y-d.y)*(f.y-d.y);if(null==b||g<b)e=f,b=g}}null!=e&&(d=e)}return d};var e=mxStencil.prototype.evaluateTextAttribute;mxStencil.prototype.evaluateTextAttribute=function(a,c,b){var d=e.apply(this,arguments);"1"==a.getAttribute("placeholders")&&null!=b.state&&(d=b.state.view.graph.replacePlaceholders(b.state.cell,d));return d};var k=mxCellRenderer.prototype.createShape;mxCellRenderer.prototype.createShape=function(a){if(null!=a.style&&"undefined"!==typeof pako){var c=
+mxUtils.getValue(a.style,mxConstants.STYLE_SHAPE,null);if(null!=c&&"string"===typeof c&&"stencil("==c.substring(0,8))try{var e=c.substring(8,c.length-1),b=mxUtils.parseXml(Graph.decompress(e));return new mxShape(new mxStencil(b.documentElement))}catch(t){null!=window.console&&console.log("Error in shape: "+t)}}return k.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 d=mxStencilRegistry.getBasenameForStencil(a);if(null!=d){b=mxStencilRegistry.libraries[d];if(null!=b){if(null==mxStencilRegistry.packages[d]){for(var k=0;k<b.length;k++){var f=b[k];if(!mxStencilRegistry.filesLoaded[f])if(mxStencilRegistry.filesLoaded[f]=!0,".xml"==f.toLowerCase().substring(f.length-4,f.length))mxStencilRegistry.loadStencilSet(f,
+mxStencilRegistry.getStencil=function(a){var b=mxStencilRegistry.stencils[a];if(null==b&&null==mxCellRenderer.defaultShapes[a]&&mxStencilRegistry.dynamicLoading){var d=mxStencilRegistry.getBasenameForStencil(a);if(null!=d){b=mxStencilRegistry.libraries[d];if(null!=b){if(null==mxStencilRegistry.packages[d]){for(var g=0;g<b.length;g++){var f=b[g];if(!mxStencilRegistry.filesLoaded[f])if(mxStencilRegistry.filesLoaded[f]=!0,".xml"==f.toLowerCase().substring(f.length-4,f.length))mxStencilRegistry.loadStencilSet(f,
null);else if(".js"==f.toLowerCase().substring(f.length-3,f.length))try{if(mxStencilRegistry.allowEval){var m=mxUtils.load(f);null!=m&&200<=m.getStatus()&&299>=m.getStatus()&&eval.call(window,m.getText())}}catch(p){null!=window.console&&console.log("error in getStencil:",a,d,b,f,p)}}mxStencilRegistry.packages[d]=1}}else d=d.replace("_-_","_"),mxStencilRegistry.loadStencilSet(STENCIL_PATH+"/"+d+".xml",null);b=mxStencilRegistry.stencils[a]}}return b};
mxStencilRegistry.getBasenameForStencil=function(a){var b=null;if(null!=a&&"string"===typeof a&&(a=a.split("."),0<a.length&&"mxgraph"==a[0]))for(var b=a[1],d=2;d<a.length-1;d++)b+="/"+a[d];return b};
-mxStencilRegistry.loadStencilSet=function(a,b,d,k){var f=mxStencilRegistry.packages[a];if(null!=d&&d||null==f){var m=!1;if(null==f)try{if(k){mxStencilRegistry.loadStencil(a,mxUtils.bind(this,function(d){null!=d&&null!=d.documentElement&&(mxStencilRegistry.packages[a]=d,m=!0,mxStencilRegistry.parseStencilSet(d.documentElement,b,m))}));return}f=mxStencilRegistry.loadStencil(a);mxStencilRegistry.packages[a]=f;m=!0}catch(p){null!=window.console&&console.log("error in loadStencilSet:",a,p)}null!=f&&null!=
+mxStencilRegistry.loadStencilSet=function(a,b,d,g){var f=mxStencilRegistry.packages[a];if(null!=d&&d||null==f){var m=!1;if(null==f)try{if(g){mxStencilRegistry.loadStencil(a,mxUtils.bind(this,function(d){null!=d&&null!=d.documentElement&&(mxStencilRegistry.packages[a]=d,m=!0,mxStencilRegistry.parseStencilSet(d.documentElement,b,m))}));return}f=mxStencilRegistry.loadStencil(a);mxStencilRegistry.packages[a]=f;m=!0}catch(p){null!=window.console&&console.log("error in loadStencilSet:",a,p)}null!=f&&null!=
f.documentElement&&mxStencilRegistry.parseStencilSet(f.documentElement,b,m)}};mxStencilRegistry.loadStencil=function(a,b){if(null!=b)mxUtils.get(a,mxUtils.bind(this,function(a){b(200<=a.getStatus()&&299>=a.getStatus()?a.getXml():null)}));else return mxUtils.load(a).getXml()};mxStencilRegistry.parseStencilSets=function(a){for(var b=0;b<a.length;b++)mxStencilRegistry.parseStencilSet(mxUtils.parseXml(a[b]).documentElement)};
-mxStencilRegistry.parseStencilSet=function(a,b,d){if("stencils"==a.nodeName)for(var k=a.firstChild;null!=k;)"shapes"==k.nodeName&&mxStencilRegistry.parseStencilSet(k,b,d),k=k.nextSibling;else{d=null!=d?d:!0;var k=a.firstChild,f="";a=a.getAttribute("name");for(null!=a&&(f=a+".");null!=k;){if(k.nodeType==mxConstants.NODETYPE_ELEMENT&&(a=k.getAttribute("name"),null!=a)){var f=f.toLowerCase(),m=a.replace(/ /g,"_");d&&mxStencilRegistry.addStencil(f+m.toLowerCase(),new mxStencil(k));if(null!=b){var p=k.getAttribute("w"),
-c=k.getAttribute("h"),p=null==p?80:parseInt(p,10),c=null==c?80:parseInt(c,10);b(f,m,a,p,c)}}k=k.nextSibling}}};
+mxStencilRegistry.parseStencilSet=function(a,b,d){if("stencils"==a.nodeName)for(var g=a.firstChild;null!=g;)"shapes"==g.nodeName&&mxStencilRegistry.parseStencilSet(g,b,d),g=g.nextSibling;else{d=null!=d?d:!0;var g=a.firstChild,f="";a=a.getAttribute("name");for(null!=a&&(f=a+".");null!=g;){if(g.nodeType==mxConstants.NODETYPE_ELEMENT&&(a=g.getAttribute("name"),null!=a)){var f=f.toLowerCase(),m=a.replace(/ /g,"_");d&&mxStencilRegistry.addStencil(f+m.toLowerCase(),new mxStencil(g));if(null!=b){var p=g.getAttribute("w"),
+c=g.getAttribute("h"),p=null==p?80:parseInt(p,10),c=null==c?80:parseInt(c,10);b(f,m,a,p,c)}}g=g.nextSibling}}};
"undefined"!=typeof mxVertexHandler&&function(){function a(){var a=document.createElement("div");a.className="geHint";a.style.whiteSpace="nowrap";a.style.position="absolute";return a}function b(a,c){switch(c){case mxConstants.POINTS:return a;case mxConstants.MILLIMETERS:return(a/mxConstants.PIXELS_PER_MM).toFixed(1);case mxConstants.INCHES:return(a/mxConstants.PIXELS_PER_INCH).toFixed(2)}}mxConstants.HANDLE_FILLCOLOR="#29b6f2";mxConstants.HANDLE_STROKECOLOR="#0088cf";mxConstants.VERTEX_SELECTION_COLOR=
"#00a8ff";mxConstants.OUTLINE_COLOR="#00a8ff";mxConstants.OUTLINE_HANDLE_FILLCOLOR="#99ccff";mxConstants.OUTLINE_HANDLE_STROKECOLOR="#00a8ff";mxConstants.CONNECT_HANDLE_FILLCOLOR="#cee7ff";mxConstants.EDGE_SELECTION_COLOR="#00a8ff";mxConstants.DEFAULT_VALID_COLOR="#00a8ff";mxConstants.LABEL_HANDLE_FILLCOLOR="#cee7ff";mxConstants.GUIDE_COLOR="#0088cf";mxConstants.HIGHLIGHT_OPACITY=30;mxConstants.HIGHLIGHT_SIZE=5;mxEdgeHandler.prototype.snapToTerminals=!0;mxGraphHandler.prototype.guidesEnabled=!0;mxGraphHandler.prototype.removeEmptyParents=
-!0;mxRubberband.prototype.fadeOut=!0;mxGuide.prototype.isEnabledForEvent=function(a){return!mxEvent.isAltDown(a)};var d=mxGraphLayout.prototype.isVertexIgnored;mxGraphLayout.prototype.isVertexIgnored=function(a){return d.apply(this,arguments)||this.graph.isTableRow(a)||this.graph.isTableCell(a)};var k=mxGraphLayout.prototype.isEdgeIgnored;mxGraphLayout.prototype.isEdgeIgnored=function(a){return k.apply(this,arguments)||this.graph.isEdgeIgnored(a)};var f=mxConnectionHandler.prototype.isCreateTarget;
+!0;mxRubberband.prototype.fadeOut=!0;mxGuide.prototype.isEnabledForEvent=function(a){return!mxEvent.isAltDown(a)};var d=mxGraphLayout.prototype.isVertexIgnored;mxGraphLayout.prototype.isVertexIgnored=function(a){return d.apply(this,arguments)||this.graph.isTableRow(a)||this.graph.isTableCell(a)};var g=mxGraphLayout.prototype.isEdgeIgnored;mxGraphLayout.prototype.isEdgeIgnored=function(a){return g.apply(this,arguments)||this.graph.isEdgeIgnored(a)};var f=mxConnectionHandler.prototype.isCreateTarget;
mxConnectionHandler.prototype.isCreateTarget=function(a){return this.graph.isCloneEvent(a)||f.apply(this,arguments)};mxConstraintHandler.prototype.createHighlightShape=function(){var a=new mxEllipse(null,this.highlightColor,this.highlightColor,0);a.opacity=mxConstants.HIGHLIGHT_OPACITY;return a};mxConnectionHandler.prototype.livePreview=!0;mxConnectionHandler.prototype.cursor="crosshair";mxConnectionHandler.prototype.createEdgeState=function(a){a=this.graph.createCurrentEdgeStyle();a=this.graph.createEdge(null,
null,null,null,null,a);a=new mxCellState(this.graph.view,a,this.graph.getCellStyle(a));for(var c in this.graph.currentEdgeStyle)a.style[c]=this.graph.currentEdgeStyle[c];return a};var m=mxConnectionHandler.prototype.createShape;mxConnectionHandler.prototype.createShape=function(){var a=m.apply(this,arguments);a.isDashed="1"==this.graph.currentEdgeStyle[mxConstants.STYLE_DASHED];return a};mxConnectionHandler.prototype.updatePreview=function(a){};var p=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=
function(){var a=p.apply(this,arguments),c=a.getCell;a.getCell=mxUtils.bind(this,function(a){var e=c.apply(this,arguments);this.error=null;return e});return a};Graph.prototype.defaultVertexStyle={};Graph.prototype.defaultEdgeStyle={edgeStyle:"orthogonalEdgeStyle",rounded:"0",jettySize:"auto",orthogonalLoop:"1"};Graph.prototype.createCurrentEdgeStyle=function(){for(var a="edgeStyle="+(this.currentEdgeStyle.edgeStyle||"none")+";",c="shape curved rounded comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification comicStyle jumpStyle jumpSize".split(" "),
e=0;e<c.length;e++)null!=this.currentEdgeStyle[c[e]]&&(a+=c[e]+"="+this.currentEdgeStyle[c[e]]+";");null!=this.currentEdgeStyle.orthogonalLoop?a+="orthogonalLoop="+this.currentEdgeStyle.orthogonalLoop+";":null!=Graph.prototype.defaultEdgeStyle.orthogonalLoop&&(a+="orthogonalLoop="+Graph.prototype.defaultEdgeStyle.orthogonalLoop+";");null!=this.currentEdgeStyle.jettySize?a+="jettySize="+this.currentEdgeStyle.jettySize+";":null!=Graph.prototype.defaultEdgeStyle.jettySize&&(a+="jettySize="+Graph.prototype.defaultEdgeStyle.jettySize+
";");"elbowEdgeStyle"==this.currentEdgeStyle.edgeStyle&&null!=this.currentEdgeStyle.elbow&&(a+="elbow="+this.currentEdgeStyle.elbow+";");return a=null!=this.currentEdgeStyle.html?a+("html="+this.currentEdgeStyle.html+";"):a+"html=1;"};Graph.prototype.updateCellStyles=function(a,c,e){this.model.beginUpdate();try{for(var b=0;b<e.length;b++)if(this.model.isVertex(e[b])||this.model.isEdge(e[b])){this.setCellStyles(a,null,[e[b]]);var d=this.getCellStyle(e[b])[a];c!=(null==d?mxConstants.NONE:d)&&this.setCellStyles(a,
c,[e[b]])}}finally{this.model.endUpdate()}};Graph.prototype.getPagePadding=function(){return new mxPoint(0,0)};Graph.prototype.loadStylesheet=function(){var a=null!=this.themes?this.themes[this.defaultThemeName]:mxStyleRegistry.dynamicLoading?mxUtils.load(STYLE_PATH+"/default.xml").getDocumentElement():null;null!=a&&(new mxCodec(a.ownerDocument)).decode(a,this.getStylesheet())};Graph.prototype.createCellLookup=function(a,c){c=null!=c?c:{};for(var e=0;e<a.length;e++){var b=a[e];c[mxObjectIdentity.get(b)]=
-b.getId();for(var d=this.model.getChildCount(b),g=0;g<d;g++)this.createCellLookup([this.model.getChildAt(b,g)],c)}return c};Graph.prototype.createCellMapping=function(a,c,e){e=null!=e?e:{};for(var b in a){var d=c[b];null==e[d]&&(e[d]=a[b].getId()||"")}return e};Graph.prototype.importGraphModel=function(a,c,e,b){c=null!=c?c:0;e=null!=e?e:0;var d=new mxCodec(a.ownerDocument),g=new mxGraphModel;d.decode(a,g);a=[];var d={},f={},k=g.getChildren(this.cloneCell(g.root,this.isCloneInvalidEdges(),d));if(null!=
-k){var n=this.createCellLookup([g.root]),k=k.slice();this.model.beginUpdate();try{if(1!=k.length||this.isCellLocked(this.getDefaultParent()))for(g=0;g<k.length;g++)l=this.model.getChildren(this.moveCells([k[g]],c,e,!1,this.model.getRoot())[0]),null!=l&&(a=a.concat(l));else{var l=g.getChildren(k[0]);null!=l&&(a=this.moveCells(l,c,e,!1,this.getDefaultParent()),f[g.getChildAt(g.root,0).getId()]=this.getDefaultParent().getId())}if(null!=a&&(this.createCellMapping(d,n,f),this.updateCustomLinks(f,a),b)){this.isGridEnabled()&&
-(c=this.snap(c),e=this.snap(e));var v=this.getBoundingBoxFromGeometry(a,!0);null!=v&&this.moveCells(a,c-v.x,e-v.y)}}finally{this.model.endUpdate()}}return a};Graph.prototype.encodeCells=function(a){for(var c={},e=this.cloneCells(a,null,c),b=new mxDictionary,d=0;d<a.length;d++)b.put(a[d],!0);for(var g=new mxCodec,f=new mxGraphModel,k=f.getChildAt(f.getRoot(),0),d=0;d<e.length;d++){f.add(k,e[d]);var l=this.view.getState(a[d]);if(null!=l){var n=this.getCellGeometry(e[d]);null!=n&&n.relative&&!this.model.isEdge(a[d])&&
-null==b.get(this.model.getParent(a[d]))&&(n.offset=null,n.relative=!1,n.x=l.x/l.view.scale-l.view.translate.x,n.y=l.y/l.view.scale-l.view.translate.y)}}this.updateCustomLinks(this.createCellMapping(c,this.createCellLookup(a)),e);return g.encode(f)};Graph.prototype.isSwimlane=function(a,c){if(null!=a&&this.model.getParent(a)!=this.model.getRoot()&&!this.model.isEdge(a)){var e=this.getCurrentCellStyle(a,c)[mxConstants.STYLE_SHAPE];return e==mxConstants.SHAPE_SWIMLANE||"table"==e}return!1};var c=Graph.prototype.isExtendParent;
-Graph.prototype.isExtendParent=function(a){var e=this.model.getParent(a);if(null!=e){var b=this.getCurrentCellStyle(e);if(null!=b.expand)return"0"!=b.expand}return c.apply(this,arguments)&&(null==e||!this.isTable(e))};var e=Graph.prototype.splitEdge;Graph.prototype.splitEdge=function(a,c,b,d,g,f,k,l){null==l&&(l=this.model.getParent(a),this.isTable(l)||this.isTableRow(l))&&(l=this.getCellAt(f,k,null,!0,!1));b=null;this.model.beginUpdate();try{b=e.apply(this,[a,c,b,d,g,f,k,l]);this.model.setValue(b,
-"");var n=this.getChildCells(b,!0);for(c=0;c<n.length;c++){var v=this.getCellGeometry(n[c]);null!=v&&v.relative&&0<v.x&&this.model.remove(n[c])}var q=this.getChildCells(a,!0);for(c=0;c<q.length;c++)v=this.getCellGeometry(q[c]),null!=v&&v.relative&&0>=v.x&&this.model.remove(q[c]);this.setCellStyles(mxConstants.STYLE_TARGET_PERIMETER_SPACING,null,[b]);this.setCellStyles(mxConstants.STYLE_ENDARROW,mxConstants.NONE,[b]);this.setCellStyles(mxConstants.STYLE_SOURCE_PERIMETER_SPACING,null,[a]);this.setCellStyles(mxConstants.STYLE_STARTARROW,
-mxConstants.NONE,[a]);var Y=this.model.getTerminal(b,!1);if(null!=Y){var t=this.getCurrentCellStyle(Y);null!=t&&"1"==t.snapToPoint&&(this.setCellStyles(mxConstants.STYLE_EXIT_X,null,[a]),this.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[a]),this.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[b]),this.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[b]))}}finally{this.model.endUpdate()}return b};var g=Graph.prototype.selectCell;Graph.prototype.selectCell=function(a,c,e){if(c||e)g.apply(this,arguments);
-else{var b=this.getSelectionCell(),d=null,f=[],k=mxUtils.bind(this,function(c){if(null!=this.view.getState(c)&&(this.model.isVertex(c)||this.model.isEdge(c)))if(f.push(c),c==b)d=f.length-1;else if(a&&null==b&&0<f.length||null!=d&&a&&f.length>d||!a&&0<d)return;for(var e=0;e<this.model.getChildCount(c);e++)k(this.model.getChildAt(c,e))});k(this.model.root);0<f.length&&(d=null!=d?mxUtils.mod(d+(a?1:-1),f.length):0,this.setSelectionCell(f[d]))}};var n=Graph.prototype.moveCells;Graph.prototype.moveCells=
-function(a,c,e,b,d,g,f){f=null!=f?f:{};if(this.isTable(d)){for(var k=[],l=0;l<a.length;l++)this.isTable(a[l])?k=k.concat(this.model.getChildCells(a[l],!0).reverse()):k.push(a[l]);a=k}this.model.beginUpdate();try{k=[];for(l=0;l<a.length;l++)if(null!=d&&this.isTableRow(a[l])){var v=this.model.getParent(a[l]),q=this.getCellGeometry(a[l]);this.isTable(v)&&k.push(v);if(null!=v&&null!=q&&this.isTable(v)&&this.isTable(d)&&(b||v!=d)){if(!b){var Y=this.getCellGeometry(v);null!=Y&&(Y=Y.clone(),Y.height-=q.height,
-this.model.setGeometry(v,Y))}Y=this.getCellGeometry(d);null!=Y&&(Y=Y.clone(),Y.height+=q.height,this.model.setGeometry(d,Y));var t=this.model.getChildCells(d,!0);if(0<t.length){a[l]=b?this.cloneCell(a[l]):a[l];var u=this.model.getChildCells(a[l],!0),m=this.model.getChildCells(t[0],!0),D=m.length-u.length;if(0<D)for(var B=0;B<D;B++){var x=this.cloneCell(u[u.length-1]);null!=x&&(x.value="",this.model.add(a[l],x))}else if(0>D)for(B=0;B>D;B--)this.model.remove(u[u.length+B-1]);u=this.model.getChildCells(a[l],
-!0);for(B=0;B<m.length;B++){var qa=this.getCellGeometry(m[B]),p=this.getCellGeometry(u[B]);null!=qa&&null!=p&&(p=p.clone(),p.width=qa.width,this.model.setGeometry(u[B],p))}}}}for(var va=n.apply(this,arguments),l=0;l<k.length;l++)!b&&this.model.contains(k[l])&&0==this.model.getChildCount(k[l])&&this.model.remove(k[l]);b&&this.updateCustomLinks(this.createCellMapping(f,this.createCellLookup(a)),va)}finally{this.model.endUpdate()}return va};var l=Graph.prototype.removeCells;Graph.prototype.removeCells=
-function(a,c){var e=[];this.model.beginUpdate();try{for(var b=0;b<a.length;b++)if(this.isTableCell(a[b])){var d=this.model.getParent(a[b]),g=this.model.getParent(d);1==this.model.getChildCount(d)&&1==this.model.getChildCount(g)?0>mxUtils.indexOf(a,g)&&0>mxUtils.indexOf(e,g)&&e.push(g):this.labelChanged(a[b],"")}else{if(this.isTableRow(a[b])&&(g=this.model.getParent(a[b]),0>mxUtils.indexOf(a,g)&&0>mxUtils.indexOf(e,g))){for(var f=this.model.getChildCells(g,!0),k=0,n=0;n<f.length;n++)0<=mxUtils.indexOf(a,
-f[n])&&k++;k==f.length&&e.push(g)}e.push(a[b])}e=l.apply(this,[e,c])}finally{this.model.endUpdate()}return e};Graph.prototype.updateCustomLinks=function(a,c,e){e=null!=e?e:new Graph;for(var b=0;b<c.length;b++)null!=c[b]&&e.updateCustomLinksForCell(a,c[b],e)};Graph.prototype.updateCustomLinksForCell=function(a,c){this.doUpdateCustomLinksForCell(a,c);for(var e=this.model.getChildCount(c),b=0;b<e;b++)this.updateCustomLinksForCell(a,this.model.getChildAt(c,b))};Graph.prototype.doUpdateCustomLinksForCell=
-function(a,c){};Graph.prototype.getAllConnectionConstraints=function(a,c){if(null!=a){var e=mxUtils.getValue(a.style,"points",null);if(null!=e){var b=[];try{for(var d=JSON.parse(e),e=0;e<d.length;e++){var g=d[e];b.push(new mxConnectionConstraint(new mxPoint(g[0],g[1]),2<g.length?"0"!=g[2]:!0,null,3<g.length?g[3]:0,4<g.length?g[4]:0))}}catch(za){}return b}if(null!=a.shape&&null!=a.shape.bounds){g=a.shape.direction;d=a.shape.bounds;e=a.shape.scale;b=d.width/e;d=d.height/e;if(g==mxConstants.DIRECTION_NORTH||
-g==mxConstants.DIRECTION_SOUTH)g=b,b=d,d=g;e=a.shape.getConstraints(a.style,b,d);if(null!=e)return e;if(null!=a.shape.stencil&&null!=a.shape.stencil.constraints)return a.shape.stencil.constraints;if(null!=a.shape.constraints)return a.shape.constraints}}return null};Graph.prototype.flipEdge=function(a){if(null!=a){var c=this.getCurrentCellStyle(a),c=mxUtils.getValue(c,mxConstants.STYLE_ELBOW,mxConstants.ELBOW_HORIZONTAL)==mxConstants.ELBOW_HORIZONTAL?mxConstants.ELBOW_VERTICAL:mxConstants.ELBOW_HORIZONTAL;
-this.setCellStyles(mxConstants.STYLE_ELBOW,c,[a])}};Graph.prototype.isValidRoot=function(a){for(var c=this.model.getChildCount(a),e=0,b=0;b<c;b++){var d=this.model.getChildAt(a,b);this.model.isVertex(d)&&(d=this.getCellGeometry(d),null==d||d.relative||e++)}return 0<e||this.isContainer(a)};Graph.prototype.isValidDropTarget=function(a,c,e){for(var b=this.getCurrentCellStyle(a),d=!0,g=!0,f=0;f<c.length&&g;f++)d=d&&this.isTable(c[f]),g=g&&this.isTableRow(c[f]);return("1"!=mxUtils.getValue(b,"part","0")||
-this.isContainer(a))&&"0"!=mxUtils.getValue(b,"dropTarget","1")&&(mxGraph.prototype.isValidDropTarget.apply(this,arguments)||this.isContainer(a))&&!this.isTableRow(a)&&(!this.isTable(a)||g||d)};Graph.prototype.createGroupCell=function(){var a=mxGraph.prototype.createGroupCell.apply(this,arguments);a.setStyle("group");return a};Graph.prototype.isExtendParentsOnAdd=function(a){var c=mxGraph.prototype.isExtendParentsOnAdd.apply(this,arguments);if(c&&null!=a&&null!=this.layoutManager){var e=this.model.getParent(a);
-null!=e&&(e=this.layoutManager.getLayout(e),null!=e&&e.constructor==mxStackLayout&&(c=!1))}return c};Graph.prototype.getPreferredSizeForCell=function(a){var c=mxGraph.prototype.getPreferredSizeForCell.apply(this,arguments);null!=c&&(c.width+=10,c.height+=4,this.gridEnabled&&(c.width=this.snap(c.width),c.height=this.snap(c.height)));return c};Graph.prototype.turnShapes=function(a,c){var e=this.getModel(),b=[];e.beginUpdate();try{for(var d=0;d<a.length;d++){var g=a[d];if(e.isEdge(g)){var f=e.getTerminal(g,
-!0),k=e.getTerminal(g,!1);e.setTerminal(g,k,!0);e.setTerminal(g,f,!1);var l=e.getGeometry(g);if(null!=l){l=l.clone();null!=l.points&&l.points.reverse();var n=l.getTerminalPoint(!0),v=l.getTerminalPoint(!1);l.setTerminalPoint(n,!1);l.setTerminalPoint(v,!0);e.setGeometry(g,l);var q=this.view.getState(g),t=this.view.getState(f),Y=this.view.getState(k);if(null!=q){var u=null!=t?this.getConnectionConstraint(q,t,!0):null,m=null!=Y?this.getConnectionConstraint(q,Y,!1):null;this.setConnectionConstraint(g,
-f,!0,m);this.setConnectionConstraint(g,k,!1,u);var D=mxUtils.getValue(q.style,mxConstants.STYLE_SOURCE_PERIMETER_SPACING);this.setCellStyles(mxConstants.STYLE_SOURCE_PERIMETER_SPACING,mxUtils.getValue(q.style,mxConstants.STYLE_TARGET_PERIMETER_SPACING),[g]);this.setCellStyles(mxConstants.STYLE_TARGET_PERIMETER_SPACING,D,[g])}b.push(g)}}else if(e.isVertex(g)&&(l=this.getCellGeometry(g),null!=l)){if(!(this.isTable(g)||this.isTableRow(g)||this.isTableCell(g)||this.isSwimlane(g))){l=l.clone();l.x+=l.width/
-2-l.height/2;l.y+=l.height/2-l.width/2;var B=l.width;l.width=l.height;l.height=B;e.setGeometry(g,l)}var x=this.view.getState(g);if(null!=x){var p=[mxConstants.DIRECTION_EAST,mxConstants.DIRECTION_SOUTH,mxConstants.DIRECTION_WEST,mxConstants.DIRECTION_NORTH],z=mxUtils.getValue(x.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST);this.setCellStyles(mxConstants.STYLE_DIRECTION,p[mxUtils.mod(mxUtils.indexOf(p,z)+(c?-1:1),p.length)],[g])}b.push(g)}}}finally{e.endUpdate()}return b};Graph.prototype.stencilHasPlaceholders=
+b.getId();for(var d=this.model.getChildCount(b),k=0;k<d;k++)this.createCellLookup([this.model.getChildAt(b,k)],c)}return c};Graph.prototype.createCellMapping=function(a,c,e){e=null!=e?e:{};for(var b in a){var d=c[b];null==e[d]&&(e[d]=a[b].getId()||"")}return e};Graph.prototype.importGraphModel=function(a,c,e,b){c=null!=c?c:0;e=null!=e?e:0;var d=new mxCodec(a.ownerDocument),k=new mxGraphModel;d.decode(a,k);a=[];var d={},f={},g=k.getChildren(this.cloneCell(k.root,this.isCloneInvalidEdges(),d));if(null!=
+g){var l=this.createCellLookup([k.root]),g=g.slice();this.model.beginUpdate();try{if(1!=g.length||this.isCellLocked(this.getDefaultParent()))for(k=0;k<g.length;k++)n=this.model.getChildren(this.moveCells([g[k]],c,e,!1,this.model.getRoot())[0]),null!=n&&(a=a.concat(n));else{var n=k.getChildren(g[0]);null!=n&&(a=this.moveCells(n,c,e,!1,this.getDefaultParent()),f[k.getChildAt(k.root,0).getId()]=this.getDefaultParent().getId())}if(null!=a&&(this.createCellMapping(d,l,f),this.updateCustomLinks(f,a),b)){this.isGridEnabled()&&
+(c=this.snap(c),e=this.snap(e));var v=this.getBoundingBoxFromGeometry(a,!0);null!=v&&this.moveCells(a,c-v.x,e-v.y)}}finally{this.model.endUpdate()}}return a};Graph.prototype.encodeCells=function(a){for(var c={},e=this.cloneCells(a,null,c),b=new mxDictionary,d=0;d<a.length;d++)b.put(a[d],!0);for(var k=new mxCodec,f=new mxGraphModel,g=f.getChildAt(f.getRoot(),0),d=0;d<e.length;d++){f.add(g,e[d]);var n=this.view.getState(a[d]);if(null!=n){var l=this.getCellGeometry(e[d]);null!=l&&l.relative&&!this.model.isEdge(a[d])&&
+null==b.get(this.model.getParent(a[d]))&&(l.offset=null,l.relative=!1,l.x=n.x/n.view.scale-n.view.translate.x,l.y=n.y/n.view.scale-n.view.translate.y)}}this.updateCustomLinks(this.createCellMapping(c,this.createCellLookup(a)),e);return k.encode(f)};Graph.prototype.isSwimlane=function(a,c){if(null!=a&&this.model.getParent(a)!=this.model.getRoot()&&!this.model.isEdge(a)){var e=this.getCurrentCellStyle(a,c)[mxConstants.STYLE_SHAPE];return e==mxConstants.SHAPE_SWIMLANE||"table"==e}return!1};var c=Graph.prototype.isExtendParent;
+Graph.prototype.isExtendParent=function(a){var e=this.model.getParent(a);if(null!=e){var b=this.getCurrentCellStyle(e);if(null!=b.expand)return"0"!=b.expand}return c.apply(this,arguments)&&(null==e||!this.isTable(e))};var e=Graph.prototype.splitEdge;Graph.prototype.splitEdge=function(a,c,b,d,k,f,g,n){null==n&&(n=this.model.getParent(a),this.isTable(n)||this.isTableRow(n))&&(n=this.getCellAt(f,g,null,!0,!1));b=null;this.model.beginUpdate();try{b=e.apply(this,[a,c,b,d,k,f,g,n]);this.model.setValue(b,
+"");var l=this.getChildCells(b,!0);for(c=0;c<l.length;c++){var v=this.getCellGeometry(l[c]);null!=v&&v.relative&&0<v.x&&this.model.remove(l[c])}var q=this.getChildCells(a,!0);for(c=0;c<q.length;c++)v=this.getCellGeometry(q[c]),null!=v&&v.relative&&0>=v.x&&this.model.remove(q[c]);this.setCellStyles(mxConstants.STYLE_TARGET_PERIMETER_SPACING,null,[b]);this.setCellStyles(mxConstants.STYLE_ENDARROW,mxConstants.NONE,[b]);this.setCellStyles(mxConstants.STYLE_SOURCE_PERIMETER_SPACING,null,[a]);this.setCellStyles(mxConstants.STYLE_STARTARROW,
+mxConstants.NONE,[a]);var ea=this.model.getTerminal(b,!1);if(null!=ea){var t=this.getCurrentCellStyle(ea);null!=t&&"1"==t.snapToPoint&&(this.setCellStyles(mxConstants.STYLE_EXIT_X,null,[a]),this.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[a]),this.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[b]),this.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[b]))}}finally{this.model.endUpdate()}return b};var k=Graph.prototype.selectCell;Graph.prototype.selectCell=function(a,c,e){if(c||e)k.apply(this,arguments);
+else{var b=this.getSelectionCell(),d=null,f=[],g=mxUtils.bind(this,function(c){if(null!=this.view.getState(c)&&(this.model.isVertex(c)||this.model.isEdge(c)))if(f.push(c),c==b)d=f.length-1;else if(a&&null==b&&0<f.length||null!=d&&a&&f.length>d||!a&&0<d)return;for(var e=0;e<this.model.getChildCount(c);e++)g(this.model.getChildAt(c,e))});g(this.model.root);0<f.length&&(d=null!=d?mxUtils.mod(d+(a?1:-1),f.length):0,this.setSelectionCell(f[d]))}};var n=Graph.prototype.moveCells;Graph.prototype.moveCells=
+function(a,c,e,b,d,k,f){f=null!=f?f:{};if(this.isTable(d)){for(var g=[],l=0;l<a.length;l++)this.isTable(a[l])?g=g.concat(this.model.getChildCells(a[l],!0).reverse()):g.push(a[l]);a=g}this.model.beginUpdate();try{g=[];for(l=0;l<a.length;l++)if(null!=d&&this.isTableRow(a[l])){var v=this.model.getParent(a[l]),q=this.getCellGeometry(a[l]);this.isTable(v)&&g.push(v);if(null!=v&&null!=q&&this.isTable(v)&&this.isTable(d)&&(b||v!=d)){if(!b){var t=this.getCellGeometry(v);null!=t&&(t=t.clone(),t.height-=q.height,
+this.model.setGeometry(v,t))}t=this.getCellGeometry(d);null!=t&&(t=t.clone(),t.height+=q.height,this.model.setGeometry(d,t));var ea=this.model.getChildCells(d,!0);if(0<ea.length){a[l]=b?this.cloneCell(a[l]):a[l];var u=this.model.getChildCells(a[l],!0),m=this.model.getChildCells(ea[0],!0),C=m.length-u.length;if(0<C)for(var B=0;B<C;B++){var x=this.cloneCell(u[u.length-1]);null!=x&&(x.value="",this.model.add(a[l],x))}else if(0>C)for(B=0;B>C;B--)this.model.remove(u[u.length+B-1]);u=this.model.getChildCells(a[l],
+!0);for(B=0;B<m.length;B++){var qa=this.getCellGeometry(m[B]),p=this.getCellGeometry(u[B]);null!=qa&&null!=p&&(p=p.clone(),p.width=qa.width,this.model.setGeometry(u[B],p))}}}}for(var z=n.apply(this,arguments),l=0;l<g.length;l++)!b&&this.model.contains(g[l])&&0==this.model.getChildCount(g[l])&&this.model.remove(g[l]);b&&this.updateCustomLinks(this.createCellMapping(f,this.createCellLookup(a)),z)}finally{this.model.endUpdate()}return z};var l=Graph.prototype.removeCells;Graph.prototype.removeCells=
+function(a,c){var e=[];this.model.beginUpdate();try{for(var b=0;b<a.length;b++)if(this.isTableCell(a[b])){var d=this.model.getParent(a[b]),k=this.model.getParent(d);1==this.model.getChildCount(d)&&1==this.model.getChildCount(k)?0>mxUtils.indexOf(a,k)&&0>mxUtils.indexOf(e,k)&&e.push(k):this.labelChanged(a[b],"")}else{if(this.isTableRow(a[b])&&(k=this.model.getParent(a[b]),0>mxUtils.indexOf(a,k)&&0>mxUtils.indexOf(e,k))){for(var f=this.model.getChildCells(k,!0),g=0,n=0;n<f.length;n++)0<=mxUtils.indexOf(a,
+f[n])&&g++;g==f.length&&e.push(k)}e.push(a[b])}e=l.apply(this,[e,c])}finally{this.model.endUpdate()}return e};Graph.prototype.updateCustomLinks=function(a,c,e){e=null!=e?e:new Graph;for(var b=0;b<c.length;b++)null!=c[b]&&e.updateCustomLinksForCell(a,c[b],e)};Graph.prototype.updateCustomLinksForCell=function(a,c){this.doUpdateCustomLinksForCell(a,c);for(var e=this.model.getChildCount(c),b=0;b<e;b++)this.updateCustomLinksForCell(a,this.model.getChildAt(c,b))};Graph.prototype.doUpdateCustomLinksForCell=
+function(a,c){};Graph.prototype.getAllConnectionConstraints=function(a,c){if(null!=a){var e=mxUtils.getValue(a.style,"points",null);if(null!=e){var b=[];try{for(var d=JSON.parse(e),e=0;e<d.length;e++){var k=d[e];b.push(new mxConnectionConstraint(new mxPoint(k[0],k[1]),2<k.length?"0"!=k[2]:!0,null,3<k.length?k[3]:0,4<k.length?k[4]:0))}}catch(za){}return b}if(null!=a.shape&&null!=a.shape.bounds){k=a.shape.direction;d=a.shape.bounds;e=a.shape.scale;b=d.width/e;d=d.height/e;if(k==mxConstants.DIRECTION_NORTH||
+k==mxConstants.DIRECTION_SOUTH)k=b,b=d,d=k;e=a.shape.getConstraints(a.style,b,d);if(null!=e)return e;if(null!=a.shape.stencil&&null!=a.shape.stencil.constraints)return a.shape.stencil.constraints;if(null!=a.shape.constraints)return a.shape.constraints}}return null};Graph.prototype.flipEdge=function(a){if(null!=a){var c=this.getCurrentCellStyle(a),c=mxUtils.getValue(c,mxConstants.STYLE_ELBOW,mxConstants.ELBOW_HORIZONTAL)==mxConstants.ELBOW_HORIZONTAL?mxConstants.ELBOW_VERTICAL:mxConstants.ELBOW_HORIZONTAL;
+this.setCellStyles(mxConstants.STYLE_ELBOW,c,[a])}};Graph.prototype.isValidRoot=function(a){for(var c=this.model.getChildCount(a),e=0,b=0;b<c;b++){var d=this.model.getChildAt(a,b);this.model.isVertex(d)&&(d=this.getCellGeometry(d),null==d||d.relative||e++)}return 0<e||this.isContainer(a)};Graph.prototype.isValidDropTarget=function(a,c,e){for(var b=this.getCurrentCellStyle(a),d=!0,k=!0,f=0;f<c.length&&k;f++)d=d&&this.isTable(c[f]),k=k&&this.isTableRow(c[f]);return("1"!=mxUtils.getValue(b,"part","0")||
+this.isContainer(a))&&"0"!=mxUtils.getValue(b,"dropTarget","1")&&(mxGraph.prototype.isValidDropTarget.apply(this,arguments)||this.isContainer(a))&&!this.isTableRow(a)&&(!this.isTable(a)||k||d)};Graph.prototype.createGroupCell=function(){var a=mxGraph.prototype.createGroupCell.apply(this,arguments);a.setStyle("group");return a};Graph.prototype.isExtendParentsOnAdd=function(a){var c=mxGraph.prototype.isExtendParentsOnAdd.apply(this,arguments);if(c&&null!=a&&null!=this.layoutManager){var e=this.model.getParent(a);
+null!=e&&(e=this.layoutManager.getLayout(e),null!=e&&e.constructor==mxStackLayout&&(c=!1))}return c};Graph.prototype.getPreferredSizeForCell=function(a){var c=mxGraph.prototype.getPreferredSizeForCell.apply(this,arguments);null!=c&&(c.width+=10,c.height+=4,this.gridEnabled&&(c.width=this.snap(c.width),c.height=this.snap(c.height)));return c};Graph.prototype.turnShapes=function(a,c){var e=this.getModel(),b=[];e.beginUpdate();try{for(var d=0;d<a.length;d++){var k=a[d];if(e.isEdge(k)){var f=e.getTerminal(k,
+!0),g=e.getTerminal(k,!1);e.setTerminal(k,g,!0);e.setTerminal(k,f,!1);var l=e.getGeometry(k);if(null!=l){l=l.clone();null!=l.points&&l.points.reverse();var n=l.getTerminalPoint(!0),v=l.getTerminalPoint(!1);l.setTerminalPoint(n,!1);l.setTerminalPoint(v,!0);e.setGeometry(k,l);var q=this.view.getState(k),t=this.view.getState(f),u=this.view.getState(g);if(null!=q){var ea=null!=t?this.getConnectionConstraint(q,t,!0):null,m=null!=u?this.getConnectionConstraint(q,u,!1):null;this.setConnectionConstraint(k,
+f,!0,m);this.setConnectionConstraint(k,g,!1,ea);var C=mxUtils.getValue(q.style,mxConstants.STYLE_SOURCE_PERIMETER_SPACING);this.setCellStyles(mxConstants.STYLE_SOURCE_PERIMETER_SPACING,mxUtils.getValue(q.style,mxConstants.STYLE_TARGET_PERIMETER_SPACING),[k]);this.setCellStyles(mxConstants.STYLE_TARGET_PERIMETER_SPACING,C,[k])}b.push(k)}}else if(e.isVertex(k)&&(l=this.getCellGeometry(k),null!=l)){if(!(this.isTable(k)||this.isTableRow(k)||this.isTableCell(k)||this.isSwimlane(k))){l=l.clone();l.x+=l.width/
+2-l.height/2;l.y+=l.height/2-l.width/2;var B=l.width;l.width=l.height;l.height=B;e.setGeometry(k,l)}var x=this.view.getState(k);if(null!=x){var p=[mxConstants.DIRECTION_EAST,mxConstants.DIRECTION_SOUTH,mxConstants.DIRECTION_WEST,mxConstants.DIRECTION_NORTH],z=mxUtils.getValue(x.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST);this.setCellStyles(mxConstants.STYLE_DIRECTION,p[mxUtils.mod(mxUtils.indexOf(p,z)+(c?-1:1),p.length)],[k])}b.push(k)}}}finally{e.endUpdate()}return b};Graph.prototype.stencilHasPlaceholders=
function(a){if(null!=a&&null!=a.fgNode)for(a=a.fgNode.firstChild;null!=a;){if("text"==a.nodeName&&"1"==a.getAttribute("placeholders"))return!0;a=a.nextSibling}return!1};var q=Graph.prototype.processChange;Graph.prototype.processChange=function(a){if(a instanceof mxGeometryChange&&(this.isTableCell(a.cell)||this.isTableRow(a.cell))&&(null==a.previous&&null!=a.geometry||null!=a.previous&&!a.previous.equals(a.geometry))){var c=a.cell;this.isTableCell(c)&&(c=this.model.getParent(c));this.isTableRow(c)&&
(c=this.model.getParent(c));var e=this.view.getState(c);null!=e&&null!=e.shape&&(this.view.invalidate(c),e.shape.bounds=null)}q.apply(this,arguments);a instanceof mxValueChange&&null!=a.cell&&null!=a.cell.value&&"object"==typeof a.cell.value&&this.invalidateDescendantsWithPlaceholders(a.cell)};Graph.prototype.invalidateDescendantsWithPlaceholders=function(a){a=this.model.getDescendants(a);if(0<a.length)for(var c=0;c<a.length;c++){var e=this.view.getState(a[c]);null!=e&&null!=e.shape&&null!=e.shape.stencil&&
this.stencilHasPlaceholders(e.shape.stencil)?this.removeStateForCell(a[c]):this.isReplacePlaceholders(a[c])&&this.view.invalidate(a[c],!1,!1)}};Graph.prototype.replaceElement=function(a,c){for(var e=a.ownerDocument.createElement(null!=c?c:"span"),b=Array.prototype.slice.call(a.attributes);attr=b.pop();)e.setAttribute(attr.nodeName,attr.nodeValue);e.innerHTML=a.innerHTML;a.parentNode.replaceChild(e,a)};Graph.prototype.processElements=function(a,c){if(null!=a)for(var e=a.getElementsByTagName("*"),b=
-0;b<e.length;b++)c(e[b])};Graph.prototype.updateLabelElements=function(a,c,e){a=null!=a?a:this.getSelectionCells();for(var b=document.createElement("div"),d=0;d<a.length;d++)if(this.isHtmlLabel(a[d])){var g=this.convertValueToString(a[d]);if(null!=g&&0<g.length){b.innerHTML=g;for(var f=b.getElementsByTagName(null!=e?e:"*"),k=0;k<f.length;k++)c(f[k]);b.innerHTML!=g&&this.cellLabelChanged(a[d],b.innerHTML)}}};Graph.prototype.cellLabelChanged=function(a,c,e){c=Graph.zapGremlins(c);this.model.beginUpdate();
-try{if(null!=a.value&&"object"==typeof a.value){if(this.isReplacePlaceholders(a)&&null!=a.getAttribute("placeholder"))for(var b=a.getAttribute("placeholder"),d=a;null!=d;){if(d==this.model.getRoot()||null!=d.value&&"object"==typeof d.value&&d.hasAttribute(b)){this.setAttributeForCell(d,b,c);break}d=this.model.getParent(d)}var g=a.value.cloneNode(!0);Graph.translateDiagram&&null!=Graph.diagramLanguage&&g.hasAttribute("label_"+Graph.diagramLanguage)?g.setAttribute("label_"+Graph.diagramLanguage,c):
-g.setAttribute("label",c);c=g}mxGraph.prototype.cellLabelChanged.apply(this,arguments)}finally{this.model.endUpdate()}};Graph.prototype.cellsRemoved=function(a){if(null!=a){for(var c=new mxDictionary,e=0;e<a.length;e++)c.put(a[e],!0);for(var b=[],e=0;e<a.length;e++){var d=this.model.getParent(a[e]);null==d||c.get(d)||(c.put(d,!0),b.push(d))}for(e=0;e<b.length;e++)if(d=this.view.getState(b[e]),null!=d&&(this.model.isEdge(d.cell)||this.model.isVertex(d.cell))&&this.isCellDeletable(d.cell)&&this.isTransparentState(d)){for(var g=
-!0,f=0;f<this.model.getChildCount(d.cell)&&g;f++)c.get(this.model.getChildAt(d.cell,f))||(g=!1);g&&a.push(d.cell)}}mxGraph.prototype.cellsRemoved.apply(this,arguments)};Graph.prototype.removeCellsAfterUngroup=function(a){for(var c=[],e=0;e<a.length;e++)this.isCellDeletable(a[e])&&this.isTransparentState(this.view.getState(a[e]))&&c.push(a[e]);a=c;mxGraph.prototype.removeCellsAfterUngroup.apply(this,arguments)};Graph.prototype.setLinkForCell=function(a,c){this.setAttributeForCell(a,"link",c)};Graph.prototype.setTooltipForCell=
+0;b<e.length;b++)c(e[b])};Graph.prototype.updateLabelElements=function(a,c,e){a=null!=a?a:this.getSelectionCells();for(var b=document.createElement("div"),d=0;d<a.length;d++)if(this.isHtmlLabel(a[d])){var k=this.convertValueToString(a[d]);if(null!=k&&0<k.length){b.innerHTML=k;for(var f=b.getElementsByTagName(null!=e?e:"*"),g=0;g<f.length;g++)c(f[g]);b.innerHTML!=k&&this.cellLabelChanged(a[d],b.innerHTML)}}};Graph.prototype.cellLabelChanged=function(a,c,e){c=Graph.zapGremlins(c);this.model.beginUpdate();
+try{if(null!=a.value&&"object"==typeof a.value){if(this.isReplacePlaceholders(a)&&null!=a.getAttribute("placeholder"))for(var b=a.getAttribute("placeholder"),d=a;null!=d;){if(d==this.model.getRoot()||null!=d.value&&"object"==typeof d.value&&d.hasAttribute(b)){this.setAttributeForCell(d,b,c);break}d=this.model.getParent(d)}var k=a.value.cloneNode(!0);Graph.translateDiagram&&null!=Graph.diagramLanguage&&k.hasAttribute("label_"+Graph.diagramLanguage)?k.setAttribute("label_"+Graph.diagramLanguage,c):
+k.setAttribute("label",c);c=k}mxGraph.prototype.cellLabelChanged.apply(this,arguments)}finally{this.model.endUpdate()}};Graph.prototype.cellsRemoved=function(a){if(null!=a){for(var c=new mxDictionary,e=0;e<a.length;e++)c.put(a[e],!0);for(var b=[],e=0;e<a.length;e++){var d=this.model.getParent(a[e]);null==d||c.get(d)||(c.put(d,!0),b.push(d))}for(e=0;e<b.length;e++)if(d=this.view.getState(b[e]),null!=d&&(this.model.isEdge(d.cell)||this.model.isVertex(d.cell))&&this.isCellDeletable(d.cell)&&this.isTransparentState(d)){for(var k=
+!0,f=0;f<this.model.getChildCount(d.cell)&&k;f++)c.get(this.model.getChildAt(d.cell,f))||(k=!1);k&&a.push(d.cell)}}mxGraph.prototype.cellsRemoved.apply(this,arguments)};Graph.prototype.removeCellsAfterUngroup=function(a){for(var c=[],e=0;e<a.length;e++)this.isCellDeletable(a[e])&&this.isTransparentState(this.view.getState(a[e]))&&c.push(a[e]);a=c;mxGraph.prototype.removeCellsAfterUngroup.apply(this,arguments)};Graph.prototype.setLinkForCell=function(a,c){this.setAttributeForCell(a,"link",c)};Graph.prototype.setTooltipForCell=
function(a,c){var e="tooltip";Graph.translateDiagram&&null!=Graph.diagramLanguage&&mxUtils.isNode(a.value)&&a.value.hasAttribute("tooltip_"+Graph.diagramLanguage)&&(e="tooltip_"+Graph.diagramLanguage);this.setAttributeForCell(a,e,c)};Graph.prototype.getAttributeForCell=function(a,c,e){a=null!=a.value&&"object"===typeof a.value?a.value.getAttribute(c):null;return null!=a?a:e};Graph.prototype.setAttributeForCell=function(a,c,e){var b;null!=a.value&&"object"==typeof a.value?b=a.value.cloneNode(!0):(b=
-mxUtils.createXmlDocument().createElement("UserObject"),b.setAttribute("label",a.value||""));null!=e?b.setAttribute(c,e):b.removeAttribute(c);this.model.setValue(a,b)};var u=Graph.prototype.getDropTarget;Graph.prototype.getDropTarget=function(a,c,e,b){this.getModel();if(mxEvent.isAltDown(c))return null;for(var d=0;d<a.length;d++){var g=this.model.getParent(a[d]);if(this.model.isEdge(g)&&0>mxUtils.indexOf(a,g))return null}for(var g=u.apply(this,arguments),f=!0,d=0;d<a.length&&f;d++)f=f&&this.isTableRow(a[d]);
-f&&(this.isTableCell(g)&&(g=this.model.getParent(g)),this.isTableRow(g)&&(g=this.model.getParent(g)),this.isTable(g)||(g=null));return g};Graph.prototype.click=function(a){mxGraph.prototype.click.call(this,a);this.firstClickState=a.getState();this.firstClickSource=a.getSource()};Graph.prototype.dblClick=function(a,c){this.isEnabled()&&(c=this.insertTextForEvent(a,c),mxGraph.prototype.dblClick.call(this,a,c))};Graph.prototype.insertTextForEvent=function(a,c){var e=mxUtils.convertPoint(this.container,
+mxUtils.createXmlDocument().createElement("UserObject"),b.setAttribute("label",a.value||""));null!=e?b.setAttribute(c,e):b.removeAttribute(c);this.model.setValue(a,b)};var u=Graph.prototype.getDropTarget;Graph.prototype.getDropTarget=function(a,c,e,b){this.getModel();if(mxEvent.isAltDown(c))return null;for(var d=0;d<a.length;d++){var k=this.model.getParent(a[d]);if(this.model.isEdge(k)&&0>mxUtils.indexOf(a,k))return null}for(var k=u.apply(this,arguments),f=!0,d=0;d<a.length&&f;d++)f=f&&this.isTableRow(a[d]);
+f&&(this.isTableCell(k)&&(k=this.model.getParent(k)),this.isTableRow(k)&&(k=this.model.getParent(k)),this.isTable(k)||(k=null));return k};Graph.prototype.click=function(a){mxGraph.prototype.click.call(this,a);this.firstClickState=a.getState();this.firstClickSource=a.getSource()};Graph.prototype.dblClick=function(a,c){this.isEnabled()&&(c=this.insertTextForEvent(a,c),mxGraph.prototype.dblClick.call(this,a,c))};Graph.prototype.insertTextForEvent=function(a,c){var e=mxUtils.convertPoint(this.container,
mxEvent.getClientX(a),mxEvent.getClientY(a));if(null!=a&&!this.model.isVertex(c)){var b=this.model.isEdge(c)?this.view.getState(c):null,d=mxEvent.getSource(a);this.firstClickState!=b||this.firstClickSource!=d||null!=b&&null!=b.text&&null!=b.text.node&&null!=b.text.boundingBox&&(mxUtils.contains(b.text.boundingBox,e.x,e.y)||mxUtils.isAncestorNode(b.text.node,mxEvent.getSource(a)))||(null!=b||this.isCellLocked(this.getDefaultParent()))&&(null==b||this.isCellLocked(b.cell))||!(null!=b||mxClient.IS_SVG&&
d==this.view.getCanvas().ownerSVGElement)||(null==b&&(b=this.view.getState(this.getCellAt(e.x,e.y))),c=this.addText(e.x,e.y,b))}return c};Graph.prototype.getInsertPoint=function(){var a=this.getGridSize(),c=this.container.scrollLeft/this.view.scale-this.view.translate.x,e=this.container.scrollTop/this.view.scale-this.view.translate.y;if(this.pageVisible)var b=this.getPageLayout(),d=this.getPageSize(),c=Math.max(c,b.x*d.width),e=Math.max(e,b.y*d.height);return new mxPoint(this.snap(c+a),this.snap(e+
a))};Graph.prototype.getFreeInsertPoint=function(){var a=this.view,c=this.getGraphBounds(),e=this.getInsertPoint(),b=this.snap(Math.round(Math.max(e.x,c.x/a.scale-a.translate.x+(0==c.width?2*this.gridSize:0)))),a=this.snap(Math.round(Math.max(e.y,(c.y+c.height)/a.scale-a.translate.y+2*this.gridSize)));return new mxPoint(b,a)};Graph.prototype.getCenterInsertPoint=function(a){a=null!=a?a: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-a.width/2)),this.snap(Math.round((this.container.scrollTop+this.container.clientHeight/2)/this.view.scale-this.view.translate.y-a.height/2))):new mxPoint(this.snap(Math.round(this.container.clientWidth/2/this.view.scale-this.view.translate.x-a.width/2)),this.snap(Math.round(this.container.clientHeight/2/this.view.scale-this.view.translate.y-a.height/2)))};Graph.prototype.isMouseInsertPoint=function(){return!1};Graph.prototype.addText=
-function(a,c,e){var b=new mxCell;b.value="Text";b.geometry=new mxGeometry(0,0,0,0);b.vertex=!0;if(null!=e&&this.model.isEdge(e.cell)){b.style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];";b.geometry.relative=!0;b.connectable=!1;var d=this.view.getRelativePoint(e,a,c);b.geometry.x=Math.round(1E4*d.x)/1E4;b.geometry.y=Math.round(d.y);b.geometry.offset=new mxPoint(0,0);var d=this.view.getPoint(e,b.geometry),g=this.view.scale;b.geometry.offset=new mxPoint(Math.round((a-d.x)/
-g),Math.round((c-d.y)/g))}else d=this.view.translate,b.style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];",b.geometry.width=40,b.geometry.height=20,b.geometry.x=Math.round(a/this.view.scale)-d.x-(null!=e?e.origin.x:0),b.geometry.y=Math.round(c/this.view.scale)-d.y-(null!=e?e.origin.y:0),b.style+="autosize=1;";this.getModel().beginUpdate();try{this.addCells([b],null!=e?e.cell:null),this.fireEvent(new mxEventObject("textInserted","cells",[b])),this.autoSizeCell(b)}finally{this.getModel().endUpdate()}return b};
-Graph.prototype.addClickHandler=function(a,c,e){var b=mxUtils.bind(this,function(){var a=this.container.getElementsByTagName("a");if(null!=a)for(var e=0;e<a.length;e++){var b=this.getAbsoluteUrl(a[e].getAttribute("href"));null!=b&&(a[e].setAttribute("rel",this.linkRelation),a[e].setAttribute("href",b),null!=c&&mxEvent.addGestureListeners(a[e],null,null,c))}});this.model.addListener(mxEvent.CHANGE,b);b();var d=this.container.style.cursor,g=this.getTolerance(),f=this,k={currentState:null,currentLink:null,
+function(a,c,e){var b=new mxCell;b.value="Text";b.geometry=new mxGeometry(0,0,0,0);b.vertex=!0;if(null!=e&&this.model.isEdge(e.cell)){b.style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];";b.geometry.relative=!0;b.connectable=!1;var d=this.view.getRelativePoint(e,a,c);b.geometry.x=Math.round(1E4*d.x)/1E4;b.geometry.y=Math.round(d.y);b.geometry.offset=new mxPoint(0,0);var d=this.view.getPoint(e,b.geometry),k=this.view.scale;b.geometry.offset=new mxPoint(Math.round((a-d.x)/
+k),Math.round((c-d.y)/k))}else d=this.view.translate,b.style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];",b.geometry.width=40,b.geometry.height=20,b.geometry.x=Math.round(a/this.view.scale)-d.x-(null!=e?e.origin.x:0),b.geometry.y=Math.round(c/this.view.scale)-d.y-(null!=e?e.origin.y:0),b.style+="autosize=1;";this.getModel().beginUpdate();try{this.addCells([b],null!=e?e.cell:null),this.fireEvent(new mxEventObject("textInserted","cells",[b])),this.autoSizeCell(b)}finally{this.getModel().endUpdate()}return b};
+Graph.prototype.addClickHandler=function(a,c,e){var b=mxUtils.bind(this,function(){var a=this.container.getElementsByTagName("a");if(null!=a)for(var e=0;e<a.length;e++){var b=this.getAbsoluteUrl(a[e].getAttribute("href"));null!=b&&(a[e].setAttribute("rel",this.linkRelation),a[e].setAttribute("href",b),null!=c&&mxEvent.addGestureListeners(a[e],null,null,c))}});this.model.addListener(mxEvent.CHANGE,b);b();var d=this.container.style.cursor,k=this.getTolerance(),f=this,g={currentState:null,currentLink:null,
currentTarget:null,highlight:null!=a&&""!=a&&a!=mxConstants.NONE?new mxCellHighlight(f,a,4):null,startX:0,startY:0,scrollLeft:0,scrollTop:0,updateCurrentState:function(a){var c=a.sourceState;if(null==c||null==f.getLinkForCell(c.cell))a=f.getCellAt(a.getGraphX(),a.getGraphY(),null,null,null,function(a,c,e){return null==f.getLinkForCell(a.cell)}),c=f.view.getState(a);c!=this.currentState&&(null!=this.currentState&&this.clear(),this.currentState=c,null!=this.currentState&&this.activate(this.currentState))},
-mouseDown:function(a,c){this.startX=c.getGraphX();this.startY=c.getGraphY();this.scrollLeft=f.container.scrollLeft;this.scrollTop=f.container.scrollTop;null==this.currentLink&&"auto"==f.container.style.overflow&&(f.container.style.cursor="move");this.updateCurrentState(c)},mouseMove:function(a,c){if(f.isMouseDown){if(null!=this.currentLink){var e=Math.abs(this.startX-c.getGraphX()),b=Math.abs(this.startY-c.getGraphY());(e>g||b>g)&&this.clear()}}else{for(e=c.getSource();null!=e&&"a"!=e.nodeName.toLowerCase();)e=
-e.parentNode;null!=e?this.clear():(null!=f.tooltipHandler&&null!=this.currentLink&&null!=this.currentState&&f.tooltipHandler.reset(c,!0,this.currentState),(null==this.currentState||c.getState()!=this.currentState&&null!=c.sourceState||!f.intersects(this.currentState,c.getGraphX(),c.getGraphY()))&&this.updateCurrentState(c))}},mouseUp:function(a,b){for(var d=b.getSource(),k=b.getEvent();null!=d&&"a"!=d.nodeName.toLowerCase();)d=d.parentNode;null==d&&Math.abs(this.scrollLeft-f.container.scrollLeft)<
-g&&Math.abs(this.scrollTop-f.container.scrollTop)<g&&(null==b.sourceState||!b.isSource(b.sourceState.control))&&((mxEvent.isLeftMouseButton(k)||mxEvent.isMiddleMouseButton(k))&&!mxEvent.isPopupTrigger(k)||mxEvent.isTouchEvent(k))&&(null!=this.currentLink?(d=f.isBlankLink(this.currentLink),"data:"!==this.currentLink.substring(0,5)&&d||null==c||c(k,this.currentLink),mxEvent.isConsumed(k)||(k=null!=this.currentTarget?this.currentTarget:mxEvent.isMiddleMouseButton(k)?"_blank":d?f.linkTarget:"_top",f.openLink(this.currentLink,
-k),b.consume())):null!=e&&!b.isConsumed()&&Math.abs(this.scrollLeft-f.container.scrollLeft)<g&&Math.abs(this.scrollTop-f.container.scrollTop)<g&&Math.abs(this.startX-b.getGraphX())<g&&Math.abs(this.startY-b.getGraphY())<g&&e(b.getEvent()));this.clear()},activate:function(a){this.currentLink=f.getAbsoluteUrl(f.getLinkForCell(a.cell));null!=this.currentLink&&(this.currentTarget=f.getLinkTargetForCell(a.cell),f.container.style.cursor="pointer",null!=this.highlight&&this.highlight.highlight(a))},clear:function(){null!=
-f.container&&(f.container.style.cursor=d);this.currentLink=this.currentState=this.currentTarget=null;null!=this.highlight&&this.highlight.hide();null!=f.tooltipHandler&&f.tooltipHandler.hide()}};f.click=function(a){};f.addMouseListener(k);mxEvent.addListener(document,"mouseleave",function(a){k.clear()})};Graph.prototype.duplicateCells=function(a,c){a=null!=a?a:this.getSelectionCells();c=null!=c?c:!0;for(var e=0;e<a.length;e++)this.isTableCell(a[e])&&(a[e]=this.model.getParent(a[e]));a=this.model.getTopmostCells(a);
-var b=this.getModel(),d=this.gridSize,g=[];b.beginUpdate();try{for(var f={},k=this.createCellLookup(a),l=this.cloneCells(a,!1,f,!0),e=0;e<a.length;e++){var n=b.getParent(a[e]),v=this.moveCells([l[e]],d,d,!1)[0];g.push(v);if(c)b.add(n,l[e]);else{var q=n.getIndex(a[e]);b.add(n,l[e],q+1)}if(this.isTable(n)){var t=this.getCellGeometry(l[e]),u=this.getCellGeometry(n);null!=t&&null!=u&&(u=u.clone(),u.height+=t.height,b.setGeometry(n,u))}}this.updateCustomLinks(this.createCellMapping(f,k),l,this)}finally{b.endUpdate()}return g};
-Graph.prototype.insertImage=function(a,c,e){if(null!=a&&null!=this.cellEditor.textarea){for(var b=this.cellEditor.textarea.getElementsByTagName("img"),d=[],g=0;g<b.length;g++)d.push(b[g]);document.execCommand("insertimage",!1,a);a=this.cellEditor.textarea.getElementsByTagName("img");if(a.length==d.length+1)for(g=a.length-1;0<=g;g--)if(0==g||a[g]!=d[g-1]){a[g].setAttribute("width",c);a[g].setAttribute("height",e);break}}};Graph.prototype.insertLink=function(a){if(null!=this.cellEditor.textarea)if(0==
+mouseDown:function(a,c){this.startX=c.getGraphX();this.startY=c.getGraphY();this.scrollLeft=f.container.scrollLeft;this.scrollTop=f.container.scrollTop;null==this.currentLink&&"auto"==f.container.style.overflow&&(f.container.style.cursor="move");this.updateCurrentState(c)},mouseMove:function(a,c){if(f.isMouseDown){if(null!=this.currentLink){var e=Math.abs(this.startX-c.getGraphX()),b=Math.abs(this.startY-c.getGraphY());(e>k||b>k)&&this.clear()}}else{for(e=c.getSource();null!=e&&"a"!=e.nodeName.toLowerCase();)e=
+e.parentNode;null!=e?this.clear():(null!=f.tooltipHandler&&null!=this.currentLink&&null!=this.currentState&&f.tooltipHandler.reset(c,!0,this.currentState),(null==this.currentState||c.getState()!=this.currentState&&null!=c.sourceState||!f.intersects(this.currentState,c.getGraphX(),c.getGraphY()))&&this.updateCurrentState(c))}},mouseUp:function(a,b){for(var d=b.getSource(),g=b.getEvent();null!=d&&"a"!=d.nodeName.toLowerCase();)d=d.parentNode;null==d&&Math.abs(this.scrollLeft-f.container.scrollLeft)<
+k&&Math.abs(this.scrollTop-f.container.scrollTop)<k&&(null==b.sourceState||!b.isSource(b.sourceState.control))&&((mxEvent.isLeftMouseButton(g)||mxEvent.isMiddleMouseButton(g))&&!mxEvent.isPopupTrigger(g)||mxEvent.isTouchEvent(g))&&(null!=this.currentLink?(d=f.isBlankLink(this.currentLink),"data:"!==this.currentLink.substring(0,5)&&d||null==c||c(g,this.currentLink),mxEvent.isConsumed(g)||(g=null!=this.currentTarget?this.currentTarget:mxEvent.isMiddleMouseButton(g)?"_blank":d?f.linkTarget:"_top",f.openLink(this.currentLink,
+g),b.consume())):null!=e&&!b.isConsumed()&&Math.abs(this.scrollLeft-f.container.scrollLeft)<k&&Math.abs(this.scrollTop-f.container.scrollTop)<k&&Math.abs(this.startX-b.getGraphX())<k&&Math.abs(this.startY-b.getGraphY())<k&&e(b.getEvent()));this.clear()},activate:function(a){this.currentLink=f.getAbsoluteUrl(f.getLinkForCell(a.cell));null!=this.currentLink&&(this.currentTarget=f.getLinkTargetForCell(a.cell),f.container.style.cursor="pointer",null!=this.highlight&&this.highlight.highlight(a))},clear:function(){null!=
+f.container&&(f.container.style.cursor=d);this.currentLink=this.currentState=this.currentTarget=null;null!=this.highlight&&this.highlight.hide();null!=f.tooltipHandler&&f.tooltipHandler.hide()}};f.click=function(a){};f.addMouseListener(g);mxEvent.addListener(document,"mouseleave",function(a){g.clear()})};Graph.prototype.duplicateCells=function(a,c){a=null!=a?a:this.getSelectionCells();c=null!=c?c:!0;for(var e=0;e<a.length;e++)this.isTableCell(a[e])&&(a[e]=this.model.getParent(a[e]));a=this.model.getTopmostCells(a);
+var b=this.getModel(),d=this.gridSize,k=[];b.beginUpdate();try{for(var f={},g=this.createCellLookup(a),l=this.cloneCells(a,!1,f,!0),e=0;e<a.length;e++){var n=b.getParent(a[e]),v=this.moveCells([l[e]],d,d,!1)[0];k.push(v);if(c)b.add(n,l[e]);else{var q=n.getIndex(a[e]);b.add(n,l[e],q+1)}if(this.isTable(n)){var t=this.getCellGeometry(l[e]),u=this.getCellGeometry(n);null!=t&&null!=u&&(u=u.clone(),u.height+=t.height,b.setGeometry(n,u))}}this.updateCustomLinks(this.createCellMapping(f,g),l,this)}finally{b.endUpdate()}return k};
+Graph.prototype.insertImage=function(a,c,e){if(null!=a&&null!=this.cellEditor.textarea){for(var b=this.cellEditor.textarea.getElementsByTagName("img"),d=[],k=0;k<b.length;k++)d.push(b[k]);document.execCommand("insertimage",!1,a);a=this.cellEditor.textarea.getElementsByTagName("img");if(a.length==d.length+1)for(k=a.length-1;0<=k;k--)if(0==k||a[k]!=d[k-1]){a[k].setAttribute("width",c);a[k].setAttribute("height",e);break}}};Graph.prototype.insertLink=function(a){if(null!=this.cellEditor.textarea)if(0==
a.length)document.execCommand("unlink",!1);else if(mxClient.IS_FF){for(var c=this.cellEditor.textarea.getElementsByTagName("a"),e=[],b=0;b<c.length;b++)e.push(c[b]);document.execCommand("createlink",!1,mxUtils.trim(a));c=this.cellEditor.textarea.getElementsByTagName("a");if(c.length==e.length+1)for(b=c.length-1;0<=b;b--)if(c[b]!=e[b-1]){for(c=c[b].getElementsByTagName("a");0<c.length;){for(e=c[0].parentNode;null!=c[0].firstChild;)e.insertBefore(c[0].firstChild,c[0]);e.removeChild(c[0])}break}}else document.execCommand("createlink",
-!1,mxUtils.trim(a))};Graph.prototype.isCellResizable=function(a){var c=mxGraph.prototype.isCellResizable.apply(this,arguments),e=this.getCurrentCellStyle(a);return!this.isTableCell(a)&&!this.isTableRow(a)&&(c||"0"!=mxUtils.getValue(e,mxConstants.STYLE_RESIZABLE,"1")&&"wrap"==e[mxConstants.STYLE_WHITE_SPACE])};Graph.prototype.distributeCells=function(a,c){null==c&&(c=this.getSelectionCells());if(null!=c&&1<c.length){for(var e=[],b=null,d=null,g=0;g<c.length;g++)if(this.getModel().isVertex(c[g])){var f=
-this.view.getState(c[g]);if(null!=f){var k=a?f.getCenterX():f.getCenterY(),b=null!=b?Math.max(b,k):k,d=null!=d?Math.min(d,k):k;e.push(f)}}if(2<e.length){e.sort(function(c,e){return a?c.x-e.x:c.y-e.y});f=this.view.translate;k=this.view.scale;d=d/k-(a?f.x:f.y);b=b/k-(a?f.x:f.y);this.getModel().beginUpdate();try{for(var l=(b-d)/(e.length-1),b=d,g=1;g<e.length-1;g++){var n=this.view.getState(this.model.getParent(e[g].cell)),v=this.getCellGeometry(e[g].cell),b=b+l;null!=v&&null!=n&&(v=v.clone(),a?v.x=
-Math.round(b-v.width/2)-n.origin.x:v.y=Math.round(b-v.height/2)-n.origin.y,this.getModel().setGeometry(e[g].cell,v))}}finally{this.getModel().endUpdate()}}}return c};Graph.prototype.isCloneEvent=function(a){return mxClient.IS_MAC&&mxEvent.isMetaDown(a)||mxEvent.isControlDown(a)};Graph.prototype.createSvgImageExport=function(){var a=new mxImageExport;a.getLinkForCellState=mxUtils.bind(this,function(a,c){return this.getLinkForCell(a.cell)});return a};Graph.prototype.parseBackgroundImage=function(a){var c=
-null;null!=a&&0<a.length&&(a=JSON.parse(a),c=new mxImage(a.src,a.width,a.height));return c};Graph.prototype.getBackgroundImageObject=function(a){return a};Graph.prototype.getSvg=function(a,c,e,b,d,g,f,k,l,n,v,q,t,u){var m=null;if(null!=u)for(m=new mxDictionary,v=0;v<u.length;v++)m.put(u[v],!0);if(u=this.useCssTransforms)this.useCssTransforms=!1,this.view.revalidate(),this.sizeDidChange();try{c=null!=c?c:1;e=null!=e?e:0;d=null!=d?d:!0;g=null!=g?g:!0;f=null!=f?f:!0;var D="page"==t?this.view.getBackgroundPageBounds():
-g&&null==m||b||"diagram"==t?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells()),B=this.view.scale;"diagram"==t&&null!=this.backgroundImage&&D.add(new mxRectangle((this.view.translate.x+this.backgroundImage.x)*B,(this.view.translate.y+this.backgroundImage.y)*B,this.backgroundImage.width*B,this.backgroundImage.height*B));if(null==D)throw Error(mxResources.get("drawingEmpty"));var x=mxUtils.createXmlDocument(),p=null!=x.createElementNS?x.createElementNS(mxConstants.NS_SVG,"svg"):x.createElement("svg");
-null!=a&&(null!=p.style?p.style.backgroundColor=a:p.setAttribute("style","background-color:"+a));null==x.createElementNS?(p.setAttribute("xmlns",mxConstants.NS_SVG),p.setAttribute("xmlns:xlink",mxConstants.NS_XLINK)):p.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",mxConstants.NS_XLINK);a=c/B;var z=Math.max(1,Math.ceil(D.width*a)+2*e)+(n?5:0),L=Math.max(1,Math.ceil(D.height*a)+2*e)+(n?5:0);p.setAttribute("version","1.1");p.setAttribute("width",z+"px");p.setAttribute("height",L+"px");
-p.setAttribute("viewBox",(d?"-0.5 -0.5":"0 0")+" "+z+" "+L);x.appendChild(p);var Y=null!=x.createElementNS?x.createElementNS(mxConstants.NS_SVG,"g"):x.createElement("g");p.appendChild(Y);var J=this.createSvgCanvas(Y);J.foOffset=d?-.5:0;J.textOffset=d?-.5:0;J.imageOffset=d?-.5:0;J.translate(Math.floor(e/c-D.x/B),Math.floor(e/c-D.y/B));var A=document.createElement("div"),C=J.getAlternateText;J.getAlternateText=function(a,c,e,b,d,g,f,k,l,n,v,q,y){if(null!=g&&0<this.state.fontSize)try{mxUtils.isNode(g)?
-g=g.innerText:(A.innerHTML=g,g=mxUtils.extractTextWithWhitespace(A.childNodes));for(var sa=Math.ceil(2*b/this.state.fontSize),Pa=[],oa=0,Qa=0;(0==sa||oa<sa)&&Qa<g.length;){var Ta=g.charCodeAt(Qa);if(10==Ta||13==Ta){if(0<oa)break}else Pa.push(g.charAt(Qa)),255>Ta&&oa++;Qa++}Pa.length<g.length&&1<g.length-Pa.length&&(g=mxUtils.trim(Pa.join(""))+"...");return g}catch(fb){return C.apply(this,arguments)}else return C.apply(this,arguments)};var N=this.backgroundImage;if(null!=N){c=B/c;var W=this.view.translate,
-qa=new mxRectangle((N.x+W.x)*c,(N.y+W.y)*c,N.width*c,N.height*c);mxUtils.intersects(D,qa)&&J.image(N.x+W.x,N.y+W.y,N.width,N.height,N.src,!0)}J.scale(a);J.textEnabled=f;k=null!=k?k:this.createSvgImageExport();var E=k.drawCellState,Q=k.getLinkForCellState;k.getLinkForCellState=function(a,c){var e=Q.apply(this,arguments);return null==e||a.view.graph.isCustomLink(e)?null:e};k.getLinkTargetForCellState=function(a,c){return a.view.graph.getLinkTargetForCell(a.cell)};k.drawCellState=function(a,c){for(var e=
-a.view.graph,b=null!=m?m.get(a.cell):e.isCellSelected(a.cell),d=e.model.getParent(a.cell);!(g&&null==m||b)&&null!=d;)b=null!=m?m.get(d):e.isCellSelected(d),d=e.model.getParent(d);(g&&null==m||b)&&E.apply(this,arguments)};k.drawState(this.getView().getState(this.model.root),J);this.updateSvgLinks(p,l,!0);this.addForeignObjectWarning(J,p);return p}finally{u&&(this.useCssTransforms=!0,this.view.revalidate(),this.sizeDidChange())}};Graph.prototype.addForeignObjectWarning=function(a,c){if("0"!=urlParams["svg-warning"]&&
+!1,mxUtils.trim(a))};Graph.prototype.isCellResizable=function(a){var c=mxGraph.prototype.isCellResizable.apply(this,arguments),e=this.getCurrentCellStyle(a);return!this.isTableCell(a)&&!this.isTableRow(a)&&(c||"0"!=mxUtils.getValue(e,mxConstants.STYLE_RESIZABLE,"1")&&"wrap"==e[mxConstants.STYLE_WHITE_SPACE])};Graph.prototype.distributeCells=function(a,c){null==c&&(c=this.getSelectionCells());if(null!=c&&1<c.length){for(var e=[],b=null,d=null,k=0;k<c.length;k++)if(this.getModel().isVertex(c[k])){var f=
+this.view.getState(c[k]);if(null!=f){var g=a?f.getCenterX():f.getCenterY(),b=null!=b?Math.max(b,g):g,d=null!=d?Math.min(d,g):g;e.push(f)}}if(2<e.length){e.sort(function(c,e){return a?c.x-e.x:c.y-e.y});f=this.view.translate;g=this.view.scale;d=d/g-(a?f.x:f.y);b=b/g-(a?f.x:f.y);this.getModel().beginUpdate();try{for(var l=(b-d)/(e.length-1),b=d,k=1;k<e.length-1;k++){var n=this.view.getState(this.model.getParent(e[k].cell)),v=this.getCellGeometry(e[k].cell),b=b+l;null!=v&&null!=n&&(v=v.clone(),a?v.x=
+Math.round(b-v.width/2)-n.origin.x:v.y=Math.round(b-v.height/2)-n.origin.y,this.getModel().setGeometry(e[k].cell,v))}}finally{this.getModel().endUpdate()}}}return c};Graph.prototype.isCloneEvent=function(a){return mxClient.IS_MAC&&mxEvent.isMetaDown(a)||mxEvent.isControlDown(a)};Graph.prototype.createSvgImageExport=function(){var a=new mxImageExport;a.getLinkForCellState=mxUtils.bind(this,function(a,c){return this.getLinkForCell(a.cell)});return a};Graph.prototype.parseBackgroundImage=function(a){var c=
+null;null!=a&&0<a.length&&(a=JSON.parse(a),c=new mxImage(a.src,a.width,a.height));return c};Graph.prototype.getBackgroundImageObject=function(a){return a};Graph.prototype.getSvg=function(a,c,e,b,d,k,f,g,l,n,v,q,t,u){var m=null;if(null!=u)for(m=new mxDictionary,v=0;v<u.length;v++)m.put(u[v],!0);if(u=this.useCssTransforms)this.useCssTransforms=!1,this.view.revalidate(),this.sizeDidChange();try{c=null!=c?c:1;e=null!=e?e:0;d=null!=d?d:!0;k=null!=k?k:!0;f=null!=f?f:!0;var C="page"==t?this.view.getBackgroundPageBounds():
+k&&null==m||b||"diagram"==t?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells()),B=this.view.scale;"diagram"==t&&null!=this.backgroundImage&&C.add(new mxRectangle((this.view.translate.x+this.backgroundImage.x)*B,(this.view.translate.y+this.backgroundImage.y)*B,this.backgroundImage.width*B,this.backgroundImage.height*B));if(null==C)throw Error(mxResources.get("drawingEmpty"));var x=mxUtils.createXmlDocument(),p=null!=x.createElementNS?x.createElementNS(mxConstants.NS_SVG,"svg"):x.createElement("svg");
+null!=a&&(null!=p.style?p.style.backgroundColor=a:p.setAttribute("style","background-color:"+a));null==x.createElementNS?(p.setAttribute("xmlns",mxConstants.NS_SVG),p.setAttribute("xmlns:xlink",mxConstants.NS_XLINK)):p.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",mxConstants.NS_XLINK);a=c/B;var z=Math.max(1,Math.ceil(C.width*a)+2*e)+(n?5:0),L=Math.max(1,Math.ceil(C.height*a)+2*e)+(n?5:0);p.setAttribute("version","1.1");p.setAttribute("width",z+"px");p.setAttribute("height",L+"px");
+p.setAttribute("viewBox",(d?"-0.5 -0.5":"0 0")+" "+z+" "+L);x.appendChild(p);var ea=null!=x.createElementNS?x.createElementNS(mxConstants.NS_SVG,"g"):x.createElement("g");p.appendChild(ea);var J=this.createSvgCanvas(ea);J.foOffset=d?-.5:0;J.textOffset=d?-.5:0;J.imageOffset=d?-.5:0;J.translate(Math.floor(e/c-C.x/B),Math.floor(e/c-C.y/B));var A=document.createElement("div"),D=J.getAlternateText;J.getAlternateText=function(a,c,e,b,d,k,f,g,l,n,v,q,y){if(null!=k&&0<this.state.fontSize)try{mxUtils.isNode(k)?
+k=k.innerText:(A.innerHTML=k,k=mxUtils.extractTextWithWhitespace(A.childNodes));for(var sa=Math.ceil(2*b/this.state.fontSize),Pa=[],oa=0,Qa=0;(0==sa||oa<sa)&&Qa<k.length;){var Ta=k.charCodeAt(Qa);if(10==Ta||13==Ta){if(0<oa)break}else Pa.push(k.charAt(Qa)),255>Ta&&oa++;Qa++}Pa.length<k.length&&1<k.length-Pa.length&&(k=mxUtils.trim(Pa.join(""))+"...");return k}catch(fb){return D.apply(this,arguments)}else return D.apply(this,arguments)};var N=this.backgroundImage;if(null!=N){c=B/c;var W=this.view.translate,
+qa=new mxRectangle((N.x+W.x)*c,(N.y+W.y)*c,N.width*c,N.height*c);mxUtils.intersects(C,qa)&&J.image(N.x+W.x,N.y+W.y,N.width,N.height,N.src,!0)}J.scale(a);J.textEnabled=f;g=null!=g?g:this.createSvgImageExport();var E=g.drawCellState,Q=g.getLinkForCellState;g.getLinkForCellState=function(a,c){var e=Q.apply(this,arguments);return null==e||a.view.graph.isCustomLink(e)?null:e};g.getLinkTargetForCellState=function(a,c){return a.view.graph.getLinkTargetForCell(a.cell)};g.drawCellState=function(a,c){for(var e=
+a.view.graph,b=null!=m?m.get(a.cell):e.isCellSelected(a.cell),d=e.model.getParent(a.cell);!(k&&null==m||b)&&null!=d;)b=null!=m?m.get(d):e.isCellSelected(d),d=e.model.getParent(d);(k&&null==m||b)&&E.apply(this,arguments)};g.drawState(this.getView().getState(this.model.root),J);this.updateSvgLinks(p,l,!0);this.addForeignObjectWarning(J,p);return p}finally{u&&(this.useCssTransforms=!0,this.view.revalidate(),this.sizeDidChange())}};Graph.prototype.addForeignObjectWarning=function(a,c){if("0"!=urlParams["svg-warning"]&&
0<c.getElementsByTagName("foreignObject").length){var e=a.createElement("switch"),b=a.createElement("g");b.setAttribute("requiredFeatures","http://www.w3.org/TR/SVG11/feature#Extensibility");var d=a.createElement("a");d.setAttribute("transform","translate(0,-5)");null==d.setAttributeNS||c.ownerDocument!=document&&null==document.documentMode?(d.setAttribute("xlink:href",Graph.foreignObjectWarningLink),d.setAttribute("target","_blank")):(d.setAttributeNS(mxConstants.NS_XLINK,"xlink:href",Graph.foreignObjectWarningLink),
-d.setAttributeNS(mxConstants.NS_XLINK,"target","_blank"));var g=a.createElement("text");g.setAttribute("text-anchor","middle");g.setAttribute("font-size","10px");g.setAttribute("x","50%");g.setAttribute("y","100%");mxUtils.write(g,Graph.foreignObjectWarningText);e.appendChild(b);d.appendChild(g);e.appendChild(d);c.appendChild(e)}};Graph.prototype.updateSvgLinks=function(a,c,e){a=a.getElementsByTagName("a");for(var b=0;b<a.length;b++)if(null==a[b].getAttribute("target")){var d=a[b].getAttribute("href");
+d.setAttributeNS(mxConstants.NS_XLINK,"target","_blank"));var k=a.createElement("text");k.setAttribute("text-anchor","middle");k.setAttribute("font-size","10px");k.setAttribute("x","50%");k.setAttribute("y","100%");mxUtils.write(k,Graph.foreignObjectWarningText);e.appendChild(b);d.appendChild(k);e.appendChild(d);c.appendChild(e)}};Graph.prototype.updateSvgLinks=function(a,c,e){a=a.getElementsByTagName("a");for(var b=0;b<a.length;b++)if(null==a[b].getAttribute("target")){var d=a[b].getAttribute("href");
null==d&&(d=a[b].getAttribute("xlink:href"));null!=d&&(null!=c&&/^https?:\/\//.test(d)?a[b].setAttribute("target",c):e&&this.isCustomLink(d)&&a[b].setAttribute("href","javascript:void(0);"))}};Graph.prototype.createSvgCanvas=function(a){a=new mxSvgCanvas2D(a);a.pointerEvents=!0;return a};Graph.prototype.getSelectedElement=function(){var a=null;if(window.getSelection){var c=window.getSelection();c.getRangeAt&&c.rangeCount&&(a=c.getRangeAt(0).commonAncestorContainer)}else document.selection&&(a=document.selection.createRange().parentElement());
return a};Graph.prototype.getSelectedEditingElement=function(){for(var a=this.getSelectedElement();null!=a&&a.nodeType!=mxConstants.NODETYPE_ELEMENT;)a=a.parentNode;null!=a&&a==this.cellEditor.textarea&&1==this.cellEditor.textarea.children.length&&this.cellEditor.textarea.firstChild.nodeType==mxConstants.NODETYPE_ELEMENT&&(a=this.cellEditor.textarea.firstChild);return a};Graph.prototype.getParentByName=function(a,c,e){for(;null!=a&&a.nodeName!=c;){if(a==e)return null;a=a.parentNode}return a};Graph.prototype.getParentByNames=
function(a,c,e){for(;null!=a&&!(0<=mxUtils.indexOf(c,a.nodeName));){if(a==e)return null;a=a.parentNode}return a};Graph.prototype.selectNode=function(a){var c=null;if(window.getSelection){if(c=window.getSelection(),c.getRangeAt&&c.rangeCount){var e=document.createRange();e.selectNode(a);c.removeAllRanges();c.addRange(e)}}else(c=document.selection)&&"Control"!=c.type&&(a=c.createRange(),a.collapse(!0),e=c.createRange(),e.setEndPoint("StartToStart",a),e.select())};Graph.prototype.deleteCells=function(a,
-c){var e=null;if(null!=a&&0<a.length){this.model.beginUpdate();try{for(var b=0;b<a.length;b++){var d=this.model.getParent(a[b]);if(this.isTable(d)){var g=this.getCellGeometry(a[b]),f=this.getCellGeometry(d);null!=g&&null!=f&&(f=f.clone(),f.height-=g.height,this.model.setGeometry(d,f))}}var k=this.selectParentAfterDelete?this.model.getParents(a):null;this.removeCells(a,c)}finally{this.model.endUpdate()}if(null!=k)for(e=[],b=0;b<k.length;b++)this.model.contains(k[b])&&(this.model.isVertex(k[b])||this.model.isEdge(k[b]))&&
-e.push(k[b])}return e};Graph.prototype.insertTableColumn=function(a,c){var e=this.getModel();e.beginUpdate();try{var b=a,d=0;if(this.isTableCell(a))var g=e.getParent(a),b=e.getParent(g),d=mxUtils.indexOf(e.getChildCells(g,!0),a);else this.isTableRow(a)?b=e.getParent(a):a=e.getChildCells(b,!0)[0],c||(d=e.getChildCells(a,!0).length-1);for(var f=e.getChildCells(b,!0),k=Graph.minTableColumnWidth,g=0;g<f.length;g++){var l=e.getChildCells(f[g],!0)[d],n=e.cloneCell(l,!1),v=this.getCellGeometry(n);n.value=
-null;if(null!=v){var k=v.width,q=this.getCellGeometry(f[g]);null!=q&&(v.height=q.height)}e.add(f[g],n,d+(c?0:1))}var t=this.getCellGeometry(b);null!=t&&(t=t.clone(),t.width+=k,e.setGeometry(b,t))}finally{e.endUpdate()}};Graph.prototype.insertTableRow=function(a,c){var e=this.getModel();e.beginUpdate();try{var b=a,d=a;if(this.isTableCell(a))d=e.getParent(a),b=e.getParent(d);else if(this.isTableRow(a))b=e.getParent(a);else var g=e.getChildCells(b,!0),d=g[c?0:g.length-1];var f=e.getChildCells(d,!0),
-k=b.getIndex(d),d=e.cloneCell(d,!1);d.value=null;var l=this.getCellGeometry(d);if(null!=l){for(g=0;g<f.length;g++){a=e.cloneCell(f[g],!1);d.insert(a);a.value=null;var n=this.getCellGeometry(a);null!=n&&(n.height=l.height)}e.add(b,d,k+(c?0:1));var v=this.getCellGeometry(b);null!=v&&(v=v.clone(),v.height+=l.height,e.setGeometry(b,v))}}finally{e.endUpdate()}};Graph.prototype.deleteTableColumn=function(a){var c=this.getModel();c.beginUpdate();try{var e=a,b=a;this.isTableCell(a)&&(b=c.getParent(a));this.isTableRow(b)&&
-(e=c.getParent(b));var d=c.getChildCells(e,!0);if(0==d.length)c.remove(e);else{this.isTableRow(b)||(b=d[0]);var g=c.getChildCells(b,!0);if(1>=g.length)c.remove(e);else{var f=g.length-1;this.isTableCell(a)&&(f=mxUtils.indexOf(g,a));for(b=a=0;b<d.length;b++){var k=c.getChildCells(d[b],!0)[f];c.remove(k);var l=this.getCellGeometry(k);null!=l&&(a=Math.max(a,l.width))}var n=this.getCellGeometry(e);null!=n&&(n=n.clone(),n.width-=a,c.setGeometry(e,n))}}}finally{c.endUpdate()}};Graph.prototype.deleteTableRow=
-function(a){var c=this.getModel();c.beginUpdate();try{var e=a,b=a;this.isTableCell(a)&&(a=b=c.getParent(a));this.isTableRow(a)&&(e=c.getParent(b));var d=c.getChildCells(e,!0);if(1>=d.length)c.remove(e);else{this.isTableRow(b)||(b=d[d.length-1]);c.remove(b);a=0;var g=this.getCellGeometry(b);null!=g&&(a=g.height);var f=this.getCellGeometry(e);null!=f&&(f=f.clone(),f.height-=a,c.setGeometry(e,f))}}finally{c.endUpdate()}};Graph.prototype.insertRow=function(a,c){for(var e=a.tBodies[0],b=e.rows[0].cells,
-d=0,g=0;g<b.length;g++)var f=b[g].getAttribute("colspan"),d=d+(null!=f?parseInt(f):1);e=e.insertRow(c);for(g=0;g<d;g++)mxUtils.br(e.insertCell(-1));return e.cells[0]};Graph.prototype.deleteRow=function(a,c){a.tBodies[0].deleteRow(c)};Graph.prototype.insertColumn=function(a,c){var e=a.tHead;if(null!=e)for(var b=0;b<e.rows.length;b++){var d=document.createElement("th");e.rows[b].appendChild(d);mxUtils.br(d)}e=a.tBodies[0];for(b=0;b<e.rows.length;b++)d=e.rows[b].insertCell(c),mxUtils.br(d);return e.rows[0].cells[0<=
+c){var e=null;if(null!=a&&0<a.length){this.model.beginUpdate();try{for(var b=0;b<a.length;b++){var d=this.model.getParent(a[b]);if(this.isTable(d)){var k=this.getCellGeometry(a[b]),f=this.getCellGeometry(d);null!=k&&null!=f&&(f=f.clone(),f.height-=k.height,this.model.setGeometry(d,f))}}var g=this.selectParentAfterDelete?this.model.getParents(a):null;this.removeCells(a,c)}finally{this.model.endUpdate()}if(null!=g)for(e=[],b=0;b<g.length;b++)this.model.contains(g[b])&&(this.model.isVertex(g[b])||this.model.isEdge(g[b]))&&
+e.push(g[b])}return e};Graph.prototype.insertTableColumn=function(a,c){var e=this.getModel();e.beginUpdate();try{var b=a,d=0;if(this.isTableCell(a))var k=e.getParent(a),b=e.getParent(k),d=mxUtils.indexOf(e.getChildCells(k,!0),a);else this.isTableRow(a)?b=e.getParent(a):a=e.getChildCells(b,!0)[0],c||(d=e.getChildCells(a,!0).length-1);for(var f=e.getChildCells(b,!0),g=Graph.minTableColumnWidth,k=0;k<f.length;k++){var l=e.getChildCells(f[k],!0)[d],n=e.cloneCell(l,!1),v=this.getCellGeometry(n);n.value=
+null;if(null!=v){var g=v.width,q=this.getCellGeometry(f[k]);null!=q&&(v.height=q.height)}e.add(f[k],n,d+(c?0:1))}var t=this.getCellGeometry(b);null!=t&&(t=t.clone(),t.width+=g,e.setGeometry(b,t))}finally{e.endUpdate()}};Graph.prototype.insertTableRow=function(a,c){var e=this.getModel();e.beginUpdate();try{var b=a,d=a;if(this.isTableCell(a))d=e.getParent(a),b=e.getParent(d);else if(this.isTableRow(a))b=e.getParent(a);else var k=e.getChildCells(b,!0),d=k[c?0:k.length-1];var f=e.getChildCells(d,!0),
+g=b.getIndex(d),d=e.cloneCell(d,!1);d.value=null;var l=this.getCellGeometry(d);if(null!=l){for(k=0;k<f.length;k++){a=e.cloneCell(f[k],!1);d.insert(a);a.value=null;var n=this.getCellGeometry(a);null!=n&&(n.height=l.height)}e.add(b,d,g+(c?0:1));var v=this.getCellGeometry(b);null!=v&&(v=v.clone(),v.height+=l.height,e.setGeometry(b,v))}}finally{e.endUpdate()}};Graph.prototype.deleteTableColumn=function(a){var c=this.getModel();c.beginUpdate();try{var e=a,b=a;this.isTableCell(a)&&(b=c.getParent(a));this.isTableRow(b)&&
+(e=c.getParent(b));var d=c.getChildCells(e,!0);if(0==d.length)c.remove(e);else{this.isTableRow(b)||(b=d[0]);var k=c.getChildCells(b,!0);if(1>=k.length)c.remove(e);else{var f=k.length-1;this.isTableCell(a)&&(f=mxUtils.indexOf(k,a));for(b=a=0;b<d.length;b++){var g=c.getChildCells(d[b],!0)[f];c.remove(g);var l=this.getCellGeometry(g);null!=l&&(a=Math.max(a,l.width))}var n=this.getCellGeometry(e);null!=n&&(n=n.clone(),n.width-=a,c.setGeometry(e,n))}}}finally{c.endUpdate()}};Graph.prototype.deleteTableRow=
+function(a){var c=this.getModel();c.beginUpdate();try{var e=a,b=a;this.isTableCell(a)&&(a=b=c.getParent(a));this.isTableRow(a)&&(e=c.getParent(b));var d=c.getChildCells(e,!0);if(1>=d.length)c.remove(e);else{this.isTableRow(b)||(b=d[d.length-1]);c.remove(b);a=0;var k=this.getCellGeometry(b);null!=k&&(a=k.height);var f=this.getCellGeometry(e);null!=f&&(f=f.clone(),f.height-=a,c.setGeometry(e,f))}}finally{c.endUpdate()}};Graph.prototype.insertRow=function(a,c){for(var e=a.tBodies[0],b=e.rows[0].cells,
+d=0,k=0;k<b.length;k++)var f=b[k].getAttribute("colspan"),d=d+(null!=f?parseInt(f):1);e=e.insertRow(c);for(k=0;k<d;k++)mxUtils.br(e.insertCell(-1));return e.cells[0]};Graph.prototype.deleteRow=function(a,c){a.tBodies[0].deleteRow(c)};Graph.prototype.insertColumn=function(a,c){var e=a.tHead;if(null!=e)for(var b=0;b<e.rows.length;b++){var d=document.createElement("th");e.rows[b].appendChild(d);mxUtils.br(d)}e=a.tBodies[0];for(b=0;b<e.rows.length;b++)d=e.rows[b].insertCell(c),mxUtils.br(d);return e.rows[0].cells[0<=
c?c:e.rows[0].cells.length-1]};Graph.prototype.deleteColumn=function(a,c){if(0<=c)for(var e=a.tBodies[0].rows,b=0;b<e.length;b++)e[b].cells.length>c&&e[b].deleteCell(c)};Graph.prototype.pasteHtmlAtCaret=function(a){var c;if(window.getSelection){if(c=window.getSelection(),c.getRangeAt&&c.rangeCount){c=c.getRangeAt(0);c.deleteContents();var e=document.createElement("div");e.innerHTML=a;a=document.createDocumentFragment();for(var b;b=e.firstChild;)lastNode=a.appendChild(b);c.insertNode(a)}}else(c=document.selection)&&
"Control"!=c.type&&c.createRange().pasteHTML(a)};Graph.prototype.createLinkForHint=function(a,c){function e(a,c){a.length>c&&(a=a.substring(0,Math.round(c/2))+"..."+a.substring(a.length-Math.round(c/4)));return a}a=null!=a?a:"javascript:void(0);";if(null==c||0==c.length)c=this.isCustomLink(a)?this.getLinkTitle(a):a;var b=document.createElement("a");b.setAttribute("rel",this.linkRelation);b.setAttribute("href",this.getAbsoluteUrl(a));b.setAttribute("title",e(this.isCustomLink(a)?this.getLinkTitle(a):
a,80));null!=this.linkTarget&&b.setAttribute("target",this.linkTarget);mxUtils.write(b,e(c,40));this.isCustomLink(a)&&mxEvent.addListener(b,"click",mxUtils.bind(this,function(c){this.customLinkClicked(a);mxEvent.consume(c)}));return b};Graph.prototype.initTouch=function(){this.connectionHandler.marker.isEnabled=function(){return null!=this.graph.connectionHandler.first};this.addListener(mxEvent.START_EDITING,function(a,c){this.popupMenuHandler.hideMenu()});var a=this.updateMouseEvent;this.updateMouseEvent=
function(c){c=a.apply(this,arguments);if(mxEvent.isTouchEvent(c.getEvent())&&null==c.getState()){var e=this.getCellAt(c.graphX,c.graphY);null!=e&&this.isSwimlane(e)&&this.hitsSwimlaneContent(e,c.graphX,c.graphY)||(c.state=this.view.getState(e),null!=c.state&&null!=c.state.shape&&(this.container.style.cursor=c.state.shape.node.style.cursor))}null==c.getState()&&this.isEnabled()&&(this.container.style.cursor="default");return c};var c=!1,e=!1,b=!1,d=this.fireMouseEvent;this.fireMouseEvent=function(a,
-g,f){a==mxEvent.MOUSE_DOWN&&(g=this.updateMouseEvent(g),c=this.isCellSelected(g.getCell()),e=this.isSelectionEmpty(),b=this.popupMenuHandler.isMenuShowing());d.apply(this,arguments)};this.popupMenuHandler.mouseUp=mxUtils.bind(this,function(a,d){this.popupMenuHandler.popupTrigger=!this.isEditing()&&this.isEnabled()&&(null==d.getState()||!d.isSource(d.getState().control))&&(this.popupMenuHandler.popupTrigger||!b&&!mxEvent.isMouseEvent(d.getEvent())&&(e&&null==d.getCell()&&this.isSelectionEmpty()||c&&
-this.isCellSelected(d.getCell())));var g=c?mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,function(a){if(!this.isEditing()){var c=mxUtils.getScrollOrigin();this.popupMenuHandler.popup(d.getX()+c.x+1,d.getY()+c.y+1,a,d.getEvent())}}),500)}):null;mxPopupMenuHandler.prototype.mouseUp.apply(this.popupMenuHandler,[a,d,g])})};mxCellEditor.prototype.isContentEditing=function(){var a=this.graph.view.getState(this.editingCell);return null!=a&&1==a.style.html};mxCellEditor.prototype.isTableSelected=
+k,f){a==mxEvent.MOUSE_DOWN&&(k=this.updateMouseEvent(k),c=this.isCellSelected(k.getCell()),e=this.isSelectionEmpty(),b=this.popupMenuHandler.isMenuShowing());d.apply(this,arguments)};this.popupMenuHandler.mouseUp=mxUtils.bind(this,function(a,d){this.popupMenuHandler.popupTrigger=!this.isEditing()&&this.isEnabled()&&(null==d.getState()||!d.isSource(d.getState().control))&&(this.popupMenuHandler.popupTrigger||!b&&!mxEvent.isMouseEvent(d.getEvent())&&(e&&null==d.getCell()&&this.isSelectionEmpty()||c&&
+this.isCellSelected(d.getCell())));var k=c?mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,function(a){if(!this.isEditing()){var c=mxUtils.getScrollOrigin();this.popupMenuHandler.popup(d.getX()+c.x+1,d.getY()+c.y+1,a,d.getEvent())}}),500)}):null;mxPopupMenuHandler.prototype.mouseUp.apply(this.popupMenuHandler,[a,d,k])})};mxCellEditor.prototype.isContentEditing=function(){var a=this.graph.view.getState(this.editingCell);return null!=a&&1==a.style.html};mxCellEditor.prototype.isTableSelected=
function(){return null!=this.graph.getParentByName(this.graph.getSelectedElement(),"TABLE",this.textarea)};mxCellEditor.prototype.isTextSelected=function(){var a="";window.getSelection?a=window.getSelection():document.getSelection?a=document.getSelection():document.selection&&(a=document.selection.createRange().text);return""!=a};mxCellEditor.prototype.insertTab=function(a){var c=this.textarea.ownerDocument.defaultView.getSelection(),e=c.getRangeAt(0),b="\t";if(null!=a)for(b="";0<a;)b+=" ",a--;a=
document.createElement("span");a.style.whiteSpace="pre";a.appendChild(document.createTextNode(b));e.insertNode(a);e.setStartAfter(a);e.setEndAfter(a);c.removeAllRanges();c.addRange(e)};mxCellEditor.prototype.alignText=function(a,c){var e=null!=c&&mxEvent.isShiftDown(c);if(e||null!=window.getSelection&&null!=window.getSelection().containsNode){var b=!0;this.graph.processElements(this.textarea,function(a){e||window.getSelection().containsNode(a,!0)?(a.removeAttribute("align"),a.style.textAlign=null):
b=!1});b&&this.graph.cellEditor.setAlign(a)}document.execCommand("justify"+a.toLowerCase(),!1,null)};mxCellEditor.prototype.saveSelection=function(){if(window.getSelection){var a=window.getSelection();if(a.getRangeAt&&a.rangeCount){for(var c=[],e=0,b=a.rangeCount;e<b;++e)c.push(a.getRangeAt(e));return c}}else if(document.selection&&document.selection.createRange)return document.selection.createRange();return null};mxCellEditor.prototype.restoreSelection=function(a){try{if(a)if(window.getSelection){sel=
@@ -2578,9 +2579,9 @@ this.codeViewMode=!1;this.switchSelectionState=null;this.graph.setSelectionCell(
for(var b=e.firstChild;null!=a&&null!=b;)c(a,b),a=a.nextSibling,b=b.nextSibling;return e}function e(a,c){if(null!=a)if(c.originalNode!=a)b(a);else for(a=a.firstChild,c=c.firstChild;null!=a;){var d=a.nextSibling;null==c?b(a):(e(a,c),c=c.nextSibling);a=d}}function b(a){for(var c=a.firstChild;null!=c;){var e=c.nextSibling;b(c);c=e}1==a.nodeType&&("BR"===a.nodeName||null!=a.firstChild)||3==a.nodeType&&0!=mxUtils.trim(mxUtils.getTextContent(a)).length?(3==a.nodeType&&mxUtils.setTextContent(a,mxUtils.getTextContent(a).replace(/\n|\r/g,
"")),1==a.nodeType&&(a.removeAttribute("style"),a.removeAttribute("class"),a.removeAttribute("width"),a.removeAttribute("cellpadding"),a.removeAttribute("cellspacing"),a.removeAttribute("border"))):a.parentNode.removeChild(a)}G.apply(this,arguments);7!==document.documentMode&&8!==document.documentMode&&mxEvent.addListener(this.textarea,"paste",mxUtils.bind(this,function(a){var b=c(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]>")?e(this.textarea,b):Graph.removePasteFormatting(this.textarea))}),0)}))};mxCellEditor.prototype.toggleViewMode=function(){var a=this.graph.view.getState(this.editingCell);if(null!=a){var c=null!=a&&"0"!=mxUtils.getValue(a.style,"nl2Br","1"),e=this.saveSelection();if(this.codeViewMode){l=mxUtils.extractTextWithWhitespace(this.textarea.childNodes);0<l.length&&"\n"==l.charAt(l.length-1)&&(l=l.substring(0,l.length-1));l=this.graph.sanitizeHtml(c?
-l.replace(/\n/g,"<br/>"):l,!0);this.textarea.className="mxCellEditor geContentEditable";var b=mxUtils.getValue(a.style,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE),c=mxUtils.getValue(a.style,mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY),d=mxUtils.getValue(a.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT),g=(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD,f=(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&
-mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC,k=[];(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&k.push("underline");(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_STRIKETHROUGH)==mxConstants.FONT_STRIKETHROUGH&&k.push("line-through");this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(b*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(b)+
-"px";this.textarea.style.textDecoration=k.join(" ");this.textarea.style.fontWeight=g?"bold":"normal";this.textarea.style.fontStyle=f?"italic":"";this.textarea.style.fontFamily=c;this.textarea.style.textAlign=d;this.textarea.style.padding="0px";this.textarea.innerHTML!=l&&(this.textarea.innerHTML=l,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==
+l.replace(/\n/g,"<br/>"):l,!0);this.textarea.className="mxCellEditor geContentEditable";var b=mxUtils.getValue(a.style,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE),c=mxUtils.getValue(a.style,mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY),d=mxUtils.getValue(a.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT),k=(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD,f=(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&
+mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC,g=[];(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&g.push("underline");(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_STRIKETHROUGH)==mxConstants.FONT_STRIKETHROUGH&&g.push("line-through");this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(b*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(b)+
+"px";this.textarea.style.textDecoration=g.join(" ");this.textarea.style.fontWeight=k?"bold":"normal";this.textarea.style.fontStyle=f?"italic":"";this.textarea.style.fontFamily=c;this.textarea.style.textAlign=d;this.textarea.style.padding="0px";this.textarea.innerHTML!=l&&(this.textarea.innerHTML=l,0==this.textarea.innerHTML.length&&(this.textarea.innerHTML=this.getEmptyLabelText(),this.clearOnChange=0<this.textarea.innerHTML.length));this.codeViewMode=!1}else{this.clearOnChange&&this.textarea.innerHTML==
this.getEmptyLabelText()&&(this.clearOnChange=!1,this.textarea.innerHTML="");var l=mxUtils.htmlEntities(this.textarea.innerHTML);8!=document.documentMode&&(l=mxUtils.replaceTrailingNewlines(l,"<div><br></div>"));l=this.graph.sanitizeHtml(c?l.replace(/\n/g,"").replace(/&lt;br\s*.?&gt;/g,"<br>"):l,!0);this.textarea.className="mxCellEditor mxPlainTextEditor";var b=mxConstants.DEFAULT_FONTSIZE;this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(b*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;
this.textarea.style.fontSize=Math.round(b)+"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!=l&&(this.textarea.innerHTML=l);this.codeViewMode=!0}this.textarea.focus();null!=this.switchSelectionState&&this.restoreSelection(this.switchSelectionState);
this.switchSelectionState=e;this.resize()}};var z=mxCellEditor.prototype.resize;mxCellEditor.prototype.resize=function(a,c){if(null!=this.textarea)if(a=this.graph.getView().getState(this.editingCell),this.codeViewMode&&null!=a){var e=a.view.scale;this.bounds=mxRectangle.fromRectangle(a);if(0==this.bounds.width&&0==this.bounds.height){this.bounds.width=160*e;this.bounds.height=60*e;var b=null!=a.text?a.text.margin:null;null==b&&(b=mxUtils.getAlignmentAsPoint(mxUtils.getValue(a.style,mxConstants.STYLE_ALIGN,
@@ -2588,32 +2589,32 @@ mxConstants.ALIGN_CENTER),mxUtils.getValue(a.style,mxConstants.STYLE_VERTICAL_AL
this.textarea.clientHeight)+"px",this.bounds.height=parseInt(this.textarea.style.height)*e);this.textarea.clientWidth<this.textarea.offsetWidth&&(this.textarea.style.width=Math.round(this.bounds.width/e)+(this.textarea.offsetWidth-this.textarea.clientWidth)+"px",this.bounds.width=parseInt(this.textarea.style.width)*e);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("+e+","+
e+")")}else this.textarea.style.height="",this.textarea.style.overflow="",z.apply(this,arguments)};mxCellEditorGetInitialValue=mxCellEditor.prototype.getInitialValue;mxCellEditor.prototype.getInitialValue=function(a,c){if("0"==mxUtils.getValue(a.style,"html","0"))return mxCellEditorGetInitialValue.apply(this,arguments);var e=this.graph.getEditingValue(a.cell,c);"1"==mxUtils.getValue(a.style,"nl2Br","1")&&(e=e.replace(/\n/g,"<br/>"));return e=this.graph.sanitizeHtml(e,!0)};mxCellEditorGetCurrentValue=
mxCellEditor.prototype.getCurrentValue;mxCellEditor.prototype.getCurrentValue=function(a){if("0"==mxUtils.getValue(a.style,"html","0"))return mxCellEditorGetCurrentValue.apply(this,arguments);var c=this.graph.sanitizeHtml(this.textarea.innerHTML,!0);return c="1"==mxUtils.getValue(a.style,"nl2Br","1")?c.replace(/\r\n/g,"<br/>").replace(/\n/g,"<br/>"):c.replace(/\r\n/g,"").replace(/\n/g,"")};var E=mxCellEditor.prototype.stopEditing;mxCellEditor.prototype.stopEditing=function(a){this.codeViewMode&&this.toggleViewMode();
-E.apply(this,arguments);this.focusContainer()};mxCellEditor.prototype.focusContainer=function(){try{this.graph.container.focus()}catch(Y){}};var H=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(a,c){this.graph.getModel().beginUpdate();try{H.apply(this,arguments),""==c&&this.graph.isCellDeletable(a.cell)&&0==this.graph.model.getChildCount(a.cell)&&this.graph.isTransparentState(a)&&this.graph.removeCells([a.cell],!1)}finally{this.graph.getModel().endUpdate()}};mxCellEditor.prototype.getBackgroundColor=
+E.apply(this,arguments);this.focusContainer()};mxCellEditor.prototype.focusContainer=function(){try{this.graph.container.focus()}catch(ea){}};var H=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(a,c){this.graph.getModel().beginUpdate();try{H.apply(this,arguments),""==c&&this.graph.isCellDeletable(a.cell)&&0==this.graph.model.getChildCount(a.cell)&&this.graph.isTransparentState(a)&&this.graph.removeCells([a.cell],!1)}finally{this.graph.getModel().endUpdate()}};mxCellEditor.prototype.getBackgroundColor=
function(a){var c=mxUtils.getValue(a.style,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,null);null!=c&&c!=mxConstants.NONE||!(null!=a.cell.geometry&&0<a.cell.geometry.width)||0==mxUtils.getValue(a.style,mxConstants.STYLE_ROTATION,0)&&0!=mxUtils.getValue(a.style,mxConstants.STYLE_HORIZONTAL,1)||(c=mxUtils.getValue(a.style,mxConstants.STYLE_FILLCOLOR,null));c==mxConstants.NONE&&(c=null);return c};mxCellEditor.prototype.getMinimumSize=function(a){var c=this.graph.getView().scale;return new mxRectangle(0,
0,null==a.text?30:a.text.size*c+20,30)};mxGraphHandlerIsValidDropTarget=mxGraphHandler.prototype.isValidDropTarget;mxGraphHandler.prototype.isValidDropTarget=function(a,c){return mxGraphHandlerIsValidDropTarget.apply(this,arguments)&&!mxEvent.isAltDown(c.getEvent)};mxGraphView.prototype.formatUnitText=function(a){return a?b(a,this.unit):a};mxGraphHandler.prototype.updateHint=function(c){if(null!=this.pBounds&&(null!=this.shape||this.livePreviewActive)){null==this.hint&&(this.hint=a(),this.graph.container.appendChild(this.hint));
var e=this.graph.view.translate,d=this.graph.view.scale;c=this.roundLength((this.bounds.x+this.currentDx)/d-e.x);e=this.roundLength((this.bounds.y+this.currentDy)/d-e.y);d=this.graph.view.unit;this.hint.innerHTML=b(c,d)+", "+b(e,d);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 K=mxStackLayout.prototype.resizeCell;mxStackLayout.prototype.resizeCell=function(a,c){K.apply(this,arguments);var e=this.graph.getCellStyle(a);if(null==e.childLayout){var b=this.graph.model.getParent(a),d=null!=b?this.graph.getCellGeometry(b):null;if(null!=d&&(e=this.graph.getCellStyle(b),"stackLayout"==e.childLayout)){var g=parseFloat(mxUtils.getValue(e,"stackBorder",mxStackLayout.prototype.border)),e="1"==mxUtils.getValue(e,"horizontalStack",
-"1"),f=this.graph.getActualStartSize(b),d=d.clone();e?d.height=c.height+f.y+f.height+2*g:d.width=c.width+f.x+f.width+2*g;this.graph.model.setGeometry(b,d)}}};var F=mxSelectionCellsHandler.prototype.getHandledSelectionCells;mxSelectionCellsHandler.prototype.getHandledSelectionCells=function(){function a(a){e.get(a)||(e.put(a,!0),d.push(a))}for(var c=F.apply(this,arguments),e=new mxDictionary,b=this.graph.model,d=[],g=0;g<c.length;g++){var f=c[g];this.graph.isTableCell(f)?a(b.getParent(b.getParent(f))):
-this.graph.isTableRow(f)&&a(b.getParent(f));a(f)}return d};var I=mxVertexHandler.prototype.createParentHighlightShape;mxVertexHandler.prototype.createParentHighlightShape=function(a){var c=I.apply(this,arguments);c.stroke="#C0C0C0";c.strokewidth=1;return c};var C=mxEdgeHandler.prototype.createParentHighlightShape;mxEdgeHandler.prototype.createParentHighlightShape=function(a){var c=C.apply(this,arguments);c.stroke="#C0C0C0";c.strokewidth=1;return c};mxVertexHandler.prototype.rotationHandleVSpacing=
+(this.hint.parentNode.removeChild(this.hint),this.hint=null)};var K=mxStackLayout.prototype.resizeCell;mxStackLayout.prototype.resizeCell=function(a,c){K.apply(this,arguments);var e=this.graph.getCellStyle(a);if(null==e.childLayout){var b=this.graph.model.getParent(a),d=null!=b?this.graph.getCellGeometry(b):null;if(null!=d&&(e=this.graph.getCellStyle(b),"stackLayout"==e.childLayout)){var k=parseFloat(mxUtils.getValue(e,"stackBorder",mxStackLayout.prototype.border)),e="1"==mxUtils.getValue(e,"horizontalStack",
+"1"),f=this.graph.getActualStartSize(b),d=d.clone();e?d.height=c.height+f.y+f.height+2*k:d.width=c.width+f.x+f.width+2*k;this.graph.model.setGeometry(b,d)}}};var F=mxSelectionCellsHandler.prototype.getHandledSelectionCells;mxSelectionCellsHandler.prototype.getHandledSelectionCells=function(){function a(a){e.get(a)||(e.put(a,!0),d.push(a))}for(var c=F.apply(this,arguments),e=new mxDictionary,b=this.graph.model,d=[],k=0;k<c.length;k++){var f=c[k];this.graph.isTableCell(f)?a(b.getParent(b.getParent(f))):
+this.graph.isTableRow(f)&&a(b.getParent(f));a(f)}return d};var I=mxVertexHandler.prototype.createParentHighlightShape;mxVertexHandler.prototype.createParentHighlightShape=function(a){var c=I.apply(this,arguments);c.stroke="#C0C0C0";c.strokewidth=1;return c};var D=mxEdgeHandler.prototype.createParentHighlightShape;mxEdgeHandler.prototype.createParentHighlightShape=function(a){var c=D.apply(this,arguments);c.stroke="#C0C0C0";c.strokewidth=1;return c};mxVertexHandler.prototype.rotationHandleVSpacing=
-12;mxVertexHandler.prototype.getRotationHandlePosition=function(){var a=this.getHandlePadding();return new mxPoint(this.bounds.x+this.bounds.width-this.rotationHandleVSpacing+a.x/2,this.bounds.y+this.rotationHandleVSpacing-a.y/2)};mxVertexHandler.prototype.isRecursiveResize=function(a,c){return this.graph.isRecursiveVertexResize(a)&&!mxEvent.isControlDown(c.getEvent())};mxVertexHandler.prototype.isCenteredEvent=function(a,c){return!(!this.graph.isSwimlane(a.cell)&&0<this.graph.model.getChildCount(a.cell)&&
!this.graph.isCellCollapsed(a.cell)&&"1"==mxUtils.getValue(a.style,"recursiveResize","1")&&null==mxUtils.getValue(a.style,"childLayout",null))&&mxEvent.isControlDown(c.getEvent())||mxEvent.isMetaDown(c.getEvent())};var M=mxVertexHandler.prototype.isRotationHandleVisible;mxVertexHandler.prototype.isRotationHandleVisible=function(){return M.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 U=mxVertexHandler.prototype.isParentHighlightVisible;mxVertexHandler.prototype.isParentHighlightVisible=function(){return U.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)};var O=mxVertexHandler.prototype.isCustomHandleVisible;mxVertexHandler.prototype.isCustomHandleVisible=
function(a){return a.tableHandle||O.apply(this,arguments)&&(!this.graph.isTable(this.state.cell)||this.graph.isCellSelected(this.state.cell))};mxVertexHandler.prototype.getSelectionBorderInset=function(){var a=0;this.graph.isTableRow(this.state.cell)?a=1:this.graph.isTableCell(this.state.cell)&&(a=2);return a};var N=mxVertexHandler.prototype.getSelectionBorderBounds;mxVertexHandler.prototype.getSelectionBorderBounds=function(){return N.apply(this,arguments).grow(-this.getSelectionBorderInset())};
-var v=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){var a=v.apply(this,arguments);if(this.graph.isTable(this.state.cell)){var c=this.graph,e=c.model,b=this.state,d=this.selectionBorder,g=this;null==a&&(a=[]);var f=c.view.getCellStates(e.getChildCells(this.state.cell,!0));if(0<f.length){for(var k=c.view.getCellStates(e.getChildCells(f[0].cell,!0)),e=0;e<k.length;e++)mxUtils.bind(this,function(e){var f=k[e],l=e<k.length-1?k[e+1]:null,n=new mxLine(new mxRectangle,
-mxConstants.NONE,1,!0);n.isDashed=d.isDashed;n.svgStrokeTolerance++;n=new mxHandle(f,"col-resize",null,n);n.tableHandle=!0;var v=0;n.shape.node.parentNode.insertBefore(n.shape.node,n.shape.node.parentNode.firstChild);n.redraw=function(){if(null!=this.shape&&null!=this.state.shape){var a=c.getActualStartSize(b.cell);this.shape.stroke=0==v?mxConstants.NONE:d.stroke;this.shape.bounds.x=this.state.x+this.state.width+v*this.graph.view.scale;this.shape.bounds.width=1;this.shape.bounds.y=b.y+(e==k.length-
-1?0:a.y*this.graph.view.scale);this.shape.bounds.height=b.height-(e==k.length-1?0:(a.height+a.y)*this.graph.view.scale);this.shape.redraw()}};var q=!1;n.setPosition=function(a,e,b){v=Math.max(Graph.minTableColumnWidth-a.width,e.x-a.x-a.width);q=mxEvent.isShiftDown(b.getEvent());null==l||q||(v=Math.min((l.x+l.width-f.x-f.width)/c.view.scale-Graph.minTableColumnWidth,v))};n.execute=function(a){if(0!=v)c.setTableColumnWidth(this.state.cell,v,q);else if(!g.blockDelayedSelection){var e=c.getCellAt(a.getGraphX(),
-a.getGraphY())||b.cell;c.graphHandler.selectCellForEvent(e,a)}v=0};n.reset=function(){v=0};a.push(n)})(e);for(e=0;e<f.length;e++)mxUtils.bind(this,function(e){e=f[e];var k=new mxLine(new mxRectangle,mxConstants.NONE,1);k.isDashed=d.isDashed;k.svgStrokeTolerance++;e=new mxHandle(e,"row-resize",null,k);e.tableHandle=!0;var l=0;e.shape.node.parentNode.insertBefore(e.shape.node,e.shape.node.parentNode.firstChild);e.redraw=function(){null!=this.shape&&null!=this.state.shape&&(this.shape.stroke=0==l?mxConstants.NONE:
-d.stroke,this.shape.bounds.x=this.state.x,this.shape.bounds.width=this.state.width,this.shape.bounds.y=this.state.y+this.state.height+l*this.graph.view.scale,this.shape.bounds.height=1,this.shape.redraw())};e.setPosition=function(a,c,e){l=Math.max(Graph.minTableRowHeight-a.height,c.y-a.y-a.height)};e.execute=function(a){if(0!=l)c.setTableRowHeight(this.state.cell,l,!mxEvent.isShiftDown(a.getEvent()));else if(!g.blockDelayedSelection){var e=c.getCellAt(a.getGraphX(),a.getGraphY())||b.cell;c.graphHandler.selectCellForEvent(e,
-a)}l=0};e.reset=function(){l=0};a.push(e)})(e)}}return null!=a?a.reverse():null};var D=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(a){D.apply(this,arguments);if(null!=this.moveHandles)for(var c=0;c<this.moveHandles.length;c++)this.moveHandles[c].style.visibility=a?"":"hidden";if(null!=this.cornerHandles)for(c=0;c<this.cornerHandles.length;c++)this.cornerHandles[c].node.style.visibility=a?"":"hidden"};mxVertexHandler.prototype.refreshMoveHandles=
+var v=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){var a=v.apply(this,arguments);if(this.graph.isTable(this.state.cell)){var c=this.graph,e=c.model,b=this.state,d=this.selectionBorder,k=this;null==a&&(a=[]);var f=c.view.getCellStates(e.getChildCells(this.state.cell,!0));if(0<f.length){for(var g=c.view.getCellStates(e.getChildCells(f[0].cell,!0)),e=0;e<g.length;e++)mxUtils.bind(this,function(e){var f=g[e],l=e<g.length-1?g[e+1]:null,n=new mxLine(new mxRectangle,
+mxConstants.NONE,1,!0);n.isDashed=d.isDashed;n.svgStrokeTolerance++;n=new mxHandle(f,"col-resize",null,n);n.tableHandle=!0;var v=0;n.shape.node.parentNode.insertBefore(n.shape.node,n.shape.node.parentNode.firstChild);n.redraw=function(){if(null!=this.shape&&null!=this.state.shape){var a=c.getActualStartSize(b.cell);this.shape.stroke=0==v?mxConstants.NONE:d.stroke;this.shape.bounds.x=this.state.x+this.state.width+v*this.graph.view.scale;this.shape.bounds.width=1;this.shape.bounds.y=b.y+(e==g.length-
+1?0:a.y*this.graph.view.scale);this.shape.bounds.height=b.height-(e==g.length-1?0:(a.height+a.y)*this.graph.view.scale);this.shape.redraw()}};var q=!1;n.setPosition=function(a,e,b){v=Math.max(Graph.minTableColumnWidth-a.width,e.x-a.x-a.width);q=mxEvent.isShiftDown(b.getEvent());null==l||q||(v=Math.min((l.x+l.width-f.x-f.width)/c.view.scale-Graph.minTableColumnWidth,v))};n.execute=function(a){if(0!=v)c.setTableColumnWidth(this.state.cell,v,q);else if(!k.blockDelayedSelection){var e=c.getCellAt(a.getGraphX(),
+a.getGraphY())||b.cell;c.graphHandler.selectCellForEvent(e,a)}v=0};n.reset=function(){v=0};a.push(n)})(e);for(e=0;e<f.length;e++)mxUtils.bind(this,function(e){e=f[e];var g=new mxLine(new mxRectangle,mxConstants.NONE,1);g.isDashed=d.isDashed;g.svgStrokeTolerance++;e=new mxHandle(e,"row-resize",null,g);e.tableHandle=!0;var l=0;e.shape.node.parentNode.insertBefore(e.shape.node,e.shape.node.parentNode.firstChild);e.redraw=function(){null!=this.shape&&null!=this.state.shape&&(this.shape.stroke=0==l?mxConstants.NONE:
+d.stroke,this.shape.bounds.x=this.state.x,this.shape.bounds.width=this.state.width,this.shape.bounds.y=this.state.y+this.state.height+l*this.graph.view.scale,this.shape.bounds.height=1,this.shape.redraw())};e.setPosition=function(a,c,e){l=Math.max(Graph.minTableRowHeight-a.height,c.y-a.y-a.height)};e.execute=function(a){if(0!=l)c.setTableRowHeight(this.state.cell,l,!mxEvent.isShiftDown(a.getEvent()));else if(!k.blockDelayedSelection){var e=c.getCellAt(a.getGraphX(),a.getGraphY())||b.cell;c.graphHandler.selectCellForEvent(e,
+a)}l=0};e.reset=function(){l=0};a.push(e)})(e)}}return null!=a?a.reverse():null};var C=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(a){C.apply(this,arguments);if(null!=this.moveHandles)for(var c=0;c<this.moveHandles.length;c++)this.moveHandles[c].style.visibility=a?"":"hidden";if(null!=this.cornerHandles)for(c=0;c<this.cornerHandles.length;c++)this.cornerHandles[c].node.style.visibility=a?"":"hidden"};mxVertexHandler.prototype.refreshMoveHandles=
function(){var a=this.graph.model;if(null!=this.moveHandles){for(var c=0;c<this.moveHandles.length;c++)this.moveHandles[c].parentNode.removeChild(this.moveHandles[c]);this.moveHandles=null}this.moveHandles=[];for(c=0;c<a.getChildCount(this.state.cell);c++)mxUtils.bind(this,function(c){if(null!=c&&a.isVertex(c.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=
c;mxEvent.addGestureListeners(e,mxUtils.bind(this,function(a){this.graph.popupMenuHandler.hideMenu();this.graph.stopEditing(!1);!this.graph.isToggleEvent(a)&&this.graph.isCellSelected(c.cell)||this.graph.selectCellForEvent(c.cell,a);mxEvent.isPopupTrigger(a)||(this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(a),mxEvent.getClientY(a),this.graph.getSelectionCells()),this.graph.graphHandler.cellWasClicked=!0,this.graph.isMouseTrigger=mxEvent.isMouseEvent(a),this.graph.isMouseDown=!0);
mxEvent.consume(a)}),null,mxUtils.bind(this,function(a){mxEvent.isPopupTrigger(a)&&(this.graph.popupMenuHandler.popup(mxEvent.getClientX(a),mxEvent.getClientY(a),c.cell,a),mxEvent.consume(a))}));this.moveHandles.push(e);this.graph.container.appendChild(e)}})(this.graph.view.getState(a.getChildAt(this.state.cell,c)))};mxVertexHandler.prototype.refresh=function(){if(null!=this.customHandles){for(var a=0;a<this.customHandles.length;a++)this.customHandles[a].destroy();this.customHandles=this.createCustomHandles()}this.graph.isTable(this.state.cell)&&
this.refreshMoveHandles()};var B=mxVertexHandler.prototype.getHandlePadding;mxVertexHandler.prototype.getHandlePadding=function(){var a=new mxPoint(0,0),c=this.tolerance,e=this.state.style.shape;null==mxCellRenderer.defaultShapes[e]&&mxStencilRegistry.getStencil(e);e=this.graph.isTable(this.state.cell)||this.graph.cellEditor.getEditingCell()==this.state.cell;if(!e&&null!=this.customHandles)for(var b=0;b<this.customHandles.length;b++)if(null!=this.customHandles[b].shape&&null!=this.customHandles[b].shape.bounds){var d=
-this.customHandles[b].shape.bounds,g=d.getCenterX(),f=d.getCenterY();if(Math.abs(this.state.x-g)<d.width/2||Math.abs(this.state.y-f)<d.height/2||Math.abs(this.state.x+this.state.width-g)<d.width/2||Math.abs(this.state.y+this.state.height-f)<d.height/2){e=!0;break}}e&&null!=this.sizers&&0<this.sizers.length&&null!=this.sizers[0]?(c/=2,this.graph.isTable(this.state.cell)&&(c+=7),a.x=this.sizers[0].bounds.width+c,a.y=this.sizers[0].bounds.height+c):a=B.apply(this,arguments);return a};mxVertexHandler.prototype.updateHint=
+this.customHandles[b].shape.bounds,k=d.getCenterX(),f=d.getCenterY();if(Math.abs(this.state.x-k)<d.width/2||Math.abs(this.state.y-f)<d.height/2||Math.abs(this.state.x+this.state.width-k)<d.width/2||Math.abs(this.state.y+this.state.height-f)<d.height/2){e=!0;break}}e&&null!=this.sizers&&0<this.sizers.length&&null!=this.sizers[0]?(c/=2,this.graph.isTable(this.state.cell)&&(c+=7),a.x=this.sizers[0].bounds.width+c,a.y=this.sizers[0].bounds.height+c):a=B.apply(this,arguments);return a};mxVertexHandler.prototype.updateHint=
function(c){if(this.index!=mxEvent.LABEL_HANDLE){null==this.hint&&(this.hint=a(),this.state.view.graph.container.appendChild(this.hint));if(this.index==mxEvent.ROTATION_HANDLE)this.hint.innerHTML=this.currentAlpha+"&deg;";else{c=this.state.view.scale;var e=this.state.view.unit;this.hint.innerHTML=b(this.roundLength(this.bounds.width/c),e)+" x "+b(this.roundLength(this.bounds.height/c),e)}c=mxUtils.getBoundingBox(this.bounds,null!=this.currentAlpha?this.currentAlpha:this.state.style[mxConstants.STYLE_ROTATION]||
"0");null==c&&(c=this.bounds);this.hint.style.left=c.x+Math.round((c.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=c.y+c.height+Editor.hintOffset+"px";null!=this.linkHint&&(this.linkHint.style.display="none")}};mxVertexHandler.prototype.removeHint=function(){mxGraphHandler.prototype.removeHint.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.display="")};var J=mxEdgeHandler.prototype.mouseMove;mxEdgeHandler.prototype.mouseMove=function(a,c){J.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 L=mxEdgeHandler.prototype.mouseUp;mxEdgeHandler.prototype.mouseUp=function(a,c){L.apply(this,arguments);null!=this.linkHint&&"none"==this.linkHint.style.display&&(this.linkHint.style.display="")};mxEdgeHandler.prototype.updateHint=function(c,e){null==this.hint&&(this.hint=a(),this.state.view.graph.container.appendChild(this.hint));var d=
-this.graph.view.translate,g=this.graph.view.scale,f=this.roundLength(e.x/g-d.x),d=this.roundLength(e.y/g-d.y),g=this.graph.view.unit;this.hint.innerHTML=b(f,g)+", "+b(d,g);this.hint.style.visibility="visible";if(this.isSource||this.isTarget)null!=this.constraintHandler.currentConstraint&&null!=this.constraintHandler.currentFocus?(f=this.constraintHandler.currentConstraint.point,this.hint.innerHTML="["+Math.round(100*f.x)+"%, "+Math.round(100*f.y)+"%]"):this.marker.hasValidState()&&(this.hint.style.visibility=
+this.graph.view.translate,k=this.graph.view.scale,f=this.roundLength(e.x/k-d.x),d=this.roundLength(e.y/k-d.y),k=this.graph.view.unit;this.hint.innerHTML=b(f,k)+", "+b(d,k);this.hint.style.visibility="visible";if(this.isSource||this.isTarget)null!=this.constraintHandler.currentConstraint&&null!=this.constraintHandler.currentFocus?(f=this.constraintHandler.currentConstraint.point,this.hint.innerHTML="["+Math.round(100*f.x)+"%, "+Math.round(100*f.y)+"%]"):this.marker.hasValidState()&&(this.hint.style.visibility=
"hidden");this.hint.style.left=Math.round(c.getGraphX()-this.hint.clientWidth/2)+"px";this.hint.style.top=Math.max(c.getGraphY(),e.y)+Editor.hintOffset+"px";null!=this.linkHint&&(this.linkHint.style.display="none")};mxEdgeHandler.prototype.removeHint=mxVertexHandler.prototype.removeHint;HoverIcons.prototype.mainHandle=mxClient.IS_SVG?Graph.createSvgImage(18,18,'<circle cx="9" cy="9" r="5" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'" stroke-width="1"/>'):new mxImage(IMAGE_PATH+"/handle-main.png",
17,17);HoverIcons.prototype.secondaryHandle=mxClient.IS_SVG?Graph.createSvgImage(16,16,'<path d="m 8 3 L 13 8 L 8 13 L 3 8 z" stroke="#fff" fill="#fca000"/>'):new mxImage(IMAGE_PATH+"/handle-secondary.png",17,17);HoverIcons.prototype.fixedHandle=mxClient.IS_SVG?Graph.createSvgImage(22,22,'<circle cx="11" cy="11" r="6" stroke="#fff" fill="#01bd22" stroke-width="1"/><path d="m 8 8 L 14 14M 8 14 L 14 8" stroke="#fff"/>'):new mxImage(IMAGE_PATH+"/handle-fixed.png",17,17);HoverIcons.prototype.terminalHandle=
mxClient.IS_SVG?Graph.createSvgImage(22,22,'<circle cx="11" cy="11" r="6" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'" stroke-width="1"/><circle cx="11" cy="11" r="3" stroke="#fff" fill="transparent"/>'):new mxImage(IMAGE_PATH+"/handle-terminal.png",17,17);HoverIcons.prototype.rotationHandle=mxClient.IS_SVG?Graph.createSvgImage(16,16,'<path stroke="'+HoverIcons.prototype.arrowFill+'" fill="'+HoverIcons.prototype.arrowFill+'" d="M15.55 5.55L11 1v3.07C7.06 4.56 4 7.92 4 12s3.05 7.44 7 7.93v-2.02c-2.84-.48-5-2.94-5-5.91s2.16-5.43 5-5.91V10l4.55-4.45zM19.93 11c-.17-1.39-.72-2.73-1.62-3.89l-1.42 1.42c.54.75.88 1.6 1.02 2.47h2.02zM13 17.9v2.02c1.39-.17 2.74-.71 3.9-1.61l-1.44-1.44c-.75.54-1.59.89-2.46 1.03zm3.89-2.42l1.42 1.41c.9-1.16 1.45-2.5 1.62-3.89h-2.02c-.14.87-.48 1.72-1.02 2.48z"/>',
@@ -2625,17 +2626,17 @@ Sidebar.prototype.refreshTarget=HoverIcons.prototype.refreshTarget,Sidebar.proto
function(a){return!mxEvent.isShiftDown(a.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(a){return mxEvent.isMouseEvent(a.getEvent())?4:this.graph.getTolerance()};mxPanningHandler.prototype.isPanningTrigger=
function(a){var c=a.getEvent();return null==a.getState()&&!mxEvent.isMouseEvent(c)||mxEvent.isPopupTrigger(c)&&(null==a.getState()||mxEvent.isControlDown(c)||mxEvent.isShiftDown(c))};var W=mxGraphHandler.prototype.mouseDown;mxGraphHandler.prototype.mouseDown=function(a,c){W.apply(this,arguments);mxEvent.isTouchEvent(c.getEvent())&&this.graph.isCellSelected(c.getCell())&&1<this.graph.getSelectionCount()&&(this.delayedSelection=!1)}}else mxPanningHandler.prototype.isPanningTrigger=function(a){var c=
a.getEvent();return mxEvent.isLeftMouseButton(c)&&(this.useLeftButtonForPanning&&null==a.getState()||mxEvent.isControlDown(c)&&!mxEvent.isShiftDown(c))||this.usePopupTrigger&&mxEvent.isPopupTrigger(c)};mxRubberband.prototype.isSpaceEvent=function(a){return this.graph.isEnabled()&&!this.graph.isCellLocked(this.graph.getDefaultParent())&&mxEvent.isControlDown(a.getEvent())&&mxEvent.isShiftDown(a.getEvent())};mxRubberband.prototype.cancelled=!1;mxRubberband.prototype.cancel=function(){this.isActive()&&
-(this.cancelled=!0,this.reset())};mxRubberband.prototype.mouseUp=function(a,c){if(this.cancelled)this.cancelled=!1,c.consume();else{var e=null!=this.div&&"none"!=this.div.style.display,b=null,d=null,g=null,f=null;null!=this.first&&null!=this.currentX&&null!=this.currentY&&(b=this.first.x,d=this.first.y,g=(this.currentX-b)/this.graph.view.scale,f=(this.currentY-d)/this.graph.view.scale,mxEvent.isAltDown(c.getEvent())||(g=this.graph.snap(g),f=this.graph.snap(f),this.graph.isGridEnabled()||(Math.abs(g)<
-this.graph.tolerance&&(g=0),Math.abs(f)<this.graph.tolerance&&(f=0))));this.reset();if(e){if(mxEvent.isAltDown(c.getEvent())&&this.graph.isToggleEvent(c.getEvent())){var g=new mxRectangle(this.x,this.y,this.width,this.height),k=this.graph.getCells(g.x,g.y,g.width,g.height);this.graph.removeSelectionCells(k)}else if(this.isSpaceEvent(c)){this.graph.model.beginUpdate();try{for(k=this.graph.getCellsBeyond(b,d,this.graph.getDefaultParent(),!0,!0),e=0;e<k.length;e++)if(this.graph.isCellMovable(k[e])){var l=
-this.graph.view.getState(k[e]),n=this.graph.getCellGeometry(k[e]);null!=l&&null!=n&&(n=n.clone(),n.translate(g,f),this.graph.model.setGeometry(k[e],n))}}finally{this.graph.model.endUpdate()}}else g=new mxRectangle(this.x,this.y,this.width,this.height),this.graph.selectRegion(g,c.getEvent());c.consume()}}};mxRubberband.prototype.mouseMove=function(a,c){if(!c.isConsumed()&&null!=this.first){var e=mxUtils.getScrollOrigin(this.graph.container),b=mxUtils.getOffset(this.graph.container);e.x-=b.x;e.y-=b.y;
-var b=c.getX()+e.x,e=c.getY()+e.y,d=this.first.x-b,g=this.first.y-e,f=this.graph.tolerance;if(null!=this.div||Math.abs(d)>f||Math.abs(g)>f)null==this.div&&(this.div=this.createShape()),mxUtils.clearSelection(),this.update(b,e),this.isSpaceEvent(c)?(b=this.x+this.width,e=this.y+this.height,d=this.graph.view.scale,mxEvent.isAltDown(c.getEvent())||(this.width=this.graph.snap(this.width/d)*d,this.height=this.graph.snap(this.height/d)*d,this.graph.isGridEnabled()||(this.width<this.graph.tolerance&&(this.width=
+(this.cancelled=!0,this.reset())};mxRubberband.prototype.mouseUp=function(a,c){if(this.cancelled)this.cancelled=!1,c.consume();else{var e=null!=this.div&&"none"!=this.div.style.display,b=null,d=null,k=null,f=null;null!=this.first&&null!=this.currentX&&null!=this.currentY&&(b=this.first.x,d=this.first.y,k=(this.currentX-b)/this.graph.view.scale,f=(this.currentY-d)/this.graph.view.scale,mxEvent.isAltDown(c.getEvent())||(k=this.graph.snap(k),f=this.graph.snap(f),this.graph.isGridEnabled()||(Math.abs(k)<
+this.graph.tolerance&&(k=0),Math.abs(f)<this.graph.tolerance&&(f=0))));this.reset();if(e){if(mxEvent.isAltDown(c.getEvent())&&this.graph.isToggleEvent(c.getEvent())){var k=new mxRectangle(this.x,this.y,this.width,this.height),g=this.graph.getCells(k.x,k.y,k.width,k.height);this.graph.removeSelectionCells(g)}else if(this.isSpaceEvent(c)){this.graph.model.beginUpdate();try{for(g=this.graph.getCellsBeyond(b,d,this.graph.getDefaultParent(),!0,!0),e=0;e<g.length;e++)if(this.graph.isCellMovable(g[e])){var l=
+this.graph.view.getState(g[e]),n=this.graph.getCellGeometry(g[e]);null!=l&&null!=n&&(n=n.clone(),n.translate(k,f),this.graph.model.setGeometry(g[e],n))}}finally{this.graph.model.endUpdate()}}else k=new mxRectangle(this.x,this.y,this.width,this.height),this.graph.selectRegion(k,c.getEvent());c.consume()}}};mxRubberband.prototype.mouseMove=function(a,c){if(!c.isConsumed()&&null!=this.first){var e=mxUtils.getScrollOrigin(this.graph.container),b=mxUtils.getOffset(this.graph.container);e.x-=b.x;e.y-=b.y;
+var b=c.getX()+e.x,e=c.getY()+e.y,d=this.first.x-b,k=this.first.y-e,f=this.graph.tolerance;if(null!=this.div||Math.abs(d)>f||Math.abs(k)>f)null==this.div&&(this.div=this.createShape()),mxUtils.clearSelection(),this.update(b,e),this.isSpaceEvent(c)?(b=this.x+this.width,e=this.y+this.height,d=this.graph.view.scale,mxEvent.isAltDown(c.getEvent())||(this.width=this.graph.snap(this.width/d)*d,this.height=this.graph.snap(this.height/d)*d,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=b-this.width),this.y<this.first.y&&(this.y=e-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)),c.consume()}};var Q=mxRubberband.prototype.reset;mxRubberband.prototype.reset=function(){null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null);Q.apply(this,arguments)};var aa=(new Date).getTime(),na=0,ga=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=function(a,c,e,b){ga.apply(this,arguments);e!=this.currentTerminalState?(aa=(new Date).getTime(),na=0):na=(new Date).getTime()-aa;this.currentTerminalState=
-e};var ea=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(a){return null!=this.currentTerminalState&&a.getState()==this.currentTerminalState&&2E3<na||(null==this.currentTerminalState||"0"!=mxUtils.getValue(this.currentTerminalState.style,"outlineConnect","1"))&&ea.apply(this,arguments)};mxEdgeHandler.prototype.createHandleShape=function(a,c){var e=null!=a&&0==a,b=this.state.getVisibleTerminalState(e),d=null!=a&&(0==a||a>=this.state.absolutePoints.length-
+this.secondDiv=null)),c.consume()}};var Q=mxRubberband.prototype.reset;mxRubberband.prototype.reset=function(){null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null);Q.apply(this,arguments)};var Z=(new Date).getTime(),na=0,ga=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=function(a,c,e,b){ga.apply(this,arguments);e!=this.currentTerminalState?(Z=(new Date).getTime(),na=0):na=(new Date).getTime()-Z;this.currentTerminalState=
+e};var da=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(a){return null!=this.currentTerminalState&&a.getState()==this.currentTerminalState&&2E3<na||(null==this.currentTerminalState||"0"!=mxUtils.getValue(this.currentTerminalState.style,"outlineConnect","1"))&&da.apply(this,arguments)};mxEdgeHandler.prototype.createHandleShape=function(a,c){var e=null!=a&&0==a,b=this.state.getVisibleTerminalState(e),d=null!=a&&(0==a||a>=this.state.absolutePoints.length-
1||this.constructor==mxElbowEdgeHandler&&2==a)?this.graph.getConnectionConstraint(this.state,b,e):null,e=null!=(null!=d?this.graph.getConnectionPoint(this.state.getVisibleTerminalState(e),d):null)?this.fixedHandleImage:null!=d&&null!=b?this.terminalHandleImage:this.handleImage;if(null!=e)return e=new mxImageShape(new mxRectangle(0,0,e.width,e.height),e.src),e.preserveImageAspect=!1,e;e=mxConstants.HANDLE_SIZE;this.preferHtml&&--e;return new mxRectangleShape(new mxRectangle(0,0,e,e),mxConstants.HANDLE_FILLCOLOR,
mxConstants.HANDLE_STROKECOLOR)};var la=mxVertexHandler.prototype.createSizerShape;mxVertexHandler.prototype.createSizerShape=function(a,c,e){this.handleImage=c==mxEvent.ROTATION_HANDLE?HoverIcons.prototype.rotationHandle:c==mxEvent.LABEL_HANDLE?this.secondaryHandleImage:this.handleImage;return la.apply(this,arguments)};var V=mxGraphHandler.prototype.getBoundingBox;mxGraphHandler.prototype.getBoundingBox=function(a){if(null!=a&&1==a.length){var c=this.graph.getModel(),e=c.getParent(a[0]),b=this.graph.getCellGeometry(a[0]);
-if(c.isEdge(e)&&null!=b&&b.relative&&(c=this.graph.view.getState(a[0]),null!=c&&2>c.width&&2>c.height&&null!=c.text&&null!=c.text.boundingBox))return mxRectangle.fromRectangle(c.text.boundingBox)}return V.apply(this,arguments)};var ca=mxGraphHandler.prototype.getGuideStates;mxGraphHandler.prototype.getGuideStates=function(){for(var a=ca.apply(this,arguments),c=[],e=0;e<a.length;e++)"1"!=mxUtils.getValue(a[e].style,"part","0")&&c.push(a[e]);return c};var ma=mxVertexHandler.prototype.getSelectionBounds;
+if(c.isEdge(e)&&null!=b&&b.relative&&(c=this.graph.view.getState(a[0]),null!=c&&2>c.width&&2>c.height&&null!=c.text&&null!=c.text.boundingBox))return mxRectangle.fromRectangle(c.text.boundingBox)}return V.apply(this,arguments)};var ba=mxGraphHandler.prototype.getGuideStates;mxGraphHandler.prototype.getGuideStates=function(){for(var a=ba.apply(this,arguments),c=[],e=0;e<a.length;e++)"1"!=mxUtils.getValue(a[e].style,"part","0")&&c.push(a[e]);return c};var ma=mxVertexHandler.prototype.getSelectionBounds;
mxVertexHandler.prototype.getSelectionBounds=function(a){var c=this.graph.getModel(),e=c.getParent(a.cell),b=this.graph.getCellGeometry(a.cell);return c.isEdge(e)&&null!=b&&b.relative&&2>a.width&&2>a.height&&null!=a.text&&null!=a.text.boundingBox?(c=a.text.unrotatedBoundingBox||a.text.boundingBox,new mxRectangle(Math.round(c.x),Math.round(c.y),Math.round(c.width),Math.round(c.height))):ma.apply(this,arguments)};var T=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(a,
c){var e=this.graph.getModel(),b=e.getParent(this.state.cell),d=this.graph.getCellGeometry(this.state.cell);(this.getHandleForEvent(c)==mxEvent.ROTATION_HANDLE||!e.isEdge(b)||null==d||!d.relative||null==this.state||2<=this.state.width||2<=this.state.height)&&T.apply(this,arguments)};mxVertexHandler.prototype.rotateClick=function(){var a=mxUtils.getValue(this.state.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),c=mxUtils.getValue(this.state.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);
this.state.view.graph.model.isVertex(this.state.cell)&&a==mxConstants.NONE&&c==mxConstants.NONE?(a=mxUtils.mod(mxUtils.getValue(this.state.style,mxConstants.STYLE_ROTATION,0)+90,360),this.state.view.graph.setCellStyles(mxConstants.STYLE_ROTATION,a,[this.state.cell])):this.state.view.graph.turnShapes([this.state.cell])};var P=mxVertexHandler.prototype.mouseMove;mxVertexHandler.prototype.mouseMove=function(a,c){P.apply(this,arguments);null!=this.graph.graphHandler.first&&(null!=this.rotationShape&&
@@ -2646,7 +2647,7 @@ b()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.changeHandl
function(c,e){try{if(null==c&&(null==e||0==e.length)||1<this.graph.getSelectionCount())null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);else if(null!=c||null!=e&&0<e.length){null==this.linkHint&&(this.linkHint=a(),this.linkHint.style.padding="6px 8px 6px 8px",this.linkHint.style.opacity="1",this.linkHint.style.filter="",this.graph.container.appendChild(this.linkHint),mxEvent.addListener(this.linkHint,"mouseenter",mxUtils.bind(this,function(){this.graph.tooltipHandler.hide()})));
this.linkHint.innerHTML="";if(null!=c&&(this.linkHint.appendChild(this.graph.createLinkForHint(c)),this.graph.isEnabled()&&"function"===typeof this.graph.editLink)){var b=document.createElement("img");b.setAttribute("src",Editor.editImage);b.setAttribute("title",mxResources.get("editLink"));b.setAttribute("width","11");b.setAttribute("height","11");b.style.marginLeft="10px";b.style.marginBottom="-1px";b.style.cursor="pointer";this.linkHint.appendChild(b);mxEvent.addListener(b,"click",mxUtils.bind(this,
function(a){this.graph.setSelectionCell(this.state.cell);this.graph.editLink();mxEvent.consume(a)}));var d=document.createElement("img");d.setAttribute("src",Dialog.prototype.clearImage);d.setAttribute("title",mxResources.get("removeIt",[mxResources.get("link")]));d.setAttribute("width","13");d.setAttribute("height","10");d.style.marginLeft="4px";d.style.marginBottom="-1px";d.style.cursor="pointer";this.linkHint.appendChild(d);mxEvent.addListener(d,"click",mxUtils.bind(this,function(a){this.graph.setLinkForCell(this.state.cell,
-null);mxEvent.consume(a)}))}if(null!=e)for(b=0;b<e.length;b++){var g=document.createElement("div");g.style.marginTop=null!=c||0<b?"6px":"0px";g.appendChild(this.graph.createLinkForHint(e[b].getAttribute("href"),mxUtils.getTextContent(e[b])));this.linkHint.appendChild(g)}}}catch(ya){}};mxEdgeHandler.prototype.updateLinkHint=mxVertexHandler.prototype.updateLinkHint;var da=mxEdgeHandler.prototype.init;mxEdgeHandler.prototype.init=function(){da.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,
+null);mxEvent.consume(a)}))}if(null!=e)for(b=0;b<e.length;b++){var k=document.createElement("div");k.style.marginTop=null!=c||0<b?"6px":"0px";k.appendChild(this.graph.createLinkForHint(e[b].getAttribute("href"),mxUtils.getTextContent(e[b])));this.linkHint.appendChild(k)}}}catch(xa){}};mxEdgeHandler.prototype.updateLinkHint=mxVertexHandler.prototype.updateLinkHint;var ca=mxEdgeHandler.prototype.init;mxEdgeHandler.prototype.init=function(){ca.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,
function(){return this.state.view.graph.connectionHandler.isEnabled()});var a=mxUtils.bind(this,function(){null!=this.linkHint&&(this.linkHint.style.display=1==this.graph.getSelectionCount()?"":"none");null!=this.labelShape&&(this.labelShape.node.style.display=this.graph.isEnabled()&&this.graph.getSelectionCount()<this.graph.graphHandler.maxCells?"":"none")});this.changeHandler=mxUtils.bind(this,function(c,e){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),this.graph.getLinksForState(this.state));
a();this.redrawHandles()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.changeHandler);this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);var c=this.graph.getLinkForCell(this.state.cell),e=this.graph.getLinksForState(this.state);if(null!=c||null!=e&&0<e.length)this.updateLinkHint(c,e),this.redrawHandles()};var ia=mxConnectionHandler.prototype.init;mxConnectionHandler.prototype.init=function(){ia.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,
function(){return this.graph.connectionHandler.isEnabled()})};var pa=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){if(null!=this.moveHandles)for(var a=0;a<this.moveHandles.length;a++)this.moveHandles[a].style.left=this.moveHandles[a].rowState.x+this.moveHandles[a].rowState.width-5+"px",this.moveHandles[a].style.top=this.moveHandles[a].rowState.y+this.moveHandles[a].rowState.height/2-6+"px";if(null!=this.cornerHandles){var a=this.getSelectionBorderInset(),
@@ -2655,35 +2656,35 @@ c=this.cornerHandles,e=c[0].bounds.height/2;c[0].bounds.x=this.state.x-c[0].boun
"0",a),a=null!=e?mxUtils.getBoundingBox(this.state,this.state.style[mxConstants.STYLE_ROTATION]||"0"):this.state,c=null!=this.state.text?this.state.text.boundingBox:null,null==e&&(e=this.state),e=e.y+e.height,null!=c&&(e=Math.max(e,c.y+c.height)),this.linkHint.style.left=Math.max(0,Math.round(a.x+(a.width-this.linkHint.clientWidth)/2))+"px",this.linkHint.style.top=Math.round(e+this.verticalOffset/2+Editor.hintOffset)+"px")};var R=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=
function(){R.apply(this,arguments);if(null!=this.moveHandles){for(var a=0;a<this.moveHandles.length;a++)null!=this.moveHandles[a]&&null!=this.moveHandles[a].parentNode&&this.moveHandles[a].parentNode.removeChild(this.moveHandles[a]);this.moveHandles=null}if(null!=this.cornerHandles){for(a=0;a<this.cornerHandles.length;a++)null!=this.cornerHandles[a]&&null!=this.cornerHandles[a].node&&null!=this.cornerHandles[a].node.parentNode&&this.cornerHandles[a].node.parentNode.removeChild(this.cornerHandles[a].node);
this.cornerHandles=null}null!=this.linkHint&&(null!=this.linkHint.parentNode&&this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.changeHandler&&(this.graph.getSelectionModel().removeListener(this.changeHandler),this.graph.getModel().removeListener(this.changeHandler),this.changeHandler=null);null!=this.editingHandler&&(this.graph.removeListener(this.editingHandler),this.editingHandler=null)};var ka=mxEdgeHandler.prototype.redrawHandles;mxEdgeHandler.prototype.redrawHandles=
-function(){if(null!=this.marker&&(ka.apply(this),null!=this.state&&null!=this.linkHint)){var a=this.state;null!=this.state.text&&null!=this.state.text.bounds&&(a=new mxRectangle(a.x,a.y,a.width,a.height),a.add(this.state.text.bounds));this.linkHint.style.left=Math.max(0,Math.round(a.x+(a.width-this.linkHint.clientWidth)/2))+"px";this.linkHint.style.top=Math.round(a.y+a.height+Editor.hintOffset)+"px"}};var ba=mxEdgeHandler.prototype.reset;mxEdgeHandler.prototype.reset=function(){ba.apply(this,arguments);
-null!=this.linkHint&&(this.linkHint.style.visibility="")};var ja=mxEdgeHandler.prototype.destroy;mxEdgeHandler.prototype.destroy=function(){ja.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 a(){mxSwimlane.call(this)}function b(){mxCylinder.call(this)}function d(){mxCylinder.call(this)}function k(){mxActor.call(this)}function f(){mxCylinder.call(this)}function m(){mxCylinder.call(this)}function p(){mxCylinder.call(this)}function c(){mxCylinder.call(this)}function e(){mxShape.call(this)}function g(){mxShape.call(this)}function n(a,c,e,b){mxShape.call(this);this.bounds=a;this.fill=c;this.stroke=e;this.strokewidth=null!=b?b:1}function l(){mxActor.call(this)}function q(){mxCylinder.call(this)}
+function(){if(null!=this.marker&&(ka.apply(this),null!=this.state&&null!=this.linkHint)){var a=this.state;null!=this.state.text&&null!=this.state.text.bounds&&(a=new mxRectangle(a.x,a.y,a.width,a.height),a.add(this.state.text.bounds));this.linkHint.style.left=Math.max(0,Math.round(a.x+(a.width-this.linkHint.clientWidth)/2))+"px";this.linkHint.style.top=Math.round(a.y+a.height+Editor.hintOffset)+"px"}};var aa=mxEdgeHandler.prototype.reset;mxEdgeHandler.prototype.reset=function(){aa.apply(this,arguments);
+null!=this.linkHint&&(this.linkHint.style.visibility="")};var ja=mxEdgeHandler.prototype.destroy;mxEdgeHandler.prototype.destroy=function(){ja.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 a(){mxSwimlane.call(this)}function b(){mxCylinder.call(this)}function d(){mxCylinder.call(this)}function g(){mxActor.call(this)}function f(){mxCylinder.call(this)}function m(){mxCylinder.call(this)}function p(){mxCylinder.call(this)}function c(){mxCylinder.call(this)}function e(){mxShape.call(this)}function k(){mxShape.call(this)}function n(a,c,e,b){mxShape.call(this);this.bounds=a;this.fill=c;this.stroke=e;this.strokewidth=null!=b?b:1}function l(){mxActor.call(this)}function q(){mxCylinder.call(this)}
function u(){mxCylinder.call(this)}function t(){mxActor.call(this)}function A(){mxActor.call(this)}function x(){mxActor.call(this)}function G(){mxActor.call(this)}function z(){mxActor.call(this)}function E(){mxActor.call(this)}function H(){mxActor.call(this)}function K(a,c){this.canvas=a;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.defaultVariation=c;this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,K.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;
this.canvas.moveTo=mxUtils.bind(this,K.prototype.moveTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,K.prototype.close);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,K.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;this.canvas.curveTo=mxUtils.bind(this,K.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,K.prototype.arcTo)}function F(){mxRectangleShape.call(this)}function I(){mxRectangleShape.call(this)}
-function C(){mxActor.call(this)}function M(){mxActor.call(this)}function U(){mxActor.call(this)}function O(){mxRectangleShape.call(this)}function N(){mxRectangleShape.call(this)}function v(){mxCylinder.call(this)}function D(){mxShape.call(this)}function B(){mxShape.call(this)}function J(){mxEllipse.call(this)}function L(){mxShape.call(this)}function W(){mxShape.call(this)}function Q(){mxRectangleShape.call(this)}function aa(){mxShape.call(this)}function na(){mxShape.call(this)}function ga(){mxShape.call(this)}
-function ea(){mxShape.call(this)}function la(){mxShape.call(this)}function V(){mxCylinder.call(this)}function ca(){mxCylinder.call(this)}function ma(){mxRectangleShape.call(this)}function T(){mxDoubleEllipse.call(this)}function P(){mxDoubleEllipse.call(this)}function ta(){mxArrowConnector.call(this);this.spacing=0}function X(){mxArrowConnector.call(this);this.spacing=0}function da(){mxActor.call(this)}function ia(){mxRectangleShape.call(this)}function pa(){mxActor.call(this)}function R(){mxActor.call(this)}
-function ka(){mxActor.call(this)}function ba(){mxActor.call(this)}function ja(){mxActor.call(this)}function Y(){mxActor.call(this)}function qa(){mxActor.call(this)}function va(){mxActor.call(this)}function ua(){mxActor.call(this)}function ra(){mxActor.call(this)}function ya(){mxEllipse.call(this)}function za(){mxEllipse.call(this)}function S(){mxEllipse.call(this)}function Aa(){mxRhombus.call(this)}function ha(){mxEllipse.call(this)}function Ba(){mxEllipse.call(this)}function wa(){mxEllipse.call(this)}
-function Da(){mxEllipse.call(this)}function Ca(){mxActor.call(this)}function xa(){mxActor.call(this)}function Fa(){mxActor.call(this)}function Z(a,c,e,b){mxShape.call(this);this.bounds=a;this.fill=c;this.stroke=e;this.strokewidth=null!=b?b:1;this.rectStyle="square";this.size=10;this.absoluteCornerSize=!0;this.indent=2;this.rectOutline="single"}function Ha(){mxConnector.call(this)}function Ua(a,c,e,b,d,g,f,k,l,n){f+=l;var y=b.clone();b.x-=d*(2*f+l);b.y-=g*(2*f+l);d*=f+l;g*=f+l;return function(){a.ellipse(y.x-
-d-f,y.y-g-f,2*f,2*f);n?a.fillAndStroke():a.stroke()}}mxUtils.extend(a,mxSwimlane);a.prototype.getLabelBounds=function(a){return 0==this.getTitleSize()?mxShape.prototype.getLabelBounds.apply(this,arguments):mxSwimlane.prototype.getLabelBounds.apply(this,arguments)};a.prototype.paintVertexShape=function(a,c,e,b,d){0==this.getTitleSize()?mxRectangleShape.prototype.paintBackground.apply(this,arguments):(mxSwimlane.prototype.paintVertexShape.apply(this,arguments),a.translate(-c,-e));this.paintForeground(a,
-c,e,b,d)};a.prototype.paintForeground=function(a,c,e,b,d){if(null!=this.state){var y=this.flipH,g=this.flipV;if(this.direction==mxConstants.DIRECTION_NORTH||this.direction==mxConstants.DIRECTION_SOUTH)var f=y,y=g,g=f;a.rotate(-this.getShapeRotation(),y,g,c+b/2,e+d/2);s=this.scale;c=this.bounds.x/s;e=this.bounds.y/s;b=this.bounds.width/s;d=this.bounds.height/s;this.paintTableForeground(a,c,e,b,d)}};a.prototype.paintTableForeground=function(a,c,e,b,d){var y=this.state.view.graph,g=y.getActualStartSize(this.state.cell),
-f=y.model.getChildCells(this.state.cell,!0);if(0<f.length){var k="0"!=mxUtils.getValue(this.state.style,"rowLines","1"),sa="0"!=mxUtils.getValue(this.state.style,"columnLines","1");if(k)for(k=1;k<f.length;k++){var oa=y.getCellGeometry(f[k]);null!=oa&&(a.begin(),a.moveTo(c+g.x,e+oa.y),a.lineTo(c+b-g.width,e+oa.y),a.end(),a.stroke())}if(sa)for(b=y.model.getChildCells(f[0],!0),k=1;k<b.length;k++)oa=y.getCellGeometry(b[k]),null!=oa&&(a.begin(),a.moveTo(c+oa.x+g.x,e+g.y),a.lineTo(c+oa.x+g.x,e+d-g.height),
-a.end(),a.stroke())}};mxCellRenderer.registerShape("table",a);mxUtils.extend(b,mxCylinder);b.prototype.size=20;b.prototype.darkOpacity=0;b.prototype.darkOpacity2=0;b.prototype.paintVertexShape=function(a,c,e,b,d){var y=Math.max(0,Math.min(b,Math.min(d,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),g=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity)))),f=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity2",this.darkOpacity2))));
-a.translate(c,e);a.begin();a.moveTo(0,0);a.lineTo(b-y,0);a.lineTo(b,y);a.lineTo(b,d);a.lineTo(y,d);a.lineTo(0,d-y);a.lineTo(0,0);a.close();a.end();a.fillAndStroke();this.outline||(a.setShadow(!1),0!=g&&(a.setFillAlpha(Math.abs(g)),a.setFillColor(0>g?"#FFFFFF":"#000000"),a.begin(),a.moveTo(0,0),a.lineTo(b-y,0),a.lineTo(b,y),a.lineTo(y,y),a.close(),a.fill()),0!=f&&(a.setFillAlpha(Math.abs(f)),a.setFillColor(0>f?"#FFFFFF":"#000000"),a.begin(),a.moveTo(0,0),a.lineTo(y,y),a.lineTo(y,d),a.lineTo(0,d-y),
-a.close(),a.fill()),a.begin(),a.moveTo(y,d),a.lineTo(y,y),a.lineTo(0,0),a.moveTo(y,y),a.lineTo(b,y),a.end(),a.stroke())};b.prototype.getLabelMargins=function(a){return mxUtils.getValue(this.style,"boundedLbl",!1)?(a=parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale,new mxRectangle(a,a,0,0)):null};mxCellRenderer.registerShape("cube",b);var Ra=Math.tan(mxUtils.toRadians(30)),Ia=(.5-Ra)/2;mxCellRenderer.registerShape("isoRectangle",k);mxUtils.extend(d,mxCylinder);d.prototype.size=
-6;d.prototype.paintVertexShape=function(a,c,e,b,d){a.setFillColor(this.stroke);var y=Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size))-2)+2*this.strokewidth;a.ellipse(c+.5*(b-y),e+.5*(d-y),y,y);a.fill();a.setFillColor(mxConstants.NONE);a.rect(c,e,b,d);a.fill()};mxCellRenderer.registerShape("waypoint",d);mxUtils.extend(k,mxActor);k.prototype.size=20;k.prototype.redrawPath=function(a,c,e,b,d){c=Math.min(b,d/Ra);a.translate((b-c)/2,(d-c)/2+c/4);a.moveTo(0,.25*c);a.lineTo(.5*c,c*Ia);
-a.lineTo(c,.25*c);a.lineTo(.5*c,(.5-Ia)*c);a.lineTo(0,.25*c);a.close();a.end()};mxCellRenderer.registerShape("isoRectangle",k);mxUtils.extend(f,mxCylinder);f.prototype.size=20;f.prototype.redrawPath=function(a,c,e,b,d,g){c=Math.min(b,d/(.5+Ra));g?(a.moveTo(0,.25*c),a.lineTo(.5*c,(.5-Ia)*c),a.lineTo(c,.25*c),a.moveTo(.5*c,(.5-Ia)*c),a.lineTo(.5*c,(1-Ia)*c)):(a.translate((b-c)/2,(d-c)/2),a.moveTo(0,.25*c),a.lineTo(.5*c,c*Ia),a.lineTo(c,.25*c),a.lineTo(c,.75*c),a.lineTo(.5*c,(1-Ia)*c),a.lineTo(0,.75*
-c),a.close());a.end()};mxCellRenderer.registerShape("isoCube",f);mxUtils.extend(m,mxCylinder);m.prototype.redrawPath=function(a,c,e,b,d,g){c=Math.min(d/2,Math.round(d/8)+this.strokewidth-1);if(g&&null!=this.fill||!g&&null==this.fill)a.moveTo(0,c),a.curveTo(0,2*c,b,2*c,b,c),g||(a.stroke(),a.begin()),a.translate(0,c/2),a.moveTo(0,c),a.curveTo(0,2*c,b,2*c,b,c),g||(a.stroke(),a.begin()),a.translate(0,c/2),a.moveTo(0,c),a.curveTo(0,2*c,b,2*c,b,c),g||(a.stroke(),a.begin()),a.translate(0,-c);g||(a.moveTo(0,
-c),a.curveTo(0,-c/3,b,-c/3,b,c),a.lineTo(b,d-c),a.curveTo(b,d+c/3,0,d+c/3,0,d-c),a.close())};m.prototype.getLabelMargins=function(a){return new mxRectangle(0,2.5*Math.min(a.height/2,Math.round(a.height/8)+this.strokewidth-1),0,0)};mxCellRenderer.registerShape("datastore",m);mxUtils.extend(p,mxCylinder);p.prototype.size=30;p.prototype.darkOpacity=0;p.prototype.paintVertexShape=function(a,c,e,b,d){var y=Math.max(0,Math.min(b,Math.min(d,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),g=
-Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity))));a.translate(c,e);a.begin();a.moveTo(0,0);a.lineTo(b-y,0);a.lineTo(b,y);a.lineTo(b,d);a.lineTo(0,d);a.lineTo(0,0);a.close();a.end();a.fillAndStroke();this.outline||(a.setShadow(!1),0!=g&&(a.setFillAlpha(Math.abs(g)),a.setFillColor(0>g?"#FFFFFF":"#000000"),a.begin(),a.moveTo(b-y,0),a.lineTo(b-y,y),a.lineTo(b,y),a.close(),a.fill()),a.begin(),a.moveTo(b-y,0),a.lineTo(b-y,y),a.lineTo(b,y),a.end(),a.stroke())};
+function D(){mxActor.call(this)}function M(){mxActor.call(this)}function U(){mxActor.call(this)}function O(){mxRectangleShape.call(this)}function N(){mxRectangleShape.call(this)}function v(){mxCylinder.call(this)}function C(){mxShape.call(this)}function B(){mxShape.call(this)}function J(){mxEllipse.call(this)}function L(){mxShape.call(this)}function W(){mxShape.call(this)}function Q(){mxRectangleShape.call(this)}function Z(){mxShape.call(this)}function na(){mxShape.call(this)}function ga(){mxShape.call(this)}
+function da(){mxShape.call(this)}function la(){mxShape.call(this)}function V(){mxCylinder.call(this)}function ba(){mxCylinder.call(this)}function ma(){mxRectangleShape.call(this)}function T(){mxDoubleEllipse.call(this)}function P(){mxDoubleEllipse.call(this)}function ta(){mxArrowConnector.call(this);this.spacing=0}function X(){mxArrowConnector.call(this);this.spacing=0}function ca(){mxActor.call(this)}function ia(){mxRectangleShape.call(this)}function pa(){mxActor.call(this)}function R(){mxActor.call(this)}
+function ka(){mxActor.call(this)}function aa(){mxActor.call(this)}function ja(){mxActor.call(this)}function ea(){mxActor.call(this)}function qa(){mxActor.call(this)}function ya(){mxActor.call(this)}function ua(){mxActor.call(this)}function ra(){mxActor.call(this)}function xa(){mxEllipse.call(this)}function za(){mxEllipse.call(this)}function S(){mxEllipse.call(this)}function Aa(){mxRhombus.call(this)}function ha(){mxEllipse.call(this)}function Ba(){mxEllipse.call(this)}function va(){mxEllipse.call(this)}
+function Da(){mxEllipse.call(this)}function Ca(){mxActor.call(this)}function wa(){mxActor.call(this)}function Fa(){mxActor.call(this)}function Y(a,c,e,b){mxShape.call(this);this.bounds=a;this.fill=c;this.stroke=e;this.strokewidth=null!=b?b:1;this.rectStyle="square";this.size=10;this.absoluteCornerSize=!0;this.indent=2;this.rectOutline="single"}function Ha(){mxConnector.call(this)}function Ua(a,c,e,b,d,k,f,g,l,n){f+=l;var y=b.clone();b.x-=d*(2*f+l);b.y-=k*(2*f+l);d*=f+l;k*=f+l;return function(){a.ellipse(y.x-
+d-f,y.y-k-f,2*f,2*f);n?a.fillAndStroke():a.stroke()}}mxUtils.extend(a,mxSwimlane);a.prototype.getLabelBounds=function(a){return 0==this.getTitleSize()?mxShape.prototype.getLabelBounds.apply(this,arguments):mxSwimlane.prototype.getLabelBounds.apply(this,arguments)};a.prototype.paintVertexShape=function(a,c,e,b,d){0==this.getTitleSize()?mxRectangleShape.prototype.paintBackground.apply(this,arguments):(mxSwimlane.prototype.paintVertexShape.apply(this,arguments),a.translate(-c,-e));this.paintForeground(a,
+c,e,b,d)};a.prototype.paintForeground=function(a,c,e,b,d){if(null!=this.state){var y=this.flipH,k=this.flipV;if(this.direction==mxConstants.DIRECTION_NORTH||this.direction==mxConstants.DIRECTION_SOUTH)var f=y,y=k,k=f;a.rotate(-this.getShapeRotation(),y,k,c+b/2,e+d/2);s=this.scale;c=this.bounds.x/s;e=this.bounds.y/s;b=this.bounds.width/s;d=this.bounds.height/s;this.paintTableForeground(a,c,e,b,d)}};a.prototype.paintTableForeground=function(a,c,e,b,d){var y=this.state.view.graph,k=y.getActualStartSize(this.state.cell),
+f=y.model.getChildCells(this.state.cell,!0);if(0<f.length){var g="0"!=mxUtils.getValue(this.state.style,"rowLines","1"),sa="0"!=mxUtils.getValue(this.state.style,"columnLines","1");if(g)for(g=1;g<f.length;g++){var oa=y.getCellGeometry(f[g]);null!=oa&&(a.begin(),a.moveTo(c+k.x,e+oa.y),a.lineTo(c+b-k.width,e+oa.y),a.end(),a.stroke())}if(sa)for(b=y.model.getChildCells(f[0],!0),g=1;g<b.length;g++)oa=y.getCellGeometry(b[g]),null!=oa&&(a.begin(),a.moveTo(c+oa.x+k.x,e+k.y),a.lineTo(c+oa.x+k.x,e+d-k.height),
+a.end(),a.stroke())}};mxCellRenderer.registerShape("table",a);mxUtils.extend(b,mxCylinder);b.prototype.size=20;b.prototype.darkOpacity=0;b.prototype.darkOpacity2=0;b.prototype.paintVertexShape=function(a,c,e,b,d){var y=Math.max(0,Math.min(b,Math.min(d,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),k=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity)))),f=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity2",this.darkOpacity2))));
+a.translate(c,e);a.begin();a.moveTo(0,0);a.lineTo(b-y,0);a.lineTo(b,y);a.lineTo(b,d);a.lineTo(y,d);a.lineTo(0,d-y);a.lineTo(0,0);a.close();a.end();a.fillAndStroke();this.outline||(a.setShadow(!1),0!=k&&(a.setFillAlpha(Math.abs(k)),a.setFillColor(0>k?"#FFFFFF":"#000000"),a.begin(),a.moveTo(0,0),a.lineTo(b-y,0),a.lineTo(b,y),a.lineTo(y,y),a.close(),a.fill()),0!=f&&(a.setFillAlpha(Math.abs(f)),a.setFillColor(0>f?"#FFFFFF":"#000000"),a.begin(),a.moveTo(0,0),a.lineTo(y,y),a.lineTo(y,d),a.lineTo(0,d-y),
+a.close(),a.fill()),a.begin(),a.moveTo(y,d),a.lineTo(y,y),a.lineTo(0,0),a.moveTo(y,y),a.lineTo(b,y),a.end(),a.stroke())};b.prototype.getLabelMargins=function(a){return mxUtils.getValue(this.style,"boundedLbl",!1)?(a=parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale,new mxRectangle(a,a,0,0)):null};mxCellRenderer.registerShape("cube",b);var Ra=Math.tan(mxUtils.toRadians(30)),Ia=(.5-Ra)/2;mxCellRenderer.registerShape("isoRectangle",g);mxUtils.extend(d,mxCylinder);d.prototype.size=
+6;d.prototype.paintVertexShape=function(a,c,e,b,d){a.setFillColor(this.stroke);var y=Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size))-2)+2*this.strokewidth;a.ellipse(c+.5*(b-y),e+.5*(d-y),y,y);a.fill();a.setFillColor(mxConstants.NONE);a.rect(c,e,b,d);a.fill()};mxCellRenderer.registerShape("waypoint",d);mxUtils.extend(g,mxActor);g.prototype.size=20;g.prototype.redrawPath=function(a,c,e,b,d){c=Math.min(b,d/Ra);a.translate((b-c)/2,(d-c)/2+c/4);a.moveTo(0,.25*c);a.lineTo(.5*c,c*Ia);
+a.lineTo(c,.25*c);a.lineTo(.5*c,(.5-Ia)*c);a.lineTo(0,.25*c);a.close();a.end()};mxCellRenderer.registerShape("isoRectangle",g);mxUtils.extend(f,mxCylinder);f.prototype.size=20;f.prototype.redrawPath=function(a,c,e,b,d,k){c=Math.min(b,d/(.5+Ra));k?(a.moveTo(0,.25*c),a.lineTo(.5*c,(.5-Ia)*c),a.lineTo(c,.25*c),a.moveTo(.5*c,(.5-Ia)*c),a.lineTo(.5*c,(1-Ia)*c)):(a.translate((b-c)/2,(d-c)/2),a.moveTo(0,.25*c),a.lineTo(.5*c,c*Ia),a.lineTo(c,.25*c),a.lineTo(c,.75*c),a.lineTo(.5*c,(1-Ia)*c),a.lineTo(0,.75*
+c),a.close());a.end()};mxCellRenderer.registerShape("isoCube",f);mxUtils.extend(m,mxCylinder);m.prototype.redrawPath=function(a,c,e,b,d,k){c=Math.min(d/2,Math.round(d/8)+this.strokewidth-1);if(k&&null!=this.fill||!k&&null==this.fill)a.moveTo(0,c),a.curveTo(0,2*c,b,2*c,b,c),k||(a.stroke(),a.begin()),a.translate(0,c/2),a.moveTo(0,c),a.curveTo(0,2*c,b,2*c,b,c),k||(a.stroke(),a.begin()),a.translate(0,c/2),a.moveTo(0,c),a.curveTo(0,2*c,b,2*c,b,c),k||(a.stroke(),a.begin()),a.translate(0,-c);k||(a.moveTo(0,
+c),a.curveTo(0,-c/3,b,-c/3,b,c),a.lineTo(b,d-c),a.curveTo(b,d+c/3,0,d+c/3,0,d-c),a.close())};m.prototype.getLabelMargins=function(a){return new mxRectangle(0,2.5*Math.min(a.height/2,Math.round(a.height/8)+this.strokewidth-1),0,0)};mxCellRenderer.registerShape("datastore",m);mxUtils.extend(p,mxCylinder);p.prototype.size=30;p.prototype.darkOpacity=0;p.prototype.paintVertexShape=function(a,c,e,b,d){var y=Math.max(0,Math.min(b,Math.min(d,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),k=
+Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity))));a.translate(c,e);a.begin();a.moveTo(0,0);a.lineTo(b-y,0);a.lineTo(b,y);a.lineTo(b,d);a.lineTo(0,d);a.lineTo(0,0);a.close();a.end();a.fillAndStroke();this.outline||(a.setShadow(!1),0!=k&&(a.setFillAlpha(Math.abs(k)),a.setFillColor(0>k?"#FFFFFF":"#000000"),a.begin(),a.moveTo(b-y,0),a.lineTo(b-y,y),a.lineTo(b,y),a.close(),a.fill()),a.begin(),a.moveTo(b-y,0),a.lineTo(b-y,y),a.lineTo(b,y),a.end(),a.stroke())};
mxCellRenderer.registerShape("note",p);mxUtils.extend(c,p);mxCellRenderer.registerShape("note2",c);c.prototype.getLabelMargins=function(a){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var c=mxUtils.getValue(this.style,"size",15);return new mxRectangle(0,Math.min(a.height*this.scale,c*this.scale),0,0)}return null};mxUtils.extend(e,mxShape);e.prototype.isoAngle=15;e.prototype.paintVertexShape=function(a,c,e,b,d){var y=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.style,"isoAngle",this.isoAngle))))*
-Math.PI/200,y=Math.min(b*Math.tan(y),.5*d);a.translate(c,e);a.begin();a.moveTo(.5*b,0);a.lineTo(b,y);a.lineTo(b,d-y);a.lineTo(.5*b,d);a.lineTo(0,d-y);a.lineTo(0,y);a.close();a.fillAndStroke();a.setShadow(!1);a.begin();a.moveTo(0,y);a.lineTo(.5*b,2*y);a.lineTo(b,y);a.moveTo(.5*b,2*y);a.lineTo(.5*b,d);a.stroke()};mxCellRenderer.registerShape("isoCube2",e);mxUtils.extend(g,mxShape);g.prototype.size=15;g.prototype.paintVertexShape=function(a,c,e,b,d){var y=Math.max(0,Math.min(.5*d,parseFloat(mxUtils.getValue(this.style,
-"size",this.size))));a.translate(c,e);0==y?(a.rect(0,0,b,d),a.fillAndStroke()):(a.begin(),a.moveTo(0,y),a.arcTo(.5*b,y,0,0,1,.5*b,0),a.arcTo(.5*b,y,0,0,1,b,y),a.lineTo(b,d-y),a.arcTo(.5*b,y,0,0,1,.5*b,d),a.arcTo(.5*b,y,0,0,1,0,d-y),a.close(),a.fillAndStroke(),a.setShadow(!1),a.begin(),a.moveTo(b,y),a.arcTo(.5*b,y,0,0,1,.5*b,2*y),a.arcTo(.5*b,y,0,0,1,0,y),a.stroke())};mxCellRenderer.registerShape("cylinder2",g);mxUtils.extend(n,mxCylinder);n.prototype.size=15;n.prototype.paintVertexShape=function(a,
-c,e,b,d){var y=Math.max(0,Math.min(.5*d,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),g=mxUtils.getValue(this.style,"lid",!0);a.translate(c,e);0==y?(a.rect(0,0,b,d),a.fillAndStroke()):(a.begin(),g?(a.moveTo(0,y),a.arcTo(.5*b,y,0,0,1,.5*b,0),a.arcTo(.5*b,y,0,0,1,b,y)):(a.moveTo(0,0),a.arcTo(.5*b,y,0,0,0,.5*b,y),a.arcTo(.5*b,y,0,0,0,b,0)),a.lineTo(b,d-y),a.arcTo(.5*b,y,0,0,1,.5*b,d),a.arcTo(.5*b,y,0,0,1,0,d-y),a.close(),a.fillAndStroke(),a.setShadow(!1),g&&(a.begin(),a.moveTo(b,y),a.arcTo(.5*
+Math.PI/200,y=Math.min(b*Math.tan(y),.5*d);a.translate(c,e);a.begin();a.moveTo(.5*b,0);a.lineTo(b,y);a.lineTo(b,d-y);a.lineTo(.5*b,d);a.lineTo(0,d-y);a.lineTo(0,y);a.close();a.fillAndStroke();a.setShadow(!1);a.begin();a.moveTo(0,y);a.lineTo(.5*b,2*y);a.lineTo(b,y);a.moveTo(.5*b,2*y);a.lineTo(.5*b,d);a.stroke()};mxCellRenderer.registerShape("isoCube2",e);mxUtils.extend(k,mxShape);k.prototype.size=15;k.prototype.paintVertexShape=function(a,c,e,b,d){var y=Math.max(0,Math.min(.5*d,parseFloat(mxUtils.getValue(this.style,
+"size",this.size))));a.translate(c,e);0==y?(a.rect(0,0,b,d),a.fillAndStroke()):(a.begin(),a.moveTo(0,y),a.arcTo(.5*b,y,0,0,1,.5*b,0),a.arcTo(.5*b,y,0,0,1,b,y),a.lineTo(b,d-y),a.arcTo(.5*b,y,0,0,1,.5*b,d),a.arcTo(.5*b,y,0,0,1,0,d-y),a.close(),a.fillAndStroke(),a.setShadow(!1),a.begin(),a.moveTo(b,y),a.arcTo(.5*b,y,0,0,1,.5*b,2*y),a.arcTo(.5*b,y,0,0,1,0,y),a.stroke())};mxCellRenderer.registerShape("cylinder2",k);mxUtils.extend(n,mxCylinder);n.prototype.size=15;n.prototype.paintVertexShape=function(a,
+c,e,b,d){var y=Math.max(0,Math.min(.5*d,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),k=mxUtils.getValue(this.style,"lid",!0);a.translate(c,e);0==y?(a.rect(0,0,b,d),a.fillAndStroke()):(a.begin(),k?(a.moveTo(0,y),a.arcTo(.5*b,y,0,0,1,.5*b,0),a.arcTo(.5*b,y,0,0,1,b,y)):(a.moveTo(0,0),a.arcTo(.5*b,y,0,0,0,.5*b,y),a.arcTo(.5*b,y,0,0,0,b,0)),a.lineTo(b,d-y),a.arcTo(.5*b,y,0,0,1,.5*b,d),a.arcTo(.5*b,y,0,0,1,0,d-y),a.close(),a.fillAndStroke(),a.setShadow(!1),k&&(a.begin(),a.moveTo(b,y),a.arcTo(.5*
b,y,0,0,1,.5*b,2*y),a.arcTo(.5*b,y,0,0,1,0,y),a.stroke()))};mxCellRenderer.registerShape("cylinder3",n);mxUtils.extend(l,mxActor);l.prototype.redrawPath=function(a,c,e,b,d){a.moveTo(0,0);a.quadTo(b/2,.5*d,b,0);a.quadTo(.5*b,d/2,b,d);a.quadTo(b/2,.5*d,0,d);a.quadTo(.5*b,d/2,0,0);a.end()};mxCellRenderer.registerShape("switch",l);mxUtils.extend(q,mxCylinder);q.prototype.tabWidth=60;q.prototype.tabHeight=20;q.prototype.tabPosition="right";q.prototype.arcSize=.1;q.prototype.paintVertexShape=function(a,
-c,e,b,d){a.translate(c,e);c=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth))));e=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));var y=mxUtils.getValue(this.style,"tabPosition",this.tabPosition),g=mxUtils.getValue(this.style,"rounded",!1),f=mxUtils.getValue(this.style,"absoluteArcSize",!1),k=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));f||(k*=Math.min(b,d));k=Math.min(k,.5*b,.5*(d-e));c=Math.max(c,
-k);c=Math.min(b-k,c);g||(k=0);a.begin();"left"==y?(a.moveTo(Math.max(k,0),e),a.lineTo(Math.max(k,0),0),a.lineTo(c,0),a.lineTo(c,e)):(a.moveTo(b-c,e),a.lineTo(b-c,0),a.lineTo(b-Math.max(k,0),0),a.lineTo(b-Math.max(k,0),e));g?(a.moveTo(0,k+e),a.arcTo(k,k,0,0,1,k,e),a.lineTo(b-k,e),a.arcTo(k,k,0,0,1,b,k+e),a.lineTo(b,d-k),a.arcTo(k,k,0,0,1,b-k,d),a.lineTo(k,d),a.arcTo(k,k,0,0,1,0,d-k)):(a.moveTo(0,e),a.lineTo(b,e),a.lineTo(b,d),a.lineTo(0,d));a.close();a.fillAndStroke();a.setShadow(!1);"triangle"==mxUtils.getValue(this.style,
+c,e,b,d){a.translate(c,e);c=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth))));e=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));var y=mxUtils.getValue(this.style,"tabPosition",this.tabPosition),k=mxUtils.getValue(this.style,"rounded",!1),f=mxUtils.getValue(this.style,"absoluteArcSize",!1),g=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));f||(g*=Math.min(b,d));g=Math.min(g,.5*b,.5*(d-e));c=Math.max(c,
+g);c=Math.min(b-g,c);k||(g=0);a.begin();"left"==y?(a.moveTo(Math.max(g,0),e),a.lineTo(Math.max(g,0),0),a.lineTo(c,0),a.lineTo(c,e)):(a.moveTo(b-c,e),a.lineTo(b-c,0),a.lineTo(b-Math.max(g,0),0),a.lineTo(b-Math.max(g,0),e));k?(a.moveTo(0,g+e),a.arcTo(g,g,0,0,1,g,e),a.lineTo(b-g,e),a.arcTo(g,g,0,0,1,b,g+e),a.lineTo(b,d-g),a.arcTo(g,g,0,0,1,b-g,d),a.lineTo(g,d),a.arcTo(g,g,0,0,1,0,d-g)):(a.moveTo(0,e),a.lineTo(b,e),a.lineTo(b,d),a.lineTo(0,d));a.close();a.fillAndStroke();a.setShadow(!1);"triangle"==mxUtils.getValue(this.style,
"folderSymbol",null)&&(a.begin(),a.moveTo(b-30,e+20),a.lineTo(b-20,e+10),a.lineTo(b-10,e+20),a.close(),a.stroke())};mxCellRenderer.registerShape("folder",q);q.prototype.getLabelMargins=function(a){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var c=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;if(mxUtils.getValue(this.style,"labelInHeader",!1)){var e=mxUtils.getValue(this.style,"tabWidth",15)*this.scale,c=mxUtils.getValue(this.style,"tabHeight",15)*this.scale,b=mxUtils.getValue(this.style,
"rounded",!1),d=mxUtils.getValue(this.style,"absoluteArcSize",!1),y=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));d||(y*=Math.min(a.width,a.height));y=Math.min(y,.5*a.width,.5*(a.height-c));b||(y=0);return"left"==mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?new mxRectangle(y,0,Math.min(a.width,a.width-e),Math.min(a.height,a.height-c)):new mxRectangle(Math.min(a.width,a.width-e),0,y,Math.min(a.height,a.height-c))}return new mxRectangle(0,Math.min(a.height,c),0,0)}return null};
-mxUtils.extend(u,mxCylinder);u.prototype.arcSize=.1;u.prototype.paintVertexShape=function(a,c,e,b,d){a.translate(c,e);var y=mxUtils.getValue(this.style,"rounded",!1),g=mxUtils.getValue(this.style,"absoluteArcSize",!1);c=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));e=mxUtils.getValue(this.style,"umlStateConnection",null);g||(c*=Math.min(b,d));c=Math.min(c,.5*b,.5*d);y||(c=0);y=0;null!=e&&(y=10);a.begin();a.moveTo(y,c);a.arcTo(c,c,0,0,1,y+c,0);a.lineTo(b-c,0);a.arcTo(c,c,0,0,1,b,
+mxUtils.extend(u,mxCylinder);u.prototype.arcSize=.1;u.prototype.paintVertexShape=function(a,c,e,b,d){a.translate(c,e);var y=mxUtils.getValue(this.style,"rounded",!1),k=mxUtils.getValue(this.style,"absoluteArcSize",!1);c=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));e=mxUtils.getValue(this.style,"umlStateConnection",null);k||(c*=Math.min(b,d));c=Math.min(c,.5*b,.5*d);y||(c=0);y=0;null!=e&&(y=10);a.begin();a.moveTo(y,c);a.arcTo(c,c,0,0,1,y+c,0);a.lineTo(b-c,0);a.arcTo(c,c,0,0,1,b,
c);a.lineTo(b,d-c);a.arcTo(c,c,0,0,1,b-c,d);a.lineTo(y+c,d);a.arcTo(c,c,0,0,1,y,d-c);a.close();a.fillAndStroke();a.setShadow(!1);"collapseState"==mxUtils.getValue(this.style,"umlStateSymbol",null)&&(a.roundrect(b-40,d-20,10,10,3,3),a.stroke(),a.roundrect(b-20,d-20,10,10,3,3),a.stroke(),a.begin(),a.moveTo(b-30,d-15),a.lineTo(b-20,d-15),a.stroke());"connPointRefEntry"==e?(a.ellipse(0,.5*d-10,20,20),a.fillAndStroke()):"connPointRefExit"==e&&(a.ellipse(0,.5*d-10,20,20),a.fillAndStroke(),a.begin(),a.moveTo(5,
.5*d-5),a.lineTo(15,.5*d+5),a.moveTo(15,.5*d-5),a.lineTo(5,.5*d+5),a.stroke())};u.prototype.getLabelMargins=function(a){return mxUtils.getValue(this.style,"boundedLbl",!1)&&null!=mxUtils.getValue(this.style,"umlStateConnection",null)?new mxRectangle(10*this.scale,0,0,0):null};mxCellRenderer.registerShape("umlState",u);mxUtils.extend(t,mxActor);t.prototype.size=30;t.prototype.isRoundable=function(){return!0};t.prototype.redrawPath=function(a,c,e,b,d){c=Math.max(0,Math.min(b,Math.min(d,parseFloat(mxUtils.getValue(this.style,
"size",this.size)))));e=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(c,0),new mxPoint(b,0),new mxPoint(b,d),new mxPoint(0,d),new mxPoint(0,c)],this.isRounded,e,!0);a.end()};mxCellRenderer.registerShape("card",t);mxUtils.extend(A,mxActor);A.prototype.size=.4;A.prototype.redrawPath=function(a,c,e,b,d){c=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));a.moveTo(0,c/2);a.quadTo(b/4,1.4*c,b/2,c/2);a.quadTo(3*
@@ -2698,159 +2699,159 @@ mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPo
this.fixedSize)))):b*Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.style,"size",this.size))));e=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,d),new mxPoint(c,0),new mxPoint(b-c,0),new mxPoint(b,d)],this.isRounded,e,!0)};mxCellRenderer.registerShape("trapezoid",z);mxUtils.extend(E,mxActor);E.prototype.size=.5;E.prototype.redrawPath=function(a,c,e,b,d){a.setFillColor(null);c=b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,
"size",this.size))));e=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(b,0),new mxPoint(c,0),new mxPoint(c,d/2),new mxPoint(0,d/2),new mxPoint(c,d/2),new mxPoint(c,d),new mxPoint(b,d)],this.isRounded,e,!1);a.end()};mxCellRenderer.registerShape("curlyBracket",E);mxUtils.extend(H,mxActor);H.prototype.redrawPath=function(a,c,e,b,d){a.setStrokeWidth(1);a.setFillColor(this.stroke);c=b/5;a.rect(0,0,c,d);a.fillAndStroke();a.rect(2*c,0,c,d);
a.fillAndStroke();a.rect(4*c,0,c,d);a.fillAndStroke()};mxCellRenderer.registerShape("parallelMarker",H);K.prototype.moveTo=function(a,c){this.originalMoveTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=c;this.firstX=a;this.firstY=c};K.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)};K.prototype.quadTo=function(a,c,e,b){this.originalQuadTo.apply(this.canvas,
-arguments);this.lastX=e;this.lastY=b};K.prototype.curveTo=function(a,c,e,b,d,g){this.originalCurveTo.apply(this.canvas,arguments);this.lastX=d;this.lastY=g};K.prototype.arcTo=function(a,c,e,b,d,g,f){this.originalArcTo.apply(this.canvas,arguments);this.lastX=g;this.lastY=f};K.prototype.lineTo=function(a,c){if(null!=this.lastX&&null!=this.lastY){var e=function(a){return"number"===typeof a?a?0>a?-1:1:a===a?0:NaN:NaN},b=Math.abs(a-this.lastX),d=Math.abs(c-this.lastY),y=Math.sqrt(b*b+d*d);if(2>y){this.originalLineTo.apply(this.canvas,
-arguments);this.lastX=a;this.lastY=c;return}var g=Math.round(y/10),f=this.defaultVariation;5>g&&(g=5,f/=3);for(var k=e(a-this.lastX)*b/g,e=e(c-this.lastY)*d/g,b=b/y,d=d/y,y=0;y<g;y++){var l=(Math.random()-.5)*f;this.originalLineTo.call(this.canvas,k*y+this.lastX-l*d,e*y+this.lastY-l*b)}this.originalLineTo.call(this.canvas,a,c)}else this.originalLineTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=c};K.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;this.canvas.moveTo=this.originalMoveTo;
+arguments);this.lastX=e;this.lastY=b};K.prototype.curveTo=function(a,c,e,b,d,k){this.originalCurveTo.apply(this.canvas,arguments);this.lastX=d;this.lastY=k};K.prototype.arcTo=function(a,c,e,b,d,k,f){this.originalArcTo.apply(this.canvas,arguments);this.lastX=k;this.lastY=f};K.prototype.lineTo=function(a,c){if(null!=this.lastX&&null!=this.lastY){var e=function(a){return"number"===typeof a?a?0>a?-1:1:a===a?0:NaN:NaN},b=Math.abs(a-this.lastX),d=Math.abs(c-this.lastY),y=Math.sqrt(b*b+d*d);if(2>y){this.originalLineTo.apply(this.canvas,
+arguments);this.lastX=a;this.lastY=c;return}var k=Math.round(y/10),f=this.defaultVariation;5>k&&(k=5,f/=3);for(var g=e(a-this.lastX)*b/k,e=e(c-this.lastY)*d/k,b=b/y,d=d/y,y=0;y<k;y++){var l=(Math.random()-.5)*f;this.originalLineTo.call(this.canvas,g*y+this.lastX-l*d,e*y+this.lastY-l*b)}this.originalLineTo.call(this.canvas,a,c)}else this.originalLineTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=c};K.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 $a=mxShape.prototype.beforePaint;mxShape.prototype.beforePaint=function(a){$a.apply(this,arguments);null==a.handJiggle&&(a.handJiggle=this.createHandJiggle(a))};var ab=mxShape.prototype.afterPaint;mxShape.prototype.afterPaint=function(a){ab.apply(this,arguments);null!=a.handJiggle&&(a.handJiggle.destroy(),
delete a.handJiggle)};mxShape.prototype.createComicCanvas=function(a){return new K(a,mxUtils.getValue(this.style,"jiggle",this.defaultJiggle))};mxShape.prototype.createHandJiggle=function(a){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"comic","0")?null:this.createComicCanvas(a)};mxRhombus.prototype.defaultJiggle=2;var bb=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"))&&bb.apply(this,arguments)};var eb=mxRectangleShape.prototype.paintBackground;mxRectangleShape.prototype.paintBackground=function(a,c,e,b,d){if(null==a.handJiggle||a.handJiggle.constructor!=K)eb.apply(this,arguments);else{var y=!0;null!=this.style&&(y="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(y||null!=this.fill&&this.fill!=mxConstants.NONE||null!=this.stroke&&this.stroke!=mxConstants.NONE)y||
null!=this.fill&&this.fill!=mxConstants.NONE||(a.pointerEvents=!1),a.begin(),this.isRounded?("1"==mxUtils.getValue(this.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?y=Math.min(b/2,Math.min(d/2,mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2)):(y=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,y=Math.min(b*y,d*y)),a.moveTo(c+y,e),a.lineTo(c+b-y,e),a.quadTo(c+b,e,c+b,e+y),a.lineTo(c+b,e+d-y),a.quadTo(c+b,e+d,c+b-y,
e+d),a.lineTo(c+y,e+d),a.quadTo(c,e+d,c,e+d-y),a.lineTo(c,e+y),a.quadTo(c,e,c+y,e)):(a.moveTo(c,e),a.lineTo(c+b,e),a.lineTo(c+b,e+d),a.lineTo(c,e+d),a.lineTo(c,e)),a.close(),a.end(),a.fillAndStroke()}};mxUtils.extend(F,mxRectangleShape);F.prototype.size=.1;F.prototype.fixedSize=!1;F.prototype.isHtmlAllowed=function(){return!1};F.prototype.getLabelBounds=function(a){if(mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,!0)==(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||
this.direction==mxConstants.DIRECTION_WEST)){var c=a.width,e=a.height;a=new mxRectangle(a.x,a.y,c,e);var b=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded)var d=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,b=Math.max(b,Math.min(c*d,e*d));a.x+=Math.round(b);a.width-=Math.round(2*b)}return a};F.prototype.paintForeground=function(a,c,e,b,d){var y=mxUtils.getValue(this.style,"fixedSize",this.fixedSize),
-g=parseFloat(mxUtils.getValue(this.style,"size",this.size)),g=y?Math.max(0,Math.min(b,g)):b*Math.max(0,Math.min(1,g));this.isRounded&&(y=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,g=Math.max(g,Math.min(b*y,d*y)));g=Math.round(g);a.begin();a.moveTo(c+g,e);a.lineTo(c+g,e+d);a.moveTo(c+b-g,e);a.lineTo(c+b-g,e+d);a.end();a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("process",F);mxCellRenderer.registerShape("process2",
-F);mxUtils.extend(I,mxRectangleShape);I.prototype.paintBackground=function(a,c,e,b,d){a.setFillColor(mxConstants.NONE);a.rect(c,e,b,d);a.fill()};I.prototype.paintForeground=function(a,c,e,b,d){};mxCellRenderer.registerShape("transparent",I);mxUtils.extend(C,mxHexagon);C.prototype.size=30;C.prototype.position=.5;C.prototype.position2=.5;C.prototype.base=20;C.prototype.getLabelMargins=function(){return new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale)};C.prototype.isRoundable=
-function(){return!0};C.prototype.redrawPath=function(a,c,e,b,d){c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;e=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"size",this.size))));var y=b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position",this.position)))),g=b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2)))),f=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"base",this.base))));
-this.addPoints(a,[new mxPoint(0,0),new mxPoint(b,0),new mxPoint(b,d-e),new mxPoint(Math.min(b,y+f),d-e),new mxPoint(g,d),new mxPoint(Math.max(0,y),d-e),new mxPoint(0,d-e)],this.isRounded,c,!0,[4])};mxCellRenderer.registerShape("callout",C);mxUtils.extend(M,mxActor);M.prototype.size=.2;M.prototype.fixedSize=20;M.prototype.isRoundable=function(){return!0};M.prototype.redrawPath=function(a,c,e,b,d){c="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,
+k=parseFloat(mxUtils.getValue(this.style,"size",this.size)),k=y?Math.max(0,Math.min(b,k)):b*Math.max(0,Math.min(1,k));this.isRounded&&(y=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,k=Math.max(k,Math.min(b*y,d*y)));k=Math.round(k);a.begin();a.moveTo(c+k,e);a.lineTo(c+k,e+d);a.moveTo(c+b-k,e);a.lineTo(c+b-k,e+d);a.end();a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("process",F);mxCellRenderer.registerShape("process2",
+F);mxUtils.extend(I,mxRectangleShape);I.prototype.paintBackground=function(a,c,e,b,d){a.setFillColor(mxConstants.NONE);a.rect(c,e,b,d);a.fill()};I.prototype.paintForeground=function(a,c,e,b,d){};mxCellRenderer.registerShape("transparent",I);mxUtils.extend(D,mxHexagon);D.prototype.size=30;D.prototype.position=.5;D.prototype.position2=.5;D.prototype.base=20;D.prototype.getLabelMargins=function(){return new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale)};D.prototype.isRoundable=
+function(){return!0};D.prototype.redrawPath=function(a,c,e,b,d){c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;e=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"size",this.size))));var k=b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position",this.position)))),y=b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2)))),f=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"base",this.base))));
+this.addPoints(a,[new mxPoint(0,0),new mxPoint(b,0),new mxPoint(b,d-e),new mxPoint(Math.min(b,k+f),d-e),new mxPoint(y,d),new mxPoint(Math.max(0,k),d-e),new mxPoint(0,d-e)],this.isRounded,c,!0,[4])};mxCellRenderer.registerShape("callout",D);mxUtils.extend(M,mxActor);M.prototype.size=.2;M.prototype.fixedSize=20;M.prototype.isRoundable=function(){return!0};M.prototype.redrawPath=function(a,c,e,b,d){c="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,
"size",this.fixedSize)))):b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));e=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(b-c,0),new mxPoint(b,d/2),new mxPoint(b-c,d),new mxPoint(0,d),new mxPoint(c,d/2)],this.isRounded,e,!0);a.end()};mxCellRenderer.registerShape("step",M);mxUtils.extend(U,mxHexagon);U.prototype.size=.25;U.prototype.fixedSize=20;U.prototype.isRoundable=function(){return!0};
U.prototype.redrawPath=function(a,c,e,b,d){c="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(.5*b,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));e=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(c,0),new mxPoint(b-c,0),new mxPoint(b,.5*d),new mxPoint(b-c,d),new mxPoint(c,d),new mxPoint(0,.5*d)],this.isRounded,e,
-!0)};mxCellRenderer.registerShape("hexagon",U);mxUtils.extend(O,mxRectangleShape);O.prototype.isHtmlAllowed=function(){return!1};O.prototype.paintForeground=function(a,c,e,b,d){var g=Math.min(b/5,d/5)+1;a.begin();a.moveTo(c+b/2,e+g);a.lineTo(c+b/2,e+d-g);a.moveTo(c+g,e+d/2);a.lineTo(c+b-g,e+d/2);a.end();a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("plus",O);var Xa=mxRhombus.prototype.paintVertexShape;mxRhombus.prototype.getLabelBounds=function(a){if(1==
-this.style["double"]){var c=(2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(a.x+c,a.y+c,a.width-2*c,a.height-2*c)}return a};mxRhombus.prototype.paintVertexShape=function(a,c,e,b,d){Xa.apply(this,arguments);if(!this.outline&&1==this.style["double"]){var g=2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);c+=g;e+=g;b-=2*g;d-=2*g;0<b&&0<d&&(a.setShadow(!1),Xa.apply(this,[a,c,e,b,d]))}};mxUtils.extend(N,
-mxRectangleShape);N.prototype.isHtmlAllowed=function(){return!1};N.prototype.getLabelBounds=function(a){if(1==this.style["double"]){var c=(Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(a.x+c,a.y+c,a.width-2*c,a.height-2*c)}return a};N.prototype.paintForeground=function(a,c,e,b,d){if(null!=this.style){if(!this.outline&&1==this.style["double"]){var g=Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||
-0);c+=g;e+=g;b-=2*g;d-=2*g;0<b&&0<d&&mxRectangleShape.prototype.paintBackground.apply(this,arguments)}a.setDashed(!1);var g=0,y;do{y=mxCellRenderer.defaultShapes[this.style["symbol"+g]];if(null!=y){var f=this.style["symbol"+g+"Align"],k=this.style["symbol"+g+"VerticalAlign"],l=this.style["symbol"+g+"Width"],n=this.style["symbol"+g+"Height"],v=this.style["symbol"+g+"Spacing"]||0,q=this.style["symbol"+g+"VSpacing"]||v,sa=this.style["symbol"+g+"ArcSpacing"];null!=sa&&(sa*=this.getArcSize(b+this.strokewidth,
-d+this.strokewidth),v+=sa,q+=sa);var sa=c,oa=e,sa=f==mxConstants.ALIGN_CENTER?sa+(b-l)/2:f==mxConstants.ALIGN_RIGHT?sa+(b-l-v):sa+v,oa=k==mxConstants.ALIGN_MIDDLE?oa+(d-n)/2:k==mxConstants.ALIGN_BOTTOM?oa+(d-n-q):oa+q;a.save();f=new y;f.style=this.style;y.prototype.paintVertexShape.call(f,a,sa,oa,l,n);a.restore()}g++}while(null!=y)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("ext",N);mxUtils.extend(v,mxCylinder);v.prototype.redrawPath=function(a,
-c,e,b,d,g){g?(a.moveTo(0,0),a.lineTo(b/2,d/2),a.lineTo(b,0),a.end()):(a.moveTo(0,0),a.lineTo(b,0),a.lineTo(b,d),a.lineTo(0,d),a.close())};mxCellRenderer.registerShape("message",v);mxUtils.extend(D,mxShape);D.prototype.paintBackground=function(a,c,e,b,d){a.translate(c,e);a.ellipse(b/4,0,b/2,d/4);a.fillAndStroke();a.begin();a.moveTo(b/2,d/4);a.lineTo(b/2,2*d/3);a.moveTo(b/2,d/3);a.lineTo(0,d/3);a.moveTo(b/2,d/3);a.lineTo(b,d/3);a.moveTo(b/2,2*d/3);a.lineTo(0,d);a.moveTo(b/2,2*d/3);a.lineTo(b,d);a.end();
-a.stroke()};mxCellRenderer.registerShape("umlActor",D);mxUtils.extend(B,mxShape);B.prototype.getLabelMargins=function(a){return new mxRectangle(a.width/6,0,0,0)};B.prototype.paintBackground=function(a,c,e,b,d){a.translate(c,e);a.begin();a.moveTo(0,d/4);a.lineTo(0,3*d/4);a.end();a.stroke();a.begin();a.moveTo(0,d/2);a.lineTo(b/6,d/2);a.end();a.stroke();a.ellipse(b/6,0,5*b/6,d);a.fillAndStroke()};mxCellRenderer.registerShape("umlBoundary",B);mxUtils.extend(J,mxEllipse);J.prototype.paintVertexShape=function(a,
+!0)};mxCellRenderer.registerShape("hexagon",U);mxUtils.extend(O,mxRectangleShape);O.prototype.isHtmlAllowed=function(){return!1};O.prototype.paintForeground=function(a,c,e,b,d){var k=Math.min(b/5,d/5)+1;a.begin();a.moveTo(c+b/2,e+k);a.lineTo(c+b/2,e+d-k);a.moveTo(c+k,e+d/2);a.lineTo(c+b-k,e+d/2);a.end();a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("plus",O);var Xa=mxRhombus.prototype.paintVertexShape;mxRhombus.prototype.getLabelBounds=function(a){if(1==
+this.style["double"]){var c=(2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(a.x+c,a.y+c,a.width-2*c,a.height-2*c)}return a};mxRhombus.prototype.paintVertexShape=function(a,c,e,b,d){Xa.apply(this,arguments);if(!this.outline&&1==this.style["double"]){var k=2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);c+=k;e+=k;b-=2*k;d-=2*k;0<b&&0<d&&(a.setShadow(!1),Xa.apply(this,[a,c,e,b,d]))}};mxUtils.extend(N,
+mxRectangleShape);N.prototype.isHtmlAllowed=function(){return!1};N.prototype.getLabelBounds=function(a){if(1==this.style["double"]){var c=(Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(a.x+c,a.y+c,a.width-2*c,a.height-2*c)}return a};N.prototype.paintForeground=function(a,c,e,b,d){if(null!=this.style){if(!this.outline&&1==this.style["double"]){var k=Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||
+0);c+=k;e+=k;b-=2*k;d-=2*k;0<b&&0<d&&mxRectangleShape.prototype.paintBackground.apply(this,arguments)}a.setDashed(!1);var k=0,y;do{y=mxCellRenderer.defaultShapes[this.style["symbol"+k]];if(null!=y){var f=this.style["symbol"+k+"Align"],g=this.style["symbol"+k+"VerticalAlign"],l=this.style["symbol"+k+"Width"],n=this.style["symbol"+k+"Height"],v=this.style["symbol"+k+"Spacing"]||0,q=this.style["symbol"+k+"VSpacing"]||v,sa=this.style["symbol"+k+"ArcSpacing"];null!=sa&&(sa*=this.getArcSize(b+this.strokewidth,
+d+this.strokewidth),v+=sa,q+=sa);var sa=c,oa=e,sa=f==mxConstants.ALIGN_CENTER?sa+(b-l)/2:f==mxConstants.ALIGN_RIGHT?sa+(b-l-v):sa+v,oa=g==mxConstants.ALIGN_MIDDLE?oa+(d-n)/2:g==mxConstants.ALIGN_BOTTOM?oa+(d-n-q):oa+q;a.save();f=new y;f.style=this.style;y.prototype.paintVertexShape.call(f,a,sa,oa,l,n);a.restore()}k++}while(null!=y)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("ext",N);mxUtils.extend(v,mxCylinder);v.prototype.redrawPath=function(a,
+c,e,b,d,k){k?(a.moveTo(0,0),a.lineTo(b/2,d/2),a.lineTo(b,0),a.end()):(a.moveTo(0,0),a.lineTo(b,0),a.lineTo(b,d),a.lineTo(0,d),a.close())};mxCellRenderer.registerShape("message",v);mxUtils.extend(C,mxShape);C.prototype.paintBackground=function(a,c,e,b,d){a.translate(c,e);a.ellipse(b/4,0,b/2,d/4);a.fillAndStroke();a.begin();a.moveTo(b/2,d/4);a.lineTo(b/2,2*d/3);a.moveTo(b/2,d/3);a.lineTo(0,d/3);a.moveTo(b/2,d/3);a.lineTo(b,d/3);a.moveTo(b/2,2*d/3);a.lineTo(0,d);a.moveTo(b/2,2*d/3);a.lineTo(b,d);a.end();
+a.stroke()};mxCellRenderer.registerShape("umlActor",C);mxUtils.extend(B,mxShape);B.prototype.getLabelMargins=function(a){return new mxRectangle(a.width/6,0,0,0)};B.prototype.paintBackground=function(a,c,e,b,d){a.translate(c,e);a.begin();a.moveTo(0,d/4);a.lineTo(0,3*d/4);a.end();a.stroke();a.begin();a.moveTo(0,d/2);a.lineTo(b/6,d/2);a.end();a.stroke();a.ellipse(b/6,0,5*b/6,d);a.fillAndStroke()};mxCellRenderer.registerShape("umlBoundary",B);mxUtils.extend(J,mxEllipse);J.prototype.paintVertexShape=function(a,
c,e,b,d){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.begin();a.moveTo(c+b/8,e+d);a.lineTo(c+7*b/8,e+d);a.end();a.stroke()};mxCellRenderer.registerShape("umlEntity",J);mxUtils.extend(L,mxShape);L.prototype.paintVertexShape=function(a,c,e,b,d){a.translate(c,e);a.begin();a.moveTo(b,0);a.lineTo(0,d);a.moveTo(0,0);a.lineTo(b,d);a.end();a.stroke()};mxCellRenderer.registerShape("umlDestroy",L);mxUtils.extend(W,mxShape);W.prototype.getLabelBounds=function(a){return new mxRectangle(a.x,a.y+
a.height/8,a.width,7*a.height/8)};W.prototype.paintBackground=function(a,c,e,b,d){a.translate(c,e);a.begin();a.moveTo(3*b/8,d/8*1.1);a.lineTo(5*b/8,0);a.end();a.stroke();a.ellipse(0,d/8,b,7*d/8);a.fillAndStroke()};W.prototype.paintForeground=function(a,c,e,b,d){a.begin();a.moveTo(3*b/8,d/8*1.1);a.lineTo(5*b/8,d/4);a.end();a.stroke()};mxCellRenderer.registerShape("umlControl",W);mxUtils.extend(Q,mxRectangleShape);Q.prototype.size=40;Q.prototype.isHtmlAllowed=function(){return!1};Q.prototype.getLabelBounds=
-function(a){var c=Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale));return new mxRectangle(a.x,a.y,a.width,c)};Q.prototype.paintBackground=function(a,c,e,b,d){var g=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),y=mxUtils.getValue(this.style,"participant");null==y||null==this.state?mxRectangleShape.prototype.paintBackground.call(this,a,c,e,b,g):(y=this.state.view.graph.cellRenderer.getShape(y),null!=y&&y!=Q&&(y=new y,
-y.apply(this.state),a.save(),y.paintVertexShape(a,c,e,b,g),a.restore()));g<d&&(a.setDashed("1"==mxUtils.getValue(this.style,"lifelineDashed","1")),a.begin(),a.moveTo(c+b/2,e+g),a.lineTo(c+b/2,e+d),a.end(),a.stroke())};Q.prototype.paintForeground=function(a,c,e,b,d){var g=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"size",this.size))));mxRectangleShape.prototype.paintForeground.call(this,a,c,e,b,Math.min(d,g))};mxCellRenderer.registerShape("umlLifeline",Q);mxUtils.extend(aa,mxShape);
-aa.prototype.width=60;aa.prototype.height=30;aa.prototype.corner=10;aa.prototype.getLabelMargins=function(a){return new mxRectangle(0,0,a.width-parseFloat(mxUtils.getValue(this.style,"width",this.width)*this.scale),a.height-parseFloat(mxUtils.getValue(this.style,"height",this.height)*this.scale))};aa.prototype.paintBackground=function(a,c,e,b,d){var g=this.corner,y=Math.min(b,Math.max(g,parseFloat(mxUtils.getValue(this.style,"width",this.width)))),f=Math.min(d,Math.max(1.5*g,parseFloat(mxUtils.getValue(this.style,
-"height",this.height)))),k=mxUtils.getValue(this.style,mxConstants.STYLE_SWIMLANE_FILLCOLOR,mxConstants.NONE);k!=mxConstants.NONE&&(a.setFillColor(k),a.rect(c,e,b,d),a.fill());null!=this.fill&&this.fill!=mxConstants.NONE&&this.gradient&&this.gradient!=mxConstants.NONE?(this.getGradientBounds(a,c,e,b,d),a.setGradient(this.fill,this.gradient,c,e,b,d,this.gradientDirection)):a.setFillColor(this.fill);a.begin();a.moveTo(c,e);a.lineTo(c+y,e);a.lineTo(c+y,e+Math.max(0,f-1.5*g));a.lineTo(c+Math.max(0,y-
-g),e+f);a.lineTo(c,e+f);a.close();a.fillAndStroke();a.begin();a.moveTo(c+y,e);a.lineTo(c+b,e);a.lineTo(c+b,e+d);a.lineTo(c,e+d);a.lineTo(c,e+f);a.stroke()};mxCellRenderer.registerShape("umlFrame",aa);mxPerimeter.CenterPerimeter=function(a,c,e,b){return new mxPoint(a.getCenterX(),a.getCenterY())};mxStyleRegistry.putValue("centerPerimeter",mxPerimeter.CenterPerimeter);mxPerimeter.LifelinePerimeter=function(a,c,e,b){b=Q.prototype.size;null!=c&&(b=mxUtils.getValue(c.style,"size",b)*c.view.scale);c=parseFloat(c.style[mxConstants.STYLE_STROKEWIDTH]||
+function(a){var c=Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale));return new mxRectangle(a.x,a.y,a.width,c)};Q.prototype.paintBackground=function(a,c,e,b,d){var k=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),y=mxUtils.getValue(this.style,"participant");null==y||null==this.state?mxRectangleShape.prototype.paintBackground.call(this,a,c,e,b,k):(y=this.state.view.graph.cellRenderer.getShape(y),null!=y&&y!=Q&&(y=new y,
+y.apply(this.state),a.save(),y.paintVertexShape(a,c,e,b,k),a.restore()));k<d&&(a.setDashed("1"==mxUtils.getValue(this.style,"lifelineDashed","1")),a.begin(),a.moveTo(c+b/2,e+k),a.lineTo(c+b/2,e+d),a.end(),a.stroke())};Q.prototype.paintForeground=function(a,c,e,b,d){var k=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"size",this.size))));mxRectangleShape.prototype.paintForeground.call(this,a,c,e,b,Math.min(d,k))};mxCellRenderer.registerShape("umlLifeline",Q);mxUtils.extend(Z,mxShape);
+Z.prototype.width=60;Z.prototype.height=30;Z.prototype.corner=10;Z.prototype.getLabelMargins=function(a){return new mxRectangle(0,0,a.width-parseFloat(mxUtils.getValue(this.style,"width",this.width)*this.scale),a.height-parseFloat(mxUtils.getValue(this.style,"height",this.height)*this.scale))};Z.prototype.paintBackground=function(a,c,e,b,d){var k=this.corner,y=Math.min(b,Math.max(k,parseFloat(mxUtils.getValue(this.style,"width",this.width)))),f=Math.min(d,Math.max(1.5*k,parseFloat(mxUtils.getValue(this.style,
+"height",this.height)))),g=mxUtils.getValue(this.style,mxConstants.STYLE_SWIMLANE_FILLCOLOR,mxConstants.NONE);g!=mxConstants.NONE&&(a.setFillColor(g),a.rect(c,e,b,d),a.fill());null!=this.fill&&this.fill!=mxConstants.NONE&&this.gradient&&this.gradient!=mxConstants.NONE?(this.getGradientBounds(a,c,e,b,d),a.setGradient(this.fill,this.gradient,c,e,b,d,this.gradientDirection)):a.setFillColor(this.fill);a.begin();a.moveTo(c,e);a.lineTo(c+y,e);a.lineTo(c+y,e+Math.max(0,f-1.5*k));a.lineTo(c+Math.max(0,y-
+k),e+f);a.lineTo(c,e+f);a.close();a.fillAndStroke();a.begin();a.moveTo(c+y,e);a.lineTo(c+b,e);a.lineTo(c+b,e+d);a.lineTo(c,e+d);a.lineTo(c,e+f);a.stroke()};mxCellRenderer.registerShape("umlFrame",Z);mxPerimeter.CenterPerimeter=function(a,c,e,b){return new mxPoint(a.getCenterX(),a.getCenterY())};mxStyleRegistry.putValue("centerPerimeter",mxPerimeter.CenterPerimeter);mxPerimeter.LifelinePerimeter=function(a,c,e,b){b=Q.prototype.size;null!=c&&(b=mxUtils.getValue(c.style,"size",b)*c.view.scale);c=parseFloat(c.style[mxConstants.STYLE_STROKEWIDTH]||
1)*c.view.scale/2-1;e.x<a.getCenterX()&&(c=-1*(c+1));return new mxPoint(a.getCenterX()+c,Math.min(a.y+a.height,Math.max(a.y+b,e.y)))};mxStyleRegistry.putValue("lifelinePerimeter",mxPerimeter.LifelinePerimeter);mxPerimeter.OrthogonalPerimeter=function(a,c,e,b){b=!0;return mxPerimeter.RectanglePerimeter.apply(this,arguments)};mxStyleRegistry.putValue("orthogonalPerimeter",mxPerimeter.OrthogonalPerimeter);mxPerimeter.BackbonePerimeter=function(a,c,e,b){b=parseFloat(c.style[mxConstants.STYLE_STROKEWIDTH]||
1)*c.view.scale/2-1;null!=c.style.backboneSize&&(b+=parseFloat(c.style.backboneSize)*c.view.scale/2-1);if("south"==c.style[mxConstants.STYLE_DIRECTION]||"north"==c.style[mxConstants.STYLE_DIRECTION])return e.x<a.getCenterX()&&(b=-1*(b+1)),new mxPoint(a.getCenterX()+b,Math.min(a.y+a.height,Math.max(a.y,e.y)));e.y<a.getCenterY()&&(b=-1*(b+1));return new mxPoint(Math.min(a.x+a.width,Math.max(a.x,e.x)),a.getCenterY()+b)};mxStyleRegistry.putValue("backbonePerimeter",mxPerimeter.BackbonePerimeter);mxPerimeter.CalloutPerimeter=
-function(a,c,e,b){return mxPerimeter.RectanglePerimeter(mxUtils.getDirectedBounds(a,new mxRectangle(0,0,0,Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(c.style,"size",C.prototype.size))*c.view.scale))),c.style),c,e,b)};mxStyleRegistry.putValue("calloutPerimeter",mxPerimeter.CalloutPerimeter);mxPerimeter.ParallelogramPerimeter=function(a,c,e,b){var d="0"!=mxUtils.getValue(c.style,"fixedSize","0"),g=d?G.prototype.fixedSize:G.prototype.size;null!=c&&(g=mxUtils.getValue(c.style,"size",g));
-d&&(g*=c.view.scale);var f=a.x,y=a.y,k=a.width,l=a.height;c=null!=c?mxUtils.getValue(c.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;c==mxConstants.DIRECTION_NORTH||c==mxConstants.DIRECTION_SOUTH?(d=d?Math.max(0,Math.min(l,g)):l*Math.max(0,Math.min(1,g)),y=[new mxPoint(f,y),new mxPoint(f+k,y+d),new mxPoint(f+k,y+l),new mxPoint(f,y+l-d),new mxPoint(f,y)]):(d=d?Math.max(0,Math.min(.5*k,g)):k*Math.max(0,Math.min(1,g)),y=[new mxPoint(f+d,y),new mxPoint(f+k,y),
-new mxPoint(f+k-d,y+l),new mxPoint(f,y+l),new mxPoint(f+d,y)]);l=a.getCenterX();a=a.getCenterY();a=new mxPoint(l,a);b&&(e.x<f||e.x>f+k?a.y=e.y:a.x=e.x);return mxUtils.getPerimeterPoint(y,a,e)};mxStyleRegistry.putValue("parallelogramPerimeter",mxPerimeter.ParallelogramPerimeter);mxPerimeter.TrapezoidPerimeter=function(a,c,e,b){var d="0"!=mxUtils.getValue(c.style,"fixedSize","0"),g=d?z.prototype.fixedSize:z.prototype.size;null!=c&&(g=mxUtils.getValue(c.style,"size",g));d&&(g*=c.view.scale);var f=a.x,
-y=a.y,k=a.width,l=a.height;c=null!=c?mxUtils.getValue(c.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;c==mxConstants.DIRECTION_EAST?(d=d?Math.max(0,Math.min(.5*k,g)):k*Math.max(0,Math.min(1,g)),y=[new mxPoint(f+d,y),new mxPoint(f+k-d,y),new mxPoint(f+k,y+l),new mxPoint(f,y+l),new mxPoint(f+d,y)]):c==mxConstants.DIRECTION_WEST?(d=d?Math.max(0,Math.min(k,g)):k*Math.max(0,Math.min(1,g)),y=[new mxPoint(f,y),new mxPoint(f+k,y),new mxPoint(f+k-d,y+l),new mxPoint(f+
-d,y+l),new mxPoint(f,y)]):c==mxConstants.DIRECTION_NORTH?(d=d?Math.max(0,Math.min(l,g)):l*Math.max(0,Math.min(1,g)),y=[new mxPoint(f,y+d),new mxPoint(f+k,y),new mxPoint(f+k,y+l),new mxPoint(f,y+l-d),new mxPoint(f,y+d)]):(d=d?Math.max(0,Math.min(l,g)):l*Math.max(0,Math.min(1,g)),y=[new mxPoint(f,y),new mxPoint(f+k,y+d),new mxPoint(f+k,y+l-d),new mxPoint(f,y+l),new mxPoint(f,y)]);l=a.getCenterX();a=a.getCenterY();a=new mxPoint(l,a);b&&(e.x<f||e.x>f+k?a.y=e.y:a.x=e.x);return mxUtils.getPerimeterPoint(y,
-a,e)};mxStyleRegistry.putValue("trapezoidPerimeter",mxPerimeter.TrapezoidPerimeter);mxPerimeter.StepPerimeter=function(a,c,e,b){var d="0"!=mxUtils.getValue(c.style,"fixedSize","0"),g=d?M.prototype.fixedSize:M.prototype.size;null!=c&&(g=mxUtils.getValue(c.style,"size",g));d&&(g*=c.view.scale);var f=a.x,y=a.y,k=a.width,l=a.height,n=a.getCenterX();a=a.getCenterY();c=null!=c?mxUtils.getValue(c.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;c==mxConstants.DIRECTION_EAST?
-(d=d?Math.max(0,Math.min(k,g)):k*Math.max(0,Math.min(1,g)),y=[new mxPoint(f,y),new mxPoint(f+k-d,y),new mxPoint(f+k,a),new mxPoint(f+k-d,y+l),new mxPoint(f,y+l),new mxPoint(f+d,a),new mxPoint(f,y)]):c==mxConstants.DIRECTION_WEST?(d=d?Math.max(0,Math.min(k,g)):k*Math.max(0,Math.min(1,g)),y=[new mxPoint(f+d,y),new mxPoint(f+k,y),new mxPoint(f+k-d,a),new mxPoint(f+k,y+l),new mxPoint(f+d,y+l),new mxPoint(f,a),new mxPoint(f+d,y)]):c==mxConstants.DIRECTION_NORTH?(d=d?Math.max(0,Math.min(l,g)):l*Math.max(0,
-Math.min(1,g)),y=[new mxPoint(f,y+d),new mxPoint(n,y),new mxPoint(f+k,y+d),new mxPoint(f+k,y+l),new mxPoint(n,y+l-d),new mxPoint(f,y+l),new mxPoint(f,y+d)]):(d=d?Math.max(0,Math.min(l,g)):l*Math.max(0,Math.min(1,g)),y=[new mxPoint(f,y),new mxPoint(n,y+d),new mxPoint(f+k,y),new mxPoint(f+k,y+l-d),new mxPoint(n,y+l),new mxPoint(f,y+l-d),new mxPoint(f,y)]);n=new mxPoint(n,a);b&&(e.x<f||e.x>f+k?n.y=e.y:n.x=e.x);return mxUtils.getPerimeterPoint(y,n,e)};mxStyleRegistry.putValue("stepPerimeter",mxPerimeter.StepPerimeter);
-mxPerimeter.HexagonPerimeter2=function(a,c,e,b){var d="0"!=mxUtils.getValue(c.style,"fixedSize","0"),g=d?U.prototype.fixedSize:U.prototype.size;null!=c&&(g=mxUtils.getValue(c.style,"size",g));d&&(g*=c.view.scale);var f=a.x,y=a.y,k=a.width,l=a.height,n=a.getCenterX();a=a.getCenterY();c=null!=c?mxUtils.getValue(c.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;c==mxConstants.DIRECTION_NORTH||c==mxConstants.DIRECTION_SOUTH?(d=d?Math.max(0,Math.min(l,g)):l*Math.max(0,
-Math.min(1,g)),y=[new mxPoint(n,y),new mxPoint(f+k,y+d),new mxPoint(f+k,y+l-d),new mxPoint(n,y+l),new mxPoint(f,y+l-d),new mxPoint(f,y+d),new mxPoint(n,y)]):(d=d?Math.max(0,Math.min(k,g)):k*Math.max(0,Math.min(1,g)),y=[new mxPoint(f+d,y),new mxPoint(f+k-d,y),new mxPoint(f+k,a),new mxPoint(f+k-d,y+l),new mxPoint(f+d,y+l),new mxPoint(f,a),new mxPoint(f+d,y)]);n=new mxPoint(n,a);b&&(e.x<f||e.x>f+k?n.y=e.y:n.x=e.x);return mxUtils.getPerimeterPoint(y,n,e)};mxStyleRegistry.putValue("hexagonPerimeter2",
-mxPerimeter.HexagonPerimeter2);mxUtils.extend(na,mxShape);na.prototype.size=10;na.prototype.paintBackground=function(a,c,e,b,d){var g=parseFloat(mxUtils.getValue(this.style,"size",this.size));a.translate(c,e);a.ellipse((b-g)/2,0,g,g);a.fillAndStroke();a.begin();a.moveTo(b/2,g);a.lineTo(b/2,d);a.end();a.stroke()};mxCellRenderer.registerShape("lollipop",na);mxUtils.extend(ga,mxShape);ga.prototype.size=10;ga.prototype.inset=2;ga.prototype.paintBackground=function(a,c,e,b,d){var g=parseFloat(mxUtils.getValue(this.style,
-"size",this.size)),f=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;a.translate(c,e);a.begin();a.moveTo(b/2,g+f);a.lineTo(b/2,d);a.end();a.stroke();a.begin();a.moveTo((b-g)/2-f,g/2);a.quadTo((b-g)/2-f,g+f,b/2,g+f);a.quadTo((b+g)/2+f,g+f,(b+g)/2+f,g/2);a.end();a.stroke()};mxCellRenderer.registerShape("requires",ga);mxUtils.extend(ea,mxShape);ea.prototype.paintBackground=function(a,c,e,b,d){a.translate(c,e);a.begin();a.moveTo(0,0);a.quadTo(b,0,b,d/2);a.quadTo(b,d,0,d);
-a.end();a.stroke()};mxCellRenderer.registerShape("requiredInterface",ea);mxUtils.extend(la,mxShape);la.prototype.inset=2;la.prototype.paintBackground=function(a,c,e,b,d){var g=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;a.translate(c,e);a.ellipse(0,g,b-2*g,d-2*g);a.fillAndStroke();a.begin();a.moveTo(b/2,0);a.quadTo(b,0,b,d/2);a.quadTo(b,d,b/2,d);a.end();a.stroke()};mxCellRenderer.registerShape("providedRequiredInterface",la);mxUtils.extend(V,mxCylinder);V.prototype.jettyWidth=
-20;V.prototype.jettyHeight=10;V.prototype.redrawPath=function(a,c,e,b,d,g){var f=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));c=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));e=f/2;var f=e+f/2,y=Math.min(c,d-c),k=Math.min(y+2*c,d-c);g?(a.moveTo(e,y),a.lineTo(f,y),a.lineTo(f,y+c),a.lineTo(e,y+c),a.moveTo(e,k),a.lineTo(f,k),a.lineTo(f,k+c),a.lineTo(e,k+c)):(a.moveTo(e,0),a.lineTo(b,0),a.lineTo(b,d),a.lineTo(e,d),a.lineTo(e,k+c),a.lineTo(0,k+c),a.lineTo(0,
-k),a.lineTo(e,k),a.lineTo(e,y+c),a.lineTo(0,y+c),a.lineTo(0,y),a.lineTo(e,y),a.close());a.end()};mxCellRenderer.registerShape("module",V);mxUtils.extend(ca,mxCylinder);ca.prototype.jettyWidth=32;ca.prototype.jettyHeight=12;ca.prototype.redrawPath=function(a,c,e,b,d,g){var f=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));c=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));e=f/2;var f=e+f/2,y=.3*d-c/2,k=.7*d-c/2;g?(a.moveTo(e,y),a.lineTo(f,y),a.lineTo(f,
-y+c),a.lineTo(e,y+c),a.moveTo(e,k),a.lineTo(f,k),a.lineTo(f,k+c),a.lineTo(e,k+c)):(a.moveTo(e,0),a.lineTo(b,0),a.lineTo(b,d),a.lineTo(e,d),a.lineTo(e,k+c),a.lineTo(0,k+c),a.lineTo(0,k),a.lineTo(e,k),a.lineTo(e,y+c),a.lineTo(0,y+c),a.lineTo(0,y),a.lineTo(e,y),a.close());a.end()};mxCellRenderer.registerShape("component",ca);mxUtils.extend(ma,mxRectangleShape);ma.prototype.paintForeground=function(a,c,e,b,d){var g=b/2,f=d/2,y=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/
-2;a.begin();this.addPoints(a,[new mxPoint(c+g,e),new mxPoint(c+b,e+f),new mxPoint(c+g,e+d),new mxPoint(c,e+f)],this.isRounded,y,!0);a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("associativeEntity",ma);mxUtils.extend(T,mxDoubleEllipse);T.prototype.outerStroke=!0;T.prototype.paintVertexShape=function(a,c,e,b,d){var g=Math.min(4,Math.min(b/5,d/5));0<b&&0<d&&(a.ellipse(c+g,e+g,b-2*g,d-2*g),a.fillAndStroke());a.setShadow(!1);this.outerStroke&&
+function(a,c,e,b){return mxPerimeter.RectanglePerimeter(mxUtils.getDirectedBounds(a,new mxRectangle(0,0,0,Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(c.style,"size",D.prototype.size))*c.view.scale))),c.style),c,e,b)};mxStyleRegistry.putValue("calloutPerimeter",mxPerimeter.CalloutPerimeter);mxPerimeter.ParallelogramPerimeter=function(a,c,e,b){var d="0"!=mxUtils.getValue(c.style,"fixedSize","0"),k=d?G.prototype.fixedSize:G.prototype.size;null!=c&&(k=mxUtils.getValue(c.style,"size",k));
+d&&(k*=c.view.scale);var f=a.x,y=a.y,g=a.width,l=a.height;c=null!=c?mxUtils.getValue(c.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;c==mxConstants.DIRECTION_NORTH||c==mxConstants.DIRECTION_SOUTH?(d=d?Math.max(0,Math.min(l,k)):l*Math.max(0,Math.min(1,k)),y=[new mxPoint(f,y),new mxPoint(f+g,y+d),new mxPoint(f+g,y+l),new mxPoint(f,y+l-d),new mxPoint(f,y)]):(d=d?Math.max(0,Math.min(.5*g,k)):g*Math.max(0,Math.min(1,k)),y=[new mxPoint(f+d,y),new mxPoint(f+g,y),
+new mxPoint(f+g-d,y+l),new mxPoint(f,y+l),new mxPoint(f+d,y)]);l=a.getCenterX();a=a.getCenterY();a=new mxPoint(l,a);b&&(e.x<f||e.x>f+g?a.y=e.y:a.x=e.x);return mxUtils.getPerimeterPoint(y,a,e)};mxStyleRegistry.putValue("parallelogramPerimeter",mxPerimeter.ParallelogramPerimeter);mxPerimeter.TrapezoidPerimeter=function(a,c,e,b){var d="0"!=mxUtils.getValue(c.style,"fixedSize","0"),k=d?z.prototype.fixedSize:z.prototype.size;null!=c&&(k=mxUtils.getValue(c.style,"size",k));d&&(k*=c.view.scale);var f=a.x,
+y=a.y,g=a.width,l=a.height;c=null!=c?mxUtils.getValue(c.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;c==mxConstants.DIRECTION_EAST?(d=d?Math.max(0,Math.min(.5*g,k)):g*Math.max(0,Math.min(1,k)),y=[new mxPoint(f+d,y),new mxPoint(f+g-d,y),new mxPoint(f+g,y+l),new mxPoint(f,y+l),new mxPoint(f+d,y)]):c==mxConstants.DIRECTION_WEST?(d=d?Math.max(0,Math.min(g,k)):g*Math.max(0,Math.min(1,k)),y=[new mxPoint(f,y),new mxPoint(f+g,y),new mxPoint(f+g-d,y+l),new mxPoint(f+
+d,y+l),new mxPoint(f,y)]):c==mxConstants.DIRECTION_NORTH?(d=d?Math.max(0,Math.min(l,k)):l*Math.max(0,Math.min(1,k)),y=[new mxPoint(f,y+d),new mxPoint(f+g,y),new mxPoint(f+g,y+l),new mxPoint(f,y+l-d),new mxPoint(f,y+d)]):(d=d?Math.max(0,Math.min(l,k)):l*Math.max(0,Math.min(1,k)),y=[new mxPoint(f,y),new mxPoint(f+g,y+d),new mxPoint(f+g,y+l-d),new mxPoint(f,y+l),new mxPoint(f,y)]);l=a.getCenterX();a=a.getCenterY();a=new mxPoint(l,a);b&&(e.x<f||e.x>f+g?a.y=e.y:a.x=e.x);return mxUtils.getPerimeterPoint(y,
+a,e)};mxStyleRegistry.putValue("trapezoidPerimeter",mxPerimeter.TrapezoidPerimeter);mxPerimeter.StepPerimeter=function(a,c,e,b){var d="0"!=mxUtils.getValue(c.style,"fixedSize","0"),k=d?M.prototype.fixedSize:M.prototype.size;null!=c&&(k=mxUtils.getValue(c.style,"size",k));d&&(k*=c.view.scale);var f=a.x,y=a.y,g=a.width,l=a.height,n=a.getCenterX();a=a.getCenterY();c=null!=c?mxUtils.getValue(c.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;c==mxConstants.DIRECTION_EAST?
+(d=d?Math.max(0,Math.min(g,k)):g*Math.max(0,Math.min(1,k)),y=[new mxPoint(f,y),new mxPoint(f+g-d,y),new mxPoint(f+g,a),new mxPoint(f+g-d,y+l),new mxPoint(f,y+l),new mxPoint(f+d,a),new mxPoint(f,y)]):c==mxConstants.DIRECTION_WEST?(d=d?Math.max(0,Math.min(g,k)):g*Math.max(0,Math.min(1,k)),y=[new mxPoint(f+d,y),new mxPoint(f+g,y),new mxPoint(f+g-d,a),new mxPoint(f+g,y+l),new mxPoint(f+d,y+l),new mxPoint(f,a),new mxPoint(f+d,y)]):c==mxConstants.DIRECTION_NORTH?(d=d?Math.max(0,Math.min(l,k)):l*Math.max(0,
+Math.min(1,k)),y=[new mxPoint(f,y+d),new mxPoint(n,y),new mxPoint(f+g,y+d),new mxPoint(f+g,y+l),new mxPoint(n,y+l-d),new mxPoint(f,y+l),new mxPoint(f,y+d)]):(d=d?Math.max(0,Math.min(l,k)):l*Math.max(0,Math.min(1,k)),y=[new mxPoint(f,y),new mxPoint(n,y+d),new mxPoint(f+g,y),new mxPoint(f+g,y+l-d),new mxPoint(n,y+l),new mxPoint(f,y+l-d),new mxPoint(f,y)]);n=new mxPoint(n,a);b&&(e.x<f||e.x>f+g?n.y=e.y:n.x=e.x);return mxUtils.getPerimeterPoint(y,n,e)};mxStyleRegistry.putValue("stepPerimeter",mxPerimeter.StepPerimeter);
+mxPerimeter.HexagonPerimeter2=function(a,c,e,b){var d="0"!=mxUtils.getValue(c.style,"fixedSize","0"),k=d?U.prototype.fixedSize:U.prototype.size;null!=c&&(k=mxUtils.getValue(c.style,"size",k));d&&(k*=c.view.scale);var f=a.x,y=a.y,g=a.width,l=a.height,n=a.getCenterX();a=a.getCenterY();c=null!=c?mxUtils.getValue(c.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;c==mxConstants.DIRECTION_NORTH||c==mxConstants.DIRECTION_SOUTH?(d=d?Math.max(0,Math.min(l,k)):l*Math.max(0,
+Math.min(1,k)),y=[new mxPoint(n,y),new mxPoint(f+g,y+d),new mxPoint(f+g,y+l-d),new mxPoint(n,y+l),new mxPoint(f,y+l-d),new mxPoint(f,y+d),new mxPoint(n,y)]):(d=d?Math.max(0,Math.min(g,k)):g*Math.max(0,Math.min(1,k)),y=[new mxPoint(f+d,y),new mxPoint(f+g-d,y),new mxPoint(f+g,a),new mxPoint(f+g-d,y+l),new mxPoint(f+d,y+l),new mxPoint(f,a),new mxPoint(f+d,y)]);n=new mxPoint(n,a);b&&(e.x<f||e.x>f+g?n.y=e.y:n.x=e.x);return mxUtils.getPerimeterPoint(y,n,e)};mxStyleRegistry.putValue("hexagonPerimeter2",
+mxPerimeter.HexagonPerimeter2);mxUtils.extend(na,mxShape);na.prototype.size=10;na.prototype.paintBackground=function(a,c,e,b,d){var k=parseFloat(mxUtils.getValue(this.style,"size",this.size));a.translate(c,e);a.ellipse((b-k)/2,0,k,k);a.fillAndStroke();a.begin();a.moveTo(b/2,k);a.lineTo(b/2,d);a.end();a.stroke()};mxCellRenderer.registerShape("lollipop",na);mxUtils.extend(ga,mxShape);ga.prototype.size=10;ga.prototype.inset=2;ga.prototype.paintBackground=function(a,c,e,b,d){var k=parseFloat(mxUtils.getValue(this.style,
+"size",this.size)),f=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;a.translate(c,e);a.begin();a.moveTo(b/2,k+f);a.lineTo(b/2,d);a.end();a.stroke();a.begin();a.moveTo((b-k)/2-f,k/2);a.quadTo((b-k)/2-f,k+f,b/2,k+f);a.quadTo((b+k)/2+f,k+f,(b+k)/2+f,k/2);a.end();a.stroke()};mxCellRenderer.registerShape("requires",ga);mxUtils.extend(da,mxShape);da.prototype.paintBackground=function(a,c,e,b,d){a.translate(c,e);a.begin();a.moveTo(0,0);a.quadTo(b,0,b,d/2);a.quadTo(b,d,0,d);
+a.end();a.stroke()};mxCellRenderer.registerShape("requiredInterface",da);mxUtils.extend(la,mxShape);la.prototype.inset=2;la.prototype.paintBackground=function(a,c,e,b,d){var k=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;a.translate(c,e);a.ellipse(0,k,b-2*k,d-2*k);a.fillAndStroke();a.begin();a.moveTo(b/2,0);a.quadTo(b,0,b,d/2);a.quadTo(b,d,b/2,d);a.end();a.stroke()};mxCellRenderer.registerShape("providedRequiredInterface",la);mxUtils.extend(V,mxCylinder);V.prototype.jettyWidth=
+20;V.prototype.jettyHeight=10;V.prototype.redrawPath=function(a,c,e,b,d,k){var f=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));c=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));e=f/2;var f=e+f/2,y=Math.min(c,d-c),g=Math.min(y+2*c,d-c);k?(a.moveTo(e,y),a.lineTo(f,y),a.lineTo(f,y+c),a.lineTo(e,y+c),a.moveTo(e,g),a.lineTo(f,g),a.lineTo(f,g+c),a.lineTo(e,g+c)):(a.moveTo(e,0),a.lineTo(b,0),a.lineTo(b,d),a.lineTo(e,d),a.lineTo(e,g+c),a.lineTo(0,g+c),a.lineTo(0,
+g),a.lineTo(e,g),a.lineTo(e,y+c),a.lineTo(0,y+c),a.lineTo(0,y),a.lineTo(e,y),a.close());a.end()};mxCellRenderer.registerShape("module",V);mxUtils.extend(ba,mxCylinder);ba.prototype.jettyWidth=32;ba.prototype.jettyHeight=12;ba.prototype.redrawPath=function(a,c,e,b,d,k){var f=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));c=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));e=f/2;var f=e+f/2,y=.3*d-c/2,g=.7*d-c/2;k?(a.moveTo(e,y),a.lineTo(f,y),a.lineTo(f,
+y+c),a.lineTo(e,y+c),a.moveTo(e,g),a.lineTo(f,g),a.lineTo(f,g+c),a.lineTo(e,g+c)):(a.moveTo(e,0),a.lineTo(b,0),a.lineTo(b,d),a.lineTo(e,d),a.lineTo(e,g+c),a.lineTo(0,g+c),a.lineTo(0,g),a.lineTo(e,g),a.lineTo(e,y+c),a.lineTo(0,y+c),a.lineTo(0,y),a.lineTo(e,y),a.close());a.end()};mxCellRenderer.registerShape("component",ba);mxUtils.extend(ma,mxRectangleShape);ma.prototype.paintForeground=function(a,c,e,b,d){var k=b/2,f=d/2,y=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/
+2;a.begin();this.addPoints(a,[new mxPoint(c+k,e),new mxPoint(c+b,e+f),new mxPoint(c+k,e+d),new mxPoint(c,e+f)],this.isRounded,y,!0);a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("associativeEntity",ma);mxUtils.extend(T,mxDoubleEllipse);T.prototype.outerStroke=!0;T.prototype.paintVertexShape=function(a,c,e,b,d){var k=Math.min(4,Math.min(b/5,d/5));0<b&&0<d&&(a.ellipse(c+k,e+k,b-2*k,d-2*k),a.fillAndStroke());a.setShadow(!1);this.outerStroke&&
(a.ellipse(c,e,b,d),a.stroke())};mxCellRenderer.registerShape("endState",T);mxUtils.extend(P,T);P.prototype.outerStroke=!1;mxCellRenderer.registerShape("startState",P);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(X,mxArrowConnector);X.prototype.defaultWidth=10;X.prototype.defaultArrowWidth=20;X.prototype.getStartArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"startWidth",this.defaultArrowWidth)};X.prototype.getEndArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"endWidth",this.defaultArrowWidth)};X.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};mxCellRenderer.registerShape("flexArrow",
-X);mxUtils.extend(da,mxActor);da.prototype.size=30;da.prototype.isRoundable=function(){return!0};da.prototype.redrawPath=function(a,c,e,b,d){c=Math.min(d,parseFloat(mxUtils.getValue(this.style,"size",this.size)));e=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,d),new mxPoint(0,c),new mxPoint(b,0),new mxPoint(b,d)],this.isRounded,e,!0);a.end()};mxCellRenderer.registerShape("manualInput",da);mxUtils.extend(ia,mxRectangleShape);ia.prototype.dx=
-20;ia.prototype.dy=20;ia.prototype.isHtmlAllowed=function(){return!1};ia.prototype.paintForeground=function(a,c,e,b,d){mxRectangleShape.prototype.paintForeground.apply(this,arguments);var g=0;if(this.isRounded)var f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,g=Math.max(g,Math.min(b*f,d*f));f=Math.max(g,Math.min(b,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));g=Math.max(g,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));
-a.begin();a.moveTo(c,e+g);a.lineTo(c+b,e+g);a.end();a.stroke();a.begin();a.moveTo(c+f,e);a.lineTo(c+f,e+d);a.end();a.stroke()};mxCellRenderer.registerShape("internalStorage",ia);mxUtils.extend(pa,mxActor);pa.prototype.dx=20;pa.prototype.dy=20;pa.prototype.redrawPath=function(a,c,e,b,d){c=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));e=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));
-var g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(b,0),new mxPoint(b,e),new mxPoint(c,e),new mxPoint(c,d),new mxPoint(0,d)],this.isRounded,g,!0);a.end()};mxCellRenderer.registerShape("corner",pa);mxUtils.extend(R,mxActor);R.prototype.redrawPath=function(a,c,e,b,d){a.moveTo(0,0);a.lineTo(0,d);a.end();a.moveTo(b,0);a.lineTo(b,d);a.end();a.moveTo(0,d/2);a.lineTo(b,d/2);a.end()};mxCellRenderer.registerShape("crossbar",
-R);mxUtils.extend(ka,mxActor);ka.prototype.dx=20;ka.prototype.dy=20;ka.prototype.redrawPath=function(a,c,e,b,d){c=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));e=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(b,0),new mxPoint(b,e),new mxPoint((b+
-c)/2,e),new mxPoint((b+c)/2,d),new mxPoint((b-c)/2,d),new mxPoint((b-c)/2,e),new mxPoint(0,e)],this.isRounded,g,!0);a.end()};mxCellRenderer.registerShape("tee",ka);mxUtils.extend(ba,mxActor);ba.prototype.arrowWidth=.3;ba.prototype.arrowSize=.2;ba.prototype.redrawPath=function(a,c,e,b,d){var g=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth))));c=b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize))));e=(d-g)/2;var g=
-e+g,f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,e),new mxPoint(b-c,e),new mxPoint(b-c,0),new mxPoint(b,d/2),new mxPoint(b-c,d),new mxPoint(b-c,g),new mxPoint(0,g)],this.isRounded,f,!0);a.end()};mxCellRenderer.registerShape("singleArrow",ba);mxUtils.extend(ja,mxActor);ja.prototype.redrawPath=function(a,c,e,b,d){var g=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",ba.prototype.arrowWidth))));c=b*Math.max(0,
-Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",ba.prototype.arrowSize))));e=(d-g)/2;var g=e+g,f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,d/2),new mxPoint(c,0),new mxPoint(c,e),new mxPoint(b-c,e),new mxPoint(b-c,0),new mxPoint(b,d/2),new mxPoint(b-c,d),new mxPoint(b-c,g),new mxPoint(c,g),new mxPoint(c,d)],this.isRounded,f,!0);a.end()};mxCellRenderer.registerShape("doubleArrow",ja);mxUtils.extend(Y,mxActor);Y.prototype.size=
-.1;Y.prototype.fixedSize=20;Y.prototype.redrawPath=function(a,c,e,b,d){c="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));a.moveTo(c,0);a.lineTo(b,0);a.quadTo(b-2*c,d/2,b,d);a.lineTo(c,d);a.quadTo(c-2*c,d/2,c,0);a.close();a.end()};mxCellRenderer.registerShape("dataStorage",Y);mxUtils.extend(qa,mxActor);qa.prototype.redrawPath=function(a,
-c,e,b,d){a.moveTo(0,0);a.quadTo(b,0,b,d/2);a.quadTo(b,d,0,d);a.close();a.end()};mxCellRenderer.registerShape("or",qa);mxUtils.extend(va,mxActor);va.prototype.redrawPath=function(a,c,e,b,d){a.moveTo(0,0);a.quadTo(b,0,b,d/2);a.quadTo(b,d,0,d);a.quadTo(b/2,d/2,0,0);a.close();a.end()};mxCellRenderer.registerShape("xor",va);mxUtils.extend(ua,mxActor);ua.prototype.size=20;ua.prototype.isRoundable=function(){return!0};ua.prototype.redrawPath=function(a,c,e,b,d){c=Math.min(b/2,Math.min(d,parseFloat(mxUtils.getValue(this.style,
+X);mxUtils.extend(ca,mxActor);ca.prototype.size=30;ca.prototype.isRoundable=function(){return!0};ca.prototype.redrawPath=function(a,c,e,b,d){c=Math.min(d,parseFloat(mxUtils.getValue(this.style,"size",this.size)));e=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,d),new mxPoint(0,c),new mxPoint(b,0),new mxPoint(b,d)],this.isRounded,e,!0);a.end()};mxCellRenderer.registerShape("manualInput",ca);mxUtils.extend(ia,mxRectangleShape);ia.prototype.dx=
+20;ia.prototype.dy=20;ia.prototype.isHtmlAllowed=function(){return!1};ia.prototype.paintForeground=function(a,c,e,b,d){mxRectangleShape.prototype.paintForeground.apply(this,arguments);var k=0;if(this.isRounded)var f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,k=Math.max(k,Math.min(b*f,d*f));f=Math.max(k,Math.min(b,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));k=Math.max(k,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));
+a.begin();a.moveTo(c,e+k);a.lineTo(c+b,e+k);a.end();a.stroke();a.begin();a.moveTo(c+f,e);a.lineTo(c+f,e+d);a.end();a.stroke()};mxCellRenderer.registerShape("internalStorage",ia);mxUtils.extend(pa,mxActor);pa.prototype.dx=20;pa.prototype.dy=20;pa.prototype.redrawPath=function(a,c,e,b,d){c=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));e=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));
+var k=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(b,0),new mxPoint(b,e),new mxPoint(c,e),new mxPoint(c,d),new mxPoint(0,d)],this.isRounded,k,!0);a.end()};mxCellRenderer.registerShape("corner",pa);mxUtils.extend(R,mxActor);R.prototype.redrawPath=function(a,c,e,b,d){a.moveTo(0,0);a.lineTo(0,d);a.end();a.moveTo(b,0);a.lineTo(b,d);a.end();a.moveTo(0,d/2);a.lineTo(b,d/2);a.end()};mxCellRenderer.registerShape("crossbar",
+R);mxUtils.extend(ka,mxActor);ka.prototype.dx=20;ka.prototype.dy=20;ka.prototype.redrawPath=function(a,c,e,b,d){c=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));e=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var k=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(b,0),new mxPoint(b,e),new mxPoint((b+
+c)/2,e),new mxPoint((b+c)/2,d),new mxPoint((b-c)/2,d),new mxPoint((b-c)/2,e),new mxPoint(0,e)],this.isRounded,k,!0);a.end()};mxCellRenderer.registerShape("tee",ka);mxUtils.extend(aa,mxActor);aa.prototype.arrowWidth=.3;aa.prototype.arrowSize=.2;aa.prototype.redrawPath=function(a,c,e,b,d){var k=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth))));c=b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize))));e=(d-k)/2;var k=
+e+k,f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,e),new mxPoint(b-c,e),new mxPoint(b-c,0),new mxPoint(b,d/2),new mxPoint(b-c,d),new mxPoint(b-c,k),new mxPoint(0,k)],this.isRounded,f,!0);a.end()};mxCellRenderer.registerShape("singleArrow",aa);mxUtils.extend(ja,mxActor);ja.prototype.redrawPath=function(a,c,e,b,d){var k=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",aa.prototype.arrowWidth))));c=b*Math.max(0,
+Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",aa.prototype.arrowSize))));e=(d-k)/2;var k=e+k,f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,d/2),new mxPoint(c,0),new mxPoint(c,e),new mxPoint(b-c,e),new mxPoint(b-c,0),new mxPoint(b,d/2),new mxPoint(b-c,d),new mxPoint(b-c,k),new mxPoint(c,k),new mxPoint(c,d)],this.isRounded,f,!0);a.end()};mxCellRenderer.registerShape("doubleArrow",ja);mxUtils.extend(ea,mxActor);ea.prototype.size=
+.1;ea.prototype.fixedSize=20;ea.prototype.redrawPath=function(a,c,e,b,d){c="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));a.moveTo(c,0);a.lineTo(b,0);a.quadTo(b-2*c,d/2,b,d);a.lineTo(c,d);a.quadTo(c-2*c,d/2,c,0);a.close();a.end()};mxCellRenderer.registerShape("dataStorage",ea);mxUtils.extend(qa,mxActor);qa.prototype.redrawPath=
+function(a,c,e,b,d){a.moveTo(0,0);a.quadTo(b,0,b,d/2);a.quadTo(b,d,0,d);a.close();a.end()};mxCellRenderer.registerShape("or",qa);mxUtils.extend(ya,mxActor);ya.prototype.redrawPath=function(a,c,e,b,d){a.moveTo(0,0);a.quadTo(b,0,b,d/2);a.quadTo(b,d,0,d);a.quadTo(b/2,d/2,0,0);a.close();a.end()};mxCellRenderer.registerShape("xor",ya);mxUtils.extend(ua,mxActor);ua.prototype.size=20;ua.prototype.isRoundable=function(){return!0};ua.prototype.redrawPath=function(a,c,e,b,d){c=Math.min(b/2,Math.min(d,parseFloat(mxUtils.getValue(this.style,
"size",this.size))));e=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(c,0),new mxPoint(b-c,0),new mxPoint(b,.8*c),new mxPoint(b,d),new mxPoint(0,d),new mxPoint(0,.8*c)],this.isRounded,e,!0);a.end()};mxCellRenderer.registerShape("loopLimit",ua);mxUtils.extend(ra,mxActor);ra.prototype.size=.375;ra.prototype.isRoundable=function(){return!0};ra.prototype.redrawPath=function(a,c,e,b,d){c=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,
-"size",this.size))));e=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(b,0),new mxPoint(b,d-c),new mxPoint(b/2,d),new mxPoint(0,d-c)],this.isRounded,e,!0);a.end()};mxCellRenderer.registerShape("offPageConnector",ra);mxUtils.extend(ya,mxEllipse);ya.prototype.paintVertexShape=function(a,c,e,b,d){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.begin();a.moveTo(c+b/2,e+d);a.lineTo(c+b,e+d);a.end();a.stroke()};
-mxCellRenderer.registerShape("tapeData",ya);mxUtils.extend(za,mxEllipse);za.prototype.paintVertexShape=function(a,c,e,b,d){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(c,e+d/2);a.lineTo(c+b,e+d/2);a.end();a.stroke();a.begin();a.moveTo(c+b/2,e);a.lineTo(c+b/2,e+d);a.end();a.stroke()};mxCellRenderer.registerShape("orEllipse",za);mxUtils.extend(S,mxEllipse);S.prototype.paintVertexShape=function(a,c,e,b,d){mxEllipse.prototype.paintVertexShape.apply(this,
+"size",this.size))));e=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(b,0),new mxPoint(b,d-c),new mxPoint(b/2,d),new mxPoint(0,d-c)],this.isRounded,e,!0);a.end()};mxCellRenderer.registerShape("offPageConnector",ra);mxUtils.extend(xa,mxEllipse);xa.prototype.paintVertexShape=function(a,c,e,b,d){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.begin();a.moveTo(c+b/2,e+d);a.lineTo(c+b,e+d);a.end();a.stroke()};
+mxCellRenderer.registerShape("tapeData",xa);mxUtils.extend(za,mxEllipse);za.prototype.paintVertexShape=function(a,c,e,b,d){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(c,e+d/2);a.lineTo(c+b,e+d/2);a.end();a.stroke();a.begin();a.moveTo(c+b/2,e);a.lineTo(c+b/2,e+d);a.end();a.stroke()};mxCellRenderer.registerShape("orEllipse",za);mxUtils.extend(S,mxEllipse);S.prototype.paintVertexShape=function(a,c,e,b,d){mxEllipse.prototype.paintVertexShape.apply(this,
arguments);a.setShadow(!1);a.begin();a.moveTo(c+.145*b,e+.145*d);a.lineTo(c+.855*b,e+.855*d);a.end();a.stroke();a.begin();a.moveTo(c+.855*b,e+.145*d);a.lineTo(c+.145*b,e+.855*d);a.end();a.stroke()};mxCellRenderer.registerShape("sumEllipse",S);mxUtils.extend(Aa,mxRhombus);Aa.prototype.paintVertexShape=function(a,c,e,b,d){mxRhombus.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(c,e+d/2);a.lineTo(c+b,e+d/2);a.end();a.stroke()};mxCellRenderer.registerShape("sortShape",
-Aa);mxUtils.extend(ha,mxEllipse);ha.prototype.paintVertexShape=function(a,c,e,b,d){a.begin();a.moveTo(c,e);a.lineTo(c+b,e);a.lineTo(c+b/2,e+d/2);a.close();a.fillAndStroke();a.begin();a.moveTo(c,e+d);a.lineTo(c+b,e+d);a.lineTo(c+b/2,e+d/2);a.close();a.fillAndStroke()};mxCellRenderer.registerShape("collate",ha);mxUtils.extend(Ba,mxEllipse);Ba.prototype.paintVertexShape=function(a,c,e,b,d){var g=e+d-5;a.begin();a.moveTo(c,e);a.lineTo(c,e+d);a.moveTo(c,g);a.lineTo(c+10,g-5);a.moveTo(c,g);a.lineTo(c+10,
-g+5);a.moveTo(c,g);a.lineTo(c+b,g);a.moveTo(c+b,e);a.lineTo(c+b,e+d);a.moveTo(c+b,g);a.lineTo(c+b-10,g-5);a.moveTo(c+b,g);a.lineTo(c+b-10,g+5);a.end();a.stroke()};mxCellRenderer.registerShape("dimension",Ba);mxUtils.extend(wa,mxEllipse);wa.prototype.paintVertexShape=function(a,c,e,b,d){this.outline||a.setStrokeColor(null);if(null!=this.style){var g=a.pointerEvents;"1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1")||null!=this.fill&&this.fill!=mxConstants.NONE||(a.pointerEvents=
-!1);a.rect(c,e,b,d);a.fill();a.pointerEvents=g;a.setStrokeColor(this.stroke);a.begin();a.moveTo(c,e);this.outline||"1"==mxUtils.getValue(this.style,"top","1")?a.lineTo(c+b,e):a.moveTo(c+b,e);this.outline||"1"==mxUtils.getValue(this.style,"right","1")?a.lineTo(c+b,e+d):a.moveTo(c+b,e+d);this.outline||"1"==mxUtils.getValue(this.style,"bottom","1")?a.lineTo(c,e+d):a.moveTo(c,e+d);(this.outline||"1"==mxUtils.getValue(this.style,"left","1"))&&a.lineTo(c,e);a.end();a.stroke()}};mxCellRenderer.registerShape("partialRectangle",
-wa);mxUtils.extend(Da,mxEllipse);Da.prototype.paintVertexShape=function(a,c,e,b,d){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();"vertical"==mxUtils.getValue(this.style,"line")?(a.moveTo(c+b/2,e),a.lineTo(c+b/2,e+d)):(a.moveTo(c,e+d/2),a.lineTo(c+b,e+d/2));a.end();a.stroke()};mxCellRenderer.registerShape("lineEllipse",Da);mxUtils.extend(Ca,mxActor);Ca.prototype.redrawPath=function(a,c,e,b,d){c=Math.min(b,d/2);a.moveTo(0,0);a.lineTo(b-c,0);a.quadTo(b,0,b,d/2);
-a.quadTo(b,d,b-c,d);a.lineTo(0,d);a.close();a.end()};mxCellRenderer.registerShape("delay",Ca);mxUtils.extend(xa,mxActor);xa.prototype.size=.2;xa.prototype.redrawPath=function(a,c,e,b,d){c=Math.min(d,b);var g=Math.max(0,Math.min(c,c*parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=(d-g)/2;e=c+g;var f=(b-g)/2,g=f+g;a.moveTo(0,c);a.lineTo(f,c);a.lineTo(f,0);a.lineTo(g,0);a.lineTo(g,c);a.lineTo(b,c);a.lineTo(b,e);a.lineTo(g,e);a.lineTo(g,d);a.lineTo(f,d);a.lineTo(f,e);a.lineTo(0,e);a.close();
-a.end()};mxCellRenderer.registerShape("cross",xa);mxUtils.extend(Fa,mxActor);Fa.prototype.size=.25;Fa.prototype.redrawPath=function(a,c,e,b,d){c=Math.min(b,d/2);e=Math.min(b-c,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*b);a.moveTo(0,d/2);a.lineTo(e,0);a.lineTo(b-c,0);a.quadTo(b,0,b,d/2);a.quadTo(b,d,b-c,d);a.lineTo(e,d);a.close();a.end()};mxCellRenderer.registerShape("display",Fa);mxUtils.extend(Z,mxActor);Z.prototype.cst={RECT2:"mxgraph.basic.rect"};Z.prototype.customProperties=
+Aa);mxUtils.extend(ha,mxEllipse);ha.prototype.paintVertexShape=function(a,c,e,b,d){a.begin();a.moveTo(c,e);a.lineTo(c+b,e);a.lineTo(c+b/2,e+d/2);a.close();a.fillAndStroke();a.begin();a.moveTo(c,e+d);a.lineTo(c+b,e+d);a.lineTo(c+b/2,e+d/2);a.close();a.fillAndStroke()};mxCellRenderer.registerShape("collate",ha);mxUtils.extend(Ba,mxEllipse);Ba.prototype.paintVertexShape=function(a,c,e,b,d){var k=e+d-5;a.begin();a.moveTo(c,e);a.lineTo(c,e+d);a.moveTo(c,k);a.lineTo(c+10,k-5);a.moveTo(c,k);a.lineTo(c+10,
+k+5);a.moveTo(c,k);a.lineTo(c+b,k);a.moveTo(c+b,e);a.lineTo(c+b,e+d);a.moveTo(c+b,k);a.lineTo(c+b-10,k-5);a.moveTo(c+b,k);a.lineTo(c+b-10,k+5);a.end();a.stroke()};mxCellRenderer.registerShape("dimension",Ba);mxUtils.extend(va,mxEllipse);va.prototype.paintVertexShape=function(a,c,e,b,d){this.outline||a.setStrokeColor(null);if(null!=this.style){var k=a.pointerEvents;"1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1")||null!=this.fill&&this.fill!=mxConstants.NONE||(a.pointerEvents=
+!1);a.rect(c,e,b,d);a.fill();a.pointerEvents=k;a.setStrokeColor(this.stroke);a.begin();a.moveTo(c,e);this.outline||"1"==mxUtils.getValue(this.style,"top","1")?a.lineTo(c+b,e):a.moveTo(c+b,e);this.outline||"1"==mxUtils.getValue(this.style,"right","1")?a.lineTo(c+b,e+d):a.moveTo(c+b,e+d);this.outline||"1"==mxUtils.getValue(this.style,"bottom","1")?a.lineTo(c,e+d):a.moveTo(c,e+d);(this.outline||"1"==mxUtils.getValue(this.style,"left","1"))&&a.lineTo(c,e);a.end();a.stroke()}};mxCellRenderer.registerShape("partialRectangle",
+va);mxUtils.extend(Da,mxEllipse);Da.prototype.paintVertexShape=function(a,c,e,b,d){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();"vertical"==mxUtils.getValue(this.style,"line")?(a.moveTo(c+b/2,e),a.lineTo(c+b/2,e+d)):(a.moveTo(c,e+d/2),a.lineTo(c+b,e+d/2));a.end();a.stroke()};mxCellRenderer.registerShape("lineEllipse",Da);mxUtils.extend(Ca,mxActor);Ca.prototype.redrawPath=function(a,c,e,b,d){c=Math.min(b,d/2);a.moveTo(0,0);a.lineTo(b-c,0);a.quadTo(b,0,b,d/2);
+a.quadTo(b,d,b-c,d);a.lineTo(0,d);a.close();a.end()};mxCellRenderer.registerShape("delay",Ca);mxUtils.extend(wa,mxActor);wa.prototype.size=.2;wa.prototype.redrawPath=function(a,c,e,b,d){c=Math.min(d,b);var k=Math.max(0,Math.min(c,c*parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=(d-k)/2;e=c+k;var f=(b-k)/2,k=f+k;a.moveTo(0,c);a.lineTo(f,c);a.lineTo(f,0);a.lineTo(k,0);a.lineTo(k,c);a.lineTo(b,c);a.lineTo(b,e);a.lineTo(k,e);a.lineTo(k,d);a.lineTo(f,d);a.lineTo(f,e);a.lineTo(0,e);a.close();
+a.end()};mxCellRenderer.registerShape("cross",wa);mxUtils.extend(Fa,mxActor);Fa.prototype.size=.25;Fa.prototype.redrawPath=function(a,c,e,b,d){c=Math.min(b,d/2);e=Math.min(b-c,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*b);a.moveTo(0,d/2);a.lineTo(e,0);a.lineTo(b-c,0);a.quadTo(b,0,b,d/2);a.quadTo(b,d,b-c,d);a.lineTo(e,d);a.close();a.end()};mxCellRenderer.registerShape("display",Fa);mxUtils.extend(Y,mxActor);Y.prototype.cst={RECT2:"mxgraph.basic.rect"};Y.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"}]}];Z.prototype.paintVertexShape=function(a,c,e,b,d){a.translate(c,e);this.strictDrawShape(a,0,0,b,d)};Z.prototype.strictDrawShape=function(a,c,e,b,d,g){var f=g&&g.rectStyle?g.rectStyle:
-mxUtils.getValue(this.style,"rectStyle",this.rectStyle),k=g&&g.absoluteCornerSize?g.absoluteCornerSize:mxUtils.getValue(this.style,"absoluteCornerSize",this.absoluteCornerSize),l=g&&g.size?g.size:Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),n=g&&g.rectOutline?g.rectOutline:mxUtils.getValue(this.style,"rectOutline",this.rectOutline),v=g&&g.indent?g.indent:Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"indent",this.indent)))),y=g&&g.dashed?g.dashed:
-mxUtils.getValue(this.style,"dashed",!1),q=g&&g.dashPattern?g.dashPattern:mxUtils.getValue(this.style,"dashPattern",null),t=g&&g.relIndent?g.relIndent:Math.max(0,Math.min(50,v)),u=g&&g.top?g.top:mxUtils.getValue(this.style,"top",!0),m=g&&g.right?g.right:mxUtils.getValue(this.style,"right",!0),D=g&&g.bottom?g.bottom:mxUtils.getValue(this.style,"bottom",!0),B=g&&g.left?g.left:mxUtils.getValue(this.style,"left",!0),x=g&&g.topLeftStyle?g.topLeftStyle:mxUtils.getValue(this.style,"topLeftStyle","default"),
-p=g&&g.topRightStyle?g.topRightStyle:mxUtils.getValue(this.style,"topRightStyle","default"),z=g&&g.bottomRightStyle?g.bottomRightStyle:mxUtils.getValue(this.style,"bottomRightStyle","default"),L=g&&g.bottomLeftStyle?g.bottomLeftStyle:mxUtils.getValue(this.style,"bottomLeftStyle","default"),J=g&&g.fillColor?g.fillColor:mxUtils.getValue(this.style,"fillColor","#ffffff");g&&g.strokeColor||mxUtils.getValue(this.style,"strokeColor","#000000");var A=g&&g.strokeWidth?g.strokeWidth:mxUtils.getValue(this.style,
-"strokeWidth","1"),C=g&&g.fillColor2?g.fillColor2:mxUtils.getValue(this.style,"fillColor2","none"),oa=g&&g.gradientColor2?g.gradientColor2:mxUtils.getValue(this.style,"gradientColor2","none"),N=g&&g.gradientDirection2?g.gradientDirection2:mxUtils.getValue(this.style,"gradientDirection2","south"),sa=g&&g.opacity?g.opacity:mxUtils.getValue(this.style,"opacity","100"),W=Math.max(0,Math.min(50,l));g=Z.prototype;a.setDashed(y);q&&""!=q&&a.setDashPattern(q);a.setStrokeWidth(A);l=Math.min(.5*d,.5*b,l);k||
-(l=W*Math.min(b,d)/100);l=Math.min(l,.5*Math.min(b,d));k||(v=Math.min(t*Math.min(b,d)/100));v=Math.min(v,.5*Math.min(b,d)-l);(u||m||D||B)&&"frame"!=n&&(a.begin(),u?g.moveNW(a,c,e,b,d,f,x,l,B):a.moveTo(0,0),u&&g.paintNW(a,c,e,b,d,f,x,l,B),g.paintTop(a,c,e,b,d,f,p,l,m),m&&g.paintNE(a,c,e,b,d,f,p,l,u),g.paintRight(a,c,e,b,d,f,z,l,D),D&&g.paintSE(a,c,e,b,d,f,z,l,m),g.paintBottom(a,c,e,b,d,f,L,l,B),B&&g.paintSW(a,c,e,b,d,f,L,l,D),g.paintLeft(a,c,e,b,d,f,x,l,u),a.close(),a.fill(),a.setShadow(!1),a.setFillColor(C),
-y=k=sa,"none"==C&&(k=0),"none"==oa&&(y=0),a.setGradient(C,oa,0,0,b,d,N,k,y),a.begin(),u?g.moveNWInner(a,c,e,b,d,f,x,l,v,u,B):a.moveTo(v,0),g.paintLeftInner(a,c,e,b,d,f,L,l,v,D,B),B&&D&&g.paintSWInner(a,c,e,b,d,f,L,l,v,D),g.paintBottomInner(a,c,e,b,d,f,z,l,v,m,D),D&&m&&g.paintSEInner(a,c,e,b,d,f,z,l,v),g.paintRightInner(a,c,e,b,d,f,p,l,v,u,m),m&&u&&g.paintNEInner(a,c,e,b,d,f,p,l,v),g.paintTopInner(a,c,e,b,d,f,x,l,v,B,u),u&&B&&g.paintNWInner(a,c,e,b,d,f,x,l,v),a.fill(),"none"==J&&(a.begin(),g.paintFolds(a,
-c,e,b,d,f,x,p,z,L,l,u,m,D,B),a.stroke()));u||m||D||!B?u||m||!D||B?!u&&!m&&D&&B?"frame"!=n?(a.begin(),g.moveSE(a,c,e,b,d,f,z,l,m),g.paintBottom(a,c,e,b,d,f,L,l,B),g.paintSW(a,c,e,b,d,f,L,l,D),g.paintLeft(a,c,e,b,d,f,x,l,u),"double"==n&&(g.moveNWInner(a,c,e,b,d,f,x,l,v,u,B),g.paintLeftInner(a,c,e,b,d,f,L,l,v,D,B),g.paintSWInner(a,c,e,b,d,f,L,l,v,D),g.paintBottomInner(a,c,e,b,d,f,z,l,v,m,D)),a.stroke()):(a.begin(),g.moveSE(a,c,e,b,d,f,z,l,m),g.paintBottom(a,c,e,b,d,f,L,l,B),g.paintSW(a,c,e,b,d,f,L,l,
-D),g.paintLeft(a,c,e,b,d,f,x,l,u),g.lineNWInner(a,c,e,b,d,f,x,l,v,u,B),g.paintLeftInner(a,c,e,b,d,f,L,l,v,D,B),g.paintSWInner(a,c,e,b,d,f,L,l,v,D),g.paintBottomInner(a,c,e,b,d,f,z,l,v,m,D),a.close(),a.fillAndStroke()):u||!m||D||B?!u&&m&&!D&&B?"frame"!=n?(a.begin(),g.moveSW(a,c,e,b,d,f,x,l,D),g.paintLeft(a,c,e,b,d,f,x,l,u),"double"==n&&(g.moveNWInner(a,c,e,b,d,f,x,l,v,u,B),g.paintLeftInner(a,c,e,b,d,f,L,l,v,D,B)),a.stroke(),a.begin(),g.moveNE(a,c,e,b,d,f,p,l,u),g.paintRight(a,c,e,b,d,f,z,l,D),"double"==
-n&&(g.moveSEInner(a,c,e,b,d,f,z,l,v,D),g.paintRightInner(a,c,e,b,d,f,p,l,v,u,m)),a.stroke()):(a.begin(),g.moveSW(a,c,e,b,d,f,x,l,D),g.paintLeft(a,c,e,b,d,f,x,l,u),g.lineNWInner(a,c,e,b,d,f,x,l,v,u,B),g.paintLeftInner(a,c,e,b,d,f,L,l,v,D,B),a.close(),a.fillAndStroke(),a.begin(),g.moveNE(a,c,e,b,d,f,p,l,u),g.paintRight(a,c,e,b,d,f,z,l,D),g.lineSEInner(a,c,e,b,d,f,z,l,v,D),g.paintRightInner(a,c,e,b,d,f,p,l,v,u,m),a.close(),a.fillAndStroke()):!u&&m&&D&&!B?"frame"!=n?(a.begin(),g.moveNE(a,c,e,b,d,f,p,
-l,u),g.paintRight(a,c,e,b,d,f,z,l,D),g.paintSE(a,c,e,b,d,f,z,l,m),g.paintBottom(a,c,e,b,d,f,L,l,B),"double"==n&&(g.moveSWInner(a,c,e,b,d,f,L,l,v,B),g.paintBottomInner(a,c,e,b,d,f,z,l,v,m,D),g.paintSEInner(a,c,e,b,d,f,z,l,v),g.paintRightInner(a,c,e,b,d,f,p,l,v,u,m)),a.stroke()):(a.begin(),g.moveNE(a,c,e,b,d,f,p,l,u),g.paintRight(a,c,e,b,d,f,z,l,D),g.paintSE(a,c,e,b,d,f,z,l,m),g.paintBottom(a,c,e,b,d,f,L,l,B),g.lineSWInner(a,c,e,b,d,f,L,l,v,B),g.paintBottomInner(a,c,e,b,d,f,z,l,v,m,D),g.paintSEInner(a,
-c,e,b,d,f,z,l,v),g.paintRightInner(a,c,e,b,d,f,p,l,v,u,m),a.close(),a.fillAndStroke()):!u&&m&&D&&B?"frame"!=n?(a.begin(),g.moveNE(a,c,e,b,d,f,p,l,u),g.paintRight(a,c,e,b,d,f,z,l,D),g.paintSE(a,c,e,b,d,f,z,l,m),g.paintBottom(a,c,e,b,d,f,L,l,B),g.paintSW(a,c,e,b,d,f,L,l,D),g.paintLeft(a,c,e,b,d,f,x,l,u),"double"==n&&(g.moveNWInner(a,c,e,b,d,f,x,l,v,u,B),g.paintLeftInner(a,c,e,b,d,f,L,l,v,D,B),g.paintSWInner(a,c,e,b,d,f,L,l,v,D),g.paintBottomInner(a,c,e,b,d,f,z,l,v,m,D),g.paintSEInner(a,c,e,b,d,f,z,
-l,v),g.paintRightInner(a,c,e,b,d,f,p,l,v,u,m)),a.stroke()):(a.begin(),g.moveNE(a,c,e,b,d,f,p,l,u),g.paintRight(a,c,e,b,d,f,z,l,D),g.paintSE(a,c,e,b,d,f,z,l,m),g.paintBottom(a,c,e,b,d,f,L,l,B),g.paintSW(a,c,e,b,d,f,L,l,D),g.paintLeft(a,c,e,b,d,f,x,l,u),g.lineNWInner(a,c,e,b,d,f,x,l,v,u,B),g.paintLeftInner(a,c,e,b,d,f,L,l,v,D,B),g.paintSWInner(a,c,e,b,d,f,L,l,v,D),g.paintBottomInner(a,c,e,b,d,f,z,l,v,m,D),g.paintSEInner(a,c,e,b,d,f,z,l,v),g.paintRightInner(a,c,e,b,d,f,p,l,v,u,m),a.close(),a.fillAndStroke()):
-!u||m||D||B?u&&!m&&!D&&B?"frame"!=n?(a.begin(),g.moveSW(a,c,e,b,d,f,L,l,D),g.paintLeft(a,c,e,b,d,f,x,l,u),g.paintNW(a,c,e,b,d,f,x,l,B),g.paintTop(a,c,e,b,d,f,p,l,m),"double"==n&&(g.moveNEInner(a,c,e,b,d,f,p,l,v,m),g.paintTopInner(a,c,e,b,d,f,x,l,v,B,u),g.paintNWInner(a,c,e,b,d,f,x,l,v),g.paintLeftInner(a,c,e,b,d,f,L,l,v,D,B)),a.stroke()):(a.begin(),g.moveSW(a,c,e,b,d,f,L,l,D),g.paintLeft(a,c,e,b,d,f,x,l,u),g.paintNW(a,c,e,b,d,f,x,l,B),g.paintTop(a,c,e,b,d,f,p,l,m),g.lineNEInner(a,c,e,b,d,f,p,l,v,
-m),g.paintTopInner(a,c,e,b,d,f,x,l,v,B,u),g.paintNWInner(a,c,e,b,d,f,x,l,v),g.paintLeftInner(a,c,e,b,d,f,L,l,v,D,B),a.close(),a.fillAndStroke()):u&&!m&&D&&!B?"frame"!=n?(a.begin(),g.moveNW(a,c,e,b,d,f,x,l,B),g.paintTop(a,c,e,b,d,f,p,l,m),"double"==n&&(g.moveNEInner(a,c,e,b,d,f,p,l,v,m),g.paintTopInner(a,c,e,b,d,f,x,l,v,B,u)),a.stroke(),a.begin(),g.moveSE(a,c,e,b,d,f,z,l,m),g.paintBottom(a,c,e,b,d,f,L,l,B),"double"==n&&(g.moveSWInner(a,c,e,b,d,f,L,l,v,B),g.paintBottomInner(a,c,e,b,d,f,z,l,v,m,D)),
-a.stroke()):(a.begin(),g.moveNW(a,c,e,b,d,f,x,l,B),g.paintTop(a,c,e,b,d,f,p,l,m),g.lineNEInner(a,c,e,b,d,f,p,l,v,m),g.paintTopInner(a,c,e,b,d,f,x,l,v,B,u),a.close(),a.fillAndStroke(),a.begin(),g.moveSE(a,c,e,b,d,f,z,l,m),g.paintBottom(a,c,e,b,d,f,L,l,B),g.lineSWInner(a,c,e,b,d,f,L,l,v,B),g.paintBottomInner(a,c,e,b,d,f,z,l,v,m,D),a.close(),a.fillAndStroke()):u&&!m&&D&&B?"frame"!=n?(a.begin(),g.moveSE(a,c,e,b,d,f,z,l,m),g.paintBottom(a,c,e,b,d,f,L,l,B),g.paintSW(a,c,e,b,d,f,L,l,D),g.paintLeft(a,c,e,
-b,d,f,x,l,u),g.paintNW(a,c,e,b,d,f,x,l,B),g.paintTop(a,c,e,b,d,f,p,l,m),"double"==n&&(g.moveNEInner(a,c,e,b,d,f,p,l,v,m),g.paintTopInner(a,c,e,b,d,f,x,l,v,B,u),g.paintNWInner(a,c,e,b,d,f,x,l,v),g.paintLeftInner(a,c,e,b,d,f,L,l,v,D,B),g.paintSWInner(a,c,e,b,d,f,L,l,v,D),g.paintBottomInner(a,c,e,b,d,f,z,l,v,m,D)),a.stroke()):(a.begin(),g.moveSE(a,c,e,b,d,f,z,l,m),g.paintBottom(a,c,e,b,d,f,L,l,B),g.paintSW(a,c,e,b,d,f,L,l,D),g.paintLeft(a,c,e,b,d,f,x,l,u),g.paintNW(a,c,e,b,d,f,x,l,B),g.paintTop(a,c,
-e,b,d,f,p,l,m),g.lineNEInner(a,c,e,b,d,f,p,l,v,m),g.paintTopInner(a,c,e,b,d,f,x,l,v,B,u),g.paintNWInner(a,c,e,b,d,f,x,l,v),g.paintLeftInner(a,c,e,b,d,f,L,l,v,D,B),g.paintSWInner(a,c,e,b,d,f,L,l,v,D),g.paintBottomInner(a,c,e,b,d,f,z,l,v,m,D),a.close(),a.fillAndStroke()):u&&m&&!D&&!B?"frame"!=n?(a.begin(),g.moveNW(a,c,e,b,d,f,x,l,B),g.paintTop(a,c,e,b,d,f,p,l,m),g.paintNE(a,c,e,b,d,f,p,l,u),g.paintRight(a,c,e,b,d,f,z,l,D),"double"==n&&(g.moveSEInner(a,c,e,b,d,f,z,l,v,D),g.paintRightInner(a,c,e,b,d,
-f,p,l,v,u,m),g.paintNEInner(a,c,e,b,d,f,p,l,v),g.paintTopInner(a,c,e,b,d,f,x,l,v,B,u)),a.stroke()):(a.begin(),g.moveNW(a,c,e,b,d,f,x,l,B),g.paintTop(a,c,e,b,d,f,p,l,m),g.paintNE(a,c,e,b,d,f,p,l,u),g.paintRight(a,c,e,b,d,f,z,l,D),g.lineSEInner(a,c,e,b,d,f,z,l,v,D),g.paintRightInner(a,c,e,b,d,f,p,l,v,u,m),g.paintNEInner(a,c,e,b,d,f,p,l,v),g.paintTopInner(a,c,e,b,d,f,x,l,v,B,u),a.close(),a.fillAndStroke()):u&&m&&!D&&B?"frame"!=n?(a.begin(),g.moveSW(a,c,e,b,d,f,L,l,D),g.paintLeft(a,c,e,b,d,f,x,l,u),g.paintNW(a,
-c,e,b,d,f,x,l,B),g.paintTop(a,c,e,b,d,f,p,l,m),g.paintNE(a,c,e,b,d,f,p,l,u),g.paintRight(a,c,e,b,d,f,z,l,D),"double"==n&&(g.moveSEInner(a,c,e,b,d,f,z,l,v,D),g.paintRightInner(a,c,e,b,d,f,p,l,v,u,m),g.paintNEInner(a,c,e,b,d,f,p,l,v),g.paintTopInner(a,c,e,b,d,f,x,l,v,B,u),g.paintNWInner(a,c,e,b,d,f,x,l,v),g.paintLeftInner(a,c,e,b,d,f,L,l,v,D,B)),a.stroke()):(a.begin(),g.moveSW(a,c,e,b,d,f,L,l,D),g.paintLeft(a,c,e,b,d,f,x,l,u),g.paintNW(a,c,e,b,d,f,x,l,B),g.paintTop(a,c,e,b,d,f,p,l,m),g.paintNE(a,c,
-e,b,d,f,p,l,u),g.paintRight(a,c,e,b,d,f,z,l,D),g.lineSEInner(a,c,e,b,d,f,z,l,v,D),g.paintRightInner(a,c,e,b,d,f,p,l,v,u,m),g.paintNEInner(a,c,e,b,d,f,p,l,v),g.paintTopInner(a,c,e,b,d,f,x,l,v,B,u),g.paintNWInner(a,c,e,b,d,f,x,l,v),g.paintLeftInner(a,c,e,b,d,f,L,l,v,D,B),a.close(),a.fillAndStroke()):u&&m&&D&&!B?"frame"!=n?(a.begin(),g.moveNW(a,c,e,b,d,f,x,l,B),g.paintTop(a,c,e,b,d,f,p,l,m),g.paintNE(a,c,e,b,d,f,p,l,u),g.paintRight(a,c,e,b,d,f,z,l,D),g.paintSE(a,c,e,b,d,f,z,l,m),g.paintBottom(a,c,e,
-b,d,f,L,l,B),"double"==n&&(g.moveSWInner(a,c,e,b,d,f,L,l,v,B),g.paintBottomInner(a,c,e,b,d,f,z,l,v,m,D),g.paintSEInner(a,c,e,b,d,f,z,l,v),g.paintRightInner(a,c,e,b,d,f,p,l,v,u,m),g.paintNEInner(a,c,e,b,d,f,p,l,v),g.paintTopInner(a,c,e,b,d,f,x,l,v,B,u)),a.stroke()):(a.begin(),g.moveNW(a,c,e,b,d,f,x,l,B),g.paintTop(a,c,e,b,d,f,p,l,m),g.paintNE(a,c,e,b,d,f,p,l,u),g.paintRight(a,c,e,b,d,f,z,l,D),g.paintSE(a,c,e,b,d,f,z,l,m),g.paintBottom(a,c,e,b,d,f,L,l,B),g.lineSWInner(a,c,e,b,d,f,L,l,v,B),g.paintBottomInner(a,
-c,e,b,d,f,z,l,v,m,D),g.paintSEInner(a,c,e,b,d,f,z,l,v),g.paintRightInner(a,c,e,b,d,f,p,l,v,u,m),g.paintNEInner(a,c,e,b,d,f,p,l,v),g.paintTopInner(a,c,e,b,d,f,x,l,v,B,u),a.close(),a.fillAndStroke()):u&&m&&D&&B&&("frame"!=n?(a.begin(),g.moveNW(a,c,e,b,d,f,x,l,B),g.paintNW(a,c,e,b,d,f,x,l,B),g.paintTop(a,c,e,b,d,f,p,l,m),g.paintNE(a,c,e,b,d,f,p,l,u),g.paintRight(a,c,e,b,d,f,z,l,D),g.paintSE(a,c,e,b,d,f,z,l,m),g.paintBottom(a,c,e,b,d,f,L,l,B),g.paintSW(a,c,e,b,d,f,L,l,D),g.paintLeft(a,c,e,b,d,f,x,l,u),
-a.close(),"double"==n&&(g.moveSWInner(a,c,e,b,d,f,L,l,v,B),g.paintSWInner(a,c,e,b,d,f,L,l,v,D),g.paintBottomInner(a,c,e,b,d,f,z,l,v,m,D),g.paintSEInner(a,c,e,b,d,f,z,l,v),g.paintRightInner(a,c,e,b,d,f,p,l,v,u,m),g.paintNEInner(a,c,e,b,d,f,p,l,v),g.paintTopInner(a,c,e,b,d,f,x,l,v,B,u),g.paintNWInner(a,c,e,b,d,f,x,l,v),g.paintLeftInner(a,c,e,b,d,f,L,l,v,D,B),a.close()),a.stroke()):(a.begin(),g.moveNW(a,c,e,b,d,f,x,l,B),g.paintNW(a,c,e,b,d,f,x,l,B),g.paintTop(a,c,e,b,d,f,p,l,m),g.paintNE(a,c,e,b,d,f,
-p,l,u),g.paintRight(a,c,e,b,d,f,z,l,D),g.paintSE(a,c,e,b,d,f,z,l,m),g.paintBottom(a,c,e,b,d,f,L,l,B),g.paintSW(a,c,e,b,d,f,L,l,D),g.paintLeft(a,c,e,b,d,f,x,l,u),a.close(),g.moveSWInner(a,c,e,b,d,f,L,l,v,B),g.paintSWInner(a,c,e,b,d,f,L,l,v,D),g.paintBottomInner(a,c,e,b,d,f,z,l,v,m,D),g.paintSEInner(a,c,e,b,d,f,z,l,v),g.paintRightInner(a,c,e,b,d,f,p,l,v,u,m),g.paintNEInner(a,c,e,b,d,f,p,l,v),g.paintTopInner(a,c,e,b,d,f,x,l,v,B,u),g.paintNWInner(a,c,e,b,d,f,x,l,v),g.paintLeftInner(a,c,e,b,d,f,L,l,v,
-D,B),a.close(),a.fillAndStroke())):"frame"!=n?(a.begin(),g.moveNW(a,c,e,b,d,f,x,l,B),g.paintTop(a,c,e,b,d,f,p,l,m),"double"==n&&(g.moveNEInner(a,c,e,b,d,f,p,l,v,m),g.paintTopInner(a,c,e,b,d,f,x,l,v,B,u)),a.stroke()):(a.begin(),g.moveNW(a,c,e,b,d,f,x,l,B),g.paintTop(a,c,e,b,d,f,p,l,m),g.lineNEInner(a,c,e,b,d,f,p,l,v,m),g.paintTopInner(a,c,e,b,d,f,x,l,v,B,u),a.close(),a.fillAndStroke()):"frame"!=n?(a.begin(),g.moveNE(a,c,e,b,d,f,p,l,u),g.paintRight(a,c,e,b,d,f,z,l,D),"double"==n&&(g.moveSEInner(a,c,
-e,b,d,f,z,l,v,D),g.paintRightInner(a,c,e,b,d,f,p,l,v,u,m)),a.stroke()):(a.begin(),g.moveNE(a,c,e,b,d,f,p,l,u),g.paintRight(a,c,e,b,d,f,z,l,D),g.lineSEInner(a,c,e,b,d,f,z,l,v,D),g.paintRightInner(a,c,e,b,d,f,p,l,v,u,m),a.close(),a.fillAndStroke()):"frame"!=n?(a.begin(),g.moveSE(a,c,e,b,d,f,z,l,m),g.paintBottom(a,c,e,b,d,f,L,l,B),"double"==n&&(g.moveSWInner(a,c,e,b,d,f,L,l,v,B),g.paintBottomInner(a,c,e,b,d,f,z,l,v,m,D)),a.stroke()):(a.begin(),g.moveSE(a,c,e,b,d,f,z,l,m),g.paintBottom(a,c,e,b,d,f,L,
-l,B),g.lineSWInner(a,c,e,b,d,f,L,l,v,B),g.paintBottomInner(a,c,e,b,d,f,z,l,v,m,D),a.close(),a.fillAndStroke()):"frame"!=n?(a.begin(),g.moveSW(a,c,e,b,d,f,x,l,D),g.paintLeft(a,c,e,b,d,f,x,l,u),"double"==n&&(g.moveNWInner(a,c,e,b,d,f,x,l,v,u,B),g.paintLeftInner(a,c,e,b,d,f,L,l,v,D,B)),a.stroke()):(a.begin(),g.moveSW(a,c,e,b,d,f,x,l,D),g.paintLeft(a,c,e,b,d,f,x,l,u),g.lineNWInner(a,c,e,b,d,f,x,l,v,u,B),g.paintLeftInner(a,c,e,b,d,f,L,l,v,D,B),a.close(),a.fillAndStroke());a.begin();g.paintFolds(a,c,e,
-b,d,f,x,p,z,L,l,u,m,D,B);a.stroke()};Z.prototype.moveNW=function(a,c,e,b,d,g,f,l,k){"square"==f||"default"==f&&"square"==g||!k?a.moveTo(0,0):a.moveTo(0,l)};Z.prototype.moveNE=function(a,c,e,b,d,g,f,l,k){"square"==f||"default"==f&&"square"==g||!k?a.moveTo(b,0):a.moveTo(b-l,0)};Z.prototype.moveSE=function(a,c,e,b,d,g,f,l,k){"square"==f||"default"==f&&"square"==g||!k?a.moveTo(b,d):a.moveTo(b,d-l)};Z.prototype.moveSW=function(a,c,e,b,d,g,f,l,k){"square"==f||"default"==f&&"square"==g||!k?a.moveTo(0,d):
-a.moveTo(l,d)};Z.prototype.paintNW=function(a,c,e,b,d,g,f,l,k){if(k)if("rounded"==f||"default"==f&&"rounded"==g||"invRound"==f||"default"==f&&"invRound"==g){c=0;if("rounded"==f||"default"==f&&"rounded"==g)c=1;a.arcTo(l,l,0,0,c,l,0)}else("snip"==f||"default"==f&&"snip"==g||"fold"==f||"default"==f&&"fold"==g)&&a.lineTo(l,0);else a.lineTo(0,0)};Z.prototype.paintTop=function(a,c,e,b,d,g,f,l,k){"square"==f||"default"==f&&"square"==g||!k?a.lineTo(b,0):a.lineTo(b-l,0)};Z.prototype.paintNE=function(a,c,e,
-b,d,g,f,l,k){if(k)if("rounded"==f||"default"==f&&"rounded"==g||"invRound"==f||"default"==f&&"invRound"==g){c=0;if("rounded"==f||"default"==f&&"rounded"==g)c=1;a.arcTo(l,l,0,0,c,b,l)}else("snip"==f||"default"==f&&"snip"==g||"fold"==f||"default"==f&&"fold"==g)&&a.lineTo(b,l);else a.lineTo(b,0)};Z.prototype.paintRight=function(a,c,e,b,d,g,f,l,k){"square"==f||"default"==f&&"square"==g||!k?a.lineTo(b,d):a.lineTo(b,d-l)};Z.prototype.paintLeft=function(a,c,e,b,d,g,f,l,k){"square"==f||"default"==f&&"square"==
-g||!k?a.lineTo(0,0):a.lineTo(0,l)};Z.prototype.paintSE=function(a,c,e,b,d,g,f,l,k){if(k)if("rounded"==f||"default"==f&&"rounded"==g||"invRound"==f||"default"==f&&"invRound"==g){c=0;if("rounded"==f||"default"==f&&"rounded"==g)c=1;a.arcTo(l,l,0,0,c,b-l,d)}else("snip"==f||"default"==f&&"snip"==g||"fold"==f||"default"==f&&"fold"==g)&&a.lineTo(b-l,d);else a.lineTo(b,d)};Z.prototype.paintBottom=function(a,c,e,b,d,g,f,l,k){"square"==f||"default"==f&&"square"==g||!k?a.lineTo(0,d):a.lineTo(l,d)};Z.prototype.paintSW=
-function(a,c,e,b,d,g,f,l,k){if(k)if("rounded"==f||"default"==f&&"rounded"==g||"invRound"==f||"default"==f&&"invRound"==g){c=0;if("rounded"==f||"default"==f&&"rounded"==g)c=1;a.arcTo(l,l,0,0,c,0,d-l)}else("snip"==f||"default"==f&&"snip"==g||"fold"==f||"default"==f&&"fold"==g)&&a.lineTo(0,d-l);else a.lineTo(0,d)};Z.prototype.paintNWInner=function(a,c,e,b,d,g,f,l,k){if("rounded"==f||"default"==f&&"rounded"==g)a.arcTo(l-.5*k,l-.5*k,0,0,0,k,.5*k+l);else if("invRound"==f||"default"==f&&"invRound"==g)a.arcTo(l+
-k,l+k,0,0,1,k,k+l);else if("snip"==f||"default"==f&&"snip"==g)a.lineTo(k,.5*k+l);else if("fold"==f||"default"==f&&"fold"==g)a.lineTo(k+l,k+l),a.lineTo(k,k+l)};Z.prototype.paintTopInner=function(a,c,e,b,d,g,f,l,k,v,n){v||n?!v&&n?a.lineTo(0,k):v&&!n?a.lineTo(k,0):v?"square"==f||"default"==f&&"square"==g?a.lineTo(k,k):"rounded"==f||"default"==f&&"rounded"==g||"snip"==f||"default"==f&&"snip"==g?a.lineTo(l+.5*k,k):a.lineTo(l+k,k):a.lineTo(0,k):a.lineTo(0,0)};Z.prototype.paintNEInner=function(a,c,e,b,d,
-g,f,l,k){if("rounded"==f||"default"==f&&"rounded"==g)a.arcTo(l-.5*k,l-.5*k,0,0,0,b-l-.5*k,k);else if("invRound"==f||"default"==f&&"invRound"==g)a.arcTo(l+k,l+k,0,0,1,b-l-k,k);else if("snip"==f||"default"==f&&"snip"==g)a.lineTo(b-l-.5*k,k);else if("fold"==f||"default"==f&&"fold"==g)a.lineTo(b-l-k,l+k),a.lineTo(b-l-k,k)};Z.prototype.paintRightInner=function(a,c,e,b,d,g,f,l,k,v,n){v||n?!v&&n?a.lineTo(b-k,0):v&&!n?a.lineTo(b,k):v?"square"==f||"default"==f&&"square"==g?a.lineTo(b-k,k):"rounded"==f||"default"==
-f&&"rounded"==g||"snip"==f||"default"==f&&"snip"==g?a.lineTo(b-k,l+.5*k):a.lineTo(b-k,l+k):a.lineTo(b-k,0):a.lineTo(b,0)};Z.prototype.paintLeftInner=function(a,c,e,b,d,g,f,l,k,v,n){v||n?!v&&n?a.lineTo(k,d):v&&!n?a.lineTo(0,d-k):v?"square"==f||"default"==f&&"square"==g?a.lineTo(k,d-k):"rounded"==f||"default"==f&&"rounded"==g||"snip"==f||"default"==f&&"snip"==g?a.lineTo(k,d-l-.5*k):a.lineTo(k,d-l-k):a.lineTo(k,d):a.lineTo(0,d)};Z.prototype.paintSEInner=function(a,c,e,b,d,g,f,l,k){if("rounded"==f||"default"==
-f&&"rounded"==g)a.arcTo(l-.5*k,l-.5*k,0,0,0,b-k,d-l-.5*k);else if("invRound"==f||"default"==f&&"invRound"==g)a.arcTo(l+k,l+k,0,0,1,b-k,d-l-k);else if("snip"==f||"default"==f&&"snip"==g)a.lineTo(b-k,d-l-.5*k);else if("fold"==f||"default"==f&&"fold"==g)a.lineTo(b-l-k,d-l-k),a.lineTo(b-k,d-l-k)};Z.prototype.paintBottomInner=function(a,c,e,b,d,g,f,l,k,v,n){v||n?!v&&n?a.lineTo(b,d-k):v&&!n?a.lineTo(b-k,d):"square"==f||"default"==f&&"square"==g||!v?a.lineTo(b-k,d-k):"rounded"==f||"default"==f&&"rounded"==
-g||"snip"==f||"default"==f&&"snip"==g?a.lineTo(b-l-.5*k,d-k):a.lineTo(b-l-k,d-k):a.lineTo(b,d)};Z.prototype.paintSWInner=function(a,c,e,b,d,g,f,l,k,v){if(!v)a.lineTo(k,d);else if("square"==f||"default"==f&&"square"==g)a.lineTo(k,d-k);else if("rounded"==f||"default"==f&&"rounded"==g)a.arcTo(l-.5*k,l-.5*k,0,0,0,l+.5*k,d-k);else if("invRound"==f||"default"==f&&"invRound"==g)a.arcTo(l+k,l+k,0,0,1,l+k,d-k);else if("snip"==f||"default"==f&&"snip"==g)a.lineTo(l+.5*k,d-k);else if("fold"==f||"default"==f&&
-"fold"==g)a.lineTo(k+l,d-l-k),a.lineTo(k+l,d-k)};Z.prototype.moveSWInner=function(a,c,e,b,d,g,f,l,k,v){v?"square"==f||"default"==f&&"square"==g?a.moveTo(k,d-k):"rounded"==f||"default"==f&&"rounded"==g||"snip"==f||"default"==f&&"snip"==g?a.moveTo(k,d-l-.5*k):("invRound"==f||"default"==f&&"invRound"==g||"fold"==f||"default"==f&&"fold"==g)&&a.moveTo(k,d-l-k):a.moveTo(0,d-k)};Z.prototype.lineSWInner=function(a,c,e,b,d,g,f,l,k,v){v?"square"==f||"default"==f&&"square"==g?a.lineTo(k,d-k):"rounded"==f||"default"==
-f&&"rounded"==g||"snip"==f||"default"==f&&"snip"==g?a.lineTo(k,d-l-.5*k):("invRound"==f||"default"==f&&"invRound"==g||"fold"==f||"default"==f&&"fold"==g)&&a.lineTo(k,d-l-k):a.lineTo(0,d-k)};Z.prototype.moveSEInner=function(a,c,e,b,d,g,f,l,k,v){v?"square"==f||"default"==f&&"square"==g?a.moveTo(b-k,d-k):"rounded"==f||"default"==f&&"rounded"==g||"snip"==f||"default"==f&&"snip"==g?a.moveTo(b-k,d-l-.5*k):("invRound"==f||"default"==f&&"invRound"==g||"fold"==f||"default"==f&&"fold"==g)&&a.moveTo(b-k,d-l-
-k):a.moveTo(b-k,d)};Z.prototype.lineSEInner=function(a,c,e,b,d,g,f,l,k,v){v?"square"==f||"default"==f&&"square"==g?a.lineTo(b-k,d-k):"rounded"==f||"default"==f&&"rounded"==g||"snip"==f||"default"==f&&"snip"==g?a.lineTo(b-k,d-l-.5*k):("invRound"==f||"default"==f&&"invRound"==g||"fold"==f||"default"==f&&"fold"==g)&&a.lineTo(b-k,d-l-k):a.lineTo(b-k,d)};Z.prototype.moveNEInner=function(a,c,e,b,d,g,f,l,k,v){v?"square"==f||"default"==f&&"square"==g||v?a.moveTo(b-k,k):"rounded"==f||"default"==f&&"rounded"==
-g||"snip"==f||"default"==f&&"snip"==g?a.moveTo(b-k,l+.5*k):("invRound"==f||"default"==f&&"invRound"==g||"fold"==f||"default"==f&&"fold"==g)&&a.moveTo(b-k,l+k):a.moveTo(b,k)};Z.prototype.lineNEInner=function(a,c,e,b,d,g,f,l,k,v){v?"square"==f||"default"==f&&"square"==g||v?a.lineTo(b-k,k):"rounded"==f||"default"==f&&"rounded"==g||"snip"==f||"default"==f&&"snip"==g?a.lineTo(b-k,l+.5*k):("invRound"==f||"default"==f&&"invRound"==g||"fold"==f||"default"==f&&"fold"==g)&&a.lineTo(b-k,l+k):a.lineTo(b,k)};
-Z.prototype.moveNWInner=function(a,c,e,b,d,g,f,l,k,v,n){v||n?!v&&n?a.moveTo(k,0):v&&!n?a.moveTo(0,k):"square"==f||"default"==f&&"square"==g?a.moveTo(k,k):"rounded"==f||"default"==f&&"rounded"==g||"snip"==f||"default"==f&&"snip"==g?a.moveTo(k,l+.5*k):("invRound"==f||"default"==f&&"invRound"==g||"fold"==f||"default"==f&&"fold"==g)&&a.moveTo(k,l+k):a.moveTo(0,0)};Z.prototype.lineNWInner=function(a,c,e,b,d,g,f,l,k,v,n){v||n?!v&&n?a.lineTo(k,0):v&&!n?a.lineTo(0,k):"square"==f||"default"==f&&"square"==
-g?a.lineTo(k,k):"rounded"==f||"default"==f&&"rounded"==g||"snip"==f||"default"==f&&"snip"==g?a.lineTo(k,l+.5*k):("invRound"==f||"default"==f&&"invRound"==g||"fold"==f||"default"==f&&"fold"==g)&&a.lineTo(k,l+k):a.lineTo(0,0)};Z.prototype.paintFolds=function(a,c,e,b,d,g,f,l,k,v,n,q,u,m,D){if("fold"==g||"fold"==f||"fold"==l||"fold"==k||"fold"==v)("fold"==f||"default"==f&&"fold"==g)&&q&&D&&(a.moveTo(0,n),a.lineTo(n,n),a.lineTo(n,0)),("fold"==l||"default"==l&&"fold"==g)&&q&&u&&(a.moveTo(b-n,0),a.lineTo(b-
-n,n),a.lineTo(b,n)),("fold"==k||"default"==k&&"fold"==g)&&m&&u&&(a.moveTo(b-n,d),a.lineTo(b-n,d-n),a.lineTo(b,d-n)),("fold"==v||"default"==v&&"fold"==g)&&m&&D&&(a.moveTo(0,d-n),a.lineTo(n,d-n),a.lineTo(n,d))};mxCellRenderer.registerShape(Z.prototype.cst.RECT2,Z);Z.prototype.constraints=null;mxUtils.extend(Ha,mxConnector);Ha.prototype.origPaintEdgeShape=Ha.prototype.paintEdgeShape;Ha.prototype.paintEdgeShape=function(a,c,e){for(var b=[],d=0;d<c.length;d++)b.push(mxUtils.clone(c[d]));var d=a.state.dashed,
-g=a.state.fixDash;Ha.prototype.origPaintEdgeShape.apply(this,[a,b,e]);3<=a.state.strokeWidth&&(b=mxUtils.getValue(this.style,"fillColor",null),null!=b&&(a.setStrokeColor(b),a.setStrokeWidth(a.state.strokeWidth-2),a.setDashed(d,g),Ha.prototype.origPaintEdgeShape.apply(this,[a,c,e])))};mxCellRenderer.registerShape("filledEdge",Ha);"undefined"!==typeof StyleFormatPanel&&function(){var a=StyleFormatPanel.prototype.getCustomColors;StyleFormatPanel.prototype.getCustomColors=function(){var c=this.format.getSelectionState(),
-e=a.apply(this,arguments);"umlFrame"==c.style.shape&&e.push({title:mxResources.get("laneColor"),key:"swimlaneFillColor",defaultValue:"#ffffff"});return e}}();mxMarker.addMarker("dash",function(a,c,e,b,d,g,f,l,k,v){var n=d*(f+k+1),q=g*(f+k+1);return function(){a.begin();a.moveTo(b.x-n/2-q/2,b.y-q/2+n/2);a.lineTo(b.x+q/2-3*n/2,b.y-3*q/2-n/2);a.stroke()}});mxMarker.addMarker("box",function(a,c,e,b,d,g,f,l,k,v){var n=d*(f+k+1),q=g*(f+k+1),u=b.x+n/2,y=b.y+q/2;b.x-=n;b.y-=q;return function(){a.begin();
-a.moveTo(u-n/2-q/2,y-q/2+n/2);a.lineTo(u-n/2+q/2,y-q/2-n/2);a.lineTo(u+q/2-3*n/2,y-3*q/2-n/2);a.lineTo(u-q/2-3*n/2,y-3*q/2+n/2);a.close();v?a.fillAndStroke():a.stroke()}});mxMarker.addMarker("cross",function(a,c,e,b,d,g,f,l,k,v){var n=d*(f+k+1),q=g*(f+k+1);return function(){a.begin();a.moveTo(b.x-n/2-q/2,b.y-q/2+n/2);a.lineTo(b.x+q/2-3*n/2,b.y-3*q/2-n/2);a.moveTo(b.x-n/2+q/2,b.y-q/2-n/2);a.lineTo(b.x-q/2-3*n/2,b.y-3*q/2+n/2);a.stroke()}});mxMarker.addMarker("circle",Ua);mxMarker.addMarker("circlePlus",
-function(a,c,e,b,d,g,f,l,k,v){var n=b.clone(),q=Ua.apply(this,arguments),u=d*(f+2*k),m=g*(f+2*k);return function(){q.apply(this,arguments);a.begin();a.moveTo(n.x-d*k,n.y-g*k);a.lineTo(n.x-2*u+d*k,n.y-2*m+g*k);a.moveTo(n.x-u-m+g*k,n.y-m+u-d*k);a.lineTo(n.x+m-u-g*k,n.y-m-u+d*k);a.stroke()}});mxMarker.addMarker("halfCircle",function(a,c,e,b,d,g,f,l,k,v){var n=d*(f+k+1),q=g*(f+k+1),u=b.clone();b.x-=n;b.y-=q;return function(){a.begin();a.moveTo(u.x-q,u.y+n);a.quadTo(b.x-q,b.y+n,b.x,b.y);a.quadTo(b.x+q,
-b.y-n,u.x+q,u.y-n);a.stroke()}});mxMarker.addMarker("async",function(a,c,e,b,d,g,f,l,k,v){c=d*k*1.118;e=g*k*1.118;d*=f+k;g*=f+k;var n=b.clone();n.x-=c;n.y-=e;b.x+=1*-d-c;b.y+=1*-g-e;return function(){a.begin();a.moveTo(n.x,n.y);l?a.lineTo(n.x-d-g/2,n.y-g+d/2):a.lineTo(n.x+g/2-d,n.y-g-d/2);a.lineTo(n.x-d,n.y-g);a.close();v?a.fillAndStroke():a.stroke()}});mxMarker.addMarker("openAsync",function(a){a=null!=a?a:2;return function(c,e,b,d,g,f,l,k,v,n){g*=l+v;f*=l+v;var q=d.clone();return function(){c.begin();
-c.moveTo(q.x,q.y);k?c.lineTo(q.x-g-f/a,q.y-f+g/a):c.lineTo(q.x+f/a-g,q.y-f-g/a);c.stroke()}}}(2));if("undefined"!==typeof mxVertexHandler){var Ya=function(a,c,e){return Ka(a,["width"],c,function(c,b,d,g,f){f=a.shape.getEdgeWidth()*a.view.scale+e;return new mxPoint(g.x+b*c/4+d*f/2,g.y+d*c/4-b*f/2)},function(c,b,d,g,f,l){c=Math.sqrt(mxUtils.ptSegDistSq(g.x,g.y,f.x,f.y,l.x,l.y));a.style.width=Math.round(2*c)/a.view.scale-e})},Ka=function(a,c,e,b,d){return fa(a,c,function(c){var d=a.absolutePoints,g=
-d.length-1;c=a.view.translate;var f=a.view.scale,l=e?d[0]:d[g],d=e?d[1]:d[g-1],g=d.x-l.x,k=d.y-l.y,v=Math.sqrt(g*g+k*k),l=b.call(this,v,g/v,k/v,l,d);return new mxPoint(l.x/f-c.x,l.y/f-c.y)},function(c,b,g){var f=a.absolutePoints,l=f.length-1;c=a.view.translate;var k=a.view.scale,v=e?f[0]:f[l],f=e?f[1]:f[l-1],l=f.x-v.x,n=f.y-v.y,q=Math.sqrt(l*l+n*n);b.x=(b.x+c.x)*k;b.y=(b.y+c.y)*k;d.call(this,q,l/q,n/q,v,f,b,g)})},Ga=function(a){return function(c){return[fa(c,["arrowWidth","arrowSize"],function(c){var e=
-Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"arrowWidth",ba.prototype.arrowWidth))),b=Math.max(0,Math.min(a,mxUtils.getValue(this.state.style,"arrowSize",ba.prototype.arrowSize)));return new mxPoint(c.x+(1-b)*c.width,c.y+(1-e)*c.height/2)},function(c,e){this.state.style.arrowWidth=Math.max(0,Math.min(1,Math.abs(c.y+c.height/2-e.y)/c.height*2));this.state.style.arrowSize=Math.max(0,Math.min(a,(c.x+c.width-e.x)/c.width))})]}},Va=function(a){return function(c){return[fa(c,["size"],function(c){var e=
+{val:"fold",dispName:"Fold"}]},{name:"bottomLeftStyle",dispName:"Bottom Left Style",type:"enum",defVal:"default",enumList:[{val:"default",dispName:"Default"},{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]}];Y.prototype.paintVertexShape=function(a,c,e,b,d){a.translate(c,e);this.strictDrawShape(a,0,0,b,d)};Y.prototype.strictDrawShape=function(a,c,e,b,d,k){var f=k&&k.rectStyle?k.rectStyle:
+mxUtils.getValue(this.style,"rectStyle",this.rectStyle),g=k&&k.absoluteCornerSize?k.absoluteCornerSize:mxUtils.getValue(this.style,"absoluteCornerSize",this.absoluteCornerSize),l=k&&k.size?k.size:Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),n=k&&k.rectOutline?k.rectOutline:mxUtils.getValue(this.style,"rectOutline",this.rectOutline),v=k&&k.indent?k.indent:Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"indent",this.indent)))),q=k&&k.dashed?k.dashed:
+mxUtils.getValue(this.style,"dashed",!1),y=k&&k.dashPattern?k.dashPattern:mxUtils.getValue(this.style,"dashPattern",null),t=k&&k.relIndent?k.relIndent:Math.max(0,Math.min(50,v)),u=k&&k.top?k.top:mxUtils.getValue(this.style,"top",!0),m=k&&k.right?k.right:mxUtils.getValue(this.style,"right",!0),C=k&&k.bottom?k.bottom:mxUtils.getValue(this.style,"bottom",!0),B=k&&k.left?k.left:mxUtils.getValue(this.style,"left",!0),x=k&&k.topLeftStyle?k.topLeftStyle:mxUtils.getValue(this.style,"topLeftStyle","default"),
+p=k&&k.topRightStyle?k.topRightStyle:mxUtils.getValue(this.style,"topRightStyle","default"),z=k&&k.bottomRightStyle?k.bottomRightStyle:mxUtils.getValue(this.style,"bottomRightStyle","default"),L=k&&k.bottomLeftStyle?k.bottomLeftStyle:mxUtils.getValue(this.style,"bottomLeftStyle","default"),J=k&&k.fillColor?k.fillColor:mxUtils.getValue(this.style,"fillColor","#ffffff");k&&k.strokeColor||mxUtils.getValue(this.style,"strokeColor","#000000");var A=k&&k.strokeWidth?k.strokeWidth:mxUtils.getValue(this.style,
+"strokeWidth","1"),D=k&&k.fillColor2?k.fillColor2:mxUtils.getValue(this.style,"fillColor2","none"),oa=k&&k.gradientColor2?k.gradientColor2:mxUtils.getValue(this.style,"gradientColor2","none"),N=k&&k.gradientDirection2?k.gradientDirection2:mxUtils.getValue(this.style,"gradientDirection2","south"),sa=k&&k.opacity?k.opacity:mxUtils.getValue(this.style,"opacity","100"),W=Math.max(0,Math.min(50,l));k=Y.prototype;a.setDashed(q);y&&""!=y&&a.setDashPattern(y);a.setStrokeWidth(A);l=Math.min(.5*d,.5*b,l);g||
+(l=W*Math.min(b,d)/100);l=Math.min(l,.5*Math.min(b,d));g||(v=Math.min(t*Math.min(b,d)/100));v=Math.min(v,.5*Math.min(b,d)-l);(u||m||C||B)&&"frame"!=n&&(a.begin(),u?k.moveNW(a,c,e,b,d,f,x,l,B):a.moveTo(0,0),u&&k.paintNW(a,c,e,b,d,f,x,l,B),k.paintTop(a,c,e,b,d,f,p,l,m),m&&k.paintNE(a,c,e,b,d,f,p,l,u),k.paintRight(a,c,e,b,d,f,z,l,C),C&&k.paintSE(a,c,e,b,d,f,z,l,m),k.paintBottom(a,c,e,b,d,f,L,l,B),B&&k.paintSW(a,c,e,b,d,f,L,l,C),k.paintLeft(a,c,e,b,d,f,x,l,u),a.close(),a.fill(),a.setShadow(!1),a.setFillColor(D),
+q=g=sa,"none"==D&&(g=0),"none"==oa&&(q=0),a.setGradient(D,oa,0,0,b,d,N,g,q),a.begin(),u?k.moveNWInner(a,c,e,b,d,f,x,l,v,u,B):a.moveTo(v,0),k.paintLeftInner(a,c,e,b,d,f,L,l,v,C,B),B&&C&&k.paintSWInner(a,c,e,b,d,f,L,l,v,C),k.paintBottomInner(a,c,e,b,d,f,z,l,v,m,C),C&&m&&k.paintSEInner(a,c,e,b,d,f,z,l,v),k.paintRightInner(a,c,e,b,d,f,p,l,v,u,m),m&&u&&k.paintNEInner(a,c,e,b,d,f,p,l,v),k.paintTopInner(a,c,e,b,d,f,x,l,v,B,u),u&&B&&k.paintNWInner(a,c,e,b,d,f,x,l,v),a.fill(),"none"==J&&(a.begin(),k.paintFolds(a,
+c,e,b,d,f,x,p,z,L,l,u,m,C,B),a.stroke()));u||m||C||!B?u||m||!C||B?!u&&!m&&C&&B?"frame"!=n?(a.begin(),k.moveSE(a,c,e,b,d,f,z,l,m),k.paintBottom(a,c,e,b,d,f,L,l,B),k.paintSW(a,c,e,b,d,f,L,l,C),k.paintLeft(a,c,e,b,d,f,x,l,u),"double"==n&&(k.moveNWInner(a,c,e,b,d,f,x,l,v,u,B),k.paintLeftInner(a,c,e,b,d,f,L,l,v,C,B),k.paintSWInner(a,c,e,b,d,f,L,l,v,C),k.paintBottomInner(a,c,e,b,d,f,z,l,v,m,C)),a.stroke()):(a.begin(),k.moveSE(a,c,e,b,d,f,z,l,m),k.paintBottom(a,c,e,b,d,f,L,l,B),k.paintSW(a,c,e,b,d,f,L,l,
+C),k.paintLeft(a,c,e,b,d,f,x,l,u),k.lineNWInner(a,c,e,b,d,f,x,l,v,u,B),k.paintLeftInner(a,c,e,b,d,f,L,l,v,C,B),k.paintSWInner(a,c,e,b,d,f,L,l,v,C),k.paintBottomInner(a,c,e,b,d,f,z,l,v,m,C),a.close(),a.fillAndStroke()):u||!m||C||B?!u&&m&&!C&&B?"frame"!=n?(a.begin(),k.moveSW(a,c,e,b,d,f,x,l,C),k.paintLeft(a,c,e,b,d,f,x,l,u),"double"==n&&(k.moveNWInner(a,c,e,b,d,f,x,l,v,u,B),k.paintLeftInner(a,c,e,b,d,f,L,l,v,C,B)),a.stroke(),a.begin(),k.moveNE(a,c,e,b,d,f,p,l,u),k.paintRight(a,c,e,b,d,f,z,l,C),"double"==
+n&&(k.moveSEInner(a,c,e,b,d,f,z,l,v,C),k.paintRightInner(a,c,e,b,d,f,p,l,v,u,m)),a.stroke()):(a.begin(),k.moveSW(a,c,e,b,d,f,x,l,C),k.paintLeft(a,c,e,b,d,f,x,l,u),k.lineNWInner(a,c,e,b,d,f,x,l,v,u,B),k.paintLeftInner(a,c,e,b,d,f,L,l,v,C,B),a.close(),a.fillAndStroke(),a.begin(),k.moveNE(a,c,e,b,d,f,p,l,u),k.paintRight(a,c,e,b,d,f,z,l,C),k.lineSEInner(a,c,e,b,d,f,z,l,v,C),k.paintRightInner(a,c,e,b,d,f,p,l,v,u,m),a.close(),a.fillAndStroke()):!u&&m&&C&&!B?"frame"!=n?(a.begin(),k.moveNE(a,c,e,b,d,f,p,
+l,u),k.paintRight(a,c,e,b,d,f,z,l,C),k.paintSE(a,c,e,b,d,f,z,l,m),k.paintBottom(a,c,e,b,d,f,L,l,B),"double"==n&&(k.moveSWInner(a,c,e,b,d,f,L,l,v,B),k.paintBottomInner(a,c,e,b,d,f,z,l,v,m,C),k.paintSEInner(a,c,e,b,d,f,z,l,v),k.paintRightInner(a,c,e,b,d,f,p,l,v,u,m)),a.stroke()):(a.begin(),k.moveNE(a,c,e,b,d,f,p,l,u),k.paintRight(a,c,e,b,d,f,z,l,C),k.paintSE(a,c,e,b,d,f,z,l,m),k.paintBottom(a,c,e,b,d,f,L,l,B),k.lineSWInner(a,c,e,b,d,f,L,l,v,B),k.paintBottomInner(a,c,e,b,d,f,z,l,v,m,C),k.paintSEInner(a,
+c,e,b,d,f,z,l,v),k.paintRightInner(a,c,e,b,d,f,p,l,v,u,m),a.close(),a.fillAndStroke()):!u&&m&&C&&B?"frame"!=n?(a.begin(),k.moveNE(a,c,e,b,d,f,p,l,u),k.paintRight(a,c,e,b,d,f,z,l,C),k.paintSE(a,c,e,b,d,f,z,l,m),k.paintBottom(a,c,e,b,d,f,L,l,B),k.paintSW(a,c,e,b,d,f,L,l,C),k.paintLeft(a,c,e,b,d,f,x,l,u),"double"==n&&(k.moveNWInner(a,c,e,b,d,f,x,l,v,u,B),k.paintLeftInner(a,c,e,b,d,f,L,l,v,C,B),k.paintSWInner(a,c,e,b,d,f,L,l,v,C),k.paintBottomInner(a,c,e,b,d,f,z,l,v,m,C),k.paintSEInner(a,c,e,b,d,f,z,
+l,v),k.paintRightInner(a,c,e,b,d,f,p,l,v,u,m)),a.stroke()):(a.begin(),k.moveNE(a,c,e,b,d,f,p,l,u),k.paintRight(a,c,e,b,d,f,z,l,C),k.paintSE(a,c,e,b,d,f,z,l,m),k.paintBottom(a,c,e,b,d,f,L,l,B),k.paintSW(a,c,e,b,d,f,L,l,C),k.paintLeft(a,c,e,b,d,f,x,l,u),k.lineNWInner(a,c,e,b,d,f,x,l,v,u,B),k.paintLeftInner(a,c,e,b,d,f,L,l,v,C,B),k.paintSWInner(a,c,e,b,d,f,L,l,v,C),k.paintBottomInner(a,c,e,b,d,f,z,l,v,m,C),k.paintSEInner(a,c,e,b,d,f,z,l,v),k.paintRightInner(a,c,e,b,d,f,p,l,v,u,m),a.close(),a.fillAndStroke()):
+!u||m||C||B?u&&!m&&!C&&B?"frame"!=n?(a.begin(),k.moveSW(a,c,e,b,d,f,L,l,C),k.paintLeft(a,c,e,b,d,f,x,l,u),k.paintNW(a,c,e,b,d,f,x,l,B),k.paintTop(a,c,e,b,d,f,p,l,m),"double"==n&&(k.moveNEInner(a,c,e,b,d,f,p,l,v,m),k.paintTopInner(a,c,e,b,d,f,x,l,v,B,u),k.paintNWInner(a,c,e,b,d,f,x,l,v),k.paintLeftInner(a,c,e,b,d,f,L,l,v,C,B)),a.stroke()):(a.begin(),k.moveSW(a,c,e,b,d,f,L,l,C),k.paintLeft(a,c,e,b,d,f,x,l,u),k.paintNW(a,c,e,b,d,f,x,l,B),k.paintTop(a,c,e,b,d,f,p,l,m),k.lineNEInner(a,c,e,b,d,f,p,l,v,
+m),k.paintTopInner(a,c,e,b,d,f,x,l,v,B,u),k.paintNWInner(a,c,e,b,d,f,x,l,v),k.paintLeftInner(a,c,e,b,d,f,L,l,v,C,B),a.close(),a.fillAndStroke()):u&&!m&&C&&!B?"frame"!=n?(a.begin(),k.moveNW(a,c,e,b,d,f,x,l,B),k.paintTop(a,c,e,b,d,f,p,l,m),"double"==n&&(k.moveNEInner(a,c,e,b,d,f,p,l,v,m),k.paintTopInner(a,c,e,b,d,f,x,l,v,B,u)),a.stroke(),a.begin(),k.moveSE(a,c,e,b,d,f,z,l,m),k.paintBottom(a,c,e,b,d,f,L,l,B),"double"==n&&(k.moveSWInner(a,c,e,b,d,f,L,l,v,B),k.paintBottomInner(a,c,e,b,d,f,z,l,v,m,C)),
+a.stroke()):(a.begin(),k.moveNW(a,c,e,b,d,f,x,l,B),k.paintTop(a,c,e,b,d,f,p,l,m),k.lineNEInner(a,c,e,b,d,f,p,l,v,m),k.paintTopInner(a,c,e,b,d,f,x,l,v,B,u),a.close(),a.fillAndStroke(),a.begin(),k.moveSE(a,c,e,b,d,f,z,l,m),k.paintBottom(a,c,e,b,d,f,L,l,B),k.lineSWInner(a,c,e,b,d,f,L,l,v,B),k.paintBottomInner(a,c,e,b,d,f,z,l,v,m,C),a.close(),a.fillAndStroke()):u&&!m&&C&&B?"frame"!=n?(a.begin(),k.moveSE(a,c,e,b,d,f,z,l,m),k.paintBottom(a,c,e,b,d,f,L,l,B),k.paintSW(a,c,e,b,d,f,L,l,C),k.paintLeft(a,c,e,
+b,d,f,x,l,u),k.paintNW(a,c,e,b,d,f,x,l,B),k.paintTop(a,c,e,b,d,f,p,l,m),"double"==n&&(k.moveNEInner(a,c,e,b,d,f,p,l,v,m),k.paintTopInner(a,c,e,b,d,f,x,l,v,B,u),k.paintNWInner(a,c,e,b,d,f,x,l,v),k.paintLeftInner(a,c,e,b,d,f,L,l,v,C,B),k.paintSWInner(a,c,e,b,d,f,L,l,v,C),k.paintBottomInner(a,c,e,b,d,f,z,l,v,m,C)),a.stroke()):(a.begin(),k.moveSE(a,c,e,b,d,f,z,l,m),k.paintBottom(a,c,e,b,d,f,L,l,B),k.paintSW(a,c,e,b,d,f,L,l,C),k.paintLeft(a,c,e,b,d,f,x,l,u),k.paintNW(a,c,e,b,d,f,x,l,B),k.paintTop(a,c,
+e,b,d,f,p,l,m),k.lineNEInner(a,c,e,b,d,f,p,l,v,m),k.paintTopInner(a,c,e,b,d,f,x,l,v,B,u),k.paintNWInner(a,c,e,b,d,f,x,l,v),k.paintLeftInner(a,c,e,b,d,f,L,l,v,C,B),k.paintSWInner(a,c,e,b,d,f,L,l,v,C),k.paintBottomInner(a,c,e,b,d,f,z,l,v,m,C),a.close(),a.fillAndStroke()):u&&m&&!C&&!B?"frame"!=n?(a.begin(),k.moveNW(a,c,e,b,d,f,x,l,B),k.paintTop(a,c,e,b,d,f,p,l,m),k.paintNE(a,c,e,b,d,f,p,l,u),k.paintRight(a,c,e,b,d,f,z,l,C),"double"==n&&(k.moveSEInner(a,c,e,b,d,f,z,l,v,C),k.paintRightInner(a,c,e,b,d,
+f,p,l,v,u,m),k.paintNEInner(a,c,e,b,d,f,p,l,v),k.paintTopInner(a,c,e,b,d,f,x,l,v,B,u)),a.stroke()):(a.begin(),k.moveNW(a,c,e,b,d,f,x,l,B),k.paintTop(a,c,e,b,d,f,p,l,m),k.paintNE(a,c,e,b,d,f,p,l,u),k.paintRight(a,c,e,b,d,f,z,l,C),k.lineSEInner(a,c,e,b,d,f,z,l,v,C),k.paintRightInner(a,c,e,b,d,f,p,l,v,u,m),k.paintNEInner(a,c,e,b,d,f,p,l,v),k.paintTopInner(a,c,e,b,d,f,x,l,v,B,u),a.close(),a.fillAndStroke()):u&&m&&!C&&B?"frame"!=n?(a.begin(),k.moveSW(a,c,e,b,d,f,L,l,C),k.paintLeft(a,c,e,b,d,f,x,l,u),k.paintNW(a,
+c,e,b,d,f,x,l,B),k.paintTop(a,c,e,b,d,f,p,l,m),k.paintNE(a,c,e,b,d,f,p,l,u),k.paintRight(a,c,e,b,d,f,z,l,C),"double"==n&&(k.moveSEInner(a,c,e,b,d,f,z,l,v,C),k.paintRightInner(a,c,e,b,d,f,p,l,v,u,m),k.paintNEInner(a,c,e,b,d,f,p,l,v),k.paintTopInner(a,c,e,b,d,f,x,l,v,B,u),k.paintNWInner(a,c,e,b,d,f,x,l,v),k.paintLeftInner(a,c,e,b,d,f,L,l,v,C,B)),a.stroke()):(a.begin(),k.moveSW(a,c,e,b,d,f,L,l,C),k.paintLeft(a,c,e,b,d,f,x,l,u),k.paintNW(a,c,e,b,d,f,x,l,B),k.paintTop(a,c,e,b,d,f,p,l,m),k.paintNE(a,c,
+e,b,d,f,p,l,u),k.paintRight(a,c,e,b,d,f,z,l,C),k.lineSEInner(a,c,e,b,d,f,z,l,v,C),k.paintRightInner(a,c,e,b,d,f,p,l,v,u,m),k.paintNEInner(a,c,e,b,d,f,p,l,v),k.paintTopInner(a,c,e,b,d,f,x,l,v,B,u),k.paintNWInner(a,c,e,b,d,f,x,l,v),k.paintLeftInner(a,c,e,b,d,f,L,l,v,C,B),a.close(),a.fillAndStroke()):u&&m&&C&&!B?"frame"!=n?(a.begin(),k.moveNW(a,c,e,b,d,f,x,l,B),k.paintTop(a,c,e,b,d,f,p,l,m),k.paintNE(a,c,e,b,d,f,p,l,u),k.paintRight(a,c,e,b,d,f,z,l,C),k.paintSE(a,c,e,b,d,f,z,l,m),k.paintBottom(a,c,e,
+b,d,f,L,l,B),"double"==n&&(k.moveSWInner(a,c,e,b,d,f,L,l,v,B),k.paintBottomInner(a,c,e,b,d,f,z,l,v,m,C),k.paintSEInner(a,c,e,b,d,f,z,l,v),k.paintRightInner(a,c,e,b,d,f,p,l,v,u,m),k.paintNEInner(a,c,e,b,d,f,p,l,v),k.paintTopInner(a,c,e,b,d,f,x,l,v,B,u)),a.stroke()):(a.begin(),k.moveNW(a,c,e,b,d,f,x,l,B),k.paintTop(a,c,e,b,d,f,p,l,m),k.paintNE(a,c,e,b,d,f,p,l,u),k.paintRight(a,c,e,b,d,f,z,l,C),k.paintSE(a,c,e,b,d,f,z,l,m),k.paintBottom(a,c,e,b,d,f,L,l,B),k.lineSWInner(a,c,e,b,d,f,L,l,v,B),k.paintBottomInner(a,
+c,e,b,d,f,z,l,v,m,C),k.paintSEInner(a,c,e,b,d,f,z,l,v),k.paintRightInner(a,c,e,b,d,f,p,l,v,u,m),k.paintNEInner(a,c,e,b,d,f,p,l,v),k.paintTopInner(a,c,e,b,d,f,x,l,v,B,u),a.close(),a.fillAndStroke()):u&&m&&C&&B&&("frame"!=n?(a.begin(),k.moveNW(a,c,e,b,d,f,x,l,B),k.paintNW(a,c,e,b,d,f,x,l,B),k.paintTop(a,c,e,b,d,f,p,l,m),k.paintNE(a,c,e,b,d,f,p,l,u),k.paintRight(a,c,e,b,d,f,z,l,C),k.paintSE(a,c,e,b,d,f,z,l,m),k.paintBottom(a,c,e,b,d,f,L,l,B),k.paintSW(a,c,e,b,d,f,L,l,C),k.paintLeft(a,c,e,b,d,f,x,l,u),
+a.close(),"double"==n&&(k.moveSWInner(a,c,e,b,d,f,L,l,v,B),k.paintSWInner(a,c,e,b,d,f,L,l,v,C),k.paintBottomInner(a,c,e,b,d,f,z,l,v,m,C),k.paintSEInner(a,c,e,b,d,f,z,l,v),k.paintRightInner(a,c,e,b,d,f,p,l,v,u,m),k.paintNEInner(a,c,e,b,d,f,p,l,v),k.paintTopInner(a,c,e,b,d,f,x,l,v,B,u),k.paintNWInner(a,c,e,b,d,f,x,l,v),k.paintLeftInner(a,c,e,b,d,f,L,l,v,C,B),a.close()),a.stroke()):(a.begin(),k.moveNW(a,c,e,b,d,f,x,l,B),k.paintNW(a,c,e,b,d,f,x,l,B),k.paintTop(a,c,e,b,d,f,p,l,m),k.paintNE(a,c,e,b,d,f,
+p,l,u),k.paintRight(a,c,e,b,d,f,z,l,C),k.paintSE(a,c,e,b,d,f,z,l,m),k.paintBottom(a,c,e,b,d,f,L,l,B),k.paintSW(a,c,e,b,d,f,L,l,C),k.paintLeft(a,c,e,b,d,f,x,l,u),a.close(),k.moveSWInner(a,c,e,b,d,f,L,l,v,B),k.paintSWInner(a,c,e,b,d,f,L,l,v,C),k.paintBottomInner(a,c,e,b,d,f,z,l,v,m,C),k.paintSEInner(a,c,e,b,d,f,z,l,v),k.paintRightInner(a,c,e,b,d,f,p,l,v,u,m),k.paintNEInner(a,c,e,b,d,f,p,l,v),k.paintTopInner(a,c,e,b,d,f,x,l,v,B,u),k.paintNWInner(a,c,e,b,d,f,x,l,v),k.paintLeftInner(a,c,e,b,d,f,L,l,v,
+C,B),a.close(),a.fillAndStroke())):"frame"!=n?(a.begin(),k.moveNW(a,c,e,b,d,f,x,l,B),k.paintTop(a,c,e,b,d,f,p,l,m),"double"==n&&(k.moveNEInner(a,c,e,b,d,f,p,l,v,m),k.paintTopInner(a,c,e,b,d,f,x,l,v,B,u)),a.stroke()):(a.begin(),k.moveNW(a,c,e,b,d,f,x,l,B),k.paintTop(a,c,e,b,d,f,p,l,m),k.lineNEInner(a,c,e,b,d,f,p,l,v,m),k.paintTopInner(a,c,e,b,d,f,x,l,v,B,u),a.close(),a.fillAndStroke()):"frame"!=n?(a.begin(),k.moveNE(a,c,e,b,d,f,p,l,u),k.paintRight(a,c,e,b,d,f,z,l,C),"double"==n&&(k.moveSEInner(a,c,
+e,b,d,f,z,l,v,C),k.paintRightInner(a,c,e,b,d,f,p,l,v,u,m)),a.stroke()):(a.begin(),k.moveNE(a,c,e,b,d,f,p,l,u),k.paintRight(a,c,e,b,d,f,z,l,C),k.lineSEInner(a,c,e,b,d,f,z,l,v,C),k.paintRightInner(a,c,e,b,d,f,p,l,v,u,m),a.close(),a.fillAndStroke()):"frame"!=n?(a.begin(),k.moveSE(a,c,e,b,d,f,z,l,m),k.paintBottom(a,c,e,b,d,f,L,l,B),"double"==n&&(k.moveSWInner(a,c,e,b,d,f,L,l,v,B),k.paintBottomInner(a,c,e,b,d,f,z,l,v,m,C)),a.stroke()):(a.begin(),k.moveSE(a,c,e,b,d,f,z,l,m),k.paintBottom(a,c,e,b,d,f,L,
+l,B),k.lineSWInner(a,c,e,b,d,f,L,l,v,B),k.paintBottomInner(a,c,e,b,d,f,z,l,v,m,C),a.close(),a.fillAndStroke()):"frame"!=n?(a.begin(),k.moveSW(a,c,e,b,d,f,x,l,C),k.paintLeft(a,c,e,b,d,f,x,l,u),"double"==n&&(k.moveNWInner(a,c,e,b,d,f,x,l,v,u,B),k.paintLeftInner(a,c,e,b,d,f,L,l,v,C,B)),a.stroke()):(a.begin(),k.moveSW(a,c,e,b,d,f,x,l,C),k.paintLeft(a,c,e,b,d,f,x,l,u),k.lineNWInner(a,c,e,b,d,f,x,l,v,u,B),k.paintLeftInner(a,c,e,b,d,f,L,l,v,C,B),a.close(),a.fillAndStroke());a.begin();k.paintFolds(a,c,e,
+b,d,f,x,p,z,L,l,u,m,C,B);a.stroke()};Y.prototype.moveNW=function(a,c,e,b,d,k,f,l,g){"square"==f||"default"==f&&"square"==k||!g?a.moveTo(0,0):a.moveTo(0,l)};Y.prototype.moveNE=function(a,c,e,b,d,k,f,l,g){"square"==f||"default"==f&&"square"==k||!g?a.moveTo(b,0):a.moveTo(b-l,0)};Y.prototype.moveSE=function(a,c,e,b,d,k,f,l,g){"square"==f||"default"==f&&"square"==k||!g?a.moveTo(b,d):a.moveTo(b,d-l)};Y.prototype.moveSW=function(a,c,e,b,d,k,f,l,g){"square"==f||"default"==f&&"square"==k||!g?a.moveTo(0,d):
+a.moveTo(l,d)};Y.prototype.paintNW=function(a,c,e,b,d,k,f,l,g){if(g)if("rounded"==f||"default"==f&&"rounded"==k||"invRound"==f||"default"==f&&"invRound"==k){c=0;if("rounded"==f||"default"==f&&"rounded"==k)c=1;a.arcTo(l,l,0,0,c,l,0)}else("snip"==f||"default"==f&&"snip"==k||"fold"==f||"default"==f&&"fold"==k)&&a.lineTo(l,0);else a.lineTo(0,0)};Y.prototype.paintTop=function(a,c,e,b,d,k,f,l,g){"square"==f||"default"==f&&"square"==k||!g?a.lineTo(b,0):a.lineTo(b-l,0)};Y.prototype.paintNE=function(a,c,e,
+b,d,k,f,l,g){if(g)if("rounded"==f||"default"==f&&"rounded"==k||"invRound"==f||"default"==f&&"invRound"==k){c=0;if("rounded"==f||"default"==f&&"rounded"==k)c=1;a.arcTo(l,l,0,0,c,b,l)}else("snip"==f||"default"==f&&"snip"==k||"fold"==f||"default"==f&&"fold"==k)&&a.lineTo(b,l);else a.lineTo(b,0)};Y.prototype.paintRight=function(a,c,e,b,d,k,f,l,g){"square"==f||"default"==f&&"square"==k||!g?a.lineTo(b,d):a.lineTo(b,d-l)};Y.prototype.paintLeft=function(a,c,e,b,d,k,f,l,g){"square"==f||"default"==f&&"square"==
+k||!g?a.lineTo(0,0):a.lineTo(0,l)};Y.prototype.paintSE=function(a,c,e,b,d,k,f,l,g){if(g)if("rounded"==f||"default"==f&&"rounded"==k||"invRound"==f||"default"==f&&"invRound"==k){c=0;if("rounded"==f||"default"==f&&"rounded"==k)c=1;a.arcTo(l,l,0,0,c,b-l,d)}else("snip"==f||"default"==f&&"snip"==k||"fold"==f||"default"==f&&"fold"==k)&&a.lineTo(b-l,d);else a.lineTo(b,d)};Y.prototype.paintBottom=function(a,c,e,b,d,k,f,l,g){"square"==f||"default"==f&&"square"==k||!g?a.lineTo(0,d):a.lineTo(l,d)};Y.prototype.paintSW=
+function(a,c,e,b,d,k,f,l,g){if(g)if("rounded"==f||"default"==f&&"rounded"==k||"invRound"==f||"default"==f&&"invRound"==k){c=0;if("rounded"==f||"default"==f&&"rounded"==k)c=1;a.arcTo(l,l,0,0,c,0,d-l)}else("snip"==f||"default"==f&&"snip"==k||"fold"==f||"default"==f&&"fold"==k)&&a.lineTo(0,d-l);else a.lineTo(0,d)};Y.prototype.paintNWInner=function(a,c,e,b,d,k,f,l,g){if("rounded"==f||"default"==f&&"rounded"==k)a.arcTo(l-.5*g,l-.5*g,0,0,0,g,.5*g+l);else if("invRound"==f||"default"==f&&"invRound"==k)a.arcTo(l+
+g,l+g,0,0,1,g,g+l);else if("snip"==f||"default"==f&&"snip"==k)a.lineTo(g,.5*g+l);else if("fold"==f||"default"==f&&"fold"==k)a.lineTo(g+l,g+l),a.lineTo(g,g+l)};Y.prototype.paintTopInner=function(a,c,e,b,d,k,f,l,g,v,n){v||n?!v&&n?a.lineTo(0,g):v&&!n?a.lineTo(g,0):v?"square"==f||"default"==f&&"square"==k?a.lineTo(g,g):"rounded"==f||"default"==f&&"rounded"==k||"snip"==f||"default"==f&&"snip"==k?a.lineTo(l+.5*g,g):a.lineTo(l+g,g):a.lineTo(0,g):a.lineTo(0,0)};Y.prototype.paintNEInner=function(a,c,e,b,d,
+k,f,l,g){if("rounded"==f||"default"==f&&"rounded"==k)a.arcTo(l-.5*g,l-.5*g,0,0,0,b-l-.5*g,g);else if("invRound"==f||"default"==f&&"invRound"==k)a.arcTo(l+g,l+g,0,0,1,b-l-g,g);else if("snip"==f||"default"==f&&"snip"==k)a.lineTo(b-l-.5*g,g);else if("fold"==f||"default"==f&&"fold"==k)a.lineTo(b-l-g,l+g),a.lineTo(b-l-g,g)};Y.prototype.paintRightInner=function(a,c,e,b,d,k,f,l,g,v,n){v||n?!v&&n?a.lineTo(b-g,0):v&&!n?a.lineTo(b,g):v?"square"==f||"default"==f&&"square"==k?a.lineTo(b-g,g):"rounded"==f||"default"==
+f&&"rounded"==k||"snip"==f||"default"==f&&"snip"==k?a.lineTo(b-g,l+.5*g):a.lineTo(b-g,l+g):a.lineTo(b-g,0):a.lineTo(b,0)};Y.prototype.paintLeftInner=function(a,c,e,b,d,k,f,l,g,v,n){v||n?!v&&n?a.lineTo(g,d):v&&!n?a.lineTo(0,d-g):v?"square"==f||"default"==f&&"square"==k?a.lineTo(g,d-g):"rounded"==f||"default"==f&&"rounded"==k||"snip"==f||"default"==f&&"snip"==k?a.lineTo(g,d-l-.5*g):a.lineTo(g,d-l-g):a.lineTo(g,d):a.lineTo(0,d)};Y.prototype.paintSEInner=function(a,c,e,b,d,k,f,l,g){if("rounded"==f||"default"==
+f&&"rounded"==k)a.arcTo(l-.5*g,l-.5*g,0,0,0,b-g,d-l-.5*g);else if("invRound"==f||"default"==f&&"invRound"==k)a.arcTo(l+g,l+g,0,0,1,b-g,d-l-g);else if("snip"==f||"default"==f&&"snip"==k)a.lineTo(b-g,d-l-.5*g);else if("fold"==f||"default"==f&&"fold"==k)a.lineTo(b-l-g,d-l-g),a.lineTo(b-g,d-l-g)};Y.prototype.paintBottomInner=function(a,c,e,b,d,k,f,l,g,v,n){v||n?!v&&n?a.lineTo(b,d-g):v&&!n?a.lineTo(b-g,d):"square"==f||"default"==f&&"square"==k||!v?a.lineTo(b-g,d-g):"rounded"==f||"default"==f&&"rounded"==
+k||"snip"==f||"default"==f&&"snip"==k?a.lineTo(b-l-.5*g,d-g):a.lineTo(b-l-g,d-g):a.lineTo(b,d)};Y.prototype.paintSWInner=function(a,c,e,b,d,k,f,l,g,v){if(!v)a.lineTo(g,d);else if("square"==f||"default"==f&&"square"==k)a.lineTo(g,d-g);else if("rounded"==f||"default"==f&&"rounded"==k)a.arcTo(l-.5*g,l-.5*g,0,0,0,l+.5*g,d-g);else if("invRound"==f||"default"==f&&"invRound"==k)a.arcTo(l+g,l+g,0,0,1,l+g,d-g);else if("snip"==f||"default"==f&&"snip"==k)a.lineTo(l+.5*g,d-g);else if("fold"==f||"default"==f&&
+"fold"==k)a.lineTo(g+l,d-l-g),a.lineTo(g+l,d-g)};Y.prototype.moveSWInner=function(a,c,e,b,d,k,f,l,g,v){v?"square"==f||"default"==f&&"square"==k?a.moveTo(g,d-g):"rounded"==f||"default"==f&&"rounded"==k||"snip"==f||"default"==f&&"snip"==k?a.moveTo(g,d-l-.5*g):("invRound"==f||"default"==f&&"invRound"==k||"fold"==f||"default"==f&&"fold"==k)&&a.moveTo(g,d-l-g):a.moveTo(0,d-g)};Y.prototype.lineSWInner=function(a,c,e,b,d,k,f,l,g,v){v?"square"==f||"default"==f&&"square"==k?a.lineTo(g,d-g):"rounded"==f||"default"==
+f&&"rounded"==k||"snip"==f||"default"==f&&"snip"==k?a.lineTo(g,d-l-.5*g):("invRound"==f||"default"==f&&"invRound"==k||"fold"==f||"default"==f&&"fold"==k)&&a.lineTo(g,d-l-g):a.lineTo(0,d-g)};Y.prototype.moveSEInner=function(a,c,e,b,d,k,f,l,g,v){v?"square"==f||"default"==f&&"square"==k?a.moveTo(b-g,d-g):"rounded"==f||"default"==f&&"rounded"==k||"snip"==f||"default"==f&&"snip"==k?a.moveTo(b-g,d-l-.5*g):("invRound"==f||"default"==f&&"invRound"==k||"fold"==f||"default"==f&&"fold"==k)&&a.moveTo(b-g,d-l-
+g):a.moveTo(b-g,d)};Y.prototype.lineSEInner=function(a,c,e,b,d,k,f,l,g,v){v?"square"==f||"default"==f&&"square"==k?a.lineTo(b-g,d-g):"rounded"==f||"default"==f&&"rounded"==k||"snip"==f||"default"==f&&"snip"==k?a.lineTo(b-g,d-l-.5*g):("invRound"==f||"default"==f&&"invRound"==k||"fold"==f||"default"==f&&"fold"==k)&&a.lineTo(b-g,d-l-g):a.lineTo(b-g,d)};Y.prototype.moveNEInner=function(a,c,e,b,d,k,f,l,g,v){v?"square"==f||"default"==f&&"square"==k||v?a.moveTo(b-g,g):"rounded"==f||"default"==f&&"rounded"==
+k||"snip"==f||"default"==f&&"snip"==k?a.moveTo(b-g,l+.5*g):("invRound"==f||"default"==f&&"invRound"==k||"fold"==f||"default"==f&&"fold"==k)&&a.moveTo(b-g,l+g):a.moveTo(b,g)};Y.prototype.lineNEInner=function(a,c,e,b,d,k,f,l,g,v){v?"square"==f||"default"==f&&"square"==k||v?a.lineTo(b-g,g):"rounded"==f||"default"==f&&"rounded"==k||"snip"==f||"default"==f&&"snip"==k?a.lineTo(b-g,l+.5*g):("invRound"==f||"default"==f&&"invRound"==k||"fold"==f||"default"==f&&"fold"==k)&&a.lineTo(b-g,l+g):a.lineTo(b,g)};
+Y.prototype.moveNWInner=function(a,c,e,b,d,k,f,l,g,v,n){v||n?!v&&n?a.moveTo(g,0):v&&!n?a.moveTo(0,g):"square"==f||"default"==f&&"square"==k?a.moveTo(g,g):"rounded"==f||"default"==f&&"rounded"==k||"snip"==f||"default"==f&&"snip"==k?a.moveTo(g,l+.5*g):("invRound"==f||"default"==f&&"invRound"==k||"fold"==f||"default"==f&&"fold"==k)&&a.moveTo(g,l+g):a.moveTo(0,0)};Y.prototype.lineNWInner=function(a,c,e,b,d,k,f,l,g,v,n){v||n?!v&&n?a.lineTo(g,0):v&&!n?a.lineTo(0,g):"square"==f||"default"==f&&"square"==
+k?a.lineTo(g,g):"rounded"==f||"default"==f&&"rounded"==k||"snip"==f||"default"==f&&"snip"==k?a.lineTo(g,l+.5*g):("invRound"==f||"default"==f&&"invRound"==k||"fold"==f||"default"==f&&"fold"==k)&&a.lineTo(g,l+g):a.lineTo(0,0)};Y.prototype.paintFolds=function(a,c,e,b,d,k,f,l,g,v,n,q,u,t,m){if("fold"==k||"fold"==f||"fold"==l||"fold"==g||"fold"==v)("fold"==f||"default"==f&&"fold"==k)&&q&&m&&(a.moveTo(0,n),a.lineTo(n,n),a.lineTo(n,0)),("fold"==l||"default"==l&&"fold"==k)&&q&&u&&(a.moveTo(b-n,0),a.lineTo(b-
+n,n),a.lineTo(b,n)),("fold"==g||"default"==g&&"fold"==k)&&t&&u&&(a.moveTo(b-n,d),a.lineTo(b-n,d-n),a.lineTo(b,d-n)),("fold"==v||"default"==v&&"fold"==k)&&t&&m&&(a.moveTo(0,d-n),a.lineTo(n,d-n),a.lineTo(n,d))};mxCellRenderer.registerShape(Y.prototype.cst.RECT2,Y);Y.prototype.constraints=null;mxUtils.extend(Ha,mxConnector);Ha.prototype.origPaintEdgeShape=Ha.prototype.paintEdgeShape;Ha.prototype.paintEdgeShape=function(a,c,e){for(var b=[],d=0;d<c.length;d++)b.push(mxUtils.clone(c[d]));var d=a.state.dashed,
+k=a.state.fixDash;Ha.prototype.origPaintEdgeShape.apply(this,[a,b,e]);3<=a.state.strokeWidth&&(b=mxUtils.getValue(this.style,"fillColor",null),null!=b&&(a.setStrokeColor(b),a.setStrokeWidth(a.state.strokeWidth-2),a.setDashed(d,k),Ha.prototype.origPaintEdgeShape.apply(this,[a,c,e])))};mxCellRenderer.registerShape("filledEdge",Ha);"undefined"!==typeof StyleFormatPanel&&function(){var a=StyleFormatPanel.prototype.getCustomColors;StyleFormatPanel.prototype.getCustomColors=function(){var c=this.format.getSelectionState(),
+e=a.apply(this,arguments);"umlFrame"==c.style.shape&&e.push({title:mxResources.get("laneColor"),key:"swimlaneFillColor",defaultValue:"#ffffff"});return e}}();mxMarker.addMarker("dash",function(a,c,e,b,d,k,f,l,g,v){var n=d*(f+g+1),q=k*(f+g+1);return function(){a.begin();a.moveTo(b.x-n/2-q/2,b.y-q/2+n/2);a.lineTo(b.x+q/2-3*n/2,b.y-3*q/2-n/2);a.stroke()}});mxMarker.addMarker("box",function(a,c,e,b,d,k,f,l,g,v){var n=d*(f+g+1),q=k*(f+g+1),u=b.x+n/2,t=b.y+q/2;b.x-=n;b.y-=q;return function(){a.begin();
+a.moveTo(u-n/2-q/2,t-q/2+n/2);a.lineTo(u-n/2+q/2,t-q/2-n/2);a.lineTo(u+q/2-3*n/2,t-3*q/2-n/2);a.lineTo(u-q/2-3*n/2,t-3*q/2+n/2);a.close();v?a.fillAndStroke():a.stroke()}});mxMarker.addMarker("cross",function(a,c,e,b,d,k,f,l,g,v){var n=d*(f+g+1),q=k*(f+g+1);return function(){a.begin();a.moveTo(b.x-n/2-q/2,b.y-q/2+n/2);a.lineTo(b.x+q/2-3*n/2,b.y-3*q/2-n/2);a.moveTo(b.x-n/2+q/2,b.y-q/2-n/2);a.lineTo(b.x-q/2-3*n/2,b.y-3*q/2+n/2);a.stroke()}});mxMarker.addMarker("circle",Ua);mxMarker.addMarker("circlePlus",
+function(a,c,e,b,d,k,f,l,g,v){var n=b.clone(),q=Ua.apply(this,arguments),u=d*(f+2*g),t=k*(f+2*g);return function(){q.apply(this,arguments);a.begin();a.moveTo(n.x-d*g,n.y-k*g);a.lineTo(n.x-2*u+d*g,n.y-2*t+k*g);a.moveTo(n.x-u-t+k*g,n.y-t+u-d*g);a.lineTo(n.x+t-u-k*g,n.y-t-u+d*g);a.stroke()}});mxMarker.addMarker("halfCircle",function(a,c,e,b,d,k,f,l,g,v){var n=d*(f+g+1),q=k*(f+g+1),u=b.clone();b.x-=n;b.y-=q;return function(){a.begin();a.moveTo(u.x-q,u.y+n);a.quadTo(b.x-q,b.y+n,b.x,b.y);a.quadTo(b.x+q,
+b.y-n,u.x+q,u.y-n);a.stroke()}});mxMarker.addMarker("async",function(a,c,e,b,d,k,f,l,g,v){c=d*g*1.118;e=k*g*1.118;d*=f+g;k*=f+g;var n=b.clone();n.x-=c;n.y-=e;b.x+=1*-d-c;b.y+=1*-k-e;return function(){a.begin();a.moveTo(n.x,n.y);l?a.lineTo(n.x-d-k/2,n.y-k+d/2):a.lineTo(n.x+k/2-d,n.y-k-d/2);a.lineTo(n.x-d,n.y-k);a.close();v?a.fillAndStroke():a.stroke()}});mxMarker.addMarker("openAsync",function(a){a=null!=a?a:2;return function(c,e,b,d,k,f,g,l,v,n){k*=g+v;f*=g+v;var q=d.clone();return function(){c.begin();
+c.moveTo(q.x,q.y);l?c.lineTo(q.x-k-f/a,q.y-f+k/a):c.lineTo(q.x+f/a-k,q.y-f-k/a);c.stroke()}}}(2));if("undefined"!==typeof mxVertexHandler){var Ya=function(a,c,e){return Ka(a,["width"],c,function(c,b,d,k,f){f=a.shape.getEdgeWidth()*a.view.scale+e;return new mxPoint(k.x+b*c/4+d*f/2,k.y+d*c/4-b*f/2)},function(c,b,d,k,f,g){c=Math.sqrt(mxUtils.ptSegDistSq(k.x,k.y,f.x,f.y,g.x,g.y));a.style.width=Math.round(2*c)/a.view.scale-e})},Ka=function(a,c,e,b,d){return fa(a,c,function(c){var d=a.absolutePoints,k=
+d.length-1;c=a.view.translate;var f=a.view.scale,g=e?d[0]:d[k],d=e?d[1]:d[k-1],k=d.x-g.x,l=d.y-g.y,v=Math.sqrt(k*k+l*l),g=b.call(this,v,k/v,l/v,g,d);return new mxPoint(g.x/f-c.x,g.y/f-c.y)},function(c,b,k){var f=a.absolutePoints,g=f.length-1;c=a.view.translate;var l=a.view.scale,v=e?f[0]:f[g],f=e?f[1]:f[g-1],g=f.x-v.x,n=f.y-v.y,q=Math.sqrt(g*g+n*n);b.x=(b.x+c.x)*l;b.y=(b.y+c.y)*l;d.call(this,q,g/q,n/q,v,f,b,k)})},Ga=function(a){return function(c){return[fa(c,["arrowWidth","arrowSize"],function(c){var e=
+Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"arrowWidth",aa.prototype.arrowWidth))),b=Math.max(0,Math.min(a,mxUtils.getValue(this.state.style,"arrowSize",aa.prototype.arrowSize)));return new mxPoint(c.x+(1-b)*c.width,c.y+(1-e)*c.height/2)},function(c,e){this.state.style.arrowWidth=Math.max(0,Math.min(1,Math.abs(c.y+c.height/2-e.y)/c.height*2));this.state.style.arrowSize=Math.max(0,Math.min(a,(c.x+c.width-e.x)/c.width))})]}},Va=function(a){return function(c){return[fa(c,["size"],function(c){var e=
Math.max(0,Math.min(.5*c.height,parseFloat(mxUtils.getValue(this.state.style,"size",a))));return new mxPoint(c.x,c.y+e)},function(a,c){this.state.style.size=Math.max(0,c.y-a.y)},!0)]}},Sa=function(a,c,e){return function(b){var d=[fa(b,["size"],function(e){var b=Math.max(0,Math.min(e.width,Math.min(e.height,parseFloat(mxUtils.getValue(this.state.style,"size",c)))))*a;return new mxPoint(e.x+b,e.y+b)},function(c,e){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(c.width,e.x-c.x),Math.min(c.height,
-e.y-c.y)))/a)},!1)];e&&mxUtils.getValue(b.style,mxConstants.STYLE_ROUNDED,!1)&&d.push(Ea(b));return d}},La=function(a,c,e,b,d){e=null!=e?e:.5;return function(g){var f=[fa(g,["size"],function(c){var e=null!=d?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,b=parseFloat(mxUtils.getValue(this.state.style,"size",e?d:a));return new mxPoint(c.x+Math.max(0,Math.min(.5*c.width,b*(e?1:c.width))),c.getCenterY())},function(a,c,b){a=null!=d&&"0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?
-c.x-a.x:Math.max(0,Math.min(e,(c.x-a.x)/a.width));this.state.style.size=a},!1,b)];c&&mxUtils.getValue(g.style,mxConstants.STYLE_ROUNDED,!1)&&f.push(Ea(g));return f}},Wa=function(a,c,e){a=null!=a?a:.5;return function(b){var d=[fa(b,["size"],function(b){var d=null!=e?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,g=Math.max(0,parseFloat(mxUtils.getValue(this.state.style,"size",d?e:c)));return new mxPoint(b.x+Math.min(.75*b.width*a,g*(d?.75:.75*b.width)),b.y+b.height/4)},function(c,b){var d=
+e.y-c.y)))/a)},!1)];e&&mxUtils.getValue(b.style,mxConstants.STYLE_ROUNDED,!1)&&d.push(Ea(b));return d}},La=function(a,c,e,b,d){e=null!=e?e:.5;return function(k){var f=[fa(k,["size"],function(c){var e=null!=d?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,b=parseFloat(mxUtils.getValue(this.state.style,"size",e?d:a));return new mxPoint(c.x+Math.max(0,Math.min(.5*c.width,b*(e?1:c.width))),c.getCenterY())},function(a,c,b){a=null!=d&&"0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?
+c.x-a.x:Math.max(0,Math.min(e,(c.x-a.x)/a.width));this.state.style.size=a},!1,b)];c&&mxUtils.getValue(k.style,mxConstants.STYLE_ROUNDED,!1)&&f.push(Ea(k));return f}},Wa=function(a,c,e){a=null!=a?a:.5;return function(b){var d=[fa(b,["size"],function(b){var d=null!=e?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,k=Math.max(0,parseFloat(mxUtils.getValue(this.state.style,"size",d?e:c)));return new mxPoint(b.x+Math.min(.75*b.width*a,k*(d?.75:.75*b.width)),b.y+b.height/4)},function(c,b){var d=
null!=e&&"0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?b.x-c.x:Math.max(0,Math.min(a,(b.x-c.x)/c.width*.75));this.state.style.size=d},!1,!0)];mxUtils.getValue(b.style,mxConstants.STYLE_ROUNDED,!1)&&d.push(Ea(b));return d}},Ja=function(){return function(a){var c=[];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&c.push(Ea(a));return c}},Ea=function(a,c){return fa(a,[mxConstants.STYLE_ARCSIZE],function(e){var b=null!=c?c:e.height/8;if("1"==mxUtils.getValue(a.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,
0)){var d=mxUtils.getValue(a.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;return new mxPoint(e.x+e.width-Math.min(e.width/2,d),e.y+b)}d=Math.max(0,parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)))/100;return new mxPoint(e.x+e.width-Math.min(Math.max(e.width/2,e.height/2),Math.min(e.width,e.height)*d),e.y+b)},function(c,e,b){"1"==mxUtils.getValue(a.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?this.state.style[mxConstants.STYLE_ARCSIZE]=
-Math.round(Math.max(0,Math.min(c.width,2*(c.x+c.width-e.x)))):this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.min(50,Math.max(0,100*(c.width-e.x+c.x)/Math.min(c.width,c.height))))})},fa=function(a,c,e,b,d,g,f){var l=new mxHandle(a,null,mxVertexHandler.prototype.secondaryHandleImage);l.execute=function(a){for(var e=0;e<c.length;e++)this.copyStyle(c[e]);f&&f(a)};l.getPosition=e;l.setPosition=b;l.ignoreGrid=null!=d?d:!0;if(g){var k=l.positionChanged;l.positionChanged=function(){k.apply(this,
-arguments);a.view.invalidate(this.state.cell);a.view.validate()}}return l},Ma={link:function(a){return[Ya(a,!0,10),Ya(a,!1,10)]},flexArrow:function(a){var c=a.view.graph.gridSize/a.view.scale,e=[];mxUtils.getValue(a.style,mxConstants.STYLE_STARTARROW,mxConstants.NONE)!=mxConstants.NONE&&(e.push(Ka(a,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(c,e,b,d,g){c=(a.shape.getEdgeWidth()-a.shape.strokewidth)*a.view.scale;g=3*mxUtils.getNumber(a.style,mxConstants.STYLE_STARTSIZE,
-mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(d.x+e*(g+a.shape.strokewidth*a.view.scale)+b*c/2,d.y+b*(g+a.shape.strokewidth*a.view.scale)-e*c/2)},function(e,b,d,g,f,l,k){e=Math.sqrt(mxUtils.ptSegDistSq(g.x,g.y,f.x,f.y,l.x,l.y));b=mxUtils.ptLineDist(g.x,g.y,g.x+d,g.y-b,l.x,l.y);a.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(b-a.shape.strokewidth)/3)/100/a.view.scale;a.style.width=Math.round(2*e)/a.view.scale;mxEvent.isControlDown(k.getEvent())&&(a.style[mxConstants.STYLE_ENDSIZE]=
-a.style[mxConstants.STYLE_STARTSIZE]);mxEvent.isAltDown(k.getEvent())||Math.abs(parseFloat(a.style[mxConstants.STYLE_STARTSIZE])-parseFloat(a.style[mxConstants.STYLE_ENDSIZE]))<c/6&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE])})),e.push(Ka(a,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(c,e,b,d,g){c=(a.shape.getStartArrowWidth()-a.shape.strokewidth)*a.view.scale;g=3*mxUtils.getNumber(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/
-5)*a.view.scale;return new mxPoint(d.x+e*(g+a.shape.strokewidth*a.view.scale)+b*c/2,d.y+b*(g+a.shape.strokewidth*a.view.scale)-e*c/2)},function(e,b,d,g,f,l,k){e=Math.sqrt(mxUtils.ptSegDistSq(g.x,g.y,f.x,f.y,l.x,l.y));b=mxUtils.ptLineDist(g.x,g.y,g.x+d,g.y-b,l.x,l.y);a.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(b-a.shape.strokewidth)/3)/100/a.view.scale;a.style.startWidth=Math.max(0,Math.round(2*e)-a.shape.getEdgeWidth())/a.view.scale;mxEvent.isControlDown(k.getEvent())&&(a.style[mxConstants.STYLE_ENDSIZE]=
-a.style[mxConstants.STYLE_STARTSIZE],a.style.endWidth=a.style.startWidth);mxEvent.isAltDown(k.getEvent())||(Math.abs(parseFloat(a.style[mxConstants.STYLE_STARTSIZE])-parseFloat(a.style[mxConstants.STYLE_ENDSIZE]))<c/6&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE]),Math.abs(parseFloat(a.style.startWidth)-parseFloat(a.style.endWidth))<c&&(a.style.startWidth=a.style.endWidth))})));mxUtils.getValue(a.style,mxConstants.STYLE_ENDARROW,mxConstants.NONE)!=mxConstants.NONE&&(e.push(Ka(a,
-["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(c,e,b,d,g){c=(a.shape.getEdgeWidth()-a.shape.strokewidth)*a.view.scale;g=3*mxUtils.getNumber(a.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(d.x+e*(g+a.shape.strokewidth*a.view.scale)-b*c/2,d.y+b*(g+a.shape.strokewidth*a.view.scale)+e*c/2)},function(e,b,d,g,f,l,k){e=Math.sqrt(mxUtils.ptSegDistSq(g.x,g.y,f.x,f.y,l.x,l.y));b=mxUtils.ptLineDist(g.x,g.y,g.x+d,g.y-b,l.x,l.y);a.style[mxConstants.STYLE_ENDSIZE]=
-Math.round(100*(b-a.shape.strokewidth)/3)/100/a.view.scale;a.style.width=Math.round(2*e)/a.view.scale;mxEvent.isControlDown(k.getEvent())&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE]);mxEvent.isAltDown(k.getEvent())||Math.abs(parseFloat(a.style[mxConstants.STYLE_ENDSIZE])-parseFloat(a.style[mxConstants.STYLE_STARTSIZE]))<c/6&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE])})),e.push(Ka(a,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],
-!1,function(c,e,b,d,g){c=(a.shape.getEndArrowWidth()-a.shape.strokewidth)*a.view.scale;g=3*mxUtils.getNumber(a.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(d.x+e*(g+a.shape.strokewidth*a.view.scale)-b*c/2,d.y+b*(g+a.shape.strokewidth*a.view.scale)+e*c/2)},function(e,b,d,g,f,l,k){e=Math.sqrt(mxUtils.ptSegDistSq(g.x,g.y,f.x,f.y,l.x,l.y));b=mxUtils.ptLineDist(g.x,g.y,g.x+d,g.y-b,l.x,l.y);a.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(b-a.shape.strokewidth)/
-3)/100/a.view.scale;a.style.endWidth=Math.max(0,Math.round(2*e)-a.shape.getEdgeWidth())/a.view.scale;mxEvent.isControlDown(k.getEvent())&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE],a.style.startWidth=a.style.endWidth);mxEvent.isAltDown(k.getEvent())||(Math.abs(parseFloat(a.style[mxConstants.STYLE_ENDSIZE])-parseFloat(a.style[mxConstants.STYLE_STARTSIZE]))<c/6&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE]),Math.abs(parseFloat(a.style.endWidth)-
+Math.round(Math.max(0,Math.min(c.width,2*(c.x+c.width-e.x)))):this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.min(50,Math.max(0,100*(c.width-e.x+c.x)/Math.min(c.width,c.height))))})},fa=function(a,c,e,b,d,k,f){var g=new mxHandle(a,null,mxVertexHandler.prototype.secondaryHandleImage);g.execute=function(a){for(var e=0;e<c.length;e++)this.copyStyle(c[e]);f&&f(a)};g.getPosition=e;g.setPosition=b;g.ignoreGrid=null!=d?d:!0;if(k){var l=g.positionChanged;g.positionChanged=function(){l.apply(this,
+arguments);a.view.invalidate(this.state.cell);a.view.validate()}}return g},Ma={link:function(a){return[Ya(a,!0,10),Ya(a,!1,10)]},flexArrow:function(a){var c=a.view.graph.gridSize/a.view.scale,e=[];mxUtils.getValue(a.style,mxConstants.STYLE_STARTARROW,mxConstants.NONE)!=mxConstants.NONE&&(e.push(Ka(a,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(c,e,b,d,k){c=(a.shape.getEdgeWidth()-a.shape.strokewidth)*a.view.scale;k=3*mxUtils.getNumber(a.style,mxConstants.STYLE_STARTSIZE,
+mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(d.x+e*(k+a.shape.strokewidth*a.view.scale)+b*c/2,d.y+b*(k+a.shape.strokewidth*a.view.scale)-e*c/2)},function(e,b,d,k,f,g,l){e=Math.sqrt(mxUtils.ptSegDistSq(k.x,k.y,f.x,f.y,g.x,g.y));b=mxUtils.ptLineDist(k.x,k.y,k.x+d,k.y-b,g.x,g.y);a.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(b-a.shape.strokewidth)/3)/100/a.view.scale;a.style.width=Math.round(2*e)/a.view.scale;mxEvent.isControlDown(l.getEvent())&&(a.style[mxConstants.STYLE_ENDSIZE]=
+a.style[mxConstants.STYLE_STARTSIZE]);mxEvent.isAltDown(l.getEvent())||Math.abs(parseFloat(a.style[mxConstants.STYLE_STARTSIZE])-parseFloat(a.style[mxConstants.STYLE_ENDSIZE]))<c/6&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE])})),e.push(Ka(a,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(c,e,b,d,k){c=(a.shape.getStartArrowWidth()-a.shape.strokewidth)*a.view.scale;k=3*mxUtils.getNumber(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/
+5)*a.view.scale;return new mxPoint(d.x+e*(k+a.shape.strokewidth*a.view.scale)+b*c/2,d.y+b*(k+a.shape.strokewidth*a.view.scale)-e*c/2)},function(e,b,d,k,f,g,l){e=Math.sqrt(mxUtils.ptSegDistSq(k.x,k.y,f.x,f.y,g.x,g.y));b=mxUtils.ptLineDist(k.x,k.y,k.x+d,k.y-b,g.x,g.y);a.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(b-a.shape.strokewidth)/3)/100/a.view.scale;a.style.startWidth=Math.max(0,Math.round(2*e)-a.shape.getEdgeWidth())/a.view.scale;mxEvent.isControlDown(l.getEvent())&&(a.style[mxConstants.STYLE_ENDSIZE]=
+a.style[mxConstants.STYLE_STARTSIZE],a.style.endWidth=a.style.startWidth);mxEvent.isAltDown(l.getEvent())||(Math.abs(parseFloat(a.style[mxConstants.STYLE_STARTSIZE])-parseFloat(a.style[mxConstants.STYLE_ENDSIZE]))<c/6&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE]),Math.abs(parseFloat(a.style.startWidth)-parseFloat(a.style.endWidth))<c&&(a.style.startWidth=a.style.endWidth))})));mxUtils.getValue(a.style,mxConstants.STYLE_ENDARROW,mxConstants.NONE)!=mxConstants.NONE&&(e.push(Ka(a,
+["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(c,e,b,d,k){c=(a.shape.getEdgeWidth()-a.shape.strokewidth)*a.view.scale;k=3*mxUtils.getNumber(a.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(d.x+e*(k+a.shape.strokewidth*a.view.scale)-b*c/2,d.y+b*(k+a.shape.strokewidth*a.view.scale)+e*c/2)},function(e,b,d,k,f,g,l){e=Math.sqrt(mxUtils.ptSegDistSq(k.x,k.y,f.x,f.y,g.x,g.y));b=mxUtils.ptLineDist(k.x,k.y,k.x+d,k.y-b,g.x,g.y);a.style[mxConstants.STYLE_ENDSIZE]=
+Math.round(100*(b-a.shape.strokewidth)/3)/100/a.view.scale;a.style.width=Math.round(2*e)/a.view.scale;mxEvent.isControlDown(l.getEvent())&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE]);mxEvent.isAltDown(l.getEvent())||Math.abs(parseFloat(a.style[mxConstants.STYLE_ENDSIZE])-parseFloat(a.style[mxConstants.STYLE_STARTSIZE]))<c/6&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE])})),e.push(Ka(a,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],
+!1,function(c,e,b,d,k){c=(a.shape.getEndArrowWidth()-a.shape.strokewidth)*a.view.scale;k=3*mxUtils.getNumber(a.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(d.x+e*(k+a.shape.strokewidth*a.view.scale)-b*c/2,d.y+b*(k+a.shape.strokewidth*a.view.scale)+e*c/2)},function(e,b,d,k,f,g,l){e=Math.sqrt(mxUtils.ptSegDistSq(k.x,k.y,f.x,f.y,g.x,g.y));b=mxUtils.ptLineDist(k.x,k.y,k.x+d,k.y-b,g.x,g.y);a.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(b-a.shape.strokewidth)/
+3)/100/a.view.scale;a.style.endWidth=Math.max(0,Math.round(2*e)-a.shape.getEdgeWidth())/a.view.scale;mxEvent.isControlDown(l.getEvent())&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE],a.style.startWidth=a.style.endWidth);mxEvent.isAltDown(l.getEvent())||(Math.abs(parseFloat(a.style[mxConstants.STYLE_ENDSIZE])-parseFloat(a.style[mxConstants.STYLE_STARTSIZE]))<c/6&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE]),Math.abs(parseFloat(a.style.endWidth)-
parseFloat(a.style.startWidth))<c&&(a.style.endWidth=a.style.startWidth))})));return e},swimlane:function(a){var c=[];if(mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED)){var e=parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));c.push(Ea(a,e/2))}c.push(fa(a,[mxConstants.STYLE_STARTSIZE],function(c){var e=parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));return 1==mxUtils.getValue(a.style,mxConstants.STYLE_HORIZONTAL,
1)?new mxPoint(c.getCenterX(),c.y+Math.max(0,Math.min(c.height,e))):new mxPoint(c.x+Math.max(0,Math.min(c.width,e)),c.getCenterY())},function(c,e){a.style[mxConstants.STYLE_STARTSIZE]=1==mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,1)?Math.round(Math.max(0,Math.min(c.height,e.y-c.y))):Math.round(Math.max(0,Math.min(c.width,e.x-c.x)))},!1,null,function(c){if(mxEvent.isControlDown(c.getEvent())&&(c=a.view.graph,c.isTableRow(a.cell)||c.isTableCell(a.cell))){for(var e=c.getSwimlaneDirection(a.style),
-b=c.model.getParent(a.cell),b=c.model.getChildCells(b,!0),d=[],g=0;g<b.length;g++)b[g]!=a.cell&&c.isSwimlane(b[g])&&c.getSwimlaneDirection(c.getCurrentCellStyle(b[g]))==e&&d.push(b[g]);c.setCellStyles(mxConstants.STYLE_STARTSIZE,a.style[mxConstants.STYLE_STARTSIZE],d)}}));return c},label:Ja(),ext:Ja(),rectangle:Ja(),triangle:Ja(),rhombus:Ja(),umlLifeline:function(a){return[fa(a,["size"],function(a){var c=Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(this.state.style,"size",Q.prototype.size))));
-return new mxPoint(a.getCenterX(),a.y+c)},function(a,c){this.state.style.size=Math.round(Math.max(0,Math.min(a.height,c.y-a.y)))},!1)]},umlFrame:function(a){return[fa(a,["width","height"],function(a){var c=Math.max(aa.prototype.corner,Math.min(a.width,mxUtils.getValue(this.state.style,"width",aa.prototype.width))),e=Math.max(1.5*aa.prototype.corner,Math.min(a.height,mxUtils.getValue(this.state.style,"height",aa.prototype.height)));return new mxPoint(a.x+c,a.y+e)},function(a,c){this.state.style.width=
-Math.round(Math.max(aa.prototype.corner,Math.min(a.width,c.x-a.x)));this.state.style.height=Math.round(Math.max(1.5*aa.prototype.corner,Math.min(a.height,c.y-a.y)))},!1)]},process:function(a){var c=[fa(a,["size"],function(a){var c="0"!=mxUtils.getValue(this.state.style,"fixedSize","0"),e=parseFloat(mxUtils.getValue(this.state.style,"size",F.prototype.size));return c?new mxPoint(a.x+e,a.y+a.height/4):new mxPoint(a.x+a.width*e,a.y+a.height/4)},function(a,c){var e="0"!=mxUtils.getValue(this.state.style,
-"fixedSize","0")?Math.max(0,Math.min(.5*a.width,c.x-a.x)):Math.max(0,Math.min(.5,(c.x-a.x)/a.width));this.state.style.size=e},!1)];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&c.push(Ea(a));return c},cross:function(a){return[fa(a,["size"],function(a){var c=Math.min(a.width,a.height),c=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"size",xa.prototype.size)))*c/2;return new mxPoint(a.getCenterX()-c,a.getCenterY()-c)},function(a,c){var e=Math.min(a.width,a.height);this.state.style.size=
+b=c.model.getParent(a.cell),b=c.model.getChildCells(b,!0),d=[],k=0;k<b.length;k++)b[k]!=a.cell&&c.isSwimlane(b[k])&&c.getSwimlaneDirection(c.getCurrentCellStyle(b[k]))==e&&d.push(b[k]);c.setCellStyles(mxConstants.STYLE_STARTSIZE,a.style[mxConstants.STYLE_STARTSIZE],d)}}));return c},label:Ja(),ext:Ja(),rectangle:Ja(),triangle:Ja(),rhombus:Ja(),umlLifeline:function(a){return[fa(a,["size"],function(a){var c=Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(this.state.style,"size",Q.prototype.size))));
+return new mxPoint(a.getCenterX(),a.y+c)},function(a,c){this.state.style.size=Math.round(Math.max(0,Math.min(a.height,c.y-a.y)))},!1)]},umlFrame:function(a){return[fa(a,["width","height"],function(a){var c=Math.max(Z.prototype.corner,Math.min(a.width,mxUtils.getValue(this.state.style,"width",Z.prototype.width))),e=Math.max(1.5*Z.prototype.corner,Math.min(a.height,mxUtils.getValue(this.state.style,"height",Z.prototype.height)));return new mxPoint(a.x+c,a.y+e)},function(a,c){this.state.style.width=
+Math.round(Math.max(Z.prototype.corner,Math.min(a.width,c.x-a.x)));this.state.style.height=Math.round(Math.max(1.5*Z.prototype.corner,Math.min(a.height,c.y-a.y)))},!1)]},process:function(a){var c=[fa(a,["size"],function(a){var c="0"!=mxUtils.getValue(this.state.style,"fixedSize","0"),e=parseFloat(mxUtils.getValue(this.state.style,"size",F.prototype.size));return c?new mxPoint(a.x+e,a.y+a.height/4):new mxPoint(a.x+a.width*e,a.y+a.height/4)},function(a,c){var e="0"!=mxUtils.getValue(this.state.style,
+"fixedSize","0")?Math.max(0,Math.min(.5*a.width,c.x-a.x)):Math.max(0,Math.min(.5,(c.x-a.x)/a.width));this.state.style.size=e},!1)];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&c.push(Ea(a));return c},cross:function(a){return[fa(a,["size"],function(a){var c=Math.min(a.width,a.height),c=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"size",wa.prototype.size)))*c/2;return new mxPoint(a.getCenterX()-c,a.getCenterY()-c)},function(a,c){var e=Math.min(a.width,a.height);this.state.style.size=
Math.max(0,Math.min(1,Math.min(Math.max(0,a.getCenterY()-c.y)/e*2,Math.max(0,a.getCenterX()-c.x)/e*2)))})]},note:function(a){return[fa(a,["size"],function(a){var c=Math.max(0,Math.min(a.width,Math.min(a.height,parseFloat(mxUtils.getValue(this.state.style,"size",p.prototype.size)))));return new mxPoint(a.x+a.width-c,a.y+c)},function(a,c){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(a.width,a.x+a.width-c.x),Math.min(a.height,c.y-a.y))))})]},note2:function(a){return[fa(a,["size"],function(a){var e=
-Math.max(0,Math.min(a.width,Math.min(a.height,parseFloat(mxUtils.getValue(this.state.style,"size",c.prototype.size)))));return new mxPoint(a.x+a.width-e,a.y+e)},function(a,c){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(a.width,a.x+a.width-c.x),Math.min(a.height,c.y-a.y))))})]},manualInput:function(a){var c=[fa(a,["size"],function(a){var c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",da.prototype.size)));return new mxPoint(a.x+a.width/4,a.y+3*c/4)},function(a,
-c){this.state.style.size=Math.round(Math.max(0,Math.min(a.height,4*(c.y-a.y)/3)))},!1)];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&c.push(Ea(a));return c},dataStorage:function(a){return[fa(a,["size"],function(a){var c="0"!=mxUtils.getValue(this.state.style,"fixedSize","0"),e=parseFloat(mxUtils.getValue(this.state.style,"size",c?Y.prototype.fixedSize:Y.prototype.size));return new mxPoint(a.x+a.width-e*(c?1:a.width),a.getCenterY())},function(a,c){var e="0"!=mxUtils.getValue(this.state.style,
-"fixedSize","0")?Math.max(0,Math.min(a.width,a.x+a.width-c.x)):Math.max(0,Math.min(1,(a.x+a.width-c.x)/a.width));this.state.style.size=e},!1)]},callout:function(a){var c=[fa(a,["size","position"],function(a){var c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",C.prototype.size))),e=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",C.prototype.position)));mxUtils.getValue(this.state.style,"base",C.prototype.base);return new mxPoint(a.x+e*a.width,a.y+a.height-
-c)},function(a,c){mxUtils.getValue(this.state.style,"base",C.prototype.base);this.state.style.size=Math.round(Math.max(0,Math.min(a.height,a.y+a.height-c.y)));this.state.style.position=Math.round(100*Math.max(0,Math.min(1,(c.x-a.x)/a.width)))/100},!1),fa(a,["position2"],function(a){var c=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position2",C.prototype.position2)));return new mxPoint(a.x+c*a.width,a.y+a.height)},function(a,c){this.state.style.position2=Math.round(100*Math.max(0,Math.min(1,
-(c.x-a.x)/a.width)))/100},!1),fa(a,["base"],function(a){var c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",C.prototype.size))),e=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",C.prototype.position))),b=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"base",C.prototype.base)));return new mxPoint(a.x+Math.min(a.width,e*a.width+b),a.y+a.height-c)},function(a,c){var e=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",C.prototype.position)));
+Math.max(0,Math.min(a.width,Math.min(a.height,parseFloat(mxUtils.getValue(this.state.style,"size",c.prototype.size)))));return new mxPoint(a.x+a.width-e,a.y+e)},function(a,c){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(a.width,a.x+a.width-c.x),Math.min(a.height,c.y-a.y))))})]},manualInput:function(a){var c=[fa(a,["size"],function(a){var c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",ca.prototype.size)));return new mxPoint(a.x+a.width/4,a.y+3*c/4)},function(a,
+c){this.state.style.size=Math.round(Math.max(0,Math.min(a.height,4*(c.y-a.y)/3)))},!1)];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&c.push(Ea(a));return c},dataStorage:function(a){return[fa(a,["size"],function(a){var c="0"!=mxUtils.getValue(this.state.style,"fixedSize","0"),e=parseFloat(mxUtils.getValue(this.state.style,"size",c?ea.prototype.fixedSize:ea.prototype.size));return new mxPoint(a.x+a.width-e*(c?1:a.width),a.getCenterY())},function(a,c){var e="0"!=mxUtils.getValue(this.state.style,
+"fixedSize","0")?Math.max(0,Math.min(a.width,a.x+a.width-c.x)):Math.max(0,Math.min(1,(a.x+a.width-c.x)/a.width));this.state.style.size=e},!1)]},callout:function(a){var c=[fa(a,["size","position"],function(a){var c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",D.prototype.size))),e=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",D.prototype.position)));mxUtils.getValue(this.state.style,"base",D.prototype.base);return new mxPoint(a.x+e*a.width,a.y+a.height-
+c)},function(a,c){mxUtils.getValue(this.state.style,"base",D.prototype.base);this.state.style.size=Math.round(Math.max(0,Math.min(a.height,a.y+a.height-c.y)));this.state.style.position=Math.round(100*Math.max(0,Math.min(1,(c.x-a.x)/a.width)))/100},!1),fa(a,["position2"],function(a){var c=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position2",D.prototype.position2)));return new mxPoint(a.x+c*a.width,a.y+a.height)},function(a,c){this.state.style.position2=Math.round(100*Math.max(0,Math.min(1,
+(c.x-a.x)/a.width)))/100},!1),fa(a,["base"],function(a){var c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",D.prototype.size))),e=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",D.prototype.position))),b=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"base",D.prototype.base)));return new mxPoint(a.x+Math.min(a.width,e*a.width+b),a.y+a.height-c)},function(a,c){var e=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",D.prototype.position)));
this.state.style.base=Math.round(Math.max(0,Math.min(a.width,c.x-a.x-e*a.width)))},!1)];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&c.push(Ea(a));return c},internalStorage:function(a){var c=[fa(a,["dx","dy"],function(a){var c=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",ia.prototype.dx))),e=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",ia.prototype.dy)));return new mxPoint(a.x+c,a.y+e)},function(a,c){this.state.style.dx=Math.round(Math.max(0,
Math.min(a.width,c.x-a.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(a.height,c.y-a.y)))},!1)];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&c.push(Ea(a));return c},module:function(a){return[fa(a,["jettyWidth","jettyHeight"],function(a){var c=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"jettyWidth",V.prototype.jettyWidth))),e=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"jettyHeight",V.prototype.jettyHeight)));return new mxPoint(a.x+c/2,a.y+
2*e)},function(a,c){this.state.style.jettyWidth=Math.round(2*Math.max(0,Math.min(a.width,c.x-a.x)));this.state.style.jettyHeight=Math.round(Math.max(0,Math.min(a.height,c.y-a.y))/2)})]},corner:function(a){return[fa(a,["dx","dy"],function(a){var c=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",pa.prototype.dx))),e=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",pa.prototype.dy)));return new mxPoint(a.x+c,a.y+e)},function(a,c){this.state.style.dx=Math.round(Math.max(0,
@@ -2858,21 +2859,21 @@ Math.min(a.width,c.x-a.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(a
Math.round(Math.max(0,Math.min(a.height,c.y-a.y)))},!1)]},singleArrow:Ga(1),doubleArrow:Ga(.5),folder:function(a){return[fa(a,["tabWidth","tabHeight"],function(a){var c=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"tabWidth",q.prototype.tabWidth))),e=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"tabHeight",q.prototype.tabHeight)));mxUtils.getValue(this.state.style,"tabPosition",q.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(c=a.width-c);return new mxPoint(a.x+
c,a.y+e)},function(a,c){var e=Math.max(0,Math.min(a.width,c.x-a.x));mxUtils.getValue(this.state.style,"tabPosition",q.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(e=a.width-e);this.state.style.tabWidth=Math.round(e);this.state.style.tabHeight=Math.round(Math.max(0,Math.min(a.height,c.y-a.y)))},!1)]},document:function(a){return[fa(a,["size"],function(a){var c=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",x.prototype.size))));return new mxPoint(a.x+3*a.width/4,a.y+(1-
c)*a.height)},function(a,c){this.state.style.size=Math.max(0,Math.min(1,(a.y+a.height-c.y)/a.height))},!1)]},tape:function(a){return[fa(a,["size"],function(a){var c=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",A.prototype.size))));return new mxPoint(a.getCenterX(),a.y+c*a.height/2)},function(a,c){this.state.style.size=Math.max(0,Math.min(1,(c.y-a.y)/a.height*2))},!1)]},isoCube2:function(a){return[fa(a,["isoAngle"],function(a){var c=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.state.style,
-"isoAngle",e.isoAngle))))*Math.PI/200;return new mxPoint(a.x,a.y+Math.min(a.width*Math.tan(c),.5*a.height))},function(a,c){this.state.style.isoAngle=Math.max(0,50*(c.y-a.y)/a.height)},!0)]},cylinder2:Va(g.prototype.size),cylinder3:Va(n.prototype.size),offPageConnector:function(a){return[fa(a,["size"],function(a){var c=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",ra.prototype.size))));return new mxPoint(a.getCenterX(),a.y+(1-c)*a.height)},function(a,c){this.state.style.size=
+"isoAngle",e.isoAngle))))*Math.PI/200;return new mxPoint(a.x,a.y+Math.min(a.width*Math.tan(c),.5*a.height))},function(a,c){this.state.style.isoAngle=Math.max(0,50*(c.y-a.y)/a.height)},!0)]},cylinder2:Va(k.prototype.size),cylinder3:Va(n.prototype.size),offPageConnector:function(a){return[fa(a,["size"],function(a){var c=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",ra.prototype.size))));return new mxPoint(a.getCenterX(),a.y+(1-c)*a.height)},function(a,c){this.state.style.size=
Math.max(0,Math.min(1,(a.y+a.height-c.y)/a.height))},!1)]},"mxgraph.basic.rect":function(a){var c=[Graph.createHandle(a,["size"],function(a){var c=Math.max(0,Math.min(a.width/2,a.height/2,parseFloat(mxUtils.getValue(this.state.style,"size",this.size))));return new mxPoint(a.x+c,a.y+c)},function(a,c){this.state.style.size=Math.round(100*Math.max(0,Math.min(a.height/2,a.width/2,c.x-a.x)))/100})];a=Graph.createHandle(a,["indent"],function(a){var c=Math.max(0,Math.min(100,parseFloat(mxUtils.getValue(this.state.style,
"indent",this.dx2))));return new mxPoint(a.x+.75*a.width,a.y+c*a.height/200)},function(a,c){this.state.style.indent=Math.round(100*Math.max(0,Math.min(100,200*(c.y-a.y)/a.height)))/100});c.push(a);return c},step:La(M.prototype.size,!0,null,!0,M.prototype.fixedSize),hexagon:La(U.prototype.size,!0,.5,!0,U.prototype.fixedSize),curlyBracket:La(E.prototype.size,!1),display:La(Fa.prototype.size,!1),cube:Sa(1,b.prototype.size,!1),card:Sa(.5,t.prototype.size,!0),loopLimit:Sa(.5,ua.prototype.size,!0),trapezoid:Wa(.5,
z.prototype.size,z.prototype.fixedSize),parallelogram:Wa(1,G.prototype.size,G.prototype.fixedSize)};Graph.createHandle=fa;Graph.handleFactory=Ma;var cb=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){var a=cb.apply(this,arguments);if(this.graph.isCellRotatable(this.state.cell)){var c=this.state.style.shape;null==mxCellRenderer.defaultShapes[c]&&null==mxStencilRegistry.getStencil(c)?c=mxConstants.SHAPE_RECTANGLE:this.state.view.graph.isSwimlane(this.state.cell)&&
(c=mxConstants.SHAPE_SWIMLANE);c=Ma[c];null==c&&null!=this.state.shape&&this.state.shape.isRoundable()&&(c=Ma[mxConstants.SHAPE_RECTANGLE]);null!=c&&(c=c(this.state),null!=c&&(a=null==a?c:a.concat(c)))}return a};mxEdgeHandler.prototype.createCustomHandles=function(){var a=this.state.style.shape;null==mxCellRenderer.defaultShapes[a]&&null==mxStencilRegistry.getStencil(a)&&(a=mxConstants.SHAPE_CONNECTOR);a=Ma[a];return null!=a?a(this.state):null}}else Graph.createHandle=function(){},Graph.handleFactory=
-{};var Na=new mxPoint(1,0),Oa=new mxPoint(1,0),Ga=mxUtils.toRadians(-30),Na=mxUtils.getRotatedPoint(Na,Math.cos(Ga),Math.sin(Ga)),Ga=mxUtils.toRadians(-150),Oa=mxUtils.getRotatedPoint(Oa,Math.cos(Ga),Math.sin(Ga));mxEdgeStyle.IsometricConnector=function(a,c,e,b,d){var g=a.view;b=null!=b&&0<b.length?b[0]:null;var f=a.absolutePoints,l=f[0],f=f[f.length-1];null!=b&&(b=g.transformControlPoint(a,b));null==l&&null!=c&&(l=new mxPoint(c.getCenterX(),c.getCenterY()));null==f&&null!=e&&(f=new mxPoint(e.getCenterX(),
-e.getCenterY()));var k=Na.x,v=Na.y,n=Oa.x,q=Oa.y,u="horizontal"==mxUtils.getValue(a.style,"elbow","horizontal");if(null!=f&&null!=l){a=function(a,c,e){a-=m.x;var b=c-m.y;c=(q*a-n*b)/(k*q-v*n);a=(v*a-k*b)/(v*n-k*q);u?(e&&(m=new mxPoint(m.x+k*c,m.y+v*c),d.push(m)),m=new mxPoint(m.x+n*a,m.y+q*a)):(e&&(m=new mxPoint(m.x+n*a,m.y+q*a),d.push(m)),m=new mxPoint(m.x+k*c,m.y+v*c));d.push(m)};var m=l;null==b&&(b=new mxPoint(l.x+(f.x-l.x)/2,l.y+(f.y-l.y)/2));a(b.x,b.y,!0);a(f.x,f.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",
-mxEdgeStyle.IsometricConnector);var db=Graph.prototype.createEdgeHandler;Graph.prototype.createEdgeHandler=function(a,c){if(c==mxEdgeStyle.IsometricConnector){var e=new mxElbowEdgeHandler(a);e.snapToTerminals=!1;return e}return db.apply(this,arguments)};k.prototype.constraints=[];f.prototype.getConstraints=function(a,c,e){a=[];var b=Math.tan(mxUtils.toRadians(30)),d=(.5-b)/2,b=Math.min(c,e/(.5+b));c=(c-b)/2;e=(e-b)/2;a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,e+.25*b));a.push(new mxConnectionConstraint(new mxPoint(0,
+{};var Na=new mxPoint(1,0),Oa=new mxPoint(1,0),Ga=mxUtils.toRadians(-30),Na=mxUtils.getRotatedPoint(Na,Math.cos(Ga),Math.sin(Ga)),Ga=mxUtils.toRadians(-150),Oa=mxUtils.getRotatedPoint(Oa,Math.cos(Ga),Math.sin(Ga));mxEdgeStyle.IsometricConnector=function(a,c,e,b,d){var k=a.view;b=null!=b&&0<b.length?b[0]:null;var f=a.absolutePoints,g=f[0],f=f[f.length-1];null!=b&&(b=k.transformControlPoint(a,b));null==g&&null!=c&&(g=new mxPoint(c.getCenterX(),c.getCenterY()));null==f&&null!=e&&(f=new mxPoint(e.getCenterX(),
+e.getCenterY()));var l=Na.x,v=Na.y,n=Oa.x,q=Oa.y,u="horizontal"==mxUtils.getValue(a.style,"elbow","horizontal");if(null!=f&&null!=g){a=function(a,c,e){a-=t.x;var b=c-t.y;c=(q*a-n*b)/(l*q-v*n);a=(v*a-l*b)/(v*n-l*q);u?(e&&(t=new mxPoint(t.x+l*c,t.y+v*c),d.push(t)),t=new mxPoint(t.x+n*a,t.y+q*a)):(e&&(t=new mxPoint(t.x+n*a,t.y+q*a),d.push(t)),t=new mxPoint(t.x+l*c,t.y+v*c));d.push(t)};var t=g;null==b&&(b=new mxPoint(g.x+(f.x-g.x)/2,g.y+(f.y-g.y)/2));a(b.x,b.y,!0);a(f.x,f.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",
+mxEdgeStyle.IsometricConnector);var db=Graph.prototype.createEdgeHandler;Graph.prototype.createEdgeHandler=function(a,c){if(c==mxEdgeStyle.IsometricConnector){var e=new mxElbowEdgeHandler(a);e.snapToTerminals=!1;return e}return db.apply(this,arguments)};g.prototype.constraints=[];f.prototype.getConstraints=function(a,c,e){a=[];var b=Math.tan(mxUtils.toRadians(30)),d=(.5-b)/2,b=Math.min(c,e/(.5+b));c=(c-b)/2;e=(e-b)/2;a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,e+.25*b));a.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,c+.5*b,e+b*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c+b,e+.25*b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c+b,e+.75*b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c+.5*b,e+(1-d)*b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,e+.75*b));return a};e.prototype.getConstraints=function(a,c,e){a=[];var b=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.style,"isoAngle",this.isoAngle))))*Math.PI/200,b=Math.min(c*
Math.tan(b),.5*e);a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,b));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,e-b));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,e-b));a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,
-0,b));return a};C.prototype.getConstraints=function(a,c,e){a=[];mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE);var b=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size))));parseFloat(mxUtils.getValue(this.style,"position",this.position));var d=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2))));parseFloat(mxUtils.getValue(this.style,"base",this.base));a.push(new mxConnectionConstraint(new mxPoint(0,
+0,b));return a};D.prototype.getConstraints=function(a,c,e){a=[];mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE);var b=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size))));parseFloat(mxUtils.getValue(this.style,"position",this.position));var d=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2))));parseFloat(mxUtils.getValue(this.style,"base",this.base));a.push(new mxConnectionConstraint(new mxPoint(0,
0),!1));a.push(new mxConnectionConstraint(new mxPoint(.25,0),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));a.push(new mxConnectionConstraint(new mxPoint(.75,0),!1));a.push(new mxConnectionConstraint(new mxPoint(1,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,.5*(e-b)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,e-b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,
e-b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(e-b)));c>=2*b&&a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return a};mxRectangleShape.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!0),new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,
.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(0,1),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0)];mxEllipse.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,
-0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(0,1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(1,.5))];wa.prototype.constraints=mxRectangleShape.prototype.constraints;mxImageShape.prototype.constraints=mxRectangleShape.prototype.constraints;mxSwimlane.prototype.constraints=
+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))];va.prototype.constraints=mxRectangleShape.prototype.constraints;mxImageShape.prototype.constraints=mxRectangleShape.prototype.constraints;mxSwimlane.prototype.constraints=
mxRectangleShape.prototype.constraints;O.prototype.constraints=mxRectangleShape.prototype.constraints;mxLabel.prototype.constraints=mxRectangleShape.prototype.constraints;p.prototype.getConstraints=function(a,c,e){a=[];var b=Math.max(0,Math.min(c,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c-b),0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,
null,c-b,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c-.5*b,.5*b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,.5*(e+b)));a.push(new mxConnectionConstraint(new mxPoint(1,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));c>=2*b&&a.push(new mxConnectionConstraint(new mxPoint(.5,
0),!1));return a};t.prototype.getConstraints=function(a,c,e){a=[];var b=Math.max(0,Math.min(c,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));a.push(new mxConnectionConstraint(new mxPoint(1,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c+b),0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*b,.5*b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,b));a.push(new mxConnectionConstraint(new mxPoint(0,
@@ -2884,14 +2885,14 @@ null,c-b,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c-.5*b,.
"tabWidth",this.tabWidth)))),d=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));"left"==mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?(a.push(new mxConnectionConstraint(new mxPoint(0,0),!1)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*b,0)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,0)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,d)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,
.5*(c+b),d))):(a.push(new mxConnectionConstraint(new mxPoint(1,0),!1)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c-.5*b,0)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c-b,0)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c-b,d)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c-b),d)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,.25*(e-d)+d));a.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,c,.5*(e-d)+d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,.75*(e-d)+d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.25*(e-d)+d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(e-d)+d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.75*(e-d)+d));a.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,0,e));a.push(new mxConnectionConstraint(new mxPoint(.25,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.75,1),!1));return a};ia.prototype.constraints=mxRectangleShape.prototype.constraints;Y.prototype.constraints=mxRectangleShape.prototype.constraints;ya.prototype.constraints=mxEllipse.prototype.constraints;za.prototype.constraints=mxEllipse.prototype.constraints;S.prototype.constraints=mxEllipse.prototype.constraints;Da.prototype.constraints=
-mxEllipse.prototype.constraints;da.prototype.constraints=mxRectangleShape.prototype.constraints;Ca.prototype.constraints=mxRectangleShape.prototype.constraints;Fa.prototype.getConstraints=function(a,c,e){a=[];var b=Math.min(c,e/2),d=Math.min(c-b,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*c);a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,
+0),!1,null,0,e));a.push(new mxConnectionConstraint(new mxPoint(.25,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.75,1),!1));return a};ia.prototype.constraints=mxRectangleShape.prototype.constraints;ea.prototype.constraints=mxRectangleShape.prototype.constraints;xa.prototype.constraints=mxEllipse.prototype.constraints;za.prototype.constraints=mxEllipse.prototype.constraints;S.prototype.constraints=mxEllipse.prototype.constraints;Da.prototype.constraints=
+mxEllipse.prototype.constraints;ca.prototype.constraints=mxRectangleShape.prototype.constraints;Ca.prototype.constraints=mxRectangleShape.prototype.constraints;Fa.prototype.getConstraints=function(a,c,e){a=[];var b=Math.min(c,e/2),d=Math.min(c-b,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*c);a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,
.5*(d+c-b),0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c-b,0));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1,null));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c-b,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d+c-b),e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,e));return a};V.prototype.getConstraints=function(a,c,e){c=parseFloat(mxUtils.getValue(a,"jettyWidth",V.prototype.jettyWidth))/2;a=parseFloat(mxUtils.getValue(a,
"jettyHeight",V.prototype.jettyHeight));var b=[new mxConnectionConstraint(new mxPoint(0,0),!1,null,c),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,c),
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(e-.5*a,1.5*a)),new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,Math.min(e-.5*a,3.5*a))];e>5*a&&b.push(new mxConnectionConstraint(new mxPoint(0,.75),!1,null,c));e>8*a&&b.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null,c));e>15*
a&&b.push(new mxConnectionConstraint(new mxPoint(0,.25),!1,null,c));return b};ua.prototype.constraints=mxRectangleShape.prototype.constraints;ra.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)];D.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)];ca.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0,.7),!0),new mxConnectionConstraint(new mxPoint(1,
+.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)];C.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)];ba.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,.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)];l.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)];A.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,
@@ -2906,27 +2907,27 @@ new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new
0),!1,null,.5*(c+b),.5*(e+d)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c+b),e));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c-b),e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c-b),.5*(e+d)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c-b),d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.25*c-.25*b,d));a.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,0,d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*d));return a};pa.prototype.getConstraints=function(a,c,e){a=[];var b=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),d=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));a.push(new mxConnectionConstraint(new mxPoint(1,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,c,.5*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c+b),d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,.5*(e+d)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*b,e));a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,
-1),!1));return a};R.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)];ba.prototype.getConstraints=
+1),!1));return a};R.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)];aa.prototype.getConstraints=
function(a,c,e){a=[];var b=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth)))),d=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize)))),b=(e-b)/2;a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c-d),b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c-d,0));a.push(new mxConnectionConstraint(new mxPoint(1,
-.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c-d,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c-d),e-b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,e-b));return a};ja.prototype.getConstraints=function(a,c,e){a=[];var b=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",ba.prototype.arrowWidth)))),d=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",ba.prototype.arrowSize)))),b=(e-b)/2;a.push(new mxConnectionConstraint(new mxPoint(0,
-.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*c,b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c-d,0));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c-d,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*c,e-b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,e));return a};xa.prototype.getConstraints=
-function(a,c,e){a=[];var b=Math.min(e,c),d=Math.max(0,Math.min(b,b*parseFloat(mxUtils.getValue(this.style,"size",this.size)))),b=(e-d)/2,g=b+d,f=(c-d)/2,d=f+d;a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,f,.5*b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,f,0));a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,.5*b));a.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,d,b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,f,e-.5*b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,f,e));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,e-.5*b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,g));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c+d),b));a.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,c,b));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,g));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c+d),g));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,f,g));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*f,b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,b));a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,0,g));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*f,g));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,f,b));return a};Q.prototype.constraints=null;qa.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)];va.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.175,.25),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.175,.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7,.9),!1)];ea.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];la.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,
+.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c-d,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c-d),e-b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,e-b));return a};ja.prototype.getConstraints=function(a,c,e){a=[];var b=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",aa.prototype.arrowWidth)))),d=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",aa.prototype.arrowSize)))),b=(e-b)/2;a.push(new mxConnectionConstraint(new mxPoint(0,
+.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*c,b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c-d,0));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c-d,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*c,e-b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,e));return a};wa.prototype.getConstraints=
+function(a,c,e){a=[];var b=Math.min(e,c),d=Math.max(0,Math.min(b,b*parseFloat(mxUtils.getValue(this.style,"size",this.size)))),b=(e-d)/2,k=b+d,f=(c-d)/2,d=f+d;a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,f,.5*b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,f,0));a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,.5*b));a.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,d,b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,f,e-.5*b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,f,e));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,e-.5*b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,k));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c+d),b));a.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,c,b));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,k));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c+d),k));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,f,k));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*f,b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,b));a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,0,k));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*f,k));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,f,b));return a};Q.prototype.constraints=null;qa.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)];ya.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)];da.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];la.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,
.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)]})();function Actions(a){this.editorUi=a;this.actions={};this.init()}
-Actions.prototype.init=function(){function a(a){f.escape();a=f.deleteCells(f.getDeletableCells(f.getSelectionCells()),a);null!=a&&f.setSelectionCells(a)}function b(){if(!f.isSelectionEmpty()){f.getModel().beginUpdate();try{for(var a=f.getSelectionCells(),c=0;c<a.length;c++)f.cellLabelChanged(a[c],"")}finally{f.getModel().endUpdate()}}}var d=this.editorUi,k=d.editor,f=k.graph,m=function(){return Action.prototype.isEnabled.apply(this,arguments)&&f.isEnabled()};this.addAction("new...",function(){f.openLink(d.getUrl())});
+Actions.prototype.init=function(){function a(a){f.escape();a=f.deleteCells(f.getDeletableCells(f.getSelectionCells()),a);null!=a&&f.setSelectionCells(a)}function b(){if(!f.isSelectionEmpty()){f.getModel().beginUpdate();try{for(var a=f.getSelectionCells(),c=0;c<a.length;c++)f.cellLabelChanged(a[c],"")}finally{f.getModel().endUpdate()}}}var d=this.editorUi,g=d.editor,f=g.graph,m=function(){return Action.prototype.isEnabled.apply(this,arguments)&&f.isEnabled()};this.addAction("new...",function(){f.openLink(d.getUrl())});
this.addAction("open...",function(){window.openNew=!0;window.openKey="open";d.openFile()});this.addAction("smartFit",function(){f.popupMenuHandler.hideMenu();var a=f.view.scale,c=f.view.translate.x,b=f.view.translate.y;d.actions.get("resetView").funct();1E-5>Math.abs(a-f.view.scale)&&c==f.view.translate.x&&b==f.view.translate.y&&d.actions.get(f.pageVisible?"fitPage":"fitWindow").funct()});this.addAction("keyPressEnter",function(){f.isEnabled()&&(f.isSelectionEmpty()?d.actions.get("smartFit").funct():
-f.startEditingAtCell())});this.addAction("import...",function(){window.openNew=!1;window.openKey="import";window.openFile=new OpenFile(mxUtils.bind(this,function(){d.hideDialog()}));window.openFile.setConsumer(mxUtils.bind(this,function(a,c){try{var e=mxUtils.parseXml(a);k.graph.setSelectionCells(k.graph.importGraphModel(e.documentElement))}catch(l){mxUtils.alert(mxResources.get("invalidOrMissingFile")+": "+l.message)}}));d.showDialog((new OpenDialog(this)).container,320,220,!0,!0,function(){window.openFile=
+f.startEditingAtCell())});this.addAction("import...",function(){window.openNew=!1;window.openKey="import";window.openFile=new OpenFile(mxUtils.bind(this,function(){d.hideDialog()}));window.openFile.setConsumer(mxUtils.bind(this,function(a,c){try{var e=mxUtils.parseXml(a);g.graph.setSelectionCells(g.graph.importGraphModel(e.documentElement))}catch(l){mxUtils.alert(mxResources.get("invalidOrMissingFile")+": "+l.message)}}));d.showDialog((new OpenDialog(this)).container,320,220,!0,!0,function(){window.openFile=
null})}).isEnabled=m;this.addAction("save",function(){d.saveFile(!1)},null,null,Editor.ctrlKey+"+S").isEnabled=m;this.addAction("saveAs...",function(){d.saveFile(!0)},null,null,Editor.ctrlKey+"+Shift+S").isEnabled=m;this.addAction("export...",function(){d.showDialog((new ExportDialog(d)).container,300,304,!0,!0)});this.addAction("editDiagram...",function(){var a=new EditDiagramDialog(d);d.showDialog(a.container,620,420,!0,!1);a.init()});this.addAction("pageSetup...",function(){d.showDialog((new PageSetupDialog(d)).container,
320,240,!0,!0)}).isEnabled=m;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(f,null,10,10)});this.addAction("undo",function(){d.undo()},null,"sprite-undo",Editor.ctrlKey+"+Z");this.addAction("redo",function(){d.redo()},null,"sprite-redo",mxClient.IS_WIN?Editor.ctrlKey+"+Y":Editor.ctrlKey+"+Shift+Z");this.addAction("cut",function(){var a=null;try{a=d.copyXml(),
-null!=a&&f.removeCells(a,!1)}catch(g){}null==a&&mxClipboard.cut(f)},null,"sprite-cut",Editor.ctrlKey+"+X");this.addAction("copy",function(){try{d.copyXml()}catch(e){}try{mxClipboard.copy(f)}catch(e){d.handleError(e)}},null,"sprite-copy",Editor.ctrlKey+"+C");this.addAction("paste",function(){if(f.isEnabled()&&!f.isCellLocked(f.getDefaultParent())){var a=!1;try{Editor.enableNativeCipboard&&(d.readGraphModelFromClipboard(function(a){if(null!=a){f.getModel().beginUpdate();try{d.pasteXml(a,!0)}finally{f.getModel().endUpdate()}}else mxClipboard.paste(f)}),
-a=!0)}catch(g){}a||mxClipboard.paste(f)}},!1,"sprite-paste",Editor.ctrlKey+"+V");this.addAction("pasteHere",function(a){function c(a){if(null!=a){for(var c=!0,e=0;e<a.length&&c;e++)c=c&&f.model.isEdge(a[e]);var b=f.view.translate,e=f.view.scale,d=b.x,g=b.y,b=null;if(1==a.length&&c){var l=f.getCellGeometry(a[0]);null!=l&&(b=l.getTerminalPoint(!0))}b=null!=b?b:f.getBoundingBoxFromGeometry(a,c);null!=b&&(c=Math.round(f.snap(f.popupMenuHandler.triggerX/e-d)),e=Math.round(f.snap(f.popupMenuHandler.triggerY/
-e-g)),f.cellsMoved(a,c-b.x,e-b.y))}}function e(){f.getModel().beginUpdate();try{c(mxClipboard.paste(f))}finally{f.getModel().endUpdate()}}if(f.isEnabled()&&!f.isCellLocked(f.getDefaultParent())){a=!1;try{Editor.enableNativeCipboard&&(d.readGraphModelFromClipboard(function(a){if(null!=a){f.getModel().beginUpdate();try{c(d.pasteXml(a,!0))}finally{f.getModel().endUpdate()}}else e()}),a=!0)}catch(l){}a||e()}});this.addAction("copySize",function(){var a=f.getSelectionCell();f.isEnabled()&&null!=a&&f.getModel().isVertex(a)&&
+null!=a&&f.removeCells(a,!1)}catch(k){}null==a&&mxClipboard.cut(f)},null,"sprite-cut",Editor.ctrlKey+"+X");this.addAction("copy",function(){try{d.copyXml()}catch(e){}try{mxClipboard.copy(f)}catch(e){d.handleError(e)}},null,"sprite-copy",Editor.ctrlKey+"+C");this.addAction("paste",function(){if(f.isEnabled()&&!f.isCellLocked(f.getDefaultParent())){var a=!1;try{Editor.enableNativeCipboard&&(d.readGraphModelFromClipboard(function(a){if(null!=a){f.getModel().beginUpdate();try{d.pasteXml(a,!0)}finally{f.getModel().endUpdate()}}else mxClipboard.paste(f)}),
+a=!0)}catch(k){}a||mxClipboard.paste(f)}},!1,"sprite-paste",Editor.ctrlKey+"+V");this.addAction("pasteHere",function(a){function c(a){if(null!=a){for(var c=!0,e=0;e<a.length&&c;e++)c=c&&f.model.isEdge(a[e]);var b=f.view.translate,e=f.view.scale,d=b.x,k=b.y,b=null;if(1==a.length&&c){var g=f.getCellGeometry(a[0]);null!=g&&(b=g.getTerminalPoint(!0))}b=null!=b?b:f.getBoundingBoxFromGeometry(a,c);null!=b&&(c=Math.round(f.snap(f.popupMenuHandler.triggerX/e-d)),e=Math.round(f.snap(f.popupMenuHandler.triggerY/
+e-k)),f.cellsMoved(a,c-b.x,e-b.y))}}function e(){f.getModel().beginUpdate();try{c(mxClipboard.paste(f))}finally{f.getModel().endUpdate()}}if(f.isEnabled()&&!f.isCellLocked(f.getDefaultParent())){a=!1;try{Editor.enableNativeCipboard&&(d.readGraphModelFromClipboard(function(a){if(null!=a){f.getModel().beginUpdate();try{c(d.pasteXml(a,!0))}finally{f.getModel().endUpdate()}}else e()}),a=!0)}catch(l){}a||e()}});this.addAction("copySize",function(){var a=f.getSelectionCell();f.isEnabled()&&null!=a&&f.getModel().isVertex(a)&&
(a=f.getCellGeometry(a),null!=a&&(d.copiedSize=new mxRectangle(a.x,a.y,a.width,a.height)))},null,null,"Alt+Shift+X");this.addAction("pasteSize",function(){if(f.isEnabled()&&!f.isSelectionEmpty()&&null!=d.copiedSize){f.getModel().beginUpdate();try{for(var a=f.getResizableCells(f.getSelectionCells()),c=0;c<a.length;c++)if(f.getModel().isVertex(a[c])){var b=f.getCellGeometry(a[c]);null!=b&&(b=b.clone(),b.width=d.copiedSize.width,b.height=d.copiedSize.height,f.getModel().setGeometry(a[c],b))}}finally{f.getModel().endUpdate()}}},
null,null,"Alt+Shift+V");this.addAction("copyData",function(){var a=f.getSelectionCell()||f.getModel().getRoot();f.isEnabled()&&null!=a&&(a=a.cloneValue(),null==a||isNaN(a.nodeType)||(d.copiedValue=a))},null,null,"Alt+Shift+B");this.addAction("pasteData",function(a,c){function b(c,b){var d=e.getValue(c);b=c.cloneValue(b);b.removeAttribute("placeholders");null==d||isNaN(d.nodeType)||b.setAttribute("placeholders",d.getAttribute("placeholders"));null!=a&&mxEvent.isShiftDown(a)||b.setAttribute("label",
-f.convertValueToString(c));e.setValue(c,b)}a=null!=c?c:a;var e=f.getModel();if(f.isEnabled()&&!f.isSelectionEmpty()&&null!=d.copiedValue){e.beginUpdate();try{var g=f.getEditableCells(f.getSelectionCells());if(0==g.length)b(e.getRoot(),d.copiedValue);else for(var k=0;k<g.length;k++)b(g[k],d.copiedValue)}finally{e.endUpdate()}}},null,null,"Alt+Shift+E");this.addAction("delete",function(c,d){c=null!=d?d:c;null!=c&&mxEvent.isShiftDown(c)?b():a(null!=c&&(mxEvent.isControlDown(c)||mxEvent.isMetaDown(c)||
+f.convertValueToString(c));e.setValue(c,b)}a=null!=c?c:a;var e=f.getModel();if(f.isEnabled()&&!f.isSelectionEmpty()&&null!=d.copiedValue){e.beginUpdate();try{var k=f.getEditableCells(f.getSelectionCells());if(0==k.length)b(e.getRoot(),d.copiedValue);else for(var g=0;g<k.length;g++)b(k[g],d.copiedValue)}finally{e.endUpdate()}}},null,null,"Alt+Shift+E");this.addAction("delete",function(c,d){c=null!=d?d:c;null!=c&&mxEvent.isShiftDown(c)?b():a(null!=c&&(mxEvent.isControlDown(c)||mxEvent.isMetaDown(c)||
mxEvent.isAltDown(c)))},null,null,"Delete");this.addAction("deleteAll",function(){a(!0)});this.addAction("deleteLabels",function(){b()},null,null,Editor.ctrlKey+"+Delete");this.addAction("duplicate",function(){try{f.setSelectionCells(f.duplicateCells()),f.scrollCellToVisible(f.getSelectionCell())}catch(e){d.handleError(e)}},null,null,Editor.ctrlKey+"+D");this.put("turn",new Action(mxResources.get("turn")+" / "+mxResources.get("reverse"),function(a,c){a=null!=c?c:a;f.turnShapes(f.getResizableCells(f.getSelectionCells()),
null!=a?mxEvent.isShiftDown(a):!1)},null,null,Editor.ctrlKey+"+R"));this.put("selectConnections",new Action(mxResources.get("selectEdges"),function(a){a=f.getSelectionCell();f.isEnabled()&&null!=a&&f.addSelectionCells(f.getEdges(a))}));this.addAction("selectVertices",function(){f.selectVertices(null,!0)},null,null,Editor.ctrlKey+"+Shift+I");this.addAction("selectEdges",function(){f.selectEdges()},null,null,Editor.ctrlKey+"+Shift+E");this.addAction("selectAll",function(){f.selectAll(null,!0)},null,
null,Editor.ctrlKey+"+A");this.addAction("selectNone",function(){f.clearSelection()},null,null,Editor.ctrlKey+"+Shift+A");this.addAction("lockUnlock",function(){if(!f.isSelectionEmpty()){f.getModel().beginUpdate();try{var a=f.getSelectionCells(),c=f.getCurrentCellStyle(f.getSelectionCell()),b=1==mxUtils.getValue(c,mxConstants.STYLE_EDITABLE,1)?0:1;f.setCellStyles(mxConstants.STYLE_MOVABLE,b,a);f.setCellStyles(mxConstants.STYLE_RESIZABLE,b,a);f.setCellStyles(mxConstants.STYLE_ROTATABLE,b,a);f.setCellStyles(mxConstants.STYLE_DELETABLE,
@@ -2938,11 +2939,11 @@ null,Editor.ctrlKey+"+M");this.addAction("editTooltip...",function(){var a=f.get
c)});d.showDialog(c.container,320,200,!0,!0);c.init()}},null,null,"Alt+Shift+T");this.addAction("openLink",function(){var a=f.getLinkForCell(f.getSelectionCell());null!=a&&f.openLink(a)});this.addAction("editLink...",function(){var a=f.getSelectionCell();if(f.isEnabled()&&null!=a&&f.isCellEditable(a)){var c=f.getLinkForCell(a)||"";d.showLinkDialog(c,mxResources.get("apply"),function(c,b,e){c=mxUtils.trim(c);f.setLinkForCell(a,0<c.length?c:null);f.setAttributeForCell(a,"linkTarget",e)},!0,f.getLinkTargetForCell(a))}},
null,null,"Alt+Shift+L");this.put("insertImage",new Action(mxResources.get("image")+"...",function(){f.isEnabled()&&!f.isCellLocked(f.getDefaultParent())&&(f.clearSelection(),d.actions.get("image").funct())})).isEnabled=m;this.put("insertLink",new Action(mxResources.get("link")+"...",function(){f.isEnabled()&&!f.isCellLocked(f.getDefaultParent())&&d.showLinkDialog("",mxResources.get("insert"),function(a,c,b){a=mxUtils.trim(a);if(0<a.length){var e=null,d=f.getLinkTitle(a);null!=c&&0<c.length&&(e=c[0].iconUrl,
d=c[0].name||c[0].type,d=d.charAt(0).toUpperCase()+d.substring(1),30<d.length&&(d=d.substring(0,30)+"..."));c=new mxCell(d,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;"));c.vertex=!0;e=f.getCenterInsertPoint(f.getBoundingBoxFromGeometry([c],!0));c.geometry.x=e.x;c.geometry.y=e.y;f.setAttributeForCell(c,"linkTarget",b);f.setLinkForCell(c,a);f.cellSizeUpdated(c,
-!0);f.getModel().beginUpdate();try{c=f.addCell(c),f.fireEvent(new mxEventObject("cellsInserted","cells",[c]))}finally{f.getModel().endUpdate()}f.setSelectionCell(c);f.scrollCellToVisible(f.getSelectionCell())}},!0)})).isEnabled=m;this.addAction("link...",mxUtils.bind(this,function(){if(f.isEnabled())if(f.cellEditor.isContentEditing()){var a=f.getSelectedElement(),c=f.getParentByName(a,"A",f.cellEditor.textarea),b="";if(null==c&&null!=a&&null!=a.getElementsByTagName)for(var l=a.getElementsByTagName("a"),
-k=0;k<l.length&&null==c;k++)l[k].textContent==a.textContent&&(c=l[k]);null!=c&&"A"==c.nodeName&&(b=c.getAttribute("href")||"",f.selectNode(c));var u=f.cellEditor.saveSelection();d.showLinkDialog(b,mxResources.get("apply"),mxUtils.bind(this,function(a){f.cellEditor.restoreSelection(u);null!=a&&f.insertLink(a)}))}else f.isSelectionEmpty()?this.get("insertLink").funct():this.get("editLink").funct()})).isEnabled=m;this.addAction("autosize",function(){var a=f.getSelectionCells();if(null!=a){f.getModel().beginUpdate();
-try{for(var c=0;c<a.length;c++){var b=a[c];0<f.getModel().getChildCount(b)?f.updateGroupBounds([b],20):f.updateCellSize(b)}}finally{f.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+Shift+Y");this.addAction("formattedText",function(){f.stopEditing();var a=f.getCommonStyle(f.getSelectionCells()),a="1"==mxUtils.getValue(a,"html","0")?null:"1";f.getModel().beginUpdate();try{for(var c=f.getEditableCells(f.getSelectionCells()),b=0;b<c.length;b++)if(state=f.getView().getState(c[b]),null!=state){var l=
-mxUtils.getValue(state.style,"html","0");if("1"==l&&null==a){var k=f.convertValueToString(state.cell);"0"!=mxUtils.getValue(state.style,"nl2Br","1")&&(k=k.replace(/\n/g,"").replace(/<br\s*.?>/g,"\n"));var u=document.createElement("div");u.innerHTML=f.sanitizeHtml(k);k=mxUtils.extractTextWithWhitespace(u.childNodes);f.cellLabelChanged(state.cell,k);f.setCellStyles("html",a,[c[b]])}else"0"==l&&"1"==a&&(k=mxUtils.htmlEntities(f.convertValueToString(state.cell),!1),"0"!=mxUtils.getValue(state.style,"nl2Br",
-"1")&&(k=k.replace(/\n/g,"<br/>")),f.cellLabelChanged(state.cell,f.sanitizeHtml(k)),f.setCellStyles("html",a,[c[b]]))}d.fireEvent(new mxEventObject("styleChanged","keys",["html"],"values",[null!=a?a:"0"],"cells",c))}finally{f.getModel().endUpdate()}});this.addAction("wordWrap",function(){var a=f.getView().getState(f.getSelectionCell()),c="wrap";f.stopEditing();null!=a&&"wrap"==a.style[mxConstants.STYLE_WHITE_SPACE]&&(c=null);f.setCellStyles(mxConstants.STYLE_WHITE_SPACE,c)});this.addAction("rotation",
+!0);f.getModel().beginUpdate();try{c=f.addCell(c),f.fireEvent(new mxEventObject("cellsInserted","cells",[c]))}finally{f.getModel().endUpdate()}f.setSelectionCell(c);f.scrollCellToVisible(f.getSelectionCell())}},!0)})).isEnabled=m;this.addAction("link...",mxUtils.bind(this,function(){if(f.isEnabled())if(f.cellEditor.isContentEditing()){var a=f.getSelectedElement(),c=f.getParentByName(a,"A",f.cellEditor.textarea),b="";if(null==c&&null!=a&&null!=a.getElementsByTagName)for(var g=a.getElementsByTagName("a"),
+q=0;q<g.length&&null==c;q++)g[q].textContent==a.textContent&&(c=g[q]);null!=c&&"A"==c.nodeName&&(b=c.getAttribute("href")||"",f.selectNode(c));var u=f.cellEditor.saveSelection();d.showLinkDialog(b,mxResources.get("apply"),mxUtils.bind(this,function(a){f.cellEditor.restoreSelection(u);null!=a&&f.insertLink(a)}))}else f.isSelectionEmpty()?this.get("insertLink").funct():this.get("editLink").funct()})).isEnabled=m;this.addAction("autosize",function(){var a=f.getSelectionCells();if(null!=a){f.getModel().beginUpdate();
+try{for(var c=0;c<a.length;c++){var b=a[c];0<f.getModel().getChildCount(b)?f.updateGroupBounds([b],20):f.updateCellSize(b)}}finally{f.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+Shift+Y");this.addAction("formattedText",function(){f.stopEditing();var a=f.getCommonStyle(f.getSelectionCells()),a="1"==mxUtils.getValue(a,"html","0")?null:"1";f.getModel().beginUpdate();try{for(var c=f.getEditableCells(f.getSelectionCells()),b=0;b<c.length;b++)if(state=f.getView().getState(c[b]),null!=state){var g=
+mxUtils.getValue(state.style,"html","0");if("1"==g&&null==a){var q=f.convertValueToString(state.cell);"0"!=mxUtils.getValue(state.style,"nl2Br","1")&&(q=q.replace(/\n/g,"").replace(/<br\s*.?>/g,"\n"));var u=document.createElement("div");u.innerHTML=f.sanitizeHtml(q);q=mxUtils.extractTextWithWhitespace(u.childNodes);f.cellLabelChanged(state.cell,q);f.setCellStyles("html",a,[c[b]])}else"0"==g&&"1"==a&&(q=mxUtils.htmlEntities(f.convertValueToString(state.cell),!1),"0"!=mxUtils.getValue(state.style,"nl2Br",
+"1")&&(q=q.replace(/\n/g,"<br/>")),f.cellLabelChanged(state.cell,f.sanitizeHtml(q)),f.setCellStyles("html",a,[c[b]]))}d.fireEvent(new mxEventObject("styleChanged","keys",["html"],"values",[null!=a?a:"0"],"cells",c))}finally{f.getModel().endUpdate()}});this.addAction("wordWrap",function(){var a=f.getView().getState(f.getSelectionCell()),c="wrap";f.stopEditing();null!=a&&"wrap"==a.style[mxConstants.STYLE_WHITE_SPACE]&&(c=null);f.setCellStyles(mxConstants.STYLE_WHITE_SPACE,c)});this.addAction("rotation",
function(){var a="0",c=f.getView().getState(f.getSelectionCell());null!=c&&(a=c.style[mxConstants.STYLE_ROTATION]||a);a=new FilenameDialog(d,a,mxResources.get("apply"),function(a){null!=a&&0<a.length&&f.setCellStyles(mxConstants.STYLE_ROTATION,a)},mxResources.get("enterValue")+" ("+mxResources.get("rotation")+" 0-360)");d.showDialog(a.container,375,80,!0,!0);a.init()});this.addAction("resetView",function(){f.zoomTo(1);d.resetScrollbars()},null,null,"Enter/Home");this.addAction("zoomIn",function(a){f.isFastZoomEnabled()?
f.lazyZoom(!0,!0,d.buttonZoomDelay):f.zoomIn()},null,null,Editor.ctrlKey+" + (Numpad) / Alt+Mousewheel");this.addAction("zoomOut",function(a){f.isFastZoomEnabled()?f.lazyZoom(!1,!0,d.buttonZoomDelay):f.zoomOut()},null,null,Editor.ctrlKey+" - (Numpad) / Alt+Mousewheel");this.addAction("fitWindow",function(){var a=f.isSelectionEmpty()?f.getGraphBounds():f.getBoundingBox(f.getSelectionCells()),c=f.view.translate,b=f.view.scale;a.x=a.x/b-c.x;a.y=a.y/b-c.y;a.width/=b;a.height/=b;null!=f.backgroundImage&&
a.add(new mxRectangle(0,0,f.backgroundImage.width,f.backgroundImage.height));0==a.width||0==a.height?(f.zoomTo(1),d.resetScrollbars()):(c=Editor.fitWindowBorders,null!=c&&(a.x-=c.x,a.y-=c.y,a.width+=c.width+c.x,a.height+=c.height+c.y),f.fitWindow(a))},null,null,Editor.ctrlKey+"+Shift+H");this.addAction("fitPage",mxUtils.bind(this,function(){f.pageVisible||this.get("pageView").funct();var a=f.pageFormat,c=f.pageScale;f.zoomTo(Math.floor(20*Math.min((f.container.clientWidth-10)/a.width/c,(f.container.clientHeight-
@@ -2966,42 +2967,42 @@ f.getSelectionCells()))}finally{f.getModel().endUpdate()}});this.addAction("shar
b);f.setCellStyles(mxConstants.STYLE_CURVED,null);d.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",[b,"0"],"cells",f.getSelectionCells()))}finally{f.getModel().endUpdate()}}});this.addAction("curved",function(){f.getModel().beginUpdate();try{f.setCellStyles(mxConstants.STYLE_ROUNDED,"0"),f.setCellStyles(mxConstants.STYLE_CURVED,"1"),d.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],
"values",["0","1"],"cells",f.getSelectionCells()))}finally{f.getModel().endUpdate()}});this.addAction("collapsible",function(){var a=f.view.getState(f.getSelectionCell()),c="1";null!=a&&null!=f.getFoldingImage(a)&&(c="0");f.setCellStyles("collapsible",c);d.fireEvent(new mxEventObject("styleChanged","keys",["collapsible"],"values",[c],"cells",f.getSelectionCells()))});this.addAction("editStyle...",mxUtils.bind(this,function(){var a=f.getEditableCells(f.getSelectionCells());if(null!=a&&0<a.length){var c=
f.getModel(),c=new TextareaDialog(this.editorUi,mxResources.get("editStyle")+":",c.getStyle(a[0])||"",function(c){null!=c&&f.setCellStyle(mxUtils.trim(c),a)},null,null,400,220);this.editorUi.showDialog(c.container,420,300,!0,!0);c.init()}}),null,null,Editor.ctrlKey+"+E");this.addAction("setAsDefaultStyle",function(){f.isEnabled()&&!f.isSelectionEmpty()&&d.setDefaultStyle(f.getSelectionCell())},null,null,Editor.ctrlKey+"+Shift+D");this.addAction("clearDefaultStyle",function(){f.isEnabled()&&d.clearDefaultStyle()},
-null,null,Editor.ctrlKey+"+Shift+R");this.addAction("addWaypoint",function(){var a=f.getSelectionCell();if(null!=a&&f.getModel().isEdge(a)){var c=k.graph.selectionCellsHandler.getHandler(a);if(c instanceof mxEdgeHandler){for(var b=f.view.translate,d=f.view.scale,q=b.x,b=b.y,a=f.getModel().getParent(a),u=f.getCellGeometry(a);f.getModel().isVertex(a)&&null!=u;)q+=u.x,b+=u.y,a=f.getModel().getParent(a),u=f.getCellGeometry(a);q=Math.round(f.snap(f.popupMenuHandler.triggerX/d-q));d=Math.round(f.snap(f.popupMenuHandler.triggerY/
-d-b));c.addPointAt(c.state,q,d)}}});this.addAction("removeWaypoint",function(){var a=d.actions.get("removeWaypoint");null!=a.handler&&a.handler.removePoint(a.handler.state,a.index)});this.addAction("clearWaypoints",function(a,c){a=null!=c?c:a;var b=f.getSelectionCells();if(null!=b){b=f.getEditableCells(f.addAllEdges(b));f.getModel().beginUpdate();try{for(var e=0;e<b.length;e++){var d=b[e];if(f.getModel().isEdge(d)){var g=f.getCellGeometry(d);mxEvent.isShiftDown(a)?(f.setCellStyles(mxConstants.STYLE_EXIT_X,
-null,[d]),f.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[d]),f.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[d]),f.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[d])):null!=g&&(g=g.clone(),g.points=null,g.x=0,g.y=0,g.offset=null,f.getModel().setGeometry(d,g))}}}finally{f.getModel().endUpdate()}}},null,null,"Alt+Shift+C");p=this.addAction("subscript",mxUtils.bind(this,function(){f.cellEditor.isContentEditing()&&document.execCommand("subscript",!1,null)}),null,null,Editor.ctrlKey+"+,");p=this.addAction("superscript",
-mxUtils.bind(this,function(){f.cellEditor.isContentEditing()&&document.execCommand("superscript",!1,null)}),null,null,Editor.ctrlKey+"+.");this.addAction("image...",function(){if(f.isEnabled()&&!f.isCellLocked(f.getDefaultParent())){var a=mxResources.get("image")+" ("+mxResources.get("url")+"):",c=f.getView().getState(f.getSelectionCell()),b="";null!=c&&(b=c.style[mxConstants.STYLE_IMAGE]||b);var k=f.cellEditor.saveSelection();d.showImageDialog(a,b,function(a,c,b){if(f.cellEditor.isContentEditing())f.cellEditor.restoreSelection(k),
-f.insertImage(a,c,b);else{var e=f.getSelectionCells();if(null!=a&&(0<a.length||0<e.length)){var d=null;f.getModel().beginUpdate();try{if(0==e.length){var e=[f.insertVertex(f.getDefaultParent(),null,"",0,0,c,b,"shape=image;imageAspect=0;aspect=fixed;verticalLabelPosition=bottom;verticalAlign=top;")],g=f.getCenterInsertPoint(f.getBoundingBoxFromGeometry(e,!0));e[0].geometry.x=g.x;e[0].geometry.y=g.y;d=e;f.fireEvent(new mxEventObject("cellsInserted","cells",d))}f.setCellStyles(mxConstants.STYLE_IMAGE,
+null,null,Editor.ctrlKey+"+Shift+R");this.addAction("addWaypoint",function(){var a=f.getSelectionCell();if(null!=a&&f.getModel().isEdge(a)){var c=g.graph.selectionCellsHandler.getHandler(a);if(c instanceof mxEdgeHandler){for(var b=f.view.translate,d=f.view.scale,q=b.x,b=b.y,a=f.getModel().getParent(a),u=f.getCellGeometry(a);f.getModel().isVertex(a)&&null!=u;)q+=u.x,b+=u.y,a=f.getModel().getParent(a),u=f.getCellGeometry(a);q=Math.round(f.snap(f.popupMenuHandler.triggerX/d-q));d=Math.round(f.snap(f.popupMenuHandler.triggerY/
+d-b));c.addPointAt(c.state,q,d)}}});this.addAction("removeWaypoint",function(){var a=d.actions.get("removeWaypoint");null!=a.handler&&a.handler.removePoint(a.handler.state,a.index)});this.addAction("clearWaypoints",function(a,c){a=null!=c?c:a;var b=f.getSelectionCells();if(null!=b){b=f.getEditableCells(f.addAllEdges(b));f.getModel().beginUpdate();try{for(var e=0;e<b.length;e++){var d=b[e];if(f.getModel().isEdge(d)){var k=f.getCellGeometry(d);mxEvent.isShiftDown(a)?(f.setCellStyles(mxConstants.STYLE_EXIT_X,
+null,[d]),f.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[d]),f.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[d]),f.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[d])):null!=k&&(k=k.clone(),k.points=null,k.x=0,k.y=0,k.offset=null,f.getModel().setGeometry(d,k))}}}finally{f.getModel().endUpdate()}}},null,null,"Alt+Shift+C");p=this.addAction("subscript",mxUtils.bind(this,function(){f.cellEditor.isContentEditing()&&document.execCommand("subscript",!1,null)}),null,null,Editor.ctrlKey+"+,");p=this.addAction("superscript",
+mxUtils.bind(this,function(){f.cellEditor.isContentEditing()&&document.execCommand("superscript",!1,null)}),null,null,Editor.ctrlKey+"+.");this.addAction("image...",function(){if(f.isEnabled()&&!f.isCellLocked(f.getDefaultParent())){var a=mxResources.get("image")+" ("+mxResources.get("url")+"):",c=f.getView().getState(f.getSelectionCell()),b="";null!=c&&(b=c.style[mxConstants.STYLE_IMAGE]||b);var g=f.cellEditor.saveSelection();d.showImageDialog(a,b,function(a,c,b){if(f.cellEditor.isContentEditing())f.cellEditor.restoreSelection(g),
+f.insertImage(a,c,b);else{var e=f.getSelectionCells();if(null!=a&&(0<a.length||0<e.length)){var d=null;f.getModel().beginUpdate();try{if(0==e.length){var e=[f.insertVertex(f.getDefaultParent(),null,"",0,0,c,b,"shape=image;imageAspect=0;aspect=fixed;verticalLabelPosition=bottom;verticalAlign=top;")],k=f.getCenterInsertPoint(f.getBoundingBoxFromGeometry(e,!0));e[0].geometry.x=k.x;e[0].geometry.y=k.y;d=e;f.fireEvent(new mxEventObject("cellsInserted","cells",d))}f.setCellStyles(mxConstants.STYLE_IMAGE,
0<a.length?a:null,e);var l=f.getCurrentCellStyle(e[0]);"image"!=l[mxConstants.STYLE_SHAPE]&&"label"!=l[mxConstants.STYLE_SHAPE]?f.setCellStyles(mxConstants.STYLE_SHAPE,"image",e):0==a.length&&f.setCellStyles(mxConstants.STYLE_SHAPE,null,e);if(1==f.getSelectionCount()&&null!=c&&null!=b){var n=e[0],q=f.getModel().getGeometry(n);null!=q&&(q=q.clone(),q.width=c,q.height=b,f.getModel().setGeometry(n,q))}}finally{f.getModel().endUpdate()}null!=d&&(f.setSelectionCells(d),f.scrollCellToVisible(d[0]))}}},
f.cellEditor.isContentEditing(),!f.cellEditor.isContentEditing())}}).isEnabled=m;p=this.addAction("layers",mxUtils.bind(this,function(){null==this.layersWindow?(this.layersWindow=new LayersWindow(d,document.body.offsetWidth-280,120,220,196),this.layersWindow.window.addListener("show",function(){d.fireEvent(new mxEventObject("layers"))}),this.layersWindow.window.addListener("hide",function(){d.fireEvent(new mxEventObject("layers"))}),this.layersWindow.window.setVisible(!0),d.fireEvent(new mxEventObject("layers")),
this.layersWindow.init()):this.layersWindow.window.setVisible(!this.layersWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+Shift+L");p.setToggleAction(!0);p.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.layersWindow&&this.layersWindow.window.isVisible()}));p=this.addAction("formatPanel",mxUtils.bind(this,function(){d.toggleFormatPanel()}),null,null,Editor.ctrlKey+"+Shift+P");p.setToggleAction(!0);p.setSelectedCallback(mxUtils.bind(this,function(){return 0<d.formatWidth}));
p=this.addAction("outline",mxUtils.bind(this,function(){null==this.outlineWindow?(this.outlineWindow=new OutlineWindow(d,document.body.offsetWidth-260,100,180,180),this.outlineWindow.window.addListener("show",function(){d.fireEvent(new mxEventObject("outline"))}),this.outlineWindow.window.addListener("hide",function(){d.fireEvent(new mxEventObject("outline"))}),this.outlineWindow.window.setVisible(!0),d.fireEvent(new mxEventObject("outline"))):this.outlineWindow.window.setVisible(!this.outlineWindow.window.isVisible())}),
-null,null,Editor.ctrlKey+"+Shift+O");p.setToggleAction(!0);p.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.outlineWindow&&this.outlineWindow.window.isVisible()}))};Actions.prototype.addAction=function(a,b,d,k,f){var m;"..."==a.substring(a.length-3)?(a=a.substring(0,a.length-3),m=mxResources.get(a)+"..."):m=mxResources.get(a);return this.put(a,new Action(m,b,d,k,f))};Actions.prototype.put=function(a,b){return this.actions[a]=b};Actions.prototype.get=function(a){return this.actions[a]};
-function Action(a,b,d,k,f){mxEventSource.call(this);this.label=a;this.funct=this.createFunction(b);this.enabled=null!=d?d:!0;this.iconCls=k;this.shortcut=f;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};
+null,null,Editor.ctrlKey+"+Shift+O");p.setToggleAction(!0);p.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.outlineWindow&&this.outlineWindow.window.isVisible()}))};Actions.prototype.addAction=function(a,b,d,g,f){var m;"..."==a.substring(a.length-3)?(a=a.substring(0,a.length-3),m=mxResources.get(a)+"..."):m=mxResources.get(a);return this.put(a,new Action(m,b,d,g,f))};Actions.prototype.put=function(a,b){return this.actions[a]=b};Actions.prototype.get=function(a){return this.actions[a]};
+function Action(a,b,d,g,f){mxEventSource.call(this);this.label=a;this.funct=this.createFunction(b);this.enabled=null!=d?d:!0;this.iconCls=g;this.shortcut=f;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()};DrawioFile=function(a,b){mxEventSource.call(this);this.ui=a;this.shadowData=this.data=b||"";this.shadowPages=null;this.created=(new Date).getTime();this.stats={opened:0,merged:0,fileMerged:0,fileReloaded:0,conflicts:0,timeouts:0,saved:0,closed:0,destroyed:0,joined:0,checksumErrors:0,bytesSent:0,bytesReceived:0,msgSent:0,msgReceived:0,cacheHits:0,cacheMiss:0,cacheFail:0}};DrawioFile.SYNC=urlParams.sync||"auto";DrawioFile.LAST_WRITE_WINS=!0;mxUtils.extend(DrawioFile,mxEventSource);
DrawioFile.prototype.allChangesSavedKey="allChangesSaved";DrawioFile.prototype.savingSpinnerKey="saving";DrawioFile.prototype.savingStatusKey="saving";DrawioFile.prototype.autosaveDelay=1500;DrawioFile.prototype.maxAutosaveDelay=3E4;DrawioFile.prototype.optimisticSyncDelay=300;DrawioFile.prototype.autosaveThread=null;DrawioFile.prototype.lastAutosave=null;DrawioFile.prototype.lastSaved=null;DrawioFile.prototype.lastChanged=null;DrawioFile.prototype.opened=null;DrawioFile.prototype.modified=!1;
DrawioFile.prototype.shadowModified=!1;DrawioFile.prototype.data=null;DrawioFile.prototype.shadowData=null;DrawioFile.prototype.shadowPages=null;DrawioFile.prototype.changeListenerEnabled=!0;DrawioFile.prototype.lastAutosaveRevision=null;DrawioFile.prototype.maxAutosaveRevisionDelay=3E5;DrawioFile.prototype.inConflictState=!1;DrawioFile.prototype.invalidChecksum=!1;DrawioFile.prototype.errorReportsEnabled=!1;DrawioFile.prototype.ageStart=null;
DrawioFile.prototype.getSize=function(){return null!=this.data?this.data.length:0};DrawioFile.prototype.synchronizeFile=function(a,b){this.savingFile?null!=b&&b({message:mxResources.get("busy")}):null!=this.sync?this.sync.fileChanged(a,b):this.updateFile(a,b)};
-DrawioFile.prototype.updateFile=function(a,b,d,k){null!=d&&d()||(this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=b&&b():this.getLatestVersion(mxUtils.bind(this,function(f){try{null!=d&&d()||(this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=b&&b():null!=f?this.mergeFile(f,a,b,k):this.reloadFile(a,b))}catch(m){null!=b&&b(m)}}),b))};
-DrawioFile.prototype.mergeFile=function(a,b,d,k){var f=!0;try{this.stats.fileMerged++;var m=null!=this.shadowPages?this.shadowPages:this.ui.getPagesForNode(mxUtils.parseXml(this.shadowData).documentElement),p=this.ui.getPagesForNode(mxUtils.parseXml(a.data).documentElement);if(null!=p&&0<p.length){this.shadowPages=p;this.backupPatch=this.isModified()?this.ui.diffPages(m,this.ui.pages):null;var c=[this.ui.diffPages(null!=k?k:m,this.shadowPages)];if(!this.ignorePatches(c)){var e=this.ui.patchPages(m,
-c[0]);k={};var g=this.ui.getHashValueForPages(e,k),m={},n=this.ui.getHashValueForPages(this.shadowPages,m);"1"==urlParams.test&&EditorUi.debug("File.mergeFile",[this],"backup",this.backupPatch,"patches",c,"checksum",n==g,g);if(null!=g&&g!=n){var l=this.compressReportData(this.getAnonymizedXmlForPages(p)),q=this.compressReportData(this.getAnonymizedXmlForPages(e)),u=this.ui.hashValue(a.getCurrentEtag()),t=this.ui.hashValue(this.getCurrentEtag());this.checksumError(d,c,"Shadow Details: "+JSON.stringify(k)+
-"\nChecksum: "+g+"\nCurrent: "+n+"\nCurrent Details: "+JSON.stringify(m)+"\nFrom: "+u+"\nTo: "+t+"\n\nFile Data:\n"+l+"\nPatched Shadow:\n"+q,null,"mergeFile");return}this.patch(c,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null)}}else throw f=!1,Error(mxResources.get("notADiagramFile"));this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(a.getDescriptor());this.descriptorChanged();this.backupPatch=null;null!=b&&b()}catch(G){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();
+DrawioFile.prototype.updateFile=function(a,b,d,g){null!=d&&d()||(this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=b&&b():this.getLatestVersion(mxUtils.bind(this,function(f){try{null!=d&&d()||(this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=b&&b():null!=f?this.mergeFile(f,a,b,g):this.reloadFile(a,b))}catch(m){null!=b&&b(m)}}),b))};
+DrawioFile.prototype.mergeFile=function(a,b,d,g){var f=!0;try{this.stats.fileMerged++;var m=null!=this.shadowPages?this.shadowPages:this.ui.getPagesForNode(mxUtils.parseXml(this.shadowData).documentElement),p=this.ui.getPagesForNode(mxUtils.parseXml(a.data).documentElement);if(null!=p&&0<p.length){this.shadowPages=p;this.backupPatch=this.isModified()?this.ui.diffPages(m,this.ui.pages):null;var c=[this.ui.diffPages(null!=g?g:m,this.shadowPages)];if(!this.ignorePatches(c)){var e=this.ui.patchPages(m,
+c[0]);g={};var k=this.ui.getHashValueForPages(e,g),m={},n=this.ui.getHashValueForPages(this.shadowPages,m);"1"==urlParams.test&&EditorUi.debug("File.mergeFile",[this],"backup",this.backupPatch,"patches",c,"checksum",n==k,k);if(null!=k&&k!=n){var l=this.compressReportData(this.getAnonymizedXmlForPages(p)),q=this.compressReportData(this.getAnonymizedXmlForPages(e)),u=this.ui.hashValue(a.getCurrentEtag()),t=this.ui.hashValue(this.getCurrentEtag());this.checksumError(d,c,"Shadow Details: "+JSON.stringify(g)+
+"\nChecksum: "+k+"\nCurrent: "+n+"\nCurrent Details: "+JSON.stringify(m)+"\nFrom: "+u+"\nTo: "+t+"\n\nFile Data:\n"+l+"\nPatched Shadow:\n"+q,null,"mergeFile");return}this.patch(c,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null)}}else throw f=!1,Error(mxResources.get("notADiagramFile"));this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(a.getDescriptor());this.descriptorChanged();this.backupPatch=null;null!=b&&b()}catch(G){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();
null!=d&&d(G);try{if(f)if(this.errorReportsEnabled)this.sendErrorReport("Error in mergeFile",null,G);else{var A=this.getCurrentUser(),x=null!=A?A.id:"unknown";EditorUi.logError("Error in mergeFile",null,this.getMode()+"."+this.getId(),x,G)}}catch(z){}}};
-DrawioFile.prototype.getAnonymizedXmlForPages=function(a){var b=new mxCodec(mxUtils.createXmlDocument()),d=b.document.createElement("mxfile");if(null!=a)for(var k=0;k<a.length;k++){var f=b.encode(new mxGraphModel(a[k].root));"1"!=urlParams.dev&&(f=this.ui.anonymizeNode(f,!0));f.setAttribute("id",a[k].getId());a[k].viewState&&this.ui.editor.graph.saveViewState(a[k].viewState,f,!0);d.appendChild(f)}return mxUtils.getPrettyXml(d)};
+DrawioFile.prototype.getAnonymizedXmlForPages=function(a){var b=new mxCodec(mxUtils.createXmlDocument()),d=b.document.createElement("mxfile");if(null!=a)for(var g=0;g<a.length;g++){var f=b.encode(new mxGraphModel(a[g].root));"1"!=urlParams.dev&&(f=this.ui.anonymizeNode(f,!0));f.setAttribute("id",a[g].getId());a[g].viewState&&this.ui.editor.graph.saveViewState(a[g].viewState,f,!0);d.appendChild(f)}return mxUtils.getPrettyXml(d)};
DrawioFile.prototype.compressReportData=function(a,b,d){b=null!=b?b:1E4;null!=d&&null!=a&&a.length>d?a=a.substring(0,d)+"[...]":null!=a&&a.length>b&&(a=Graph.compress(a)+"\n");return a};
-DrawioFile.prototype.checksumError=function(a,b,d,k,f){this.stats.checksumErrors++;this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=this.sync&&this.sync.updateOnlineState();null!=a&&a();try{if(this.errorReportsEnabled){if(null!=b)for(a=0;a<b.length;a++)this.ui.anonymizePatch(b[a]);var m=mxUtils.bind(this,function(a){var c=this.compressReportData(JSON.stringify(b,null,2));a=null!=a?this.compressReportData(this.getAnonymizedXmlForPages(this.ui.getPagesForNode(mxUtils.parseXml(a.data).documentElement)),
-25E3):"n/a";this.sendErrorReport("Checksum Error in "+f+" "+this.getHash(),(null!=d?d:"")+"\n\nPatches:\n"+c+(null!=a?"\n\nRemote:\n"+a:""),null,7E4)});null==k?m(null):this.getLatestVersion(mxUtils.bind(this,function(a){null!=a&&a.getCurrentEtag()==k?m(a):m(null)}),function(){})}else{var p=this.getCurrentUser(),c=null!=p?p.id:"unknown";EditorUi.logError("Checksum Error in "+f+" "+this.getId(),null,this.getMode()+"."+this.getId(),"user_"+c+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync"));
+DrawioFile.prototype.checksumError=function(a,b,d,g,f){this.stats.checksumErrors++;this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=this.sync&&this.sync.updateOnlineState();null!=a&&a();try{if(this.errorReportsEnabled){if(null!=b)for(a=0;a<b.length;a++)this.ui.anonymizePatch(b[a]);var m=mxUtils.bind(this,function(a){var c=this.compressReportData(JSON.stringify(b,null,2));a=null!=a?this.compressReportData(this.getAnonymizedXmlForPages(this.ui.getPagesForNode(mxUtils.parseXml(a.data).documentElement)),
+25E3):"n/a";this.sendErrorReport("Checksum Error in "+f+" "+this.getHash(),(null!=d?d:"")+"\n\nPatches:\n"+c+(null!=a?"\n\nRemote:\n"+a:""),null,7E4)});null==g?m(null):this.getLatestVersion(mxUtils.bind(this,function(a){null!=a&&a.getCurrentEtag()==g?m(a):m(null)}),function(){})}else{var p=this.getCurrentUser(),c=null!=p?p.id:"unknown";EditorUi.logError("Checksum Error in "+f+" "+this.getId(),null,this.getMode()+"."+this.getId(),"user_"+c+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync"));
try{EditorUi.logEvent({category:"CHECKSUM-ERROR-SYNC-FILE-"+this.getHash(),action:f,label:"user_"+c+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")})}catch(e){}}}catch(e){}};
-DrawioFile.prototype.sendErrorReport=function(a,b,d,k){try{var f=this.compressReportData(this.getAnonymizedXmlForPages(this.shadowPages),25E3),m=this.compressReportData(this.getAnonymizedXmlForPages(this.ui.pages),25E3),p=this.getCurrentUser(),c=null!=p?this.ui.hashValue(p.id):"unknown",e=null!=this.sync?"-client_"+this.sync.clientId:"-nosync",g=this.getTitle(),n=g.lastIndexOf("."),p="xml";0<n&&(p=g.substring(n));var l=null!=d?d.stack:Error().stack;EditorUi.sendReport(a+" "+(new Date).toISOString()+
+DrawioFile.prototype.sendErrorReport=function(a,b,d,g){try{var f=this.compressReportData(this.getAnonymizedXmlForPages(this.shadowPages),25E3),m=this.compressReportData(this.getAnonymizedXmlForPages(this.ui.pages),25E3),p=this.getCurrentUser(),c=null!=p?this.ui.hashValue(p.id):"unknown",e=null!=this.sync?"-client_"+this.sync.clientId:"-nosync",k=this.getTitle(),n=k.lastIndexOf("."),p="xml";0<n&&(p=k.substring(n));var l=null!=d?d.stack:Error().stack;EditorUi.sendReport(a+" "+(new Date).toISOString()+
":\n\nAppVersion="+navigator.appVersion+"\nFile="+this.ui.hashValue(this.getId())+" ("+this.getMode()+")"+(this.isModified()?" modified":"")+"\nSize/Type="+this.getSize()+" ("+p+")\nUser="+c+e+"\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!=b?"\n\n"+b:
-"")+(null!=d?"\n\nError: "+d.message:"")+"\n\nStack:\n"+l+"\n\nShadow:\n"+f+"\n\nData:\n"+m,k)}catch(q){}};
+"")+(null!=d?"\n\nError: "+d.message:"")+"\n\nStack:\n"+l+"\n\nShadow:\n"+f+"\n\nData:\n"+m,g)}catch(q){}};
DrawioFile.prototype.reloadFile=function(a,b){try{this.ui.spinner.stop();var d=mxUtils.bind(this,function(){this.stats.fileReloaded++;var b=this.ui.editor.graph.getViewState(),d=this.ui.editor.graph.getSelectionCells(),m=this.ui.currentPage;this.ui.loadFile(this.getHash(),!0,null,mxUtils.bind(this,function(){if(null==this.ui.fileLoadedError){this.ui.restoreViewState(m,b,d);null!=this.backupPatch&&this.patch([this.backupPatch]);var f=this.ui.getCurrentFile();null!=f&&(f.stats=this.stats);null!=a&&
-a()}}),!0)});this.isModified()&&null==this.backupPatch?this.ui.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){this.handleFileSuccess("manual"==DrawioFile.SYNC)}),d,mxResources.get("cancel"),mxResources.get("discardChanges")):d()}catch(k){null!=b&&b(k)}};DrawioFile.prototype.copyFile=function(a,b){this.ui.editor.editAsNew(this.ui.getFileData(!0),this.ui.getCopyFilename(this))};
+a()}}),!0)});this.isModified()&&null==this.backupPatch?this.ui.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){this.handleFileSuccess("manual"==DrawioFile.SYNC)}),d,mxResources.get("cancel"),mxResources.get("discardChanges")):d()}catch(g){null!=b&&b(g)}};DrawioFile.prototype.copyFile=function(a,b){this.ui.editor.editAsNew(this.ui.getFileData(!0),this.ui.getCopyFilename(this))};
DrawioFile.prototype.ignorePatches=function(a){for(var b=!0,d=0;d<a.length&&b;d++)b=b&&0==Object.keys(a[d]).length;return b};
-DrawioFile.prototype.patch=function(a,b,d){var k=this.ui.editor.undoManager,f=k.history.slice(),m=k.indexOfNextAdd,p=this.ui.editor.graph;p.container.style.visibility="hidden";var c=this.changeListenerEnabled;this.changeListenerEnabled=d;var e=p.foldingEnabled,g=p.mathEnabled,n=p.cellRenderer.redraw;p.cellRenderer.redraw=function(a){a.view.graph.isEditing(a.cell)&&(a.view.graph.scrollCellToVisible(a.cell),a.view.graph.cellEditor.resize());n.apply(this,arguments)};p.model.beginUpdate();try{for(var l=
-0;l<a.length;l++)this.ui.pages=this.ui.patchPages(this.ui.pages,a[l],!0,b,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{p.container.style.visibility="";p.model.endUpdate();p.cellRenderer.redraw=n;this.changeListenerEnabled=c;d||(k.history=f,k.indexOfNextAdd=m,k.fireEvent(new mxEventObject(mxEvent.CLEAR)));if(null==this.ui.currentPage||this.ui.currentPage.needsUpdate)g!=
+DrawioFile.prototype.patch=function(a,b,d){var g=this.ui.editor.undoManager,f=g.history.slice(),m=g.indexOfNextAdd,p=this.ui.editor.graph;p.container.style.visibility="hidden";var c=this.changeListenerEnabled;this.changeListenerEnabled=d;var e=p.foldingEnabled,k=p.mathEnabled,n=p.cellRenderer.redraw;p.cellRenderer.redraw=function(a){a.view.graph.isEditing(a.cell)&&(a.view.graph.scrollCellToVisible(a.cell),a.view.graph.cellEditor.resize());n.apply(this,arguments)};p.model.beginUpdate();try{for(var l=
+0;l<a.length;l++)this.ui.pages=this.ui.patchPages(this.ui.pages,a[l],!0,b,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{p.container.style.visibility="";p.model.endUpdate();p.cellRenderer.redraw=n;this.changeListenerEnabled=c;d||(g.history=f,g.indexOfNextAdd=m,g.fireEvent(new mxEventObject(mxEvent.CLEAR)));if(null==this.ui.currentPage||this.ui.currentPage.needsUpdate)k!=
p.mathEnabled?(this.ui.editor.updateGraphComponents(),p.refresh()):(e!=p.foldingEnabled?p.view.revalidate():p.view.validate(),p.sizeDidChange());this.ui.updateTabContainer();this.ui.editor.fireEvent(new mxEventObject("pagesPatched","patches",a))}};
-DrawioFile.prototype.save=function(a,b,d,k,f,m){try{if(this.isEditable())if(!f&&this.invalidChecksum)if(null!=d)d({message:mxResources.get("checksum")});else throw Error(mxResources.get("checksum"));else this.updateFileData(),this.clearAutosave(),null!=b&&b();else if(null!=d)d({message:mxResources.get("readOnly")});else throw Error(mxResources.get("readOnly"));}catch(p){if(null!=d)d(p);else throw p;}};
-DrawioFile.prototype.updateFileData=function(){this.setData(this.ui.getFileData(null,null,null,null,null,null,null,null,this,!this.isCompressed()))};DrawioFile.prototype.isCompressedStorage=function(){return!0};DrawioFile.prototype.isCompressed=function(){var a=null!=this.ui.fileNode?this.ui.fileNode.getAttribute("compressed"):null;return null!=a?"false"!=a:this.isCompressedStorage()&&Editor.compressXml};DrawioFile.prototype.saveAs=function(a,b,d){};DrawioFile.prototype.saveFile=function(a,b,d,k){};
+DrawioFile.prototype.save=function(a,b,d,g,f,m){try{if(this.isEditable())if(!f&&this.invalidChecksum)if(null!=d)d({message:mxResources.get("checksum")});else throw Error(mxResources.get("checksum"));else this.updateFileData(),this.clearAutosave(),null!=b&&b();else if(null!=d)d({message:mxResources.get("readOnly")});else throw Error(mxResources.get("readOnly"));}catch(p){if(null!=d)d(p);else throw p;}};
+DrawioFile.prototype.updateFileData=function(){this.setData(this.ui.getFileData(null,null,null,null,null,null,null,null,this,!this.isCompressed()))};DrawioFile.prototype.isCompressedStorage=function(){return!0};DrawioFile.prototype.isCompressed=function(){var a=null!=this.ui.fileNode?this.ui.fileNode.getAttribute("compressed"):null;return null!=a?"false"!=a:this.isCompressedStorage()&&Editor.compressXml};DrawioFile.prototype.saveAs=function(a,b,d){};DrawioFile.prototype.saveFile=function(a,b,d,g){};
DrawioFile.prototype.getPublicUrl=function(a){a(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(a){this.shadowModified=a};DrawioFile.prototype.setModified=function(a){this.shadowModified=this.modified=a};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(a,b,d){};DrawioFile.prototype.isMovable=function(){return!1};DrawioFile.prototype.isTrashed=function(){return!1};DrawioFile.prototype.move=function(a,b,d){};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(a){this.data=a};DrawioFile.prototype.getData=function(){return this.data};
@@ -3026,32 +3027,32 @@ DrawioFile.prototype.showRefreshDialog=function(a,b,d){null==d&&(d=mxResources.g
b)}),null,mxResources.get("synchronize"),mxUtils.bind(this,function(){this.reloadFile(a,b)}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.ui.hideDialog()}),360,150))};
DrawioFile.prototype.showCopyDialog=function(a,b,d){this.invalidChecksum=this.inConflictState=!1;this.addUnsavedStatus();this.ui.showError(mxResources.get("externalChanges"),mxResources.get("fileChangedOverwriteDialog"),mxResources.get("makeCopy"),mxUtils.bind(this,function(){this.copyFile(a,b)}),null,mxResources.get("overwrite"),d,mxResources.get("cancel"),mxUtils.bind(this,function(){this.ui.hideDialog()}),360,150)};
DrawioFile.prototype.showConflictDialog=function(a,b){this.ui.showError(mxResources.get("externalChanges"),mxResources.get("fileChangedSyncDialog"),mxResources.get("overwrite"),a,null,mxResources.get("synchronize"),b,mxResources.get("cancel"),mxUtils.bind(this,function(){this.ui.hideDialog();this.handleFileError(null,!1)}),340,150)};
-DrawioFile.prototype.redirectToNewApp=function(a,b){this.ui.spinner.stop();if(!this.redirectDialogShowing){this.redirectDialogShowing=!0;var d=window.location.protocol+"//"+window.location.host+"/"+this.ui.getSearch("create title mode url drive splash state".split(" "))+"#"+this.getHash(),k=mxResources.get("redirectToNewApp");null!=b&&(k+=" ("+b+")");var f=mxUtils.bind(this,function(){var b=mxUtils.bind(this,function(){this.redirectDialogShowing=!1;window.location.href==d?window.location.reload():
-window.location.href=d});null==a&&this.isModified()?this.ui.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){this.redirectDialogShowing=!1}),b,mxResources.get("cancel"),mxResources.get("discardChanges")):b()});null!=a?this.isModified()?this.ui.confirm(k,mxUtils.bind(this,function(){this.redirectDialogShowing=!1;a()}),f,mxResources.get("cancel"),mxResources.get("discardChanges")):this.ui.confirm(k,f,mxUtils.bind(this,function(){this.redirectDialogShowing=!1;a()})):this.ui.alert(mxResources.get("redirectToNewApp"),
+DrawioFile.prototype.redirectToNewApp=function(a,b){this.ui.spinner.stop();if(!this.redirectDialogShowing){this.redirectDialogShowing=!0;var d=window.location.protocol+"//"+window.location.host+"/"+this.ui.getSearch("create title mode url drive splash state".split(" "))+"#"+this.getHash(),g=mxResources.get("redirectToNewApp");null!=b&&(g+=" ("+b+")");var f=mxUtils.bind(this,function(){var b=mxUtils.bind(this,function(){this.redirectDialogShowing=!1;window.location.href==d?window.location.reload():
+window.location.href=d});null==a&&this.isModified()?this.ui.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){this.redirectDialogShowing=!1}),b,mxResources.get("cancel"),mxResources.get("discardChanges")):b()});null!=a?this.isModified()?this.ui.confirm(g,mxUtils.bind(this,function(){this.redirectDialogShowing=!1;a()}),f,mxResources.get("cancel"),mxResources.get("discardChanges")):this.ui.confirm(g,f,mxUtils.bind(this,function(){this.redirectDialogShowing=!1;a()})):this.ui.alert(mxResources.get("redirectToNewApp"),
f)}};DrawioFile.prototype.handleFileSuccess=function(a){this.ui.spinner.stop();this.ui.getCurrentFile()==this&&(this.isModified()?this.fileChanged():a?(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(a,b){this.ui.spinner.stop();if(this.ui.getCurrentFile()==this)if(this.inConflictState)this.handleConflictError(a,b);else if(this.isModified()&&this.addUnsavedStatus(a),b)this.ui.handleError(a,null!=a?mxResources.get("errorSavingFile"):null);else if(!this.isModified()){var d=this.getErrorMessage(a);null!=d&&60<d.length&&(d=d.substring(0,60)+"...");this.ui.editor.setStatus('<div class="geStatusAlert" style="cursor:pointer;overflow:hidden;">'+mxUtils.htmlEntities(mxResources.get("error"))+
(null!=d?" ("+mxUtils.htmlEntities(d)+")":"")+"</div>")}};
-DrawioFile.prototype.handleConflictError=function(a,b){var d=mxUtils.bind(this,function(){this.handleFileSuccess(!0)}),k=mxUtils.bind(this,function(a){this.handleFileError(a,!0)}),f=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get(this.savingSpinnerKey))&&(this.ui.editor.setStatus(""),this.save(!0,d,k,null,!0,this.constructor!=GitHubFile&&this.constructor!=GitLabFile||null==a?null:a.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,d,k,null,null,this.constructor!=GitHubFile&&this.constructor!=GitLabFile||null==a?null:a.commitMessage)}),k)});"none"==DrawioFile.SYNC?this.showCopyDialog(d,k,f):this.invalidChecksum?this.showRefreshDialog(d,k,this.getErrorMessage(a)):b?this.showConflictDialog(f,m):this.addConflictStatus(mxUtils.bind(this,
-function(){this.ui.editor.setStatus(mxUtils.htmlEntities(mxResources.get("updatingDocument")));this.synchronizeFile(d,k)}),this.getErrorMessage(a))};DrawioFile.prototype.getErrorMessage=function(a){var b=null!=a?null!=a.error?a.error.message:a.message:null;null==b&&null!=a&&a.code==App.ERROR_TIMEOUT&&(b=mxResources.get("timeout"));return b};DrawioFile.prototype.isOverdue=function(){return null!=this.ageStart&&Date.now()-this.ageStart.getTime()>=this.ui.warnInterval};
+DrawioFile.prototype.handleConflictError=function(a,b){var d=mxUtils.bind(this,function(){this.handleFileSuccess(!0)}),g=mxUtils.bind(this,function(a){this.handleFileError(a,!0)}),f=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get(this.savingSpinnerKey))&&(this.ui.editor.setStatus(""),this.save(!0,d,g,null,!0,this.constructor!=GitHubFile&&this.constructor!=GitLabFile||null==a?null:a.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,d,g,null,null,this.constructor!=GitHubFile&&this.constructor!=GitLabFile||null==a?null:a.commitMessage)}),g)});"none"==DrawioFile.SYNC?this.showCopyDialog(d,g,f):this.invalidChecksum?this.showRefreshDialog(d,g,this.getErrorMessage(a)):b?this.showConflictDialog(f,m):this.addConflictStatus(mxUtils.bind(this,
+function(){this.ui.editor.setStatus(mxUtils.htmlEntities(mxResources.get("updatingDocument")));this.synchronizeFile(d,g)}),this.getErrorMessage(a))};DrawioFile.prototype.getErrorMessage=function(a){var b=null!=a?null!=a.error?a.error.message:a.message:null;null==b&&null!=a&&a.code==App.ERROR_TIMEOUT&&(b=mxResources.get("timeout"));return b};DrawioFile.prototype.isOverdue=function(){return null!=this.ageStart&&Date.now()-this.ageStart.getTime()>=this.ui.warnInterval};
DrawioFile.prototype.fileChanged=function(){this.lastChanged=new Date;this.setModified(!0);this.isAutosave()?(null!=this.savingStatusKey&&this.addAllSavedStatus(mxUtils.htmlEntities(mxResources.get(this.savingStatusKey))+"..."),this.ui.scheduleSanityCheck(),null==this.ageStart&&(this.ageStart=new Date),this.sendFileChanges(),this.autosave(this.autosaveDelay,this.maxAutosaveDelay,mxUtils.bind(this,function(a){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(a){this.handleFileError(a)}))):(this.ageStart=null,this.isAutosaveOptional()&&this.ui.editor.autosave||this.inConflictState||this.addUnsavedStatus())};DrawioFile.prototype.isOptimisticSync=function(){return!1};
DrawioFile.prototype.createSecret=function(a){var b=Editor.guid(32);null==this.sync||this.isOptimisticSync()?a(b):this.sync.createToken(b,mxUtils.bind(this,function(d){a(b,d)}),mxUtils.bind(this,function(){a(b)}))};DrawioFile.prototype.fileSaving=function(){null!=this.sync&&this.isOptimisticSync()&&this.sync.fileSaving();"1"==urlParams.test&&EditorUi.debug("DrawioFile.fileSaving",[this])};
DrawioFile.prototype.sendFileChanges=function(){try{null!=this.p2pCollab&&null!=this.sync&&(this.updateFileData(),this.sync.sendFileChanges(this.ui.getPagesForNode(mxUtils.parseXml(this.getData()).documentElement),this.desc),"1"==urlParams.test&&EditorUi.debug("DrawioFile.sendFileChanges",[this]))}catch(a){console.log(a)}};
-DrawioFile.prototype.fileSaved=function(a,b,d,k,f){this.lastSaved=new Date;this.ageStart=null;try{this.stats.saved++,this.invalidChecksum=this.inConflictState=!1,null==this.sync||this.isOptimisticSync()?(this.shadowData=a,this.shadowPages=null,null!=this.sync&&(this.sync.lastModified=this.getLastModifiedDate(),this.sync.resetUpdateStatusThread()),null!=d&&d()):this.sync.fileSaved(this.ui.getPagesForNode(mxUtils.parseXml(a).documentElement),b,d,k,f)}catch(c){this.invalidChecksum=this.inConflictState=
-!0;this.descriptorChanged();null!=k&&k(c);try{if(this.errorReportsEnabled)this.sendErrorReport("Error in fileSaved",null,c);else{var m=this.getCurrentUser(),p=null!=m?m.id:"unknown";EditorUi.logError("Error in fileSaved",null,this.getMode()+"."+this.getId(),p,c)}}catch(e){}}"1"==urlParams.test&&EditorUi.debug("DrawioFile.fileSaved",[this])};
-DrawioFile.prototype.autosave=function(a,b,d,k){null==this.lastAutosave&&(this.lastAutosave=Date.now());a=Date.now()-this.lastAutosave<b?a:0;this.clearAutosave();var f=window.setTimeout(mxUtils.bind(this,function(){this.lastAutosave=null;this.autosaveThread==f&&(this.autosaveThread=null);if(this.isModified()&&this.isAutosaveNow()){var a=this.isAutosaveRevision();a&&(this.lastAutosaveRevision=(new Date).getTime());this.save(a,mxUtils.bind(this,function(a){this.autosaveCompleted();null!=d&&d(a)}),mxUtils.bind(this,
-function(a){null!=k&&k(a)}))}else this.isModified()||this.ui.editor.setStatus(""),null!=d&&d(null)}),a);this.autosaveThread=f};DrawioFile.prototype.isAutosaveNow=function(){return!0};DrawioFile.prototype.autosaveCompleted=function(){};DrawioFile.prototype.clearAutosave=function(){null!=this.autosaveThread&&(window.clearTimeout(this.autosaveThread),this.autosaveThread=null)};
+DrawioFile.prototype.fileSaved=function(a,b,d,g,f){this.lastSaved=new Date;this.ageStart=null;try{this.stats.saved++,this.invalidChecksum=this.inConflictState=!1,null==this.sync||this.isOptimisticSync()?(this.shadowData=a,this.shadowPages=null,null!=this.sync&&(this.sync.lastModified=this.getLastModifiedDate(),this.sync.resetUpdateStatusThread()),null!=d&&d()):this.sync.fileSaved(this.ui.getPagesForNode(mxUtils.parseXml(a).documentElement),b,d,g,f)}catch(c){this.invalidChecksum=this.inConflictState=
+!0;this.descriptorChanged();null!=g&&g(c);try{if(this.errorReportsEnabled)this.sendErrorReport("Error in fileSaved",null,c);else{var m=this.getCurrentUser(),p=null!=m?m.id:"unknown";EditorUi.logError("Error in fileSaved",null,this.getMode()+"."+this.getId(),p,c)}}catch(e){}}"1"==urlParams.test&&EditorUi.debug("DrawioFile.fileSaved",[this])};
+DrawioFile.prototype.autosave=function(a,b,d,g){null==this.lastAutosave&&(this.lastAutosave=Date.now());a=Date.now()-this.lastAutosave<b?a:0;this.clearAutosave();var f=window.setTimeout(mxUtils.bind(this,function(){this.lastAutosave=null;this.autosaveThread==f&&(this.autosaveThread=null);if(this.isModified()&&this.isAutosaveNow()){var a=this.isAutosaveRevision();a&&(this.lastAutosaveRevision=(new Date).getTime());this.save(a,mxUtils.bind(this,function(a){this.autosaveCompleted();null!=d&&d(a)}),mxUtils.bind(this,
+function(a){null!=g&&g(a)}))}else this.isModified()||this.ui.editor.setStatus(""),null!=d&&d(null)}),a);this.autosaveThread=f};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 a=(new Date).getTime();return null==this.lastAutosaveRevision||a-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(a){this.updateFileData();this.stats.closed++;this.isAutosave()&&this.isModified()&&this.save(this.isAutosaveRevision(),null,null,a);this.destroy()};DrawioFile.prototype.hasSameExtension=function(a,b){if(null!=a&&null!=b){var d=a.lastIndexOf("."),k=0<d?a.substring(d):"",d=b.lastIndexOf(".");return k===(0<d?b.substring(d):"")}return a==b};
+DrawioFile.prototype.close=function(a){this.updateFileData();this.stats.closed++;this.isAutosave()&&this.isModified()&&this.save(this.isAutosaveRevision(),null,null,a);this.destroy()};DrawioFile.prototype.hasSameExtension=function(a,b){if(null!=a&&null!=b){var d=a.lastIndexOf("."),g=0<d?a.substring(d):"",d=b.lastIndexOf(".");return g===(0<d?b.substring(d):"")}return a==b};
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(a,b){a([])};DrawioFile.prototype.addComment=function(a,b,d){b(Date.now())};DrawioFile.prototype.canReplyToReplies=function(){return!0};DrawioFile.prototype.canComment=function(){return!0};DrawioFile.prototype.newComment=function(a,b){return new DrawioComment(this,null,a,Date.now(),Date.now(),!1,b)};LocalFile=function(a,b,d,k,f,m){DrawioFile.call(this,a,b);this.title=d;this.mode=k?null:App.MODE_DEVICE;this.fileHandle=f;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};
+DrawioFile.prototype.commentsRefreshNeeded=function(){return!0};DrawioFile.prototype.commentsSaveNeeded=function(){return!1};DrawioFile.prototype.getComments=function(a,b){a([])};DrawioFile.prototype.addComment=function(a,b,d){b(Date.now())};DrawioFile.prototype.canReplyToReplies=function(){return!0};DrawioFile.prototype.canComment=function(){return!0};DrawioFile.prototype.newComment=function(a,b){return new DrawioComment(this,null,a,Date.now(),Date.now(),!1,b)};LocalFile=function(a,b,d,g,f,m){DrawioFile.call(this,a,b);this.title=d;this.mode=g?null:App.MODE_DEVICE;this.fileHandle=f;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(a,b,d){this.saveAs(this.title,b,d)};LocalFile.prototype.saveAs=function(a,b,d){this.saveFile(a,!1,b,d)};LocalFile.prototype.saveAs=function(a,b,d){this.saveFile(a,!1,b,d)};LocalFile.prototype.getDescriptor=function(){return this.desc};LocalFile.prototype.setDescriptor=function(a){this.desc=a};
LocalFile.prototype.getLatestVersion=function(a,b){null==this.fileHandle?a(null):this.ui.loadFileSystemEntry(this.fileHandle,a,b)};
-LocalFile.prototype.saveFile=function(a,b,d,k,f){a!=this.title&&(this.desc=this.fileHandle=null);this.title=a;f||this.updateFileData();var m=this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle());this.setShadowModified(!1);var p=this.getData(),c=mxUtils.bind(this,function(){this.setModified(this.getShadowModified());this.contentChanged();null!=d&&d()}),e=mxUtils.bind(this,function(b){if(null!=this.fileHandle){if(!this.savingFile){this.savingFileTime=new Date;this.savingFile=!0;var e=mxUtils.bind(this,
-function(a){this.savingFile=!1;null!=k&&k({error:a})});this.saveDraft();this.fileHandle.createWritable().then(mxUtils.bind(this,function(a){this.fileHandle.getFile().then(mxUtils.bind(this,function(d){this.invalidFileHandle=null;this.desc.lastModified==d.lastModified?a.write(m?this.ui.base64ToBlob(b,"image/png"):b).then(mxUtils.bind(this,function(){a.close().then(mxUtils.bind(this,function(){this.fileHandle.getFile().then(mxUtils.bind(this,function(a){try{var b=this.desc;this.savingFile=!1;this.desc=
+LocalFile.prototype.saveFile=function(a,b,d,g,f){a!=this.title&&(this.desc=this.fileHandle=null);this.title=a;f||this.updateFileData();var m=this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle());this.setShadowModified(!1);var p=this.getData(),c=mxUtils.bind(this,function(){this.setModified(this.getShadowModified());this.contentChanged();null!=d&&d()}),e=mxUtils.bind(this,function(b){if(null!=this.fileHandle){if(!this.savingFile){this.savingFileTime=new Date;this.savingFile=!0;var e=mxUtils.bind(this,
+function(a){this.savingFile=!1;null!=g&&g({error:a})});this.saveDraft();this.fileHandle.createWritable().then(mxUtils.bind(this,function(a){this.fileHandle.getFile().then(mxUtils.bind(this,function(d){this.invalidFileHandle=null;this.desc.lastModified==d.lastModified?a.write(m?this.ui.base64ToBlob(b,"image/png"):b).then(mxUtils.bind(this,function(){a.close().then(mxUtils.bind(this,function(){this.fileHandle.getFile().then(mxUtils.bind(this,function(a){try{var b=this.desc;this.savingFile=!1;this.desc=
a;this.fileSaved(p,b,c,e);this.removeDraft()}catch(x){e(x)}}),e)}),e)}),e):(this.inConflictState=!0,e())}),mxUtils.bind(this,function(a){this.invalidFileHandle=!0;e(a)}))}),e)}}else{if(this.ui.isOfflineApp()||this.ui.isLocalFileSave())this.ui.doSaveLocalFile(b,a,m?"image/png":"text/xml",m);else if(b.length<MAX_REQUEST_SIZE){var d=a.lastIndexOf("."),d=0<d?a.substring(d+1):"xml";(new mxXmlRequest(SAVE_URL,"format="+d+"&xml="+encodeURIComponent(b)+"&filename="+encodeURIComponent(a)+(m?"&binary=1":""))).simulate(document,
-"_blank")}else this.ui.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(b)}));c()}});m?(b=this.ui.getPngFileProperties(this.ui.fileNode),this.ui.getEmbeddedPng(mxUtils.bind(this,function(a){e(a)}),k,this.ui.getCurrentFile()!=this?p:null,b.scale,b.border)):e(p)};LocalFile.prototype.rename=function(a,b,d){this.title=a;this.descriptorChanged();null!=b&&b()};
+"_blank")}else this.ui.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(b)}));c()}});m?(b=this.ui.getPngFileProperties(this.ui.fileNode),this.ui.getEmbeddedPng(mxUtils.bind(this,function(a){e(a)}),g,this.ui.getCurrentFile()!=this?p:null,b.scale,b.border)):e(p)};LocalFile.prototype.rename=function(a,b,d){this.title=a;this.descriptorChanged();null!=b&&b()};
LocalFile.prototype.open=function(){this.ui.setFileData(this.getData());this.installListeners()};(function(){"undefined"!==typeof html4&&(html4.ATTRIBS["span::data-lucid-content"]=0,html4.ATTRIBS["span::data-lucid-type"]=0,html4.ATTRIBS["font::data-font-src"]=0);Editor.prototype.appName="diagrams.net";Editor.prototype.diagramFileTypes=[{description:"diagramXmlDesc",extension:"drawio",mimeType:"text/xml"},{description:"diagramPngDesc",extension:"png",mimeType:"image/png"},{description:"diagramSvgDesc",extension:"svg",mimeType:"image/svg"},{description:"diagramHtmlDesc",extension:"html",mimeType:"text/html"},
{description:"diagramXmlDesc",extension:"xml",mimeType:"text/xml"}];Editor.prototype.libraryFileTypes=[{description:"Library (.drawiolib, .xml)",extensions:["drawiolib","xml"]}];Editor.prototype.fileExtensions=[{ext:"html",title:"filetypeHtml"},{ext:"png",title:"filetypePng"},{ext:"svg",title:"filetypeSvg"}];Editor.styles=[{},{commonStyle:{fontColor:"#5C5C5C",strokeColor:"#006658",fillColor:"#21C0A5"}},{commonStyle:{fontColor:"#095C86",strokeColor:"#AF45ED",fillColor:"#F694C1"},edgeStyle:{strokeColor:"#60E696"}},
{commonStyle:{fontColor:"#46495D",strokeColor:"#788AA3",fillColor:"#B2C9AB"}},{commonStyle:{fontColor:"#5AA9E6",strokeColor:"#FF6392",fillColor:"#FFE45E"}},{commonStyle:{fontColor:"#1D3557",strokeColor:"#457B9D",fillColor:"#A8DADC"},graph:{background:"#F1FAEE"}},{commonStyle:{fontColor:"#393C56",strokeColor:"#E07A5F",fillColor:"#F2CC8F"},graph:{background:"#F4F1DE",gridColor:"#D4D0C0"}},{commonStyle:{fontColor:"#143642",strokeColor:"#0F8B8D",fillColor:"#FAE5C7"},edgeStyle:{strokeColor:"#A8201A"},
@@ -3072,58 +3073,58 @@ Editor.tweetImage=IMAGE_PATH+"/tweet.png";Editor.facebookImage=IMAGE_PATH+"/face
IMAGE_PATH+"/img-hi-res.png";Editor.loResImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAAA+CAMAAACLMWy1AAAAS1BMVEVAQEAAAAA1NTVBQUFDQ0NDQ0NFRUVERERBQUFBQUFBQUFAQEBBQUFBQUFCQkJCQkJCQkJBQUFCQkJDQ0NDQ0NCQkJCQkJCQkJGRkb5/XqTAAAAGXRSTlP+AAWODlASCsesX+Lc2LyWe3pwa1tCPjohjSJfoAAAAI1JREFUWMPt1MkKhTAMRuG0anvneXr/J71nUypKcdqI/N8yhLMKMZE1CahnClDQzMPB44ED3EgeCubgDWnWQMHpwTtKwTe+UHD4sJ94wbUEHHFGhILlYDeSnsQeabeCgsPBgB0MOZZ9oGA5GJFiJSfUULAfjLjARrhCwX7wh2YCDwVbwZkUBKqFFJRN+wOcwSgR2sREcgAAAABJRU5ErkJggg==":
IMAGE_PATH+"/img-lo-res.png";Editor.cameraLargeImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAAlwSFlzAAALEwAACxMBAJqcGAAAAVlpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IlhNUCBDb3JlIDUuNC4wIj4KICAgPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4KICAgICAgPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIKICAgICAgICAgICAgeG1sbnM6dGlmZj0iaHR0cDovL25zLmFkb2JlLmNvbS90aWZmLzEuMC8iPgogICAgICAgICA8dGlmZjpPcmllbnRhdGlvbj4xPC90aWZmOk9yaWVudGF0aW9uPgogICAgICA8L3JkZjpEZXNjcmlwdGlvbj4KICAgPC9yZGY6UkRGPgo8L3g6eG1wbWV0YT4KTMInWQAAA/BJREFUWAnFl0uIjWEYx885buPSuGwmSYwtwsY1ikKSNYNclmQnadgrZSPlsnBLSlaGBdNYKY0Vdi4L4zYzIqxGxmXG//d+7//0+uY7nWMiT/2/53mf+3v7vnNKpf9M5UbrDw8Pj4m+wzmeT1FBUS6Xf+YNox6reMONukijMXUTM3NmI75PyXcJPwRWg5kS7xysDLNmfEUxpx2rceNE50IlYjyRklcLf0prY+x4BTqfmx3ZUHQaO9ISGngYq38V/1EH+ECPa+QaK1u1kVBQirDMChiS3CTeIkwWvghtwhKBpZ8g1CO2B99FynVU/KowSRgQ3mlrBsVZ1awmQlS0SGbfXglfBPbdRGMm5O8RXg2P835pDCvzWjghTHETcLpZLHwS8kTCtBEK1SN83Egam8YxyVZqc+Do5qkwS+gT9grNwkUBG6cbsG/gs3BTuC/0ChCxq4QtwgzBMdwUZBPyN4Ftfi4sYPZHktbOSRlIuutRP5jYj0ueZp88xyYcS/zZoiLyQT1IA/cTj7eSlwnrhI+JnkQbCwo2Sx/2M7VJt17wdhVtgxvrpoFnAuSAbJQ97biZAlKxBfD9wgOhV+BgIR/AZtJ4kwD5PGSj7OmmekjWEy0oAQHAS3+KpBpzXqYK3UItopHpSRMno2N+cm7gDYnfRCcr3QBqriMHLJDkeyhFfiG5aVbK+8rhtP9M6QcIEJHX5Fp9NMAyQlYiu+OOJNlODCIXyka/P23bncTdiC7OydC1+v1Bsb+5r84DK8S3Rdmf5cRUFW3bXtWUSt1Rdk6G4SyJV2o1YId+vNUxr+x5yCJiapFtcxQzLjrxboGcMxvFJwEOKnLwjIbkx/sdSmeSaUY++SwTAxV+4DJT7RVwkbk46gNCsifIItuy0e9PF33Cb4homhN5YRyzL5q5V2VNkv98kqgoGTo3YF9CnMM5Y5rItFfvBSi9JulVXOgI+VwIntkt+SaZ6weQfcovJf7zpTfl86P/wAF7Fz18NeKwmvAWCaX0Z/uMHQr42ZxvR/Rxcw5xM+9J/CJq8w2gduDhmDgso/QrBH47dEXQ1IqczyHpIOfIRtnTtV7SwO1oKXKkU3fbToFGSDHtMWcaH1WBuVYnDbRFi99iqSMySdzxXckrazUh23KBVYGIcfNBkTxca0e4ATJ0KukGYVBgr/MnlhPOtQq/ksUfCbzh+EFCjtnCUoHfjhA/OsiTv2HcEvJMELp0VakZDliTmriTdPivxU4VmEhtPrGV+KJhO7ZKt0doFZh1fgZSBWIW2AGEHwg3BUWOnKtH+suqdw07tYMfglCrWPD5mw9qVYuniaXkT0OtWaSuo5LJTY1RBf+roF9X5+y/5qU+DAAAAABJRU5ErkJggg==";
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.errorImage="data:image/gif;base64,R0lGODlhEAAQAPcAAADGAIQAAISEhP8AAP///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////yH5BAEAAAAALAAAAAAQABAAAAhoAAEIFBigYMGBCAkGGMCQ4cGECxtKHBAAYUQCEzFSHLiQgMeGHjEGEAAg4oCQJz86LCkxpEqHAkwyRClxpEyXGmGaREmTIsmOL1GO/DkzI0yOE2sKIMlRJsWhCQHENDiUaVSpS5cmDAgAOw==";
-Editor.configurationKey=".configuration";Editor.settingsKey=".drawio-config";Editor.defaultCustomLibraries=[];Editor.enableCustomLibraries=!0;Editor.enableCustomProperties=!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.compressXml=!0;Editor.globalVars=null;Editor.shadowOptionEnabled=!mxClient.IS_SF;Editor.config=null;Editor.configVersion=
-null;Editor.defaultBorder=5;Editor.commonProperties=[{name:"comic",dispName:"Comic",type:"bool",defVal:!1,isVisible:function(a,c){return"1"!=mxUtils.getValue(a.style,"sketch","0")}},{name:"jiggle",dispName:"Jiggle",type:"float",min:0,defVal:1,isVisible:function(a,c){return"1"==mxUtils.getValue(a.style,"comic","0")||"1"==mxUtils.getValue(a.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"fillWeight",dispName:"Fill Weight",type:"int",defVal:-1,isVisible:function(a,c){return"1"==mxUtils.getValue(a.style,
-"sketch","1"==urlParams.rough?"1":"0")}},{name:"hachureGap",dispName:"Hachure Gap",type:"int",defVal:-1,isVisible:function(a,c){return"1"==mxUtils.getValue(a.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"hachureAngle",dispName:"Hachure Angle",type:"int",defVal:-41,isVisible:function(a,c){return"1"==mxUtils.getValue(a.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"curveFitting",dispName:"Curve Fitting",type:"float",defVal:.95,isVisible:function(a,c){return"1"==mxUtils.getValue(a.style,
-"sketch","1"==urlParams.rough?"1":"0")}},{name:"simplification",dispName:"Simplification",type:"float",defVal:0,min:0,max:1,isVisible:function(a,c){return"1"==mxUtils.getValue(a.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"disableMultiStroke",dispName:"Disable Multi Stroke",type:"bool",defVal:!1,isVisible:function(a,c){return"1"==mxUtils.getValue(a.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"disableMultiStrokeFill",dispName:"Disable Multi Stroke Fill",type:"bool",defVal:!1,isVisible:function(a,
-c){return"1"==mxUtils.getValue(a.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"dashOffset",dispName:"Dash Offset",type:"int",defVal:-1,isVisible:function(a,c){return"1"==mxUtils.getValue(a.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"dashGap",dispName:"Dash Gap",type:"int",defVal:-1,isVisible:function(a,c){return"1"==mxUtils.getValue(a.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"zigzagOffset",dispName:"ZigZag Offset",type:"int",defVal:-1,isVisible:function(a,c){return"1"==
-mxUtils.getValue(a.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"jiggle",dispName:"Jiggle",type:"float",min:0,defVal:1,isVisible:function(a,c){return"1"==mxUtils.getValue(a.style,"comic","0")||"1"==mxUtils.getValue(a.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"sketchStyle",dispName:"Sketch Style",type:"enum",defVal:"rough",enumList:[{val:"rough",dispName:"Rough"},{val:"comic",dispName:"Comic"}],isVisible:function(a,c){return"1"==mxUtils.getValue(a.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(a){return"orthogonalEdgeStyle"==mxUtils.getValue(a.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=[{type:"separator"},{name:"resizeLastRow",dispName:"Resize Last Row",type:"bool",getDefaultValue:function(a,c){var b=c.editorUi.editor.graph.getCellStyle(1==a.vertices.length&&0==a.edges.length?a.vertices[0]:null);return"1"==mxUtils.getValue(b,"resizeLastRow","0")},isVisible:function(a,c){var b=c.editorUi.editor.graph;return 1==
-a.vertices.length&&0==a.edges.length&&b.isTable(a.vertices[0])}},{name:"resizeLast",dispName:"Resize Last Column",type:"bool",getDefaultValue:function(a,c){var b=c.editorUi.editor.graph.getCellStyle(1==a.vertices.length&&0==a.edges.length?a.vertices[0]:null);return"1"==mxUtils.getValue(b,"resizeLast","0")},isVisible:function(a,c){var b=c.editorUi.editor.graph;return 1==a.vertices.length&&0==a.edges.length&&b.isTable(a.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(a,c){return c.editorUi.editor.graph.isCellConnectable(1==a.vertices.length&&0==a.edges.length?a.vertices[0]:null)},isVisible:function(a,c){return 1==a.vertices.length&&0==a.edges.length}},{name:"allowArrows",dispName:"Allow Arrows",type:"bool",defVal:!0},{name:"snapToPoint",dispName:"Snap to Point",type:"bool",defVal:!1},{name:"perimeter",dispName:"Perimeter",defVal:"none",type:"enum",enumList:[{val:"none",dispName:"None"},{val:"rectanglePerimeter",dispName:"Rectangle"},
-{val:"ellipsePerimeter",dispName:"Ellipse"},{val:"rhombusPerimeter",dispName:"Rhombus"},{val:"trianglePerimeter",dispName:"Triangle"},{val:"hexagonPerimeter2",dispName:"Hexagon"},{val:"lifelinePerimeter",dispName:"Lifeline"},{val:"orthogonalPerimeter",dispName:"Orthogonal"},{val:"backbonePerimeter",dispName:"Backbone"},{val:"calloutPerimeter",dispName:"Callout"},{val:"parallelogramPerimeter",dispName:"Parallelogram"},{val:"trapezoidPerimeter",dispName:"Trapezoid"},{val:"stepPerimeter",dispName:"Step"},
-{val:"centerPerimeter",dispName:"Center"}]},{name:"fixDash",dispName:"Fixed Dash",type:"bool",defVal:!1},{name:"autosize",dispName:"Autosize",type:"bool",defVal:!1},{name:"container",dispName:"Container",type:"bool",defVal:!1,isVisible:function(a,c){return 1==a.vertices.length&&0==a.edges.length}},{name:"dropTarget",dispName:"Drop Target",type:"bool",getDefaultValue:function(a,c){var b=1==a.vertices.length&&0==a.edges.length?a.vertices[0]:null,e=c.editorUi.editor.graph;return null!=b&&(e.isSwimlane(b)||
-0<e.model.getChildCount(b))},isVisible:function(a,c){return 1==a.vertices.length&&0==a.edges.length}},{name:"collapsible",dispName:"Collapsible",type:"bool",getDefaultValue:function(a,c){var b=1==a.vertices.length&&0==a.edges.length?a.vertices[0]:null,e=c.editorUi.editor.graph;return null!=b&&(e.isContainer(b)&&"0"!=a.style.collapsible||!e.isContainer(b)&&"1"==a.style.collapsible)},isVisible:function(a,c){return 1==a.vertices.length&&0==a.edges.length}},{name:"recursiveResize",dispName:"Resize Children",
-type:"bool",defVal:!0,isVisible:function(a,c){return 1==a.vertices.length&&0==a.edges.length&&!c.editorUi.editor.graph.isSwimlane(a.vertices[0])&&null==mxUtils.getValue(a.style,"childLayout",null)}},{name:"expand",dispName:"Expand",type:"bool",defVal:!0},{name:"part",dispName:"Part",type:"bool",defVal:!1,isVisible:function(a,c){var b=c.editorUi.editor.graph.model;return 0<a.vertices.length?b.isVertex(b.getParent(a.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(a,c){var b=0<a.vertices.length?c.editorUi.editor.graph.getCellGeometry(a.vertices[0]):null;return null!=b&&!b.relative}},{name:"resizable",dispName:"Resizable",type:"bool",defVal:!0},{name:"resizeWidth",dispName:"Resize Width",type:"bool",
-defVal:!1},{name:"resizeHeight",dispName:"Resize Height",type:"bool",defVal:!1},{name:"rotatable",dispName:"Rotatable",type:"bool",defVal:!0},{name:"cloneable",dispName:"Cloneable",type:"bool",defVal:!0},{name:"deletable",dispName:"Deletable",type:"bool",defVal:!0},{name:"treeFolding",dispName:"Tree Folding",type:"bool",defVal:!1},{name:"treeMoving",dispName:"Tree Moving",type:"bool",defVal:!1},{name:"pointerEvents",dispName:"Pointer Events",type:"bool",defVal:!0,isVisible:function(a,c){var b=mxUtils.getValue(a.style,
-mxConstants.STYLE_FILLCOLOR,null);return c.editorUi.editor.graph.isSwimlane(a.vertices[0])||null==b||b==mxConstants.NONE}},{name:"moveCells",dispName:"Move Cells on Fold",type:"bool",defVal:!1,isVisible:function(a,c){return 0<a.vertices.length&&c.editorUi.editor.graph.isContainer(a.vertices[0])}}].concat(Editor.commonProperties);Editor.defaultCsvValue='##\n## Example CSV import. Use ## for comments and # for configuration. Paste CSV below.\n## The following names are reserved and should not be used (or ignored):\n## id, tooltip, placeholder(s), link and label (see below)\n##\n#\n## Node label with placeholders and HTML.\n## Default is \'%name_of_first_column%\'.\n#\n# label: %name%<br><i style="color:gray;">%position%</i><br><a href="mailto:%email%">Email</a>\n#\n## Node style (placeholders are replaced once).\n## Default is the current style for nodes.\n#\n# style: label;image=%image%;whiteSpace=wrap;html=1;rounded=1;fillColor=%fill%;strokeColor=%stroke%;\n#\n## Parent style for nodes with child nodes (placeholders are replaced once).\n#\n# parentstyle: swimlane;whiteSpace=wrap;html=1;childLayout=stackLayout;horizontal=1;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;\n#\n## Optional column name that contains a reference to a named style in styles.\n## Default is the current style for nodes.\n#\n# stylename: -\n#\n## JSON for named styles of the form {"name": "style", "name": "style"} where style is a cell style with\n## placeholders that are replaced once.\n#\n# styles: -\n#\n## JSON for variables in styles of the form {"name": "value", "name": "value"} where name is a string\n## that will replace a placeholder in a style.\n#\n# vars: -\n#\n## Optional column name that contains a reference to a named label in labels.\n## Default is the current label.\n#\n# labelname: -\n#\n## JSON for named labels of the form {"name": "label", "name": "label"} where label is a cell label with\n## placeholders.\n#\n# labels: -\n#\n## Uses the given column name as the identity for cells (updates existing cells).\n## Default is no identity (empty value or -).\n#\n# identity: -\n#\n## Uses the given column name as the parent reference for cells. Default is no parent (empty or -).\n## The identity above is used for resolving the reference so it must be specified.\n#\n# parent: -\n#\n## Adds a prefix to the identity of cells to make sure they do not collide with existing cells (whose\n## IDs are numbers from 0..n, sometimes with a GUID prefix in the context of realtime collaboration).\n## Default is csvimport-.\n#\n# namespace: csvimport-\n#\n## Connections between rows ("from": source colum, "to": target column).\n## Label, style and invert are optional. Defaults are \'\', current style and false.\n## If placeholders are used in the style, they are replaced with data from the source.\n## An optional placeholders can be set to target to use data from the target instead.\n## In addition to label, an optional fromlabel and tolabel can be used to name the column\n## that contains the text for the label in the edges source or target (invert ignored).\n## In addition to those, an optional source and targetlabel can be used to specify a label\n## that contains placeholders referencing the respective columns in the source or target row.\n## The label is created in the form fromlabel + sourcelabel + label + tolabel + targetlabel.\n## Additional labels can be added by using an optional labels array with entries of the\n## form {"label": string, "x": number, "y": number, "dx": number, "dy": number} where\n## x is from -1 to 1 along the edge, y is orthogonal, and dx/dy are offsets in pixels.\n## An optional placeholders with the string value "source" or "target" can be specified\n## to replace placeholders in the additional label with data from the source or target.\n## The target column may contain a comma-separated list of values.\n## Multiple connect entries are allowed.\n#\n# connect: {"from": "manager", "to": "name", "invert": true, "label": "manages", \\\n# "style": "curved=1;endArrow=blockThin;endFill=1;fontSize=11;"}\n# connect: {"from": "refs", "to": "id", "style": "curved=1;fontSize=11;"}\n#\n## Node x-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# left: \n#\n## Node y-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# top: \n#\n## Node width. Possible value is a number (in px), auto or an @ sign followed by a column\n## name that contains the value for the width. Default is auto.\n#\n# width: auto\n#\n## Node height. Possible value is a number (in px), auto or an @ sign followed by a column\n## name that contains the value for the height. Default is auto.\n#\n# height: auto\n#\n## Padding for autosize. Default is 0.\n#\n# padding: -12\n#\n## Comma-separated list of ignored columns for metadata. (These can be\n## used for connections and styles but will not be added as metadata.)\n#\n# ignore: id,image,fill,stroke,refs,manager\n#\n## Column to be renamed to link attribute (used as link).\n#\n# link: url\n#\n## Spacing between nodes. Default is 40.\n#\n# nodespacing: 40\n#\n## Spacing between levels of hierarchical layouts. Default is 100.\n#\n# levelspacing: 100\n#\n## Spacing between parallel edges. Default is 40. Use 0 to disable.\n#\n# edgespacing: 40\n#\n## Name or JSON of layout. Possible values are auto, none, verticaltree, horizontaltree,\n## verticalflow, horizontalflow, organic, circle or a JSON string as used in Layout, Apply.\n## Default is auto.\n#\n# layout: auto\n#\n## ---- CSV below this line. First line are column names. ----\nname,position,id,location,manager,email,fill,stroke,refs,url,image\nTessa Miller,CFO,emi,Office 1,,me@example.com,#dae8fc,#6c8ebf,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-3-128.png\nEdward Morrison,Brand Manager,emo,Office 2,Tessa Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-10-3-128.png\nAlison Donovan,System Admin,rdo,Office 3,Tessa Miller,me@example.com,#d5e8d4,#82b366,"emo,tva",https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-2-128.png\nEvan Valet,HR Director,tva,Office 4,Tessa Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-9-2-128.png\n';
-Editor.createRoughCanvas=function(a){var c=rough.canvas({getContext:function(){return a}});c.draw=function(c){var b=c.sets||[];c=c.options||this.getDefaultOptions();for(var e=0;e<b.length;e++){var d=b[e];switch(d.type){case "path":null!=c.stroke&&this._drawToContext(a,d,c);break;case "fillPath":this._drawToContext(a,d,c);break;case "fillSketch":this.fillSketch(a,d,c)}}};c.fillSketch=function(c,b,e){var d=a.state.strokeColor,g=a.state.strokeWidth,f=a.state.strokeAlpha,k=a.state.dashed,l=e.fillWeight;
-0>l&&(l=e.strokeWidth/2);a.setStrokeAlpha(a.state.fillAlpha);a.setStrokeColor(e.fill||"");a.setStrokeWidth(l);a.setDashed(!1);this._drawToContext(c,b,e);a.setDashed(k);a.setStrokeWidth(g);a.setStrokeColor(d);a.setStrokeAlpha(f)};c._drawToContext=function(a,c,b){a.begin();for(var e=0;e<c.ops.length;e++){var d=c.ops[e],g=d.data;switch(d.op){case "move":a.moveTo(g[0],g[1]);break;case "bcurveTo":a.curveTo(g[0],g[1],g[2],g[3],g[4],g[5]);break;case "lineTo":a.lineTo(g[0],g[1])}}a.end();"fillPath"===c.type&&
+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.compressXml=!0;Editor.globalVars=null;Editor.shadowOptionEnabled=!mxClient.IS_SF;Editor.config=
+null;Editor.configVersion=null;Editor.defaultBorder=5;Editor.commonProperties=[{name:"comic",dispName:"Comic",type:"bool",defVal:!1,isVisible:function(a,c){return"1"!=mxUtils.getValue(a.style,"sketch","0")}},{name:"jiggle",dispName:"Jiggle",type:"float",min:0,defVal:1,isVisible:function(a,c){return"1"==mxUtils.getValue(a.style,"comic","0")||"1"==mxUtils.getValue(a.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"fillWeight",dispName:"Fill Weight",type:"int",defVal:-1,isVisible:function(a,c){return"1"==
+mxUtils.getValue(a.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"hachureGap",dispName:"Hachure Gap",type:"int",defVal:-1,isVisible:function(a,c){return"1"==mxUtils.getValue(a.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"hachureAngle",dispName:"Hachure Angle",type:"int",defVal:-41,isVisible:function(a,c){return"1"==mxUtils.getValue(a.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"curveFitting",dispName:"Curve Fitting",type:"float",defVal:.95,isVisible:function(a,c){return"1"==
+mxUtils.getValue(a.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"simplification",dispName:"Simplification",type:"float",defVal:0,min:0,max:1,isVisible:function(a,c){return"1"==mxUtils.getValue(a.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"disableMultiStroke",dispName:"Disable Multi Stroke",type:"bool",defVal:!1,isVisible:function(a,c){return"1"==mxUtils.getValue(a.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"disableMultiStrokeFill",dispName:"Disable Multi Stroke Fill",type:"bool",
+defVal:!1,isVisible:function(a,c){return"1"==mxUtils.getValue(a.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"dashOffset",dispName:"Dash Offset",type:"int",defVal:-1,isVisible:function(a,c){return"1"==mxUtils.getValue(a.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"dashGap",dispName:"Dash Gap",type:"int",defVal:-1,isVisible:function(a,c){return"1"==mxUtils.getValue(a.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"zigzagOffset",dispName:"ZigZag Offset",type:"int",defVal:-1,isVisible:function(a,
+c){return"1"==mxUtils.getValue(a.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"jiggle",dispName:"Jiggle",type:"float",min:0,defVal:1,isVisible:function(a,c){return"1"==mxUtils.getValue(a.style,"comic","0")||"1"==mxUtils.getValue(a.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"sketchStyle",dispName:"Sketch Style",type:"enum",defVal:"rough",enumList:[{val:"rough",dispName:"Rough"},{val:"comic",dispName:"Comic"}],isVisible:function(a,c){return"1"==mxUtils.getValue(a.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(a){return"orthogonalEdgeStyle"==mxUtils.getValue(a.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=[{type:"separator"},{name:"resizeLastRow",dispName:"Resize Last Row",type:"bool",getDefaultValue:function(a,c){var b=c.editorUi.editor.graph.getCellStyle(1==a.vertices.length&&0==a.edges.length?a.vertices[0]:null);return"1"==mxUtils.getValue(b,"resizeLastRow","0")},isVisible:function(a,
+c){var b=c.editorUi.editor.graph;return 1==a.vertices.length&&0==a.edges.length&&b.isTable(a.vertices[0])}},{name:"resizeLast",dispName:"Resize Last Column",type:"bool",getDefaultValue:function(a,c){var b=c.editorUi.editor.graph.getCellStyle(1==a.vertices.length&&0==a.edges.length?a.vertices[0]:null);return"1"==mxUtils.getValue(b,"resizeLast","0")},isVisible:function(a,c){var b=c.editorUi.editor.graph;return 1==a.vertices.length&&0==a.edges.length&&b.isTable(a.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(a,c){return c.editorUi.editor.graph.isCellConnectable(1==a.vertices.length&&0==a.edges.length?a.vertices[0]:null)},isVisible:function(a,c){return 1==a.vertices.length&&0==a.edges.length}},{name:"allowArrows",dispName:"Allow Arrows",type:"bool",defVal:!0},{name:"snapToPoint",dispName:"Snap to Point",type:"bool",defVal:!1},{name:"perimeter",dispName:"Perimeter",defVal:"none",type:"enum",enumList:[{val:"none",dispName:"None"},{val:"rectanglePerimeter",
+dispName:"Rectangle"},{val:"ellipsePerimeter",dispName:"Ellipse"},{val:"rhombusPerimeter",dispName:"Rhombus"},{val:"trianglePerimeter",dispName:"Triangle"},{val:"hexagonPerimeter2",dispName:"Hexagon"},{val:"lifelinePerimeter",dispName:"Lifeline"},{val:"orthogonalPerimeter",dispName:"Orthogonal"},{val:"backbonePerimeter",dispName:"Backbone"},{val:"calloutPerimeter",dispName:"Callout"},{val:"parallelogramPerimeter",dispName:"Parallelogram"},{val:"trapezoidPerimeter",dispName:"Trapezoid"},{val:"stepPerimeter",
+dispName:"Step"},{val:"centerPerimeter",dispName:"Center"}]},{name:"fixDash",dispName:"Fixed Dash",type:"bool",defVal:!1},{name:"autosize",dispName:"Autosize",type:"bool",defVal:!1},{name:"container",dispName:"Container",type:"bool",defVal:!1,isVisible:function(a,c){return 1==a.vertices.length&&0==a.edges.length}},{name:"dropTarget",dispName:"Drop Target",type:"bool",getDefaultValue:function(a,c){var b=1==a.vertices.length&&0==a.edges.length?a.vertices[0]:null,e=c.editorUi.editor.graph;return null!=
+b&&(e.isSwimlane(b)||0<e.model.getChildCount(b))},isVisible:function(a,c){return 1==a.vertices.length&&0==a.edges.length}},{name:"collapsible",dispName:"Collapsible",type:"bool",getDefaultValue:function(a,c){var b=1==a.vertices.length&&0==a.edges.length?a.vertices[0]:null,e=c.editorUi.editor.graph;return null!=b&&(e.isContainer(b)&&"0"!=a.style.collapsible||!e.isContainer(b)&&"1"==a.style.collapsible)},isVisible:function(a,c){return 1==a.vertices.length&&0==a.edges.length}},{name:"recursiveResize",
+dispName:"Resize Children",type:"bool",defVal:!0,isVisible:function(a,c){return 1==a.vertices.length&&0==a.edges.length&&!c.editorUi.editor.graph.isSwimlane(a.vertices[0])&&null==mxUtils.getValue(a.style,"childLayout",null)}},{name:"expand",dispName:"Expand",type:"bool",defVal:!0},{name:"part",dispName:"Part",type:"bool",defVal:!1,isVisible:function(a,c){var b=c.editorUi.editor.graph.model;return 0<a.vertices.length?b.isVertex(b.getParent(a.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(a,c){var b=0<a.vertices.length?c.editorUi.editor.graph.getCellGeometry(a.vertices[0]):null;return null!=b&&!b.relative}},{name:"resizable",dispName:"Resizable",type:"bool",defVal:!0},{name:"resizeWidth",
+dispName:"Resize Width",type:"bool",defVal:!1},{name:"resizeHeight",dispName:"Resize Height",type:"bool",defVal:!1},{name:"rotatable",dispName:"Rotatable",type:"bool",defVal:!0},{name:"cloneable",dispName:"Cloneable",type:"bool",defVal:!0},{name:"deletable",dispName:"Deletable",type:"bool",defVal:!0},{name:"treeFolding",dispName:"Tree Folding",type:"bool",defVal:!1},{name:"treeMoving",dispName:"Tree Moving",type:"bool",defVal:!1},{name:"pointerEvents",dispName:"Pointer Events",type:"bool",defVal:!0,
+isVisible:function(a,c){var b=mxUtils.getValue(a.style,mxConstants.STYLE_FILLCOLOR,null);return c.editorUi.editor.graph.isSwimlane(a.vertices[0])||null==b||b==mxConstants.NONE}},{name:"moveCells",dispName:"Move Cells on Fold",type:"bool",defVal:!1,isVisible:function(a,c){return 0<a.vertices.length&&c.editorUi.editor.graph.isContainer(a.vertices[0])}}].concat(Editor.commonProperties);Editor.defaultCsvValue='##\n## Example CSV import. Use ## for comments and # for configuration. Paste CSV below.\n## The following names are reserved and should not be used (or ignored):\n## id, tooltip, placeholder(s), link and label (see below)\n##\n#\n## Node label with placeholders and HTML.\n## Default is \'%name_of_first_column%\'.\n#\n# label: %name%<br><i style="color:gray;">%position%</i><br><a href="mailto:%email%">Email</a>\n#\n## Node style (placeholders are replaced once).\n## Default is the current style for nodes.\n#\n# style: label;image=%image%;whiteSpace=wrap;html=1;rounded=1;fillColor=%fill%;strokeColor=%stroke%;\n#\n## Parent style for nodes with child nodes (placeholders are replaced once).\n#\n# parentstyle: swimlane;whiteSpace=wrap;html=1;childLayout=stackLayout;horizontal=1;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;\n#\n## Optional column name that contains a reference to a named style in styles.\n## Default is the current style for nodes.\n#\n# stylename: -\n#\n## JSON for named styles of the form {"name": "style", "name": "style"} where style is a cell style with\n## placeholders that are replaced once.\n#\n# styles: -\n#\n## JSON for variables in styles of the form {"name": "value", "name": "value"} where name is a string\n## that will replace a placeholder in a style.\n#\n# vars: -\n#\n## Optional column name that contains a reference to a named label in labels.\n## Default is the current label.\n#\n# labelname: -\n#\n## JSON for named labels of the form {"name": "label", "name": "label"} where label is a cell label with\n## placeholders.\n#\n# labels: -\n#\n## Uses the given column name as the identity for cells (updates existing cells).\n## Default is no identity (empty value or -).\n#\n# identity: -\n#\n## Uses the given column name as the parent reference for cells. Default is no parent (empty or -).\n## The identity above is used for resolving the reference so it must be specified.\n#\n# parent: -\n#\n## Adds a prefix to the identity of cells to make sure they do not collide with existing cells (whose\n## IDs are numbers from 0..n, sometimes with a GUID prefix in the context of realtime collaboration).\n## Default is csvimport-.\n#\n# namespace: csvimport-\n#\n## Connections between rows ("from": source colum, "to": target column).\n## Label, style and invert are optional. Defaults are \'\', current style and false.\n## If placeholders are used in the style, they are replaced with data from the source.\n## An optional placeholders can be set to target to use data from the target instead.\n## In addition to label, an optional fromlabel and tolabel can be used to name the column\n## that contains the text for the label in the edges source or target (invert ignored).\n## In addition to those, an optional source and targetlabel can be used to specify a label\n## that contains placeholders referencing the respective columns in the source or target row.\n## The label is created in the form fromlabel + sourcelabel + label + tolabel + targetlabel.\n## Additional labels can be added by using an optional labels array with entries of the\n## form {"label": string, "x": number, "y": number, "dx": number, "dy": number} where\n## x is from -1 to 1 along the edge, y is orthogonal, and dx/dy are offsets in pixels.\n## An optional placeholders with the string value "source" or "target" can be specified\n## to replace placeholders in the additional label with data from the source or target.\n## The target column may contain a comma-separated list of values.\n## Multiple connect entries are allowed.\n#\n# connect: {"from": "manager", "to": "name", "invert": true, "label": "manages", \\\n# "style": "curved=1;endArrow=blockThin;endFill=1;fontSize=11;"}\n# connect: {"from": "refs", "to": "id", "style": "curved=1;fontSize=11;"}\n#\n## Node x-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# left: \n#\n## Node y-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# top: \n#\n## Node width. Possible value is a number (in px), auto or an @ sign followed by a column\n## name that contains the value for the width. Default is auto.\n#\n# width: auto\n#\n## Node height. Possible value is a number (in px), auto or an @ sign followed by a column\n## name that contains the value for the height. Default is auto.\n#\n# height: auto\n#\n## Padding for autosize. Default is 0.\n#\n# padding: -12\n#\n## Comma-separated list of ignored columns for metadata. (These can be\n## used for connections and styles but will not be added as metadata.)\n#\n# ignore: id,image,fill,stroke,refs,manager\n#\n## Column to be renamed to link attribute (used as link).\n#\n# link: url\n#\n## Spacing between nodes. Default is 40.\n#\n# nodespacing: 40\n#\n## Spacing between levels of hierarchical layouts. Default is 100.\n#\n# levelspacing: 100\n#\n## Spacing between parallel edges. Default is 40. Use 0 to disable.\n#\n# edgespacing: 40\n#\n## Name or JSON of layout. Possible values are auto, none, verticaltree, horizontaltree,\n## verticalflow, horizontalflow, organic, circle or a JSON string as used in Layout, Apply.\n## Default is auto.\n#\n# layout: auto\n#\n## ---- CSV below this line. First line are column names. ----\nname,position,id,location,manager,email,fill,stroke,refs,url,image\nTessa Miller,CFO,emi,Office 1,,me@example.com,#dae8fc,#6c8ebf,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-3-128.png\nEdward Morrison,Brand Manager,emo,Office 2,Tessa Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-10-3-128.png\nAlison Donovan,System Admin,rdo,Office 3,Tessa Miller,me@example.com,#d5e8d4,#82b366,"emo,tva",https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-2-128.png\nEvan Valet,HR Director,tva,Office 4,Tessa Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-9-2-128.png\n';
+Editor.createRoughCanvas=function(a){var c=rough.canvas({getContext:function(){return a}});c.draw=function(c){var b=c.sets||[];c=c.options||this.getDefaultOptions();for(var e=0;e<b.length;e++){var d=b[e];switch(d.type){case "path":null!=c.stroke&&this._drawToContext(a,d,c);break;case "fillPath":this._drawToContext(a,d,c);break;case "fillSketch":this.fillSketch(a,d,c)}}};c.fillSketch=function(c,b,e){var d=a.state.strokeColor,k=a.state.strokeWidth,f=a.state.strokeAlpha,g=a.state.dashed,l=e.fillWeight;
+0>l&&(l=e.strokeWidth/2);a.setStrokeAlpha(a.state.fillAlpha);a.setStrokeColor(e.fill||"");a.setStrokeWidth(l);a.setDashed(!1);this._drawToContext(c,b,e);a.setDashed(g);a.setStrokeWidth(k);a.setStrokeColor(d);a.setStrokeAlpha(f)};c._drawToContext=function(a,c,b){a.begin();for(var e=0;e<c.ops.length;e++){var d=c.ops[e],k=d.data;switch(d.op){case "move":a.moveTo(k[0],k[1]);break;case "bcurveTo":a.curveTo(k[0],k[1],k[2],k[3],k[4],k[5]);break;case "lineTo":a.lineTo(k[0],k[1])}}a.end();"fillPath"===c.type&&
b.filled?a.fill():a.stroke()};return c};(function(){function a(c,b,e){this.canvas=c;this.rc=b;this.shape=e;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.originalBegin=this.canvas.begin;this.canvas.begin=mxUtils.bind(this,a.prototype.begin);this.originalEnd=this.canvas.end;this.canvas.end=mxUtils.bind(this,a.prototype.end);this.originalRect=this.canvas.rect;this.canvas.rect=mxUtils.bind(this,a.prototype.rect);this.originalRoundrect=this.canvas.roundrect;this.canvas.roundrect=
mxUtils.bind(this,a.prototype.roundrect);this.originalEllipse=this.canvas.ellipse;this.canvas.ellipse=mxUtils.bind(this,a.prototype.ellipse);this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,a.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,a.prototype.moveTo);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,a.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;this.canvas.curveTo=mxUtils.bind(this,
a.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,a.prototype.arcTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,a.prototype.close);this.originalFill=this.canvas.fill;this.canvas.fill=mxUtils.bind(this,a.prototype.fill);this.originalStroke=this.canvas.stroke;this.canvas.stroke=mxUtils.bind(this,a.prototype.stroke);this.originalFillAndStroke=this.canvas.fillAndStroke;this.canvas.fillAndStroke=mxUtils.bind(this,a.prototype.fillAndStroke);
this.path=[];this.passThrough=!1}a.prototype.moveOp="M";a.prototype.lineOp="L";a.prototype.quadOp="Q";a.prototype.curveOp="C";a.prototype.closeOp="Z";a.prototype.getStyle=function(a,c){var b=1;if(null!=this.shape.state){var e=this.shape.state.cell.id;if(null!=e)for(var d=0;d<e.length;d++)b=(b<<5)-b+e.charCodeAt(d)<<0}b={strokeWidth:this.canvas.state.strokeWidth,seed:b,preserveVertices:!0};e=this.rc.getDefaultOptions();a?b.stroke="none"===this.canvas.state.strokeColor?"transparent":this.canvas.state.strokeColor:
delete b.stroke;d=null;(b.filled=c)?(b.fill="none"===this.canvas.state.fillColor?"":this.canvas.state.fillColor,d="none"===this.canvas.state.gradientColor?null:this.canvas.state.gradientColor):b.fill="";b.bowing=mxUtils.getValue(this.shape.style,"bowing",e.bowing);b.hachureAngle=mxUtils.getValue(this.shape.style,"hachureAngle",e.hachureAngle);b.curveFitting=mxUtils.getValue(this.shape.style,"curveFitting",e.curveFitting);b.roughness=mxUtils.getValue(this.shape.style,"jiggle",e.roughness);b.simplification=
-mxUtils.getValue(this.shape.style,"simplification",e.simplification);b.disableMultiStroke=mxUtils.getValue(this.shape.style,"disableMultiStroke",e.disableMultiStroke);b.disableMultiStrokeFill=mxUtils.getValue(this.shape.style,"disableMultiStrokeFill",e.disableMultiStrokeFill);var g=mxUtils.getValue(this.shape.style,"hachureGap",-1);b.hachureGap="auto"==g?-1:g;b.dashGap=mxUtils.getValue(this.shape.style,"dashGap",g);b.dashOffset=mxUtils.getValue(this.shape.style,"dashOffset",g);b.zigzagOffset=mxUtils.getValue(this.shape.style,
-"zigzagOffset",g);g=mxUtils.getValue(this.shape.style,"fillWeight",-1);b.fillWeight="auto"==g?-1:g;g=mxUtils.getValue(this.shape.style,"fillStyle","auto");"auto"==g&&(g=null!=this.shape.state?this.shape.state.view.graph.defaultPageBackgroundColor:"#ffffff",g=null!=b.fill&&(null!=d||null!=g&&b.fill.toLowerCase()==g.toLowerCase())?"solid":e.fillStyle);b.fillStyle=g;return b};a.prototype.begin=function(){this.passThrough?this.originalBegin.apply(this.canvas,arguments):this.path=[]};a.prototype.end=function(){this.passThrough&&
+mxUtils.getValue(this.shape.style,"simplification",e.simplification);b.disableMultiStroke=mxUtils.getValue(this.shape.style,"disableMultiStroke",e.disableMultiStroke);b.disableMultiStrokeFill=mxUtils.getValue(this.shape.style,"disableMultiStrokeFill",e.disableMultiStrokeFill);var k=mxUtils.getValue(this.shape.style,"hachureGap",-1);b.hachureGap="auto"==k?-1:k;b.dashGap=mxUtils.getValue(this.shape.style,"dashGap",k);b.dashOffset=mxUtils.getValue(this.shape.style,"dashOffset",k);b.zigzagOffset=mxUtils.getValue(this.shape.style,
+"zigzagOffset",k);k=mxUtils.getValue(this.shape.style,"fillWeight",-1);b.fillWeight="auto"==k?-1:k;k=mxUtils.getValue(this.shape.style,"fillStyle","auto");"auto"==k&&(k=null!=this.shape.state?this.shape.state.view.graph.defaultPageBackgroundColor:"#ffffff",k=null!=b.fill&&(null!=d||null!=k&&b.fill.toLowerCase()==k.toLowerCase())?"solid":e.fillStyle);b.fillStyle=k;return b};a.prototype.begin=function(){this.passThrough?this.originalBegin.apply(this.canvas,arguments):this.path=[]};a.prototype.end=function(){this.passThrough&&
this.originalEnd.apply(this.canvas,arguments)};a.prototype.addOp=function(){if(null!=this.path&&(this.path.push(arguments[0]),2<arguments.length))for(var a=2;a<arguments.length;a+=2)this.lastX=arguments[a-1],this.lastY=arguments[a],this.path.push(this.canvas.format(this.lastX)),this.path.push(this.canvas.format(this.lastY))};a.prototype.lineTo=function(a,c){this.passThrough?this.originalLineTo.apply(this.canvas,arguments):(this.addOp(this.lineOp,a,c),this.lastX=a,this.lastY=c)};a.prototype.moveTo=
-function(a,c){this.passThrough?this.originalMoveTo.apply(this.canvas,arguments):(this.addOp(this.moveOp,a,c),this.lastX=a,this.lastY=c,this.firstX=a,this.firstY=c)};a.prototype.close=function(){this.passThrough?this.originalClose.apply(this.canvas,arguments):this.addOp(this.closeOp)};a.prototype.quadTo=function(a,c,b,e){this.passThrough?this.originalQuadTo.apply(this.canvas,arguments):(this.addOp(this.quadOp,a,c,b,e),this.lastX=b,this.lastY=e)};a.prototype.curveTo=function(a,c,b,e,d,g){this.passThrough?
-this.originalCurveTo.apply(this.canvas,arguments):(this.addOp(this.curveOp,a,c,b,e,d,g),this.lastX=d,this.lastY=g)};a.prototype.arcTo=function(a,c,b,e,d,g,f){if(this.passThrough)this.originalArcTo.apply(this.canvas,arguments);else{var k=mxUtils.arcToCurves(this.lastX,this.lastY,a,c,b,e,d,g,f);if(null!=k)for(var l=0;l<k.length;l+=6)this.curveTo(k[l],k[l+1],k[l+2],k[l+3],k[l+4],k[l+5]);this.lastX=g;this.lastY=f}};a.prototype.rect=function(a,c,b,e){this.passThrough?this.originalRect.apply(this.canvas,
-arguments):(this.path=[],this.nextShape=this.rc.generator.rectangle(a,c,b,e,this.getStyle(!0,!0)))};a.prototype.ellipse=function(a,c,b,e){this.passThrough?this.originalEllipse.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.ellipse(a+b/2,c+e/2,b,e,this.getStyle(!0,!0)))};a.prototype.roundrect=function(a,c,b,e,d,g){this.passThrough?this.originalRoundrect.apply(this.canvas,arguments):(this.begin(),this.moveTo(a+d,c),this.lineTo(a+b-d,c),this.quadTo(a+b,c,a+b,c+g),this.lineTo(a+
-b,c+e-g),this.quadTo(a+b,c+e,a+b-d,c+e),this.lineTo(a+d,c+e),this.quadTo(a,c+e,a,c+e-g),this.lineTo(a,c+g),this.quadTo(a,c,a+d,c))};a.prototype.drawPath=function(a){if(0<this.path.length){this.passThrough=!0;try{this.rc.path(this.path.join(" "),a)}catch(Q){}this.passThrough=!1}else if(null!=this.nextShape){for(var c in a)this.nextShape.options[c]=a[c];null==a.stroke&&delete this.nextShape.options.stroke;a.filled||delete this.nextShape.options.fill;this.passThrough=!0;this.rc.draw(this.nextShape);
+function(a,c){this.passThrough?this.originalMoveTo.apply(this.canvas,arguments):(this.addOp(this.moveOp,a,c),this.lastX=a,this.lastY=c,this.firstX=a,this.firstY=c)};a.prototype.close=function(){this.passThrough?this.originalClose.apply(this.canvas,arguments):this.addOp(this.closeOp)};a.prototype.quadTo=function(a,c,b,e){this.passThrough?this.originalQuadTo.apply(this.canvas,arguments):(this.addOp(this.quadOp,a,c,b,e),this.lastX=b,this.lastY=e)};a.prototype.curveTo=function(a,c,b,e,d,k){this.passThrough?
+this.originalCurveTo.apply(this.canvas,arguments):(this.addOp(this.curveOp,a,c,b,e,d,k),this.lastX=d,this.lastY=k)};a.prototype.arcTo=function(a,c,b,e,d,k,f){if(this.passThrough)this.originalArcTo.apply(this.canvas,arguments);else{var g=mxUtils.arcToCurves(this.lastX,this.lastY,a,c,b,e,d,k,f);if(null!=g)for(var l=0;l<g.length;l+=6)this.curveTo(g[l],g[l+1],g[l+2],g[l+3],g[l+4],g[l+5]);this.lastX=k;this.lastY=f}};a.prototype.rect=function(a,c,b,e){this.passThrough?this.originalRect.apply(this.canvas,
+arguments):(this.path=[],this.nextShape=this.rc.generator.rectangle(a,c,b,e,this.getStyle(!0,!0)))};a.prototype.ellipse=function(a,c,b,e){this.passThrough?this.originalEllipse.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.ellipse(a+b/2,c+e/2,b,e,this.getStyle(!0,!0)))};a.prototype.roundrect=function(a,c,b,e,d,k){this.passThrough?this.originalRoundrect.apply(this.canvas,arguments):(this.begin(),this.moveTo(a+d,c),this.lineTo(a+b-d,c),this.quadTo(a+b,c,a+b,c+k),this.lineTo(a+
+b,c+e-k),this.quadTo(a+b,c+e,a+b-d,c+e),this.lineTo(a+d,c+e),this.quadTo(a,c+e,a,c+e-k),this.lineTo(a,c+k),this.quadTo(a,c,a+d,c))};a.prototype.drawPath=function(a){if(0<this.path.length){this.passThrough=!0;try{this.rc.path(this.path.join(" "),a)}catch(Q){}this.passThrough=!1}else if(null!=this.nextShape){for(var c in a)this.nextShape.options[c]=a[c];null==a.stroke&&delete this.nextShape.options.stroke;a.filled||delete this.nextShape.options.fill;this.passThrough=!0;this.rc.draw(this.nextShape);
this.passThrough=!1}};a.prototype.stroke=function(){this.passThrough?this.originalStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,!1))};a.prototype.fill=function(){this.passThrough?this.originalFill.apply(this.canvas,arguments):this.drawPath(this.getStyle(!1,!0))};a.prototype.fillAndStroke=function(){this.passThrough?this.originalFillAndStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,!0))};a.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;
this.canvas.moveTo=this.originalMoveTo;this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo;this.canvas.curveTo=this.originalCurveTo;this.canvas.arcTo=this.originalArcTo;this.canvas.close=this.originalClose;this.canvas.fill=this.originalFill;this.canvas.stroke=this.originalStroke;this.canvas.fillAndStroke=this.originalFillAndStroke;this.canvas.begin=this.originalBegin;this.canvas.end=this.originalEnd;this.canvas.rect=this.originalRect;this.canvas.ellipse=this.originalEllipse;
this.canvas.roundrect=this.originalRoundrect};mxShape.prototype.createRoughCanvas=function(c){return new a(c,Editor.createRoughCanvas(c),this)};var c=mxShape.prototype.createHandJiggle;mxShape.prototype.createHandJiggle=function(a){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"sketch","1"==urlParams.rough?"1":"0")?c.apply(this,arguments):"comic"==mxUtils.getValue(this.style,"sketchStyle","rough")?this.createComicCanvas(a):this.createRoughCanvas(a)};var b=mxShape.prototype.paint;
-mxShape.prototype.paint=function(c){var e=c.addTolerance,d=!0;null!=this.style&&(d="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(null!=c.handJiggle&&c.handJiggle.constructor==a&&!this.outline){c.save();var g=this.fill,f=this.stroke;this.stroke=this.fill=null;var k=this.configurePointerEvents,l=c.setStrokeColor;c.setStrokeColor=function(){};var n=c.setFillColor;c.setFillColor=function(){};d||null==g||(this.configurePointerEvents=function(){});c.handJiggle.passThrough=!0;
-b.apply(this,arguments);c.handJiggle.passThrough=!1;c.setFillColor=n;c.setStrokeColor=l;this.configurePointerEvents=k;this.stroke=f;this.fill=g;c.restore();d&&null!=g&&(c.addTolerance=function(){})}b.apply(this,arguments);c.addTolerance=e};var e=mxShape.prototype.paintGlassEffect;mxShape.prototype.paintGlassEffect=function(c,b,d,g,f,k){null!=c.handJiggle&&c.handJiggle.constructor==a?(c.handJiggle.passThrough=!0,e.apply(this,arguments),c.handJiggle.passThrough=!1):e.apply(this,arguments)}})();Editor.fastCompress=
-function(a){return null==a||0==a.length||"undefined"===typeof pako?a:Graph.arrayBufferToString(pako.deflateRaw(a))};Editor.fastDecompress=function(a){return null==a||0==a.length||"undefined"===typeof pako?a:pako.inflateRaw(Graph.stringToArrayBuffer(atob(a)),{to:"string"})};Editor.extractGraphModel=function(a,c,b){if(null!=a&&"undefined"!==typeof pako){var e=a.ownerDocument.getElementsByTagName("div"),d=[];if(null!=e&&0<e.length)for(var g=0;g<e.length;g++)if("mxgraph"==e[g].getAttribute("class")){d.push(e[g]);
+mxShape.prototype.paint=function(c){var e=c.addTolerance,d=!0;null!=this.style&&(d="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(null!=c.handJiggle&&c.handJiggle.constructor==a&&!this.outline){c.save();var k=this.fill,f=this.stroke;this.stroke=this.fill=null;var g=this.configurePointerEvents,l=c.setStrokeColor;c.setStrokeColor=function(){};var n=c.setFillColor;c.setFillColor=function(){};d||null==k||(this.configurePointerEvents=function(){});c.handJiggle.passThrough=!0;
+b.apply(this,arguments);c.handJiggle.passThrough=!1;c.setFillColor=n;c.setStrokeColor=l;this.configurePointerEvents=g;this.stroke=f;this.fill=k;c.restore();d&&null!=k&&(c.addTolerance=function(){})}b.apply(this,arguments);c.addTolerance=e};var e=mxShape.prototype.paintGlassEffect;mxShape.prototype.paintGlassEffect=function(c,b,d,k,f,g){null!=c.handJiggle&&c.handJiggle.constructor==a?(c.handJiggle.passThrough=!0,e.apply(this,arguments),c.handJiggle.passThrough=!1):e.apply(this,arguments)}})();Editor.fastCompress=
+function(a){return null==a||0==a.length||"undefined"===typeof pako?a:Graph.arrayBufferToString(pako.deflateRaw(a))};Editor.fastDecompress=function(a){return null==a||0==a.length||"undefined"===typeof pako?a:pako.inflateRaw(Graph.stringToArrayBuffer(atob(a)),{to:"string"})};Editor.extractGraphModel=function(a,c,b){if(null!=a&&"undefined"!==typeof pako){var e=a.ownerDocument.getElementsByTagName("div"),d=[];if(null!=e&&0<e.length)for(var k=0;k<e.length;k++)if("mxgraph"==e[k].getAttribute("class")){d.push(e[k]);
break}0<d.length&&(e=d[0].getAttribute("data-mxgraph"),null!=e?(d=JSON.parse(e),null!=d&&null!=d.xml&&(a=mxUtils.parseXml(d.xml),a=a.documentElement)):(d=d[0].getElementsByTagName("div"),0<d.length&&(e=mxUtils.getTextContent(d[0]),e=Graph.decompress(e,null,b),0<e.length&&(a=mxUtils.parseXml(e),a=a.documentElement))))}if(null!=a&&"svg"==a.nodeName)if(e=a.getAttribute("content"),null!=e&&"<"!=e.charAt(0)&&"%"!=e.charAt(0)&&(e=unescape(window.atob?atob(e):Base64.decode(cont,e))),null!=e&&"%"==e.charAt(0)&&
(e=decodeURIComponent(e)),null!=e&&0<e.length)a=mxUtils.parseXml(e).documentElement;else throw{message:mxResources.get("notADiagramFile")};null==a||c||(d=null,"diagram"==a.nodeName?d=a:"mxfile"==a.nodeName&&(e=a.getElementsByTagName("diagram"),0<e.length&&(d=e[Math.max(0,Math.min(e.length-1,urlParams.page||0))])),null!=d&&(a=Editor.parseDiagramNode(d,b)));null==a||"mxGraphModel"==a.nodeName||c&&"mxfile"==a.nodeName||(a=null);return a};Editor.parseDiagramNode=function(a,c){var b=mxUtils.trim(mxUtils.getTextContent(a)),
e=null;0<b.length?(b=Graph.decompress(b,null,c),null!=b&&0<b.length&&(e=mxUtils.parseXml(b).documentElement)):(b=mxUtils.getChildNodes(a),0<b.length&&(e=mxUtils.createXmlDocument(),e.appendChild(e.importNode(b[0],!0)),e=e.documentElement));return e};Editor.getDiagramNodeXml=function(a){var c=mxUtils.getTextContent(a),b=null;0<c.length?b=Graph.decompress(c):null!=a.firstChild&&(b=mxUtils.getXml(a.firstChild));return b};Editor.extractGraphModelFromPdf=function(a){a=a.substring(a.indexOf(",")+1);a=window.atob&&
-!mxClient.IS_SF?atob(a):Base64.decode(a,!0);if("%PDF-1.7"==a.substring(0,8)){var c=a.indexOf("EmbeddedFile");if(-1<c){var b=a.indexOf("stream",c)+9;if(0<a.substring(c,b).indexOf("application#2Fvnd.jgraph.mxfile"))return c=a.indexOf("endstream",b-1),pako.inflateRaw(Graph.stringToArrayBuffer(a.substring(b,c)),{to:"string"})}return null}for(var b=null,c="",e=0,d=0,g=[],f=null;d<a.length;){var k=a.charCodeAt(d),d=d+1;10!=k&&(c+=String.fromCharCode(k));k=="/Subject (%3Cmxfile".charCodeAt(e)?e++:e=0;if(19==
-e){var l=a.indexOf("%3C%2Fmxfile%3E)",d)+15,d=d-9;if(l>d){b=a.substring(d,l);break}}10==k&&("endobj"==c?f=null:"obj"==c.substring(c.length-3,c.length)||"xref"==c||"trailer"==c?(f=[],g[c.split(" ")[0]]=f):null!=f&&f.push(c),c="")}null==b&&(b=Editor.extractGraphModelFromXref(g));null!=b&&(b=decodeURIComponent(b.replace(/\\\(/g,"(").replace(/\\\)/g,")")));return b};Editor.extractGraphModelFromXref=function(a){var c=a.trailer,b=null;null!=c&&(c=/.* \/Info (\d+) (\d+) R/g.exec(c.join("\n")),null!=c&&0<
+!mxClient.IS_SF?atob(a):Base64.decode(a,!0);if("%PDF-1.7"==a.substring(0,8)){var c=a.indexOf("EmbeddedFile");if(-1<c){var b=a.indexOf("stream",c)+9;if(0<a.substring(c,b).indexOf("application#2Fvnd.jgraph.mxfile"))return c=a.indexOf("endstream",b-1),pako.inflateRaw(Graph.stringToArrayBuffer(a.substring(b,c)),{to:"string"})}return null}for(var b=null,c="",e=0,d=0,k=[],f=null;d<a.length;){var g=a.charCodeAt(d),d=d+1;10!=g&&(c+=String.fromCharCode(g));g=="/Subject (%3Cmxfile".charCodeAt(e)?e++:e=0;if(19==
+e){var l=a.indexOf("%3C%2Fmxfile%3E)",d)+15,d=d-9;if(l>d){b=a.substring(d,l);break}}10==g&&("endobj"==c?f=null:"obj"==c.substring(c.length-3,c.length)||"xref"==c||"trailer"==c?(f=[],k[c.split(" ")[0]]=f):null!=f&&f.push(c),c="")}null==b&&(b=Editor.extractGraphModelFromXref(k));null!=b&&(b=decodeURIComponent(b.replace(/\\\(/g,"(").replace(/\\\)/g,")")));return b};Editor.extractGraphModelFromXref=function(a){var c=a.trailer,b=null;null!=c&&(c=/.* \/Info (\d+) (\d+) R/g.exec(c.join("\n")),null!=c&&0<
c.length&&(c=a[c[1]],null!=c&&(c=/.* \/Subject (\d+) (\d+) R/g.exec(c.join("\n")),null!=c&&0<c.length&&(a=a[c[1]],null!=a&&(a=a.join("\n"),b=a.substring(1,a.length-1))))));return b};Editor.extractGraphModelFromPng=function(a){var c=null;try{var b=a.substring(a.indexOf(",")+1),e=window.atob&&!mxClient.IS_SF?atob(b):Base64.decode(b,!0);EditorUi.parsePng(e,mxUtils.bind(this,function(a,b,d){a=e.substring(a+8,a+8+d);"zTXt"==b?(d=a.indexOf(String.fromCharCode(0)),"mxGraphModel"==a.substring(0,d)&&(a=pako.inflateRaw(Graph.stringToArrayBuffer(a.substring(d+
2)),{to:"string"}).replace(/\+/g," "),null!=a&&0<a.length&&(c=a))):"tEXt"==b&&(a=a.split(String.fromCharCode(0)),1<a.length&&("mxGraphModel"==a[0]||"mxfile"==a[0])&&(c=a[1]));if(null!=c||"IDAT"==b)return!0}))}catch(L){}null!=c&&"%"==c.charAt(0)&&(c=decodeURIComponent(c));null!=c&&"%"==c.charAt(0)&&(c=decodeURIComponent(c));return c};Editor.extractParserError=function(a,c){var b=null,e=null!=a?a.getElementsByTagName("parsererror"):null;null!=e&&0<e.length&&(b=c||mxResources.get("invalidChars"),e=e[0].getElementsByTagName("div"),
0<e.length&&(b=mxUtils.getTextContent(e[0])));return null!=b?mxUtils.trim(b):b};Editor.addRetryToError=function(a,c){if(null!=a){var b=null!=a.error?a.error:a;null==b.retry&&(b.retry=c)}};Editor.configure=function(a,c){if(null!=a){Editor.config=a;Editor.configVersion=a.version;Menus.prototype.defaultFonts=a.defaultFonts||Menus.prototype.defaultFonts;ColorDialog.prototype.presetColors=a.presetColors||ColorDialog.prototype.presetColors;ColorDialog.prototype.defaultColors=a.defaultColors||ColorDialog.prototype.defaultColors;
ColorDialog.prototype.colorNames=a.colorNames||ColorDialog.prototype.colorNames;StyleFormatPanel.prototype.defaultColorSchemes=a.defaultColorSchemes||StyleFormatPanel.prototype.defaultColorSchemes;Graph.prototype.defaultEdgeLength=a.defaultEdgeLength||Graph.prototype.defaultEdgeLength;DrawioFile.prototype.autosaveDelay=a.autosaveDelay||DrawioFile.prototype.autosaveDelay;null!=a.templateFile&&(EditorUi.templateFile=a.templateFile);null!=a.styles&&(Editor.styles=a.styles);null!=a.globalVars&&(Editor.globalVars=
-a.globalVars);null!=a.compressXml&&(Editor.compressXml=a.compressXml);null!=a.simpleLabels&&(Editor.simpleLabels=a.simpleLabels);a.customFonts&&(Menus.prototype.defaultFonts=a.customFonts.concat(Menus.prototype.defaultFonts));a.customPresetColors&&(ColorDialog.prototype.presetColors=a.customPresetColors.concat(ColorDialog.prototype.presetColors));null!=a.customColorSchemes&&(StyleFormatPanel.prototype.defaultColorSchemes=a.customColorSchemes.concat(StyleFormatPanel.prototype.defaultColorSchemes));
+a.globalVars);null!=a.compressXml&&(Editor.compressXml=a.compressXml);null!=a.includeDiagram&&(Editor.defaultIncludeDiagram=a.includeDiagram);null!=a.simpleLabels&&(Editor.simpleLabels=a.simpleLabels);a.customFonts&&(Menus.prototype.defaultFonts=a.customFonts.concat(Menus.prototype.defaultFonts));a.customPresetColors&&(ColorDialog.prototype.presetColors=a.customPresetColors.concat(ColorDialog.prototype.presetColors));null!=a.customColorSchemes&&(StyleFormatPanel.prototype.defaultColorSchemes=a.customColorSchemes.concat(StyleFormatPanel.prototype.defaultColorSchemes));
if(null!=a.css){var b=document.createElement("style");b.setAttribute("type","text/css");b.appendChild(document.createTextNode(a.css));var e=document.getElementsByTagName("script")[0];e.parentNode.insertBefore(b,e)}null!=a.libraries&&(Sidebar.prototype.customEntries=a.libraries);null!=a.enabledLibraries&&(Sidebar.prototype.enabledLibraries=a.enabledLibraries);null!=a.defaultLibraries&&(Sidebar.prototype.defaultEntries=a.defaultLibraries);null!=a.defaultCustomLibraries&&(Editor.defaultCustomLibraries=
a.defaultCustomLibraries);null!=a.enableCustomLibraries&&(Editor.enableCustomLibraries=a.enableCustomLibraries);null!=a.defaultVertexStyle&&(Graph.prototype.defaultVertexStyle=a.defaultVertexStyle);null!=a.defaultEdgeStyle&&(Graph.prototype.defaultEdgeStyle=a.defaultEdgeStyle);null!=a.zoomFactor&&(b=parseFloat(a.zoomFactor),!isNaN(b)&&1<b&&(Graph.prototype.zoomFactor=b));null!=a.gridSteps&&(b=parseInt(a.gridSteps),!isNaN(b)&&0<b&&(mxGraphView.prototype.gridSteps=b));null!=a.pageFormat&&(b=parseInt(a.pageFormat.width),
e=parseInt(a.pageFormat.height),!isNaN(b)&&0<b&&!isNaN(e)&&0<e&&(mxGraph.prototype.defaultPageFormat=new mxRectangle(0,0,b,e),mxGraph.prototype.pageFormat=mxGraph.prototype.defaultPageFormat));a.thumbWidth&&(Sidebar.prototype.thumbWidth=a.thumbWidth);a.thumbHeight&&(Sidebar.prototype.thumbHeight=a.thumbHeight);a.emptyLibraryXml&&(EditorUi.prototype.emptyLibraryXml=a.emptyLibraryXml);a.sidebarWidth&&(EditorUi.prototype.hsplitPosition=a.sidebarWidth);a.fontCss&&Editor.configureFontCss(a.fontCss);null!=
@@ -3134,44 +3135,44 @@ null!=urlParams.edit?decodeURIComponent(urlParams.edit):null;Editor.prototype.cr
"default-style2";if("1"==urlParams.embed||null!=b&&""!=b)b!=this.graph.currentStyle&&(e=null!=this.graph.themes?this.graph.themes[b]:mxUtils.load(STYLE_PATH+"/"+b+".xml").getDocumentElement(),null!=e&&(d=new mxCodec(e.ownerDocument),d.decode(e,this.graph.getStylesheet())));else if(e=null!=this.graph.themes?this.graph.themes["default-old"]:mxUtils.load(STYLE_PATH+"/default-old.xml").getDocumentElement(),null!=e){var d=new mxCodec(e.ownerDocument);d.decode(e,this.graph.getStylesheet())}this.graph.currentStyle=
b;this.graph.mathEnabled="1"==urlParams.math||"1"==c.getAttribute("math");b=c.getAttribute("backgroundImage");null!=b?this.graph.setBackgroundImage(this.graph.parseBackgroundImage(b)):this.graph.setBackgroundImage(null);mxClient.NO_FO=this.graph.mathEnabled&&!this.useForeignObjectForMath?!0:this.originalNoForeignObject;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();this.graph.setShadowVisible("1"==c.getAttribute("shadow"),
!1);if(b=c.getAttribute("extFonts"))try{for(b=b.split("|").map(function(a){a=a.split("^");return{name:a[0],url:a[1]}}),e=0;e<b.length;e++)this.graph.addExtFont(b[e].name,b[e].url)}catch(L){console.log("ExtFonts format error: "+L.message)}else null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(this.graph.extFonts=[])}a.apply(this,arguments)}else throw{message:mxResources.get("notADiagramFile")||"Invalid data",toString:function(){return this.message}};};var b=Editor.prototype.getGraphXml;Editor.prototype.getGraphXml=
-function(a){a=null!=a?a:!0;var c=b.apply(this,arguments);null!=this.graph.currentStyle&&"default-style2"!=this.graph.currentStyle&&c.setAttribute("style",this.graph.currentStyle);var e=this.graph.getBackgroundImageObject(this.graph.backgroundImage);null!=e&&c.setAttribute("backgroundImage",JSON.stringify(e));c.setAttribute("math",this.graph.mathEnabled?"1":"0");c.setAttribute("shadow",this.graph.shadowVisible?"1":"0");null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(e=this.graph.extFonts.map(function(a){return a.name+
-"^"+a.url}),c.setAttribute("extFonts",e.join("|")));return c};Editor.prototype.isDataSvg=function(a){try{var c=mxUtils.parseXml(a).documentElement.getAttribute("content");if(null!=c&&(null!=c&&"<"!=c.charAt(0)&&"%"!=c.charAt(0)&&(c=unescape(window.atob?atob(c):Base64.decode(cont,c))),null!=c&&"%"==c.charAt(0)&&(c=decodeURIComponent(c)),null!=c&&0<c.length)){var b=mxUtils.parseXml(c).documentElement;return"mxfile"==b.nodeName||"mxGraphModel"==b.nodeName}}catch(J){}return!1};Editor.prototype.extractGraphModel=
+function(a,c){a=null!=a?a:!0;var e=b.apply(this,arguments);null!=this.graph.currentStyle&&"default-style2"!=this.graph.currentStyle&&e.setAttribute("style",this.graph.currentStyle);var d=this.graph.getBackgroundImageObject(this.graph.backgroundImage,c);null!=d&&e.setAttribute("backgroundImage",JSON.stringify(d));e.setAttribute("math",this.graph.mathEnabled?"1":"0");e.setAttribute("shadow",this.graph.shadowVisible?"1":"0");null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(d=this.graph.extFonts.map(function(a){return a.name+
+"^"+a.url}),e.setAttribute("extFonts",d.join("|")));return e};Editor.prototype.isDataSvg=function(a){try{var c=mxUtils.parseXml(a).documentElement.getAttribute("content");if(null!=c&&(null!=c&&"<"!=c.charAt(0)&&"%"!=c.charAt(0)&&(c=unescape(window.atob?atob(c):Base64.decode(cont,c))),null!=c&&"%"==c.charAt(0)&&(c=decodeURIComponent(c)),null!=c&&0<c.length)){var b=mxUtils.parseXml(c).documentElement;return"mxfile"==b.nodeName||"mxGraphModel"==b.nodeName}}catch(J){}return!1};Editor.prototype.extractGraphModel=
function(a,c,b){return Editor.extractGraphModel.apply(this,arguments)};var d=Editor.prototype.resetGraph;Editor.prototype.resetGraph=function(){this.graph.mathEnabled="1"==urlParams.math;this.graph.view.x0=null;this.graph.view.y0=null;mxClient.NO_FO=this.graph.mathEnabled&&!this.useForeignObjectForMath?!0:this.originalNoForeignObject;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();d.apply(this,arguments)};
-var k=Editor.prototype.updateGraphComponents;Editor.prototype.updateGraphComponents=function(){k.apply(this,arguments);mxClient.NO_FO=this.graph.mathEnabled&&!this.useForeignObjectForMath&&null!=Editor.MathJaxRender?!0:this.originalNoForeignObject;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform()};Editor.mathJaxWebkitCss="div.MathJax_SVG_Display { position: static; }\nspan.MathJax_SVG { position: static !important; }";
+var g=Editor.prototype.updateGraphComponents;Editor.prototype.updateGraphComponents=function(){g.apply(this,arguments);mxClient.NO_FO=this.graph.mathEnabled&&!this.useForeignObjectForMath&&null!=Editor.MathJaxRender?!0:this.originalNoForeignObject;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform()};Editor.mathJaxWebkitCss="div.MathJax_SVG_Display { position: static; }\nspan.MathJax_SVG { position: static !important; }";
Editor.initMath=function(a,c){if("undefined"===typeof window.MathJax){a=(null!=a?a:DRAW_MATH_URL+"/MathJax.js")+"?config=TeX-MML-AM_"+("html"==urlParams["math-output"]?"HTMLorMML":"SVG")+"-full";Editor.mathJaxQueue=[];Editor.doMathJaxRender=function(a){window.setTimeout(function(){"hidden"!=a.style.visibility&&MathJax.Hub.Queue(["Typeset",MathJax.Hub,a])},0)};var b=null!=urlParams["math-font"]?decodeURIComponent(urlParams["math-font"]):"TeX";c=null!=c?c:{"HTML-CSS":{availableFonts:[b],imageFont:null},
SVG:{font:b,useFontCache:!1},tex2jax:{ignoreClass:"mxCellEditor"},asciimath2jax:{ignoreClass:"mxCellEditor"}};window.MathJax={skipStartupTypeset:!0,showMathMenu:!1,messageStyle:"none",AuthorInit:function(){MathJax.Hub.Config(c);MathJax.Hub.Register.StartupHook("Begin",function(){for(var a=0;a<Editor.mathJaxQueue.length;a++)Editor.doMathJaxRender(Editor.mathJaxQueue[a])})}};Editor.MathJaxRender=function(a){"undefined"!==typeof MathJax&&"undefined"!==typeof MathJax.Hub?Editor.doMathJaxRender(a):Editor.mathJaxQueue.push(a)};
Editor.MathJaxClear=function(){Editor.mathJaxQueue=[]};var e=Editor.prototype.init;Editor.prototype.init=function(){e.apply(this,arguments);this.graph.addListener(mxEvent.SIZE,mxUtils.bind(this,function(a,c){null!=this.graph.container&&this.graph.mathEnabled&&!this.graph.blockMathRender&&Editor.MathJaxRender(this.graph.container)}))};b=document.getElementsByTagName("script");if(null!=b&&0<b.length){var d=document.createElement("script");d.setAttribute("type","text/javascript");d.setAttribute("src",
-a);b[0].parentNode.appendChild(d)}try{if(mxClient.IS_GC||mxClient.IS_SF){var g=document.createElement("style");g.type="text/css";g.innerHTML=Editor.mathJaxWebkitCss;document.getElementsByTagName("head")[0].appendChild(g)}}catch(Q){}}};Editor.prototype.csvToArray=function(a){if(!/^\s*(?:'[^'\\]*(?:\\[\S\s][^'\\]*)*'|"[^"\\]*(?:\\[\S\s][^"\\]*)*"|[^,'"\s\\]*(?:\s+[^,'"\s\\]+)*)\s*(?:,\s*(?:'[^'\\]*(?:\\[\S\s][^'\\]*)*'|"[^"\\]*(?:\\[\S\s][^"\\]*)*"|[^,'"\s\\]*(?:\s+[^,'"\s\\]+)*)\s*)*$/.test(a))return null;
+a);b[0].parentNode.appendChild(d)}try{if(mxClient.IS_GC||mxClient.IS_SF){var k=document.createElement("style");k.type="text/css";k.innerHTML=Editor.mathJaxWebkitCss;document.getElementsByTagName("head")[0].appendChild(k)}}catch(Q){}}};Editor.prototype.csvToArray=function(a){if(!/^\s*(?:'[^'\\]*(?:\\[\S\s][^'\\]*)*'|"[^"\\]*(?:\\[\S\s][^"\\]*)*"|[^,'"\s\\]*(?:\s+[^,'"\s\\]+)*)\s*(?:,\s*(?:'[^'\\]*(?:\\[\S\s][^'\\]*)*'|"[^"\\]*(?:\\[\S\s][^"\\]*)*"|[^,'"\s\\]*(?:\s+[^,'"\s\\]+)*)\s*)*$/.test(a))return null;
var c=[];a.replace(/(?!\s*$)\s*(?:'([^'\\]*(?:\\[\S\s][^'\\]*)*)'|"([^"\\]*(?:\\[\S\s][^"\\]*)*)"|([^,'"\s\\]*(?:\s+[^,'"\s\\]+)*))\s*(?:,|$)/g,function(a,b,e,d){void 0!==b?c.push(b.replace(/\\'/g,"'")):void 0!==e?c.push(e.replace(/\\"/g,'"')):void 0!==d&&c.push(d);return""});/,\s*$/.test(a)&&c.push("");return c};Editor.prototype.isCorsEnabledForUrl=function(a){if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)return!0;null!=urlParams.cors&&null==this.corsRegExp&&(this.corsRegExp=new RegExp(decodeURIComponent(urlParams.cors)));
return null!=this.corsRegExp&&this.corsRegExp.test(a)||"https://raw.githubusercontent.com/"===a.substring(0,34)};Editor.prototype.createImageUrlConverter=function(){var a=new mxUrlConverter;a.updateBaseUrl();var c=a.convert,b=this;a.convert=function(e){if(null!=e){var d="http://"==e.substring(0,7)||"https://"==e.substring(0,8);d&&!navigator.onLine?e=Editor.svgBrokenImage.src:!d||e.substring(0,a.baseUrl.length)==a.baseUrl||b.crossOriginImages&&b.isCorsEnabledForUrl(e)?"chrome-extension://"==e.substring(0,
19)||mxClient.IS_CHROMEAPP||(e=c.apply(this,arguments)):e=PROXY_URL+"?url="+encodeURIComponent(e)}return e};return a};Editor.createSvgDataUri=function(a){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(a)))};Editor.prototype.convertImageToDataUri=function(a,c){try{var b=!0,e=window.setTimeout(mxUtils.bind(this,function(){b=!1;c(Editor.svgBrokenImage.src)}),this.timeout);if(/(\.svg)$/i.test(a))mxUtils.get(a,mxUtils.bind(this,function(a){window.clearTimeout(e);b&&c(Editor.createSvgDataUri(a.getText()))}),
-function(){window.clearTimeout(e);b&&c(Editor.svgBrokenImage.src)});else{var d=new Image;this.crossOriginImages&&(d.crossOrigin="anonymous");d.onload=function(){window.clearTimeout(e);if(b)try{var a=document.createElement("canvas"),g=a.getContext("2d");a.height=d.height;a.width=d.width;g.drawImage(d,0,0);c(a.toDataURL())}catch(aa){c(Editor.svgBrokenImage.src)}};d.onerror=function(){window.clearTimeout(e);b&&c(Editor.svgBrokenImage.src)};d.src=a}}catch(W){c(Editor.svgBrokenImage.src)}};Editor.prototype.convertImages=
-function(a,c,b,e){null==e&&(e=this.createImageUrlConverter());var d=0,g=b||{};b=mxUtils.bind(this,function(b,f){for(var k=a.getElementsByTagName(b),l=0;l<k.length;l++)mxUtils.bind(this,function(b){try{if(null!=b){var k=e.convert(b.getAttribute(f));if(null!=k&&"data:"!=k.substring(0,5)){var l=g[k];null==l?(d++,this.convertImageToDataUri(k,function(e){null!=e&&(g[k]=e,b.setAttribute(f,e));d--;0==d&&c(a)})):b.setAttribute(f,l)}else null!=k&&b.setAttribute(f,k)}}catch(ca){}})(k[l])});b("image","xlink:href");
-b("img","src");0==d&&c(a)};Editor.base64Encode=function(a){for(var c="",b=0,e=a.length,d,g,f;b<e;){d=a.charCodeAt(b++)&255;if(b==e){c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(d>>2);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((d&3)<<4);c+="==";break}g=a.charCodeAt(b++);if(b==e){c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(d>>2);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((d&
-3)<<4|(g&240)>>4);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((g&15)<<2);c+="=";break}f=a.charCodeAt(b++);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(d>>2);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((d&3)<<4|(g&240)>>4);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((g&15)<<2|(f&192)>>6);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(f&63)}return c};
-Editor.prototype.loadUrl=function(a,c,b,e,d,g,f,k){try{var l=!f&&(e||/(\.png)($|\?)/i.test(a)||/(\.jpe?g)($|\?)/i.test(a)||/(\.gif)($|\?)/i.test(a)||/(\.pdf)($|\?)/i.test(a));d=null!=d?d:!0;var n=mxUtils.bind(this,function(){mxUtils.get(a,mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus()){if(null!=c){var e=a.getText();if(l){if((9==document.documentMode||10==document.documentMode)&&"undefined"!==typeof window.mxUtilsBinaryToArray){a=mxUtilsBinaryToArray(a.request.responseBody).toArray();
-for(var e=Array(a.length),d=0;d<a.length;d++)e[d]=String.fromCharCode(a[d]);e=e.join("")}g=null!=g?g:"data:image/png;base64,";e=g+Editor.base64Encode(e)}c(e)}}else null!=b&&(0==a.getStatus()?b({message:mxResources.get("accessDenied")},a):b({message:mxResources.get("error")+" "+a.getStatus()},a))}),function(a){null!=b&&b({message:mxResources.get("error")+" "+a.getStatus()})},l,this.timeout,function(){d&&null!=b&&b({code:App.ERROR_TIMEOUT,retry:n})},k)});n()}catch(ea){null!=b&&b(ea)}};Editor.prototype.absoluteCssFonts=
-function(a){var c=null;if(null!=a){var b=a.split("url(");if(0<b.length){c=[b[0]];a=window.location.pathname;var e=null!=a?a.lastIndexOf("/"):-1;0<=e&&(a=a.substring(0,e+1));var e=document.getElementsByTagName("base"),d=null;null!=e&&0<e.length&&(d=e[0].getAttribute("href"));for(var g=1;g<b.length;g++)if(e=b[g].indexOf(")"),0<e){var f=Editor.trimCssUrl(b[g].substring(0,e));this.graph.isRelativeUrl(f)&&(f=null!=d?d+f:window.location.protocol+"//"+window.location.hostname+("/"==f.charAt(0)?"":a)+f);
-c.push('url("'+f+'"'+b[g].substring(e))}else c.push(b[g])}else c=[a]}return null!=c?c.join(""):null};Editor.prototype.embedCssFonts=function(a,c){var b=a.split("url("),e=0;null==this.cachedFonts&&(this.cachedFonts={});var d=mxUtils.bind(this,function(){if(0==e){for(var a=[b[0]],d=1;d<b.length;d++){var g=b[d].indexOf(")");a.push('url("');a.push(this.cachedFonts[Editor.trimCssUrl(b[d].substring(0,g))]);a.push('"'+b[d].substring(g))}c(a.join(""))}});if(0<b.length){for(var g=1;g<b.length;g++){var f=b[g].indexOf(")"),
-k=null,l=b[g].indexOf("format(",f);0<l&&(k=Editor.trimCssUrl(b[g].substring(l+7,b[g].indexOf(")",l))));mxUtils.bind(this,function(a){if(null==this.cachedFonts[a]){this.cachedFonts[a]=a;e++;var c="application/x-font-ttf";if("svg"==k||/(\.svg)($|\?)/i.test(a))c="image/svg+xml";else if("otf"==k||"embedded-opentype"==k||/(\.otf)($|\?)/i.test(a))c="application/x-font-opentype";else if("woff"==k||/(\.woff)($|\?)/i.test(a))c="application/font-woff";else if("woff2"==k||/(\.woff2)($|\?)/i.test(a))c="application/font-woff2";
-else if("eot"==k||/(\.eot)($|\?)/i.test(a))c="application/vnd.ms-fontobject";else if("sfnt"==k||/(\.sfnt)($|\?)/i.test(a))c="application/font-sfnt";var b=a;/^https?:\/\//.test(b)&&!this.isCorsEnabledForUrl(b)&&(b=PROXY_URL+"?url="+encodeURIComponent(a));this.loadUrl(b,mxUtils.bind(this,function(c){this.cachedFonts[a]=c;e--;d()}),mxUtils.bind(this,function(a){e--;d()}),!0,null,"data:"+c+";charset=utf-8;base64,")}})(Editor.trimCssUrl(b[g].substring(0,f)),k)}d()}else c(a)};Editor.prototype.loadFonts=
-function(a){null!=this.fontCss&&null==this.resolvedFontCss?this.embedCssFonts(this.fontCss,mxUtils.bind(this,function(c){this.resolvedFontCss=c;a()})):a()};Editor.prototype.embedExtFonts=function(a){var c=this.graph.getCustomFonts();if(0<c.length){var b="",e=0;null==this.cachedGoogleFonts&&(this.cachedGoogleFonts={});for(var d=mxUtils.bind(this,function(){0==e&&this.embedCssFonts(b,a)}),g=0;g<c.length;g++)mxUtils.bind(this,function(a,c){Graph.isCssFontUrl(c)?null==this.cachedGoogleFonts[c]?(e++,this.loadUrl(c,
-mxUtils.bind(this,function(a){this.cachedGoogleFonts[c]=a;b+=a;e--;d()}),mxUtils.bind(this,function(a){e--;b+="@import url("+c+");";d()}))):b+=this.cachedGoogleFonts[c]:b+='@font-face {font-family: "'+a+'";src: url("'+c+'")}'})(c[g].name,c[g].url);d()}else a()};Editor.prototype.addMathCss=function(a){a=a.getElementsByTagName("defs");if(null!=a&&0<a.length)for(var c=document.getElementsByTagName("style"),b=0;b<c.length;b++)0<mxUtils.getTextContent(c[b]).indexOf("MathJax")&&a[0].appendChild(c[b].cloneNode(!0))};
+function(){window.clearTimeout(e);b&&c(Editor.svgBrokenImage.src)});else{var d=new Image;this.crossOriginImages&&(d.crossOrigin="anonymous");d.onload=function(){window.clearTimeout(e);if(b)try{var a=document.createElement("canvas"),k=a.getContext("2d");a.height=d.height;a.width=d.width;k.drawImage(d,0,0);c(a.toDataURL())}catch(Z){c(Editor.svgBrokenImage.src)}};d.onerror=function(){window.clearTimeout(e);b&&c(Editor.svgBrokenImage.src)};d.src=a}}catch(W){c(Editor.svgBrokenImage.src)}};Editor.prototype.convertImages=
+function(a,c,b,e){null==e&&(e=this.createImageUrlConverter());var d=0,k=b||{};b=mxUtils.bind(this,function(b,f){for(var g=a.getElementsByTagName(b),l=0;l<g.length;l++)mxUtils.bind(this,function(b){try{if(null!=b){var g=e.convert(b.getAttribute(f));if(null!=g&&"data:"!=g.substring(0,5)){var l=k[g];null==l?(d++,this.convertImageToDataUri(g,function(e){null!=e&&(k[g]=e,b.setAttribute(f,e));d--;0==d&&c(a)})):b.setAttribute(f,l)}else null!=g&&b.setAttribute(f,g)}}catch(ba){}})(g[l])});b("image","xlink:href");
+b("img","src");0==d&&c(a)};Editor.base64Encode=function(a){for(var c="",b=0,e=a.length,d,k,f;b<e;){d=a.charCodeAt(b++)&255;if(b==e){c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(d>>2);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((d&3)<<4);c+="==";break}k=a.charCodeAt(b++);if(b==e){c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(d>>2);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((d&
+3)<<4|(k&240)>>4);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((k&15)<<2);c+="=";break}f=a.charCodeAt(b++);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(d>>2);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((d&3)<<4|(k&240)>>4);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((k&15)<<2|(f&192)>>6);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(f&63)}return c};
+Editor.prototype.loadUrl=function(a,c,b,e,d,k,f,g){try{var l=!f&&(e||/(\.png)($|\?)/i.test(a)||/(\.jpe?g)($|\?)/i.test(a)||/(\.gif)($|\?)/i.test(a)||/(\.pdf)($|\?)/i.test(a));d=null!=d?d:!0;var n=mxUtils.bind(this,function(){mxUtils.get(a,mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus()){if(null!=c){var e=a.getText();if(l){if((9==document.documentMode||10==document.documentMode)&&"undefined"!==typeof window.mxUtilsBinaryToArray){a=mxUtilsBinaryToArray(a.request.responseBody).toArray();
+for(var e=Array(a.length),d=0;d<a.length;d++)e[d]=String.fromCharCode(a[d]);e=e.join("")}k=null!=k?k:"data:image/png;base64,";e=k+Editor.base64Encode(e)}c(e)}}else null!=b&&(0==a.getStatus()?b({message:mxResources.get("accessDenied")},a):b({message:mxResources.get("error")+" "+a.getStatus()},a))}),function(a){null!=b&&b({message:mxResources.get("error")+" "+a.getStatus()})},l,this.timeout,function(){d&&null!=b&&b({code:App.ERROR_TIMEOUT,retry:n})},g)});n()}catch(da){null!=b&&b(da)}};Editor.prototype.absoluteCssFonts=
+function(a){var c=null;if(null!=a){var b=a.split("url(");if(0<b.length){c=[b[0]];a=window.location.pathname;var e=null!=a?a.lastIndexOf("/"):-1;0<=e&&(a=a.substring(0,e+1));var e=document.getElementsByTagName("base"),d=null;null!=e&&0<e.length&&(d=e[0].getAttribute("href"));for(var k=1;k<b.length;k++)if(e=b[k].indexOf(")"),0<e){var f=Editor.trimCssUrl(b[k].substring(0,e));this.graph.isRelativeUrl(f)&&(f=null!=d?d+f:window.location.protocol+"//"+window.location.hostname+("/"==f.charAt(0)?"":a)+f);
+c.push('url("'+f+'"'+b[k].substring(e))}else c.push(b[k])}else c=[a]}return null!=c?c.join(""):null};Editor.prototype.embedCssFonts=function(a,c){var b=a.split("url("),e=0;null==this.cachedFonts&&(this.cachedFonts={});var d=mxUtils.bind(this,function(){if(0==e){for(var a=[b[0]],d=1;d<b.length;d++){var k=b[d].indexOf(")");a.push('url("');a.push(this.cachedFonts[Editor.trimCssUrl(b[d].substring(0,k))]);a.push('"'+b[d].substring(k))}c(a.join(""))}});if(0<b.length){for(var k=1;k<b.length;k++){var f=b[k].indexOf(")"),
+g=null,l=b[k].indexOf("format(",f);0<l&&(g=Editor.trimCssUrl(b[k].substring(l+7,b[k].indexOf(")",l))));mxUtils.bind(this,function(a){if(null==this.cachedFonts[a]){this.cachedFonts[a]=a;e++;var c="application/x-font-ttf";if("svg"==g||/(\.svg)($|\?)/i.test(a))c="image/svg+xml";else if("otf"==g||"embedded-opentype"==g||/(\.otf)($|\?)/i.test(a))c="application/x-font-opentype";else if("woff"==g||/(\.woff)($|\?)/i.test(a))c="application/font-woff";else if("woff2"==g||/(\.woff2)($|\?)/i.test(a))c="application/font-woff2";
+else if("eot"==g||/(\.eot)($|\?)/i.test(a))c="application/vnd.ms-fontobject";else if("sfnt"==g||/(\.sfnt)($|\?)/i.test(a))c="application/font-sfnt";var b=a;/^https?:\/\//.test(b)&&!this.isCorsEnabledForUrl(b)&&(b=PROXY_URL+"?url="+encodeURIComponent(a));this.loadUrl(b,mxUtils.bind(this,function(c){this.cachedFonts[a]=c;e--;d()}),mxUtils.bind(this,function(a){e--;d()}),!0,null,"data:"+c+";charset=utf-8;base64,")}})(Editor.trimCssUrl(b[k].substring(0,f)),g)}d()}else c(a)};Editor.prototype.loadFonts=
+function(a){null!=this.fontCss&&null==this.resolvedFontCss?this.embedCssFonts(this.fontCss,mxUtils.bind(this,function(c){this.resolvedFontCss=c;a()})):a()};Editor.prototype.embedExtFonts=function(a){var c=this.graph.getCustomFonts();if(0<c.length){var b="",e=0;null==this.cachedGoogleFonts&&(this.cachedGoogleFonts={});for(var d=mxUtils.bind(this,function(){0==e&&this.embedCssFonts(b,a)}),k=0;k<c.length;k++)mxUtils.bind(this,function(a,c){Graph.isCssFontUrl(c)?null==this.cachedGoogleFonts[c]?(e++,this.loadUrl(c,
+mxUtils.bind(this,function(a){this.cachedGoogleFonts[c]=a;b+=a;e--;d()}),mxUtils.bind(this,function(a){e--;b+="@import url("+c+");";d()}))):b+=this.cachedGoogleFonts[c]:b+='@font-face {font-family: "'+a+'";src: url("'+c+'")}'})(c[k].name,c[k].url);d()}else a()};Editor.prototype.addMathCss=function(a){a=a.getElementsByTagName("defs");if(null!=a&&0<a.length)for(var c=document.getElementsByTagName("style"),b=0;b<c.length;b++)0<mxUtils.getTextContent(c[b]).indexOf("MathJax")&&a[0].appendChild(c[b].cloneNode(!0))};
Editor.prototype.addFontCss=function(a,c){c=null!=c?c:this.absoluteCssFonts(this.fontCss);if(null!=c){var b=a.getElementsByTagName("defs"),e=a.ownerDocument;0==b.length?(b=null!=e.createElementNS?e.createElementNS(mxConstants.NS_SVG,"defs"):e.createElement("defs"),null!=a.firstChild?a.insertBefore(b,a.firstChild):a.appendChild(b)):b=b[0];e=null!=e.createElementNS?e.createElementNS(mxConstants.NS_SVG,"style"):e.createElement("style");e.setAttribute("type","text/css");mxUtils.setTextContent(e,c);b.appendChild(e)}};
-Editor.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||this.useCanvasForExport};Editor.prototype.getMaxCanvasScale=function(a,c,b){var e=mxClient.IS_FF?8192:16384;return Math.min(b,Math.min(e/a,e/c))};Editor.prototype.exportToCanvas=function(a,c,b,e,d,g,f,k,l,n,q,m,u,t,x,p,z,A){try{g=null!=g?g:!0;f=null!=f?f:!0;m=null!=m?m:this.graph;u=null!=u?u:0;var v=l?null:m.background;v==mxConstants.NONE&&(v=null);null==v&&(v=e);null==v&&0==l&&(v=p?this.graph.defaultPageBackgroundColor:"#ffffff");
-this.convertImages(m.getSvg(null,null,u,t,null,f,null,null,null,n,null,p,z,A),mxUtils.bind(this,function(b){try{var e=new Image;e.onload=mxUtils.bind(this,function(){try{var f=function(){mxClient.IS_SF?window.setTimeout(function(){t.drawImage(e,0,0);a(l,b)},0):(t.drawImage(e,0,0),a(l,b))},l=document.createElement("canvas"),n=parseInt(b.getAttribute("width")),q=parseInt(b.getAttribute("height"));k=null!=k?k:1;null!=c&&(k=g?Math.min(1,Math.min(3*c/(4*q),c/n)):c/n);k=this.getMaxCanvasScale(n,q,k);n=
-Math.ceil(k*n);q=Math.ceil(k*q);l.setAttribute("width",n);l.setAttribute("height",q);var t=l.getContext("2d");null!=v&&(t.beginPath(),t.rect(0,0,n,q),t.fillStyle=v,t.fill());1!=k&&t.scale(k,k);if(x){var p=m.view,z=p.scale;p.scale=1;var D=btoa(unescape(encodeURIComponent(p.createSvgGrid(p.gridColor))));p.scale=z;var D="data:image/svg+xml;base64,"+D,B=m.gridSize*p.gridSteps*k,A=m.getGraphBounds(),C=p.translate.x*z,N=p.translate.y*z,L=C+(A.x-C)/z-u,E=N+(A.y-N)/z-u,J=new Image;J.onload=function(){try{for(var a=
--Math.round(B-mxUtils.mod((C-L)*k,B)),c=-Math.round(B-mxUtils.mod((N-E)*k,B));a<n;a+=B)for(var b=c;b<q;b+=B)t.drawImage(J,a/k,b/k);f()}catch(xa){null!=d&&d(xa)}};J.onerror=function(a){null!=d&&d(a)};J.src=D}else f()}catch(wa){null!=d&&d(wa)}});e.onerror=function(a){null!=d&&d(a)};n&&this.graph.addSvgShadow(b);this.graph.mathEnabled&&this.addMathCss(b);var f=mxUtils.bind(this,function(){try{null!=this.resolvedFontCss&&this.addFontCss(b,this.resolvedFontCss),e.src=Editor.createSvgDataUri(mxUtils.getXml(b))}catch(R){null!=
-d&&d(R)}});this.embedExtFonts(mxUtils.bind(this,function(a){try{null!=a&&this.addFontCss(b,a),this.loadFonts(f)}catch(ka){null!=d&&d(ka)}}))}catch(R){null!=d&&d(R)}}),b,q)}catch(da){null!=d&&d(da)}};Editor.crcTable=[];for(var f=0;256>f;f++)for(var m=f,p=0;8>p;p++)m=1==(m&1)?3988292384^m>>>1:m>>>1,Editor.crcTable[f]=m;Editor.updateCRC=function(a,c,b,e){for(var d=0;d<e;d++)a=Editor.crcTable[(a^c.charCodeAt(b+d))&255]^a>>>8;return a};Editor.crc32=function(a){for(var c=-1,b=0;b<a.length;b++)c=c>>>8^Editor.crcTable[(c^
-a.charCodeAt(b))&255];return(c^-1)>>>0};Editor.writeGraphModelToPng=function(a,c,b,e,d){function g(a,c){var b=l;l+=c;return a.substring(b,l)}function f(a){a=g(a,4);return a.charCodeAt(3)+(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}function k(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)}a=a.substring(a.indexOf(",")+1);a=window.atob?atob(a):Base64.decode(a,!0);var l=0;if(g(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=d&&d();else if(g(a,
-4),"IHDR"!=g(a,4))null!=d&&d();else{g(a,17);d=a.substring(0,l);do{var n=f(a);if("IDAT"==g(a,4)){d=a.substring(0,l-8);"pHYs"==c&&"dpi"==b?(b=Math.round(e/.0254),b=k(b)+k(b)+String.fromCharCode(1)):b=b+String.fromCharCode(0)+("zTXt"==c?String.fromCharCode(0):"")+e;e=4294967295;e=Editor.updateCRC(e,c,0,4);e=Editor.updateCRC(e,b,0,b.length);d+=k(b.length)+c+b+k(e^4294967295);d+=a.substring(l-8,a.length);break}d+=a.substring(l-8,l-4+n);g(a,n);g(a,4)}while(n);return"data:image/png;base64,"+(window.btoa?
+Editor.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||this.useCanvasForExport};Editor.prototype.getMaxCanvasScale=function(a,c,b){var e=mxClient.IS_FF?8192:16384;return Math.min(b,Math.min(e/a,e/c))};Editor.prototype.exportToCanvas=function(a,c,b,e,d,k,f,g,l,n,q,u,t,m,x,p,z,A){try{k=null!=k?k:!0;f=null!=f?f:!0;u=null!=u?u:this.graph;t=null!=t?t:0;var v=l?null:u.background;v==mxConstants.NONE&&(v=null);null==v&&(v=e);null==v&&0==l&&(v=p?this.graph.defaultPageBackgroundColor:"#ffffff");
+this.convertImages(u.getSvg(null,null,t,m,null,f,null,null,null,n,null,p,z,A),mxUtils.bind(this,function(b){try{var e=new Image;e.onload=mxUtils.bind(this,function(){try{var f=function(){mxClient.IS_SF?window.setTimeout(function(){m.drawImage(e,0,0);a(l,b)},0):(m.drawImage(e,0,0),a(l,b))},l=document.createElement("canvas"),n=parseInt(b.getAttribute("width")),q=parseInt(b.getAttribute("height"));g=null!=g?g:1;null!=c&&(g=k?Math.min(1,Math.min(3*c/(4*q),c/n)):c/n);g=this.getMaxCanvasScale(n,q,g);n=
+Math.ceil(g*n);q=Math.ceil(g*q);l.setAttribute("width",n);l.setAttribute("height",q);var m=l.getContext("2d");null!=v&&(m.beginPath(),m.rect(0,0,n,q),m.fillStyle=v,m.fill());1!=g&&m.scale(g,g);if(x){var p=u.view,z=p.scale;p.scale=1;var B=btoa(unescape(encodeURIComponent(p.createSvgGrid(p.gridColor))));p.scale=z;var B="data:image/svg+xml;base64,"+B,C=u.gridSize*p.gridSteps*g,A=u.getGraphBounds(),D=p.translate.x*z,N=p.translate.y*z,L=D+(A.x-D)/z-t,E=N+(A.y-N)/z-t,J=new Image;J.onload=function(){try{for(var a=
+-Math.round(C-mxUtils.mod((D-L)*g,C)),c=-Math.round(C-mxUtils.mod((N-E)*g,C));a<n;a+=C)for(var b=c;b<q;b+=C)m.drawImage(J,a/g,b/g);f()}catch(wa){null!=d&&d(wa)}};J.onerror=function(a){null!=d&&d(a)};J.src=B}else f()}catch(va){null!=d&&d(va)}});e.onerror=function(a){null!=d&&d(a)};n&&this.graph.addSvgShadow(b);this.graph.mathEnabled&&this.addMathCss(b);var f=mxUtils.bind(this,function(){try{null!=this.resolvedFontCss&&this.addFontCss(b,this.resolvedFontCss),e.src=Editor.createSvgDataUri(mxUtils.getXml(b))}catch(R){null!=
+d&&d(R)}});this.embedExtFonts(mxUtils.bind(this,function(a){try{null!=a&&this.addFontCss(b,a),this.loadFonts(f)}catch(ka){null!=d&&d(ka)}}))}catch(R){null!=d&&d(R)}}),b,q)}catch(ca){null!=d&&d(ca)}};Editor.crcTable=[];for(var f=0;256>f;f++)for(var m=f,p=0;8>p;p++)m=1==(m&1)?3988292384^m>>>1:m>>>1,Editor.crcTable[f]=m;Editor.updateCRC=function(a,c,b,e){for(var d=0;d<e;d++)a=Editor.crcTable[(a^c.charCodeAt(b+d))&255]^a>>>8;return a};Editor.crc32=function(a){for(var c=-1,b=0;b<a.length;b++)c=c>>>8^Editor.crcTable[(c^
+a.charCodeAt(b))&255];return(c^-1)>>>0};Editor.writeGraphModelToPng=function(a,c,b,e,d){function k(a,c){var b=l;l+=c;return a.substring(b,l)}function f(a){a=k(a,4);return a.charCodeAt(3)+(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}function g(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)}a=a.substring(a.indexOf(",")+1);a=window.atob?atob(a):Base64.decode(a,!0);var l=0;if(k(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=d&&d();else if(k(a,
+4),"IHDR"!=k(a,4))null!=d&&d();else{k(a,17);d=a.substring(0,l);do{var n=f(a);if("IDAT"==k(a,4)){d=a.substring(0,l-8);"pHYs"==c&&"dpi"==b?(b=Math.round(e/.0254),b=g(b)+g(b)+String.fromCharCode(1)):b=b+String.fromCharCode(0)+("zTXt"==c?String.fromCharCode(0):"")+e;e=4294967295;e=Editor.updateCRC(e,c,0,4);e=Editor.updateCRC(e,b,0,b.length);d+=g(b.length)+c+b+g(e^4294967295);d+=a.substring(l-8,a.length);break}d+=a.substring(l-8,l-4+n);k(a,n);k(a,4)}while(n);return"data:image/png;base64,"+(window.btoa?
btoa(d):Base64.encode(d,!0))}};if(window.ColorDialog){FilenameDialog.filenameHelpLink="https://www.diagrams.net/doc/faq/save-file-formats";var c=ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(a,b){c.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()};var e=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=function(){e.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()}}window.EditDataDialog&&
-(EditDataDialog.getDisplayIdForCell=function(a,c){var b=null;null!=a.editor.graph.getModel().getParent(c)?b=c.getId():null!=a.currentPage&&(b=a.currentPage.getId());return b});if(null!=window.StyleFormatPanel){var g=Format.prototype.init;Format.prototype.init=function(){g.apply(this,arguments);this.editorUi.editor.addListener("fileLoaded",this.update)};var n=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed||this.editorUi.editor.chromeless?
+(EditDataDialog.getDisplayIdForCell=function(a,c){var b=null;null!=a.editor.graph.getModel().getParent(c)?b=c.getId():null!=a.currentPage&&(b=a.currentPage.getId());return b});if(null!=window.StyleFormatPanel){var k=Format.prototype.init;Format.prototype.init=function(){k.apply(this,arguments);this.editorUi.editor.addListener("fileLoaded",this.update)};var n=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed||this.editorUi.editor.chromeless?
n.apply(this,arguments):this.clear()};DiagramFormatPanel.prototype.isShadowOptionVisible=function(){var a=this.editorUi.getCurrentFile();return"1"==urlParams.embed||null!=a&&a.isEditable()};DiagramFormatPanel.prototype.isMathOptionVisible=function(a){return!1};var l=DiagramFormatPanel.prototype.addView;DiagramFormatPanel.prototype.addView=function(a){a=l.apply(this,arguments);this.editorUi.getCurrentFile();if(mxClient.IS_SVG&&this.isShadowOptionVisible()){var c=this.editorUi,b=c.editor.graph,e=this.createOption(mxResources.get("shadow"),
function(){return b.shadowVisible},function(a){var e=new ChangePageSetup(c);e.ignoreColor=!0;e.ignoreImage=!0;e.shadowVisible=a;b.model.execute(e)},{install:function(a){this.listener=function(){a(b.shadowVisible)};c.addListener("shadowVisibleChanged",this.listener)},destroy:function(){c.removeListener(this.listener)}});Editor.shadowOptionEnabled||(e.getElementsByTagName("input")[0].setAttribute("disabled","disabled"),mxUtils.setOpacity(e,60));a.appendChild(e)}return a};var q=DiagramFormatPanel.prototype.addOptions;
DiagramFormatPanel.prototype.addOptions=function(a){a=q.apply(this,arguments);var c=this.editorUi,b=c.editor.graph;if(b.isEnabled()){var e=c.getCurrentFile();if(null!=e&&e.isAutosaveOptional()){var d=this.createOption(mxResources.get("autosave"),function(){return c.editor.autosave},function(a){c.editor.setAutosave(a);c.editor.autosave&&e.isModified()&&e.fileChanged()},{install:function(a){this.listener=function(){a(c.editor.autosave)};c.editor.addListener("autosaveChanged",this.listener)},destroy:function(){c.editor.removeListener(this.listener)}});
-a.appendChild(d)}}if(this.isMathOptionVisible()&&b.isEnabled()&&"undefined"!==typeof MathJax){d=this.createOption(mxResources.get("mathematicalTypesetting"),function(){return b.mathEnabled},function(a){c.actions.get("mathematicalTypesetting").funct()},{install:function(a){this.listener=function(){a(b.mathEnabled)};c.addListener("mathEnabledChanged",this.listener)},destroy:function(){c.removeListener(this.listener)}});d.style.paddingTop="5px";a.appendChild(d);var g=c.menus.createHelpLink("https://www.diagrams.net/doc/faq/math-typesetting");
-g.style.position="relative";g.style.marginLeft="6px";g.style.top="2px";d.appendChild(g)}return a};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=
+a.appendChild(d)}}if(this.isMathOptionVisible()&&b.isEnabled()&&"undefined"!==typeof MathJax){d=this.createOption(mxResources.get("mathematicalTypesetting"),function(){return b.mathEnabled},function(a){c.actions.get("mathematicalTypesetting").funct()},{install:function(a){this.listener=function(){a(b.mathEnabled)};c.addListener("mathEnabledChanged",this.listener)},destroy:function(){c.removeListener(this.listener)}});d.style.paddingTop="5px";a.appendChild(d);var k=c.menus.createHelpLink("https://www.diagrams.net/doc/faq/math-typesetting");
+k.style.position="relative";k.style.marginLeft="6px";k.style.top="2px";d.appendChild(k)}return a};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=
@@ -3193,38 +3194,38 @@ stroke:"#6c8ebf"},{fill:"#d5e8d4",stroke:"#82b366"},{fill:"#ffe6cc",stroke:"#d79
{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(a,c,b){if(null!=c){var e=function(a){if(null!=a)if(b)for(var e=
-0;e<a.length;e++)c[a[e].name]=a[e];else for(var d in c){for(var g=!1,e=0;e<a.length;e++)if(a[e].name==d&&a[e].type==c[d].type){g=!0;break}g||delete c[d]}},d=this.editorUi.editor.graph.view.getState(a);null!=d&&null!=d.shape&&(d.shape.commonCustomPropAdded||(d.shape.commonCustomPropAdded=!0,d.shape.customProperties=d.shape.customProperties||[],d.cell.vertex?Array.prototype.push.apply(d.shape.customProperties,Editor.commonVertexProperties):Array.prototype.push.apply(d.shape.customProperties,Editor.commonEdgeProperties)),
+0;e<a.length;e++)c[a[e].name]=a[e];else for(var d in c){for(var k=!1,e=0;e<a.length;e++)if(a[e].name==d&&a[e].type==c[d].type){k=!0;break}k||delete c[d]}},d=this.editorUi.editor.graph.view.getState(a);null!=d&&null!=d.shape&&(d.shape.commonCustomPropAdded||(d.shape.commonCustomPropAdded=!0,d.shape.customProperties=d.shape.customProperties||[],d.cell.vertex?Array.prototype.push.apply(d.shape.customProperties,Editor.commonVertexProperties):Array.prototype.push.apply(d.shape.customProperties,Editor.commonEdgeProperties)),
e(d.shape.customProperties));a=a.getAttribute("customProperties");if(null!=a)try{e(JSON.parse(a))}catch(W){}}};var u=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){var a=this.format.getSelectionState();"image"!=a.style.shape&&!a.containsLabel&&0<a.cells.length&&this.container.appendChild(this.addStyles(this.createPanel()));u.apply(this,arguments);if(Editor.enableCustomProperties){for(var c={},b=a.vertices,e=a.edges,d=0;d<b.length;d++)this.findCommonProperties(b[d],c,0==
d);for(d=0;d<e.length;d++)this.findCommonProperties(e[d],c,0==b.length&&0==d);null!=Object.getOwnPropertyNames&&0<Object.getOwnPropertyNames(c).length&&this.container.appendChild(this.addProperties(this.createPanel(),c,a))}};var t=StyleFormatPanel.prototype.addStyleOps;StyleFormatPanel.prototype.addStyleOps=function(a){var c=this.format.getSelectionState(),b=mxUtils.button(mxResources.get("copyStyle"),mxUtils.bind(this,function(a){this.editorUi.actions.get("copyStyle").funct()}));b.setAttribute("title",
mxResources.get("copyStyle")+" ("+this.editorUi.actions.get("copyStyle").shortcut+")");b.style.marginBottom="2px";b.style.width="100px";b.style.marginRight="2px";a.appendChild(b);0<c.cells.length?(b=mxUtils.button(mxResources.get("pasteStyle"),mxUtils.bind(this,function(a){this.editorUi.actions.get("pasteStyle").funct()})),b.setAttribute("title",mxResources.get("pasteStyle")+" ("+this.editorUi.actions.get("pasteStyle").shortcut+")"),b.style.marginBottom="2px",b.style.width="100px",a.appendChild(b)):
-b.style.width="202px";mxUtils.br(a);return t.apply(this,arguments)};EditorUi.prototype.propertiesCollapsed=!0;StyleFormatPanel.prototype.addProperties=function(a,c,b){function e(a,c,b,e){m.getModel().beginUpdate();try{var d=[],g=[];if(null!=b.index){for(var f=[],k=b.parentRow.nextSibling;k&&k.getAttribute("data-pName")==a;)f.push(k.getAttribute("data-pValue")),k=k.nextSibling;b.index<f.length?null!=e?f.splice(e,1):f[b.index]=c:f.push(c);null!=b.size&&f.length>b.size&&(f=f.slice(0,b.size));c=f.join(",");
-null!=b.countProperty&&(m.setCellStyles(b.countProperty,f.length,m.getSelectionCells()),d.push(b.countProperty),g.push(f.length))}m.setCellStyles(a,c,m.getSelectionCells());d.push(a);g.push(c);if(null!=b.dependentProps)for(a=0;a<b.dependentProps.length;a++){var l=b.dependentPropsDefVal[a],n=b.dependentPropsVals[a];if(n.length>c)n=n.slice(0,c);else for(var u=n.length;u<c;u++)n.push(l);n=n.join(",");m.setCellStyles(b.dependentProps[a],n,m.getSelectionCells());d.push(b.dependentProps[a]);g.push(n)}if("function"==
-typeof b.onChange)b.onChange(m,c);q.editorUi.fireEvent(new mxEventObject("styleChanged","keys",d,"values",g,"cells",m.getSelectionCells()))}finally{m.getModel().endUpdate()}}function d(c,b,e){var d=mxUtils.getOffset(a,!0),g=mxUtils.getOffset(c,!0);b.style.position="absolute";b.style.left=g.x-d.x+"px";b.style.top=g.y-d.y+"px";b.style.width=c.offsetWidth+"px";b.style.height=c.offsetHeight-(e?4:0)+"px";b.style.zIndex=5}function g(a,c,b){var d=document.createElement("div");d.style.width="32px";d.style.height=
-"4px";d.style.margin="2px";d.style.border="1px solid black";d.style.background=c&&"none"!=c?c:"url('"+Dialog.prototype.noColorImage+"')";btn=mxUtils.button("",mxUtils.bind(q,function(g){this.editorUi.pickColor(c,function(c){d.style.background="none"==c?"url('"+Dialog.prototype.noColorImage+"')":c;e(a,c,b)});mxEvent.consume(g)}));btn.style.height="12px";btn.style.width="40px";btn.className="geColorBtn";btn.appendChild(d);return btn}function f(a,c,b,d,g,f,k){null!=c&&(c=c.split(","),u.push({name:a,
-values:c,type:b,defVal:d,countProperty:g,parentRow:f,isDeletable:!0,flipBkg:k}));btn=mxUtils.button("+",mxUtils.bind(q,function(c){for(var l=f,q=0;null!=l.nextSibling;)if(l.nextSibling.getAttribute("data-pName")==a)l=l.nextSibling,q++;else break;var m={type:b,parentRow:f,index:q,isDeletable:!0,defVal:d,countProperty:g},q=n(a,"",m,0==q%2,k);e(a,d,m);l.parentNode.insertBefore(q,l.nextSibling);mxEvent.consume(c)}));btn.style.height="16px";btn.style.width="25px";btn.className="geColorBtn";return btn}
-function k(a,c,b,e,d,g,f){if(0<d){var k=Array(d);c=null!=c?c.split(","):[];for(var l=0;l<d;l++)k[l]=null!=c[l]?c[l]:null!=e?e:"";u.push({name:a,values:k,type:b,defVal:e,parentRow:g,flipBkg:f,size:d})}return document.createElement("div")}function l(a,c,b){var d=document.createElement("input");d.type="checkbox";d.checked="1"==c;mxEvent.addListener(d,"change",function(){e(a,d.checked?"1":"0",b)});return d}function n(c,b,n,m,u){var v=n.dispName,t=n.type,x=document.createElement("tr");x.className="gePropRow"+
-(u?"Dark":"")+(m?"Alt":"")+" gePropNonHeaderRow";x.setAttribute("data-pName",c);x.setAttribute("data-pValue",b);m=!1;null!=n.index&&(x.setAttribute("data-index",n.index),v=(null!=v?v:"")+"["+n.index+"]",m=!0);var p=document.createElement("td");p.className="gePropRowCell";p.innerHTML=mxUtils.htmlEntities(mxResources.get(v,null,v));m&&(p.style.textAlign="right");x.appendChild(p);p=document.createElement("td");p.className="gePropRowCell";if("color"==t)p.appendChild(g(c,b,n));else if("bool"==t||"boolean"==
-t)p.appendChild(l(c,b,n));else if("enum"==t){var z=n.enumList;for(u=0;u<z.length;u++)if(v=z[u],v.val==b){p.innerHTML=mxUtils.htmlEntities(mxResources.get(v.dispName,null,v.dispName));break}mxEvent.addListener(p,"click",mxUtils.bind(q,function(){var g=document.createElement("select");d(p,g);for(var f=0;f<z.length;f++){var k=z[f],l=document.createElement("option");l.value=mxUtils.htmlEntities(k.val);l.innerHTML=mxUtils.htmlEntities(mxResources.get(k.dispName,null,k.dispName));g.appendChild(l)}g.value=
-b;a.appendChild(g);mxEvent.addListener(g,"change",function(){var a=mxUtils.htmlEntities(g.value);e(c,a,n)});g.focus();mxEvent.addListener(g,"blur",function(){a.removeChild(g)})}))}else"dynamicArr"==t?p.appendChild(f(c,b,n.subType,n.subDefVal,n.countProperty,x,u)):"staticArr"==t?p.appendChild(k(c,b,n.subType,n.subDefVal,n.size,x,u)):"readOnly"==t?(u=document.createElement("input"),u.setAttribute("readonly",""),u.value=b,u.style.width="96px",u.style.borderWidth="0px",p.appendChild(u)):(p.innerHTML=
-b,mxEvent.addListener(p,"click",mxUtils.bind(q,function(){function g(){var a=f.value,a=0==a.length&&"string"!=t?0:a;n.allowAuto&&(null!=a.trim&&"auto"==a.trim().toLowerCase()?(a="auto",t="string"):(a=parseFloat(a),a=isNaN(a)?0:a));null!=n.min&&a<n.min?a=n.min:null!=n.max&&a>n.max&&(a=n.max);a=mxUtils.htmlEntities(("int"==t?parseInt(a):a)+"");e(c,a,n)}var f=document.createElement("input");d(p,f,!0);f.value=b;f.className="gePropEditor";"int"!=t&&"float"!=t||n.allowAuto||(f.type="number",f.step="int"==
-t?"1":"any",null!=n.min&&(f.min=parseFloat(n.min)),null!=n.max&&(f.max=parseFloat(n.max)));a.appendChild(f);mxEvent.addListener(f,"keypress",function(a){13==a.keyCode&&g()});f.focus();mxEvent.addListener(f,"blur",function(){g()})})));n.isDeletable&&(u=mxUtils.button("-",mxUtils.bind(q,function(a){e(c,"",n,n.index);mxEvent.consume(a)})),u.style.height="16px",u.style.width="25px",u.style["float"]="right",u.className="geColorBtn",p.appendChild(u));x.appendChild(p);return x}var q=this,m=this.editorUi.editor.graph,
-u=[];a.style.position="relative";a.style.padding="0";var v=document.createElement("table");v.className="geProperties";v.style.whiteSpace="nowrap";v.style.width="100%";var t=document.createElement("tr");t.className="gePropHeader";var x=document.createElement("th");x.className="gePropHeaderCell";var p=document.createElement("img");p.src=Sidebar.prototype.expandedImage;x.appendChild(p);mxUtils.write(x,mxResources.get("property"));t.style.cursor="pointer";var z=function(){var c=v.querySelectorAll(".gePropNonHeaderRow"),
-b;if(q.editorUi.propertiesCollapsed){p.src=Sidebar.prototype.collapsedImage;b="none";for(var e=a.childNodes.length-1;0<=e;e--)try{var d=a.childNodes[e],g=d.nodeName.toUpperCase();"INPUT"!=g&&"SELECT"!=g||a.removeChild(d)}catch(ya){}}else p.src=Sidebar.prototype.expandedImage,b="";for(e=0;e<c.length;e++)c[e].style.display=b};mxEvent.addListener(t,"click",function(){q.editorUi.propertiesCollapsed=!q.editorUi.propertiesCollapsed;z()});t.appendChild(x);x=document.createElement("th");x.className="gePropHeaderCell";
-x.innerHTML=mxResources.get("value");t.appendChild(x);v.appendChild(t);var D=!1,B=!1,t=null;1==b.vertices.length&&0==b.edges.length?t=b.vertices[0].id:0==b.vertices.length&&1==b.edges.length&&(t=b.edges[0].id);null!=t&&v.appendChild(n("id",mxUtils.htmlEntities(t),{dispName:"ID",type:"readOnly"},!0,!1));for(var A in c)if(t=c[A],"function"!=typeof t.isVisible||t.isVisible(b,this)){var C=null!=b.style[A]?mxUtils.htmlEntities(b.style[A]+""):null!=t.getDefaultValue?t.getDefaultValue(b,this):t.defVal;if("separator"==
-t.type)B=!B;else{if("staticArr"==t.type)t.size=parseInt(b.style[t.sizeProperty]||c[t.sizeProperty].defVal)||0;else if(null!=t.dependentProps){for(var N=t.dependentProps,E=[],G=[],x=0;x<N.length;x++){var H=b.style[N[x]];G.push(c[N[x]].subDefVal);E.push(null!=H?H.split(","):[])}t.dependentPropsDefVal=G;t.dependentPropsVals=E}v.appendChild(n(A,C,t,D,B));D=!D}}for(x=0;x<u.length;x++)for(t=u[x],c=t.parentRow,b=0;b<t.values.length;b++)A=n(t.name,t.values[b],{type:t.type,parentRow:t.parentRow,isDeletable:t.isDeletable,
-index:b,defVal:t.defVal,countProperty:t.countProperty,size:t.size},0==b%2,t.flipBkg),c.parentNode.insertBefore(A,c.nextSibling),c=A;a.appendChild(v);z();return a};StyleFormatPanel.prototype.addStyles=function(a){function c(a){mxEvent.addListener(a,"mouseenter",function(){a.style.opacity="1"});mxEvent.addListener(a,"mouseleave",function(){a.style.opacity="0.5"})}var b=this.editorUi,e=b.editor.graph,d=document.createElement("div");d.style.whiteSpace="nowrap";d.style.paddingLeft="24px";d.style.paddingRight=
-"20px";a.style.paddingLeft="16px";a.style.paddingBottom="6px";a.style.position="relative";a.appendChild(d);var g="plain-gray plain-blue plain-green plain-turquoise plain-orange plain-yellow plain-red plain-pink plain-purple gray blue green turquoise orange yellow red pink purple".split(" "),f=document.createElement("div");f.style.whiteSpace="nowrap";f.style.position="relative";f.style.textAlign="center";for(var k=[],l=0;l<this.defaultColorSchemes.length;l++){var n=document.createElement("div");n.style.display=
-"inline-block";n.style.width="6px";n.style.height="6px";n.style.marginLeft="4px";n.style.marginRight="3px";n.style.borderRadius="3px";n.style.cursor="pointer";n.style.background="transparent";n.style.border="1px solid #b5b6b7";mxUtils.bind(this,function(a){mxEvent.addListener(n,"click",mxUtils.bind(this,function(){q(a)}))})(l);k.push(n);f.appendChild(n)}var q=mxUtils.bind(this,function(a){null!=this.format.currentScheme&&(k[this.format.currentScheme].style.background="transparent");this.format.currentScheme=
-a;u(this.defaultColorSchemes[this.format.currentScheme]);k[this.format.currentScheme].style.background="#84d7ff"}),u=mxUtils.bind(this,function(a){var c=mxUtils.bind(this,function(a){var c=mxUtils.button("",mxUtils.bind(this,function(c){e.getModel().beginUpdate();try{for(var d=this.format.getSelectionState().cells,f=0;f<d.length;f++){for(var k=e.getModel().getStyle(d[f]),l=0;l<g.length;l++)k=mxUtils.removeStylename(k,g[l]);var n=e.getModel().isVertex(d[f])?b.initialDefaultVertexStyle:b.initialdefaultEdgeStyle;
-null!=a?(k=mxUtils.setStyle(k,mxConstants.STYLE_GRADIENTCOLOR,a.gradient||mxUtils.getValue(n,mxConstants.STYLE_GRADIENTCOLOR,null)),mxEvent.isAltDown(c)||(k=""==a.fill?mxUtils.setStyle(k,mxConstants.STYLE_FILLCOLOR,null):mxUtils.setStyle(k,mxConstants.STYLE_FILLCOLOR,a.fill||mxUtils.getValue(n,mxConstants.STYLE_FILLCOLOR,null))),mxEvent.isShiftDown(c)||(k=""==a.stroke?mxUtils.setStyle(k,mxConstants.STYLE_STROKECOLOR,null):mxUtils.setStyle(k,mxConstants.STYLE_STROKECOLOR,a.stroke||mxUtils.getValue(n,
-mxConstants.STYLE_STROKECOLOR,null))),mxEvent.isControlDown(c)||mxClient.IS_MAC&&mxEvent.isMetaDown(c)||!e.getModel().isVertex(d[f])||(k=mxUtils.setStyle(k,mxConstants.STYLE_FONTCOLOR,a.font||mxUtils.getValue(n,mxConstants.STYLE_FONTCOLOR,null)))):(k=mxUtils.setStyle(k,mxConstants.STYLE_FILLCOLOR,mxUtils.getValue(n,mxConstants.STYLE_FILLCOLOR,"#ffffff")),k=mxUtils.setStyle(k,mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(n,mxConstants.STYLE_STROKECOLOR,"#000000")),k=mxUtils.setStyle(k,mxConstants.STYLE_GRADIENTCOLOR,
-mxUtils.getValue(n,mxConstants.STYLE_GRADIENTCOLOR,null)),e.getModel().isVertex(d[f])&&(k=mxUtils.setStyle(k,mxConstants.STYLE_FONTCOLOR,mxUtils.getValue(n,mxConstants.STYLE_FONTCOLOR,null))));e.getModel().setStyle(d[f],k)}}finally{e.getModel().endUpdate()}}));c.className="geStyleButton";c.style.width="36px";c.style.height=10>=this.defaultColorSchemes.length?"24px":"30px";c.style.margin="0px 6px 6px 0px";if(null!=a){var f="1"==urlParams.sketch?"2px solid":"1px solid";null!=a.gradient?mxClient.IS_IE&&
+b.style.width="202px";mxUtils.br(a);return t.apply(this,arguments)};EditorUi.prototype.propertiesCollapsed=!0;StyleFormatPanel.prototype.addProperties=function(a,c,b){function e(a,c,b,e){u.getModel().beginUpdate();try{var d=[],k=[];if(null!=b.index){for(var f=[],g=b.parentRow.nextSibling;g&&g.getAttribute("data-pName")==a;)f.push(g.getAttribute("data-pValue")),g=g.nextSibling;b.index<f.length?null!=e?f.splice(e,1):f[b.index]=c:f.push(c);null!=b.size&&f.length>b.size&&(f=f.slice(0,b.size));c=f.join(",");
+null!=b.countProperty&&(u.setCellStyles(b.countProperty,f.length,u.getSelectionCells()),d.push(b.countProperty),k.push(f.length))}u.setCellStyles(a,c,u.getSelectionCells());d.push(a);k.push(c);if(null!=b.dependentProps)for(a=0;a<b.dependentProps.length;a++){var l=b.dependentPropsDefVal[a],n=b.dependentPropsVals[a];if(n.length>c)n=n.slice(0,c);else for(var m=n.length;m<c;m++)n.push(l);n=n.join(",");u.setCellStyles(b.dependentProps[a],n,u.getSelectionCells());d.push(b.dependentProps[a]);k.push(n)}if("function"==
+typeof b.onChange)b.onChange(u,c);q.editorUi.fireEvent(new mxEventObject("styleChanged","keys",d,"values",k,"cells",u.getSelectionCells()))}finally{u.getModel().endUpdate()}}function d(c,b,e){var d=mxUtils.getOffset(a,!0),k=mxUtils.getOffset(c,!0);b.style.position="absolute";b.style.left=k.x-d.x+"px";b.style.top=k.y-d.y+"px";b.style.width=c.offsetWidth+"px";b.style.height=c.offsetHeight-(e?4:0)+"px";b.style.zIndex=5}function k(a,c,b){var d=document.createElement("div");d.style.width="32px";d.style.height=
+"4px";d.style.margin="2px";d.style.border="1px solid black";d.style.background=c&&"none"!=c?c:"url('"+Dialog.prototype.noColorImage+"')";btn=mxUtils.button("",mxUtils.bind(q,function(k){this.editorUi.pickColor(c,function(c){d.style.background="none"==c?"url('"+Dialog.prototype.noColorImage+"')":c;e(a,c,b)});mxEvent.consume(k)}));btn.style.height="12px";btn.style.width="40px";btn.className="geColorBtn";btn.appendChild(d);return btn}function f(a,c,b,d,k,f,g){null!=c&&(c=c.split(","),v.push({name:a,
+values:c,type:b,defVal:d,countProperty:k,parentRow:f,isDeletable:!0,flipBkg:g}));btn=mxUtils.button("+",mxUtils.bind(q,function(c){for(var l=f,q=0;null!=l.nextSibling;)if(l.nextSibling.getAttribute("data-pName")==a)l=l.nextSibling,q++;else break;var m={type:b,parentRow:f,index:q,isDeletable:!0,defVal:d,countProperty:k},q=n(a,"",m,0==q%2,g);e(a,d,m);l.parentNode.insertBefore(q,l.nextSibling);mxEvent.consume(c)}));btn.style.height="16px";btn.style.width="25px";btn.className="geColorBtn";return btn}
+function g(a,c,b,e,d,k,f){if(0<d){var g=Array(d);c=null!=c?c.split(","):[];for(var l=0;l<d;l++)g[l]=null!=c[l]?c[l]:null!=e?e:"";v.push({name:a,values:g,type:b,defVal:e,parentRow:k,flipBkg:f,size:d})}return document.createElement("div")}function l(a,c,b){var d=document.createElement("input");d.type="checkbox";d.checked="1"==c;mxEvent.addListener(d,"change",function(){e(a,d.checked?"1":"0",b)});return d}function n(c,b,n,m,u){var v=n.dispName,t=n.type,x=document.createElement("tr");x.className="gePropRow"+
+(u?"Dark":"")+(m?"Alt":"")+" gePropNonHeaderRow";x.setAttribute("data-pName",c);x.setAttribute("data-pValue",b);m=!1;null!=n.index&&(x.setAttribute("data-index",n.index),v=(null!=v?v:"")+"["+n.index+"]",m=!0);var p=document.createElement("td");p.className="gePropRowCell";p.innerHTML=mxUtils.htmlEntities(mxResources.get(v,null,v));m&&(p.style.textAlign="right");x.appendChild(p);p=document.createElement("td");p.className="gePropRowCell";if("color"==t)p.appendChild(k(c,b,n));else if("bool"==t||"boolean"==
+t)p.appendChild(l(c,b,n));else if("enum"==t){var z=n.enumList;for(u=0;u<z.length;u++)if(v=z[u],v.val==b){p.innerHTML=mxUtils.htmlEntities(mxResources.get(v.dispName,null,v.dispName));break}mxEvent.addListener(p,"click",mxUtils.bind(q,function(){var k=document.createElement("select");d(p,k);for(var f=0;f<z.length;f++){var g=z[f],l=document.createElement("option");l.value=mxUtils.htmlEntities(g.val);l.innerHTML=mxUtils.htmlEntities(mxResources.get(g.dispName,null,g.dispName));k.appendChild(l)}k.value=
+b;a.appendChild(k);mxEvent.addListener(k,"change",function(){var a=mxUtils.htmlEntities(k.value);e(c,a,n)});k.focus();mxEvent.addListener(k,"blur",function(){a.removeChild(k)})}))}else"dynamicArr"==t?p.appendChild(f(c,b,n.subType,n.subDefVal,n.countProperty,x,u)):"staticArr"==t?p.appendChild(g(c,b,n.subType,n.subDefVal,n.size,x,u)):"readOnly"==t?(u=document.createElement("input"),u.setAttribute("readonly",""),u.value=b,u.style.width="96px",u.style.borderWidth="0px",p.appendChild(u)):(p.innerHTML=
+b,mxEvent.addListener(p,"click",mxUtils.bind(q,function(){function k(){var a=f.value,a=0==a.length&&"string"!=t?0:a;n.allowAuto&&(null!=a.trim&&"auto"==a.trim().toLowerCase()?(a="auto",t="string"):(a=parseFloat(a),a=isNaN(a)?0:a));null!=n.min&&a<n.min?a=n.min:null!=n.max&&a>n.max&&(a=n.max);a=mxUtils.htmlEntities(("int"==t?parseInt(a):a)+"");e(c,a,n)}var f=document.createElement("input");d(p,f,!0);f.value=b;f.className="gePropEditor";"int"!=t&&"float"!=t||n.allowAuto||(f.type="number",f.step="int"==
+t?"1":"any",null!=n.min&&(f.min=parseFloat(n.min)),null!=n.max&&(f.max=parseFloat(n.max)));a.appendChild(f);mxEvent.addListener(f,"keypress",function(a){13==a.keyCode&&k()});f.focus();mxEvent.addListener(f,"blur",function(){k()})})));n.isDeletable&&(u=mxUtils.button("-",mxUtils.bind(q,function(a){e(c,"",n,n.index);mxEvent.consume(a)})),u.style.height="16px",u.style.width="25px",u.style["float"]="right",u.className="geColorBtn",p.appendChild(u));x.appendChild(p);return x}var q=this,u=this.editorUi.editor.graph,
+v=[];a.style.position="relative";a.style.padding="0";var t=document.createElement("table");t.className="geProperties";t.style.whiteSpace="nowrap";t.style.width="100%";var m=document.createElement("tr");m.className="gePropHeader";var x=document.createElement("th");x.className="gePropHeaderCell";var p=document.createElement("img");p.src=Sidebar.prototype.expandedImage;x.appendChild(p);mxUtils.write(x,mxResources.get("property"));m.style.cursor="pointer";var z=function(){var c=t.querySelectorAll(".gePropNonHeaderRow"),
+b;if(q.editorUi.propertiesCollapsed){p.src=Sidebar.prototype.collapsedImage;b="none";for(var e=a.childNodes.length-1;0<=e;e--)try{var d=a.childNodes[e],k=d.nodeName.toUpperCase();"INPUT"!=k&&"SELECT"!=k||a.removeChild(d)}catch(xa){}}else p.src=Sidebar.prototype.expandedImage,b="";for(e=0;e<c.length;e++)c[e].style.display=b};mxEvent.addListener(m,"click",function(){q.editorUi.propertiesCollapsed=!q.editorUi.propertiesCollapsed;z()});m.appendChild(x);x=document.createElement("th");x.className="gePropHeaderCell";
+x.innerHTML=mxResources.get("value");m.appendChild(x);t.appendChild(m);var C=!1,A=!1,m=null;1==b.vertices.length&&0==b.edges.length?m=b.vertices[0].id:0==b.vertices.length&&1==b.edges.length&&(m=b.edges[0].id);null!=m&&t.appendChild(n("id",mxUtils.htmlEntities(m),{dispName:"ID",type:"readOnly"},!0,!1));for(var B in c)if(m=c[B],"function"!=typeof m.isVisible||m.isVisible(b,this)){var D=null!=b.style[B]?mxUtils.htmlEntities(b.style[B]+""):null!=m.getDefaultValue?m.getDefaultValue(b,this):m.defVal;if("separator"==
+m.type)A=!A;else{if("staticArr"==m.type)m.size=parseInt(b.style[m.sizeProperty]||c[m.sizeProperty].defVal)||0;else if(null!=m.dependentProps){for(var N=m.dependentProps,E=[],G=[],x=0;x<N.length;x++){var H=b.style[N[x]];G.push(c[N[x]].subDefVal);E.push(null!=H?H.split(","):[])}m.dependentPropsDefVal=G;m.dependentPropsVals=E}t.appendChild(n(B,D,m,C,A));C=!C}}for(x=0;x<v.length;x++)for(m=v[x],c=m.parentRow,b=0;b<m.values.length;b++)B=n(m.name,m.values[b],{type:m.type,parentRow:m.parentRow,isDeletable:m.isDeletable,
+index:b,defVal:m.defVal,countProperty:m.countProperty,size:m.size},0==b%2,m.flipBkg),c.parentNode.insertBefore(B,c.nextSibling),c=B;a.appendChild(t);z();return a};StyleFormatPanel.prototype.addStyles=function(a){function c(a){mxEvent.addListener(a,"mouseenter",function(){a.style.opacity="1"});mxEvent.addListener(a,"mouseleave",function(){a.style.opacity="0.5"})}var b=this.editorUi,e=b.editor.graph,d=document.createElement("div");d.style.whiteSpace="nowrap";d.style.paddingLeft="24px";d.style.paddingRight=
+"20px";a.style.paddingLeft="16px";a.style.paddingBottom="6px";a.style.position="relative";a.appendChild(d);var k="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(" "),f=document.createElement("div");f.style.whiteSpace="nowrap";f.style.position="relative";f.style.textAlign="center";for(var g=[],l=0;l<this.defaultColorSchemes.length;l++){var n=document.createElement("div");n.style.display=
+"inline-block";n.style.width="6px";n.style.height="6px";n.style.marginLeft="4px";n.style.marginRight="3px";n.style.borderRadius="3px";n.style.cursor="pointer";n.style.background="transparent";n.style.border="1px solid #b5b6b7";mxUtils.bind(this,function(a){mxEvent.addListener(n,"click",mxUtils.bind(this,function(){q(a)}))})(l);g.push(n);f.appendChild(n)}var q=mxUtils.bind(this,function(a){null!=this.format.currentScheme&&(g[this.format.currentScheme].style.background="transparent");this.format.currentScheme=
+a;u(this.defaultColorSchemes[this.format.currentScheme]);g[this.format.currentScheme].style.background="#84d7ff"}),u=mxUtils.bind(this,function(a){var c=mxUtils.bind(this,function(a){var c=mxUtils.button("",mxUtils.bind(this,function(c){e.getModel().beginUpdate();try{for(var d=this.format.getSelectionState().cells,f=0;f<d.length;f++){for(var g=e.getModel().getStyle(d[f]),l=0;l<k.length;l++)g=mxUtils.removeStylename(g,k[l]);var n=e.getModel().isVertex(d[f])?b.initialDefaultVertexStyle:b.initialdefaultEdgeStyle;
+null!=a?(g=mxUtils.setStyle(g,mxConstants.STYLE_GRADIENTCOLOR,a.gradient||mxUtils.getValue(n,mxConstants.STYLE_GRADIENTCOLOR,null)),mxEvent.isAltDown(c)||(g=""==a.fill?mxUtils.setStyle(g,mxConstants.STYLE_FILLCOLOR,null):mxUtils.setStyle(g,mxConstants.STYLE_FILLCOLOR,a.fill||mxUtils.getValue(n,mxConstants.STYLE_FILLCOLOR,null))),mxEvent.isShiftDown(c)||(g=""==a.stroke?mxUtils.setStyle(g,mxConstants.STYLE_STROKECOLOR,null):mxUtils.setStyle(g,mxConstants.STYLE_STROKECOLOR,a.stroke||mxUtils.getValue(n,
+mxConstants.STYLE_STROKECOLOR,null))),mxEvent.isControlDown(c)||mxClient.IS_MAC&&mxEvent.isMetaDown(c)||!e.getModel().isVertex(d[f])||(g=mxUtils.setStyle(g,mxConstants.STYLE_FONTCOLOR,a.font||mxUtils.getValue(n,mxConstants.STYLE_FONTCOLOR,null)))):(g=mxUtils.setStyle(g,mxConstants.STYLE_FILLCOLOR,mxUtils.getValue(n,mxConstants.STYLE_FILLCOLOR,"#ffffff")),g=mxUtils.setStyle(g,mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(n,mxConstants.STYLE_STROKECOLOR,"#000000")),g=mxUtils.setStyle(g,mxConstants.STYLE_GRADIENTCOLOR,
+mxUtils.getValue(n,mxConstants.STYLE_GRADIENTCOLOR,null)),e.getModel().isVertex(d[f])&&(g=mxUtils.setStyle(g,mxConstants.STYLE_FONTCOLOR,mxUtils.getValue(n,mxConstants.STYLE_FONTCOLOR,null))));e.getModel().setStyle(d[f],g)}}finally{e.getModel().endUpdate()}}));c.className="geStyleButton";c.style.width="36px";c.style.height=10>=this.defaultColorSchemes.length?"24px":"30px";c.style.margin="0px 6px 6px 0px";if(null!=a){var f="1"==urlParams.sketch?"2px solid":"1px solid";null!=a.gradient?mxClient.IS_IE&&
10>document.documentMode?c.style.filter="progid:DXImageTransform.Microsoft.Gradient(StartColorStr='"+a.fill+"', EndColorStr='"+a.gradient+"', GradientType=0)":c.style.backgroundImage="linear-gradient("+a.fill+" 0px,"+a.gradient+" 100%)":a.fill==mxConstants.NONE?c.style.background="url('"+Dialog.prototype.noColorImage+"')":c.style.backgroundColor=""==a.fill?mxUtils.getValue(b.initialDefaultVertexStyle,mxConstants.STYLE_FILLCOLOR,Editor.isDarkMode()?"#2a2a2a":"#ffffff"):a.fill||mxUtils.getValue(b.initialDefaultVertexStyle,
mxConstants.STYLE_FILLCOLOR,Editor.isDarkMode()?"#2a2a2a":"#ffffff");c.style.border=a.stroke==mxConstants.NONE?f+" transparent":""==a.stroke?f+" "+mxUtils.getValue(b.initialDefaultVertexStyle,mxConstants.STYLE_STROKECOLOR,Editor.isDarkMode()?"#ffffff":"#2a2a2a"):f+" "+(a.stroke||mxUtils.getValue(b.initialDefaultVertexStyle,mxConstants.STYLE_STROKECOLOR,Editor.isDarkMode()?"#ffffff":"#2a2a2a"));null!=a.title&&c.setAttribute("title",a.title)}else{var f=mxUtils.getValue(e.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,
-"#ffffff"),k=mxUtils.getValue(e.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,"#000000");c.style.backgroundColor=f;c.style.border="1px solid "+k}c.style.borderRadius="0";d.appendChild(c)});d.innerHTML="";for(var f=0;f<a.length;f++)0<f&&0==mxUtils.mod(f,4)&&mxUtils.br(d),c(a[f])});null==this.format.currentScheme?q(Editor.isDarkMode()?1:"1"==urlParams.sketch?5:0):q(this.format.currentScheme);var l=10>=this.defaultColorSchemes.length?28:8,m=document.createElement("div");m.style.cssText="position:absolute;left:10px;top:8px;bottom:"+
+"#ffffff"),g=mxUtils.getValue(e.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,"#000000");c.style.backgroundColor=f;c.style.border="1px solid "+g}c.style.borderRadius="0";d.appendChild(c)});d.innerHTML="";for(var f=0;f<a.length;f++)0<f&&0==mxUtils.mod(f,4)&&mxUtils.br(d),c(a[f])});null==this.format.currentScheme?q(Editor.isDarkMode()?1:"1"==urlParams.sketch?5:0):q(this.format.currentScheme);var l=10>=this.defaultColorSchemes.length?28:8,m=document.createElement("div");m.style.cssText="position:absolute;left:10px;top:8px;bottom:"+
l+"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(m,"click",mxUtils.bind(this,function(){q(mxUtils.mod(this.format.currentScheme-1,this.defaultColorSchemes.length))}));
-var v=document.createElement("div");v.style.cssText="position:absolute;left:202px;top:8px;bottom:"+l+"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&&
-(a.appendChild(m),a.appendChild(v));mxEvent.addListener(v,"click",mxUtils.bind(this,function(){q(mxUtils.mod(this.format.currentScheme+1,this.defaultColorSchemes.length))}));c(m);c(v);u(this.defaultColorSchemes[this.format.currentScheme]);10>=this.defaultColorSchemes.length&&a.appendChild(f);return a};StyleFormatPanel.prototype.addEditOps=function(a){var c=this.format.getSelectionState(),b=null;1==c.cells.length&&(b=mxUtils.button(mxResources.get("editStyle"),mxUtils.bind(this,function(a){this.editorUi.actions.get("editStyle").funct()})),
+var t=document.createElement("div");t.style.cssText="position:absolute;left:202px;top:8px;bottom:"+l+"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&&
+(a.appendChild(m),a.appendChild(t));mxEvent.addListener(t,"click",mxUtils.bind(this,function(){q(mxUtils.mod(this.format.currentScheme+1,this.defaultColorSchemes.length))}));c(m);c(t);u(this.defaultColorSchemes[this.format.currentScheme]);10>=this.defaultColorSchemes.length&&a.appendChild(f);return a};StyleFormatPanel.prototype.addEditOps=function(a){var c=this.format.getSelectionState(),b=null;1==c.cells.length&&(b=mxUtils.button(mxResources.get("editStyle"),mxUtils.bind(this,function(a){this.editorUi.actions.get("editStyle").funct()})),
b.setAttribute("title",mxResources.get("editStyle")+" ("+this.editorUi.actions.get("editStyle").shortcut+")"),b.style.width="202px",b.style.marginBottom="2px",a.appendChild(b));var e=this.editorUi.editor.graph,e=1==c.cells.length?e.view.getState(c.cells[0]):null;null!=e&&null!=e.shape&&null!=e.shape.stencil?(c=mxUtils.button(mxResources.get("editShape"),mxUtils.bind(this,function(a){this.editorUi.actions.get("editShape").funct()})),c.setAttribute("title",mxResources.get("editShape")),c.style.marginBottom=
"2px",null==b?c.style.width="202px":(b.style.width="100px",c.style.width="100px",c.style.marginLeft="2px"),a.appendChild(c)):c.image&&0<c.cells.length&&(c=mxUtils.button(mxResources.get("editImage"),mxUtils.bind(this,function(a){this.editorUi.actions.get("image").funct()})),c.setAttribute("title",mxResources.get("editImage")),c.style.marginBottom="2px",null==b?c.style.width="202px":(b.style.width="100px",c.style.width="100px",c.style.marginLeft="2px"),a.appendChild(c));return a}}Graph.customFontElements=
{};Graph.recentCustomFonts={};Graph.isGoogleFontUrl=function(a){return a.substring(0,Editor.GOOGLE_FONTS.length)==Editor.GOOGLE_FONTS};Graph.isCssFontUrl=function(a){return Graph.isGoogleFontUrl(a)};Graph.createFontElement=function(a,c){var b;Graph.isCssFontUrl(c)?(b=document.createElement("link"),b.setAttribute("rel","stylesheet"),b.setAttribute("type","text/css"),b.setAttribute("charset","UTF-8"),b.setAttribute("href",c)):(b=document.createElement("style"),mxUtils.write(b,'@font-face {\nfont-family: "'+
@@ -3235,32 +3236,32 @@ Graph.prototype.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity="0.4";
"mouseleave",function(a){c=null});this.isMouseInsertPoint=function(){return null!=c};var b=this.getInsertPoint;this.getInsertPoint=function(){return null!=c?this.getPointForEvent(c):b.apply(this,arguments)};var e=this.layoutManager.getLayout;this.layoutManager.getLayout=function(a){var c=this.graph.getCellStyle(a);if(null!=c){if("rack"==c.childLayout){var b=new mxStackLayout(this.graph,!1);b.gridSize=null!=c.rackUnitSize?parseFloat(c.rackUnitSize):"undefined"!==typeof mxRackContainer?mxRackContainer.unitSize:
20;b.marginLeft=c.marginLeft||0;b.marginRight=c.marginRight||0;b.marginTop=c.marginTop||0;b.marginBottom=c.marginBottom||0;b.allowGaps=c.allowGaps||0;b.horizontal="1"==mxUtils.getValue(c,"horizontalRack","0");b.resizeParent=!1;b.fill=!0;return b}if("undefined"!==typeof mxTableLayout&&"tableLayout"==c.childLayout)return b=new mxTableLayout(this.graph),b.rows=c.tableRows||2,b.columns=c.tableColumns||2,b.colPercentages=c.colPercentages,b.rowPercentages=c.rowPercentages,b.equalColumns="1"==mxUtils.getValue(c,
"equalColumns",b.colPercentages?"0":"1"),b.equalRows="1"==mxUtils.getValue(c,"equalRows",b.rowPercentages?"0":"1"),b.resizeParent="1"==mxUtils.getValue(c,"resizeParent","1"),b.border=c.tableBorder||b.border,b.marginLeft=c.marginLeft||0,b.marginRight=c.marginRight||0,b.marginTop=c.marginTop||0,b.marginBottom=c.marginBottom||0,b.autoAddCol="1"==mxUtils.getValue(c,"autoAddCol","0"),b.autoAddRow="1"==mxUtils.getValue(c,"autoAddRow",b.autoAddCol?"0":"1"),b.colWidths=c.colWidths||"100",b.rowHeights=c.rowHeights||
-"50",b}return e.apply(this,arguments)};this.updateGlobalUrlVariables()};var x=Graph.prototype.postProcessCellStyle;Graph.prototype.postProcessCellStyle=function(a){return Graph.processFontStyle(x.apply(this,arguments))};var G=mxSvgCanvas2D.prototype.updateTextNodes;mxSvgCanvas2D.prototype.updateTextNodes=function(a,c,b,e,d,g,f,k,l,n,q){G.apply(this,arguments);Graph.processFontAttributes(q)};var z=mxText.prototype.redraw;mxText.prototype.redraw=function(){z.apply(this,arguments);null!=this.node&&"DIV"==
+"50",b}return e.apply(this,arguments)};this.updateGlobalUrlVariables()};var x=Graph.prototype.postProcessCellStyle;Graph.prototype.postProcessCellStyle=function(a){return Graph.processFontStyle(x.apply(this,arguments))};var G=mxSvgCanvas2D.prototype.updateTextNodes;mxSvgCanvas2D.prototype.updateTextNodes=function(a,c,b,e,d,k,f,g,l,n,q){G.apply(this,arguments);Graph.processFontAttributes(q)};var z=mxText.prototype.redraw;mxText.prototype.redraw=function(){z.apply(this,arguments);null!=this.node&&"DIV"==
this.node.nodeName&&Graph.processFontAttributes(this.node)};Graph.prototype.getCustomFonts=function(){var a=this.extFonts,a=null!=a?a.slice():[],c;for(c in Graph.customFontElements){var b=Graph.customFontElements[c];a.push({name:b.name,url:b.url})}return a};Graph.prototype.setFont=function(a,c){Graph.addFont(a,c);document.execCommand("fontname",!1,a);if(null!=c){var b=this.cellEditor.textarea.getElementsByTagName("font");c=Graph.getFontUrl(a,c);for(var e=0;e<b.length;e++)b[e].getAttribute("face")==
a&&b[e].getAttribute("data-font-src")!=c&&b[e].setAttribute("data-font-src",c)}};var E=Graph.prototype.isFastZoomEnabled;Graph.prototype.isFastZoomEnabled=function(){return E.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 a=JSON.parse(decodeURIComponent(urlParams.vars));if(null!=a)for(var c in a)this.globalVars[c]=
a[c]}catch(B){null!=window.console&&console.log("Error in vars URL parameter: "+B)}};Graph.prototype.getExportVariables=function(){return null!=this.globalVars?mxUtils.clone(this.globalVars):{}};var H=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=function(a){var c=H.apply(this,arguments);null==c&&null!=this.globalVars&&(c=this.globalVars[a]);return c};Graph.prototype.getDefaultStylesheet=function(){if(null==this.defaultStylesheet){var a=this.themes["default-style2"];this.defaultStylesheet=
-(new mxCodec(a.ownerDocument)).decode(a)}return this.defaultStylesheet};Graph.prototype.isViewer=function(){return urlParams.viewer};var K=Graph.prototype.getSvg;Graph.prototype.getSvg=function(a,c,b,e,d,g,f,k,l,n,q,u,m,t){var v=null,x=null;u||null==this.themes||"darkTheme"!=this.defaultThemeName||(v=this.stylesheet,x=this.defaultPageBackgroundColor,this.defaultPageBackgroundColor="darkTheme"==this.defaultThemeName?"#ffffff":"#2a2a2a",this.stylesheet=this.getDefaultStylesheet(),this.refresh());var p=
-K.apply(this,arguments),z=this.getCustomFonts();if(q&&0<z.length){var A=p.ownerDocument,C=null!=A.createElementNS?A.createElementNS(mxConstants.NS_SVG,"style"):A.createElement("style");null!=A.setAttributeNS?C.setAttributeNS("type","text/css"):C.setAttribute("type","text/css");for(var N="",B="",D=0;D<z.length;D++){var E=z[D].name,G=z[D].url;Graph.isCssFontUrl(G)?N+="@import url("+G+");\n":B+='@font-face {\nfont-family: "'+E+'";\nsrc: url("'+G+'");\n}\n'}C.appendChild(A.createTextNode(N+B));p.getElementsByTagName("defs")[0].appendChild(C)}null!=
+(new mxCodec(a.ownerDocument)).decode(a)}return this.defaultStylesheet};Graph.prototype.isViewer=function(){return urlParams.viewer};var K=Graph.prototype.getSvg;Graph.prototype.getSvg=function(a,c,b,e,d,k,f,g,l,n,q,u,m,t){var v=null,x=null;u||null==this.themes||"darkTheme"!=this.defaultThemeName||(v=this.stylesheet,x=this.defaultPageBackgroundColor,this.defaultPageBackgroundColor="darkTheme"==this.defaultThemeName?"#ffffff":"#2a2a2a",this.stylesheet=this.getDefaultStylesheet(),this.refresh());var p=
+K.apply(this,arguments),z=this.getCustomFonts();if(q&&0<z.length){var A=p.ownerDocument,D=null!=A.createElementNS?A.createElementNS(mxConstants.NS_SVG,"style"):A.createElement("style");null!=A.setAttributeNS?D.setAttributeNS("type","text/css"):D.setAttribute("type","text/css");for(var N="",B="",C=0;C<z.length;C++){var E=z[C].name,G=z[C].url;Graph.isCssFontUrl(G)?N+="@import url("+G+");\n":B+='@font-face {\nfont-family: "'+E+'";\nsrc: url("'+G+'");\n}\n'}D.appendChild(A.createTextNode(N+B));p.getElementsByTagName("defs")[0].appendChild(D)}null!=
v&&(this.defaultPageBackgroundColor=x,this.stylesheet=v,this.refresh());return p};var F=Graph.prototype.createSvgImageExport;Graph.prototype.createSvgImageExport=function(){var a=F.apply(this,arguments);if(this.mathEnabled){var c=a.drawText;a.drawText=function(a,b){if(null!=a.text&&null!=a.text.value&&a.text.checkBounds()&&(mxUtils.isNode(a.text.value)||a.text.dialect==mxConstants.DIALECT_STRICTHTML)){var e=a.text.getContentNode();if(null!=e){e=e.cloneNode(!0);if(e.getElementsByTagNameNS)for(var d=
e.getElementsByTagNameNS("http://www.w3.org/1998/Math/MathML","math");0<d.length;)d[0].parentNode.removeChild(d[0]);null!=e.innerHTML&&(d=a.text.value,a.text.value=e.innerHTML,c.apply(this,arguments),a.text.value=d)}}else c.apply(this,arguments)}}return a};var I=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){I.apply(this,arguments);if(mxClient.IS_GC&&null!=this.getDrawPane()){var a=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;",a.ownerSVGElement.parentNode.insertBefore(this.webKitForceRepaintNode,a.ownerSVGElement))}};Graph.prototype.refreshBackgroundImage=function(){null!=this.backgroundImage&&null!=this.backgroundImage.originalSrc&&this.setBackgroundImage(this.backgroundImage)};var C=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){C.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.handleCustomLink=function(a){"data:action/json,"==
-a.substring(0,17)&&(a=JSON.parse(a.substring(17)),null!=a.actions&&this.executeCustomActions(a.actions))};Graph.prototype.executeCustomActions=function(a,c){if(this.executingCustomActions)this.stoppingCustomActions=!0,null!=this.pendingWaitThread&&window.clearTimeout(this.pendingWaitThread),null!=this.pendingExecuteNextAction&&this.pendingExecuteNextAction(),this.fireEvent(new mxEventObject("stopExecutingCustomActions"));else{this.executingCustomActions=!0;var b=!1,e=0,d=0,g=mxUtils.bind(this,function(){b||
-(b=!0,this.model.beginUpdate())}),f=mxUtils.bind(this,function(){b&&(b=!1,this.model.endUpdate())}),k=mxUtils.bind(this,function(){0<e&&e--;0==e&&l()}),l=mxUtils.bind(this,function(){if(d<a.length){var b=this.stoppingCustomActions,n=a[d++],q=[];if(null!=n.open)if(f(),this.isCustomLink(n.open)){if(!this.customLinkClicked(n.open))return}else this.openLink(n.open);null==n.wait||b||(this.pendingExecuteNextAction=mxUtils.bind(this,function(){this.pendingWaitThread=this.pendingExecuteNextAction=null;k()}),
-e++,this.pendingWaitThread=window.setTimeout(this.pendingExecuteNextAction,""!=n.wait?parseInt(n.wait):1E3),f());null!=n.opacity&&null!=n.opacity.value&&Graph.setOpacityForNodes(this.getNodesForCells(this.getCellsForAction(n.opacity,!0)),n.opacity.value);null!=n.fadeIn&&(e++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(n.fadeIn,!0)),0,1,k,b?0:n.fadeIn.delay));null!=n.fadeOut&&(e++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(n.fadeOut,!0)),1,0,k,b?0:n.fadeOut.delay));
-null!=n.wipeIn&&(q=q.concat(this.createWipeAnimations(this.getCellsForAction(n.wipeIn,!0),!0)));null!=n.wipeOut&&(q=q.concat(this.createWipeAnimations(this.getCellsForAction(n.wipeOut,!0),!1)));null!=n.toggle&&(g(),this.toggleCells(this.getCellsForAction(n.toggle,!0)));if(null!=n.show){g();var u=this.getCellsForAction(n.show,!0);Graph.setOpacityForNodes(this.getNodesForCells(u),1);this.setCellsVisible(u,!0)}null!=n.hide&&(g(),u=this.getCellsForAction(n.hide,!0),Graph.setOpacityForNodes(this.getNodesForCells(u),
-0),this.setCellsVisible(u,!1));null!=n.toggleStyle&&null!=n.toggleStyle.key&&(g(),this.toggleCellStyles(n.toggleStyle.key,null!=n.toggleStyle.defaultValue?n.toggleStyle.defaultValue:"0",this.getCellsForAction(n.toggleStyle,!0)));null!=n.style&&null!=n.style.key&&(g(),this.setCellStyles(n.style.key,n.style.value,this.getCellsForAction(n.style,!0)));u=[];null!=n.select&&this.isEnabled()&&(u=this.getCellsForAction(n.select),this.setSelectionCells(u));null!=n.highlight&&(u=this.getCellsForAction(n.highlight),
-this.highlightCells(u,n.highlight.color,n.highlight.duration,n.highlight.opacity));null!=n.scroll&&(u=this.getCellsForAction(n.scroll));null!=n.viewbox&&this.fitWindow(n.viewbox,n.viewbox.border);0<u.length&&this.scrollCellToVisible(u[0]);0<q.length&&(e++,this.executeAnimations(q,k,b?1:n.steps,b?0:n.delay));0==e?l():f()}else this.stoppingCustomActions=this.executingCustomActions=!1,f(),null!=c&&c()});l()}};Graph.prototype.doUpdateCustomLinksForCell=function(a,c){var b=this.getLinkForCell(c);null!=
-b&&"data:action/json,"==b.substring(0,17)&&this.setLinkForCell(c,this.updateCustomLink(a,b));if(this.isHtmlLabel(c)){var e=document.createElement("div");e.innerHTML=this.sanitizeHtml(this.getLabel(c));for(var d=e.getElementsByTagName("a"),g=!1,f=0;f<d.length;f++)b=d[f].getAttribute("href"),null!=b&&"data:action/json,"==b.substring(0,17)&&(d[f].setAttribute("href",this.updateCustomLink(a,b)),g=!0);g&&this.labelChanged(c,e.innerHTML)}};Graph.prototype.updateCustomLink=function(a,c){if("data:action/json,"==
+this.webKitForceRepaintNode.style.cssText="position:absolute;",a.ownerSVGElement.parentNode.insertBefore(this.webKitForceRepaintNode,a.ownerSVGElement))}};Graph.prototype.refreshBackgroundImage=function(){null!=this.backgroundImage&&null!=this.backgroundImage.originalSrc&&this.setBackgroundImage(this.backgroundImage)};var D=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){D.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.handleCustomLink=function(a){"data:action/json,"==
+a.substring(0,17)&&(a=JSON.parse(a.substring(17)),null!=a.actions&&this.executeCustomActions(a.actions))};Graph.prototype.executeCustomActions=function(a,c){if(this.executingCustomActions)this.stoppingCustomActions=!0,null!=this.pendingWaitThread&&window.clearTimeout(this.pendingWaitThread),null!=this.pendingExecuteNextAction&&this.pendingExecuteNextAction(),this.fireEvent(new mxEventObject("stopExecutingCustomActions"));else{this.executingCustomActions=!0;var b=!1,e=0,d=0,k=mxUtils.bind(this,function(){b||
+(b=!0,this.model.beginUpdate())}),f=mxUtils.bind(this,function(){b&&(b=!1,this.model.endUpdate())}),g=mxUtils.bind(this,function(){0<e&&e--;0==e&&l()}),l=mxUtils.bind(this,function(){if(d<a.length){var b=this.stoppingCustomActions,n=a[d++],q=[];if(null!=n.open)if(f(),this.isCustomLink(n.open)){if(!this.customLinkClicked(n.open))return}else this.openLink(n.open);null==n.wait||b||(this.pendingExecuteNextAction=mxUtils.bind(this,function(){this.pendingWaitThread=this.pendingExecuteNextAction=null;g()}),
+e++,this.pendingWaitThread=window.setTimeout(this.pendingExecuteNextAction,""!=n.wait?parseInt(n.wait):1E3),f());null!=n.opacity&&null!=n.opacity.value&&Graph.setOpacityForNodes(this.getNodesForCells(this.getCellsForAction(n.opacity,!0)),n.opacity.value);null!=n.fadeIn&&(e++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(n.fadeIn,!0)),0,1,g,b?0:n.fadeIn.delay));null!=n.fadeOut&&(e++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(n.fadeOut,!0)),1,0,g,b?0:n.fadeOut.delay));
+null!=n.wipeIn&&(q=q.concat(this.createWipeAnimations(this.getCellsForAction(n.wipeIn,!0),!0)));null!=n.wipeOut&&(q=q.concat(this.createWipeAnimations(this.getCellsForAction(n.wipeOut,!0),!1)));null!=n.toggle&&(k(),this.toggleCells(this.getCellsForAction(n.toggle,!0)));if(null!=n.show){k();var u=this.getCellsForAction(n.show,!0);Graph.setOpacityForNodes(this.getNodesForCells(u),1);this.setCellsVisible(u,!0)}null!=n.hide&&(k(),u=this.getCellsForAction(n.hide,!0),Graph.setOpacityForNodes(this.getNodesForCells(u),
+0),this.setCellsVisible(u,!1));null!=n.toggleStyle&&null!=n.toggleStyle.key&&(k(),this.toggleCellStyles(n.toggleStyle.key,null!=n.toggleStyle.defaultValue?n.toggleStyle.defaultValue:"0",this.getCellsForAction(n.toggleStyle,!0)));null!=n.style&&null!=n.style.key&&(k(),this.setCellStyles(n.style.key,n.style.value,this.getCellsForAction(n.style,!0)));u=[];null!=n.select&&this.isEnabled()&&(u=this.getCellsForAction(n.select),this.setSelectionCells(u));null!=n.highlight&&(u=this.getCellsForAction(n.highlight),
+this.highlightCells(u,n.highlight.color,n.highlight.duration,n.highlight.opacity));null!=n.scroll&&(u=this.getCellsForAction(n.scroll));null!=n.viewbox&&this.fitWindow(n.viewbox,n.viewbox.border);0<u.length&&this.scrollCellToVisible(u[0]);0<q.length&&(e++,this.executeAnimations(q,g,b?1:n.steps,b?0:n.delay));0==e?l():f()}else this.stoppingCustomActions=this.executingCustomActions=!1,f(),null!=c&&c()});l()}};Graph.prototype.doUpdateCustomLinksForCell=function(a,c){var b=this.getLinkForCell(c);null!=
+b&&"data:action/json,"==b.substring(0,17)&&this.setLinkForCell(c,this.updateCustomLink(a,b));if(this.isHtmlLabel(c)){var e=document.createElement("div");e.innerHTML=this.sanitizeHtml(this.getLabel(c));for(var d=e.getElementsByTagName("a"),k=!1,f=0;f<d.length;f++)b=d[f].getAttribute("href"),null!=b&&"data:action/json,"==b.substring(0,17)&&(d[f].setAttribute("href",this.updateCustomLink(a,b)),k=!0);k&&this.labelChanged(c,e.innerHTML)}};Graph.prototype.updateCustomLink=function(a,c){if("data:action/json,"==
c.substring(0,17))try{var b=JSON.parse(c.substring(17));null!=b.actions&&(this.updateCustomLinkActions(a,b.actions),c="data:action/json,"+JSON.stringify(b))}catch(J){}return c};Graph.prototype.updateCustomLinkActions=function(a,c){for(var b=0;b<c.length;b++){var e=c[b],d;for(d in e)this.updateCustomLinkAction(a,e[d],"cells"),this.updateCustomLinkAction(a,e[d],"excludeCells")}};Graph.prototype.updateCustomLinkAction=function(a,c,b){if(null!=c&&null!=c[b]){for(var e=[],d=0;d<c[b].length;d++)if("*"==
-c[b][d])e.push(c[b][d]);else{var g=a[c[b][d]];null!=g?""!=g&&e.push(g):e.push(c[b][d])}c[b]=e}};Graph.prototype.getCellsForAction=function(a,c){var b=this.getCellsById(a.cells).concat(this.getCellsForTags(a.tags,null,null,c));if(null!=a.excludeCells){for(var e=[],d=0;d<b.length;d++)0>a.excludeCells.indexOf(b[d].id)&&e.push(b[d]);b=e}return b};Graph.prototype.getCellsById=function(a){var c=[];if(null!=a)for(var b=0;b<a.length;b++)if("*"==a[b])var e=this.model.getRoot(),c=c.concat(this.model.filterDescendants(function(a){return a!=
-e},e));else{var d=this.model.getCell(a[b]);null!=d&&c.push(d)}return c};Graph.prototype.getCellsForTags=function(a,c,b,e){var d=[];if(null!=a){c=null!=c?c:this.model.getDescendants(this.model.getRoot());b=null!=b?b:"tags";for(var g=0,f={},k=0;k<a.length;k++)0<a[k].length&&(f[a[k].toLowerCase()]=!0,g++);for(k=0;k<c.length;k++)if(e&&this.model.getParent(c[k])==this.model.root||this.model.isVertex(c[k])||this.model.isEdge(c[k])){var l=null!=c[k].value&&"object"==typeof c[k].value?mxUtils.trim(c[k].value.getAttribute(b)||
-""):"",n=!1;if(0<l.length){if(l=l.toLowerCase().split(" "),l.length>=a.length){for(var q=n=0;q<l.length&&n<g;q++)null!=f[l[q]]&&n++;n=n==g}}else n=0==a.length;n&&d.push(c[k])}}return d};Graph.prototype.toggleCells=function(a){this.model.beginUpdate();try{for(var c=0;c<a.length;c++)this.model.setVisible(a[c],!this.model.isVisible(a[c]))}finally{this.model.endUpdate()}};Graph.prototype.setCellsVisible=function(a,c){this.model.beginUpdate();try{for(var b=0;b<a.length;b++)this.model.setVisible(a[b],c)}finally{this.model.endUpdate()}};
-Graph.prototype.highlightCells=function(a,c,b,e){for(var d=0;d<a.length;d++)this.highlightCell(a[d],c,b,e)};Graph.prototype.highlightCell=function(a,c,b,e){c=null!=c?c:mxConstants.DEFAULT_VALID_COLOR;b=null!=b?b:1E3;a=this.view.getState(a);if(null!=a){var d=Math.max(5,mxUtils.getValue(a.style,mxConstants.STYLE_STROKEWIDTH,1)+4),g=new mxCellHighlight(this,c,d,!1);null!=e&&(g.opacity=e);g.highlight(a);window.setTimeout(function(){null!=g.shape&&(mxUtils.setPrefixedStyle(g.shape.node.style,"transition",
-"all 1200ms ease-in-out"),g.shape.node.style.opacity=0);window.setTimeout(function(){g.destroy()},1200)},b)}};Graph.prototype.addSvgShadow=function(a,c,b){b=null!=b?b:!1;var e=a.ownerDocument,d=null!=e.createElementNS?e.createElementNS(mxConstants.NS_SVG,"filter"):e.createElement("filter");d.setAttribute("id",this.shadowId);var g=null!=e.createElementNS?e.createElementNS(mxConstants.NS_SVG,"feGaussianBlur"):e.createElement("feGaussianBlur");g.setAttribute("in","SourceAlpha");g.setAttribute("stdDeviation",
-this.svgShadowBlur);g.setAttribute("result","blur");d.appendChild(g);g=null!=e.createElementNS?e.createElementNS(mxConstants.NS_SVG,"feOffset"):e.createElement("feOffset");g.setAttribute("in","blur");g.setAttribute("dx",this.svgShadowSize);g.setAttribute("dy",this.svgShadowSize);g.setAttribute("result","offsetBlur");d.appendChild(g);g=null!=e.createElementNS?e.createElementNS(mxConstants.NS_SVG,"feFlood"):e.createElement("feFlood");g.setAttribute("flood-color",this.svgShadowColor);g.setAttribute("flood-opacity",
-this.svgShadowOpacity);g.setAttribute("result","offsetColor");d.appendChild(g);g=null!=e.createElementNS?e.createElementNS(mxConstants.NS_SVG,"feComposite"):e.createElement("feComposite");g.setAttribute("in","offsetColor");g.setAttribute("in2","offsetBlur");g.setAttribute("operator","in");g.setAttribute("result","offsetBlur");d.appendChild(g);g=null!=e.createElementNS?e.createElementNS(mxConstants.NS_SVG,"feBlend"):e.createElement("feBlend");g.setAttribute("in","SourceGraphic");g.setAttribute("in2",
-"offsetBlur");d.appendChild(g);g=a.getElementsByTagName("defs");0==g.length?(e=null!=e.createElementNS?e.createElementNS(mxConstants.NS_SVG,"defs"):e.createElement("defs"),null!=a.firstChild?a.insertBefore(e,a.firstChild):a.appendChild(e)):e=g[0];e.appendChild(d);b||(c=null!=c?c:a.getElementsByTagName("g")[0],null!=c&&(c.setAttribute("filter","url(#"+this.shadowId+")"),isNaN(parseInt(a.getAttribute("width")))||(a.setAttribute("width",parseInt(a.getAttribute("width"))+6),a.setAttribute("height",parseInt(a.getAttribute("height"))+
+c[b][d])e.push(c[b][d]);else{var k=a[c[b][d]];null!=k?""!=k&&e.push(k):e.push(c[b][d])}c[b]=e}};Graph.prototype.getCellsForAction=function(a,c){var b=this.getCellsById(a.cells).concat(this.getCellsForTags(a.tags,null,null,c));if(null!=a.excludeCells){for(var e=[],d=0;d<b.length;d++)0>a.excludeCells.indexOf(b[d].id)&&e.push(b[d]);b=e}return b};Graph.prototype.getCellsById=function(a){var c=[];if(null!=a)for(var b=0;b<a.length;b++)if("*"==a[b])var e=this.model.getRoot(),c=c.concat(this.model.filterDescendants(function(a){return a!=
+e},e));else{var d=this.model.getCell(a[b]);null!=d&&c.push(d)}return c};Graph.prototype.getCellsForTags=function(a,c,b,e){var d=[];if(null!=a){c=null!=c?c:this.model.getDescendants(this.model.getRoot());b=null!=b?b:"tags";for(var k=0,f={},g=0;g<a.length;g++)0<a[g].length&&(f[a[g].toLowerCase()]=!0,k++);for(g=0;g<c.length;g++)if(e&&this.model.getParent(c[g])==this.model.root||this.model.isVertex(c[g])||this.model.isEdge(c[g])){var l=null!=c[g].value&&"object"==typeof c[g].value?mxUtils.trim(c[g].value.getAttribute(b)||
+""):"",n=!1;if(0<l.length){if(l=l.toLowerCase().split(" "),l.length>=a.length){for(var q=n=0;q<l.length&&n<k;q++)null!=f[l[q]]&&n++;n=n==k}}else n=0==a.length;n&&d.push(c[g])}}return d};Graph.prototype.toggleCells=function(a){this.model.beginUpdate();try{for(var c=0;c<a.length;c++)this.model.setVisible(a[c],!this.model.isVisible(a[c]))}finally{this.model.endUpdate()}};Graph.prototype.setCellsVisible=function(a,c){this.model.beginUpdate();try{for(var b=0;b<a.length;b++)this.model.setVisible(a[b],c)}finally{this.model.endUpdate()}};
+Graph.prototype.highlightCells=function(a,c,b,e){for(var d=0;d<a.length;d++)this.highlightCell(a[d],c,b,e)};Graph.prototype.highlightCell=function(a,c,b,e){c=null!=c?c:mxConstants.DEFAULT_VALID_COLOR;b=null!=b?b:1E3;a=this.view.getState(a);if(null!=a){var d=Math.max(5,mxUtils.getValue(a.style,mxConstants.STYLE_STROKEWIDTH,1)+4),k=new mxCellHighlight(this,c,d,!1);null!=e&&(k.opacity=e);k.highlight(a);window.setTimeout(function(){null!=k.shape&&(mxUtils.setPrefixedStyle(k.shape.node.style,"transition",
+"all 1200ms ease-in-out"),k.shape.node.style.opacity=0);window.setTimeout(function(){k.destroy()},1200)},b)}};Graph.prototype.addSvgShadow=function(a,c,b){b=null!=b?b:!1;var e=a.ownerDocument,d=null!=e.createElementNS?e.createElementNS(mxConstants.NS_SVG,"filter"):e.createElement("filter");d.setAttribute("id",this.shadowId);var k=null!=e.createElementNS?e.createElementNS(mxConstants.NS_SVG,"feGaussianBlur"):e.createElement("feGaussianBlur");k.setAttribute("in","SourceAlpha");k.setAttribute("stdDeviation",
+this.svgShadowBlur);k.setAttribute("result","blur");d.appendChild(k);k=null!=e.createElementNS?e.createElementNS(mxConstants.NS_SVG,"feOffset"):e.createElement("feOffset");k.setAttribute("in","blur");k.setAttribute("dx",this.svgShadowSize);k.setAttribute("dy",this.svgShadowSize);k.setAttribute("result","offsetBlur");d.appendChild(k);k=null!=e.createElementNS?e.createElementNS(mxConstants.NS_SVG,"feFlood"):e.createElement("feFlood");k.setAttribute("flood-color",this.svgShadowColor);k.setAttribute("flood-opacity",
+this.svgShadowOpacity);k.setAttribute("result","offsetColor");d.appendChild(k);k=null!=e.createElementNS?e.createElementNS(mxConstants.NS_SVG,"feComposite"):e.createElement("feComposite");k.setAttribute("in","offsetColor");k.setAttribute("in2","offsetBlur");k.setAttribute("operator","in");k.setAttribute("result","offsetBlur");d.appendChild(k);k=null!=e.createElementNS?e.createElementNS(mxConstants.NS_SVG,"feBlend"):e.createElement("feBlend");k.setAttribute("in","SourceGraphic");k.setAttribute("in2",
+"offsetBlur");d.appendChild(k);k=a.getElementsByTagName("defs");0==k.length?(e=null!=e.createElementNS?e.createElementNS(mxConstants.NS_SVG,"defs"):e.createElement("defs"),null!=a.firstChild?a.insertBefore(e,a.firstChild):a.appendChild(e)):e=k[0];e.appendChild(d);b||(c=null!=c?c:a.getElementsByTagName("g")[0],null!=c&&(c.setAttribute("filter","url(#"+this.shadowId+")"),isNaN(parseInt(a.getAttribute("width")))||(a.setAttribute("width",parseInt(a.getAttribute("width"))+6),a.setAttribute("height",parseInt(a.getAttribute("height"))+
6),c=a.getAttribute("viewBox"),null!=c&&0<c.length&&(c=c.split(" "),3<c.length&&(w=parseFloat(c[2])+6,h=parseFloat(c[3])+6,a.setAttribute("viewBox",c[0]+" "+c[1]+" "+w+" "+h))))));return d};Graph.prototype.setShadowVisible=function(a,c){mxClient.IS_SVG&&!mxClient.IS_SF&&(c=null!=c?c:!0,(this.shadowVisible=a)?this.view.getDrawPane().setAttribute("filter","url(#"+this.shadowId+")"):this.view.getDrawPane().removeAttribute("filter"),c&&this.fireEvent(new mxEventObject("shadowVisibleChanged")))};Graph.prototype.selectUnlockedLayer=
function(){if(null==this.defaultParent){var a=this.model.getChildCount(this.model.root),c,b=0;do c=this.model.getChildAt(this.model.root,b);while(b++<a&&"1"==mxUtils.getValue(this.getCellStyle(c),"locked","0"));null!=c&&this.setDefaultParent(c)}};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",
@@ -3273,293 +3274,295 @@ mxStencilRegistry.libraries["mockup/misc"]=[SHAPES_PATH+"/mockup/mxMockupMisc.js
"/mxBasic.js",STENCIL_PATH+"/bootstrap.xml"];mxStencilRegistry.libraries.gmdl=[SHAPES_PATH+"/mxGmdl.js",STENCIL_PATH+"/gmdl.xml"];mxStencilRegistry.libraries.gcp2=[SHAPES_PATH+"/mxGCP2.js",STENCIL_PATH+"/gcp2.xml"];mxStencilRegistry.libraries.ibm=[SHAPES_PATH+"/mxIBM.js",STENCIL_PATH+"/ibm.xml"];mxStencilRegistry.libraries.cabinets=[SHAPES_PATH+"/mxCabinets.js",STENCIL_PATH+"/cabinets.xml"];mxStencilRegistry.libraries.archimate=[SHAPES_PATH+"/mxArchiMate.js"];mxStencilRegistry.libraries.archimate3=
[SHAPES_PATH+"/mxArchiMate3.js"];mxStencilRegistry.libraries.sysml=[SHAPES_PATH+"/mxSysML.js"];mxStencilRegistry.libraries.eip=[SHAPES_PATH+"/mxEip.js",STENCIL_PATH+"/eip.xml"];mxStencilRegistry.libraries.networks=[SHAPES_PATH+"/mxNetworks.js",STENCIL_PATH+"/networks.xml"];mxStencilRegistry.libraries.aws3d=[SHAPES_PATH+"/mxAWS3D.js",STENCIL_PATH+"/aws3d.xml"];mxStencilRegistry.libraries.aws4=[SHAPES_PATH+"/mxAWS4.js",STENCIL_PATH+"/aws4.xml"];mxStencilRegistry.libraries.aws4b=[SHAPES_PATH+"/mxAWS4.js",
STENCIL_PATH+"/aws4.xml"];mxStencilRegistry.libraries.uml25=[SHAPES_PATH+"/mxUML25.js"];mxStencilRegistry.libraries.veeam=[STENCIL_PATH+"/veeam/2d.xml",STENCIL_PATH+"/veeam/3d.xml",STENCIL_PATH+"/veeam/veeam.xml"];mxStencilRegistry.libraries.veeam2=[STENCIL_PATH+"/veeam/2d.xml",STENCIL_PATH+"/veeam/3d.xml",STENCIL_PATH+"/veeam/veeam2.xml"];mxStencilRegistry.libraries.pid2inst=[SHAPES_PATH+"/pid2/mxPidInstruments.js"];mxStencilRegistry.libraries.pid2misc=[SHAPES_PATH+"/pid2/mxPidMisc.js",STENCIL_PATH+
-"/pid/misc.xml"];mxStencilRegistry.libraries.pid2valves=[SHAPES_PATH+"/pid2/mxPidValves.js"];mxStencilRegistry.libraries.pidFlowSensors=[STENCIL_PATH+"/pid/flow_sensors.xml"];mxMarker.getPackageForType=function(a){var c=null;null!=a&&0<a.length&&("ER"==a.substring(0,2)?c="mxgraph.er":"sysML"==a.substring(0,5)&&(c="mxgraph.sysml"));return c};var M=mxMarker.createMarker;mxMarker.createMarker=function(a,c,b,e,d,g,f,k,l,n){if(null!=b&&null==mxMarker.markers[b]){var q=this.getPackageForType(b);null!=q&&
-mxStencilRegistry.getStencil(q)}return M.apply(this,arguments)};PrintDialog.prototype.create=function(a,c){function b(){t.value=Math.max(1,Math.min(k,Math.max(parseInt(t.value),parseInt(m.value))));m.value=Math.max(1,Math.min(k,Math.min(parseInt(t.value),parseInt(m.value))))}function e(c){function b(c,b,g){var f=c.useCssTransforms,k=c.currentTranslate,l=c.currentScale,n=c.view.translate,q=c.view.scale;c.useCssTransforms&&(c.useCssTransforms=!1,c.currentTranslate=new mxPoint(0,0),c.currentScale=1,
-c.view.translate=new mxPoint(0,0),c.view.scale=1);var u=c.getGraphBounds(),m=0,t=0,x=F.get(),p=1/c.pageScale,A=z.checked;if(A)var p=parseInt(O.value),C=parseInt(I.value),p=Math.min(x.height*C/(u.height/c.view.scale),x.width*p/(u.width/c.view.scale));else p=parseInt(v.value)/(100*c.pageScale),isNaN(p)&&(e=1/c.pageScale,v.value="100 %");x=mxRectangle.fromRectangle(x);x.width=Math.ceil(x.width*e);x.height=Math.ceil(x.height*e);p*=e;!A&&c.pageVisible?(u=c.getPageLayout(),m-=u.x*x.width,t-=u.y*x.height):
+"/pid/misc.xml"];mxStencilRegistry.libraries.pid2valves=[SHAPES_PATH+"/pid2/mxPidValves.js"];mxStencilRegistry.libraries.pidFlowSensors=[STENCIL_PATH+"/pid/flow_sensors.xml"];mxMarker.getPackageForType=function(a){var c=null;null!=a&&0<a.length&&("ER"==a.substring(0,2)?c="mxgraph.er":"sysML"==a.substring(0,5)&&(c="mxgraph.sysml"));return c};var M=mxMarker.createMarker;mxMarker.createMarker=function(a,c,b,e,d,k,f,g,l,n){if(null!=b&&null==mxMarker.markers[b]){var q=this.getPackageForType(b);null!=q&&
+mxStencilRegistry.getStencil(q)}return M.apply(this,arguments)};PrintDialog.prototype.create=function(a,c){function b(){t.value=Math.max(1,Math.min(g,Math.max(parseInt(t.value),parseInt(m.value))));m.value=Math.max(1,Math.min(g,Math.min(parseInt(t.value),parseInt(m.value))))}function e(c){function b(c,b,k){var f=c.useCssTransforms,g=c.currentTranslate,l=c.currentScale,n=c.view.translate,q=c.view.scale;c.useCssTransforms&&(c.useCssTransforms=!1,c.currentTranslate=new mxPoint(0,0),c.currentScale=1,
+c.view.translate=new mxPoint(0,0),c.view.scale=1);var u=c.getGraphBounds(),m=0,t=0,x=F.get(),p=1/c.pageScale,A=z.checked;if(A)var p=parseInt(O.value),D=parseInt(I.value),p=Math.min(x.height*D/(u.height/c.view.scale),x.width*p/(u.width/c.view.scale));else p=parseInt(v.value)/(100*c.pageScale),isNaN(p)&&(e=1/c.pageScale,v.value="100 %");x=mxRectangle.fromRectangle(x);x.width=Math.ceil(x.width*e);x.height=Math.ceil(x.height*e);p*=e;!A&&c.pageVisible?(u=c.getPageLayout(),m-=u.x*x.width,t-=u.y*x.height):
A=!0;if(null==b){b=PrintDialog.createPrintPreview(c,p,x,0,m,t,A);b.pageSelector=!1;b.mathEnabled=!1;m=a.getCurrentFile();null!=m&&(b.title=m.getTitle());var N=b.writeHead;b.writeHead=function(b){N.apply(this,arguments);if(mxClient.IS_GC||mxClient.IS_SF)b.writeln('<style type="text/css">'),b.writeln(Editor.mathJaxWebkitCss),b.writeln("</style>");mxClient.IS_GC&&(b.writeln('<style type="text/css">'),b.writeln("@media print {"),b.writeln("span.MathJax_SVG svg { shape-rendering: crispEdges; }"),b.writeln("}"),
-b.writeln("</style>"));null!=a.editor.fontCss&&(b.writeln('<style type="text/css">'),b.writeln(a.editor.fontCss),b.writeln("</style>"));for(var e=c.getCustomFonts(),d=0;d<e.length;d++){var g=e[d].name,f=e[d].url;Graph.isCssFontUrl(f)?b.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(f)+'" charset="UTF-8" type="text/css">'):(b.writeln('<style type="text/css">'),b.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(g)+'";\nsrc: url("'+mxUtils.htmlEntities(f)+'");\n}'),b.writeln("</style>"))}};
-if("undefined"!==typeof MathJax){var E=b.renderPage;b.renderPage=function(c,b,e,d,g,f){var k=mxClient.NO_FO;mxClient.NO_FO=this.graph.mathEnabled&&!a.editor.useForeignObjectForMath?!0:a.editor.originalNoForeignObject;var l=E.apply(this,arguments);mxClient.NO_FO=k;this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:l.className="geDisableMathJax";return l}}m=null;t=d.enableFlowAnimation;d.enableFlowAnimation=!1;null!=d.themes&&"darkTheme"==d.defaultThemeName&&(m=d.stylesheet,d.stylesheet=d.getDefaultStylesheet(),
-d.refresh());b.open(null,null,g,!0);d.enableFlowAnimation=t;null!=m&&(d.stylesheet=m,d.refresh())}else{x=c.background;if(null==x||""==x||x==mxConstants.NONE)x="#ffffff";b.backgroundColor=x;b.autoOrigin=A;b.appendGraph(c,p,m,t,g,!0);g=c.getCustomFonts();if(null!=b.wnd)for(m=0;m<g.length;m++)t=g[m].name,A=g[m].url,Graph.isCssFontUrl(A)?b.wnd.document.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(A)+'" charset="UTF-8" type="text/css">'):(b.wnd.document.writeln('<style type="text/css">'),
-b.wnd.document.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(t)+'";\nsrc: url("'+mxUtils.htmlEntities(A)+'");\n}'),b.wnd.document.writeln("</style>"))}f&&(c.useCssTransforms=f,c.currentTranslate=k,c.currentScale=l,c.view.translate=n,c.view.scale=q);return b}var e=parseInt(K.value)/100;isNaN(e)&&(e=1,K.value="100 %");var e=.75*e,g=null;null!=d.themes&&"darkTheme"==d.defaultThemeName&&(g=d.stylesheet,d.stylesheet=d.getDefaultStylesheet(),d.refresh());var f=m.value,k=t.value,n=!q.checked,
-u=null;if(EditorUi.isElectronApp)PrintDialog.electronPrint(a,q.checked,f,k,z.checked,O.value,I.value,parseInt(v.value)/100,parseInt(K.value)/100,F.get());else{n&&(n=f==l&&k==l);if(!n&&null!=a.pages&&a.pages.length){var x=0,n=a.pages.length-1;q.checked||(x=parseInt(f)-1,n=parseInt(k)-1);for(var p=x;p<=n;p++){var A=a.pages[p],f=A==a.currentPage?d:null;if(null==f){var f=a.createTemporaryGraph(d.stylesheet),k=!0,x=!1,C=null,N=null;null==A.viewState&&null==A.root&&a.updatePageRoot(A);null!=A.viewState&&
-(k=A.viewState.pageVisible,x=A.viewState.mathEnabled,C=A.viewState.background,N=A.viewState.backgroundImage,f.extFonts=A.viewState.extFonts);f.background=C;f.backgroundImage=null!=N?new mxImage(N.src,N.width,N.height):null;f.pageVisible=k;f.mathEnabled=x;var E=f.getGlobalVariable;f.getGlobalVariable=function(c){return"page"==c?A.getName():"pagenumber"==c?p+1:"pagecount"==c?null!=a.pages?a.pages.length:1:E.apply(this,arguments)};document.body.appendChild(f.container);a.updatePageRoot(A);f.model.setRoot(A.root)}u=
-b(f,u,p!=n);f!=d&&f.container.parentNode.removeChild(f.container)}}else u=b(d);null==u?a.handleError({message:mxResources.get("errorUpdatingPreview")}):(u.mathEnabled&&(n=u.wnd.document,c&&(u.wnd.IMMEDIATE_PRINT=!0),n.writeln('<script type="text/javascript" src="'+DRAWIO_BASE_URL+'/js/math-print.js">\x3c/script>')),u.closeDocument(),!u.mathEnabled&&c&&PrintDialog.printPreview(u));null!=g&&(d.stylesheet=g,d.refresh())}}var d=a.editor.graph,g=document.createElement("div"),f=document.createElement("h3");
-f.style.width="100%";f.style.textAlign="center";f.style.marginTop="0px";mxUtils.write(f,c||mxResources.get("print"));g.appendChild(f);var k=1,l=1,n=document.createElement("div");n.style.cssText="border-bottom:1px solid lightGray;padding-bottom:12px;margin-bottom:12px;";var q=document.createElement("input");q.style.cssText="margin-right:8px;margin-bottom:8px;";q.setAttribute("value","all");q.setAttribute("type","radio");q.setAttribute("name","pages-printdialog");n.appendChild(q);f=document.createElement("span");
+b.writeln("</style>"));null!=a.editor.fontCss&&(b.writeln('<style type="text/css">'),b.writeln(a.editor.fontCss),b.writeln("</style>"));for(var e=c.getCustomFonts(),d=0;d<e.length;d++){var k=e[d].name,f=e[d].url;Graph.isCssFontUrl(f)?b.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(f)+'" charset="UTF-8" type="text/css">'):(b.writeln('<style type="text/css">'),b.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(k)+'";\nsrc: url("'+mxUtils.htmlEntities(f)+'");\n}'),b.writeln("</style>"))}};
+if("undefined"!==typeof MathJax){var E=b.renderPage;b.renderPage=function(c,b,e,d,k,f){var g=mxClient.NO_FO;mxClient.NO_FO=this.graph.mathEnabled&&!a.editor.useForeignObjectForMath?!0:a.editor.originalNoForeignObject;var l=E.apply(this,arguments);mxClient.NO_FO=g;this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:l.className="geDisableMathJax";return l}}m=null;t=d.enableFlowAnimation;d.enableFlowAnimation=!1;null!=d.themes&&"darkTheme"==d.defaultThemeName&&(m=d.stylesheet,d.stylesheet=d.getDefaultStylesheet(),
+d.refresh());b.open(null,null,k,!0);d.enableFlowAnimation=t;null!=m&&(d.stylesheet=m,d.refresh())}else{x=c.background;if(null==x||""==x||x==mxConstants.NONE)x="#ffffff";b.backgroundColor=x;b.autoOrigin=A;b.appendGraph(c,p,m,t,k,!0);k=c.getCustomFonts();if(null!=b.wnd)for(m=0;m<k.length;m++)t=k[m].name,A=k[m].url,Graph.isCssFontUrl(A)?b.wnd.document.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(A)+'" charset="UTF-8" type="text/css">'):(b.wnd.document.writeln('<style type="text/css">'),
+b.wnd.document.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(t)+'";\nsrc: url("'+mxUtils.htmlEntities(A)+'");\n}'),b.wnd.document.writeln("</style>"))}f&&(c.useCssTransforms=f,c.currentTranslate=g,c.currentScale=l,c.view.translate=n,c.view.scale=q);return b}var e=parseInt(K.value)/100;isNaN(e)&&(e=1,K.value="100 %");var e=.75*e,k=null;null!=d.themes&&"darkTheme"==d.defaultThemeName&&(k=d.stylesheet,d.stylesheet=d.getDefaultStylesheet(),d.refresh());var f=m.value,g=t.value,n=!q.checked,
+u=null;if(EditorUi.isElectronApp)PrintDialog.electronPrint(a,q.checked,f,g,z.checked,O.value,I.value,parseInt(v.value)/100,parseInt(K.value)/100,F.get());else{n&&(n=f==l&&g==l);if(!n&&null!=a.pages&&a.pages.length){var x=0,n=a.pages.length-1;q.checked||(x=parseInt(f)-1,n=parseInt(g)-1);for(var p=x;p<=n;p++){var A=a.pages[p],f=A==a.currentPage?d:null;if(null==f){var f=a.createTemporaryGraph(d.stylesheet),g=!0,x=!1,D=null,N=null;null==A.viewState&&null==A.root&&a.updatePageRoot(A);null!=A.viewState&&
+(g=A.viewState.pageVisible,x=A.viewState.mathEnabled,D=A.viewState.background,N=A.viewState.backgroundImage,f.extFonts=A.viewState.extFonts);f.background=D;f.backgroundImage=null!=N?new mxImage(N.src,N.width,N.height):null;f.pageVisible=g;f.mathEnabled=x;var E=f.getGlobalVariable;f.getGlobalVariable=function(c){return"page"==c?A.getName():"pagenumber"==c?p+1:"pagecount"==c?null!=a.pages?a.pages.length:1:E.apply(this,arguments)};document.body.appendChild(f.container);a.updatePageRoot(A);f.model.setRoot(A.root)}u=
+b(f,u,p!=n);f!=d&&f.container.parentNode.removeChild(f.container)}}else u=b(d);null==u?a.handleError({message:mxResources.get("errorUpdatingPreview")}):(u.mathEnabled&&(n=u.wnd.document,c&&(u.wnd.IMMEDIATE_PRINT=!0),n.writeln('<script type="text/javascript" src="'+DRAWIO_BASE_URL+'/js/math-print.js">\x3c/script>')),u.closeDocument(),!u.mathEnabled&&c&&PrintDialog.printPreview(u));null!=k&&(d.stylesheet=k,d.refresh())}}var d=a.editor.graph,k=document.createElement("div"),f=document.createElement("h3");
+f.style.width="100%";f.style.textAlign="center";f.style.marginTop="0px";mxUtils.write(f,c||mxResources.get("print"));k.appendChild(f);var g=1,l=1,n=document.createElement("div");n.style.cssText="border-bottom:1px solid lightGray;padding-bottom:12px;margin-bottom:12px;";var q=document.createElement("input");q.style.cssText="margin-right:8px;margin-bottom:8px;";q.setAttribute("value","all");q.setAttribute("type","radio");q.setAttribute("name","pages-printdialog");n.appendChild(q);f=document.createElement("span");
mxUtils.write(f,mxResources.get("printAllPages"));n.appendChild(f);mxUtils.br(n);var u=q.cloneNode(!0);q.setAttribute("checked","checked");u.setAttribute("value","range");n.appendChild(u);f=document.createElement("span");mxUtils.write(f,mxResources.get("pages")+":");n.appendChild(f);var m=document.createElement("input");m.style.cssText="margin:0 8px 0 8px;";m.setAttribute("value","1");m.setAttribute("type","number");m.setAttribute("min","1");m.style.width="50px";n.appendChild(m);f=document.createElement("span");
-mxUtils.write(f,mxResources.get("to"));n.appendChild(f);var t=m.cloneNode(!0);n.appendChild(t);mxEvent.addListener(m,"focus",function(){u.checked=!0});mxEvent.addListener(t,"focus",function(){u.checked=!0});mxEvent.addListener(m,"change",b);mxEvent.addListener(t,"change",b);if(null!=a.pages&&(k=a.pages.length,null!=a.currentPage))for(f=0;f<a.pages.length;f++)if(a.currentPage==a.pages[f]){l=f+1;m.value=l;t.value=l;break}m.setAttribute("max",k);t.setAttribute("max",k);a.isPagesEnabled()?1<k&&(g.appendChild(n),
+mxUtils.write(f,mxResources.get("to"));n.appendChild(f);var t=m.cloneNode(!0);n.appendChild(t);mxEvent.addListener(m,"focus",function(){u.checked=!0});mxEvent.addListener(t,"focus",function(){u.checked=!0});mxEvent.addListener(m,"change",b);mxEvent.addListener(t,"change",b);if(null!=a.pages&&(g=a.pages.length,null!=a.currentPage))for(f=0;f<a.pages.length;f++)if(a.currentPage==a.pages[f]){l=f+1;m.value=l;t.value=l;break}m.setAttribute("max",g);t.setAttribute("max",g);a.isPagesEnabled()?1<g&&(k.appendChild(n),
u.checked=!0):u.checked=!0;var x=document.createElement("div");x.style.marginBottom="10px";var p=document.createElement("input");p.style.marginRight="8px";p.setAttribute("value","adjust");p.setAttribute("type","radio");p.setAttribute("name","printZoom");x.appendChild(p);f=document.createElement("span");mxUtils.write(f,mxResources.get("adjustTo"));x.appendChild(f);var v=document.createElement("input");v.style.cssText="margin:0 8px 0 8px;";v.setAttribute("value","100 %");v.style.width="50px";x.appendChild(v);
-mxEvent.addListener(v,"focus",function(){p.checked=!0});g.appendChild(x);var n=n.cloneNode(!1),z=p.cloneNode(!0);z.setAttribute("value","fit");p.setAttribute("checked","checked");f=document.createElement("div");f.style.cssText="display:inline-block;height:100%;vertical-align:top;padding-top:2px;";f.appendChild(z);n.appendChild(f);x=document.createElement("table");x.style.display="inline-block";var A=document.createElement("tbody"),C=document.createElement("tr"),N=C.cloneNode(!0),E=document.createElement("td"),
-G=E.cloneNode(!0),H=E.cloneNode(!0),D=E.cloneNode(!0),U=E.cloneNode(!0),M=E.cloneNode(!0);E.style.textAlign="right";D.style.textAlign="right";mxUtils.write(E,mxResources.get("fitTo"));var O=document.createElement("input");O.style.cssText="margin:0 8px 0 8px;";O.setAttribute("value","1");O.setAttribute("min","1");O.setAttribute("type","number");O.style.width="40px";G.appendChild(O);f=document.createElement("span");mxUtils.write(f,mxResources.get("fitToSheetsAcross"));H.appendChild(f);mxUtils.write(D,
-mxResources.get("fitToBy"));var I=O.cloneNode(!0);U.appendChild(I);mxEvent.addListener(O,"focus",function(){z.checked=!0});mxEvent.addListener(I,"focus",function(){z.checked=!0});f=document.createElement("span");mxUtils.write(f,mxResources.get("fitToSheetsDown"));M.appendChild(f);C.appendChild(E);C.appendChild(G);C.appendChild(H);N.appendChild(D);N.appendChild(U);N.appendChild(M);A.appendChild(C);A.appendChild(N);x.appendChild(A);n.appendChild(x);g.appendChild(n);n=document.createElement("div");f=
+mxEvent.addListener(v,"focus",function(){p.checked=!0});k.appendChild(x);var n=n.cloneNode(!1),z=p.cloneNode(!0);z.setAttribute("value","fit");p.setAttribute("checked","checked");f=document.createElement("div");f.style.cssText="display:inline-block;height:100%;vertical-align:top;padding-top:2px;";f.appendChild(z);n.appendChild(f);x=document.createElement("table");x.style.display="inline-block";var A=document.createElement("tbody"),D=document.createElement("tr"),N=D.cloneNode(!0),E=document.createElement("td"),
+G=E.cloneNode(!0),H=E.cloneNode(!0),C=E.cloneNode(!0),U=E.cloneNode(!0),M=E.cloneNode(!0);E.style.textAlign="right";C.style.textAlign="right";mxUtils.write(E,mxResources.get("fitTo"));var O=document.createElement("input");O.style.cssText="margin:0 8px 0 8px;";O.setAttribute("value","1");O.setAttribute("min","1");O.setAttribute("type","number");O.style.width="40px";G.appendChild(O);f=document.createElement("span");mxUtils.write(f,mxResources.get("fitToSheetsAcross"));H.appendChild(f);mxUtils.write(C,
+mxResources.get("fitToBy"));var I=O.cloneNode(!0);U.appendChild(I);mxEvent.addListener(O,"focus",function(){z.checked=!0});mxEvent.addListener(I,"focus",function(){z.checked=!0});f=document.createElement("span");mxUtils.write(f,mxResources.get("fitToSheetsDown"));M.appendChild(f);D.appendChild(E);D.appendChild(G);D.appendChild(H);N.appendChild(C);N.appendChild(U);N.appendChild(M);A.appendChild(D);A.appendChild(N);x.appendChild(A);n.appendChild(x);k.appendChild(n);n=document.createElement("div");f=
document.createElement("div");f.style.fontWeight="bold";f.style.marginBottom="12px";mxUtils.write(f,mxResources.get("paperSize"));n.appendChild(f);f=document.createElement("div");f.style.marginBottom="12px";var F=PageSetupDialog.addPageFormatPanel(f,"printdialog",a.editor.graph.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT);n.appendChild(f);f=document.createElement("span");mxUtils.write(f,mxResources.get("pageScale"));n.appendChild(f);var K=document.createElement("input");K.style.cssText="margin:0 8px 0 8px;";
-K.setAttribute("value","100 %");K.style.width="60px";n.appendChild(K);g.appendChild(n);f=document.createElement("div");f.style.cssText="text-align:right;margin:48px 0 0 0;";n=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});n.className="geBtn";a.editor.cancelFirst&&f.appendChild(n);a.isOffline()||(x=mxUtils.button(mxResources.get("help"),function(){d.openLink("https://www.diagrams.net/doc/faq/print-diagram")}),x.className="geBtn",f.appendChild(x));PrintDialog.previewEnabled&&(x=
-mxUtils.button(mxResources.get("preview"),function(){a.hideDialog();e(!1)}),x.className="geBtn",f.appendChild(x));x=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){a.hideDialog();e(!0)});x.className="geBtn gePrimaryBtn";f.appendChild(x);a.editor.cancelFirst||f.appendChild(n);g.appendChild(f);this.container=g};var U=ChangePageSetup.prototype.execute;ChangePageSetup.prototype.execute=function(){null==this.page&&(this.page=this.ui.currentPage);if(this.page!=this.ui.currentPage){if(null!=
+K.setAttribute("value","100 %");K.style.width="60px";n.appendChild(K);k.appendChild(n);f=document.createElement("div");f.style.cssText="text-align:right;margin:48px 0 0 0;";n=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});n.className="geBtn";a.editor.cancelFirst&&f.appendChild(n);a.isOffline()||(x=mxUtils.button(mxResources.get("help"),function(){d.openLink("https://www.diagrams.net/doc/faq/print-diagram")}),x.className="geBtn",f.appendChild(x));PrintDialog.previewEnabled&&(x=
+mxUtils.button(mxResources.get("preview"),function(){a.hideDialog();e(!1)}),x.className="geBtn",f.appendChild(x));x=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){a.hideDialog();e(!0)});x.className="geBtn gePrimaryBtn";f.appendChild(x);a.editor.cancelFirst||f.appendChild(n);k.appendChild(f);this.container=k};var U=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 a=this.image;null!=a&&null!=a.src&&Graph.isPageLink(a.src)&&(a={originalSrc:a.src});this.page.viewState.backgroundImage=a}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 U.apply(this,arguments),null!=this.mathEnabled&&
this.mathEnabled!=this.ui.isMathEnabled()&&(this.ui.setMathEnabled(this.mathEnabled),this.mathEnabled=!this.mathEnabled),null!=this.shadowVisible&&this.shadowVisible!=this.ui.editor.graph.shadowVisible&&(this.ui.editor.graph.setShadowVisible(this.shadowVisible),this.shadowVisible=!this.shadowVisible)};Editor.prototype.useCanvasForExport=!1;try{var O=document.createElement("canvas"),N=new Image;N.onload=function(){try{O.getContext("2d").drawImage(N,0,0);var a=O.toDataURL("image/png");Editor.prototype.useCanvasForExport=
-null!=a&&6<a.length}catch(D){}};N.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){}})();
-(function(){var a=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);a.beforeDecode=function(a,d,k){k.ui=a.ui;return d};a.afterDecode=function(a,d,k){k.previousColor=k.color;k.previousImage=k.image;k.previousFormat=k.format;null!=k.foldingEnabled&&(k.foldingEnabled=!k.foldingEnabled);null!=k.mathEnabled&&(k.mathEnabled=!k.mathEnabled);null!=k.shadowVisible&&(k.shadowVisible=!k.shadowVisible);return k};mxCodecRegistry.register(a)})();
-(function(){var a=new mxObjectCodec(new ChangeGridColor,["ui"]);a.beforeDecode=function(a,d,k){k.ui=a.ui;return d};mxCodecRegistry.register(a)})();(function(){EditorUi.VERSION="15.0.3";EditorUi.compactUi="atlas"!=uiTheme;Editor.isDarkMode()&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&(/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname))&&"support.draw.io"!=window.location.hostname;EditorUi.drawHost=window.DRAWIO_BASE_URL;EditorUi.lightboxHost=window.DRAWIO_LIGHTBOX_URL;EditorUi.lastErrorMessage=
+null!=a&&6<a.length}catch(C){}};N.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){}})();
+(function(){var a=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);a.beforeDecode=function(a,d,g){g.ui=a.ui;return d};a.afterDecode=function(a,d,g){g.previousColor=g.color;g.previousImage=g.image;g.previousFormat=g.format;null!=g.foldingEnabled&&(g.foldingEnabled=!g.foldingEnabled);null!=g.mathEnabled&&(g.mathEnabled=!g.mathEnabled);null!=g.shadowVisible&&(g.shadowVisible=!g.shadowVisible);return g};mxCodecRegistry.register(a)})();
+(function(){var a=new mxObjectCodec(new ChangeGridColor,["ui"]);a.beforeDecode=function(a,d,g){g.ui=a.ui;return d};mxCodecRegistry.register(a)})();(function(){EditorUi.VERSION="15.0.4";EditorUi.compactUi="atlas"!=uiTheme;Editor.isDarkMode()&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&(/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname))&&"support.draw.io"!=window.location.hostname;EditorUi.drawHost=window.DRAWIO_BASE_URL;EditorUi.lightboxHost=window.DRAWIO_LIGHTBOX_URL;EditorUi.lastErrorMessage=
null;EditorUi.ignoredAnonymizedChars="\n\t`~!@#$%^&*()_+{}|:\"<>?-=[];'./,\n\t";EditorUi.templateFile=TEMPLATE_PATH+"/index.xml";EditorUi.cacheUrl="1"==urlParams.dev?"/cache":window.REALTIME_URL;null==EditorUi.cacheUrl&&"undefined"!==typeof DrawioFile&&(DrawioFile.SYNC="none");Editor.cacheTimeout=1E4;EditorUi.enablePlantUml=EditorUi.enableLogging;EditorUi.isElectronApp=null!=window&&null!=window.process&&null!=window.process.versions&&null!=window.process.versions.electron;EditorUi.nativeFileSupport=
!mxClient.IS_OP&&!EditorUi.isElectronApp&&"1"!=urlParams.extAuth&&"showSaveFilePicker"in window&&"showOpenFilePicker"in window;EditorUi.enableDrafts=!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&isLocalStorage&&"0"!=urlParams.drafts;EditorUi.scratchpadHelpLink="https://www.diagrams.net/doc/faq/scratchpad";EditorUi.defaultMermaidConfig={theme:"neutral",arrowMarkerAbsolute:!1,flowchart:{htmlLabels:!1},sequence:{diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,
-noteMargin:10,messageMargin:35,mirrorActors:!0,bottomMarginAdj:1,useMaxWidth:!0,rightAngles:!1,showSequenceNumbers:!1},gantt:{titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,leftPadding:75,gridLineStartPadding:35,fontSize:11,fontFamily:'"Open-Sans", "sans-serif"',numberSectionStyles:4,axisFormat:"%Y-%m-%d"}};EditorUi.logError=function(a,b,d,f,k,q,u){q=null!=q?q:0<=a.indexOf("NetworkError")||0<=a.indexOf("SecurityError")||0<=a.indexOf("NS_ERROR_FAILURE")||0<=a.indexOf("out of memory")?"CONFIG":
-"SEVERE";if(EditorUi.enableLogging&&"1"!=urlParams.dev)try{if(a!=EditorUi.lastErrorMessage&&(null==a||null==b||-1==a.indexOf("Script error")&&-1==a.indexOf("extension"))&&null!=a&&0>a.indexOf("DocumentClosedError")){EditorUi.lastErrorMessage=a;var c=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";k=null!=k?k:Error(a);(new Image).src=c+"/log?severity="+q+"&v="+encodeURIComponent(EditorUi.VERSION)+"&msg=clientError:"+encodeURIComponent(a)+":url:"+encodeURIComponent(window.location.href)+":lnum:"+
-encodeURIComponent(d)+(null!=f?":colno:"+encodeURIComponent(f):"")+(null!=k&&null!=k.stack?"&stack="+encodeURIComponent(k.stack):"")}}catch(A){}try{u||null==window.console||console.error(q,a,b,d,f,k)}catch(A){}};EditorUi.logEvent=function(a){if("1"==urlParams.dev)EditorUi.debug("logEvent",a);else if(EditorUi.enableLogging)try{var c=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";(new Image).src=c+"/images/1x1.png?v="+encodeURIComponent(EditorUi.VERSION)+(null!=a?"&data="+encodeURIComponent(JSON.stringify(a)):
-"")}catch(g){}};EditorUi.sendReport=function(a,b){if("1"==urlParams.dev)EditorUi.debug("sendReport",a);else if(EditorUi.enableLogging)try{b=null!=b?b:5E4,a.length>b&&(a=a.substring(0,b)+"\n...[SHORTENED]"),mxUtils.post("/email","version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&data="+encodeURIComponent(a))}catch(g){}};EditorUi.debug=function(){try{if(null!=window.console&&"1"==urlParams.test){for(var a=[(new Date).toISOString()],b=0;b<arguments.length;b++)null!=
-arguments[b]&&a.push(arguments[b]);console.log.apply(console,a)}}catch(g){}};EditorUi.parsePng=function(a,b,d){function c(a,c){var b=g;g+=c;return a.substring(b,g)}function e(a){a=c(a,4);return a.charCodeAt(3)+(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}var g=0;if(c(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=d&&d();else if(c(a,4),"IHDR"!=c(a,4))null!=d&&d();else{c(a,17);do{d=e(a);var f=c(a,4);if(null!=b&&b(g-8,f,d))break;value=c(a,d);c(a,4);if("IEND"==
+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(a,b,d,f,g,q,u){q=null!=q?q:0<=a.indexOf("NetworkError")||0<=a.indexOf("SecurityError")||0<=a.indexOf("NS_ERROR_FAILURE")||0<=a.indexOf("out of memory")?"CONFIG":
+"SEVERE";if(EditorUi.enableLogging&&"1"!=urlParams.dev)try{if(a!=EditorUi.lastErrorMessage&&(null==a||null==b||-1==a.indexOf("Script error")&&-1==a.indexOf("extension"))&&null!=a&&0>a.indexOf("DocumentClosedError")){EditorUi.lastErrorMessage=a;var c=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";g=null!=g?g:Error(a);(new Image).src=c+"/log?severity="+q+"&v="+encodeURIComponent(EditorUi.VERSION)+"&msg=clientError:"+encodeURIComponent(a)+":url:"+encodeURIComponent(window.location.href)+":lnum:"+
+encodeURIComponent(d)+(null!=f?":colno:"+encodeURIComponent(f):"")+(null!=g&&null!=g.stack?"&stack="+encodeURIComponent(g.stack):"")}}catch(A){}try{u||null==window.console||console.error(q,a,b,d,f,g)}catch(A){}};EditorUi.logEvent=function(a){if("1"==urlParams.dev)EditorUi.debug("logEvent",a);else if(EditorUi.enableLogging)try{var c=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";(new Image).src=c+"/images/1x1.png?v="+encodeURIComponent(EditorUi.VERSION)+(null!=a?"&data="+encodeURIComponent(JSON.stringify(a)):
+"")}catch(k){}};EditorUi.sendReport=function(a,b){if("1"==urlParams.dev)EditorUi.debug("sendReport",a);else if(EditorUi.enableLogging)try{b=null!=b?b:5E4,a.length>b&&(a=a.substring(0,b)+"\n...[SHORTENED]"),mxUtils.post("/email","version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&data="+encodeURIComponent(a))}catch(k){}};EditorUi.debug=function(){try{if(null!=window.console&&"1"==urlParams.test){for(var a=[(new Date).toISOString()],b=0;b<arguments.length;b++)null!=
+arguments[b]&&a.push(arguments[b]);console.log.apply(console,a)}}catch(k){}};EditorUi.parsePng=function(a,b,d){function c(a,c){var b=k;k+=c;return a.substring(b,k)}function e(a){a=c(a,4);return a.charCodeAt(3)+(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}var k=0;if(c(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=d&&d();else if(c(a,4),"IHDR"!=c(a,4))null!=d&&d();else{c(a,17);do{d=e(a);var f=c(a,4);if(null!=b&&b(k-8,f,d))break;value=c(a,d);c(a,4);if("IEND"==
f)break}while(d)}};EditorUi.removeChildNodes=function(a){for(;null!=a.firstChild;)a.removeChild(a.firstChild)};EditorUi.prototype.emptyDiagramXml='<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/></root></mxGraphModel>';EditorUi.prototype.emptyLibraryXml="<mxlibrary>[]</mxlibrary>";EditorUi.prototype.mode=null;EditorUi.prototype.timeout=Editor.prototype.timeout;EditorUi.prototype.sidebarFooterHeight=38;EditorUi.prototype.defaultCustomShapeStyle="shape=stencil(tZRtTsQgEEBPw1+DJR7AoN6DbWftpAgE0Ortd/jYRGq72R+YNE2YgTePloEJGWblgA18ZuKFDcMj5/Sm8boZq+BgjCX4pTyqk6ZlKROitwusOMXKQDODx5iy4pXxZ5qTHiFHawxB0JrQZH7lCabQ0Fr+XWC1/E8zcsT/gAi+Subo2/3Mh6d/oJb5nU1b5tW7r2knautaa3T+U32o7f7vZwpJkaNDLORJjcu7t59m2jXxqX9un+tt022acsfmoKaQZ+vhhswZtS6Ne/ThQGt0IV0N3Yyv6P3CeT9/tHO0XFI5cAE=);whiteSpace=wrap;html=1;";
EditorUi.prototype.maxBackgroundSize=1600;EditorUi.prototype.maxImageSize=520;EditorUi.prototype.maxTextWidth=520;EditorUi.prototype.resampleThreshold=1E5;EditorUi.prototype.maxImageBytes=1E6;EditorUi.prototype.maxBackgroundBytes=25E5;EditorUi.prototype.maxTextBytes=5E5;EditorUi.prototype.currentFile=null;EditorUi.prototype.printPdfExport=!1;EditorUi.prototype.pdfPageExport=!0;EditorUi.prototype.formatEnabled="0"!=urlParams.format;EditorUi.prototype.insertTemplateEnabled=!0;EditorUi.prototype.closableScratchpad=
!0;(function(){EditorUi.prototype.useCanvasForExport=!1;EditorUi.prototype.jpgSupported=!1;try{var a=document.createElement("canvas");EditorUi.prototype.canvasSupported=!(!a.getContext||!a.getContext("2d"))}catch(l){}try{var b=document.createElement("canvas"),d=new Image;d.onload=function(){try{b.getContext("2d").drawImage(d,0,0);var a=b.toDataURL("image/png");EditorUi.prototype.useCanvasForExport=null!=a&&6<a.length}catch(q){}};d.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(l){}try{b=
document.createElement("canvas");b.width=b.height=1;var f=b.toDataURL("image/jpeg");EditorUi.prototype.jpgSupported=null!==f.match("image/jpeg")}catch(l){}})();EditorUi.prototype.openLink=function(a,b,d){return this.editor.graph.openLink(a,b,d)};EditorUi.prototype.showSplash=function(a){};EditorUi.prototype.getLocalData=function(a,b){b(localStorage.getItem(a))};EditorUi.prototype.setLocalData=function(a,b,d){localStorage.setItem(a,b);null!=d&&d()};EditorUi.prototype.removeLocalData=function(a,b){localStorage.removeItem(a);
b()};EditorUi.prototype.setMathEnabled=function(a){this.editor.graph.mathEnabled=a;this.editor.updateGraphComponents();this.editor.graph.refresh();this.fireEvent(new mxEventObject("mathEnabledChanged"))};EditorUi.prototype.isMathEnabled=function(a){return this.editor.graph.mathEnabled};EditorUi.prototype.isOfflineApp=function(){return"1"==urlParams.offline};EditorUi.prototype.isOffline=function(a){return this.isOfflineApp()||!navigator.onLine||!a&&("1"==urlParams.stealth||"1"==urlParams.lockdown)};
-EditorUi.prototype.createSpinner=function(a,b,d){var c=null==a||null==b;d=null!=d?d:24;var e=new Spinner({lines:12,length:d,width:Math.round(d/3),radius:Math.round(d/2),rotate:0,color:Editor.isDarkMode()?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),g=e.spin;e.spin=function(d,f){var k=!1;this.active||(g.call(this,d),this.active=!0,null!=f&&(c&&(b=Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,a=document.body.clientWidth/2-2),k=document.createElement("div"),
-k.style.position="absolute",k.style.whiteSpace="nowrap",k.style.background="#4B4243",k.style.color="white",k.style.fontFamily="Helvetica, Arial",k.style.fontSize="9pt",k.style.padding="6px",k.style.paddingLeft="10px",k.style.paddingRight="10px",k.style.zIndex=2E9,k.style.left=Math.max(0,a)+"px",k.style.top=Math.max(0,b+70)+"px",mxUtils.setPrefixedStyle(k.style,"borderRadius","6px"),mxUtils.setPrefixedStyle(k.style,"transform","translate(-50%,-50%)"),Editor.isDarkMode()||mxUtils.setPrefixedStyle(k.style,
-"boxShadow","2px 2px 3px 0px #ddd"),"..."!=f.substring(f.length-3,f.length)&&"!"!=f.charAt(f.length-1)&&(f+="..."),k.innerHTML=f,d.appendChild(k),e.status=k),this.pause=mxUtils.bind(this,function(){var a=function(){};this.active&&(a=mxUtils.bind(this,function(){this.spin(d,f)}));this.stop();return a}),k=!0);return k};var f=e.stop;e.stop=function(){f.call(this);this.active=!1;null!=e.status&&null!=e.status.parentNode&&e.status.parentNode.removeChild(e.status);e.status=null};e.pause=function(){return function(){}};
+EditorUi.prototype.createSpinner=function(a,b,d){var c=null==a||null==b;d=null!=d?d:24;var e=new Spinner({lines:12,length:d,width:Math.round(d/3),radius:Math.round(d/2),rotate:0,color:Editor.isDarkMode()?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),k=e.spin;e.spin=function(d,f){var g=!1;this.active||(k.call(this,d),this.active=!0,null!=f&&(c&&(b=Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,a=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="Helvetica, Arial",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,a)+"px",g.style.top=Math.max(0,b+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"),"..."!=f.substring(f.length-3,f.length)&&"!"!=f.charAt(f.length-1)&&(f+="..."),g.innerHTML=f,d.appendChild(g),e.status=g),this.pause=mxUtils.bind(this,function(){var a=function(){};this.active&&(a=mxUtils.bind(this,function(){this.spin(d,f)}));this.stop();return a}),g=!0);return g};var f=e.stop;e.stop=function(){f.call(this);this.active=!1;null!=e.status&&null!=e.status.parentNode&&e.status.parentNode.removeChild(e.status);e.status=null};e.pause=function(){return function(){}};
return e};EditorUi.prototype.isCompatibleString=function(a){try{var c=mxUtils.parseXml(a),b=this.editor.extractGraphModel(c.documentElement,!0);return null!=b&&0==b.getElementsByTagName("parsererror").length}catch(n){}return!1};EditorUi.prototype.isVisioData=function(a){return 8<a.length&&(208==a.charCodeAt(0)&&207==a.charCodeAt(1)&&17==a.charCodeAt(2)&&224==a.charCodeAt(3)&&161==a.charCodeAt(4)&&177==a.charCodeAt(5)&&26==a.charCodeAt(6)&&225==a.charCodeAt(7)||80==a.charCodeAt(0)&&75==a.charCodeAt(1)&&
3==a.charCodeAt(2)&&4==a.charCodeAt(3)||80==a.charCodeAt(0)&&75==a.charCodeAt(1)&&3==a.charCodeAt(2)&&6==a.charCodeAt(3))};EditorUi.prototype.isRemoteVisioData=function(a){return 8<a.length&&(208==a.charCodeAt(0)&&207==a.charCodeAt(1)&&17==a.charCodeAt(2)&&224==a.charCodeAt(3)&&161==a.charCodeAt(4)&&177==a.charCodeAt(5)&&26==a.charCodeAt(6)&&225==a.charCodeAt(7)||60==a.charCodeAt(0)&&63==a.charCodeAt(1)&&120==a.charCodeAt(2)&&109==a.charCodeAt(3)&&108==a.charCodeAt(3))};EditorUi.prototype.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)};var a=EditorUi.prototype.createKeyHandler;EditorUi.prototype.createKeyHandler=function(c){var b=a.apply(this,arguments);if(!this.editor.chromeless||this.editor.editable){var d=b.getFunction,f=this.editor.graph,k=this;b.getFunction=function(a){if(f.isSelectionEmpty()&&null!=k.pages&&0<k.pages.length){var c=
-k.getSelectedPageIndex();if(mxEvent.isShiftDown(a)){if(37==a.keyCode)return function(){0<c&&k.movePage(c,c-1)};if(38==a.keyCode)return function(){0<c&&k.movePage(c,0)};if(39==a.keyCode)return function(){c<k.pages.length-1&&k.movePage(c,c+1)};if(40==a.keyCode)return function(){c<k.pages.length-1&&k.movePage(c,k.pages.length-1)}}else if(mxEvent.isControlDown(a)||mxClient.IS_MAC&&mxEvent.isMetaDown(a)){if(37==a.keyCode)return function(){0<c&&k.selectNextPage(!1)};if(38==a.keyCode)return function(){0<
-c&&k.selectPage(k.pages[0])};if(39==a.keyCode)return function(){c<k.pages.length-1&&k.selectNextPage(!0)};if(40==a.keyCode)return function(){c<k.pages.length-1&&k.selectPage(k.pages[k.pages.length-1])}}}return d.apply(this,arguments)}}return b};var b=EditorUi.prototype.extractGraphModelFromHtml;EditorUi.prototype.extractGraphModelFromHtml=function(a){var c=b.apply(this,arguments);if(null==c)try{var d=a.indexOf("&lt;mxfile ");if(0<=d){var f=a.lastIndexOf("&lt;/mxfile&gt;");f>d&&(c=a.substring(d,f+
-15).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}else var k=mxUtils.parseXml(a),q=this.editor.extractGraphModel(k.documentElement,null!=this.pages||"hidden"==this.diagramContainer.style.visibility),c=null!=q?mxUtils.getXml(q):""}catch(u){}return c};EditorUi.prototype.validateFileData=function(a){if(null!=a&&0<a.length){var c=a.indexOf('<meta charset="utf-8">');0<=c&&(a=a.slice(0,c)+'<meta charset="utf-8"/>'+a.slice(c+23-1,a.length));a=Graph.zapGremlins(a)}return a};
+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)};var a=EditorUi.prototype.createKeyHandler;EditorUi.prototype.createKeyHandler=function(c){var b=a.apply(this,arguments);if(!this.editor.chromeless||this.editor.editable){var d=b.getFunction,f=this.editor.graph,g=this;b.getFunction=function(a){if(f.isSelectionEmpty()&&null!=g.pages&&0<g.pages.length){var c=
+g.getSelectedPageIndex();if(mxEvent.isShiftDown(a)){if(37==a.keyCode)return function(){0<c&&g.movePage(c,c-1)};if(38==a.keyCode)return function(){0<c&&g.movePage(c,0)};if(39==a.keyCode)return function(){c<g.pages.length-1&&g.movePage(c,c+1)};if(40==a.keyCode)return function(){c<g.pages.length-1&&g.movePage(c,g.pages.length-1)}}else if(mxEvent.isControlDown(a)||mxClient.IS_MAC&&mxEvent.isMetaDown(a)){if(37==a.keyCode)return function(){0<c&&g.selectNextPage(!1)};if(38==a.keyCode)return function(){0<
+c&&g.selectPage(g.pages[0])};if(39==a.keyCode)return function(){c<g.pages.length-1&&g.selectNextPage(!0)};if(40==a.keyCode)return function(){c<g.pages.length-1&&g.selectPage(g.pages[g.pages.length-1])}}}return d.apply(this,arguments)}}return b};var b=EditorUi.prototype.extractGraphModelFromHtml;EditorUi.prototype.extractGraphModelFromHtml=function(a){var c=b.apply(this,arguments);if(null==c)try{var d=a.indexOf("&lt;mxfile ");if(0<=d){var f=a.lastIndexOf("&lt;/mxfile&gt;");f>d&&(c=a.substring(d,f+
+15).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}else var g=mxUtils.parseXml(a),q=this.editor.extractGraphModel(g.documentElement,null!=this.pages||"hidden"==this.diagramContainer.style.visibility),c=null!=q?mxUtils.getXml(q):""}catch(u){}return c};EditorUi.prototype.validateFileData=function(a){if(null!=a&&0<a.length){var c=a.indexOf('<meta charset="utf-8">');0<=c&&(a=a.slice(0,c)+'<meta charset="utf-8"/>'+a.slice(c+23-1,a.length));a=Graph.zapGremlins(a)}return a};
EditorUi.prototype.replaceFileData=function(a){a=this.validateFileData(a);a=null!=a&&0<a.length?mxUtils.parseXml(a).documentElement:null;var c=null!=a?this.editor.extractGraphModel(a,!0):null;null!=c&&(a=c);if(null!=a){c=this.editor.graph;c.model.beginUpdate();try{var b=null!=this.pages?this.pages.slice():null,d=a.getElementsByTagName("diagram");if("0"!=urlParams.pages||1<d.length||1==d.length&&d[0].hasAttribute("name")){this.fileNode=a;this.pages=null!=this.pages?this.pages:[];for(var f=d.length-
-1;0<=f;f--){var k=this.updatePageRoot(new DiagramPage(d[f]));null==k.getName()&&k.setName(mxResources.get("pageWithNumber",[f+1]));c.model.execute(new ChangePage(this,k,0==f?k:null,0))}}else"0"!=urlParams.pages&&null==this.fileNode&&(this.fileNode=a.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(a.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),c.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0))),
-this.editor.setGraphXml(a),null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=b)for(f=0;f<b.length;f++)c.model.execute(new ChangePage(this,b[f],null))}finally{c.model.endUpdate()}}};EditorUi.prototype.createFileData=function(a,b,d,f,k,q,m,t,p,x,G){b=null!=b?b:this.editor.graph;k=null!=k?k:!1;p=null!=p?p:!0;var c,e=null;null==d||d.getMode()==App.MODE_DEVICE||d.getMode()==App.MODE_BROWSER?c="_blank":e=c=f;if(null==a)return"";var g=a;if("mxfile"!=g.nodeName.toLowerCase()){if(G){var l=
-a.ownerDocument.createElement("diagram");l.setAttribute("id",Editor.guid());l.appendChild(a)}else{l=Graph.zapGremlins(mxUtils.getXml(a));g=Graph.compress(l);if(Graph.decompress(g)!=l)return l;l=a.ownerDocument.createElement("diagram");l.setAttribute("id",Editor.guid());mxUtils.setTextContent(l,g)}g=a.ownerDocument.createElement("mxfile");g.appendChild(l)}x?(g=g.cloneNode(!0),g.removeAttribute("modified"),g.removeAttribute("host"),g.removeAttribute("agent"),g.removeAttribute("etag"),g.removeAttribute("userAgent"),
-g.removeAttribute("version"),g.removeAttribute("editor"),g.removeAttribute("type")):(g.removeAttribute("userAgent"),g.removeAttribute("version"),g.removeAttribute("editor"),g.removeAttribute("pages"),g.removeAttribute("type"),mxClient.IS_CHROMEAPP?g.setAttribute("host","Chrome"):EditorUi.isElectronApp?g.setAttribute("host","Electron"):g.setAttribute("host",window.location.hostname),g.setAttribute("modified",(new Date).toISOString()),g.setAttribute("agent",navigator.appVersion),g.setAttribute("version",
-EditorUi.VERSION),g.setAttribute("etag",Editor.guid()),a=null!=d?d.getMode():this.mode,null!=a&&g.setAttribute("type",a),1<g.getElementsByTagName("diagram").length&&null!=this.pages&&g.setAttribute("pages",this.pages.length));G=G?mxUtils.getPrettyXml(g):mxUtils.getXml(g);if(!q&&!k&&(m||null!=d&&/(\.html)$/i.test(d.getTitle())))G=this.getHtml2(mxUtils.getXml(g),b,null!=d?d.getTitle():null,c,e);else if(q||!k&&null!=d&&/(\.svg)$/i.test(d.getTitle()))null==d||d.getMode()!=App.MODE_DEVICE&&d.getMode()!=
-App.MODE_BROWSER||(f=null),G=this.getEmbeddedSvg(G,b,f,null,t,p,e);return G};EditorUi.prototype.getXmlFileData=function(a,b,d){a=null!=a?a:!0;b=null!=b?b:!1;d=null!=d?d:!Editor.compressXml;var c=this.editor.getGraphXml(a);if(a&&null!=this.fileNode&&null!=this.currentPage)if(a=function(a){var b=a.getElementsByTagName("mxGraphModel"),b=0<b.length?b[0]:null;null==b&&d?(b=mxUtils.trim(mxUtils.getTextContent(a)),a=a.cloneNode(!1),0<b.length&&(b=Graph.decompress(b),null!=b&&0<b.length&&a.appendChild(mxUtils.parseXml(b).documentElement))):
-null==b||d?a=a.cloneNode(!0):(a=a.cloneNode(!1),mxUtils.setTextContent(a,Graph.compressNode(b)));c.appendChild(a)},EditorUi.removeChildNodes(this.currentPage.node),mxUtils.setTextContent(this.currentPage.node,Graph.compressNode(c)),c=this.fileNode.cloneNode(!1),b)a(this.currentPage.node);else for(b=0;b<this.pages.length;b++){if(this.currentPage!=this.pages[b]&&this.pages[b].needsUpdate){var e=(new mxCodec(mxUtils.createXmlDocument())).encode(new mxGraphModel(this.pages[b].root));this.editor.graph.saveViewState(this.pages[b].viewState,
-e);EditorUi.removeChildNodes(this.pages[b].node);mxUtils.setTextContent(this.pages[b].node,Graph.compressNode(e));delete this.pages[b].needsUpdate}a(this.pages[b].node)}return c};EditorUi.prototype.anonymizeString=function(a,b){for(var c=[],e=0;e<a.length;e++){var d=a.charAt(e);0<=EditorUi.ignoredAnonymizedChars.indexOf(d)?c.push(d):isNaN(parseInt(d))?d.toLowerCase()!=d?c.push(String.fromCharCode(65+Math.round(25*Math.random()))):d.toUpperCase()!=d?c.push(String.fromCharCode(97+Math.round(25*Math.random()))):
-/\s/.test(d)?c.push(" "):c.push("?"):c.push(b?"0":Math.round(9*Math.random()))}return c.join("")};EditorUi.prototype.anonymizePatch=function(a){if(null!=a[EditorUi.DIFF_INSERT])for(var c=0;c<a[EditorUi.DIFF_INSERT].length;c++)try{var b=mxUtils.parseXml(a[EditorUi.DIFF_INSERT][c].data).documentElement.cloneNode(!1);null!=b.getAttribute("name")&&b.setAttribute("name",this.anonymizeString(b.getAttribute("name")));a[EditorUi.DIFF_INSERT][c].data=mxUtils.getXml(b)}catch(q){a[EditorUi.DIFF_INSERT][c].data=
-q.message}if(null!=a[EditorUi.DIFF_UPDATE]){for(var d in a[EditorUi.DIFF_UPDATE]){var f=a[EditorUi.DIFF_UPDATE][d];null!=f.name&&(f.name=this.anonymizeString(f.name));null!=f.cells&&(c=mxUtils.bind(this,function(a){var c=f.cells[a];if(null!=c){for(var b in c)null!=c[b].value&&(c[b].value="["+c[b].value.length+"]"),null!=c[b].xmlValue&&(c[b].xmlValue="["+c[b].xmlValue.length+"]"),null!=c[b].style&&(c[b].style="["+c[b].style.length+"]"),0==Object.keys(c[b]).length&&delete c[b];0==Object.keys(c).length&&
-delete f.cells[a]}}),c(EditorUi.DIFF_INSERT),c(EditorUi.DIFF_UPDATE),0==Object.keys(f.cells).length&&delete f.cells);0==Object.keys(f).length&&delete a[EditorUi.DIFF_UPDATE][d]}0==Object.keys(a[EditorUi.DIFF_UPDATE]).length&&delete a[EditorUi.DIFF_UPDATE]}return a};EditorUi.prototype.anonymizeAttributes=function(a,b){if(null!=a.attributes)for(var c=0;c<a.attributes.length;c++)"as"!=a.attributes[c].name&&a.setAttribute(a.attributes[c].name,this.anonymizeString(a.attributes[c].value,b));if(null!=a.childNodes)for(c=
-0;c<a.childNodes.length;c++)this.anonymizeAttributes(a.childNodes[c],b)};EditorUi.prototype.anonymizeNode=function(a,b){for(var c=a.getElementsByTagName("mxCell"),e=0;e<c.length;e++)null!=c[e].getAttribute("value")&&c[e].setAttribute("value","["+c[e].getAttribute("value").length+"]"),null!=c[e].getAttribute("xmlValue")&&c[e].setAttribute("xmlValue","["+c[e].getAttribute("xmlValue").length+"]"),null!=c[e].getAttribute("style")&&c[e].setAttribute("style","["+c[e].getAttribute("style").length+"]"),null!=
-c[e].parentNode&&"root"!=c[e].parentNode.nodeName&&null!=c[e].parentNode.parentNode&&(c[e].setAttribute("id",c[e].parentNode.getAttribute("id")),c[e].parentNode.parentNode.replaceChild(c[e],c[e].parentNode));return a};EditorUi.prototype.synchronizeCurrentFile=function(a){var c=this.getCurrentFile();null!=c&&(c.savingFile?this.handleError({message:mxResources.get("busy")}):!a&&c.invalidChecksum?c.handleFileError(null,!0):this.spinner.spin(document.body,mxResources.get("updatingDocument"))&&(c.clearAutosave(),
-this.editor.setStatus(""),a?c.reloadFile(mxUtils.bind(this,function(){c.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(a){c.handleFileError(a,!0)})):c.synchronizeFile(mxUtils.bind(this,function(){c.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(a){c.handleFileError(a,!0)}))))};EditorUi.prototype.getFileData=function(a,b,d,f,k,q,m,t,p,x){k=null!=k?k:!0;q=null!=q?q:!1;var c=this.editor.graph;if(b||!a&&null!=p&&/(\.svg)$/i.test(p.getTitle()))if(x=
-!1,null!=c.themes&&"darkTheme"==c.defaultThemeName||null!=this.pages&&this.currentPage!=this.pages[0]){var e=c.getGlobalVariable,c=this.createTemporaryGraph(c.getStylesheet()),g=this.pages[0];c.getGlobalVariable=function(a){return"page"==a?g.getName():"pagenumber"==a?1:e.apply(this,arguments)};document.body.appendChild(c.container);c.model.setRoot(g.root)}m=null!=m?m:this.getXmlFileData(k,q,x);p=null!=p?p:this.getCurrentFile();a=this.createFileData(m,c,p,window.location.href,a,b,d,f,k,t,x);c!=this.editor.graph&&
-c.container.parentNode.removeChild(c.container);return a};EditorUi.prototype.getHtml=function(a,b,d,f,k,q){q=null!=q?q:!0;var c=null,e=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=b){var c=q?b.getGraphBounds():b.getBoundingBox(b.getSelectionCells()),g=b.view.scale;q=Math.floor(c.x/g-b.view.translate.x);g=Math.floor(c.y/g-b.view.translate.y);c=b.background;null==k&&(b=this.getBasenames().join(";"),0<b.length&&(e=EditorUi.drawHost+"/embed.js?s="+b));a.setAttribute("x0",q);a.setAttribute("y0",
-g)}null!=a&&(a.setAttribute("pan","1"),a.setAttribute("zoom","1"),a.setAttribute("resize","0"),a.setAttribute("fit","0"),a.setAttribute("border","20"),a.setAttribute("links","1"),null!=f&&a.setAttribute("edit",f));null!=k&&(k=k.replace(/&/g,"&amp;"));a=null!=a?Graph.zapGremlins(mxUtils.getXml(a)):"";f=Graph.compress(a);Graph.decompress(f)!=a&&(f=encodeURIComponent(a));return(null==k?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+
-(null!=k?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==k?null!=d?"<title>"+mxUtils.htmlEntities(d)+"</title>\n":"":"<title>diagrams.net</title>\n")+(null!=k?'<meta http-equiv="refresh" content="0;URL=\''+k+"'\"/>\n":"")+"</head>\n<body"+(null==k&&null!=c&&c!=mxConstants.NONE?' style="background-color:'+c+';">':">")+'\n<div class="mxgraph" style="position:relative;overflow:auto;width:100%;">\n<div style="width:1px;height:1px;overflow:hidden;">'+f+"</div>\n</div>\n"+(null==k?'<script type="text/javascript" src="'+
-e+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+k+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.getHtml2=function(a,b,d,f,k){b=window.DRAWIO_VIEWER_URL||EditorUi.drawHost+"/js/viewer-static.min.js";null!=k&&(k=k.replace(/&/g,"&amp;"));a={highlight:"#0000ff",nav:this.editor.graph.foldingEnabled,resize:!0,xml:Graph.zapGremlins(a),toolbar:"pages zoom layers lightbox"};
-null!=this.pages&&null!=this.currentPage&&(a.page=mxUtils.indexOf(this.pages,this.currentPage));return(null==k?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=k?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==k?null!=d?"<title>"+mxUtils.htmlEntities(d)+"</title>\n":"":"<title>diagrams.net</title>\n")+(null!=k?'<meta http-equiv="refresh" content="0;URL=\''+k+"'\"/>\n":"")+'<meta charset="utf-8"/>\n</head>\n<body>\n<div class="mxgraph" style="max-width:100%;border:1px solid transparent;" data-mxgraph="'+
-mxUtils.htmlEntities(JSON.stringify(a))+'"></div>\n'+(null==k?'<script type="text/javascript" src="'+b+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+k+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.setFileData=function(a){a=this.validateFileData(a);this.pages=this.fileNode=this.currentPage=null;a=null!=a&&0<a.length?mxUtils.parseXml(a).documentElement:
-null;var c=Editor.extractParserError(a,mxResources.get("invalidOrMissingFile"));if(c)throw Error(mxResources.get("notADiagramFile")+" ("+c+")");c=null!=a?this.editor.extractGraphModel(a,!0):null;null!=c&&(a=c);if(null!=a&&"mxfile"==a.nodeName&&(c=a.getElementsByTagName("diagram"),"0"!=urlParams.pages||1<c.length||1==c.length&&c[0].hasAttribute("name"))){var b=null;this.fileNode=a;this.pages=[];for(var d=0;d<c.length;d++)null==c[d].getAttribute("id")&&c[d].setAttribute("id",d),a=new DiagramPage(c[d]),
-null==a.getName()&&a.setName(mxResources.get("pageWithNumber",[d+1])),this.pages.push(a),null!=urlParams["page-id"]&&a.getId()==urlParams["page-id"]&&(b=a);this.currentPage=null!=b?b:this.pages[Math.max(0,Math.min(this.pages.length-1,urlParams.page||0))];a=this.currentPage.node}"0"!=urlParams.pages&&null==this.fileNode&&null!=a&&(this.fileNode=a.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(a.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",
-[1])),this.pages=[this.currentPage]);this.editor.setGraphXml(a);null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=urlParams["layer-ids"])try{var f=urlParams["layer-ids"].split(" ");a={};for(d=0;d<f.length;d++)a[f[d]]=!0;for(var k=this.editor.graph.getModel(),m=k.getChildren(k.root),d=0;d<m.length;d++){var t=m[d];k.setVisible(t,a[t.id]||!1)}}catch(A){}};EditorUi.prototype.getBaseFilename=function(a){var c=this.getCurrentFile(),c=null!=c&&null!=c.getTitle()?c.getTitle():
-this.defaultFilename;if(/(\.xml)$/i.test(c)||/(\.html)$/i.test(c)||/(\.svg)$/i.test(c)||/(\.png)$/i.test(c)||/(\.drawio)$/i.test(c))c=c.substring(0,c.lastIndexOf("."));!a&&null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&null!=this.currentPage.node.getAttribute("name")&&0<this.currentPage.getName().length&&(c=c+"-"+this.currentPage.getName());return c};EditorUi.prototype.downloadFile=function(a,b,d,f,k,q,m,t,p,x,G){try{f=null!=f?f:this.editor.graph.isSelectionEmpty();var c=this.getBaseFilename(!k),
-e=c+"."+a;if("xml"==a){var g='<?xml version="1.0" encoding="UTF-8"?>\n'+this.getFileData(!0,null,null,null,f,k,null,null,null,b);this.saveData(e,a,g,"text/xml")}else if("html"==a)g=this.getHtml2(this.getFileData(!0),this.editor.graph,c),this.saveData(e,a,g,"text/html");else if("svg"!=a&&"xmlsvg"!=a||!this.spinner.spin(document.body,mxResources.get("export")))"xmlpng"==a?e=c+".png":"jpeg"==a&&(e=c+".jpg"),this.saveRequest(e,a,mxUtils.bind(this,function(c,b){try{var e=this.editor.graph.pageVisible;
-null!=q&&(this.editor.graph.pageVisible=q);var d=this.createDownloadRequest(c,a,f,b,m,k,t,p,x,G);this.editor.graph.pageVisible=e;return d}catch(v){this.handleError(v)}}));else{var l=null,n=mxUtils.bind(this,function(a){a.length<=MAX_REQUEST_SIZE?this.saveData(e,"svg",a,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(l)}))});if("svg"==a){var u=this.editor.graph.background;if(m||u==mxConstants.NONE)u=
-null;var C=this.editor.graph.getSvg(u,null,null,null,null,f);d&&this.editor.graph.addSvgShadow(C);this.editor.convertImages(C,mxUtils.bind(this,mxUtils.bind(this,function(a){this.spinner.stop();n('<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n'+mxUtils.getXml(a))})))}else e=c+".svg",l=this.getFileData(!1,!0,null,mxUtils.bind(this,function(a){this.spinner.stop();n(a)}),f)}}catch(M){this.handleError(M)}};EditorUi.prototype.createDownloadRequest=
-function(a,b,d,f,k,q,m,t,p,x){var c=this.editor.graph,e=c.getGraphBounds();d=this.getFileData(!0,null,null,null,d,0==q?!1:"xmlpng"!=b);var g="",l="";if(e.width*e.height>MAX_AREA||d.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};x=x?"1":"0";"pdf"==b&&0==q&&(l="&allPages=1");if("xmlpng"==b&&(x="1",b="png",null!=this.pages&&null!=this.currentPage))for(q=0;q<this.pages.length;q++)if(this.pages[q]==this.currentPage){g="&from="+q;break}q=c.background;"png"!=b&&"pdf"!=b||!k?k||
-null!=q&&q!=mxConstants.NONE||(q="#ffffff"):q=mxConstants.NONE;k={globalVars:c.getExportVariables()};p&&(k.grid={size:c.gridSize,steps:c.view.gridSteps,color:c.view.gridColor});Graph.translateDiagram&&(k.diagramLanguage=Graph.diagramLanguage);return new mxXmlRequest(EXPORT_URL,"format="+b+g+l+"&bg="+(null!=q?q:mxConstants.NONE)+"&base64="+f+"&embedXml="+x+"&xml="+encodeURIComponent(d)+(null!=a?"&filename="+encodeURIComponent(a):"")+"&extras="+encodeURIComponent(JSON.stringify(k))+(null!=m?"&scale="+
-m:"")+(null!=t?"&border="+t:""))};EditorUi.prototype.setMode=function(a,b){this.mode=a};EditorUi.prototype.loadDescriptor=function(a,b,d){var c=window.location.hash,e=mxUtils.bind(this,function(d){var e=null!=a.data?a.data:"";null!=d&&0<d.length&&(0<e.length&&(e+="\n"),e+=d);d=new LocalFile(this,"csv"!=a.format&&0<e.length?e:this.emptyDiagramXml,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0);d.getHash=function(){return c};this.fileLoaded(d);"csv"==a.format&&this.importCsv(e,
-mxUtils.bind(this,function(a){this.editor.undoManager.clear();this.editor.setModified(!1);this.editor.setStatus("")}));if(null!=a.update){var f=null!=a.interval?parseInt(a.interval):6E4,g=null,k=mxUtils.bind(this,function(){var c=this.currentPage;mxUtils.post(a.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,function(a){c===this.currentPage&&(200<=a.getStatus()&&300>=a.getStatus()?(this.updateDiagram(a.getText()),l()):this.handleError({message:mxResources.get("error")+
-" "+a.getStatus()}))}),mxUtils.bind(this,function(a){this.handleError(a)}))}),l=mxUtils.bind(this,function(){window.clearTimeout(g);g=window.setTimeout(k,f)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){l();k()}));l();k()}null!=b&&b()});null!=a.url&&0<a.url.length?this.editor.loadUrl(a.url,mxUtils.bind(this,function(a){e(a)}),mxUtils.bind(this,function(a){null!=d&&d(a)})):e("")};EditorUi.prototype.updateDiagram=function(a){function c(a){var c=new mxCellOverlay(a.image||f.warningImage,
-a.tooltip,a.align,a.valign,a.offset);c.addListener(mxEvent.CLICK,function(c,b){d.alert(a.tooltip)});return c}var b=null,d=this;if(null!=a&&0<a.length&&(b=mxUtils.parseXml(a),a=null!=b?b.documentElement:null,null!=a&&"updates"==a.nodeName)){var f=this.editor.graph,k=f.getModel();k.beginUpdate();var m=null;try{for(a=a.firstChild;null!=a;){if("update"==a.nodeName){var t=k.getCell(a.getAttribute("id"));if(null!=t){try{var p=a.getAttribute("value");if(null!=p){var x=mxUtils.parseXml(p).documentElement;
-if(null!=x)if("1"==x.getAttribute("replace-value"))k.setValue(t,x);else for(var G=x.attributes,z=0;z<G.length;z++)f.setAttributeForCell(t,G[z].nodeName,0<G[z].nodeValue.length?G[z].nodeValue:null)}}catch(U){null!=window.console&&console.log("Error in value for "+t.id+": "+U)}try{var E=a.getAttribute("style");null!=E&&f.model.setStyle(t,E)}catch(U){null!=window.console&&console.log("Error in style for "+t.id+": "+U)}try{var H=a.getAttribute("icon");if(null!=H){var K=0<H.length?JSON.parse(H):null;null!=
-K&&K.append||f.removeCellOverlays(t);null!=K&&f.addCellOverlay(t,c(K))}}catch(U){null!=window.console&&console.log("Error in icon for "+t.id+": "+U)}try{var F=a.getAttribute("geometry");if(null!=F){var F=JSON.parse(F),I=f.getCellGeometry(t);if(null!=I){I=I.clone();for(key in F){var C=parseFloat(F[key]);"dx"==key?I.x+=C:"dy"==key?I.y+=C:"dw"==key?I.width+=C:"dh"==key?I.height+=C:I[key]=parseFloat(F[key])}f.model.setGeometry(t,I)}}}catch(U){null!=window.console&&console.log("Error in icon for "+t.id+
-": "+U)}}}else if("model"==a.nodeName){for(var M=a.firstChild;null!=M&&M.nodeType!=mxConstants.NODETYPE_ELEMENT;)M=M.nextSibling;null!=M&&(new mxCodec(a.firstChild)).decode(M,k)}else if("view"==a.nodeName){if(a.hasAttribute("scale")&&(f.view.scale=parseFloat(a.getAttribute("scale"))),a.hasAttribute("dx")||a.hasAttribute("dy"))f.view.translate=new mxPoint(parseFloat(a.getAttribute("dx")||0),parseFloat(a.getAttribute("dy")||0))}else"fit"==a.nodeName&&(m=a.hasAttribute("max-scale")?parseFloat(a.getAttribute("max-scale")):
-1);a=a.nextSibling}}finally{k.endUpdate()}null!=m&&this.chromelessResize&&this.chromelessResize(!0,m)}return b};EditorUi.prototype.getCopyFilename=function(a,b){var c=null!=a&&null!=a.getTitle()?a.getTitle():this.defaultFilename,d="",e=c.lastIndexOf(".");0<=e&&(d=c.substring(e),c=c.substring(0,e));if(b)var f=new Date,e=f.getFullYear(),k=f.getMonth()+1,m=f.getDate(),p=f.getHours(),x=f.getMinutes(),f=f.getSeconds(),c=c+(" "+(e+"-"+k+"-"+m+"-"+p+"-"+x+"-"+f));return c=mxResources.get("copyOf",[c])+d};
-EditorUi.prototype.fileLoaded=function(a,b){var c=this.getCurrentFile();this.fileEditable=this.fileLoadedError=null;this.setCurrentFile(null);var d=!1;this.hideDialog();null!=c&&(EditorUi.debug("File.closed",[c]),c.removeListener(this.descriptorChangedListener),c.close());this.editor.graph.model.clear();this.editor.undoManager.clear();var e=mxUtils.bind(this,function(){this.setGraphEnabled(!1);this.setCurrentFile(null);null!=c&&this.updateDocumentTitle();this.editor.graph.model.clear();this.editor.undoManager.clear();
-this.setBackgroundImage(null);!b&&null!=window.location.hash&&0<window.location.hash.length&&(window.location.hash="");null!=this.fname&&(this.fnameWrapper.style.display="none",this.fname.innerHTML="",this.fname.setAttribute("title",mxResources.get("rename")));this.editor.setStatus("");this.updateUi();b||this.showSplash()});if(null!=a)try{mxClient.IS_SF&&"min"==uiTheme&&(this.diagramContainer.style.visibility="");this.openingFile=!0;this.setCurrentFile(a);a.addListener("descriptorChanged",this.descriptorChangedListener);
-a.addListener("contentChanged",this.descriptorChangedListener);a.open();delete this.openingFile;this.setGraphEnabled(!0);this.setMode(a.getMode());this.editor.graph.model.prefix=Editor.guid()+"-";this.editor.undoManager.clear();this.descriptorChanged();this.updateUi();a.isEditable()?a.isModified()?(a.addUnsavedStatus(),null!=a.backupPatch&&a.patch([a.backupPatch])):this.editor.setStatus(""):this.editor.setStatus('<span class="geStatusAlert" style="margin-left:8px;">'+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"));d=!0;this.isOffline()||null==a.getMode()||EditorUi.logEvent({category:a.getMode().toUpperCase()+"-OPEN-FILE-"+a.getHash(),action:"size_"+a.getSize(),
-label:"autosave_"+(this.editor.autosave?"on":"off")});EditorUi.debug("File.opened",[a]);if(this.editor.editable&&this.mode==a.getMode()&&a.getMode()!=App.MODE_DEVICE&&null!=a.getMode())try{this.addRecent({id:a.getHash(),title:a.getTitle(),mode:a.getMode()})}catch(u){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+1),mxSettings.save()}catch(u){}}catch(u){this.fileLoadedError=u;if(EditorUi.enableLogging&&!this.isOffline())try{EditorUi.logEvent({category:"ERROR-LOAD-FILE-"+(null!=a?a.getHash():
-"none"),action:"message_"+u.message,label:"stack_"+u.stack})}catch(t){}var f=mxUtils.bind(this,function(){null!=urlParams.url&&this.spinner.spin(document.body,mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=c?this.fileLoaded(c):e()});b?f():this.handleError(u,mxResources.get("errorLoadingFile"),f,!0,null,null,!0)}else e();return d};EditorUi.prototype.getHashValueForPages=function(a,b){var c=0,d=new mxGraphModel,e=new mxCodec;null!=b&&(b.byteCount=0,b.attrCount=
-0,b.eltCount=0,b.nodeCount=0);for(var f=0;f<a.length;f++){this.updatePageRoot(a[f]);var k=a[f].node.cloneNode(!1);k.removeAttribute("name");d.root=a[f].root;var m=e.encode(d);this.editor.graph.saveViewState(a[f].viewState,m,!0);m.removeAttribute("pageWidth");m.removeAttribute("pageHeight");k.appendChild(m);null!=b&&(b.eltCount+=k.getElementsByTagName("*").length,b.nodeCount+=k.getElementsByTagName("mxCell").length);c=(c<<5)-c+this.hashValue(k,function(a,c,b,d){return!d||"mxGeometry"!=a.nodeName&&
-"mxPoint"!=a.nodeName||"x"!=c&&"y"!=c&&"width"!=c&&"height"!=c?d&&"mxCell"==a.nodeName&&"previous"==c?null:b:Math.round(b)},b)<<0}return c};EditorUi.prototype.hashValue=function(a,b,d){var c=0;if(null!=a&&"object"===typeof a&&"number"===typeof a.nodeType&&"string"===typeof a.nodeName&&"function"===typeof a.getAttribute){null!=a.nodeName&&(c^=this.hashValue(a.nodeName,b,d));if(null!=a.attributes){null!=d&&(d.attrCount+=a.attributes.length);for(var e=0;e<a.attributes.length;e++){var f=a.attributes[e].name,
-g=null!=b?b(a,f,a.attributes[e].value,!0):a.attributes[e].value;null!=g&&(c^=this.hashValue(f,b,d)+this.hashValue(g,b,d))}}if(null!=a.childNodes)for(e=0;e<a.childNodes.length;e++)c=(c<<5)-c+this.hashValue(a.childNodes[e],b,d)<<0}else if(null!=a&&"function"!==typeof a){a=String(a);b=0;null!=d&&(d.byteCount+=a.length);for(e=0;e<a.length;e++)b=(b<<5)-b+a.charCodeAt(e)<<0;c^=b}return c};EditorUi.prototype.descriptorChanged=function(){};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=
-function(a,b,d,f,k,q,m){};EditorUi.prototype.isScratchpadEnabled=function(){return isLocalStorage||mxClient.IS_CHROMEAPP};EditorUi.prototype.toggleScratchpad=function(){this.isScratchpadEnabled()&&(null==this.scratchpad?StorageFile.getFileContent(this,".scratchpad",mxUtils.bind(this,function(a){null==a&&(a=this.emptyLibraryXml);this.loadLibrary(new StorageLibrary(this,a,".scratchpad"))})):this.closeLibrary(this.scratchpad))};EditorUi.prototype.createLibraryDataFromImages=function(a){var c=mxUtils.createXmlDocument(),
-b=c.createElement("mxlibrary");mxUtils.setTextContent(b,JSON.stringify(a));c.appendChild(b);return mxUtils.getXml(c)};EditorUi.prototype.closeLibrary=function(a){null!=a&&(this.removeLibrarySidebar(a.getHash()),a.constructor!=LocalLibrary&&mxSettings.removeCustomLibrary(a.getHash()),".scratchpad"==a.title&&(this.scratchpad=null))};EditorUi.prototype.removeLibrarySidebar=function(a){var c=this.sidebar.palettes[a];if(null!=c){for(var b=0;b<c.length;b++)c[b].parentNode.removeChild(c[b]);delete this.sidebar.palettes[a]}};
-EditorUi.prototype.repositionLibrary=function(a){var c=this.sidebar.container;if(null==a){var b=this.sidebar.palettes["L.scratchpad"];null==b&&(b=this.sidebar.palettes.search);null!=b&&(a=b[b.length-1].nextSibling)}a=null!=a?a:c.firstChild.nextSibling.nextSibling;var b=c.lastChild,d=b.previousSibling;c.insertBefore(b,a);c.insertBefore(d,b)};EditorUi.prototype.loadLibrary=function(a,b){var c=mxUtils.parseXml(a.getData());if("mxlibrary"==c.documentElement.nodeName){var d=JSON.parse(mxUtils.getTextContent(c.documentElement));
-this.libraryLoaded(a,d,c.documentElement.getAttribute("title"),b)}else throw{message:mxResources.get("notALibraryFile")};};EditorUi.prototype.getLibraryStorageHint=function(a){return""};EditorUi.prototype.libraryLoaded=function(a,b,d,f){if(null!=this.sidebar){a.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(a.getHash());".scratchpad"==a.title&&(this.scratchpad=a);var c=this.sidebar.palettes[a.getHash()],c=null!=c?c[c.length-1].nextSibling:null;this.removeLibrarySidebar(a.getHash());var e=
-null,g=mxUtils.bind(this,function(c,b){0==c.length&&a.isEditable()?(null==e&&(e=document.createElement("div"),e.className="geDropTarget",mxUtils.write(e,mxResources.get("dragElementsHere"))),b.appendChild(e)):this.addLibraryEntries(c,b)});null!=this.sidebar&&null!=b&&this.sidebar.addEntries(b);d=null!=d&&0<d.length?d:a.getTitle();var k=this.sidebar.addPalette(a.getHash(),d,null!=f?f:!0,mxUtils.bind(this,function(a){g(b,a)}));this.repositionLibrary(c);var n=k.parentNode.previousSibling;f=n.getAttribute("title");
-null!=f&&0<f.length&&".scratchpad"!=a.title&&n.setAttribute("title",this.getLibraryStorageHint(a)+"\n"+f);var m=document.createElement("div");m.style.position="absolute";m.style.right="0px";m.style.top="0px";m.style.padding="8px";m.style.backgroundColor="inherit";n.style.position="relative";var p=document.createElement("img");p.setAttribute("src",Dialog.prototype.closeImage);p.setAttribute("title",mxResources.get("close"));p.setAttribute("valign","absmiddle");p.setAttribute("border","0");p.style.cursor=
-"pointer";p.style.margin="0 3px";var z=null;if(".scratchpad"!=a.title||this.closableScratchpad)m.appendChild(p),mxEvent.addListener(p,"click",mxUtils.bind(this,function(c){if(!mxEvent.isConsumed(c)){var b=mxUtils.bind(this,function(){this.closeLibrary(a)});null!=z?this.confirm(mxResources.get("allChangesLost"),null,b,mxResources.get("cancel"),mxResources.get("discardChanges")):b();mxEvent.consume(c)}}));if(a.isEditable()){var E=this.editor.graph,H=null,K=mxUtils.bind(this,function(c){this.showLibraryDialog(a.getTitle(),
-k,b,a,a.getMode());mxEvent.consume(c)}),F=mxUtils.bind(this,function(c){a.setModified(!0);a.isAutosave()?(null!=H&&null!=H.parentNode&&H.parentNode.removeChild(H),H=p.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",m.insertBefore(H,m.firstChild),n.style.paddingRight=18*m.childNodes.length+"px",this.saveLibrary(a.getTitle(),b,a,a.getMode(),!0,!0,function(){null!=H&&null!=
-H.parentNode&&(H.parentNode.removeChild(H),n.style.paddingRight=18*m.childNodes.length+"px")})):null==z&&(z=p.cloneNode(!1),z.setAttribute("src",IMAGE_PATH+"/download.png"),z.setAttribute("title",mxResources.get("save")),m.insertBefore(z,m.firstChild),mxEvent.addListener(z,"click",mxUtils.bind(this,function(c){this.saveLibrary(a.getTitle(),b,a,a.getMode(),a.constructor==LocalLibrary,!0,function(){null==z||a.isModified()||(n.style.paddingRight=18*m.childNodes.length+"px",z.parentNode.removeChild(z),
-z=null)});mxEvent.consume(c)})),n.style.paddingRight=18*m.childNodes.length+"px")}),I=mxUtils.bind(this,function(a,c,d,f){a=E.cloneCells(mxUtils.sortCells(E.model.getTopmostCells(a)));for(var g=0;g<a.length;g++){var l=E.getCellGeometry(a[g]);null!=l&&l.translate(-c.x,-c.y)}k.appendChild(this.sidebar.createVertexTemplateFromCells(a,c.width,c.height,f||"",!0,!1,!1));a={xml:Graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(a))),w:c.width,h:c.height};null!=f&&(a.title=f);b.push(a);F(d);null!=
-e&&null!=e.parentNode&&0<b.length&&(e.parentNode.removeChild(e),e=null)}),C=mxUtils.bind(this,function(a){if(E.isSelectionEmpty())E.getRubberband().isActive()?(E.getRubberband().execute(a),E.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var c=E.getSelectionCells(),b=E.view.getBounds(c),d=E.view.scale;b.x/=d;b.y/=d;b.width/=d;b.height/=d;b.x-=E.view.translate.x;b.y-=E.view.translate.y;I(c,b)}mxEvent.consume(a)});mxEvent.addGestureListeners(k,
-function(){},mxUtils.bind(this,function(a){E.isMouseDown&&null!=E.panningManager&&null!=E.graphHandler.first&&(E.graphHandler.suspend(),null!=E.graphHandler.hint&&(E.graphHandler.hint.style.visibility="hidden"),k.style.backgroundColor="#f1f3f4",k.style.cursor="copy",E.panningManager.stop(),E.autoScroll=!1,mxEvent.consume(a))}),mxUtils.bind(this,function(a){E.isMouseDown&&null!=E.panningManager&&null!=E.graphHandler&&(k.style.backgroundColor="",k.style.cursor="default",this.sidebar.showTooltips=!0,
-E.panningManager.stop(),E.graphHandler.reset(),E.isMouseDown=!1,E.autoScroll=!0,C(a),mxEvent.consume(a))}));mxEvent.addListener(k,"mouseleave",mxUtils.bind(this,function(a){E.isMouseDown&&null!=E.graphHandler.first&&(E.graphHandler.resume(),null!=E.graphHandler.hint&&(E.graphHandler.hint.style.visibility="visible"),k.style.backgroundColor="",k.style.cursor="",E.autoScroll=!0)}));Graph.fileSupport&&(mxEvent.addListener(k,"dragover",mxUtils.bind(this,function(a){k.style.backgroundColor="#f1f3f4";a.dataTransfer.dropEffect=
-"copy";k.style.cursor="copy";this.sidebar.hideTooltip();a.stopPropagation();a.preventDefault()})),mxEvent.addListener(k,"drop",mxUtils.bind(this,function(a){k.style.cursor="";k.style.backgroundColor="";0<a.dataTransfer.files.length&&this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(c,d,f,l,n,m,q,u,t){if(null!=c&&"image/"==d.substring(0,6))c="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image="+this.convertDataUri(c),c=[new mxCell("",
-new mxGeometry(0,0,n,m),c)],c[0].vertex=!0,I(c,new mxRectangle(0,0,n,m),a,mxEvent.isAltDown(a)?null:q.substring(0,q.lastIndexOf(".")).replace(/_/g," ")),null!=e&&null!=e.parentNode&&0<b.length&&(e.parentNode.removeChild(e),e=null);else{var p=!1,x=mxUtils.bind(this,function(c,d){if(null!=c&&"application/pdf"==d){var f=Editor.extractGraphModelFromPdf(c);null!=f&&0<f.length&&(c=f)}if(null!=c)if(f=mxUtils.parseXml(c),"mxlibrary"==f.documentElement.nodeName)try{var l=JSON.parse(mxUtils.getTextContent(f.documentElement));
-g(l,k);b=b.concat(l);F(a);this.spinner.stop();p=!0}catch(T){}else if("mxfile"==f.documentElement.nodeName)try{for(var n=f.documentElement.getElementsByTagName("diagram"),l=0;l<n.length;l++){var q=this.stringToCells(Editor.getDiagramNodeXml(n[l])),m=this.editor.graph.getBoundingBoxFromGeometry(q);I(q,new mxRectangle(0,0,m.width,m.height),a)}p=!0}catch(T){null!=window.console&&console.log("error in drop handler:",T)}p||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));
-null!=e&&null!=e.parentNode&&0<b.length&&(e.parentNode.removeChild(e),e=null)});null!=t&&null!=q&&(/(\.v(dx|sdx?))($|\?)/i.test(q)||/(\.vs(x|sx?))($|\?)/i.test(q))?this.importVisio(t,function(a){x(a,"text/xml")},null,q):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,q)&&null!=t?this.parseFile(t,mxUtils.bind(this,function(a){4==a.readyState&&(this.spinner.stop(),200<=a.status&&299>=a.status?x(a.responseText,"text/xml"):this.handleError({message:mxResources.get(413==a.status?
-"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):x(c,d)}}));a.stopPropagation();a.preventDefault()})),mxEvent.addListener(k,"dragleave",function(a){k.style.cursor="";k.style.backgroundColor="";a.stopPropagation();a.preventDefault()}));p=p.cloneNode(!1);p.setAttribute("src",Editor.editImage);p.setAttribute("title",mxResources.get("edit"));m.insertBefore(p,m.firstChild);mxEvent.addListener(p,"click",K);mxEvent.addListener(k,"dblclick",function(a){mxEvent.getSource(a)==
-k&&K(a)});f=p.cloneNode(!1);f.setAttribute("src",Editor.plusImage);f.setAttribute("title",mxResources.get("add"));m.insertBefore(f,m.firstChild);mxEvent.addListener(f,"click",C);this.isOffline()||".scratchpad"!=a.title||null==EditorUi.scratchpadHelpLink||(f=document.createElement("span"),f.setAttribute("title",mxResources.get("help")),f.style.cssText="color:#a3a3a3;text-decoration:none;margin-right:2px;",mxUtils.write(f,"?"),mxEvent.addGestureListeners(f,mxUtils.bind(this,function(a){this.openLink(EditorUi.scratchpadHelpLink);
-mxEvent.consume(a)})),m.insertBefore(f,m.firstChild))}n.appendChild(m);n.style.paddingRight=18*m.childNodes.length+"px"}};EditorUi.prototype.addLibraryEntries=function(a,b){for(var c=0;c<a.length;c++){var d=a[c],e=d.data;if(null!=e){var e=this.convertDataUri(e),f="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==d.aspect&&(f+="aspect=fixed;");b.appendChild(this.sidebar.createVertexTemplate(f+"image="+e,d.w,d.h,"",d.title||"",!1,!1,!0))}else null!=d.xml&&(e=this.stringToCells(Graph.decompress(d.xml)),
-0<e.length&&b.appendChild(this.sidebar.createVertexTemplateFromCells(e,d.w,d.h,d.title||"",!0,!1,!0)))}};EditorUi.prototype.getResource=function(a){return null!=a?a[mxLanguage]||a.main:null};EditorUi.prototype.footerHeight=0;"1"==urlParams.savesidebar&&(Sidebar.prototype.thumbWidth=64,Sidebar.prototype.thumbHeight=64);EditorUi.initTheme=function(){"atlas"==uiTheme?(mxClient.link("stylesheet",STYLE_PATH+"/atlas.css"),"undefined"!==typeof Toolbar&&(Toolbar.prototype.unselectedBackground="linear-gradient(rgb(255, 255, 255) 0px, rgb(242, 242, 242) 100%)",
-Toolbar.prototype.selectedBackground="rgb(242, 242, 242)"),Editor.prototype.initialTopSpacing=3,EditorUi.prototype.menubarHeight=41,EditorUi.prototype.toolbarHeight=38):Editor.isDarkMode()&&(mxClient.link("stylesheet",STYLE_PATH+"/dark.css"),Dialog.backdropColor="#2a2a2a",Format.inactiveTabBackgroundColor="black",Graph.prototype.defaultThemeName="darkTheme",Graph.prototype.defaultPageBackgroundColor="#2a2a2a",Graph.prototype.defaultPageBorderColor="#505759",BaseFormatPanel.prototype.buttonBackgroundColor=
-"#2a2a2a",mxGraphHandler.prototype.previewColor="#cccccc",StyleFormatPanel.prototype.defaultStrokeColor="#cccccc",mxConstants.DROP_TARGET_COLOR="#00ff00");Editor.sketchFontFamily="Architects Daughter";Editor.sketchFontSource="https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter";"1"==urlParams.sketch&&(Graph.prototype.defaultVertexStyle={pointerEvents:"0",hachureGap:"4"},Graph.prototype.defaultEdgeStyle={edgeStyle:"none",rounded:"0",curved:"1",jettySize:"auto",orthogonalLoop:"1",
-endArrow:"open",startSize:"14",endSize:"14",sourcePerimeterSpacing:"8",targetPerimeterSpacing:"8"},"0"!=urlParams.rough&&(Graph.prototype.defaultVertexStyle.fontFamily=Editor.sketchFontFamily,Graph.prototype.defaultVertexStyle.fontSource=Editor.sketchFontSource,Graph.prototype.defaultVertexStyle.fontSize="20",Graph.prototype.defaultVertexStyle.sketch="1",Graph.prototype.defaultEdgeStyle.fontFamily=Editor.sketchFontFamily,Graph.prototype.defaultEdgeStyle.fontSource=Editor.sketchFontSource,Graph.prototype.defaultEdgeStyle.fontSize=
-"20",Graph.prototype.defaultEdgeStyle.sketch="1",Menus.prototype.defaultFonts=[{fontFamily:Editor.sketchFontFamily,fontUrl:decodeURIComponent(Editor.sketchFontSource)},{fontFamily:"Rock Salt",fontUrl:"https://fonts.googleapis.com/css?family=Rock+Salt"},{fontFamily:"Permanent Marker",fontUrl:"https://fonts.googleapis.com/css?family=Permanent+Marker"}].concat(Menus.prototype.defaultFonts)),Editor.configurationKey=".sketch-configuration",Editor.settingsKey=".sketch-config",Graph.prototype.defaultGridEnabled=
-!1,Graph.prototype.defaultPageVisible=!1,Graph.prototype.defaultEdgeLength=120,Editor.fitWindowBorders=new mxRectangle(60,30,30,30))};EditorUi.initTheme();EditorUi.prototype.showImageDialog=function(a,b,d,f,k){a=new ImageDialog(this,a,b,d,f,k);this.showDialog(a.container,Graph.fileSupport?480:360,Graph.fileSupport?200:90,!0,!0);a.init()};EditorUi.prototype.showBackgroundImageDialog=function(a,b){a=null!=a?a:mxUtils.bind(this,function(a,c){if(!c){var b=new ChangePageSetup(this,null,a);b.ignoreColor=
-!0;this.editor.graph.model.execute(b)}});var c=new BackgroundImageDialog(this,a,b);this.showDialog(c.container,360,200,!0,!0);c.init()};EditorUi.prototype.showLibraryDialog=function(a,b,d,f,k){a=new LibraryDialog(this,a,b,d,f,k);this.showDialog(a.container,640,440,!0,!1,mxUtils.bind(this,function(a){a&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()}));a.init()};var d=EditorUi.prototype.createFormat;EditorUi.prototype.createFormat=function(a){var c=d.apply(this,arguments);this.editor.graph.addListener("viewStateChanged",
-mxUtils.bind(this,function(a){this.editor.graph.isSelectionEmpty()&&c.refresh()}));return c};EditorUi.prototype.createSidebarFooterContainer=function(){var a=this.createDiv("geSidebarContainer geSidebarFooter");a.style.position="absolute";a.style.overflow="hidden";var b=document.createElement("a");b.className="geTitle";b.style.color="#DF6C0C";b.style.fontWeight="bold";b.style.height="100%";b.style.paddingTop="9px";b.innerHTML='<span style="font-size:18px;margin-right:5px;">+</span>';mxUtils.write(b,
-mxResources.get("moreShapes")+"...");mxEvent.addListener(b,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(a){a.preventDefault()}));mxEvent.addListener(b,"click",mxUtils.bind(this,function(a){this.actions.get("shapes").funct();mxEvent.consume(a)}));a.appendChild(b);return a};EditorUi.prototype.handleError=function(a,b,d,f,k,m,u){var c=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},e=null!=a&&null!=a.error?a.error:a;if(null!=a&&null!=a.stack&&
-null!=a.message)try{u?null!=window.console&&console.error("EditorUi.handleError:",a):EditorUi.logError("Caught: "+(""==a.message&&null!=a.name)?a.name:a.message,a.filename,a.lineNumber,a.columnNumber,a,"INFO")}catch(H){}if(null!=e||null!=b){u=mxUtils.htmlEntities(mxResources.get("unknownError"));var g=mxResources.get("ok"),l=null;b=null!=b?b:mxResources.get("error");if(null!=e){null!=e.retry&&(g=mxResources.get("cancel"),l=function(){c();e.retry()});if(404==e.code||404==e.status||403==e.code){u=403==
-e.code?null!=e.message?mxUtils.htmlEntities(e.message):mxUtils.htmlEntities(mxResources.get("accessDenied")):null!=k?k:mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied")+(null!=this.drive&&null!=this.drive.user?" ("+this.drive.user.displayName+", "+this.drive.user.email+")":""));var n=null!=k?null:null!=m?m:window.location.hash;if(null!=n&&("#G"==n.substring(0,2)||"#Uhttps%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D"==n.substring(0,45))&&(null!=a&&null!=a.error&&(null!=a.error.errors&&0<a.error.errors.length&&
-"fileAccess"==a.error.errors[0].reason||null!=a.error.data&&0<a.error.data.length&&"fileAccess"==a.error.data[0].reason)||404==e.code||404==e.status)){n="#U"==n.substring(0,2)?n.substring(45,n.lastIndexOf("%26ex")):n.substring(2);this.showError(b,u,mxResources.get("openInNewWindow"),mxUtils.bind(this,function(){this.editor.graph.openLink("https://drive.google.com/open?id="+n);this.handleError(a,b,d,f,k)}),l,mxResources.get("changeUser"),mxUtils.bind(this,function(){function a(){e.innerHTML="";for(var a=
-0;a<c.length;a++){var b=document.createElement("option");mxUtils.write(b,c[a].displayName);b.value=a;e.appendChild(b);b=document.createElement("option");b.innerHTML="&nbsp;&nbsp;&nbsp;";mxUtils.write(b,"<"+c[a].email+">");b.setAttribute("disabled","disabled");e.appendChild(b)}b=document.createElement("option");mxUtils.write(b,mxResources.get("addAccount"));b.value=c.length;e.appendChild(b)}var c=this.drive.getUsersList(),b=document.createElement("div"),d=document.createElement("span");d.style.marginTop=
-"6px";mxUtils.write(d,mxResources.get("changeUser")+": ");b.appendChild(d);var e=document.createElement("select");e.style.width="200px";a();mxEvent.addListener(e,"change",mxUtils.bind(this,function(){var b=e.value,d=c.length!=b;d&&this.drive.setUser(c[b]);this.drive.authorize(d,mxUtils.bind(this,function(){d||(c=this.drive.getUsersList(),a())}),mxUtils.bind(this,function(a){this.handleError(a)}),!0)}));b.appendChild(e);b=new CustomDialog(this,b,mxUtils.bind(this,function(){this.loadFile(window.location.hash.substr(1),
-!0)}));this.showDialog(b.container,300,75,!0,!0)}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.hideDialog();null!=d&&d()}),480,150);return}}null!=e.message?u=""==e.message&&null!=e.name?mxUtils.htmlEntities(e.name):mxUtils.htmlEntities(e.message):null!=e.response&&null!=e.response.error?u=mxUtils.htmlEntities(e.response.error):"undefined"!==typeof window.App&&(e.code==App.ERROR_TIMEOUT?u=mxUtils.htmlEntities(mxResources.get("timeout")):e.code==App.ERROR_BUSY?u=mxUtils.htmlEntities(mxResources.get("busy")):
-"string"===typeof e&&0<e.length&&(u=mxUtils.htmlEntities(e)))}var q=m=null;null!=e&&null!=e.helpLink&&(m=mxResources.get("help"),q=mxUtils.bind(this,function(){return this.editor.graph.openLink(e.helpLink)}));this.showError(b,u,g,d,l,null,null,m,q,null,null,null,f?d:null)}else null!=d&&d()};EditorUi.prototype.alert=function(a,b,d){a=new ErrorDialog(this,null,a,mxResources.get("ok"),b);this.showDialog(a.container,d||340,100,!0,!1);a.init()};EditorUi.prototype.confirm=function(a,b,d,f,k,m){var c=null!=
-this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},e=Math.min(200,28*Math.ceil(a.length/50));a=new ConfirmDialog(this,a,function(){c();null!=b&&b()},function(){c();null!=d&&d()},f,k,null,null,null,null,e);this.showDialog(a.container,340,46+e,!0,m);a.init()};EditorUi.prototype.showBanner=function(a,b,d,f){var c=!1;if(!(this.bannerShowing||this["hideBanner"+a]||isLocalStorage&&null!=mxSettings.settings&&null!=mxSettings.settings["close"+a])){var e=document.createElement("div");
-e.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(e.style,"box-shadow","1px 1px 2px 0px #ddd");mxUtils.setPrefixedStyle(e.style,"transform","translate(-50%,120%)");mxUtils.setPrefixedStyle(e.style,"transition","all 1s ease");e.className="geBtn gePrimaryBtn";c=document.createElement("img");c.setAttribute("src",IMAGE_PATH+
-"/logo.png");c.setAttribute("border","0");c.setAttribute("align","absmiddle");c.style.cssText="margin-top:-4px;margin-left:8px;margin-right:12px;width:26px;height:26px;";e.appendChild(c);c=document.createElement("img");c.setAttribute("src",Dialog.prototype.closeImage);c.setAttribute("title",mxResources.get(f?"doNotShowAgain":"close"));c.setAttribute("border","0");c.style.cssText="position:absolute;right:10px;top:12px;filter:invert(1);padding:6px;margin:-6px;cursor:default;";e.appendChild(c);mxUtils.write(e,
-b);document.body.appendChild(e);this.bannerShowing=!0;b=document.createElement("div");b.style.cssText="font-size:11px;text-align:center;font-weight:normal;";var g=document.createElement("input");g.setAttribute("type","checkbox");g.setAttribute("id","geDoNotShowAgainCheckbox");g.style.marginRight="6px";if(!f){b.appendChild(g);var k=document.createElement("label");k.setAttribute("for","geDoNotShowAgainCheckbox");mxUtils.write(k,mxResources.get("doNotShowAgain"));b.appendChild(k);e.style.paddingBottom=
-"30px";e.appendChild(b)}var n=mxUtils.bind(this,function(){null!=e.parentNode&&(e.parentNode.removeChild(e),this.bannerShowing=!1,g.checked||f)&&(this["hideBanner"+a]=!0,isLocalStorage&&null!=mxSettings.settings&&(mxSettings.settings["close"+a]=Date.now(),mxSettings.save()))});mxEvent.addListener(c,"click",mxUtils.bind(this,function(a){mxEvent.consume(a);n()}));var m=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(e.style,"transform","translate(-50%,120%)");window.setTimeout(mxUtils.bind(this,
-function(){n()}),1E3)});mxEvent.addListener(e,"click",mxUtils.bind(this,function(a){var c=mxEvent.getSource(a);c!=g&&c!=k?(null!=d&&d(),n(),mxEvent.consume(a)):m()}));window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(e.style,"transform","translate(-50%,0%)")}),500);window.setTimeout(m,3E4);c=!0}return c};EditorUi.prototype.setCurrentFile=function(a){null!=a&&(a.opened=new Date);this.currentFile=a};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};EditorUi.prototype.isExportToCanvas=
-function(){return this.editor.isExportToCanvas()};EditorUi.prototype.createImageDataUri=function(a,b,d,f){a=a.toDataURL("image/"+d);if(null!=a&&6<a.length)null!=b&&(a=Editor.writeGraphModelToPng(a,"tEXt","mxfile",encodeURIComponent(b))),0<f&&(a=Editor.writeGraphModelToPng(a,"pHYs","dpi",f));else throw{message:mxResources.get("unknownError")};return a};EditorUi.prototype.saveCanvas=function(a,b,d,f,k){var c="jpeg"==d?"jpg":d;f=this.getBaseFilename(f)+"."+c;a=this.createImageDataUri(a,b,d,k);this.saveData(f,
-c,a.substring(a.lastIndexOf(",")+1),"image/"+d,!0)};EditorUi.prototype.isLocalFileSave=function(){return"remote"!=urlParams.save&&(mxClient.IS_IE||"undefined"!==typeof window.Blob&&"undefined"!==typeof window.URL)&&9!=document.documentMode&&8!=document.documentMode&&7!=document.documentMode||this.isOfflineApp()||mxClient.IS_IOS};EditorUi.prototype.showTextDialog=function(a,b){var c=new TextareaDialog(this,a,b,null,null,mxResources.get("close"));c.textarea.style.width="600px";c.textarea.style.height=
-"380px";this.showDialog(c.container,620,460,!0,!0,null,null,null,null,!0);c.init();document.execCommand("selectall",!1,null)};EditorUi.prototype.doSaveLocalFile=function(a,b,d,f,k,m){"text/xml"!=d||/(\.drawio)$/i.test(b)||/(\.xml)$/i.test(b)||/(\.svg)$/i.test(b)||/(\.html)$/i.test(b)||(b=b+"."+(null!=m?m:"drawio"));if(window.Blob&&navigator.msSaveOrOpenBlob)a=f?this.base64ToBlob(a,d):new Blob([a],{type:d}),navigator.msSaveOrOpenBlob(a,b);else if(mxClient.IS_IE)d=window.open("about:blank","_blank"),
-null==d?mxUtils.popup(a,!0):(d.document.write(a),d.document.close(),d.document.execCommand("SaveAs",!0,b),d.close());else if(mxClient.IS_IOS&&this.isOffline())navigator.standalone||null==d||"image/"!=d.substring(0,6)?this.showTextDialog(b+":",a):this.openInNewWindow(a,d,f);else{var c=document.createElement("a");m=(null==navigator.userAgent||0>navigator.userAgent.indexOf("PaleMoon/"))&&"undefined"!==typeof c.download;if(mxClient.IS_GC&&null!=navigator.userAgent){var e=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);
-m=65==(e?parseInt(e[2],10):!1)?!1:m}if(m||this.isOffline()){c.href=URL.createObjectURL(f?this.base64ToBlob(a,d):new Blob([a],{type:d}));m?c.download=b:c.setAttribute("target","_blank");document.body.appendChild(c);try{window.setTimeout(function(){URL.revokeObjectURL(c.href)},2E4),c.click(),c.parentNode.removeChild(c)}catch(A){}}else this.createEchoRequest(a,b,d,f,k).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(a,b,d,f,k,m){a="xml="+encodeURIComponent(a);return new mxXmlRequest(SAVE_URL,
-a+(null!=d?"&mime="+d:"")+(null!=k?"&format="+k:"")+(null!=m?"&base64="+m:"")+(null!=b?"&filename="+encodeURIComponent(b):"")+(f?"&binary=1":""))};EditorUi.prototype.base64ToBlob=function(a,b){b=b||"";for(var c=atob(a),d=c.length,e=Math.ceil(d/1024),f=Array(e),k=0;k<e;++k){for(var m=1024*k,p=Math.min(m+1024,d),x=Array(p-m),G=0;m<p;++G,++m)x[G]=c[m].charCodeAt(0);f[k]=new Uint8Array(x)}return new Blob(f,{type:b})};EditorUi.prototype.saveLocalFile=function(a,b,d,f,k,m,u,p){m=null!=m?m:!1;u=null!=u?
-u:"vsdx"!=k&&(!mxClient.IS_IOS||!navigator.standalone);k=this.getServiceCount(m);isLocalStorage&&k++;var c=4>=k?2:6<k?4:3;b=new CreateDialog(this,b,mxUtils.bind(this,function(c,b){try{if("_blank"==b)if(null!=d&&"image/"==d.substring(0,6))this.openInNewWindow(a,d,f);else if(null!=d&&"text/html"==d.substring(0,9)){var e=new EmbedDialog(this,a);this.showDialog(e.container,440,240,!0,!0);e.init()}else{var g=window.open("about:blank");null==g?mxUtils.popup(a,!0):(g.document.write("<pre>"+mxUtils.htmlEntities(a,
-!1)+"</pre>"),g.document.close())}else b==App.MODE_DEVICE||"download"==b?this.doSaveLocalFile(a,c,d,f,null,p):null!=c&&0<c.length&&this.pickFolder(b,mxUtils.bind(this,function(e){try{this.exportFile(a,c,d,f,b,e)}catch(K){this.handleError(K)}}))}catch(H){this.handleError(H)}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,m,u,null,1<k,c,a,d,f);m=this.isServices(k)?k>c?390:270:160;this.showDialog(b.container,400,m,!0,!0);b.init()};EditorUi.prototype.openInNewWindow=
-function(a,b,d){var c=window.open("about:blank");null==c||null==c.document?mxUtils.popup(a,!0):("image/svg+xml"!=b||mxClient.IS_SVG?"image/svg+xml"==b?c.document.write("<html>"+a+"</html>"):(a=d?a:btoa(unescape(encodeURIComponent(a))),c.document.write('<html><img style="max-width:100%;" src="data:'+b+";base64,"+a+'"/></html>')):c.document.write("<html><pre>"+mxUtils.htmlEntities(a,!1)+"</pre></html>"),c.document.close())};var k=EditorUi.prototype.addChromelessToolbarItems;EditorUi.prototype.isChromelessImageExportEnabled=
-function(){return"draw.io"!=this.getServiceName()||/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname)};EditorUi.prototype.addChromelessToolbarItems=function(a){if(this.isExportToCanvas()&&this.isChromelessImageExportEnabled()){this.exportDialog=null;var c=a(mxUtils.bind(this,function(a){var b=mxUtils.bind(this,function(){mxEvent.removeListener(this.editor.graph.container,"click",b);null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),
-this.exportDialog=null)});if(null!=this.exportDialog)b.apply(this);else{this.exportDialog=document.createElement("div");var d=c.getBoundingClientRect();mxUtils.setPrefixedStyle(this.exportDialog.style,"borderRadius","5px");this.exportDialog.style.position="fixed";this.exportDialog.style.textAlign="center";this.exportDialog.style.fontFamily="Helvetica,Arial";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=d.left+"px";this.exportDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";d=mxUtils.getCurrentStyle(this.editor.graph.container);this.exportDialog.style.zIndex=d.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(a){e.stop();this.exportDialog.style.width="auto";this.exportDialog.style.height="auto";this.exportDialog.style.padding="10px";var c=this.createImageDataUri(a,null,"png");a=document.createElement("img");a.style.maxWidth="140px";a.style.maxHeight="140px";a.style.cursor="pointer";a.style.backgroundColor="white";a.setAttribute("title",mxResources.get("openInNewWindow"));a.setAttribute("border","0");a.setAttribute("src",c);this.exportDialog.appendChild(a);
-mxEvent.addListener(a,"click",mxUtils.bind(this,function(){this.openInNewWindow(c.substring(c.indexOf(",")+1),"image/png",!0);b.apply(this,arguments)}))}),null,this.thumbImageCache,null,mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),null,null,null,null,null,null,null,Editor.defaultBorder);mxEvent.addListener(this.editor.graph.container,"click",b);document.body.appendChild(this.exportDialog)}mxEvent.consume(a)}),Editor.cameraLargeImage,mxResources.get("export"))}k.apply(this,
-arguments)};EditorUi.prototype.saveData=function(a,b,d,f,k){this.isLocalFileSave()?this.saveLocalFile(d,a,f,k,b):this.saveRequest(a,b,mxUtils.bind(this,function(a,c){return this.createEchoRequest(d,a,f,k,b,c)}),d,k,f)};EditorUi.prototype.saveRequest=function(a,b,d,f,k,m,u){u=null!=u?u:!mxClient.IS_IOS||!navigator.standalone;var c=this.getServiceCount(!1);isLocalStorage&&c++;var e=4>=c?2:6<c?4:3;a=new CreateDialog(this,a,mxUtils.bind(this,function(a,c){if("_blank"==c||null!=a&&0<a.length){var e=d("_blank"==
-c?null:a,c==App.MODE_DEVICE||"download"==c||null==c||"_blank"==c?"0":"1");null!=e&&(c==App.MODE_DEVICE||"download"==c||"_blank"==c?e.simulate(document,"_blank"):this.pickFolder(c,mxUtils.bind(this,function(d){m=null!=m?m:"pdf"==b?"application/pdf":"image/"+b;if(null!=f)try{this.exportFile(f,a,m,!0,c,d)}catch(H){this.handleError(H)}else this.spinner.spin(document.body,mxResources.get("saving"))&&e.send(mxUtils.bind(this,function(){this.spinner.stop();if(200<=e.getStatus()&&299>=e.getStatus())try{this.exportFile(e.getText(),
-a,m,!0,c,d)}catch(H){this.handleError(H)}else this.handleError({message:mxResources.get("errorSavingFile")})}),function(a){this.spinner.stop();this.handleError(a)})})))}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,!1,u,null,1<c,e,f,m,k);c=this.isServices(c)?4<c?390:270:160;this.showDialog(a.container,380,c,!0,!0);a.init()};EditorUi.prototype.isServices=function(a){return 1!=a};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};
-EditorUi.prototype.exportFile=function(a,b,d,f,k,m){};EditorUi.prototype.pickFolder=function(a,b,d){b(null)};EditorUi.prototype.exportSvg=function(a,b,d,f,k,m,u,p,A,x,G,z){if(this.spinner.spin(document.body,mxResources.get("export")))try{var c=this.editor.graph.isSelectionEmpty();d=null!=d?d:c;var e=b?null:this.editor.graph.background;e==mxConstants.NONE&&(e=null);null==e&&0==b&&(e=G?this.editor.graph.defaultPageBackgroundColor:"#ffffff");var g=this.editor.graph.getSvg(e,a,u,p,null,d,null,null,"blank"==
-x?"_blank":"self"==x?"_top":null,null,!0,G,z);f&&this.editor.graph.addSvgShadow(g);var l=this.getBaseFilename()+".svg",n=mxUtils.bind(this,function(a){this.spinner.stop();k&&a.setAttribute("content",this.getFileData(!0,null,null,null,d,A,null,null,null,!1));var c='<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n'+mxUtils.getXml(a);this.isLocalFileSave()||c.length<=MAX_REQUEST_SIZE?this.saveData(l,"svg",c,"image/svg+xml"):
-this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(c)}))});this.editor.addFontCss(g);this.editor.graph.mathEnabled&&this.editor.addMathCss(g);m?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.editor.convertImages(g,n,this.thumbImageCache)):n(g)}catch(C){this.handleError(C)}};EditorUi.prototype.addRadiobox=function(a,b,d,f,k,m,u){return this.addCheckbox(a,d,f,k,m,u,!0,b)};EditorUi.prototype.addCheckbox=function(a,
-b,d,f,k,m,u,p){m=null!=m?m:!0;var c=document.createElement("input");c.style.marginRight="8px";c.style.marginTop="16px";c.setAttribute("type",u?"radio":"checkbox");u="geCheckbox-"+Editor.guid();c.id=u;null!=p&&c.setAttribute("name",p);d&&(c.setAttribute("checked","checked"),c.defaultChecked=!0);f&&c.setAttribute("disabled","disabled");m&&(a.appendChild(c),d=document.createElement("label"),mxUtils.write(d,b),d.setAttribute("for",u),a.appendChild(d),k||mxUtils.br(a));return c};EditorUi.prototype.addEditButton=
-function(a,b){var c=this.addCheckbox(a,mxResources.get("edit")+":",!0,null,!0);c.style.marginLeft="24px";var d=this.getCurrentFile(),e="";null!=d&&d.getMode()!=App.MODE_DEVICE&&d.getMode()!=App.MODE_BROWSER&&(e=window.location.href);var f=document.createElement("select");f.style.width="120px";f.style.marginLeft="8px";f.style.marginRight="10px";f.className="geBtn";d=document.createElement("option");d.setAttribute("value","blank");mxUtils.write(d,mxResources.get("makeCopy"));f.appendChild(d);d=document.createElement("option");
-d.setAttribute("value","custom");mxUtils.write(d,mxResources.get("custom")+"...");f.appendChild(d);a.appendChild(f);mxEvent.addListener(f,"change",mxUtils.bind(this,function(){if("custom"==f.value){var a=new FilenameDialog(this,e,mxResources.get("ok"),function(a){null!=a?e=a:f.value="blank"},mxResources.get("url"),null,null,null,null,function(){f.value="blank"});this.showDialog(a.container,300,80,!0,!1);a.init()}}));mxEvent.addListener(c,"change",mxUtils.bind(this,function(){c.checked&&(null==b||
-b.checked)?f.removeAttribute("disabled"):f.setAttribute("disabled","disabled")}));mxUtils.br(a);return{getLink:function(){return c.checked?"blank"===f.value?"_blank":e:null},getEditInput:function(){return c},getEditSelect:function(){return f}}};EditorUi.prototype.addLinkSection=function(a,b){function c(){k.innerHTML='<div style="width:100%;height:100%;box-sizing:border-box;'+(null!=f&&f!=mxConstants.NONE?"border:1px solid black;background-color:"+f:"background-position:center center;background-repeat:no-repeat;background-image:url('"+
-Dialog.prototype.closeImage+"')")+';"></div>'}mxUtils.write(a,mxResources.get("links")+":");var d=document.createElement("select");d.style.width="100px";d.style.marginLeft="8px";d.style.marginRight="10px";d.className="geBtn";var e=document.createElement("option");e.setAttribute("value","auto");mxUtils.write(e,mxResources.get("automatic"));d.appendChild(e);e=document.createElement("option");e.setAttribute("value","blank");mxUtils.write(e,mxResources.get("openInNewWindow"));d.appendChild(e);e=document.createElement("option");
-e.setAttribute("value","self");mxUtils.write(e,mxResources.get("openInThisWindow"));d.appendChild(e);b&&(e=document.createElement("option"),e.setAttribute("value","frame"),mxUtils.write(e,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),d.appendChild(e));a.appendChild(d);mxUtils.write(a,mxResources.get("borderColor")+":");var f="#0000ff",k=null,k=mxUtils.button("",mxUtils.bind(this,function(a){this.pickColor(f||"none",function(a){f=a;c()});mxEvent.consume(a)}));c();k.style.padding=
-mxClient.IS_FF?"4px 2px 4px 2px":"4px";k.style.marginLeft="4px";k.style.height="22px";k.style.width="22px";k.style.position="relative";k.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";k.className="geColorBtn";a.appendChild(k);mxUtils.br(a);return{getColor:function(){return f},getTarget:function(){return d.value},focus:function(){d.focus()}}};EditorUi.prototype.createUrlParameters=function(a,b,d,f,k,m,p){p=null!=p?p:[];f&&("https://viewer.diagrams.net"==EditorUi.lightboxHost&&
-"1"!=urlParams.dev||p.push("lightbox=1"),"auto"!=a&&p.push("target="+a),null!=b&&b!=mxConstants.NONE&&p.push("highlight="+("#"==b.charAt(0)?b.substring(1):b)),null!=k&&0<k.length&&p.push("edit="+encodeURIComponent(k)),m&&p.push("layers=1"),this.editor.graph.foldingEnabled&&p.push("nav=1"));d&&null!=this.currentPage&&null!=this.pages&&this.currentPage!=this.pages[0]&&p.push("page-id="+this.currentPage.getId());return p};EditorUi.prototype.createLink=function(a,b,d,f,k,m,p,t,A,x){A=this.createUrlParameters(a,
-b,d,f,k,m,A);a=this.getCurrentFile();b=!0;null!=p?d="#U"+encodeURIComponent(p):(a=this.getCurrentFile(),t||null==a||a.constructor!=window.DriveFile?d="#R"+encodeURIComponent(d?this.getFileData(!0,null,null,null,null,null,null,!0,null,!1):Graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(d="#"+a.getHash(),b=!1));b&&null!=a&&null!=a.getTitle()&&a.getTitle()!=this.defaultFilename&&A.push("title="+encodeURIComponent(a.getTitle()));x&&1<d.length&&(A.push("open="+d.substring(1)),d="");return(f&&
-"1"!=urlParams.dev?EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?EditorUi.drawHost:"https://"+window.location.host)+"/"+(0<A.length?"?"+A.join("&"):"")+d};EditorUi.prototype.createHtml=function(a,b,d,f,k,m,p,t,A,x,G){this.getBasenames();var c={};""!=k&&k!=mxConstants.NONE&&(c.highlight=k);"auto"!==f&&(c.target=f);A||(c.lightbox=!1);c.nav=this.editor.graph.foldingEnabled;d=parseInt(d);isNaN(d)||100==d||(c.zoom=d/100);d=[];p&&(d.push("pages"),
+1;0<=f;f--){var g=this.updatePageRoot(new DiagramPage(d[f]));null==g.getName()&&g.setName(mxResources.get("pageWithNumber",[f+1]));c.model.execute(new ChangePage(this,g,0==f?g:null,0))}}else"0"!=urlParams.pages&&null==this.fileNode&&(this.fileNode=a.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(a.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),c.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0))),
+this.editor.setGraphXml(a),null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=b)for(f=0;f<b.length;f++)c.model.execute(new ChangePage(this,b[f],null))}finally{c.model.endUpdate()}}};EditorUi.prototype.createFileData=function(a,b,d,f,g,q,m,t,p,x,G){b=null!=b?b:this.editor.graph;g=null!=g?g:!1;p=null!=p?p:!0;var c,e=null;null==d||d.getMode()==App.MODE_DEVICE||d.getMode()==App.MODE_BROWSER?c="_blank":e=c=f;if(null==a)return"";var k=a;if("mxfile"!=k.nodeName.toLowerCase()){if(G){var l=
+a.ownerDocument.createElement("diagram");l.setAttribute("id",Editor.guid());l.appendChild(a)}else{l=Graph.zapGremlins(mxUtils.getXml(a));k=Graph.compress(l);if(Graph.decompress(k)!=l)return l;l=a.ownerDocument.createElement("diagram");l.setAttribute("id",Editor.guid());mxUtils.setTextContent(l,k)}k=a.ownerDocument.createElement("mxfile");k.appendChild(l)}x?(k=k.cloneNode(!0),k.removeAttribute("modified"),k.removeAttribute("host"),k.removeAttribute("agent"),k.removeAttribute("etag"),k.removeAttribute("userAgent"),
+k.removeAttribute("version"),k.removeAttribute("editor"),k.removeAttribute("type")):(k.removeAttribute("userAgent"),k.removeAttribute("version"),k.removeAttribute("editor"),k.removeAttribute("pages"),k.removeAttribute("type"),mxClient.IS_CHROMEAPP?k.setAttribute("host","Chrome"):EditorUi.isElectronApp?k.setAttribute("host","Electron"):k.setAttribute("host",window.location.hostname),k.setAttribute("modified",(new Date).toISOString()),k.setAttribute("agent",navigator.appVersion),k.setAttribute("version",
+EditorUi.VERSION),k.setAttribute("etag",Editor.guid()),a=null!=d?d.getMode():this.mode,null!=a&&k.setAttribute("type",a),1<k.getElementsByTagName("diagram").length&&null!=this.pages&&k.setAttribute("pages",this.pages.length));G=G?mxUtils.getPrettyXml(k):mxUtils.getXml(k);if(!q&&!g&&(m||null!=d&&/(\.html)$/i.test(d.getTitle())))G=this.getHtml2(mxUtils.getXml(k),b,null!=d?d.getTitle():null,c,e);else if(q||!g&&null!=d&&/(\.svg)$/i.test(d.getTitle()))null==d||d.getMode()!=App.MODE_DEVICE&&d.getMode()!=
+App.MODE_BROWSER||(f=null),G=this.getEmbeddedSvg(G,b,f,null,t,p,e);return G};EditorUi.prototype.getXmlFileData=function(a,b,d,f){a=null!=a?a:!0;b=null!=b?b:!1;d=null!=d?d:!Editor.compressXml;var c=this.editor.getGraphXml(a,f);if(a&&null!=this.fileNode&&null!=this.currentPage)if(a=function(a){var b=a.getElementsByTagName("mxGraphModel"),b=0<b.length?b[0]:null;null==b&&d?(b=mxUtils.trim(mxUtils.getTextContent(a)),a=a.cloneNode(!1),0<b.length&&(b=Graph.decompress(b),null!=b&&0<b.length&&a.appendChild(mxUtils.parseXml(b).documentElement))):
+null==b||d?a=a.cloneNode(!0):(a=a.cloneNode(!1),mxUtils.setTextContent(a,Graph.compressNode(b)));c.appendChild(a)},EditorUi.removeChildNodes(this.currentPage.node),mxUtils.setTextContent(this.currentPage.node,Graph.compressNode(c)),c=this.fileNode.cloneNode(!1),b)a(this.currentPage.node);else for(b=0;b<this.pages.length;b++){var e=this.pages[b],k=e.node;if(e!=this.currentPage)if(e.needsUpdate){var g=new mxCodec(mxUtils.createXmlDocument()),g=g.encode(new mxGraphModel(e.root));this.editor.graph.saveViewState(e.viewState,
+g,null,f);EditorUi.removeChildNodes(e.node);mxUtils.setTextContent(e.node,Graph.compressNode(g));delete e.needsUpdate}else f&&(null==e.viewState&&(g=this.editor.extractGraphModel(e.node),e.viewState=this.editor.graph.createViewState(g)),null!=e.viewState.backgroundImage&&Graph.isPageLink(e.viewState.backgroundImage.originalSrc)&&null==e.viewState.backgroundImage.src&&(e.viewState.backgroundImage=this.createImageForPageLink(e.viewState.backgroundImage.originalSrc)),null!=e.viewState.backgroundImage&&
+null!=e.viewState.backgroundImage.originalSrc&&(g=new mxCodec(mxUtils.createXmlDocument()),g=g.encode(new mxGraphModel(e.root)),this.editor.graph.saveViewState(e.viewState,g,null,f),k=k.cloneNode(!1),mxUtils.setTextContent(c,Graph.compressNode(g))));a(k)}return c};EditorUi.prototype.anonymizeString=function(a,b){for(var c=[],e=0;e<a.length;e++){var d=a.charAt(e);0<=EditorUi.ignoredAnonymizedChars.indexOf(d)?c.push(d):isNaN(parseInt(d))?d.toLowerCase()!=d?c.push(String.fromCharCode(65+Math.round(25*
+Math.random()))):d.toUpperCase()!=d?c.push(String.fromCharCode(97+Math.round(25*Math.random()))):/\s/.test(d)?c.push(" "):c.push("?"):c.push(b?"0":Math.round(9*Math.random()))}return c.join("")};EditorUi.prototype.anonymizePatch=function(a){if(null!=a[EditorUi.DIFF_INSERT])for(var c=0;c<a[EditorUi.DIFF_INSERT].length;c++)try{var b=mxUtils.parseXml(a[EditorUi.DIFF_INSERT][c].data).documentElement.cloneNode(!1);null!=b.getAttribute("name")&&b.setAttribute("name",this.anonymizeString(b.getAttribute("name")));
+a[EditorUi.DIFF_INSERT][c].data=mxUtils.getXml(b)}catch(q){a[EditorUi.DIFF_INSERT][c].data=q.message}if(null!=a[EditorUi.DIFF_UPDATE]){for(var d in a[EditorUi.DIFF_UPDATE]){var f=a[EditorUi.DIFF_UPDATE][d];null!=f.name&&(f.name=this.anonymizeString(f.name));null!=f.cells&&(c=mxUtils.bind(this,function(a){var c=f.cells[a];if(null!=c){for(var b in c)null!=c[b].value&&(c[b].value="["+c[b].value.length+"]"),null!=c[b].xmlValue&&(c[b].xmlValue="["+c[b].xmlValue.length+"]"),null!=c[b].style&&(c[b].style=
+"["+c[b].style.length+"]"),0==Object.keys(c[b]).length&&delete c[b];0==Object.keys(c).length&&delete f.cells[a]}}),c(EditorUi.DIFF_INSERT),c(EditorUi.DIFF_UPDATE),0==Object.keys(f.cells).length&&delete f.cells);0==Object.keys(f).length&&delete a[EditorUi.DIFF_UPDATE][d]}0==Object.keys(a[EditorUi.DIFF_UPDATE]).length&&delete a[EditorUi.DIFF_UPDATE]}return a};EditorUi.prototype.anonymizeAttributes=function(a,b){if(null!=a.attributes)for(var c=0;c<a.attributes.length;c++)"as"!=a.attributes[c].name&&
+a.setAttribute(a.attributes[c].name,this.anonymizeString(a.attributes[c].value,b));if(null!=a.childNodes)for(c=0;c<a.childNodes.length;c++)this.anonymizeAttributes(a.childNodes[c],b)};EditorUi.prototype.anonymizeNode=function(a,b){for(var c=a.getElementsByTagName("mxCell"),e=0;e<c.length;e++)null!=c[e].getAttribute("value")&&c[e].setAttribute("value","["+c[e].getAttribute("value").length+"]"),null!=c[e].getAttribute("xmlValue")&&c[e].setAttribute("xmlValue","["+c[e].getAttribute("xmlValue").length+
+"]"),null!=c[e].getAttribute("style")&&c[e].setAttribute("style","["+c[e].getAttribute("style").length+"]"),null!=c[e].parentNode&&"root"!=c[e].parentNode.nodeName&&null!=c[e].parentNode.parentNode&&(c[e].setAttribute("id",c[e].parentNode.getAttribute("id")),c[e].parentNode.parentNode.replaceChild(c[e],c[e].parentNode));return a};EditorUi.prototype.synchronizeCurrentFile=function(a){var c=this.getCurrentFile();null!=c&&(c.savingFile?this.handleError({message:mxResources.get("busy")}):!a&&c.invalidChecksum?
+c.handleFileError(null,!0):this.spinner.spin(document.body,mxResources.get("updatingDocument"))&&(c.clearAutosave(),this.editor.setStatus(""),a?c.reloadFile(mxUtils.bind(this,function(){c.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(a){c.handleFileError(a,!0)})):c.synchronizeFile(mxUtils.bind(this,function(){c.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(a){c.handleFileError(a,!0)}))))};EditorUi.prototype.getFileData=function(a,b,d,f,g,q,m,
+t,p,x,G){g=null!=g?g:!0;q=null!=q?q:!1;var c=this.editor.graph;if(b||!a&&null!=p&&/(\.svg)$/i.test(p.getTitle()))if(x=!1,null!=c.themes&&"darkTheme"==c.defaultThemeName||null!=this.pages&&this.currentPage!=this.pages[0]){var e=c.getGlobalVariable,c=this.createTemporaryGraph(c.getStylesheet()),k=this.pages[0];c.getGlobalVariable=function(a){return"page"==a?k.getName():"pagenumber"==a?1:e.apply(this,arguments)};document.body.appendChild(c.container);c.model.setRoot(k.root)}m=null!=m?m:this.getXmlFileData(g,
+q,x,G);p=null!=p?p:this.getCurrentFile();a=this.createFileData(m,c,p,window.location.href,a,b,d,f,g,t,x);c!=this.editor.graph&&c.container.parentNode.removeChild(c.container);return a};EditorUi.prototype.getHtml=function(a,b,d,f,g,q){q=null!=q?q:!0;var c=null,e=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=b){var c=q?b.getGraphBounds():b.getBoundingBox(b.getSelectionCells()),k=b.view.scale;q=Math.floor(c.x/k-b.view.translate.x);k=Math.floor(c.y/k-b.view.translate.y);c=b.background;null==g&&
+(b=this.getBasenames().join(";"),0<b.length&&(e=EditorUi.drawHost+"/embed.js?s="+b));a.setAttribute("x0",q);a.setAttribute("y0",k)}null!=a&&(a.setAttribute("pan","1"),a.setAttribute("zoom","1"),a.setAttribute("resize","0"),a.setAttribute("fit","0"),a.setAttribute("border","20"),a.setAttribute("links","1"),null!=f&&a.setAttribute("edit",f));null!=g&&(g=g.replace(/&/g,"&amp;"));a=null!=a?Graph.zapGremlins(mxUtils.getXml(a)):"";f=Graph.compress(a);Graph.decompress(f)!=a&&(f=encodeURIComponent(a));return(null==
+g?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=g?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==g?null!=d?"<title>"+mxUtils.htmlEntities(d)+"</title>\n":"":"<title>diagrams.net</title>\n")+(null!=g?'<meta http-equiv="refresh" content="0;URL=\''+g+"'\"/>\n":"")+"</head>\n<body"+(null==g&&null!=c&&c!=mxConstants.NONE?' style="background-color:'+c+';">':">")+'\n<div class="mxgraph" style="position:relative;overflow:auto;width:100%;">\n<div style="width:1px;height:1px;overflow:hidden;">'+
+f+"</div>\n</div>\n"+(null==g?'<script type="text/javascript" src="'+e+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+g+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.getHtml2=function(a,b,d,f,g){b=window.DRAWIO_VIEWER_URL||EditorUi.drawHost+"/js/viewer-static.min.js";null!=g&&(g=g.replace(/&/g,"&amp;"));a={highlight:"#0000ff",nav:this.editor.graph.foldingEnabled,
+resize:!0,xml:Graph.zapGremlins(a),toolbar:"pages zoom layers lightbox"};null!=this.pages&&null!=this.currentPage&&(a.page=mxUtils.indexOf(this.pages,this.currentPage));return(null==g?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=g?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==g?null!=d?"<title>"+mxUtils.htmlEntities(d)+"</title>\n":"":"<title>diagrams.net</title>\n")+(null!=g?'<meta http-equiv="refresh" content="0;URL=\''+
+g+"'\"/>\n":"")+'<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(a))+'"></div>\n'+(null==g?'<script type="text/javascript" src="'+b+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+g+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.setFileData=
+function(a){a=this.validateFileData(a);this.pages=this.fileNode=this.currentPage=null;a=null!=a&&0<a.length?mxUtils.parseXml(a).documentElement:null;var c=Editor.extractParserError(a,mxResources.get("invalidOrMissingFile"));if(c)throw Error(mxResources.get("notADiagramFile")+" ("+c+")");c=null!=a?this.editor.extractGraphModel(a,!0):null;null!=c&&(a=c);if(null!=a&&"mxfile"==a.nodeName&&(c=a.getElementsByTagName("diagram"),"0"!=urlParams.pages||1<c.length||1==c.length&&c[0].hasAttribute("name"))){var b=
+null;this.fileNode=a;this.pages=[];for(var d=0;d<c.length;d++)null==c[d].getAttribute("id")&&c[d].setAttribute("id",d),a=new DiagramPage(c[d]),null==a.getName()&&a.setName(mxResources.get("pageWithNumber",[d+1])),this.pages.push(a),null!=urlParams["page-id"]&&a.getId()==urlParams["page-id"]&&(b=a);this.currentPage=null!=b?b:this.pages[Math.max(0,Math.min(this.pages.length-1,urlParams.page||0))];a=this.currentPage.node}"0"!=urlParams.pages&&null==this.fileNode&&null!=a&&(this.fileNode=a.ownerDocument.createElement("mxfile"),
+this.currentPage=new DiagramPage(a.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),this.pages=[this.currentPage]);this.editor.setGraphXml(a);null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=urlParams["layer-ids"])try{var f=urlParams["layer-ids"].split(" ");a={};for(d=0;d<f.length;d++)a[f[d]]=!0;for(var g=this.editor.graph.getModel(),m=g.getChildren(g.root),d=0;d<m.length;d++){var t=m[d];g.setVisible(t,a[t.id]||
+!1)}}catch(A){}};EditorUi.prototype.getBaseFilename=function(a){var c=this.getCurrentFile(),c=null!=c&&null!=c.getTitle()?c.getTitle():this.defaultFilename;if(/(\.xml)$/i.test(c)||/(\.html)$/i.test(c)||/(\.svg)$/i.test(c)||/(\.png)$/i.test(c))c=c.substring(0,c.lastIndexOf("."));/(\.drawio)$/i.test(c)&&(c=c.substring(0,c.lastIndexOf(".")));!a&&null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&null!=this.currentPage.node.getAttribute("name")&&0<this.currentPage.getName().length&&(c=c+"-"+
+this.currentPage.getName());return c};EditorUi.prototype.downloadFile=function(a,b,d,f,g,q,m,t,p,x,G){try{f=null!=f?f:this.editor.graph.isSelectionEmpty();var c=this.getBaseFilename(!g),e=c+("xml"==a||"pdf"==a&&G?".drawio":"")+"."+a;if("xml"==a){var k='<?xml version="1.0" encoding="UTF-8"?>\n'+this.getFileData(!0,null,null,null,f,g,null,null,null,b);this.saveData(e,a,k,"text/xml")}else if("html"==a)k=this.getHtml2(this.getFileData(!0),this.editor.graph,c),this.saveData(e,a,k,"text/html");else if("svg"!=
+a&&"xmlsvg"!=a||!this.spinner.spin(document.body,mxResources.get("export")))"xmlpng"==a?e=c+".png":"jpeg"==a&&(e=c+".jpg"),this.saveRequest(e,a,mxUtils.bind(this,function(c,b){try{var e=this.editor.graph.pageVisible;null!=q&&(this.editor.graph.pageVisible=q);var d=this.createDownloadRequest(c,a,f,b,m,g,t,p,x,G);this.editor.graph.pageVisible=e;return d}catch(v){this.handleError(v)}}));else{var l=null,n=mxUtils.bind(this,function(a){a.length<=MAX_REQUEST_SIZE?this.saveData(e,"svg",a,"image/svg+xml"):
+this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(l)}))});if("svg"==a){var u=this.editor.graph.background;if(m||u==mxConstants.NONE)u=null;var A=this.editor.graph.getSvg(u,null,null,null,null,f);d&&this.editor.graph.addSvgShadow(A);this.editor.convertImages(A,mxUtils.bind(this,mxUtils.bind(this,function(a){this.spinner.stop();n('<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n'+
+mxUtils.getXml(a))})))}else e=c+".svg",l=this.getFileData(!1,!0,null,mxUtils.bind(this,function(a){this.spinner.stop();n(a)}),f)}}catch(M){this.handleError(M)}};EditorUi.prototype.createDownloadRequest=function(a,b,d,f,g,q,m,t,p,x){var c=this.editor.graph,e=c.getGraphBounds();d=this.getFileData(!0,null,null,null,d,0==q?!1:"xmlpng"!=b,null,null,null,null,"pdf"==b);var k="",l="";if(e.width*e.height>MAX_AREA||d.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};x=x?"1":"0";"pdf"==
+b&&0==q&&(l="&allPages=1");if("xmlpng"==b&&(x="1",b="png",null!=this.pages&&null!=this.currentPage))for(q=0;q<this.pages.length;q++)if(this.pages[q]==this.currentPage){k="&from="+q;break}q=c.background;"png"!=b&&"pdf"!=b||!g?g||null!=q&&q!=mxConstants.NONE||(q="#ffffff"):q=mxConstants.NONE;g={globalVars:c.getExportVariables()};p&&(g.grid={size:c.gridSize,steps:c.view.gridSteps,color:c.view.gridColor});Graph.translateDiagram&&(g.diagramLanguage=Graph.diagramLanguage);return new mxXmlRequest(EXPORT_URL,
+"format="+b+k+l+"&bg="+(null!=q?q:mxConstants.NONE)+"&base64="+f+"&embedXml="+x+"&xml="+encodeURIComponent(d)+(null!=a?"&filename="+encodeURIComponent(a):"")+"&extras="+encodeURIComponent(JSON.stringify(g))+(null!=m?"&scale="+m:"")+(null!=t?"&border="+t:""))};EditorUi.prototype.setMode=function(a,b){this.mode=a};EditorUi.prototype.loadDescriptor=function(a,b,d){var c=window.location.hash,e=mxUtils.bind(this,function(e){var d=null!=a.data?a.data:"";null!=e&&0<e.length&&(0<d.length&&(d+="\n"),d+=e);
+e=new LocalFile(this,"csv"!=a.format&&0<d.length?d:this.emptyDiagramXml,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0);e.getHash=function(){return c};this.fileLoaded(e);"csv"==a.format&&this.importCsv(d,mxUtils.bind(this,function(a){this.editor.undoManager.clear();this.editor.setModified(!1);this.editor.setStatus("")}));if(null!=a.update){var f=null!=a.interval?parseInt(a.interval):6E4,k=null,g=mxUtils.bind(this,function(){var c=this.currentPage;mxUtils.post(a.update,
+"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,function(a){c===this.currentPage&&(200<=a.getStatus()&&300>=a.getStatus()?(this.updateDiagram(a.getText()),l()):this.handleError({message:mxResources.get("error")+" "+a.getStatus()}))}),mxUtils.bind(this,function(a){this.handleError(a)}))}),l=mxUtils.bind(this,function(){window.clearTimeout(k);k=window.setTimeout(g,f)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){l();g()}));l();g()}null!=
+b&&b()});null!=a.url&&0<a.url.length?this.editor.loadUrl(a.url,mxUtils.bind(this,function(a){e(a)}),mxUtils.bind(this,function(a){null!=d&&d(a)})):e("")};EditorUi.prototype.updateDiagram=function(a){function c(a){var c=new mxCellOverlay(a.image||f.warningImage,a.tooltip,a.align,a.valign,a.offset);c.addListener(mxEvent.CLICK,function(c,b){d.alert(a.tooltip)});return c}var b=null,d=this;if(null!=a&&0<a.length&&(b=mxUtils.parseXml(a),a=null!=b?b.documentElement:null,null!=a&&"updates"==a.nodeName)){var f=
+this.editor.graph,g=f.getModel();g.beginUpdate();var m=null;try{for(a=a.firstChild;null!=a;){if("update"==a.nodeName){var t=g.getCell(a.getAttribute("id"));if(null!=t){try{var p=a.getAttribute("value");if(null!=p){var x=mxUtils.parseXml(p).documentElement;if(null!=x)if("1"==x.getAttribute("replace-value"))g.setValue(t,x);else for(var G=x.attributes,z=0;z<G.length;z++)f.setAttributeForCell(t,G[z].nodeName,0<G[z].nodeValue.length?G[z].nodeValue:null)}}catch(U){null!=window.console&&console.log("Error in value for "+
+t.id+": "+U)}try{var E=a.getAttribute("style");null!=E&&f.model.setStyle(t,E)}catch(U){null!=window.console&&console.log("Error in style for "+t.id+": "+U)}try{var H=a.getAttribute("icon");if(null!=H){var K=0<H.length?JSON.parse(H):null;null!=K&&K.append||f.removeCellOverlays(t);null!=K&&f.addCellOverlay(t,c(K))}}catch(U){null!=window.console&&console.log("Error in icon for "+t.id+": "+U)}try{var F=a.getAttribute("geometry");if(null!=F){var F=JSON.parse(F),I=f.getCellGeometry(t);if(null!=I){I=I.clone();
+for(key in F){var D=parseFloat(F[key]);"dx"==key?I.x+=D:"dy"==key?I.y+=D:"dw"==key?I.width+=D:"dh"==key?I.height+=D:I[key]=parseFloat(F[key])}f.model.setGeometry(t,I)}}}catch(U){null!=window.console&&console.log("Error in icon for "+t.id+": "+U)}}}else if("model"==a.nodeName){for(var M=a.firstChild;null!=M&&M.nodeType!=mxConstants.NODETYPE_ELEMENT;)M=M.nextSibling;null!=M&&(new mxCodec(a.firstChild)).decode(M,g)}else if("view"==a.nodeName){if(a.hasAttribute("scale")&&(f.view.scale=parseFloat(a.getAttribute("scale"))),
+a.hasAttribute("dx")||a.hasAttribute("dy"))f.view.translate=new mxPoint(parseFloat(a.getAttribute("dx")||0),parseFloat(a.getAttribute("dy")||0))}else"fit"==a.nodeName&&(m=a.hasAttribute("max-scale")?parseFloat(a.getAttribute("max-scale")):1);a=a.nextSibling}}finally{g.endUpdate()}null!=m&&this.chromelessResize&&this.chromelessResize(!0,m)}return b};EditorUi.prototype.getCopyFilename=function(a,b){var c=null!=a&&null!=a.getTitle()?a.getTitle():this.defaultFilename,e="",d=c.lastIndexOf(".");0<=d&&(e=
+c.substring(d),c=c.substring(0,d));if(b)var f=new Date,d=f.getFullYear(),g=f.getMonth()+1,m=f.getDate(),p=f.getHours(),x=f.getMinutes(),f=f.getSeconds(),c=c+(" "+(d+"-"+g+"-"+m+"-"+p+"-"+x+"-"+f));return c=mxResources.get("copyOf",[c])+e};EditorUi.prototype.fileLoaded=function(a,b){var c=this.getCurrentFile();this.fileEditable=this.fileLoadedError=null;this.setCurrentFile(null);var e=!1;this.hideDialog();null!=c&&(EditorUi.debug("File.closed",[c]),c.removeListener(this.descriptorChangedListener),
+c.close());this.editor.graph.model.clear();this.editor.undoManager.clear();var d=mxUtils.bind(this,function(){this.setGraphEnabled(!1);this.setCurrentFile(null);null!=c&&this.updateDocumentTitle();this.editor.graph.model.clear();this.editor.undoManager.clear();this.setBackgroundImage(null);!b&&null!=window.location.hash&&0<window.location.hash.length&&(window.location.hash="");null!=this.fname&&(this.fnameWrapper.style.display="none",this.fname.innerHTML="",this.fname.setAttribute("title",mxResources.get("rename")));
+this.editor.setStatus("");this.updateUi();b||this.showSplash()});if(null!=a)try{mxClient.IS_SF&&"min"==uiTheme&&(this.diagramContainer.style.visibility="");this.openingFile=!0;this.setCurrentFile(a);a.addListener("descriptorChanged",this.descriptorChangedListener);a.addListener("contentChanged",this.descriptorChangedListener);a.open();delete this.openingFile;this.setGraphEnabled(!0);this.setMode(a.getMode());this.editor.graph.model.prefix=Editor.guid()+"-";this.editor.undoManager.clear();this.descriptorChanged();
+this.updateUi();a.isEditable()?a.isModified()?(a.addUnsavedStatus(),null!=a.backupPatch&&a.patch([a.backupPatch])):this.editor.setStatus(""):this.editor.setStatus('<span class="geStatusAlert" style="margin-left:8px;">'+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"));e=!0;this.isOffline()||null==a.getMode()||EditorUi.logEvent({category:a.getMode().toUpperCase()+"-OPEN-FILE-"+a.getHash(),action:"size_"+a.getSize(),label:"autosave_"+(this.editor.autosave?"on":"off")});EditorUi.debug("File.opened",[a]);if(this.editor.editable&&this.mode==a.getMode()&&a.getMode()!=App.MODE_DEVICE&&null!=a.getMode())try{this.addRecent({id:a.getHash(),title:a.getTitle(),
+mode:a.getMode()})}catch(u){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+1),mxSettings.save()}catch(u){}}catch(u){this.fileLoadedError=u;if(EditorUi.enableLogging&&!this.isOffline())try{EditorUi.logEvent({category:"ERROR-LOAD-FILE-"+(null!=a?a.getHash():"none"),action:"message_"+u.message,label:"stack_"+u.stack})}catch(t){}var f=mxUtils.bind(this,function(){null!=urlParams.url&&this.spinner.spin(document.body,mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):
+null!=c?this.fileLoaded(c):d()});b?f():this.handleError(u,mxResources.get("errorLoadingFile"),f,!0,null,null,!0)}else d();return e};EditorUi.prototype.getHashValueForPages=function(a,b){var c=0,d=new mxGraphModel,e=new mxCodec;null!=b&&(b.byteCount=0,b.attrCount=0,b.eltCount=0,b.nodeCount=0);for(var f=0;f<a.length;f++){this.updatePageRoot(a[f]);var g=a[f].node.cloneNode(!1);g.removeAttribute("name");d.root=a[f].root;var m=e.encode(d);this.editor.graph.saveViewState(a[f].viewState,m,!0);m.removeAttribute("pageWidth");
+m.removeAttribute("pageHeight");g.appendChild(m);null!=b&&(b.eltCount+=g.getElementsByTagName("*").length,b.nodeCount+=g.getElementsByTagName("mxCell").length);c=(c<<5)-c+this.hashValue(g,function(a,c,b,d){return!d||"mxGeometry"!=a.nodeName&&"mxPoint"!=a.nodeName||"x"!=c&&"y"!=c&&"width"!=c&&"height"!=c?d&&"mxCell"==a.nodeName&&"previous"==c?null:b:Math.round(b)},b)<<0}return c};EditorUi.prototype.hashValue=function(a,b,d){var c=0;if(null!=a&&"object"===typeof a&&"number"===typeof a.nodeType&&"string"===
+typeof a.nodeName&&"function"===typeof a.getAttribute){null!=a.nodeName&&(c^=this.hashValue(a.nodeName,b,d));if(null!=a.attributes){null!=d&&(d.attrCount+=a.attributes.length);for(var e=0;e<a.attributes.length;e++){var f=a.attributes[e].name,k=null!=b?b(a,f,a.attributes[e].value,!0):a.attributes[e].value;null!=k&&(c^=this.hashValue(f,b,d)+this.hashValue(k,b,d))}}if(null!=a.childNodes)for(e=0;e<a.childNodes.length;e++)c=(c<<5)-c+this.hashValue(a.childNodes[e],b,d)<<0}else if(null!=a&&"function"!==
+typeof a){a=String(a);b=0;null!=d&&(d.byteCount+=a.length);for(e=0;e<a.length;e++)b=(b<<5)-b+a.charCodeAt(e)<<0;c^=b}return c};EditorUi.prototype.descriptorChanged=function(){};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(a,b,d,f,g,q,m){};EditorUi.prototype.isScratchpadEnabled=function(){return isLocalStorage||mxClient.IS_CHROMEAPP};EditorUi.prototype.toggleScratchpad=function(){this.isScratchpadEnabled()&&(null==this.scratchpad?StorageFile.getFileContent(this,
+".scratchpad",mxUtils.bind(this,function(a){null==a&&(a=this.emptyLibraryXml);this.loadLibrary(new StorageLibrary(this,a,".scratchpad"))})):this.closeLibrary(this.scratchpad))};EditorUi.prototype.createLibraryDataFromImages=function(a){var c=mxUtils.createXmlDocument(),b=c.createElement("mxlibrary");mxUtils.setTextContent(b,JSON.stringify(a));c.appendChild(b);return mxUtils.getXml(c)};EditorUi.prototype.closeLibrary=function(a){null!=a&&(this.removeLibrarySidebar(a.getHash()),a.constructor!=LocalLibrary&&
+mxSettings.removeCustomLibrary(a.getHash()),".scratchpad"==a.title&&(this.scratchpad=null))};EditorUi.prototype.removeLibrarySidebar=function(a){var c=this.sidebar.palettes[a];if(null!=c){for(var b=0;b<c.length;b++)c[b].parentNode.removeChild(c[b]);delete this.sidebar.palettes[a]}};EditorUi.prototype.repositionLibrary=function(a){var c=this.sidebar.container;if(null==a){var b=this.sidebar.palettes["L.scratchpad"];null==b&&(b=this.sidebar.palettes.search);null!=b&&(a=b[b.length-1].nextSibling)}a=null!=
+a?a:c.firstChild.nextSibling.nextSibling;var b=c.lastChild,d=b.previousSibling;c.insertBefore(b,a);c.insertBefore(d,b)};EditorUi.prototype.loadLibrary=function(a,b){var c=mxUtils.parseXml(a.getData());if("mxlibrary"==c.documentElement.nodeName){var d=JSON.parse(mxUtils.getTextContent(c.documentElement));this.libraryLoaded(a,d,c.documentElement.getAttribute("title"),b)}else throw{message:mxResources.get("notALibraryFile")};};EditorUi.prototype.getLibraryStorageHint=function(a){return""};EditorUi.prototype.libraryLoaded=
+function(a,b,d,f){if(null!=this.sidebar){a.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(a.getHash());".scratchpad"==a.title&&(this.scratchpad=a);var c=this.sidebar.palettes[a.getHash()],c=null!=c?c[c.length-1].nextSibling:null;this.removeLibrarySidebar(a.getHash());var e=null,k=mxUtils.bind(this,function(c,b){0==c.length&&a.isEditable()?(null==e&&(e=document.createElement("div"),e.className="geDropTarget",mxUtils.write(e,mxResources.get("dragElementsHere"))),b.appendChild(e)):this.addLibraryEntries(c,
+b)});null!=this.sidebar&&null!=b&&this.sidebar.addEntries(b);d=null!=d&&0<d.length?d:a.getTitle();var g=this.sidebar.addPalette(a.getHash(),d,null!=f?f:!0,mxUtils.bind(this,function(a){k(b,a)}));this.repositionLibrary(c);var n=g.parentNode.previousSibling;f=n.getAttribute("title");null!=f&&0<f.length&&".scratchpad"!=a.title&&n.setAttribute("title",this.getLibraryStorageHint(a)+"\n"+f);var m=document.createElement("div");m.style.position="absolute";m.style.right="0px";m.style.top="0px";m.style.padding=
+"8px";m.style.backgroundColor="inherit";n.style.position="relative";var p=document.createElement("img");p.setAttribute("src",Dialog.prototype.closeImage);p.setAttribute("title",mxResources.get("close"));p.setAttribute("valign","absmiddle");p.setAttribute("border","0");p.style.cursor="pointer";p.style.margin="0 3px";var z=null;if(".scratchpad"!=a.title||this.closableScratchpad)m.appendChild(p),mxEvent.addListener(p,"click",mxUtils.bind(this,function(c){if(!mxEvent.isConsumed(c)){var b=mxUtils.bind(this,
+function(){this.closeLibrary(a)});null!=z?this.confirm(mxResources.get("allChangesLost"),null,b,mxResources.get("cancel"),mxResources.get("discardChanges")):b();mxEvent.consume(c)}}));if(a.isEditable()){var E=this.editor.graph,H=null,K=mxUtils.bind(this,function(c){this.showLibraryDialog(a.getTitle(),g,b,a,a.getMode());mxEvent.consume(c)}),F=mxUtils.bind(this,function(c){a.setModified(!0);a.isAutosave()?(null!=H&&null!=H.parentNode&&H.parentNode.removeChild(H),H=p.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",m.insertBefore(H,m.firstChild),n.style.paddingRight=18*m.childNodes.length+"px",this.saveLibrary(a.getTitle(),b,a,a.getMode(),!0,!0,function(){null!=H&&null!=H.parentNode&&(H.parentNode.removeChild(H),n.style.paddingRight=18*m.childNodes.length+"px")})):null==z&&(z=p.cloneNode(!1),z.setAttribute("src",IMAGE_PATH+"/download.png"),z.setAttribute("title",mxResources.get("save")),
+m.insertBefore(z,m.firstChild),mxEvent.addListener(z,"click",mxUtils.bind(this,function(c){this.saveLibrary(a.getTitle(),b,a,a.getMode(),a.constructor==LocalLibrary,!0,function(){null==z||a.isModified()||(n.style.paddingRight=18*m.childNodes.length+"px",z.parentNode.removeChild(z),z=null)});mxEvent.consume(c)})),n.style.paddingRight=18*m.childNodes.length+"px")}),I=mxUtils.bind(this,function(a,c,d,f){a=E.cloneCells(mxUtils.sortCells(E.model.getTopmostCells(a)));for(var k=0;k<a.length;k++){var l=E.getCellGeometry(a[k]);
+null!=l&&l.translate(-c.x,-c.y)}g.appendChild(this.sidebar.createVertexTemplateFromCells(a,c.width,c.height,f||"",!0,!1,!1));a={xml:Graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(a))),w:c.width,h:c.height};null!=f&&(a.title=f);b.push(a);F(d);null!=e&&null!=e.parentNode&&0<b.length&&(e.parentNode.removeChild(e),e=null)}),D=mxUtils.bind(this,function(a){if(E.isSelectionEmpty())E.getRubberband().isActive()?(E.getRubberband().execute(a),E.getRubberband().reset()):this.showError(mxResources.get("error"),
+mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var c=E.getSelectionCells(),b=E.view.getBounds(c),d=E.view.scale;b.x/=d;b.y/=d;b.width/=d;b.height/=d;b.x-=E.view.translate.x;b.y-=E.view.translate.y;I(c,b)}mxEvent.consume(a)});mxEvent.addGestureListeners(g,function(){},mxUtils.bind(this,function(a){E.isMouseDown&&null!=E.panningManager&&null!=E.graphHandler.first&&(E.graphHandler.suspend(),null!=E.graphHandler.hint&&(E.graphHandler.hint.style.visibility="hidden"),g.style.backgroundColor=
+"#f1f3f4",g.style.cursor="copy",E.panningManager.stop(),E.autoScroll=!1,mxEvent.consume(a))}),mxUtils.bind(this,function(a){E.isMouseDown&&null!=E.panningManager&&null!=E.graphHandler&&(g.style.backgroundColor="",g.style.cursor="default",this.sidebar.showTooltips=!0,E.panningManager.stop(),E.graphHandler.reset(),E.isMouseDown=!1,E.autoScroll=!0,D(a),mxEvent.consume(a))}));mxEvent.addListener(g,"mouseleave",mxUtils.bind(this,function(a){E.isMouseDown&&null!=E.graphHandler.first&&(E.graphHandler.resume(),
+null!=E.graphHandler.hint&&(E.graphHandler.hint.style.visibility="visible"),g.style.backgroundColor="",g.style.cursor="",E.autoScroll=!0)}));Graph.fileSupport&&(mxEvent.addListener(g,"dragover",mxUtils.bind(this,function(a){g.style.backgroundColor="#f1f3f4";a.dataTransfer.dropEffect="copy";g.style.cursor="copy";this.sidebar.hideTooltip();a.stopPropagation();a.preventDefault()})),mxEvent.addListener(g,"drop",mxUtils.bind(this,function(a){g.style.cursor="";g.style.backgroundColor="";0<a.dataTransfer.files.length&&
+this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(c,d,f,l,n,q,m,u,t){if(null!=c&&"image/"==d.substring(0,6))c="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image="+this.convertDataUri(c),c=[new mxCell("",new mxGeometry(0,0,n,q),c)],c[0].vertex=!0,I(c,new mxRectangle(0,0,n,q),a,mxEvent.isAltDown(a)?null:m.substring(0,m.lastIndexOf(".")).replace(/_/g," ")),null!=e&&null!=e.parentNode&&0<b.length&&(e.parentNode.removeChild(e),
+e=null);else{var p=!1,x=mxUtils.bind(this,function(c,d){if(null!=c&&"application/pdf"==d){var f=Editor.extractGraphModelFromPdf(c);null!=f&&0<f.length&&(c=f)}if(null!=c)if(f=mxUtils.parseXml(c),"mxlibrary"==f.documentElement.nodeName)try{var l=JSON.parse(mxUtils.getTextContent(f.documentElement));k(l,g);b=b.concat(l);F(a);this.spinner.stop();p=!0}catch(T){}else if("mxfile"==f.documentElement.nodeName)try{for(var n=f.documentElement.getElementsByTagName("diagram"),l=0;l<n.length;l++){var q=this.stringToCells(Editor.getDiagramNodeXml(n[l])),
+m=this.editor.graph.getBoundingBoxFromGeometry(q);I(q,new mxRectangle(0,0,m.width,m.height),a)}p=!0}catch(T){null!=window.console&&console.log("error in drop handler:",T)}p||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));null!=e&&null!=e.parentNode&&0<b.length&&(e.parentNode.removeChild(e),e=null)});null!=t&&null!=m&&(/(\.v(dx|sdx?))($|\?)/i.test(m)||/(\.vs(x|sx?))($|\?)/i.test(m))?this.importVisio(t,function(a){x(a,"text/xml")},null,m):!this.isOffline()&&(new XMLHttpRequest).upload&&
+this.isRemoteFileFormat(c,m)&&null!=t?this.parseFile(t,mxUtils.bind(this,function(a){4==a.readyState&&(this.spinner.stop(),200<=a.status&&299>=a.status?x(a.responseText,"text/xml"):this.handleError({message:mxResources.get(413==a.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):x(c,d)}}));a.stopPropagation();a.preventDefault()})),mxEvent.addListener(g,"dragleave",function(a){g.style.cursor="";g.style.backgroundColor="";a.stopPropagation();a.preventDefault()}));
+p=p.cloneNode(!1);p.setAttribute("src",Editor.editImage);p.setAttribute("title",mxResources.get("edit"));m.insertBefore(p,m.firstChild);mxEvent.addListener(p,"click",K);mxEvent.addListener(g,"dblclick",function(a){mxEvent.getSource(a)==g&&K(a)});f=p.cloneNode(!1);f.setAttribute("src",Editor.plusImage);f.setAttribute("title",mxResources.get("add"));m.insertBefore(f,m.firstChild);mxEvent.addListener(f,"click",D);this.isOffline()||".scratchpad"!=a.title||null==EditorUi.scratchpadHelpLink||(f=document.createElement("span"),
+f.setAttribute("title",mxResources.get("help")),f.style.cssText="color:#a3a3a3;text-decoration:none;margin-right:2px;",mxUtils.write(f,"?"),mxEvent.addGestureListeners(f,mxUtils.bind(this,function(a){this.openLink(EditorUi.scratchpadHelpLink);mxEvent.consume(a)})),m.insertBefore(f,m.firstChild))}n.appendChild(m);n.style.paddingRight=18*m.childNodes.length+"px"}};EditorUi.prototype.addLibraryEntries=function(a,b){for(var c=0;c<a.length;c++){var d=a[c],e=d.data;if(null!=e){var e=this.convertDataUri(e),
+f="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==d.aspect&&(f+="aspect=fixed;");b.appendChild(this.sidebar.createVertexTemplate(f+"image="+e,d.w,d.h,"",d.title||"",!1,!1,!0))}else null!=d.xml&&(e=this.stringToCells(Graph.decompress(d.xml)),0<e.length&&b.appendChild(this.sidebar.createVertexTemplateFromCells(e,d.w,d.h,d.title||"",!0,!1,!0)))}};EditorUi.prototype.getResource=function(a){return null!=a?a[mxLanguage]||a.main:null};EditorUi.prototype.footerHeight=
+0;"1"==urlParams.savesidebar&&(Sidebar.prototype.thumbWidth=64,Sidebar.prototype.thumbHeight=64);EditorUi.initTheme=function(){"atlas"==uiTheme?(mxClient.link("stylesheet",STYLE_PATH+"/atlas.css"),"undefined"!==typeof Toolbar&&(Toolbar.prototype.unselectedBackground="linear-gradient(rgb(255, 255, 255) 0px, rgb(242, 242, 242) 100%)",Toolbar.prototype.selectedBackground="rgb(242, 242, 242)"),Editor.prototype.initialTopSpacing=3,EditorUi.prototype.menubarHeight=41,EditorUi.prototype.toolbarHeight=38):
+Editor.isDarkMode()&&(mxClient.link("stylesheet",STYLE_PATH+"/dark.css"),Dialog.backdropColor="#2a2a2a",Format.inactiveTabBackgroundColor="black",Graph.prototype.defaultThemeName="darkTheme",Graph.prototype.defaultPageBackgroundColor="#2a2a2a",Graph.prototype.defaultPageBorderColor="#505759",BaseFormatPanel.prototype.buttonBackgroundColor="#2a2a2a",mxGraphHandler.prototype.previewColor="#cccccc",StyleFormatPanel.prototype.defaultStrokeColor="#cccccc",mxConstants.DROP_TARGET_COLOR="#00ff00");Editor.sketchFontFamily=
+"Architects Daughter";Editor.sketchFontSource="https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter";"1"==urlParams.sketch&&(Graph.prototype.defaultVertexStyle={pointerEvents:"0",hachureGap:"4"},Graph.prototype.defaultEdgeStyle={edgeStyle:"none",rounded:"0",curved:"1",jettySize:"auto",orthogonalLoop:"1",endArrow:"open",startSize:"14",endSize:"14",sourcePerimeterSpacing:"8",targetPerimeterSpacing:"8"},"0"!=urlParams.rough&&(Graph.prototype.defaultVertexStyle.fontFamily=Editor.sketchFontFamily,
+Graph.prototype.defaultVertexStyle.fontSource=Editor.sketchFontSource,Graph.prototype.defaultVertexStyle.fontSize="20",Graph.prototype.defaultVertexStyle.sketch="1",Graph.prototype.defaultEdgeStyle.fontFamily=Editor.sketchFontFamily,Graph.prototype.defaultEdgeStyle.fontSource=Editor.sketchFontSource,Graph.prototype.defaultEdgeStyle.fontSize="20",Graph.prototype.defaultEdgeStyle.sketch="1",Menus.prototype.defaultFonts=[{fontFamily:Editor.sketchFontFamily,fontUrl:decodeURIComponent(Editor.sketchFontSource)},
+{fontFamily:"Rock Salt",fontUrl:"https://fonts.googleapis.com/css?family=Rock+Salt"},{fontFamily:"Permanent Marker",fontUrl:"https://fonts.googleapis.com/css?family=Permanent+Marker"}].concat(Menus.prototype.defaultFonts)),Editor.configurationKey=".sketch-configuration",Editor.settingsKey=".sketch-config",Graph.prototype.defaultGridEnabled=!1,Graph.prototype.defaultPageVisible=!1,Graph.prototype.defaultEdgeLength=120,Editor.fitWindowBorders=new mxRectangle(60,30,30,30))};EditorUi.initTheme();EditorUi.prototype.showImageDialog=
+function(a,b,d,f,g){a=new ImageDialog(this,a,b,d,f,g);this.showDialog(a.container,Graph.fileSupport?480:360,Graph.fileSupport?200:90,!0,!0);a.init()};EditorUi.prototype.showBackgroundImageDialog=function(a,b){a=null!=a?a:mxUtils.bind(this,function(a,c){if(!c){var b=new ChangePageSetup(this,null,a);b.ignoreColor=!0;this.editor.graph.model.execute(b)}});var c=new BackgroundImageDialog(this,a,b);this.showDialog(c.container,360,200,!0,!0);c.init()};EditorUi.prototype.showLibraryDialog=function(a,b,d,
+f,g){a=new LibraryDialog(this,a,b,d,f,g);this.showDialog(a.container,640,440,!0,!1,mxUtils.bind(this,function(a){a&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()}));a.init()};var d=EditorUi.prototype.createFormat;EditorUi.prototype.createFormat=function(a){var c=d.apply(this,arguments);this.editor.graph.addListener("viewStateChanged",mxUtils.bind(this,function(a){this.editor.graph.isSelectionEmpty()&&c.refresh()}));return c};EditorUi.prototype.createSidebarFooterContainer=function(){var a=
+this.createDiv("geSidebarContainer geSidebarFooter");a.style.position="absolute";a.style.overflow="hidden";var b=document.createElement("a");b.className="geTitle";b.style.color="#DF6C0C";b.style.fontWeight="bold";b.style.height="100%";b.style.paddingTop="9px";b.innerHTML='<span style="font-size:18px;margin-right:5px;">+</span>';mxUtils.write(b,mxResources.get("moreShapes")+"...");mxEvent.addListener(b,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(a){a.preventDefault()}));
+mxEvent.addListener(b,"click",mxUtils.bind(this,function(a){this.actions.get("shapes").funct();mxEvent.consume(a)}));a.appendChild(b);return a};EditorUi.prototype.handleError=function(a,b,d,f,g,m,u){var c=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},e=null!=a&&null!=a.error?a.error:a;if(null!=a&&null!=a.stack&&null!=a.message)try{u?null!=window.console&&console.error("EditorUi.handleError:",a):EditorUi.logError("Caught: "+(""==a.message&&null!=a.name)?a.name:a.message,
+a.filename,a.lineNumber,a.columnNumber,a,"INFO")}catch(H){}if(null!=e||null!=b){u=mxUtils.htmlEntities(mxResources.get("unknownError"));var k=mxResources.get("ok"),l=null;b=null!=b?b:mxResources.get("error");if(null!=e){null!=e.retry&&(k=mxResources.get("cancel"),l=function(){c();e.retry()});if(404==e.code||404==e.status||403==e.code){u=403==e.code?null!=e.message?mxUtils.htmlEntities(e.message):mxUtils.htmlEntities(mxResources.get("accessDenied")):null!=g?g:mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied")+
+(null!=this.drive&&null!=this.drive.user?" ("+this.drive.user.displayName+", "+this.drive.user.email+")":""));var n=null!=g?null:null!=m?m:window.location.hash;if(null!=n&&("#G"==n.substring(0,2)||"#Uhttps%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D"==n.substring(0,45))&&(null!=a&&null!=a.error&&(null!=a.error.errors&&0<a.error.errors.length&&"fileAccess"==a.error.errors[0].reason||null!=a.error.data&&0<a.error.data.length&&"fileAccess"==a.error.data[0].reason)||404==e.code||404==e.status)){n="#U"==n.substring(0,
+2)?n.substring(45,n.lastIndexOf("%26ex")):n.substring(2);this.showError(b,u,mxResources.get("openInNewWindow"),mxUtils.bind(this,function(){this.editor.graph.openLink("https://drive.google.com/open?id="+n);this.handleError(a,b,d,f,g)}),l,mxResources.get("changeUser"),mxUtils.bind(this,function(){function a(){e.innerHTML="";for(var a=0;a<c.length;a++){var b=document.createElement("option");mxUtils.write(b,c[a].displayName);b.value=a;e.appendChild(b);b=document.createElement("option");b.innerHTML="&nbsp;&nbsp;&nbsp;";
+mxUtils.write(b,"<"+c[a].email+">");b.setAttribute("disabled","disabled");e.appendChild(b)}b=document.createElement("option");mxUtils.write(b,mxResources.get("addAccount"));b.value=c.length;e.appendChild(b)}var c=this.drive.getUsersList(),b=document.createElement("div"),d=document.createElement("span");d.style.marginTop="6px";mxUtils.write(d,mxResources.get("changeUser")+": ");b.appendChild(d);var e=document.createElement("select");e.style.width="200px";a();mxEvent.addListener(e,"change",mxUtils.bind(this,
+function(){var b=e.value,d=c.length!=b;d&&this.drive.setUser(c[b]);this.drive.authorize(d,mxUtils.bind(this,function(){d||(c=this.drive.getUsersList(),a())}),mxUtils.bind(this,function(a){this.handleError(a)}),!0)}));b.appendChild(e);b=new CustomDialog(this,b,mxUtils.bind(this,function(){this.loadFile(window.location.hash.substr(1),!0)}));this.showDialog(b.container,300,75,!0,!0)}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.hideDialog();null!=d&&d()}),480,150);return}}null!=e.message?
+u=""==e.message&&null!=e.name?mxUtils.htmlEntities(e.name):mxUtils.htmlEntities(e.message):null!=e.response&&null!=e.response.error?u=mxUtils.htmlEntities(e.response.error):"undefined"!==typeof window.App&&(e.code==App.ERROR_TIMEOUT?u=mxUtils.htmlEntities(mxResources.get("timeout")):e.code==App.ERROR_BUSY?u=mxUtils.htmlEntities(mxResources.get("busy")):"string"===typeof e&&0<e.length&&(u=mxUtils.htmlEntities(e)))}var q=m=null;null!=e&&null!=e.helpLink&&(m=mxResources.get("help"),q=mxUtils.bind(this,
+function(){return this.editor.graph.openLink(e.helpLink)}));this.showError(b,u,k,d,l,null,null,m,q,null,null,null,f?d:null)}else null!=d&&d()};EditorUi.prototype.alert=function(a,b,d){a=new ErrorDialog(this,null,a,mxResources.get("ok"),b);this.showDialog(a.container,d||340,100,!0,!1);a.init()};EditorUi.prototype.confirm=function(a,b,d,f,g,m){var c=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},e=Math.min(200,28*Math.ceil(a.length/50));a=new ConfirmDialog(this,a,function(){c();
+null!=b&&b()},function(){c();null!=d&&d()},f,g,null,null,null,null,e);this.showDialog(a.container,340,46+e,!0,m);a.init()};EditorUi.prototype.showBanner=function(a,b,d,f){var c=!1;if(!(this.bannerShowing||this["hideBanner"+a]||isLocalStorage&&null!=mxSettings.settings&&null!=mxSettings.settings["close"+a])){var e=document.createElement("div");e.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(e.style,"box-shadow","1px 1px 2px 0px #ddd");mxUtils.setPrefixedStyle(e.style,"transform","translate(-50%,120%)");mxUtils.setPrefixedStyle(e.style,"transition","all 1s ease");e.className="geBtn gePrimaryBtn";c=document.createElement("img");c.setAttribute("src",IMAGE_PATH+"/logo.png");c.setAttribute("border","0");c.setAttribute("align","absmiddle");c.style.cssText="margin-top:-4px;margin-left:8px;margin-right:12px;width:26px;height:26px;";e.appendChild(c);
+c=document.createElement("img");c.setAttribute("src",Dialog.prototype.closeImage);c.setAttribute("title",mxResources.get(f?"doNotShowAgain":"close"));c.setAttribute("border","0");c.style.cssText="position:absolute;right:10px;top:12px;filter:invert(1);padding:6px;margin:-6px;cursor:default;";e.appendChild(c);mxUtils.write(e,b);document.body.appendChild(e);this.bannerShowing=!0;b=document.createElement("div");b.style.cssText="font-size:11px;text-align:center;font-weight:normal;";var k=document.createElement("input");
+k.setAttribute("type","checkbox");k.setAttribute("id","geDoNotShowAgainCheckbox");k.style.marginRight="6px";if(!f){b.appendChild(k);var g=document.createElement("label");g.setAttribute("for","geDoNotShowAgainCheckbox");mxUtils.write(g,mxResources.get("doNotShowAgain"));b.appendChild(g);e.style.paddingBottom="30px";e.appendChild(b)}var n=mxUtils.bind(this,function(){null!=e.parentNode&&(e.parentNode.removeChild(e),this.bannerShowing=!1,k.checked||f)&&(this["hideBanner"+a]=!0,isLocalStorage&&null!=
+mxSettings.settings&&(mxSettings.settings["close"+a]=Date.now(),mxSettings.save()))});mxEvent.addListener(c,"click",mxUtils.bind(this,function(a){mxEvent.consume(a);n()}));var m=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(e.style,"transform","translate(-50%,120%)");window.setTimeout(mxUtils.bind(this,function(){n()}),1E3)});mxEvent.addListener(e,"click",mxUtils.bind(this,function(a){var c=mxEvent.getSource(a);c!=k&&c!=g?(null!=d&&d(),n(),mxEvent.consume(a)):m()}));window.setTimeout(mxUtils.bind(this,
+function(){mxUtils.setPrefixedStyle(e.style,"transform","translate(-50%,0%)")}),500);window.setTimeout(m,3E4);c=!0}return c};EditorUi.prototype.setCurrentFile=function(a){null!=a&&(a.opened=new Date);this.currentFile=a};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};EditorUi.prototype.isExportToCanvas=function(){return this.editor.isExportToCanvas()};EditorUi.prototype.createImageDataUri=function(a,b,d,f){a=a.toDataURL("image/"+d);if(null!=a&&6<a.length)null!=b&&(a=Editor.writeGraphModelToPng(a,
+"tEXt","mxfile",encodeURIComponent(b))),0<f&&(a=Editor.writeGraphModelToPng(a,"pHYs","dpi",f));else throw{message:mxResources.get("unknownError")};return a};EditorUi.prototype.saveCanvas=function(a,b,d,f,g){var c="jpeg"==d?"jpg":d;f=this.getBaseFilename(f)+(null!=b?".drawio":"")+"."+c;a=this.createImageDataUri(a,b,d,g);this.saveData(f,c,a.substring(a.lastIndexOf(",")+1),"image/"+d,!0)};EditorUi.prototype.isLocalFileSave=function(){return"remote"!=urlParams.save&&(mxClient.IS_IE||"undefined"!==typeof window.Blob&&
+"undefined"!==typeof window.URL)&&9!=document.documentMode&&8!=document.documentMode&&7!=document.documentMode||this.isOfflineApp()||mxClient.IS_IOS};EditorUi.prototype.showTextDialog=function(a,b){var c=new TextareaDialog(this,a,b,null,null,mxResources.get("close"));c.textarea.style.width="600px";c.textarea.style.height="380px";this.showDialog(c.container,620,460,!0,!0,null,null,null,null,!0);c.init();document.execCommand("selectall",!1,null)};EditorUi.prototype.doSaveLocalFile=function(a,b,d,f,
+g,m){"text/xml"!=d||/(\.drawio)$/i.test(b)||/(\.xml)$/i.test(b)||/(\.svg)$/i.test(b)||/(\.html)$/i.test(b)||(b=b+"."+(null!=m?m:"drawio"));if(window.Blob&&navigator.msSaveOrOpenBlob)a=f?this.base64ToBlob(a,d):new Blob([a],{type:d}),navigator.msSaveOrOpenBlob(a,b);else if(mxClient.IS_IE)d=window.open("about:blank","_blank"),null==d?mxUtils.popup(a,!0):(d.document.write(a),d.document.close(),d.document.execCommand("SaveAs",!0,b),d.close());else if(mxClient.IS_IOS&&this.isOffline())navigator.standalone||
+null==d||"image/"!=d.substring(0,6)?this.showTextDialog(b+":",a):this.openInNewWindow(a,d,f);else{var c=document.createElement("a");m=(null==navigator.userAgent||0>navigator.userAgent.indexOf("PaleMoon/"))&&"undefined"!==typeof c.download;if(mxClient.IS_GC&&null!=navigator.userAgent){var e=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);m=65==(e?parseInt(e[2],10):!1)?!1:m}if(m||this.isOffline()){c.href=URL.createObjectURL(f?this.base64ToBlob(a,d):new Blob([a],{type:d}));m?c.download=b:c.setAttribute("target",
+"_blank");document.body.appendChild(c);try{window.setTimeout(function(){URL.revokeObjectURL(c.href)},2E4),c.click(),c.parentNode.removeChild(c)}catch(A){}}else this.createEchoRequest(a,b,d,f,g).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(a,b,d,f,g,m){a="xml="+encodeURIComponent(a);return new mxXmlRequest(SAVE_URL,a+(null!=d?"&mime="+d:"")+(null!=g?"&format="+g:"")+(null!=m?"&base64="+m:"")+(null!=b?"&filename="+encodeURIComponent(b):"")+(f?"&binary=1":""))};EditorUi.prototype.base64ToBlob=
+function(a,b){b=b||"";for(var c=atob(a),d=c.length,e=Math.ceil(d/1024),f=Array(e),g=0;g<e;++g){for(var m=1024*g,p=Math.min(m+1024,d),x=Array(p-m),G=0;m<p;++G,++m)x[G]=c[m].charCodeAt(0);f[g]=new Uint8Array(x)}return new Blob(f,{type:b})};EditorUi.prototype.saveLocalFile=function(a,b,d,f,g,m,u,t){m=null!=m?m:!1;u=null!=u?u:"vsdx"!=g&&(!mxClient.IS_IOS||!navigator.standalone);g=this.getServiceCount(m);isLocalStorage&&g++;var c=4>=g?2:6<g?4:3;b=new CreateDialog(this,b,mxUtils.bind(this,function(c,b){try{if("_blank"==
+b)if(null!=d&&"image/"==d.substring(0,6))this.openInNewWindow(a,d,f);else if(null!=d&&"text/html"==d.substring(0,9)){var e=new EmbedDialog(this,a);this.showDialog(e.container,440,240,!0,!0);e.init()}else{var k=window.open("about:blank");null==k?mxUtils.popup(a,!0):(k.document.write("<pre>"+mxUtils.htmlEntities(a,!1)+"</pre>"),k.document.close())}else b==App.MODE_DEVICE||"download"==b?this.doSaveLocalFile(a,c,d,f,null,t):null!=c&&0<c.length&&this.pickFolder(b,mxUtils.bind(this,function(e){try{this.exportFile(a,
+c,d,f,b,e)}catch(K){this.handleError(K)}}))}catch(H){this.handleError(H)}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,m,u,null,1<g,c,a,d,f);m=this.isServices(g)?g>c?390:270:160;this.showDialog(b.container,400,m,!0,!0);b.init()};EditorUi.prototype.openInNewWindow=function(a,b,d){var c=window.open("about:blank");null==c||null==c.document?mxUtils.popup(a,!0):("image/svg+xml"!=b||mxClient.IS_SVG?"image/svg+xml"==b?c.document.write("<html>"+
+a+"</html>"):(a=d?a:btoa(unescape(encodeURIComponent(a))),c.document.write('<html><img style="max-width:100%;" src="data:'+b+";base64,"+a+'"/></html>')):c.document.write("<html><pre>"+mxUtils.htmlEntities(a,!1)+"</pre></html>"),c.document.close())};var g=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(a){if(this.isExportToCanvas()&&this.isChromelessImageExportEnabled()){this.exportDialog=null;var c=a(mxUtils.bind(this,function(a){var b=mxUtils.bind(this,function(){mxEvent.removeListener(this.editor.graph.container,"click",b);null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null)});if(null!=this.exportDialog)b.apply(this);else{this.exportDialog=document.createElement("div");var d=c.getBoundingClientRect();
+mxUtils.setPrefixedStyle(this.exportDialog.style,"borderRadius","5px");this.exportDialog.style.position="fixed";this.exportDialog.style.textAlign="center";this.exportDialog.style.fontFamily="Helvetica,Arial";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=d.left+"px";
+this.exportDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";d=mxUtils.getCurrentStyle(this.editor.graph.container);this.exportDialog.style.zIndex=d.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(a){e.stop();this.exportDialog.style.width="auto";this.exportDialog.style.height=
+"auto";this.exportDialog.style.padding="10px";var c=this.createImageDataUri(a,null,"png");a=document.createElement("img");a.style.maxWidth="140px";a.style.maxHeight="140px";a.style.cursor="pointer";a.style.backgroundColor="white";a.setAttribute("title",mxResources.get("openInNewWindow"));a.setAttribute("border","0");a.setAttribute("src",c);this.exportDialog.appendChild(a);mxEvent.addListener(a,"click",mxUtils.bind(this,function(){this.openInNewWindow(c.substring(c.indexOf(",")+1),"image/png",!0);
+b.apply(this,arguments)}))}),null,this.thumbImageCache,null,mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),null,null,null,null,null,null,null,Editor.defaultBorder);mxEvent.addListener(this.editor.graph.container,"click",b);document.body.appendChild(this.exportDialog)}mxEvent.consume(a)}),Editor.cameraLargeImage,mxResources.get("export"))}g.apply(this,arguments)};EditorUi.prototype.saveData=function(a,b,d,f,g){this.isLocalFileSave()?this.saveLocalFile(d,a,f,g,b):this.saveRequest(a,
+b,mxUtils.bind(this,function(a,c){return this.createEchoRequest(d,a,f,g,b,c)}),d,g,f)};EditorUi.prototype.saveRequest=function(a,b,d,f,g,m,u){u=null!=u?u:!mxClient.IS_IOS||!navigator.standalone;var c=this.getServiceCount(!1);isLocalStorage&&c++;var e=4>=c?2:6<c?4:3;a=new CreateDialog(this,a,mxUtils.bind(this,function(a,c){if("_blank"==c||null!=a&&0<a.length){var e=d("_blank"==c?null:a,c==App.MODE_DEVICE||"download"==c||null==c||"_blank"==c?"0":"1");null!=e&&(c==App.MODE_DEVICE||"download"==c||"_blank"==
+c?e.simulate(document,"_blank"):this.pickFolder(c,mxUtils.bind(this,function(d){m=null!=m?m:"pdf"==b?"application/pdf":"image/"+b;if(null!=f)try{this.exportFile(f,a,m,!0,c,d)}catch(H){this.handleError(H)}else this.spinner.spin(document.body,mxResources.get("saving"))&&e.send(mxUtils.bind(this,function(){this.spinner.stop();if(200<=e.getStatus()&&299>=e.getStatus())try{this.exportFile(e.getText(),a,m,!0,c,d)}catch(H){this.handleError(H)}else this.handleError({message:mxResources.get("errorSavingFile")})}),
+function(a){this.spinner.stop();this.handleError(a)})})))}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,!1,u,null,1<c,e,f,m,g);c=this.isServices(c)?4<c?390:270:160;this.showDialog(a.container,380,c,!0,!0);a.init()};EditorUi.prototype.isServices=function(a){return 1!=a};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(a,b,d,f,g,m){};EditorUi.prototype.pickFolder=function(a,
+b,d){b(null)};EditorUi.prototype.exportSvg=function(a,b,d,f,g,m,u,p,A,x,G,z){if(this.spinner.spin(document.body,mxResources.get("export")))try{var c=this.editor.graph.isSelectionEmpty();d=null!=d?d:c;var e=b?null:this.editor.graph.background;e==mxConstants.NONE&&(e=null);null==e&&0==b&&(e=G?this.editor.graph.defaultPageBackgroundColor:"#ffffff");var k=this.editor.graph.getSvg(e,a,u,p,null,d,null,null,"blank"==x?"_blank":"self"==x?"_top":null,null,!0,G,z);f&&this.editor.graph.addSvgShadow(k);var l=
+this.getBaseFilename()+(g?".drawio":"")+".svg",n=mxUtils.bind(this,function(a){this.spinner.stop();g&&a.setAttribute("content",this.getFileData(!0,null,null,null,d,A,null,null,null,!1));var c='<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n'+mxUtils.getXml(a);this.isLocalFileSave()||c.length<=MAX_REQUEST_SIZE?this.saveData(l,"svg",c,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},
+mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(c)}))});this.editor.addFontCss(k);this.editor.graph.mathEnabled&&this.editor.addMathCss(k);m?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.editor.convertImages(k,n,this.thumbImageCache)):n(k)}catch(D){this.handleError(D)}};EditorUi.prototype.addRadiobox=function(a,b,d,f,g,m,u){return this.addCheckbox(a,d,f,g,m,u,!0,b)};EditorUi.prototype.addCheckbox=function(a,b,d,f,g,m,u,p){m=null!=m?m:!0;var c=document.createElement("input");
+c.style.marginRight="8px";c.style.marginTop="16px";c.setAttribute("type",u?"radio":"checkbox");u="geCheckbox-"+Editor.guid();c.id=u;null!=p&&c.setAttribute("name",p);d&&(c.setAttribute("checked","checked"),c.defaultChecked=!0);f&&c.setAttribute("disabled","disabled");m&&(a.appendChild(c),d=document.createElement("label"),mxUtils.write(d,b),d.setAttribute("for",u),a.appendChild(d),g||mxUtils.br(a));return c};EditorUi.prototype.addEditButton=function(a,b){var c=this.addCheckbox(a,mxResources.get("edit")+
+":",!0,null,!0);c.style.marginLeft="24px";var d=this.getCurrentFile(),e="";null!=d&&d.getMode()!=App.MODE_DEVICE&&d.getMode()!=App.MODE_BROWSER&&(e=window.location.href);var f=document.createElement("select");f.style.width="120px";f.style.marginLeft="8px";f.style.marginRight="10px";f.className="geBtn";d=document.createElement("option");d.setAttribute("value","blank");mxUtils.write(d,mxResources.get("makeCopy"));f.appendChild(d);d=document.createElement("option");d.setAttribute("value","custom");mxUtils.write(d,
+mxResources.get("custom")+"...");f.appendChild(d);a.appendChild(f);mxEvent.addListener(f,"change",mxUtils.bind(this,function(){if("custom"==f.value){var a=new FilenameDialog(this,e,mxResources.get("ok"),function(a){null!=a?e=a:f.value="blank"},mxResources.get("url"),null,null,null,null,function(){f.value="blank"});this.showDialog(a.container,300,80,!0,!1);a.init()}}));mxEvent.addListener(c,"change",mxUtils.bind(this,function(){c.checked&&(null==b||b.checked)?f.removeAttribute("disabled"):f.setAttribute("disabled",
+"disabled")}));mxUtils.br(a);return{getLink:function(){return c.checked?"blank"===f.value?"_blank":e:null},getEditInput:function(){return c},getEditSelect:function(){return f}}};EditorUi.prototype.addLinkSection=function(a,b){function c(){g.innerHTML='<div style="width:100%;height:100%;box-sizing:border-box;'+(null!=f&&f!=mxConstants.NONE?"border:1px solid black;background-color:"+f:"background-position:center center;background-repeat:no-repeat;background-image:url('"+Dialog.prototype.closeImage+
+"')")+';"></div>'}mxUtils.write(a,mxResources.get("links")+":");var d=document.createElement("select");d.style.width="100px";d.style.marginLeft="8px";d.style.marginRight="10px";d.className="geBtn";var e=document.createElement("option");e.setAttribute("value","auto");mxUtils.write(e,mxResources.get("automatic"));d.appendChild(e);e=document.createElement("option");e.setAttribute("value","blank");mxUtils.write(e,mxResources.get("openInNewWindow"));d.appendChild(e);e=document.createElement("option");
+e.setAttribute("value","self");mxUtils.write(e,mxResources.get("openInThisWindow"));d.appendChild(e);b&&(e=document.createElement("option"),e.setAttribute("value","frame"),mxUtils.write(e,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),d.appendChild(e));a.appendChild(d);mxUtils.write(a,mxResources.get("borderColor")+":");var f="#0000ff",g=null,g=mxUtils.button("",mxUtils.bind(this,function(a){this.pickColor(f||"none",function(a){f=a;c()});mxEvent.consume(a)}));c();g.style.padding=
+mxClient.IS_FF?"4px 2px 4px 2px":"4px";g.style.marginLeft="4px";g.style.height="22px";g.style.width="22px";g.style.position="relative";g.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";g.className="geColorBtn";a.appendChild(g);mxUtils.br(a);return{getColor:function(){return f},getTarget:function(){return d.value},focus:function(){d.focus()}}};EditorUi.prototype.createUrlParameters=function(a,b,d,f,g,m,p){p=null!=p?p:[];f&&("https://viewer.diagrams.net"==EditorUi.lightboxHost&&
+"1"!=urlParams.dev||p.push("lightbox=1"),"auto"!=a&&p.push("target="+a),null!=b&&b!=mxConstants.NONE&&p.push("highlight="+("#"==b.charAt(0)?b.substring(1):b)),null!=g&&0<g.length&&p.push("edit="+encodeURIComponent(g)),m&&p.push("layers=1"),this.editor.graph.foldingEnabled&&p.push("nav=1"));d&&null!=this.currentPage&&null!=this.pages&&this.currentPage!=this.pages[0]&&p.push("page-id="+this.currentPage.getId());return p};EditorUi.prototype.createLink=function(a,b,d,f,g,m,p,t,A,x){A=this.createUrlParameters(a,
+b,d,f,g,m,A);a=this.getCurrentFile();b=!0;null!=p?d="#U"+encodeURIComponent(p):(a=this.getCurrentFile(),t||null==a||a.constructor!=window.DriveFile?d="#R"+encodeURIComponent(d?this.getFileData(!0,null,null,null,null,null,null,!0,null,!1):Graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(d="#"+a.getHash(),b=!1));b&&null!=a&&null!=a.getTitle()&&a.getTitle()!=this.defaultFilename&&A.push("title="+encodeURIComponent(a.getTitle()));x&&1<d.length&&(A.push("open="+d.substring(1)),d="");return(f&&
+"1"!=urlParams.dev?EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?EditorUi.drawHost:"https://"+window.location.host)+"/"+(0<A.length?"?"+A.join("&"):"")+d};EditorUi.prototype.createHtml=function(a,b,d,f,g,m,p,t,A,x,G){this.getBasenames();var c={};""!=g&&g!=mxConstants.NONE&&(c.highlight=g);"auto"!==f&&(c.target=f);A||(c.lightbox=!1);c.nav=this.editor.graph.foldingEnabled;d=parseInt(d);isNaN(d)||100==d||(c.zoom=d/100);d=[];p&&(d.push("pages"),
c.resize=!0,null!=this.pages&&null!=this.currentPage&&(c.page=mxUtils.indexOf(this.pages,this.currentPage)));b&&(d.push("zoom"),c.resize=!0);t&&d.push("layers");0<d.length&&(A&&d.push("lightbox"),c.toolbar=d.join(" "));null!=x&&0<x.length&&(c.edit=x);null!=a?c.url=a:c.xml=this.getFileData(!0,null,null,null,null,!p);b='<div class="mxgraph" style="'+(m?"max-width:100%;":"")+(""!=d?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(c))+'"></div>';a=null!=a?"&fetch="+
encodeURIComponent(a):"";G(b,'<script type="text/javascript" src="'+(0<a.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":EditorUi.lightboxHost+"/embed2.js?")+a:"1"==urlParams.dev?"https://test.draw.io/js/viewer-static.min.js":window.VIEWER_URL?window.VIEWER_URL:EditorUi.lightboxHost+"/js/viewer-static.min.js")+'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=function(a,b,d,f){var c=document.createElement("div");c.style.whiteSpace="nowrap";var e=document.createElement("h3");mxUtils.write(e,
-mxResources.get("html"));e.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";c.appendChild(e);var g=document.createElement("div");g.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var k=document.createElement("input");k.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";k.setAttribute("value","url");k.setAttribute("type","radio");k.setAttribute("name","type-embedhtmldialog");e=k.cloneNode(!0);e.setAttribute("value",
-"copy");g.appendChild(e);var n=document.createElement("span");mxUtils.write(n,mxResources.get("includeCopyOfMyDiagram"));g.appendChild(n);mxUtils.br(g);g.appendChild(k);n=document.createElement("span");mxUtils.write(n,mxResources.get("publicDiagramUrl"));g.appendChild(n);var m=this.getCurrentFile();null==d&&null!=m&&m.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")),g.appendChild(n),
-mxEvent.addListener(n,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(m.getId())})));e.setAttribute("checked","checked");null==d&&k.setAttribute("disabled","disabled");c.appendChild(g);var p=this.addLinkSection(c),z=this.addCheckbox(c,mxResources.get("zoom"),!0,null,!0);mxUtils.write(c,":");var E=document.createElement("input");E.setAttribute("type","text");E.style.marginRight="16px";E.style.width="60px";E.style.marginLeft="4px";E.style.marginRight="12px";E.value=
-"100%";c.appendChild(E);var H=this.addCheckbox(c,mxResources.get("fit"),!0),g=null!=this.pages&&1<this.pages.length,K=K=this.addCheckbox(c,mxResources.get("allPages"),g,!g),F=this.addCheckbox(c,mxResources.get("layers"),!0),I=this.addCheckbox(c,mxResources.get("lightbox"),!0),C=this.addEditButton(c,I),M=C.getEditInput();M.style.marginBottom="16px";mxEvent.addListener(I,"change",function(){I.checked?M.removeAttribute("disabled"):M.setAttribute("disabled","disabled");M.checked&&I.checked?C.getEditSelect().removeAttribute("disabled"):
-C.getEditSelect().setAttribute("disabled","disabled")});a=new CustomDialog(this,c,mxUtils.bind(this,function(){f(k.checked?d:null,z.checked,E.value,p.getTarget(),p.getColor(),H.checked,K.checked,F.checked,I.checked,C.getLink())}),null,a,b);this.showDialog(a.container,340,384,!0,!0);e.focus()};EditorUi.prototype.showPublishLinkDialog=function(a,b,d,f,k,m){var c=document.createElement("div");c.style.whiteSpace="nowrap";var e=document.createElement("h3");mxUtils.write(e,a||mxResources.get("link"));e.style.cssText=
-"width:100%;text-align:center;margin-top:0px;margin-bottom:12px";c.appendChild(e);var g=this.getCurrentFile(),e="https://www.diagrams.net/doc/faq/publish-diagram-as-link";a=0;if(null!=g&&g.constructor==window.DriveFile&&!b){a=80;var e="https://www.diagrams.net/doc/faq/google-drive-publicly-publish-diagram",l=document.createElement("div");l.style.cssText="border-bottom:1px solid lightGray;padding-bottom:14px;padding-top:6px;margin-bottom:14px;text-align:center;";var n=document.createElement("div");
-n.style.whiteSpace="normal";mxUtils.write(n,mxResources.get("linkAccountRequired"));l.appendChild(n);n=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(g.getId())}));n.style.marginTop="12px";n.className="geBtn";l.appendChild(n);c.appendChild(l);n=document.createElement("a");n.style.paddingLeft="12px";n.style.color="gray";n.style.fontSize="11px";n.style.cursor="pointer";mxUtils.write(n,mxResources.get("check"));l.appendChild(n);mxEvent.addListener(n,"click",
+mxResources.get("html"));e.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";c.appendChild(e);var k=document.createElement("div");k.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var g=document.createElement("input");g.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";g.setAttribute("value","url");g.setAttribute("type","radio");g.setAttribute("name","type-embedhtmldialog");e=g.cloneNode(!0);e.setAttribute("value",
+"copy");k.appendChild(e);var n=document.createElement("span");mxUtils.write(n,mxResources.get("includeCopyOfMyDiagram"));k.appendChild(n);mxUtils.br(k);k.appendChild(g);n=document.createElement("span");mxUtils.write(n,mxResources.get("publicDiagramUrl"));k.appendChild(n);var m=this.getCurrentFile();null==d&&null!=m&&m.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")),k.appendChild(n),
+mxEvent.addListener(n,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(m.getId())})));e.setAttribute("checked","checked");null==d&&g.setAttribute("disabled","disabled");c.appendChild(k);var p=this.addLinkSection(c),z=this.addCheckbox(c,mxResources.get("zoom"),!0,null,!0);mxUtils.write(c,":");var E=document.createElement("input");E.setAttribute("type","text");E.style.marginRight="16px";E.style.width="60px";E.style.marginLeft="4px";E.style.marginRight="12px";E.value=
+"100%";c.appendChild(E);var H=this.addCheckbox(c,mxResources.get("fit"),!0),k=null!=this.pages&&1<this.pages.length,K=K=this.addCheckbox(c,mxResources.get("allPages"),k,!k),F=this.addCheckbox(c,mxResources.get("layers"),!0),I=this.addCheckbox(c,mxResources.get("lightbox"),!0),D=this.addEditButton(c,I),M=D.getEditInput();M.style.marginBottom="16px";mxEvent.addListener(I,"change",function(){I.checked?M.removeAttribute("disabled"):M.setAttribute("disabled","disabled");M.checked&&I.checked?D.getEditSelect().removeAttribute("disabled"):
+D.getEditSelect().setAttribute("disabled","disabled")});a=new CustomDialog(this,c,mxUtils.bind(this,function(){f(g.checked?d:null,z.checked,E.value,p.getTarget(),p.getColor(),H.checked,K.checked,F.checked,I.checked,D.getLink())}),null,a,b);this.showDialog(a.container,340,384,!0,!0);e.focus()};EditorUi.prototype.showPublishLinkDialog=function(a,b,d,f,g,m){var c=document.createElement("div");c.style.whiteSpace="nowrap";var e=document.createElement("h3");mxUtils.write(e,a||mxResources.get("link"));e.style.cssText=
+"width:100%;text-align:center;margin-top:0px;margin-bottom:12px";c.appendChild(e);var k=this.getCurrentFile(),e="https://www.diagrams.net/doc/faq/publish-diagram-as-link";a=0;if(null!=k&&k.constructor==window.DriveFile&&!b){a=80;var e="https://www.diagrams.net/doc/faq/google-drive-publicly-publish-diagram",l=document.createElement("div");l.style.cssText="border-bottom:1px solid lightGray;padding-bottom:14px;padding-top:6px;margin-bottom:14px;text-align:center;";var n=document.createElement("div");
+n.style.whiteSpace="normal";mxUtils.write(n,mxResources.get("linkAccountRequired"));l.appendChild(n);n=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(k.getId())}));n.style.marginTop="12px";n.className="geBtn";l.appendChild(n);c.appendChild(l);n=document.createElement("a");n.style.paddingLeft="12px";n.style.color="gray";n.style.fontSize="11px";n.style.cursor="pointer";mxUtils.write(n,mxResources.get("check"));l.appendChild(n);mxEvent.addListener(n,"click",
mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"))&&this.getPublicUrl(this.getCurrentFile(),mxUtils.bind(this,function(a){this.spinner.stop();a=new ErrorDialog(this,null,mxResources.get(null!=a?"diagramIsPublic":"diagramIsNotPublic"),mxResources.get("ok"));this.showDialog(a.container,300,80,!0,!1);a.init()}))}))}var q=null,p=null;if(null!=d||null!=f)a+=30,mxUtils.write(c,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%",c.appendChild(q),mxUtils.write(c,mxResources.get("height")+":"),p=document.createElement("input"),p.setAttribute("type","text"),p.style.width="50px",p.style.marginLeft="6px",p.style.marginBottom="10px",p.value=f+"px",c.appendChild(p),mxUtils.br(c);var H=this.addLinkSection(c,m);d=null!=this.pages&&1<this.pages.length;var K=null;if(null==g||g.constructor!=window.DriveFile||
-b)K=this.addCheckbox(c,mxResources.get("allPages"),d,!d);var F=this.addCheckbox(c,mxResources.get("lightbox"),!0,null,null,!m),I=this.addEditButton(c,F),C=I.getEditInput();m&&(C.style.marginLeft=F.style.marginLeft,F.style.display="none",a-=30);var M=this.addCheckbox(c,mxResources.get("layers"),!0);M.style.marginLeft=C.style.marginLeft;M.style.marginBottom="16px";M.style.marginTop="8px";mxEvent.addListener(F,"change",function(){F.checked?(M.removeAttribute("disabled"),C.removeAttribute("disabled")):
-(M.setAttribute("disabled","disabled"),C.setAttribute("disabled","disabled"));C.checked&&F.checked?I.getEditSelect().removeAttribute("disabled"):I.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,c,mxUtils.bind(this,function(){k(H.getTarget(),H.getColor(),null==K?!0:K.checked,F.checked,I.getLink(),M.checked,null!=q?q.value:null,null!=p?p.value:null)}),null,mxResources.get("create"),e);this.showDialog(b.container,340,254+a,!0,!0);null!=q?(q.focus(),mxClient.IS_GC||mxClient.IS_FF||
-5<=document.documentMode?q.select():document.execCommand("selectAll",!1,null)):H.focus()};EditorUi.prototype.showRemoteExportDialog=function(a,b,d,f,k){var c=document.createElement("div");c.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:"+(k?"10":"4")+"px";c.appendChild(e);if(k){mxUtils.write(c,mxResources.get("zoom")+":");var g=document.createElement("input");g.setAttribute("type",
-"text");g.style.marginRight="16px";g.style.width="60px";g.style.marginLeft="4px";g.style.marginRight="12px";g.value=this.lastExportZoom||"100%";c.appendChild(g);mxUtils.write(c,mxResources.get("borderWidth")+":");var l=document.createElement("input");l.setAttribute("type","text");l.style.marginRight="16px";l.style.width="60px";l.style.marginLeft="4px";l.value=this.lastExportBorder||"0";c.appendChild(l);mxUtils.br(c)}var n=this.addCheckbox(c,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),
-m=f?null:this.addCheckbox(c,mxResources.get("includeCopyOfMyDiagram"),!0),e=this.editor.graph,p=f?null:this.addCheckbox(c,mxResources.get("transparentBackground"),e.background==mxConstants.NONE||null==e.background);null!=p&&(p.style.marginBottom="16px");a=new CustomDialog(this,c,mxUtils.bind(this,function(){var a=parseInt(g.value)/100||1,c=parseInt(l.value)||0;d(!n.checked,null!=m?m.checked:!1,null!=p?p.checked:!1,a,c)}),null,a,b);this.showDialog(a.container,300,(k?25:0)+(f?125:210),!0,!0)};EditorUi.prototype.showExportDialog=
-function(a,b,d,f,k,m,p,t,A){p=null!=p?p:!0;var c=document.createElement("div");c.style.whiteSpace="nowrap";var e=this.editor.graph,g="jpeg"==t?196:300,l=document.createElement("h3");mxUtils.write(l,a);l.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";c.appendChild(l);mxUtils.write(c,mxResources.get("zoom")+":");var n=document.createElement("input");n.setAttribute("type","text");n.style.marginRight="16px";n.style.width="60px";n.style.marginLeft="4px";n.style.marginRight=
-"12px";n.value=this.lastExportZoom||"100%";c.appendChild(n);mxUtils.write(c,mxResources.get("borderWidth")+":");var q=document.createElement("input");q.setAttribute("type","text");q.style.marginRight="16px";q.style.width="60px";q.style.marginLeft="4px";q.value=this.lastExportBorder||"0";c.appendChild(q);mxUtils.br(c);var u=this.addCheckbox(c,mxResources.get("selectionOnly"),!1,e.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 C=document.createElement("select");C.style.marginTop="16px";C.style.marginLeft="8px";a=["selectionOnly","diagram","page"];for(l=0;l<a.length;l++)if(!e.isSelectionEmpty()||"selectionOnly"!=a[l]){var M=document.createElement("option");mxUtils.write(M,mxResources.get(a[l]));M.setAttribute("value",a[l]);C.appendChild(M)}A?(mxUtils.write(c,mxResources.get("size")+":"),c.appendChild(C),mxUtils.br(c),g+=26,mxEvent.addListener(C,
-"change",function(){"selectionOnly"==C.value&&(u.checked=!0)})):m&&(c.appendChild(I),mxUtils.write(c,mxResources.get("crop")),mxUtils.br(c),g+=26,mxEvent.addListener(u,"change",function(){u.checked?I.removeAttribute("disabled"):I.setAttribute("disabled","disabled")}));e.isSelectionEmpty()?A&&(u.style.display="none",u.nextSibling.style.display="none",u.nextSibling.nextSibling.style.display="none",g-=26):(C.value="diagram",I.setAttribute("checked","checked"),I.defaultChecked=!0,mxEvent.addListener(u,
-"change",function(){C.value=u.checked?"selectionOnly":"diagram"}));var U=this.addCheckbox(c,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=t),O=null;Editor.isDarkMode()&&(O=this.addCheckbox(c,mxResources.get("dark"),!0),g+=26);var N=this.addCheckbox(c,mxResources.get("shadow"),e.shadowVisible),v=document.createElement("input");v.style.marginTop="16px";v.style.marginRight="8px";v.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||v.setAttribute("disabled","disabled");
-b&&(c.appendChild(v),mxUtils.write(c,mxResources.get("embedImages")),mxUtils.br(c),g+=26);var D=null;if("png"==t||"jpeg"==t)D=this.addCheckbox(c,mxResources.get("grid"),!1,this.isOffline()||!this.canvasSupported,!1,!0),g+=26;var B=this.addCheckbox(c,mxResources.get("includeCopyOfMyDiagram"),p,null,null,"jpeg"!=t);B.style.marginBottom="16px";var J=document.createElement("select");J.style.maxWidth="260px";J.style.marginLeft="8px";J.style.marginRight="10px";J.className="geBtn";b=document.createElement("option");
-b.setAttribute("value","auto");mxUtils.write(b,mxResources.get("automatic"));J.appendChild(b);b=document.createElement("option");b.setAttribute("value","blank");mxUtils.write(b,mxResources.get("openInNewWindow"));J.appendChild(b);b=document.createElement("option");b.setAttribute("value","self");mxUtils.write(b,mxResources.get("openInThisWindow"));J.appendChild(b);"svg"==t&&(mxUtils.write(c,mxResources.get("links")+":"),c.appendChild(J),mxUtils.br(c),mxUtils.br(c),g+=26);d=new CustomDialog(this,c,
-mxUtils.bind(this,function(){this.lastExportBorder=q.value;this.lastExportZoom=n.value;k(n.value,U.checked,!u.checked,N.checked,B.checked,v.checked,q.value,I.checked,!1,J.value,null!=D?D.checked:null,null!=O?O.checked:null,C.value)}),null,d,f);this.showDialog(d.container,340,g,!0,!0,null,null,null,null,!0);n.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?n.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(a,b,d,f,k){var c=document.createElement("div");
-c.style.whiteSpace="nowrap";var e=this.editor.graph;if(null!=b){var g=document.createElement("h3");mxUtils.write(g,b);g.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";c.appendChild(g)}var l=this.addCheckbox(c,mxResources.get("fit"),!0),n=this.addCheckbox(c,mxResources.get("shadow"),e.shadowVisible&&f,!f),m=this.addCheckbox(c,d),p=this.addCheckbox(c,mxResources.get("lightbox"),!0),E=this.addEditButton(c,p),H=E.getEditInput(),K=1<e.model.getChildCount(e.model.getRoot()),
-F=this.addCheckbox(c,mxResources.get("layers"),K,!K);F.style.marginLeft=H.style.marginLeft;F.style.marginBottom="12px";F.style.marginTop="8px";mxEvent.addListener(p,"change",function(){p.checked?(K&&F.removeAttribute("disabled"),H.removeAttribute("disabled")):(F.setAttribute("disabled","disabled"),H.setAttribute("disabled","disabled"));H.checked&&p.checked?E.getEditSelect().removeAttribute("disabled"):E.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,c,mxUtils.bind(this,
-function(){a(l.checked,n.checked,m.checked,p.checked,E.getLink(),F.checked)}),null,mxResources.get("embed"),k);this.showDialog(b.container,280,280,!0,!0)};EditorUi.prototype.createEmbedImage=function(a,b,d,f,k,m,p,t){function c(c){var b=" ",l="";f&&(b=" 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!=g?"&page="+g:"")+(k?"&edit=_blank":"")+(m?"&layers=1":"")+"');}})(this);\"",l+="cursor:pointer;");a&&(l+="max-width:100%;");var n="";d&&(n=' width="'+Math.round(e.width)+'" height="'+Math.round(e.height)+'"');p('<img src="'+c+'"'+n+(""!=l?' style="'+l+'"':"")+b+"/>")}var e=this.editor.graph.getGraphBounds(),g=this.getSelectedPageIndex();if(this.isExportToCanvas())this.editor.exportToCanvas(mxUtils.bind(this,function(a){var b=f?this.getFileData(!0):null;a=
+q.style.marginRight="16px",q.style.width="50px",q.style.marginLeft="6px",q.style.marginRight="16px",q.style.marginBottom="10px",q.value="100%",c.appendChild(q),mxUtils.write(c,mxResources.get("height")+":"),p=document.createElement("input"),p.setAttribute("type","text"),p.style.width="50px",p.style.marginLeft="6px",p.style.marginBottom="10px",p.value=f+"px",c.appendChild(p),mxUtils.br(c);var H=this.addLinkSection(c,m);d=null!=this.pages&&1<this.pages.length;var K=null;if(null==k||k.constructor!=window.DriveFile||
+b)K=this.addCheckbox(c,mxResources.get("allPages"),d,!d);var F=this.addCheckbox(c,mxResources.get("lightbox"),!0,null,null,!m),I=this.addEditButton(c,F),D=I.getEditInput();m&&(D.style.marginLeft=F.style.marginLeft,F.style.display="none",a-=30);var M=this.addCheckbox(c,mxResources.get("layers"),!0);M.style.marginLeft=D.style.marginLeft;M.style.marginBottom="16px";M.style.marginTop="8px";mxEvent.addListener(F,"change",function(){F.checked?(M.removeAttribute("disabled"),D.removeAttribute("disabled")):
+(M.setAttribute("disabled","disabled"),D.setAttribute("disabled","disabled"));D.checked&&F.checked?I.getEditSelect().removeAttribute("disabled"):I.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,c,mxUtils.bind(this,function(){g(H.getTarget(),H.getColor(),null==K?!0:K.checked,F.checked,I.getLink(),M.checked,null!=q?q.value:null,null!=p?p.value:null)}),null,mxResources.get("create"),e);this.showDialog(b.container,340,254+a,!0,!0);null!=q?(q.focus(),mxClient.IS_GC||mxClient.IS_FF||
+5<=document.documentMode?q.select():document.execCommand("selectAll",!1,null)):H.focus()};EditorUi.prototype.showRemoteExportDialog=function(a,b,d,f,g){var c=document.createElement("div");c.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:"+(g?"10":"4")+"px";c.appendChild(e);if(g){mxUtils.write(c,mxResources.get("zoom")+":");var k=document.createElement("input");k.setAttribute("type",
+"text");k.style.marginRight="16px";k.style.width="60px";k.style.marginLeft="4px";k.style.marginRight="12px";k.value=this.lastExportZoom||"100%";c.appendChild(k);mxUtils.write(c,mxResources.get("borderWidth")+":");var l=document.createElement("input");l.setAttribute("type","text");l.style.marginRight="16px";l.style.width="60px";l.style.marginLeft="4px";l.value=this.lastExportBorder||"0";c.appendChild(l);mxUtils.br(c)}var n=this.addCheckbox(c,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),
+m=f?null:this.addCheckbox(c,mxResources.get("includeCopyOfMyDiagram"),Editor.defaultIncludeDiagram),e=this.editor.graph,p=f?null:this.addCheckbox(c,mxResources.get("transparentBackground"),e.background==mxConstants.NONE||null==e.background);null!=p&&(p.style.marginBottom="16px");a=new CustomDialog(this,c,mxUtils.bind(this,function(){var a=parseInt(k.value)/100||1,c=parseInt(l.value)||0;d(!n.checked,null!=m?m.checked:!1,null!=p?p.checked:!1,a,c)}),null,a,b);this.showDialog(a.container,300,(g?25:0)+
+(f?125:210),!0,!0)};EditorUi.prototype.showExportDialog=function(a,b,d,f,g,m,p,t,A){p=null!=p?p:Editor.defaultIncludeDiagram;var c=document.createElement("div");c.style.whiteSpace="nowrap";var e=this.editor.graph,k="jpeg"==t?196:300,l=document.createElement("h3");mxUtils.write(l,a);l.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";c.appendChild(l);mxUtils.write(c,mxResources.get("zoom")+":");var n=document.createElement("input");n.setAttribute("type","text");n.style.marginRight=
+"16px";n.style.width="60px";n.style.marginLeft="4px";n.style.marginRight="12px";n.value=this.lastExportZoom||"100%";c.appendChild(n);mxUtils.write(c,mxResources.get("borderWidth")+":");var q=document.createElement("input");q.setAttribute("type","text");q.style.marginRight="16px";q.style.width="60px";q.style.marginLeft="4px";q.value=this.lastExportBorder||"0";c.appendChild(q);mxUtils.br(c);var u=this.addCheckbox(c,mxResources.get("selectionOnly"),!1,e.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 D=document.createElement("select");D.style.marginTop="16px";D.style.marginLeft="8px";a=["selectionOnly","diagram","page"];for(l=0;l<a.length;l++)if(!e.isSelectionEmpty()||"selectionOnly"!=a[l]){var M=document.createElement("option");mxUtils.write(M,mxResources.get(a[l]));M.setAttribute("value",a[l]);D.appendChild(M)}A?(mxUtils.write(c,mxResources.get("size")+
+":"),c.appendChild(D),mxUtils.br(c),k+=26,mxEvent.addListener(D,"change",function(){"selectionOnly"==D.value&&(u.checked=!0)})):m&&(c.appendChild(I),mxUtils.write(c,mxResources.get("crop")),mxUtils.br(c),k+=26,mxEvent.addListener(u,"change",function(){u.checked?I.removeAttribute("disabled"):I.setAttribute("disabled","disabled")}));e.isSelectionEmpty()?A&&(u.style.display="none",u.nextSibling.style.display="none",u.nextSibling.nextSibling.style.display="none",k-=26):(D.value="diagram",I.setAttribute("checked",
+"checked"),I.defaultChecked=!0,mxEvent.addListener(u,"change",function(){D.value=u.checked?"selectionOnly":"diagram"}));var U=this.addCheckbox(c,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=t),O=null;Editor.isDarkMode()&&(O=this.addCheckbox(c,mxResources.get("dark"),!0),k+=26);var N=this.addCheckbox(c,mxResources.get("shadow"),e.shadowVisible),v=document.createElement("input");v.style.marginTop="16px";v.style.marginRight="8px";v.setAttribute("type","checkbox");!this.isOffline()&&
+this.canvasSupported||v.setAttribute("disabled","disabled");b&&(c.appendChild(v),mxUtils.write(c,mxResources.get("embedImages")),mxUtils.br(c),k+=26);var C=null;if("png"==t||"jpeg"==t)C=this.addCheckbox(c,mxResources.get("grid"),!1,this.isOffline()||!this.canvasSupported,!1,!0),k+=26;var B=this.addCheckbox(c,mxResources.get("includeCopyOfMyDiagram"),p,null,null,"jpeg"!=t);B.style.marginBottom="16px";var J=document.createElement("select");J.style.maxWidth="260px";J.style.marginLeft="8px";J.style.marginRight=
+"10px";J.className="geBtn";b=document.createElement("option");b.setAttribute("value","auto");mxUtils.write(b,mxResources.get("automatic"));J.appendChild(b);b=document.createElement("option");b.setAttribute("value","blank");mxUtils.write(b,mxResources.get("openInNewWindow"));J.appendChild(b);b=document.createElement("option");b.setAttribute("value","self");mxUtils.write(b,mxResources.get("openInThisWindow"));J.appendChild(b);"svg"==t&&(mxUtils.write(c,mxResources.get("links")+":"),c.appendChild(J),
+mxUtils.br(c),mxUtils.br(c),k+=26);d=new CustomDialog(this,c,mxUtils.bind(this,function(){this.lastExportBorder=q.value;this.lastExportZoom=n.value;g(n.value,U.checked,!u.checked,N.checked,B.checked,v.checked,q.value,I.checked,!1,J.value,null!=C?C.checked:null,null!=O?O.checked:null,D.value)}),null,d,f);this.showDialog(d.container,340,k,!0,!0,null,null,null,null,!0);n.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?n.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=
+function(a,b,d,f,g){var c=document.createElement("div");c.style.whiteSpace="nowrap";var e=this.editor.graph;if(null!=b){var k=document.createElement("h3");mxUtils.write(k,b);k.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";c.appendChild(k)}var l=this.addCheckbox(c,mxResources.get("fit"),!0),n=this.addCheckbox(c,mxResources.get("shadow"),e.shadowVisible&&f,!f),m=this.addCheckbox(c,d),p=this.addCheckbox(c,mxResources.get("lightbox"),!0),E=this.addEditButton(c,p),H=E.getEditInput(),
+K=1<e.model.getChildCount(e.model.getRoot()),F=this.addCheckbox(c,mxResources.get("layers"),K,!K);F.style.marginLeft=H.style.marginLeft;F.style.marginBottom="12px";F.style.marginTop="8px";mxEvent.addListener(p,"change",function(){p.checked?(K&&F.removeAttribute("disabled"),H.removeAttribute("disabled")):(F.setAttribute("disabled","disabled"),H.setAttribute("disabled","disabled"));H.checked&&p.checked?E.getEditSelect().removeAttribute("disabled"):E.getEditSelect().setAttribute("disabled","disabled")});
+b=new CustomDialog(this,c,mxUtils.bind(this,function(){a(l.checked,n.checked,m.checked,p.checked,E.getLink(),F.checked)}),null,mxResources.get("embed"),g);this.showDialog(b.container,280,280,!0,!0)};EditorUi.prototype.createEmbedImage=function(a,b,d,f,g,m,p,t){function c(c){var b=" ",l="";f&&(b=" onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+
+EditorUi.lightboxHost+"/?client=1"+(null!=k?"&page="+k:"")+(g?"&edit=_blank":"")+(m?"&layers=1":"")+"');}})(this);\"",l+="cursor:pointer;");a&&(l+="max-width:100%;");var n="";d&&(n=' width="'+Math.round(e.width)+'" height="'+Math.round(e.height)+'"');p('<img src="'+c+'"'+n+(""!=l?' style="'+l+'"':"")+b+"/>")}var e=this.editor.graph.getGraphBounds(),k=this.getSelectedPageIndex();if(this.isExportToCanvas())this.editor.exportToCanvas(mxUtils.bind(this,function(a){var b=f?this.getFileData(!0):null;a=
this.createImageDataUri(a,b,"png");c(a)}),null,null,null,mxUtils.bind(this,function(a){t({message:mxResources.get("unknownError")})}),null,!0,d?2:1,null,b,null,null,Editor.defaultBorder);else if(b=this.getFileData(!0),e.width*e.height<=MAX_AREA&&b.length<=MAX_REQUEST_SIZE){var l="";d&&(l="&w="+Math.round(2*e.width)+"&h="+Math.round(2*e.height));var n=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(f?"1":"0")+l+"&xml="+encodeURIComponent(b));n.send(mxUtils.bind(this,function(){200<=n.getStatus()&&
-299>=n.getStatus()?c("data:image/png;base64,"+n.getText()):t({message:mxResources.get("unknownError")})}))}else t({message:mxResources.get("drawingTooLarge")})};EditorUi.prototype.createEmbedSvg=function(a,b,d,f,k,m,p){var c=this.editor.graph.getSvg(null,null,null,null,null,null,null,null,null,null,!d),e=c.getElementsByTagName("a");if(null!=e)for(var g=0;g<e.length;g++){var l=e[g].getAttribute("href");null!=l&&"#"==l.charAt(0)&&"_blank"==e[g].getAttribute("target")&&e[g].removeAttribute("target")}f&&
-c.setAttribute("content",this.getFileData(!0));b&&this.editor.graph.addSvgShadow(c);if(d){var n=" ",q="";f&&(n="onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+EditorUi.lightboxHost+"/?client=1"+(k?"&edit=_blank":"")+(m?"&layers=1":
+299>=n.getStatus()?c("data:image/png;base64,"+n.getText()):t({message:mxResources.get("unknownError")})}))}else t({message:mxResources.get("drawingTooLarge")})};EditorUi.prototype.createEmbedSvg=function(a,b,d,f,g,m,p){var c=this.editor.graph.getSvg(null,null,null,null,null,null,null,null,null,null,!d),e=c.getElementsByTagName("a");if(null!=e)for(var k=0;k<e.length;k++){var l=e[k].getAttribute("href");null!=l&&"#"==l.charAt(0)&&"_blank"==e[k].getAttribute("target")&&e[k].removeAttribute("target")}f&&
+c.setAttribute("content",this.getFileData(!0));b&&this.editor.graph.addSvgShadow(c);if(d){var n=" ",q="";f&&(n="onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+EditorUi.lightboxHost+"/?client=1"+(g?"&edit=_blank":"")+(m?"&layers=1":
"")+"');}})(this);\"",q+="cursor:pointer;");a&&(q+="max-width:100%;");this.editor.convertImages(c,mxUtils.bind(this,function(a){p('<img src="'+Editor.createSvgDataUri(mxUtils.getXml(a))+'"'+(""!=q?' style="'+q+'"':"")+n+"/>")}))}else q="",f&&(b=this.getSelectedPageIndex(),c.setAttribute("onclick","(function(svg){var src=window.event.target||window.event.srcElement;while (src!=null&&src.nodeName.toLowerCase()!='a'){src=src.parentNode;}if(src==null){if(svg.wnd!=null&&!svg.wnd.closed){svg.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==svg.wnd){svg.wnd.postMessage(decodeURIComponent(svg.getAttribute('content')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);svg.wnd=window.open('"+
-EditorUi.lightboxHost+"/?client=1"+(null!=b?"&page="+b:"")+(k?"&edit=_blank":"")+(m?"&layers=1":"")+"');}}})(this);"),q+="cursor:pointer;"),a&&(a=parseInt(c.getAttribute("width")),k=parseInt(c.getAttribute("height")),c.setAttribute("viewBox","-0.5 -0.5 "+a+" "+k),q+="max-width:100%;max-height:"+k+"px;",c.removeAttribute("height")),""!=q&&c.setAttribute("style",q),this.editor.addFontCss(c),this.editor.graph.mathEnabled&&this.editor.addMathCss(c),p(mxUtils.getXml(c))};EditorUi.prototype.timeSince=function(a){a=
+EditorUi.lightboxHost+"/?client=1"+(null!=b?"&page="+b:"")+(g?"&edit=_blank":"")+(m?"&layers=1":"")+"');}}})(this);"),q+="cursor:pointer;"),a&&(a=parseInt(c.getAttribute("width")),g=parseInt(c.getAttribute("height")),c.setAttribute("viewBox","-0.5 -0.5 "+a+" "+g),q+="max-width:100%;max-height:"+g+"px;",c.removeAttribute("height")),""!=q&&c.setAttribute("style",q),this.editor.addFontCss(c),this.editor.graph.mathEnabled&&this.editor.addMathCss(c),p(mxUtils.getXml(c))};EditorUi.prototype.timeSince=function(a){a=
Math.floor((new Date-a)/1E3);var c=Math.floor(a/31536E3);if(1<c)return c+" "+mxResources.get("years");c=Math.floor(a/2592E3);if(1<c)return c+" "+mxResources.get("months");c=Math.floor(a/86400);if(1<c)return c+" "+mxResources.get("days");c=Math.floor(a/3600);if(1<c)return c+" "+mxResources.get("hours");c=Math.floor(a/60);return 1<c?c+" "+mxResources.get("minutes"):1==c?c+" "+mxResources.get("minute"):null};EditorUi.prototype.decodeNodeIntoGraph=function(a,b){if(null!=a){var c=null;if("diagram"==a.nodeName)c=
a;else if("mxfile"==a.nodeName){var d=a.getElementsByTagName("diagram");if(0<d.length){var c=d[0],e=b.getGlobalVariable;b.getGlobalVariable=function(a){return"page"==a?c.getAttribute("name")||mxResources.get("pageWithNumber",[1]):"pagenumber"==a?1:e.apply(this,arguments)}}}null!=c&&(a=Editor.parseDiagramNode(c))}d=this.editor.graph;try{this.editor.graph=b,this.editor.setGraphXml(a)}catch(q){}finally{this.editor.graph=d}return a};EditorUi.prototype.getPngFileProperties=function(a){var c=1,b=0;if(null!=
-a){if(a.hasAttribute("scale")){var d=parseFloat(a.getAttribute("scale"));!isNaN(d)&&0<d&&(c=d)}a.hasAttribute("border")&&(d=parseInt(a.getAttribute("border")),!isNaN(d)&&0<d&&(b=d))}return{scale:c,border:b}};EditorUi.prototype.getEmbeddedPng=function(a,b,d,f,k){try{var c=this.editor.graph,e=null!=c.themes&&"darkTheme"==c.defaultThemeName,g=null;if(null!=d&&0<d.length)c=this.createTemporaryGraph(this.editor.graph.getStylesheet()),document.body.appendChild(c.container),this.decodeNodeIntoGraph(this.editor.extractGraphModel(mxUtils.parseXml(d).documentElement,
-!0),c),g=d;else if(e||null!=this.pages&&this.currentPage!=this.pages[0]){var c=this.createTemporaryGraph(c.getStylesheet()),l=c.getGlobalVariable,n=this.pages[0];c.getGlobalVariable=function(a){return"page"==a?n.getName():"pagenumber"==a?1:l.apply(this,arguments)};document.body.appendChild(c.container);c.model.setRoot(n.root)}this.editor.exportToCanvas(mxUtils.bind(this,function(d){try{null==g&&(g=this.getFileData(!0,null,null,null,null,null,null,null,null,!1));var e=d.toDataURL("image/png"),e=Editor.writeGraphModelToPng(e,
-"tEXt","mxfile",encodeURIComponent(g));a(e.substring(e.lastIndexOf(",")+1));c!=this.editor.graph&&c.container.parentNode.removeChild(c.container)}catch(E){null!=b&&b(E)}}),null,null,null,mxUtils.bind(this,function(a){null!=b&&b(a)}),null,null,f,null,c.shadowVisible,null,c,k)}catch(G){null!=b&&b(G)}};EditorUi.prototype.getEmbeddedSvg=function(a,b,d,f,k,m,p,t,A,x,G,z,E){t=null!=t?t:!0;p=null!=A?A:b.background;p==mxConstants.NONE&&(p=null);m=b.getSvg(p,x,G,null,null,m,null,null,null,b.shadowVisible||
-z,null,E);(b.shadowVisible||z)&&b.addSvgShadow(m);null!=a&&m.setAttribute("content",a);null!=d&&m.setAttribute("resource",d);if(null!=k)this.embedFonts(m,mxUtils.bind(this,function(a){t?this.editor.convertImages(a,mxUtils.bind(this,function(a){k((f?"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+mxUtils.getXml(a))})):k((f?"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+
-mxUtils.getXml(a))}));else return(f?"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+mxUtils.getXml(m)};EditorUi.prototype.embedFonts=function(a,b){this.editor.loadFonts(mxUtils.bind(this,function(){try{null!=this.editor.resolvedFontCss&&this.editor.addFontCss(a,this.editor.resolvedFontCss),this.editor.embedExtFonts(mxUtils.bind(this,function(c){try{null!=c&&this.editor.addFontCss(a,c),b(a)}catch(n){b(a)}}))}catch(g){b(a)}}))};
-EditorUi.prototype.exportImage=function(a,b,d,f,k,m,p,t,A,x,G,z,E){A=null!=A?A:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var c=this.editor.graph.isSelectionEmpty();d=null!=d?d:c;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.editor.exportToCanvas(mxUtils.bind(this,function(a){this.spinner.stop();try{this.saveCanvas(a,k?this.getFileData(!0,null,null,null,d,t):null,A,null==this.pages||0==this.pages.length,G)}catch(F){this.handleError(F)}}),null,this.thumbImageCache,
-null,mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),null,d,a||1,b,f,null,null,m,p,x,z,E)}catch(K){this.spinner.stop(),this.handleError(K)}}};EditorUi.prototype.isCorsEnabledForUrl=function(a){return this.editor.isCorsEnabledForUrl(a)};EditorUi.prototype.importXml=function(a,b,d,f,k,m,p){b=null!=b?b:0;d=null!=d?d:0;var c=[];try{var e=this.editor.graph;if(null!=a&&0<a.length){e.model.beginUpdate();try{var g=mxUtils.parseXml(a);a={};var l=this.editor.extractGraphModel(g.documentElement,
+a){if(a.hasAttribute("scale")){var d=parseFloat(a.getAttribute("scale"));!isNaN(d)&&0<d&&(c=d)}a.hasAttribute("border")&&(d=parseInt(a.getAttribute("border")),!isNaN(d)&&0<d&&(b=d))}return{scale:c,border:b}};EditorUi.prototype.getEmbeddedPng=function(a,b,d,f,g){try{var c=this.editor.graph,e=null!=c.themes&&"darkTheme"==c.defaultThemeName,k=null;if(null!=d&&0<d.length)c=this.createTemporaryGraph(this.editor.graph.getStylesheet()),document.body.appendChild(c.container),this.decodeNodeIntoGraph(this.editor.extractGraphModel(mxUtils.parseXml(d).documentElement,
+!0),c),k=d;else if(e||null!=this.pages&&this.currentPage!=this.pages[0]){var c=this.createTemporaryGraph(c.getStylesheet()),l=c.getGlobalVariable,n=this.pages[0];c.getGlobalVariable=function(a){return"page"==a?n.getName():"pagenumber"==a?1:l.apply(this,arguments)};document.body.appendChild(c.container);c.model.setRoot(n.root)}this.editor.exportToCanvas(mxUtils.bind(this,function(d){try{null==k&&(k=this.getFileData(!0,null,null,null,null,null,null,null,null,!1));var e=d.toDataURL("image/png"),e=Editor.writeGraphModelToPng(e,
+"tEXt","mxfile",encodeURIComponent(k));a(e.substring(e.lastIndexOf(",")+1));c!=this.editor.graph&&c.container.parentNode.removeChild(c.container)}catch(E){null!=b&&b(E)}}),null,null,null,mxUtils.bind(this,function(a){null!=b&&b(a)}),null,null,f,null,c.shadowVisible,null,c,g)}catch(G){null!=b&&b(G)}};EditorUi.prototype.getEmbeddedSvg=function(a,b,d,f,g,m,p,t,A,x,G,z,E){t=null!=t?t:!0;p=null!=A?A:b.background;p==mxConstants.NONE&&(p=null);m=b.getSvg(p,x,G,null,null,m,null,null,null,b.shadowVisible||
+z,null,E);(b.shadowVisible||z)&&b.addSvgShadow(m);null!=a&&m.setAttribute("content",a);null!=d&&m.setAttribute("resource",d);if(null!=g)this.embedFonts(m,mxUtils.bind(this,function(a){t?this.editor.convertImages(a,mxUtils.bind(this,function(a){g((f?"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+mxUtils.getXml(a))})):g((f?"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+
+mxUtils.getXml(a))}));else return(f?"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+mxUtils.getXml(m)};EditorUi.prototype.embedFonts=function(a,b){this.editor.loadFonts(mxUtils.bind(this,function(){try{null!=this.editor.resolvedFontCss&&this.editor.addFontCss(a,this.editor.resolvedFontCss),this.editor.embedExtFonts(mxUtils.bind(this,function(c){try{null!=c&&this.editor.addFontCss(a,c),b(a)}catch(n){b(a)}}))}catch(k){b(a)}}))};
+EditorUi.prototype.exportImage=function(a,b,d,f,g,m,p,t,A,x,G,z,E){A=null!=A?A:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var c=this.editor.graph.isSelectionEmpty();d=null!=d?d:c;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.editor.exportToCanvas(mxUtils.bind(this,function(a){this.spinner.stop();try{this.saveCanvas(a,g?this.getFileData(!0,null,null,null,d,t):null,A,null==this.pages||0==this.pages.length,G)}catch(F){this.handleError(F)}}),null,this.thumbImageCache,
+null,mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),null,d,a||1,b,f,null,null,m,p,x,z,E)}catch(K){this.spinner.stop(),this.handleError(K)}}};EditorUi.prototype.isCorsEnabledForUrl=function(a){return this.editor.isCorsEnabledForUrl(a)};EditorUi.prototype.importXml=function(a,b,d,f,g,m,p){b=null!=b?b:0;d=null!=d?d:0;var c=[];try{var e=this.editor.graph;if(null!=a&&0<a.length){e.model.beginUpdate();try{var k=mxUtils.parseXml(a);a={};var l=this.editor.extractGraphModel(k.documentElement,
null!=this.pages);if(null!=l&&"mxfile"==l.nodeName&&null!=this.pages){var n=l.getElementsByTagName("diagram");if(1==n.length&&!m){if(l=Editor.parseDiagramNode(n[0]),null!=this.currentPage&&(a[n[0].getAttribute("id")]=this.currentPage.getId(),null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&this.currentPage.getName()==mxResources.get("pageWithNumber",[1]))){var q=n[0].getAttribute("name");null!=q&&""!=q&&this.editor.graph.model.execute(new RenamePage(this,this.currentPage,q))}}else if(0<
n.length){m=[];var u=0;null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&(a[n[0].getAttribute("id")]=this.pages[0].getId(),l=Editor.parseDiagramNode(n[0]),f=!1,u=1);for(;u<n.length;u++){var K=n[u].getAttribute("id");n[u].removeAttribute("id");var F=this.updatePageRoot(new DiagramPage(n[u]));a[K]=n[u].getAttribute("id");var I=this.pages.length;null==F.getName()&&F.setName(mxResources.get("pageWithNumber",[I+1]));e.model.execute(new ChangePage(this,F,F,I,!0));m.push(F)}this.updatePageLinks(a,
-m)}}if(null!=l&&"mxGraphModel"===l.nodeName&&(c=e.importGraphModel(l,b,d,f),null!=c))for(u=0;u<c.length;u++)this.updatePageLinksForCell(a,c[u]);p&&this.insertHandler(c,null,null,Graph.prototype.defaultVertexStyle,Graph.prototype.defaultEdgeStyle,!0,!0)}finally{e.model.endUpdate()}}}catch(C){if(k)throw C;this.handleError(C)}return c};EditorUi.prototype.updatePageLinks=function(a,b){for(var c=0;c<b.length;c++)this.updatePageLinksForCell(a,b[c].root)};EditorUi.prototype.updatePageLinksForCell=function(a,
-b){var c=document.createElement("div"),d=this.editor.graph,e=d.getLinkForCell(b);null!=e&&d.setLinkForCell(b,this.updatePageLink(a,e));if(d.isHtmlLabel(b)){c.innerHTML=d.sanitizeHtml(d.getLabel(b));for(var f=c.getElementsByTagName("a"),k=!1,m=0;m<f.length;m++)e=f[m].getAttribute("href"),null!=e&&(f[m].setAttribute("href",this.updatePageLink(a,e)),k=!0);k&&d.labelChanged(b,c.innerHTML)}for(m=0;m<d.model.getChildCount(b);m++)this.updatePageLinksForCell(a,d.model.getChildAt(b,m))};EditorUi.prototype.updatePageLink=
-function(a,b){if(Graph.isPageLink(b)){var c=a[b.substring(b.indexOf(",")+1)];b=null!=c?"data:page/id,"+c:null}else if("data:action/json,"==b.substring(0,17))try{var d=JSON.parse(b.substring(17));if(null!=d.actions){for(var e=0;e<d.actions.length;e++){var f=d.actions[e];if(null!=f.open&&Graph.isPageLink(f.open)){var k=f.open.substring(f.open.indexOf(",")+1),c=a[k];null!=c?f.open="data:page/id,"+c:null==this.getPageById(k)&&delete f.open}}b="data:action/json,"+JSON.stringify(d)}}catch(t){}return b};
-EditorUi.prototype.isRemoteVisioFormat=function(a){return/(\.v(sd|dx))($|\?)/i.test(a)||/(\.vs(s|x))($|\?)/i.test(a)};EditorUi.prototype.importVisio=function(a,b,d,f,k){f=null!=f?f:a.name;d=null!=d?d:mxUtils.bind(this,function(a){this.handleError(a)});var c=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio){var c=this.isRemoteVisioFormat(f);try{var e="UNKNOWN-VISIO",g=f.lastIndexOf(".");if(0<=g&&g<f.length)e=f.substring(g+1).toUpperCase();else{var l=f.lastIndexOf("/");0<=
+m)}}if(null!=l&&"mxGraphModel"===l.nodeName&&(c=e.importGraphModel(l,b,d,f),null!=c))for(u=0;u<c.length;u++)this.updatePageLinksForCell(a,c[u]);p&&this.insertHandler(c,null,null,Graph.prototype.defaultVertexStyle,Graph.prototype.defaultEdgeStyle,!0,!0)}finally{e.model.endUpdate()}}}catch(D){if(g)throw D;this.handleError(D)}return c};EditorUi.prototype.updatePageLinks=function(a,b){for(var c=0;c<b.length;c++)this.updatePageLinksForCell(a,b[c].root)};EditorUi.prototype.updatePageLinksForCell=function(a,
+b){var c=document.createElement("div"),d=this.editor.graph,e=d.getLinkForCell(b);null!=e&&d.setLinkForCell(b,this.updatePageLink(a,e));if(d.isHtmlLabel(b)){c.innerHTML=d.sanitizeHtml(d.getLabel(b));for(var f=c.getElementsByTagName("a"),g=!1,m=0;m<f.length;m++)e=f[m].getAttribute("href"),null!=e&&(f[m].setAttribute("href",this.updatePageLink(a,e)),g=!0);g&&d.labelChanged(b,c.innerHTML)}for(m=0;m<d.model.getChildCount(b);m++)this.updatePageLinksForCell(a,d.model.getChildAt(b,m))};EditorUi.prototype.updatePageLink=
+function(a,b){if(Graph.isPageLink(b)){var c=a[b.substring(b.indexOf(",")+1)];b=null!=c?"data:page/id,"+c:null}else if("data:action/json,"==b.substring(0,17))try{var d=JSON.parse(b.substring(17));if(null!=d.actions){for(var e=0;e<d.actions.length;e++){var f=d.actions[e];if(null!=f.open&&Graph.isPageLink(f.open)){var g=f.open.substring(f.open.indexOf(",")+1),c=a[g];null!=c?f.open="data:page/id,"+c:null==this.getPageById(g)&&delete f.open}}b="data:action/json,"+JSON.stringify(d)}}catch(t){}return b};
+EditorUi.prototype.isRemoteVisioFormat=function(a){return/(\.v(sd|dx))($|\?)/i.test(a)||/(\.vs(s|x))($|\?)/i.test(a)};EditorUi.prototype.importVisio=function(a,b,d,f,g){f=null!=f?f:a.name;d=null!=d?d:mxUtils.bind(this,function(a){this.handleError(a)});var c=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio){var c=this.isRemoteVisioFormat(f);try{var e="UNKNOWN-VISIO",k=f.lastIndexOf(".");if(0<=k&&k<f.length)e=f.substring(k+1).toUpperCase();else{var l=f.lastIndexOf("/");0<=
l&&l<f.length&&(f=f.substring(l+1))}EditorUi.logEvent({category:e+"-MS-IMPORT-FILE",action:"filename_"+f,label:c?"remote":"local"})}catch(z){}if(c)if(null==VSD_CONVERT_URL||this.isOffline())d({message:"conf"==this.getServiceName()?mxResources.get("vsdNoConfig"):mxResources.get("serviceUnavailableOrBlocked")});else{c=new FormData;c.append("file1",a,f);var n=new XMLHttpRequest;n.open("POST",VSD_CONVERT_URL+(/(\.vss|\.vsx)$/.test(f)?"?stencil=1":""));n.responseType="blob";this.addRemoteServiceSecurityCheck(n);
-null!=k&&n.setRequestHeader("x-convert-custom",k);n.onreadystatechange=mxUtils.bind(this,function(){if(4==n.readyState)if(200<=n.status&&299>=n.status)try{var a=n.response;if("text/xml"==a.type){var c=new FileReader;c.onload=mxUtils.bind(this,function(a){try{b(a.target.result)}catch(K){d({message:mxResources.get("errorLoadingFile")})}});c.readAsText(a)}else this.doImportVisio(a,b,d,f)}catch(H){d(H)}else try{""==n.responseType||"text"==n.responseType?d({message:n.responseText}):(c=new FileReader,c.onload=
+null!=g&&n.setRequestHeader("x-convert-custom",g);n.onreadystatechange=mxUtils.bind(this,function(){if(4==n.readyState)if(200<=n.status&&299>=n.status)try{var a=n.response;if("text/xml"==a.type){var c=new FileReader;c.onload=mxUtils.bind(this,function(a){try{b(a.target.result)}catch(K){d({message:mxResources.get("errorLoadingFile")})}});c.readAsText(a)}else this.doImportVisio(a,b,d,f)}catch(H){d(H)}else try{""==n.responseType||"text"==n.responseType?d({message:n.responseText}):(c=new FileReader,c.onload=
function(){d({message:JSON.parse(c.result).Message})},c.readAsText(n.response))}catch(H){d({})}});n.send(c)}else try{this.doImportVisio(a,b,d,f)}catch(z){d(z)}}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(a,b,d){d=null!=d?d:mxUtils.bind(this,function(a){this.handleError(a)});
var c=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportGraphML)try{this.doImportGraphML(a,b,d)}catch(l){d(l)}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportGraphML||this.loadingExtensions||this.isOffline(!0)?c():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",c))};EditorUi.prototype.exportVisio=function(a){var c=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof VsdxExport)try{(new VsdxExport(this)).exportCurrentDiagrams(a)||
-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)?c():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",c))};EditorUi.prototype.convertLucidChart=function(a,b,d){var c=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof window.LucidImporter){try{EditorUi.logEvent({category:"LUCIDCHART-IMPORT-FILE",
+this.handleError({message:mxResources.get("unknownError")})}catch(k){this.handleError(k)}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof VsdxExport||this.loadingExtensions||this.isOffline(!0)?c():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",c))};EditorUi.prototype.convertLucidChart=function(a,b,d){var c=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof window.LucidImporter){try{EditorUi.logEvent({category:"LUCIDCHART-IMPORT-FILE",
action:"size_"+a.length}),EditorUi.debug("convertLucidChart",a)}catch(l){}try{b(LucidImporter.importState(JSON.parse(a)))}catch(l){null!=window.console&&console.error(l),d(l)}}else d({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof window.LucidImporter||this.loadingExtensions||this.isOffline(!0)?window.setTimeout(c,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",c)})})})}):mxscript("js/extensions.min.js",c))};EditorUi.prototype.generateMermaidImage=function(a,b,d,f){var c=this,e=function(){try{this.loadingMermaid=!1,b=null!=b?b:EditorUi.defaultMermaidConfig,b.securityLevel="strict",b.startOnLoad=!1,mermaid.mermaidAPI.initialize(b),mermaid.mermaidAPI.render("geMermaidOutput-"+(new Date).getTime(),a,function(a){try{if(mxClient.IS_IE||mxClient.IS_IE11)a=
-a.replace(/ xmlns:\S*="http:\/\/www.w3.org\/XML\/1998\/namespace"/g,"").replace(/ (NS xml|\S*):space="preserve"/g,' xml:space="preserve"');var b=mxUtils.parseXml(a).getElementsByTagName("svg");if(0<b.length){var e=parseFloat(b[0].getAttribute("width")),g=parseFloat(b[0].getAttribute("height"));if(isNaN(e)||isNaN(g))try{var k=b[0].getAttribute("viewBox").split(/\s+/),e=parseFloat(k[2]),g=parseFloat(k[3])}catch(z){e=e||100,g=g||100}d(c.convertDataUri(Editor.createSvgDataUri(a)),e,g)}else f({message:mxResources.get("invalidInput")})}catch(z){f(z)}})}catch(u){f(u)}};
+a.replace(/ xmlns:\S*="http:\/\/www.w3.org\/XML\/1998\/namespace"/g,"").replace(/ (NS xml|\S*):space="preserve"/g,' xml:space="preserve"');var b=mxUtils.parseXml(a).getElementsByTagName("svg");if(0<b.length){var e=parseFloat(b[0].getAttribute("width")),k=parseFloat(b[0].getAttribute("height"));if(isNaN(e)||isNaN(k))try{var g=b[0].getAttribute("viewBox").split(/\s+/),e=parseFloat(g[2]),k=parseFloat(g[3])}catch(z){e=e||100,k=k||100}d(c.convertDataUri(Editor.createSvgDataUri(a)),e,k)}else f({message:mxResources.get("invalidInput")})}catch(z){f(z)}})}catch(u){f(u)}};
"undefined"!==typeof mermaid||this.loadingMermaid||this.isOffline(!0)?e():(this.loadingMermaid=!0,"1"==urlParams.dev?mxscript("js/mermaid/mermaid.min.js",e):mxscript("js/extensions.min.js",e))};EditorUi.prototype.generatePlantUmlImage=function(a,b,d,f){function c(a,c,b){c1=a>>2;c2=(a&3)<<4|c>>4;c3=(c&15)<<2|b>>6;c4=b&63;r="";r+=e(c1&63);r+=e(c2&63);r+=e(c3&63);return r+=e(c4&63)}function e(a){if(10>a)return String.fromCharCode(48+a);a-=10;if(26>a)return String.fromCharCode(65+a);a-=26;if(26>a)return String.fromCharCode(97+
-a);a-=26;return 0==a?"-":1==a?"_":"?"}var g=new XMLHttpRequest;g.open("GET",("txt"==b?PLANT_URL+"/txt/":"png"==b?PLANT_URL+"/png/":PLANT_URL+"/svg/")+function(a){r="";for(i=0;i<a.length;i+=3)r=i+2==a.length?r+c(a.charCodeAt(i),a.charCodeAt(i+1),0):i+1==a.length?r+c(a.charCodeAt(i),0,0):r+c(a.charCodeAt(i),a.charCodeAt(i+1),a.charCodeAt(i+2));return r}(Graph.arrayBufferToString(pako.deflateRaw(a))),!0);"txt"!=b&&(g.responseType="blob");g.onload=function(a){if(200<=this.status&&300>this.status)if("txt"==
-b)d(this.response);else{var c=new FileReader;c.readAsDataURL(this.response);c.onloadend=function(a){var b=new Image;b.onload=function(){try{var a=b.width,e=b.height;if(0==a&&0==e){var g=c.result,k=g.indexOf(","),l=decodeURIComponent(escape(atob(g.substring(k+1)))),n=mxUtils.parseXml(l).getElementsByTagName("svg");0<n.length&&(a=parseFloat(n[0].getAttribute("width")),e=parseFloat(n[0].getAttribute("height")))}d(c.result,a,e)}catch(C){f(C)}};b.src=c.result};c.onerror=function(a){f(a)}}else f(a)};g.onerror=
-function(a){f(a)};g.send()};EditorUi.prototype.insertAsPreText=function(a,b,d){var c=this.editor.graph,e=null;c.getModel().beginUpdate();try{e=c.insertVertex(null,null,"<pre>"+a+"</pre>",b,d,1,1,"text;html=1;align=left;verticalAlign=top;"),c.updateCellSize(e,!0)}finally{c.getModel().endUpdate()}return e};EditorUi.prototype.insertTextAt=function(a,b,d,f,k,m,p,t){m=null!=m?m:!0;p=null!=p?p:!0;if(null!=a)if(Graph.fileSupport&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a))this.parseFile(new Blob([a.replace(/\s+/g,
-" ")],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&200<=a.status&&299>=a.status&&this.editor.graph.setSelectionCells(this.insertTextAt(a.responseText,b,d,!0))}));else if("data:"==a.substring(0,5)||!this.isOffline()&&(k||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(a))){var c=this.editor.graph;if("data:application/pdf;base64,"==a.substring(0,28)){var e=Editor.extractGraphModelFromPdf(a);if(null!=e&&0<e.length)return this.importXml(e,b,d,m,!0,t)}if("data:image/png;base64,"==
-a.substring(0,22)&&(e=this.extractGraphModelFromPng(a),null!=e&&0<e.length))return this.importXml(e,b,d,m,!0,t);if("data:image/svg+xml;"==a.substring(0,19))try{e=null;"data:image/svg+xml;base64,"==a.substring(0,26)?(e=a.substring(a.indexOf(",")+1),e=window.atob&&!mxClient.IS_SF?atob(e):Base64.decode(e,!0)):e=decodeURIComponent(a.substring(a.indexOf(",")+1));var g=this.importXml(e,b,d,m,!0,t);if(0<g.length)return g}catch(E){}this.loadImage(a,mxUtils.bind(this,function(e){if("data:"==a.substring(0,
-5))this.resizeImage(e,a,mxUtils.bind(this,function(a,e,f){c.setSelectionCell(c.insertVertex(null,null,"",c.snap(b),c.snap(d),e,f,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(a)+";"))}),p,this.maxImageSize);else{var f=Math.min(1,Math.min(this.maxImageSize/e.width,this.maxImageSize/e.height)),g=Math.round(e.width*f);e=Math.round(e.height*f);c.setSelectionCell(c.insertVertex(null,null,"",c.snap(b),c.snap(d),
-g,e,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+a+";"))}}),mxUtils.bind(this,function(){var e=null;c.getModel().beginUpdate();try{e=c.insertVertex(c.getDefaultParent(),null,a,c.snap(b),c.snap(d),1,1,"text;"+(f?"html=1;":"")),c.updateCellSize(e),c.fireEvent(new mxEventObject("textInserted","cells",[e]))}finally{c.getModel().endUpdate()}c.setSelectionCell(e)}))}else{a=Graph.zapGremlins(mxUtils.trim(a));if(this.isCompatibleString(a))return this.importXml(a,
-b,d,m,null,t);if(0<a.length)if(this.isLucidChartData(a))this.convertLucidChart(a,mxUtils.bind(this,function(a){this.editor.graph.setSelectionCells(this.importXml(a,b,d,m,null,t))}),mxUtils.bind(this,function(a){this.handleError(a)}));else{c=this.editor.graph;k=null;c.getModel().beginUpdate();try{k=c.insertVertex(c.getDefaultParent(),null,"",c.snap(b),c.snap(d),1,1,"text;whiteSpace=wrap;"+(f?"html=1;":""));c.fireEvent(new mxEventObject("textInserted","cells",[k]));"<"==a.charAt(0)&&a.indexOf(">")==
-a.length-1&&(a=mxUtils.htmlEntities(a));a.length>this.maxTextBytes&&(a=a.substring(0,this.maxTextBytes)+"...");k.value=a;c.updateCellSize(k);if(0<this.maxTextWidth&&k.geometry.width>this.maxTextWidth){var l=c.getPreferredSizeForCell(k,this.maxTextWidth);k.geometry.width=l.width;k.geometry.height=l.height}Graph.isLink(k.value)&&c.setLinkForCell(k,k.value);k.geometry.width+=c.gridSize;k.geometry.height+=c.gridSize}finally{c.getModel().endUpdate()}return[k]}}return[]};EditorUi.prototype.formatFileSize=
+a);a-=26;return 0==a?"-":1==a?"_":"?"}var k=new XMLHttpRequest;k.open("GET",("txt"==b?PLANT_URL+"/txt/":"png"==b?PLANT_URL+"/png/":PLANT_URL+"/svg/")+function(a){r="";for(i=0;i<a.length;i+=3)r=i+2==a.length?r+c(a.charCodeAt(i),a.charCodeAt(i+1),0):i+1==a.length?r+c(a.charCodeAt(i),0,0):r+c(a.charCodeAt(i),a.charCodeAt(i+1),a.charCodeAt(i+2));return r}(Graph.arrayBufferToString(pako.deflateRaw(a))),!0);"txt"!=b&&(k.responseType="blob");k.onload=function(a){if(200<=this.status&&300>this.status)if("txt"==
+b)d(this.response);else{var c=new FileReader;c.readAsDataURL(this.response);c.onloadend=function(a){var b=new Image;b.onload=function(){try{var a=b.width,e=b.height;if(0==a&&0==e){var k=c.result,g=k.indexOf(","),l=decodeURIComponent(escape(atob(k.substring(g+1)))),n=mxUtils.parseXml(l).getElementsByTagName("svg");0<n.length&&(a=parseFloat(n[0].getAttribute("width")),e=parseFloat(n[0].getAttribute("height")))}d(c.result,a,e)}catch(D){f(D)}};b.src=c.result};c.onerror=function(a){f(a)}}else f(a)};k.onerror=
+function(a){f(a)};k.send()};EditorUi.prototype.insertAsPreText=function(a,b,d){var c=this.editor.graph,e=null;c.getModel().beginUpdate();try{e=c.insertVertex(null,null,"<pre>"+a+"</pre>",b,d,1,1,"text;html=1;align=left;verticalAlign=top;"),c.updateCellSize(e,!0)}finally{c.getModel().endUpdate()}return e};EditorUi.prototype.insertTextAt=function(a,b,d,f,g,m,p,t){m=null!=m?m:!0;p=null!=p?p:!0;if(null!=a)if(Graph.fileSupport&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a))this.parseFile(new Blob([a.replace(/\s+/g,
+" ")],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&200<=a.status&&299>=a.status&&this.editor.graph.setSelectionCells(this.insertTextAt(a.responseText,b,d,!0))}));else if("data:"==a.substring(0,5)||!this.isOffline()&&(g||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(a))){var c=this.editor.graph;if("data:application/pdf;base64,"==a.substring(0,28)){var e=Editor.extractGraphModelFromPdf(a);if(null!=e&&0<e.length)return this.importXml(e,b,d,m,!0,t)}if("data:image/png;base64,"==
+a.substring(0,22)&&(e=this.extractGraphModelFromPng(a),null!=e&&0<e.length))return this.importXml(e,b,d,m,!0,t);if("data:image/svg+xml;"==a.substring(0,19))try{e=null;"data:image/svg+xml;base64,"==a.substring(0,26)?(e=a.substring(a.indexOf(",")+1),e=window.atob&&!mxClient.IS_SF?atob(e):Base64.decode(e,!0)):e=decodeURIComponent(a.substring(a.indexOf(",")+1));var k=this.importXml(e,b,d,m,!0,t);if(0<k.length)return k}catch(E){}this.loadImage(a,mxUtils.bind(this,function(e){if("data:"==a.substring(0,
+5))this.resizeImage(e,a,mxUtils.bind(this,function(a,e,f){c.setSelectionCell(c.insertVertex(null,null,"",c.snap(b),c.snap(d),e,f,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(a)+";"))}),p,this.maxImageSize);else{var f=Math.min(1,Math.min(this.maxImageSize/e.width,this.maxImageSize/e.height)),k=Math.round(e.width*f);e=Math.round(e.height*f);c.setSelectionCell(c.insertVertex(null,null,"",c.snap(b),c.snap(d),
+k,e,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+a+";"))}}),mxUtils.bind(this,function(){var e=null;c.getModel().beginUpdate();try{e=c.insertVertex(c.getDefaultParent(),null,a,c.snap(b),c.snap(d),1,1,"text;"+(f?"html=1;":"")),c.updateCellSize(e),c.fireEvent(new mxEventObject("textInserted","cells",[e]))}finally{c.getModel().endUpdate()}c.setSelectionCell(e)}))}else{a=Graph.zapGremlins(mxUtils.trim(a));if(this.isCompatibleString(a))return this.importXml(a,
+b,d,m,null,t);if(0<a.length)if(this.isLucidChartData(a))this.convertLucidChart(a,mxUtils.bind(this,function(a){this.editor.graph.setSelectionCells(this.importXml(a,b,d,m,null,t))}),mxUtils.bind(this,function(a){this.handleError(a)}));else{c=this.editor.graph;g=null;c.getModel().beginUpdate();try{g=c.insertVertex(c.getDefaultParent(),null,"",c.snap(b),c.snap(d),1,1,"text;whiteSpace=wrap;"+(f?"html=1;":""));c.fireEvent(new mxEventObject("textInserted","cells",[g]));"<"==a.charAt(0)&&a.indexOf(">")==
+a.length-1&&(a=mxUtils.htmlEntities(a));a.length>this.maxTextBytes&&(a=a.substring(0,this.maxTextBytes)+"...");g.value=a;c.updateCellSize(g);if(0<this.maxTextWidth&&g.geometry.width>this.maxTextWidth){var l=c.getPreferredSizeForCell(g,this.maxTextWidth);g.geometry.width=l.width;g.geometry.height=l.height}Graph.isLink(g.value)&&c.setLinkForCell(g,g.value);g.geometry.width+=c.gridSize;g.geometry.height+=c.gridSize}finally{c.getModel().endUpdate()}return[g]}}return[]};EditorUi.prototype.formatFileSize=
function(a){var c=-1;do a/=1024,c++;while(1024<a);return Math.max(a,.1).toFixed(1)+" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[c]};EditorUi.prototype.convertDataUri=function(a){if("data:"==a.substring(0,5)){var c=a.indexOf(";");0<c&&(a=a.substring(0,c)+a.substring(a.indexOf(",",c+1)))}return a};EditorUi.prototype.isRemoteFileFormat=function(a,b){return/(\"contentType\":\s*\"application\/gliffy\+json\")/.test(a)};EditorUi.prototype.isLucidChartData=function(a){return null!=a&&('{"state":"{\\"Properties\\":'==
a.substring(0,26)||'{"Properties":'==a.substring(0,14))};EditorUi.prototype.importLocalFile=function(a,b){if(a&&Graph.fileSupport){if(null==this.importFileInputElt){var c=document.createElement("input");c.setAttribute("type","file");mxEvent.addListener(c,"change",mxUtils.bind(this,function(){null!=c.files&&(this.importFiles(c.files,null,null,this.maxImageSize),c.type="",c.type="file",c.value="")}));c.style.display="none";document.body.appendChild(c);this.importFileInputElt=c}this.importFileInputElt.click()}else{window.openNew=
!1;window.openKey="import";window.listBrowserFiles=mxUtils.bind(this,function(a,c){StorageFile.listFiles(this,"F",a,c)});window.openBrowserFile=mxUtils.bind(this,function(a,c,b){StorageFile.getFileContent(this,a,c,b)});window.deleteBrowserFile=mxUtils.bind(this,function(a,c,b){StorageFile.deleteFile(this,a,c,b)});if(!b){var d=Editor.useLocalStorage;Editor.useLocalStorage=!a}window.openFile=new OpenFile(mxUtils.bind(this,function(a){this.hideDialog(a)}));window.openFile.setConsumer(mxUtils.bind(this,
function(a,c){if(null!=c&&Graph.fileSupport&&/(\.v(dx|sdx?))($|\?)/i.test(c)){var b=new Blob([a],{type:"application/octet-stream"});this.importVisio(b,mxUtils.bind(this,function(a){this.importXml(a,0,0,!0)}),null,c)}else this.editor.graph.setSelectionCells(this.importXml(a,0,0,!0))}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:360,Editor.useLocalStorage?480:220,!0,!0,function(){window.openFile=null});if(!b){var e=this.dialog,f=e.close;this.dialog.close=mxUtils.bind(this,
-function(a){Editor.useLocalStorage=d;f.apply(e,arguments);a&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}};EditorUi.prototype.importZipFile=function(a,b,d){var c=this,e=mxUtils.bind(this,function(){this.loadingExtensions=!1;"undefined"!==typeof JSZip?JSZip.loadAsync(a).then(function(e){if(0==Object.keys(e.files).length)d();else{var f=0,g,k=!1;e.forEach(function(a,c){var e=c.name.toLowerCase();"diagram/diagram.xml"==e?(k=!0,c.async("string").then(function(a){0==a.indexOf("<mxfile ")?
-b(a):d()})):0==e.indexOf("versions/")&&(e=parseInt(e.substr(9)),e>f&&(f=e,g=c))});0<f?g.async("string").then(function(e){!c.isOffline()&&(new XMLHttpRequest).upload&&c.isRemoteFileFormat(e,a.name)?c.parseFile(new Blob([e],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&(200<=a.status&&299>=a.status?b(a.responseText):d())}),a.name):d()}):k||d()}},function(a){d(a)}):d()});"undefined"!==typeof JSZip||this.loadingExtensions||this.isOffline(!0)?e():(this.loadingExtensions=
-!0,mxscript("js/extensions.min.js",e))};EditorUi.prototype.importFile=function(a,b,d,f,k,m,p,t,A,x,G,z){x=null!=x?x:!0;var c=!1,e=null,g=mxUtils.bind(this,function(a){var c=null;null!=a&&"<mxlibrary"==a.substring(0,10)?this.loadLibrary(new LocalLibrary(this,a,p)):c=this.importXml(a,d,f,x,null,null!=z?mxEvent.isControlDown(z):null);null!=t&&t(c)});"image"==b.substring(0,5)?(A=!1,"image/png"==b.substring(0,9)&&(b=G?null:this.extractGraphModelFromPng(a),null!=b&&0<b.length&&(e=this.importXml(b,d,f,x,
-null,null!=z?mxEvent.isControlDown(z):null),A=!0)),A||(b=this.editor.graph,G=a.indexOf(";"),0<G&&(a=a.substring(0,G)+a.substring(a.indexOf(",",G+1))),x&&b.isGridEnabled()&&(d=b.snap(d),f=b.snap(f)),e=[b.insertVertex(null,null,"",d,f,k,m,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+a+";")])):/(\.*<graphml )/.test(a)?(c=!0,this.importGraphML(a,g)):null!=A&&null!=p&&(/(\.v(dx|sdx?))($|\?)/i.test(p)||/(\.vs(x|sx?))($|\?)/i.test(p))?
-(c=!0,this.importVisio(A,g)):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a,p)?(c=!0,this.parseFile(null!=A?A:new Blob([a],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&(200<=a.status&&299>=a.status?g(a.responseText):null!=t&&t(null))}),p)):0==a.indexOf("PK")&&null!=A?(c=!0,this.importZipFile(A,g,mxUtils.bind(this,function(){e=this.insertTextAt(this.validateFileData(a),d,f,!0,null,x);t(e)}))):/(\.v(sd|dx))($|\?)/i.test(p)||/(\.vs(s|x))($|\?)/i.test(p)||
-(e=this.insertTextAt(this.validateFileData(a),d,f,!0,null,x,null,null!=z?mxEvent.isControlDown(z):null));c||null==t||t(e);return e};EditorUi.prototype.importFiles=function(a,b,d,f,k,m,p,t,A,x,G,z,E){f=null!=f?f:this.maxImageSize;x=null!=x?x:this.maxImageBytes;var c=null!=b&&null!=d,e=!0;b=null!=b?b:0;d=null!=d?d:0;var g=!1;if(!mxClient.IS_CHROMEAPP&&null!=a)for(var l=G||this.resampleThreshold,n=0;n<a.length;n++)if("image/"==a[n].type.substring(0,6)&&a[n].size>l){g=!0;break}var q=mxUtils.bind(this,
-function(){var g=this.editor.graph,l=g.gridSize;k=null!=k?k:mxUtils.bind(this,function(a,b,d,e,f,g,k,l,n){try{return null!=a&&"<mxlibrary"==a.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,a,k)),null):this.importFile(a,b,d,e,f,g,k,l,n,c,z,E)}catch(ca){return this.handleError(ca),null}});m=null!=m?m:mxUtils.bind(this,function(a){g.setSelectionCells(a)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var n=a.length,q=n,u=[],C=mxUtils.bind(this,function(a,
-c){u[a]=c;if(0==--q){this.spinner.stop();if(null!=t)t(u);else{var b=[];g.getModel().beginUpdate();try{for(var d=0;d<u.length;d++){var e=u[d]();null!=e&&(b=b.concat(e))}}finally{g.getModel().endUpdate()}}m(b)}}),A=0;A<n;A++)mxUtils.bind(this,function(c){var n=a[c];if(null!=n){var m=new FileReader;m.onload=mxUtils.bind(this,function(a){if(null==p||p(n))if("image/"==n.type.substring(0,6))if("image/svg"==n.type.substring(0,9)){var m=Graph.clipSvgDataUri(a.target.result),q=m.indexOf(","),v=decodeURIComponent(escape(atob(m.substring(q+
-1)))),u=mxUtils.parseXml(v),v=u.getElementsByTagName("svg");if(0<v.length){var v=v[0],t=z?null:v.getAttribute("content");null!=t&&"<"!=t.charAt(0)&&"%"!=t.charAt(0)&&(t=unescape(window.atob?atob(t):Base64.decode(t,!0)));null!=t&&"%"==t.charAt(0)&&(t=decodeURIComponent(t));null==t||"<mxfile "!==t.substring(0,8)&&"<mxGraphModel "!==t.substring(0,14)?C(c,mxUtils.bind(this,function(){try{if(m.substring(0,q+1),null!=u){var a=u.getElementsByTagName("svg");if(0<a.length){var e=a[0],p=e.getAttribute("width"),
-v=e.getAttribute("height"),p=null!=p&&"%"!=p.charAt(p.length-1)?parseFloat(p):NaN,v=null!=v&&"%"!=v.charAt(v.length-1)?parseFloat(v):NaN,t=e.getAttribute("viewBox");if(null==t||0==t.length)e.setAttribute("viewBox","0 0 "+p+" "+v);else if(isNaN(p)||isNaN(v)){var x=t.split(" ");3<x.length&&(p=parseFloat(x[2]),v=parseFloat(x[3]))}m=Editor.createSvgDataUri(mxUtils.getXml(e));var z=Math.min(1,Math.min(f/Math.max(1,p)),f/Math.max(1,v)),C=k(m,n.type,b+c*l,d+c*l,Math.max(1,Math.round(p*z)),Math.max(1,Math.round(v*
-z)),n.name);if(isNaN(p)||isNaN(v)){var N=new Image;N.onload=mxUtils.bind(this,function(){p=Math.max(1,N.width);v=Math.max(1,N.height);C[0].geometry.width=p;C[0].geometry.height=v;e.setAttribute("viewBox","0 0 "+p+" "+v);m=Editor.createSvgDataUri(mxUtils.getXml(e));var a=m.indexOf(";");0<a&&(m=m.substring(0,a)+m.substring(m.indexOf(",",a+1)));g.setCellStyles("image",m,[C[0]])});N.src=Editor.createSvgDataUri(mxUtils.getXml(e))}return C}}}catch(ba){}return null})):C(c,mxUtils.bind(this,function(){return k(t,
-"text/xml",b+c*l,d+c*l,0,0,n.name)}))}else C(c,mxUtils.bind(this,function(){return null}))}else{v=!1;if("image/png"==n.type){var N=z?null:this.extractGraphModelFromPng(a.target.result);if(null!=N&&0<N.length){var B=new Image;B.src=a.target.result;C(c,mxUtils.bind(this,function(){return k(N,"text/xml",b+c*l,d+c*l,B.width,B.height,n.name)}));v=!0}}v||(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(a.target.result,mxUtils.bind(this,function(g){this.resizeImage(g,a.target.result,mxUtils.bind(this,function(a,g,m){C(c,mxUtils.bind(this,function(){if(null!=a&&a.length<x){var p=e&&this.isResampleImageSize(n.size,G)?Math.min(1,Math.min(f/g,f/m)):1;return k(a,n.type,b+c*l,d+c*l,Math.round(g*p),Math.round(m*p),n.name)}this.handleError({message:mxResources.get("imageTooBig")});
-return null}))}),e,f,G,n.size)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else m=a.target.result,k(m,n.type,b+c*l,d+c*l,240,160,n.name,function(a){C(c,function(){return a})},n)});/(\.v(dx|sdx?))($|\?)/i.test(n.name)||/(\.vs(x|sx?))($|\?)/i.test(n.name)?k(null,n.type,b+c*l,d+c*l,240,160,n.name,function(a){C(c,function(){return a})},n):"image"==n.type.substring(0,5)||"application/pdf"==n.type?m.readAsDataURL(n):m.readAsText(n)}})(A)});if(g){g=
-[];for(n=0;n<a.length;n++)g.push(a[n]);a=g;this.confirmImageResize(function(a){e=a;q()},A)}else q()};EditorUi.prototype.confirmImageResize=function(a,b){b=null!=b?b:!1;var c=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},d=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():null,e=function(d,e){if(d||b)mxSettings.setResizeImages(d?e:null),mxSettings.save();c();a(e)};null==d||b?this.showDialog((new ConfirmDialog(this,mxResources.get("resizeLargeImages"),
+function(a){Editor.useLocalStorage=d;f.apply(e,arguments);a&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}};EditorUi.prototype.importZipFile=function(a,b,d){var c=this,e=mxUtils.bind(this,function(){this.loadingExtensions=!1;"undefined"!==typeof JSZip?JSZip.loadAsync(a).then(function(e){if(0==Object.keys(e.files).length)d();else{var f=0,k,g=!1;e.forEach(function(a,c){var e=c.name.toLowerCase();"diagram/diagram.xml"==e?(g=!0,c.async("string").then(function(a){0==a.indexOf("<mxfile ")?
+b(a):d()})):0==e.indexOf("versions/")&&(e=parseInt(e.substr(9)),e>f&&(f=e,k=c))});0<f?k.async("string").then(function(e){!c.isOffline()&&(new XMLHttpRequest).upload&&c.isRemoteFileFormat(e,a.name)?c.parseFile(new Blob([e],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&(200<=a.status&&299>=a.status?b(a.responseText):d())}),a.name):d()}):g||d()}},function(a){d(a)}):d()});"undefined"!==typeof JSZip||this.loadingExtensions||this.isOffline(!0)?e():(this.loadingExtensions=
+!0,mxscript("js/extensions.min.js",e))};EditorUi.prototype.importFile=function(a,b,d,f,g,m,p,t,A,x,G,z){x=null!=x?x:!0;var c=!1,e=null,k=mxUtils.bind(this,function(a){var c=null;null!=a&&"<mxlibrary"==a.substring(0,10)?this.loadLibrary(new LocalLibrary(this,a,p)):c=this.importXml(a,d,f,x,null,null!=z?mxEvent.isControlDown(z):null);null!=t&&t(c)});"image"==b.substring(0,5)?(A=!1,"image/png"==b.substring(0,9)&&(b=G?null:this.extractGraphModelFromPng(a),null!=b&&0<b.length&&(e=this.importXml(b,d,f,x,
+null,null!=z?mxEvent.isControlDown(z):null),A=!0)),A||(b=this.editor.graph,G=a.indexOf(";"),0<G&&(a=a.substring(0,G)+a.substring(a.indexOf(",",G+1))),x&&b.isGridEnabled()&&(d=b.snap(d),f=b.snap(f)),e=[b.insertVertex(null,null,"",d,f,g,m,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+a+";")])):/(\.*<graphml )/.test(a)?(c=!0,this.importGraphML(a,k)):null!=A&&null!=p&&(/(\.v(dx|sdx?))($|\?)/i.test(p)||/(\.vs(x|sx?))($|\?)/i.test(p))?
+(c=!0,this.importVisio(A,k)):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a,p)?(c=!0,this.parseFile(null!=A?A:new Blob([a],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&(200<=a.status&&299>=a.status?k(a.responseText):null!=t&&t(null))}),p)):0==a.indexOf("PK")&&null!=A?(c=!0,this.importZipFile(A,k,mxUtils.bind(this,function(){e=this.insertTextAt(this.validateFileData(a),d,f,!0,null,x);t(e)}))):/(\.v(sd|dx))($|\?)/i.test(p)||/(\.vs(s|x))($|\?)/i.test(p)||
+(e=this.insertTextAt(this.validateFileData(a),d,f,!0,null,x,null,null!=z?mxEvent.isControlDown(z):null));c||null==t||t(e);return e};EditorUi.prototype.importFiles=function(a,b,d,f,g,m,p,t,A,x,G,z,E){f=null!=f?f:this.maxImageSize;x=null!=x?x:this.maxImageBytes;var c=null!=b&&null!=d,e=!0;b=null!=b?b:0;d=null!=d?d:0;var k=!1;if(!mxClient.IS_CHROMEAPP&&null!=a)for(var l=G||this.resampleThreshold,n=0;n<a.length;n++)if("image/"==a[n].type.substring(0,6)&&a[n].size>l){k=!0;break}var q=mxUtils.bind(this,
+function(){var k=this.editor.graph,l=k.gridSize;g=null!=g?g:mxUtils.bind(this,function(a,b,d,e,f,k,g,l,n){try{return null!=a&&"<mxlibrary"==a.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,a,g)),null):this.importFile(a,b,d,e,f,k,g,l,n,c,z,E)}catch(ba){return this.handleError(ba),null}});m=null!=m?m:mxUtils.bind(this,function(a){k.setSelectionCells(a)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var n=a.length,q=n,u=[],D=mxUtils.bind(this,function(a,
+c){u[a]=c;if(0==--q){this.spinner.stop();if(null!=t)t(u);else{var b=[];k.getModel().beginUpdate();try{for(var d=0;d<u.length;d++){var e=u[d]();null!=e&&(b=b.concat(e))}}finally{k.getModel().endUpdate()}}m(b)}}),A=0;A<n;A++)mxUtils.bind(this,function(c){var n=a[c];if(null!=n){var m=new FileReader;m.onload=mxUtils.bind(this,function(a){if(null==p||p(n))if("image/"==n.type.substring(0,6))if("image/svg"==n.type.substring(0,9)){var m=Graph.clipSvgDataUri(a.target.result),q=m.indexOf(","),u=decodeURIComponent(escape(atob(m.substring(q+
+1)))),v=mxUtils.parseXml(u),u=v.getElementsByTagName("svg");if(0<u.length){var u=u[0],t=z?null:u.getAttribute("content");null!=t&&"<"!=t.charAt(0)&&"%"!=t.charAt(0)&&(t=unescape(window.atob?atob(t):Base64.decode(t,!0)));null!=t&&"%"==t.charAt(0)&&(t=decodeURIComponent(t));null==t||"<mxfile "!==t.substring(0,8)&&"<mxGraphModel "!==t.substring(0,14)?D(c,mxUtils.bind(this,function(){try{if(m.substring(0,q+1),null!=v){var a=v.getElementsByTagName("svg");if(0<a.length){var e=a[0],p=e.getAttribute("width"),
+u=e.getAttribute("height"),p=null!=p&&"%"!=p.charAt(p.length-1)?parseFloat(p):NaN,u=null!=u&&"%"!=u.charAt(u.length-1)?parseFloat(u):NaN,t=e.getAttribute("viewBox");if(null==t||0==t.length)e.setAttribute("viewBox","0 0 "+p+" "+u);else if(isNaN(p)||isNaN(u)){var x=t.split(" ");3<x.length&&(p=parseFloat(x[2]),u=parseFloat(x[3]))}m=Editor.createSvgDataUri(mxUtils.getXml(e));var z=Math.min(1,Math.min(f/Math.max(1,p)),f/Math.max(1,u)),D=g(m,n.type,b+c*l,d+c*l,Math.max(1,Math.round(p*z)),Math.max(1,Math.round(u*
+z)),n.name);if(isNaN(p)||isNaN(u)){var N=new Image;N.onload=mxUtils.bind(this,function(){p=Math.max(1,N.width);u=Math.max(1,N.height);D[0].geometry.width=p;D[0].geometry.height=u;e.setAttribute("viewBox","0 0 "+p+" "+u);m=Editor.createSvgDataUri(mxUtils.getXml(e));var a=m.indexOf(";");0<a&&(m=m.substring(0,a)+m.substring(m.indexOf(",",a+1)));k.setCellStyles("image",m,[D[0]])});N.src=Editor.createSvgDataUri(mxUtils.getXml(e))}return D}}}catch(aa){}return null})):D(c,mxUtils.bind(this,function(){return g(t,
+"text/xml",b+c*l,d+c*l,0,0,n.name)}))}else D(c,mxUtils.bind(this,function(){return null}))}else{u=!1;if("image/png"==n.type){var N=z?null:this.extractGraphModelFromPng(a.target.result);if(null!=N&&0<N.length){var B=new Image;B.src=a.target.result;D(c,mxUtils.bind(this,function(){return g(N,"text/xml",b+c*l,d+c*l,B.width,B.height,n.name)}));u=!0}}u||(mxClient.IS_CHROMEAPP?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("dragAndDropNotSupported"),mxResources.get("cancel"),
+mxUtils.bind(this,function(){}),null,mxResources.get("ok"),mxUtils.bind(this,function(){this.actions.get("import").funct()}))):this.loadImage(a.target.result,mxUtils.bind(this,function(k){this.resizeImage(k,a.target.result,mxUtils.bind(this,function(a,k,m){D(c,mxUtils.bind(this,function(){if(null!=a&&a.length<x){var p=e&&this.isResampleImageSize(n.size,G)?Math.min(1,Math.min(f/k,f/m)):1;return g(a,n.type,b+c*l,d+c*l,Math.round(k*p),Math.round(m*p),n.name)}this.handleError({message:mxResources.get("imageTooBig")});
+return null}))}),e,f,G,n.size)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else m=a.target.result,g(m,n.type,b+c*l,d+c*l,240,160,n.name,function(a){D(c,function(){return a})},n)});/(\.v(dx|sdx?))($|\?)/i.test(n.name)||/(\.vs(x|sx?))($|\?)/i.test(n.name)?g(null,n.type,b+c*l,d+c*l,240,160,n.name,function(a){D(c,function(){return a})},n):"image"==n.type.substring(0,5)||"application/pdf"==n.type?m.readAsDataURL(n):m.readAsText(n)}})(A)});if(k){k=
+[];for(n=0;n<a.length;n++)k.push(a[n]);a=k;this.confirmImageResize(function(a){e=a;q()},A)}else q()};EditorUi.prototype.confirmImageResize=function(a,b){b=null!=b?b:!1;var c=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},d=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():null,e=function(d,e){if(d||b)mxSettings.setResizeImages(d?e:null),mxSettings.save();c();a(e)};null==d||b?this.showDialog((new ConfirmDialog(this,mxResources.get("resizeLargeImages"),
function(a){e(a,!0)},function(a){e(a,!1)},mxResources.get("resize"),mxResources.get("actualSize"),'<img style="margin-top:8px;" src="'+Editor.loResImage+'"/>','<img style="margin-top:8px;" src="'+Editor.hiResImage+'"/>',isLocalStorage||mxClient.IS_CHROMEAPP)).container,340,isLocalStorage||mxClient.IS_CHROMEAPP?220:200,!0,!0):e(!1,d)};EditorUi.prototype.parseFile=function(a,b,d){d=null!=d?d:a.name;var c=new FormData;c.append("format","xml");c.append("upfile",a,d);var e=new XMLHttpRequest;e.open("POST",
-OPEN_URL);e.onreadystatechange=function(){b(e)};e.send(c);try{EditorUi.logEvent({category:"GLIFFY-IMPORT-FILE",action:"size_"+a.size})}catch(q){}};EditorUi.prototype.isResampleImageSize=function(a,b){b=null!=b?b:this.resampleThreshold;return a>b};EditorUi.prototype.resizeImage=function(a,b,d,f,k,m,p){k=null!=k?k:this.maxImageSize;var c=Math.max(1,a.width),e=Math.max(1,a.height);if(f&&this.isResampleImageSize(null!=p?p:b.length,m))try{var g=Math.max(c/k,e/k);if(1<g){var l=Math.round(c/g),n=Math.round(e/
-g),q=document.createElement("canvas");q.width=l;q.height=n;q.getContext("2d").drawImage(a,0,0,l,n);var u=q.toDataURL();if(u.length<b.length){var K=document.createElement("canvas");K.width=l;K.height=n;var F=K.toDataURL();u!==F&&(b=u,c=l,e=n)}}}catch(I){}d(b,c,e)};EditorUi.prototype.extractGraphModelFromPng=function(a){return Editor.extractGraphModelFromPng(a)};EditorUi.prototype.loadImage=function(a,b,d){try{var c=new Image;c.onload=function(){c.width=0<c.width?c.width:120;c.height=0<c.height?c.height:
+OPEN_URL);e.onreadystatechange=function(){b(e)};e.send(c);try{EditorUi.logEvent({category:"GLIFFY-IMPORT-FILE",action:"size_"+a.size})}catch(q){}};EditorUi.prototype.isResampleImageSize=function(a,b){b=null!=b?b:this.resampleThreshold;return a>b};EditorUi.prototype.resizeImage=function(a,b,d,f,g,m,p){g=null!=g?g:this.maxImageSize;var c=Math.max(1,a.width),e=Math.max(1,a.height);if(f&&this.isResampleImageSize(null!=p?p:b.length,m))try{var k=Math.max(c/g,e/g);if(1<k){var l=Math.round(c/k),n=Math.round(e/
+k),q=document.createElement("canvas");q.width=l;q.height=n;q.getContext("2d").drawImage(a,0,0,l,n);var u=q.toDataURL();if(u.length<b.length){var K=document.createElement("canvas");K.width=l;K.height=n;var F=K.toDataURL();u!==F&&(b=u,c=l,e=n)}}}catch(I){}d(b,c,e)};EditorUi.prototype.extractGraphModelFromPng=function(a){return Editor.extractGraphModelFromPng(a)};EditorUi.prototype.loadImage=function(a,b,d){try{var c=new Image;c.onload=function(){c.width=0<c.width?c.width:120;c.height=0<c.height?c.height:
120;b(c)};null!=d&&(c.onerror=d);c.src=a}catch(l){if(null!=d)d(l);else throw l;}};var f=EditorUi.prototype.init;EditorUi.prototype.init=function(){mxStencilRegistry.allowEval=mxStencilRegistry.allowEval&&!this.isOfflineApp();"undefined"!==typeof window.mxSettings&&(this.formatWidth=mxSettings.getFormatWidth());var a=this,b=this.editor.graph;Editor.isDarkMode()&&(b.view.defaultGridColor=mxGraphView.prototype.defaultDarkGridColor);b.cellEditor.editPlantUmlData=function(c,d,e){var f=JSON.parse(e);d=
-new TextareaDialog(a,mxResources.get("plantUml")+":",f.data,function(d){null!=d&&a.spinner.spin(document.body,mxResources.get("inserting"))&&a.generatePlantUmlImage(d,f.format,function(e,g,k){a.spinner.stop();b.getModel().beginUpdate();try{if("txt"==f.format)b.labelChanged(c,"<pre>"+e+"</pre>"),b.updateCellSize(c,!0);else{b.setCellStyles("image",a.convertDataUri(e),[c]);var l=b.model.getGeometry(c);null!=l&&(l=l.clone(),l.width=g,l.height=k,b.cellsResized([c],[l],!1))}b.setAttributeForCell(c,"plantUmlData",
-JSON.stringify({data:d,format:f.format}))}finally{b.getModel().endUpdate()}},function(c){a.handleError(c)})},null,null,400,220);a.showDialog(d.container,420,300,!0,!0);d.init()};b.cellEditor.editMermaidData=function(c,d,e){var f=JSON.parse(e);d=new TextareaDialog(a,mxResources.get("mermaid")+":",f.data,function(d){null!=d&&a.spinner.spin(document.body,mxResources.get("inserting"))&&a.generateMermaidImage(d,f.config,function(e,g,k){a.spinner.stop();b.getModel().beginUpdate();try{b.setCellStyles("image",
-e,[c]);var l=b.model.getGeometry(c);null!=l&&(l=l.clone(),l.width=Math.max(l.width,g),l.height=Math.max(l.height,k),b.cellsResized([c],[l],!1));b.setAttributeForCell(c,"mermaidData",JSON.stringify({data:d,config:f.config},null,2))}finally{b.getModel().endUpdate()}},function(c){a.handleError(c)})},null,null,400,220);a.showDialog(d.container,420,300,!0,!0);d.init()};var d=b.cellEditor.startEditing;b.cellEditor.startEditing=function(c,e){try{var f=this.graph.getAttributeForCell(c,"plantUmlData");if(null!=
-f)this.editPlantUmlData(c,e,f);else if(f=this.graph.getAttributeForCell(c,"mermaidData"),null!=f)this.editMermaidData(c,e,f);else{var g=b.getCellStyle(c);"1"==mxUtils.getValue(g,"metaEdit","0")?a.showDataDialog(c):d.apply(this,arguments)}}catch(O){a.handleError(O)}};b.getLinkTitle=function(c){return a.getLinkTitle(c)};b.customLinkClicked=function(c){var b=!1;try{a.handleCustomLink(c),b=!0}catch(M){a.handleError(M)}return b};var k=b.parseBackgroundImage;b.parseBackgroundImage=function(a){var c=k.apply(this,
+new TextareaDialog(a,mxResources.get("plantUml")+":",f.data,function(d){null!=d&&a.spinner.spin(document.body,mxResources.get("inserting"))&&a.generatePlantUmlImage(d,f.format,function(e,k,g){a.spinner.stop();b.getModel().beginUpdate();try{if("txt"==f.format)b.labelChanged(c,"<pre>"+e+"</pre>"),b.updateCellSize(c,!0);else{b.setCellStyles("image",a.convertDataUri(e),[c]);var l=b.model.getGeometry(c);null!=l&&(l=l.clone(),l.width=k,l.height=g,b.cellsResized([c],[l],!1))}b.setAttributeForCell(c,"plantUmlData",
+JSON.stringify({data:d,format:f.format}))}finally{b.getModel().endUpdate()}},function(c){a.handleError(c)})},null,null,400,220);a.showDialog(d.container,420,300,!0,!0);d.init()};b.cellEditor.editMermaidData=function(c,d,e){var f=JSON.parse(e);d=new TextareaDialog(a,mxResources.get("mermaid")+":",f.data,function(d){null!=d&&a.spinner.spin(document.body,mxResources.get("inserting"))&&a.generateMermaidImage(d,f.config,function(e,k,g){a.spinner.stop();b.getModel().beginUpdate();try{b.setCellStyles("image",
+e,[c]);var l=b.model.getGeometry(c);null!=l&&(l=l.clone(),l.width=Math.max(l.width,k),l.height=Math.max(l.height,g),b.cellsResized([c],[l],!1));b.setAttributeForCell(c,"mermaidData",JSON.stringify({data:d,config:f.config},null,2))}finally{b.getModel().endUpdate()}},function(c){a.handleError(c)})},null,null,400,220);a.showDialog(d.container,420,300,!0,!0);d.init()};var d=b.cellEditor.startEditing;b.cellEditor.startEditing=function(c,e){try{var f=this.graph.getAttributeForCell(c,"plantUmlData");if(null!=
+f)this.editPlantUmlData(c,e,f);else if(f=this.graph.getAttributeForCell(c,"mermaidData"),null!=f)this.editMermaidData(c,e,f);else{var k=b.getCellStyle(c);"1"==mxUtils.getValue(k,"metaEdit","0")?a.showDataDialog(c):d.apply(this,arguments)}}catch(O){a.handleError(O)}};b.getLinkTitle=function(c){return a.getLinkTitle(c)};b.customLinkClicked=function(c){var b=!1;try{a.handleCustomLink(c),b=!0}catch(M){a.handleError(M)}return b};var g=b.parseBackgroundImage;b.parseBackgroundImage=function(a){var c=g.apply(this,
arguments);null!=c&&null!=c.src&&Graph.isPageLink(c.src)&&(c={originalSrc:c.src});return c};var l=b.setBackgroundImage;b.setBackgroundImage=function(c){null!=c&&null!=c.originalSrc&&(c=a.createImageForPageLink(c.originalSrc));l.apply(this,arguments)};this.editor.addListener("pageRenamed",mxUtils.bind(this,function(){b.refreshBackgroundImage()}));this.editor.addListener("pageMoved",mxUtils.bind(this,function(){b.refreshBackgroundImage()}));this.editor.addListener("pagesPatched",mxUtils.bind(this,function(a,
-c){var d=null!=b.backgroundImage?b.backgroundImage.originalSrc:null;if(null!=d){var e=d.indexOf(",");if(0<e)for(var d=d.substring(e+1),e=c.getProperty("patches"),f=0;f<e.length;f++)if(null!=e[f][EditorUi.DIFF_UPDATE][d]){b.refreshBackgroundImage();b.view.validateBackgroundImage();break}}}));var m=b.getBackgroundImageObject;b.getBackgroundImageObject=function(a){var c=m.apply(this,arguments);null!=c&&null!=c.originalSrc&&(c={src:c.originalSrc,width:c.width,height:c.height});return c};var p=this.clearDefaultStyle;
-this.clearDefaultStyle=function(){p.apply(this,arguments)};this.isOffline()||"undefined"===typeof window.EditDataDialog||(EditDataDialog.placeholderHelpLink="https://www.diagrams.net/doc/faq/predefined-placeholders");if(/viewer\.diagrams\.net$/.test(window.location.hostname)||/embed\.diagrams\.net$/.test(window.location.hostname))this.editor.editBlankUrl="https://app.diagrams.net/";var t=a.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(a){a=null!=a?a:"";"1"==urlParams.dev&&(a+=(0<a.length?
-"&":"?")+"dev=1");return t.apply(this,arguments)};var A=b.addClickHandler;b.addClickHandler=function(a,c,d){var e=c;c=function(a,c){if(null==c){var d=mxEvent.getSource(a);"a"==d.nodeName.toLowerCase()&&(c=d.getAttribute("href"))}null!=c&&b.isCustomLink(c)&&(mxEvent.isTouchEvent(a)||!mxEvent.isPopupTrigger(a))&&b.customLinkClicked(c)&&mxEvent.consume(a);null!=e&&e(a,c)};A.call(this,a,c,d)};f.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(b.view.canvas.ownerSVGElement,null,!0);
-if(null!=this.menus){var x=Menus.prototype.addPopupMenuEditItems;this.menus.addPopupMenuEditItems=function(c,b,d){a.editor.graph.isSelectionEmpty()?x.apply(this,arguments):a.menus.addMenuItems(c,"delete - cut copy copyAsImage - duplicate".split(" "),null,d)}}a.actions.get("print").funct=function(){a.showDialog((new PrintDialog(a)).container,360,null!=a.pages&&1<a.pages.length?450:370,!0,!0)};this.defaultFilename=mxResources.get("untitledDiagram");var G=b.getExportVariables;b.getExportVariables=function(){var c=
-G.apply(this,arguments),b=a.getCurrentFile();null!=b&&(c.filename=b.getTitle());c.pagecount=null!=a.pages?a.pages.length:1;c.page=null!=a.currentPage?a.currentPage.getName():"";c.pagenumber=null!=a.pages&&null!=a.currentPage?mxUtils.indexOf(a.pages,a.currentPage)+1:1;return c};var z=b.getGlobalVariable;b.getGlobalVariable=function(c){var b=a.getCurrentFile();return"filename"==c&&null!=b?b.getTitle():"page"==c&&null!=a.currentPage?a.currentPage.getName():"pagenumber"==c?null!=a.currentPage&&null!=
-a.pages?mxUtils.indexOf(a.pages,a.currentPage)+1:1:"pagecount"==c?null!=a.pages?a.pages.length:1:z.apply(this,arguments)};var E=b.labelLinkClicked;b.labelLinkClicked=function(a,c,d){var e=c.getAttribute("href");if(null==e||!b.isCustomLink(e)||!mxEvent.isTouchEvent(d)&&mxEvent.isPopupTrigger(d))E.apply(this,arguments);else{if(!b.isEnabled()||null!=a&&b.isCellLocked(a.cell))b.customLinkClicked(e),b.getRubberband().reset();mxEvent.consume(d)}};this.editor.getOrCreateFilename=function(){var c=a.defaultFilename,
-b=a.getCurrentFile();null!=b&&(c=null!=b.getTitle()?b.getTitle():c);return c};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,"insertRectangle"),this.keyHandler.bindAction(75,!0,"insertEllipse",!0),this.altShiftActions[83]="synchronize",this.installImagePasteHandler(),this.installNativeClipboardHandler();this.spinner=this.createSpinner(null,null,24);Graph.fileSupport&&b.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(a){var c=b.cellEditor.text2,d=null;null!=c&&(mxEvent.addListener(c,"dragleave",function(a){null!=d&&(d.parentNode.removeChild(d),d=null);a.stopPropagation();a.preventDefault()}),mxEvent.addListener(c,
-"dragover",mxUtils.bind(this,function(a){null==d&&(!mxClient.IS_IE||10<document.documentMode)&&(d=this.highlightElement(c));a.stopPropagation();a.preventDefault()})),mxEvent.addListener(c,"drop",mxUtils.bind(this,function(a){null!=d&&(d.parentNode.removeChild(d),d=null);if(0<a.dataTransfer.files.length)this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,function(a,c,d,e,f,g){b.insertImage(a,f,g)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var c=0;c<a.length;c++)a[c]()},
+c){var d=null!=b.backgroundImage?b.backgroundImage.originalSrc:null;if(null!=d){var e=d.indexOf(",");if(0<e)for(var d=d.substring(e+1),e=c.getProperty("patches"),f=0;f<e.length;f++)if(null!=e[f][EditorUi.DIFF_UPDATE][d]){b.refreshBackgroundImage();b.view.validateBackgroundImage();break}}}));var m=b.getBackgroundImageObject;b.getBackgroundImageObject=function(a,c){var b=m.apply(this,arguments);null==b||null==b.originalSrc||c||(b={src:b.originalSrc});return b};var p=this.clearDefaultStyle;this.clearDefaultStyle=
+function(){p.apply(this,arguments)};this.isOffline()||"undefined"===typeof window.EditDataDialog||(EditDataDialog.placeholderHelpLink="https://www.diagrams.net/doc/faq/predefined-placeholders");if(/viewer\.diagrams\.net$/.test(window.location.hostname)||/embed\.diagrams\.net$/.test(window.location.hostname))this.editor.editBlankUrl="https://app.diagrams.net/";var t=a.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(a){a=null!=a?a:"";"1"==urlParams.dev&&(a+=(0<a.length?"&":"?")+"dev=1");
+return t.apply(this,arguments)};var A=b.addClickHandler;b.addClickHandler=function(a,c,d){var e=c;c=function(a,c){if(null==c){var d=mxEvent.getSource(a);"a"==d.nodeName.toLowerCase()&&(c=d.getAttribute("href"))}null!=c&&b.isCustomLink(c)&&(mxEvent.isTouchEvent(a)||!mxEvent.isPopupTrigger(a))&&b.customLinkClicked(c)&&mxEvent.consume(a);null!=e&&e(a,c)};A.call(this,a,c,d)};f.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(b.view.canvas.ownerSVGElement,null,!0);if(null!=this.menus){var x=
+Menus.prototype.addPopupMenuEditItems;this.menus.addPopupMenuEditItems=function(c,b,d){a.editor.graph.isSelectionEmpty()?x.apply(this,arguments):a.menus.addMenuItems(c,"delete - cut copy copyAsImage - duplicate".split(" "),null,d)}}a.actions.get("print").funct=function(){a.showDialog((new PrintDialog(a)).container,360,null!=a.pages&&1<a.pages.length?450:370,!0,!0)};this.defaultFilename=mxResources.get("untitledDiagram");var G=b.getExportVariables;b.getExportVariables=function(){var c=G.apply(this,
+arguments),b=a.getCurrentFile();null!=b&&(c.filename=b.getTitle());c.pagecount=null!=a.pages?a.pages.length:1;c.page=null!=a.currentPage?a.currentPage.getName():"";c.pagenumber=null!=a.pages&&null!=a.currentPage?mxUtils.indexOf(a.pages,a.currentPage)+1:1;return c};var z=b.getGlobalVariable;b.getGlobalVariable=function(c){var b=a.getCurrentFile();return"filename"==c&&null!=b?b.getTitle():"page"==c&&null!=a.currentPage?a.currentPage.getName():"pagenumber"==c?null!=a.currentPage&&null!=a.pages?mxUtils.indexOf(a.pages,
+a.currentPage)+1:1:"pagecount"==c?null!=a.pages?a.pages.length:1:z.apply(this,arguments)};var E=b.labelLinkClicked;b.labelLinkClicked=function(a,c,d){var e=c.getAttribute("href");if(null==e||!b.isCustomLink(e)||!mxEvent.isTouchEvent(d)&&mxEvent.isPopupTrigger(d))E.apply(this,arguments);else{if(!b.isEnabled()||null!=a&&b.isCellLocked(a.cell))b.customLinkClicked(e),b.getRubberband().reset();mxEvent.consume(d)}};this.editor.getOrCreateFilename=function(){var c=a.defaultFilename,b=a.getCurrentFile();
+null!=b&&(c=null!=b.getTitle()?b.getTitle():c);return c};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,"insertRectangle"),
+this.keyHandler.bindAction(75,!0,"insertEllipse",!0),this.altShiftActions[83]="synchronize",this.installImagePasteHandler(),this.installNativeClipboardHandler();this.spinner=this.createSpinner(null,null,24);Graph.fileSupport&&b.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(a){var c=b.cellEditor.text2,d=null;null!=c&&(mxEvent.addListener(c,"dragleave",function(a){null!=d&&(d.parentNode.removeChild(d),d=null);a.stopPropagation();a.preventDefault()}),mxEvent.addListener(c,"dragover",
+mxUtils.bind(this,function(a){null==d&&(!mxClient.IS_IE||10<document.documentMode)&&(d=this.highlightElement(c));a.stopPropagation();a.preventDefault()})),mxEvent.addListener(c,"drop",mxUtils.bind(this,function(a){null!=d&&(d.parentNode.removeChild(d),d=null);if(0<a.dataTransfer.files.length)this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,function(a,c,d,e,f,k){b.insertImage(a,f,k)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var c=0;c<a.length;c++)a[c]()},
mxEvent.isControlDown(a));else if(0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")){var c=a.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(c)?this.loadImage(decodeURIComponent(c),mxUtils.bind(this,function(a){var d=Math.max(1,a.width);a=Math.max(1,a.height);var e=this.maxImageSize,e=Math.min(1,Math.min(e/Math.max(1,d)),e/Math.max(1,a));b.insertImage(decodeURIComponent(c),d*e,a*e)})):document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/plain"))}else 0<=
mxUtils.indexOf(a.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(a.dataTransfer.types,"text/plain")&&document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/plain"));a.stopPropagation();a.preventDefault()})))}));"undefined"!==typeof window.mxSettings&&(H=this.editor.graph.view,H.setUnit(mxSettings.getUnit()),H.addListener("unitChanged",function(a,c){mxSettings.setUnit(c.getProperty("unit"));mxSettings.save()}),
this.ruler=!this.canvasSupported||9==document.documentMode||"1"!=urlParams.ruler&&!mxSettings.isRulerOn()||this.editor.isChromelessView()&&!this.editor.editable?null:new mxDualRuler(this,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(a,c){if(0<this.editor.graph.getSelectionCount()){var b=this.editor.graph.getSelectionCell(),b=this.editor.graph.getModel().getStyle(b);
this.styleInput.value=b||"";this.styleInput.style.visibility="visible"}else this.styleInput.style.visibility="hidden"})));var K=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==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 F=null;mxEvent.addListener(b.container,"dragleave",function(a){b.isEnabled()&&(null!=F&&(F.parentNode.removeChild(F),
F=null),a.stopPropagation(),a.preventDefault())});mxEvent.addListener(b.container,"dragover",mxUtils.bind(this,function(a){null==F&&(!mxClient.IS_IE||10<document.documentMode)&&(F=this.highlightElement(b.container));null!=this.sidebar&&this.sidebar.hideTooltip();a.stopPropagation();a.preventDefault()}));mxEvent.addListener(b.container,"drop",mxUtils.bind(this,function(a){null!=F&&(F.parentNode.removeChild(F),F=null);if(b.isEnabled()){var c=mxUtils.convertPoint(b.container,mxEvent.getClientX(a),mxEvent.getClientY(a)),
-d=b.view.translate,e=b.view.scale,f=c.x/e-d.x,g=c.y/e-d.y;if(0<a.dataTransfer.files.length)mxEvent.isShiftDown(a)?this.openFiles(a.dataTransfer.files,!0):(mxEvent.isAltDown(a)&&(g=f=null),this.importFiles(a.dataTransfer.files,f,g,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(a),null,null,mxEvent.isShiftDown(a),a));else{mxEvent.isAltDown(a)&&(g=f=0);var k=0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")?a.dataTransfer.getData("text/uri-list"):null,c=this.extractGraphModelFromEvent(a,
-null!=this.pages);if(null!=c)b.setSelectionCells(this.importXml(c,f,g,!0));else if(0<=mxUtils.indexOf(a.dataTransfer.types,"text/html")){var l=a.dataTransfer.getData("text/html"),c=document.createElement("div");c.innerHTML=b.sanitizeHtml(l);var n=null,d=c.getElementsByTagName("img");null!=d&&1==d.length?(l=d[0].getAttribute("src"),null==l&&(l=d[0].getAttribute("srcset")),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(l)||(n=!0)):(d=c.getElementsByTagName("a"),null!=d&&1==d.length?l=d[0].getAttribute("href"):
-(c=c.getElementsByTagName("pre"),null!=c&&1==c.length&&(l=mxUtils.getTextContent(c[0]))));var m=!0,p=mxUtils.bind(this,function(){b.setSelectionCells(this.insertTextAt(l,f,g,!0,n,null,m,mxEvent.isControlDown(a)))});n&&null!=l&&l.length>this.resampleThreshold?this.confirmImageResize(function(a){m=a;p()},mxEvent.isControlDown(a)):p()}else null!=k&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(k)?this.loadImage(decodeURIComponent(k),mxUtils.bind(this,function(a){var c=Math.max(1,a.width);a=Math.max(1,a.height);
-var d=this.maxImageSize,d=Math.min(1,Math.min(d/Math.max(1,c)),d/Math.max(1,a));b.setSelectionCell(b.insertVertex(null,null,"",f,g,c*d,a*d,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+k+";"))}),mxUtils.bind(this,function(a){b.setSelectionCells(this.insertTextAt(k,f,g,!0))})):0<=mxUtils.indexOf(a.dataTransfer.types,"text/plain")&&b.setSelectionCells(this.insertTextAt(a.dataTransfer.getData("text/plain"),f,g,!0))}}a.stopPropagation();
-a.preventDefault()}),!1)}b.enableFlowAnimation=!0;this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();this.installSettings()};EditorUi.prototype.installImagePasteHandler=function(){if(!mxClient.IS_IE){var a=this.editor.graph;a.container.addEventListener("paste",mxUtils.bind(this,function(c){if(!mxEvent.isConsumed(c))try{for(var b=c.clipboardData||c.originalEvent.clipboardData,d=!1,e=0;e<b.types.length;e++)if("text/"===b.types[e].substring(0,5)){d=!0;break}if(!d){var f=b.items;for(index in f){var k=
-f[index];if("file"===k.kind){if(a.isEditing())this.importFiles([k.getAsFile()],0,0,this.maxImageSize,function(c,b,d,e,f,g){a.insertImage(c,f,g)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var c=0;c<a.length;c++)a[c]()});else{var m=this.editor.graph.getInsertPoint();this.importFiles([k.getAsFile()],m.x,m.y,this.maxImageSize);mxEvent.consume(c)}break}}}}catch(A){}}),!1)}};EditorUi.prototype.installNativeClipboardHandler=function(){function a(){window.setTimeout(function(){d.innerHTML=
+d=b.view.translate,e=b.view.scale,f=c.x/e-d.x,k=c.y/e-d.y;if(0<a.dataTransfer.files.length)mxEvent.isShiftDown(a)?this.openFiles(a.dataTransfer.files,!0):(mxEvent.isAltDown(a)&&(k=f=null),this.importFiles(a.dataTransfer.files,f,k,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(a),null,null,mxEvent.isShiftDown(a),a));else{mxEvent.isAltDown(a)&&(k=f=0);var g=0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")?a.dataTransfer.getData("text/uri-list"):null,c=this.extractGraphModelFromEvent(a,
+null!=this.pages);if(null!=c)b.setSelectionCells(this.importXml(c,f,k,!0));else if(0<=mxUtils.indexOf(a.dataTransfer.types,"text/html")){var l=a.dataTransfer.getData("text/html"),c=document.createElement("div");c.innerHTML=b.sanitizeHtml(l);var n=null,d=c.getElementsByTagName("img");null!=d&&1==d.length?(l=d[0].getAttribute("src"),null==l&&(l=d[0].getAttribute("srcset")),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(l)||(n=!0)):(d=c.getElementsByTagName("a"),null!=d&&1==d.length?l=d[0].getAttribute("href"):
+(c=c.getElementsByTagName("pre"),null!=c&&1==c.length&&(l=mxUtils.getTextContent(c[0]))));var m=!0,p=mxUtils.bind(this,function(){b.setSelectionCells(this.insertTextAt(l,f,k,!0,n,null,m,mxEvent.isControlDown(a)))});n&&null!=l&&l.length>this.resampleThreshold?this.confirmImageResize(function(a){m=a;p()},mxEvent.isControlDown(a)):p()}else null!=g&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(g)?this.loadImage(decodeURIComponent(g),mxUtils.bind(this,function(a){var c=Math.max(1,a.width);a=Math.max(1,a.height);
+var d=this.maxImageSize,d=Math.min(1,Math.min(d/Math.max(1,c)),d/Math.max(1,a));b.setSelectionCell(b.insertVertex(null,null,"",f,k,c*d,a*d,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+g+";"))}),mxUtils.bind(this,function(a){b.setSelectionCells(this.insertTextAt(g,f,k,!0))})):0<=mxUtils.indexOf(a.dataTransfer.types,"text/plain")&&b.setSelectionCells(this.insertTextAt(a.dataTransfer.getData("text/plain"),f,k,!0))}}a.stopPropagation();
+a.preventDefault()}),!1)}b.enableFlowAnimation=!0;this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();this.installSettings()};EditorUi.prototype.installImagePasteHandler=function(){if(!mxClient.IS_IE){var a=this.editor.graph;a.container.addEventListener("paste",mxUtils.bind(this,function(c){if(!mxEvent.isConsumed(c))try{for(var b=c.clipboardData||c.originalEvent.clipboardData,d=!1,e=0;e<b.types.length;e++)if("text/"===b.types[e].substring(0,5)){d=!0;break}if(!d){var f=b.items;for(index in f){var g=
+f[index];if("file"===g.kind){if(a.isEditing())this.importFiles([g.getAsFile()],0,0,this.maxImageSize,function(c,b,d,e,f,k){a.insertImage(c,f,k)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var c=0;c<a.length;c++)a[c]()});else{var m=this.editor.graph.getInsertPoint();this.importFiles([g.getAsFile()],m.x,m.y,this.maxImageSize);mxEvent.consume(c)}break}}}}catch(A){}}),!1)}};EditorUi.prototype.installNativeClipboardHandler=function(){function a(){window.setTimeout(function(){d.innerHTML=
"&nbsp;";d.focus();document.execCommand("selectAll",!1,null)},0)}var b=this.editor.graph,d=document.createElement("div");d.setAttribute("autocomplete","off");d.setAttribute("autocorrect","off");d.setAttribute("autocapitalize","off");d.setAttribute("spellcheck","false");d.style.textRendering="optimizeSpeed";d.style.fontFamily="monospace";d.style.wordBreak="break-all";d.style.background="transparent";d.style.color="transparent";d.style.position="absolute";d.style.whiteSpace="nowrap";d.style.overflow=
"hidden";d.style.display="block";d.style.fontSize="1";d.style.zIndex="-1";d.style.resize="none";d.style.outline="none";d.style.width="1px";d.style.height="1px";mxUtils.setOpacity(d,0);d.contentEditable=!0;d.innerHTML="&nbsp;";var f=!1;this.keyHandler.bindControlKey(88,null);this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86,null);mxEvent.addListener(document,"keydown",mxUtils.bind(this,function(a){var c=mxEvent.getSource(a);null==b.container||!b.isEnabled()||b.isMouseDown||
b.isEditing()||null!=this.dialog||"INPUT"==c.nodeName||"TEXTAREA"==c.nodeName||224!=a.keyCode&&(mxClient.IS_MAC||17!=a.keyCode)&&(!mxClient.IS_MAC||91!=a.keyCode&&93!=a.keyCode)||f||(d.style.left=b.container.scrollLeft+10+"px",d.style.top=b.container.scrollTop+10+"px",b.container.appendChild(d),f=!0,d.focus(),document.execCommand("selectAll",!1,null))}));mxEvent.addListener(document,"keyup",mxUtils.bind(this,function(a){var c=a.keyCode;window.setTimeout(mxUtils.bind(this,function(){!f||224!=c&&17!=
c&&91!=c&&93!=c||(f=!1,b.isEditing()||null!=this.dialog||null==b.container||b.container.focus(),d.parentNode.removeChild(d),null==this.dialog&&mxUtils.clearSelection())}),0)}));mxEvent.addListener(d,"copy",mxUtils.bind(this,function(c){if(b.isEnabled())try{mxClipboard.copy(b),this.copyCells(d),a()}catch(u){this.handleError(u)}}));mxEvent.addListener(d,"cut",mxUtils.bind(this,function(c){if(b.isEnabled())try{mxClipboard.copy(b),this.copyCells(d,!0),a()}catch(u){this.handleError(u)}}));mxEvent.addListener(d,
-"paste",mxUtils.bind(this,function(a){b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())&&(d.innerHTML="&nbsp;",d.focus(),null!=a.clipboardData&&this.pasteCells(a,d,!0,!0),mxEvent.isConsumed(a)||window.setTimeout(mxUtils.bind(this,function(){this.pasteCells(a,d,!1,!0)}),0))}),!0);var k=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==d?!0:k.apply(this,arguments)}};EditorUi.prototype.getLinkTitle=function(a){var c=Graph.prototype.getLinkTitle.apply(this,arguments);
+"paste",mxUtils.bind(this,function(a){b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())&&(d.innerHTML="&nbsp;",d.focus(),null!=a.clipboardData&&this.pasteCells(a,d,!0,!0),mxEvent.isConsumed(a)||window.setTimeout(mxUtils.bind(this,function(){this.pasteCells(a,d,!1,!0)}),0))}),!0);var g=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==d?!0:g.apply(this,arguments)}};EditorUi.prototype.getLinkTitle=function(a){var c=Graph.prototype.getLinkTitle.apply(this,arguments);
if(Graph.isPageLink(a)){var b=a.indexOf(",");0<b&&(c=this.getPageById(a.substring(b+1)),c=null!=c?c.getName():mxResources.get("pageNotFound"))}else"data:"==a.substring(0,5)&&(c=mxResources.get("action"));return c};EditorUi.prototype.handleCustomLink=function(a){if(Graph.isPageLink(a)){var c=a.indexOf(",");if(a=this.getPageById(a.substring(c+1)))this.selectPage(a);else throw Error(mxResources.get("pageNotFound")||"Page not found");}else this.editor.graph.handleCustomLink(a)};EditorUi.prototype.isSettingsEnabled=
function(){return"undefined"!==typeof window.mxSettings&&(isLocalStorage||mxClient.IS_CHROMEAPP)};EditorUi.prototype.installSettings=function(){if(this.isSettingsEnabled()){ColorDialog.recentColors=mxSettings.getRecentColors();if(isLocalStorage)try{window.addEventListener("storage",mxUtils.bind(this,function(a){a.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(a,b){if("1"!=urlParams["ext-fonts"])mxSettings.setCustomFonts(this.menus.customFonts);else{var c=b.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",
@@ -3569,79 +3572,79 @@ this.sidebar.showEntries("search")):(this.sidebar.showPalette("search",mxSetting
this.editor.exportToCanvas(mxUtils.bind(this,function(a,c){try{this.spinner.stop();var d=this.createImageDataUri(a,b,"png"),e=parseInt(c.getAttribute("width")),f=parseInt(c.getAttribute("height"));this.writeImageToClipboard(d,e,f,mxUtils.bind(this,function(a){this.handleError(a)}))}catch(A){this.handleError(A)}}),null,null,null,mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),null,null,null!=d?d:4,null==this.editor.graph.background||this.editor.graph.background==mxConstants.NONE,
null,null,null,10,null,null,!0,null,0<a.length?a:null)}catch(n){this.handleError(n)}};EditorUi.prototype.writeImageToClipboard=function(a,b,d,f){var c=this.base64ToBlob(a.substring(a.indexOf(",")+1),"image/png");a=new ClipboardItem({"image/png":c,"text/html":new Blob(['<img src="'+a+'" width="'+b+'" height="'+d+'">'],{type:"text/html"})});navigator.clipboard.write([a])["catch"](f)};EditorUi.prototype.copyCells=function(a,b){var c=this.editor.graph;if(c.isSelectionEmpty())a.innerHTML="";else{var d=
mxUtils.sortCells(c.model.getTopmostCells(c.getSelectionCells())),e=mxUtils.getXml(c.encodeCells(d));mxUtils.setTextContent(a,encodeURIComponent(e));b?(c.removeCells(d,!1),c.lastPasteXml=null):(c.lastPasteXml=e,c.pasteCounter=0);a.focus();document.execCommand("selectAll",!1,null)}};EditorUi.prototype.copyXml=function(){var a=null;if(Editor.enableNativeCipboard){var b=this.editor.graph;b.isSelectionEmpty()||(a=mxUtils.sortCells(b.getExportableCells(b.model.getTopmostCells(b.getSelectionCells()))),
-b=mxUtils.getXml(b.encodeCells(a)),navigator.clipboard.writeText(b))}return a};EditorUi.prototype.pasteXml=function(a,b,d,f){var c=this.editor.graph,e=null;c.lastPasteXml==a?c.pasteCounter++:(c.lastPasteXml=a,c.pasteCounter=0);var g=c.pasteCounter*c.gridSize;if(d||this.isCompatibleString(a))e=this.importXml(a,g,g),c.setSelectionCells(e);else if(b&&1==c.getSelectionCount()){g=c.getStartEditingCell(c.getSelectionCell(),f);if(/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(a)&&"image"==c.getCurrentCellStyle(g)[mxConstants.STYLE_SHAPE])c.setCellStyles(mxConstants.STYLE_IMAGE,
-a,[g]);else{c.model.beginUpdate();try{c.labelChanged(g,a),Graph.isLink(a)&&c.setLinkForCell(g,a)}finally{c.model.endUpdate()}}c.setSelectionCell(g)}else e=c.getInsertPoint(),c.isMouseInsertPoint()&&(g=0,c.lastPasteXml==a&&0<c.pasteCounter&&c.pasteCounter--),e=this.insertTextAt(a,e.x+g,e.y+g,!0),c.setSelectionCells(e);c.isSelectionEmpty()||(c.scrollCellToVisible(c.getSelectionCell()),null!=this.hoverIcons&&this.hoverIcons.update(c.view.getState(c.getSelectionCell())));return e};EditorUi.prototype.pasteCells=
-function(a,b,d,f){if(!mxEvent.isConsumed(a)){var c=b,e=!1;if(d&&null!=a.clipboardData&&a.clipboardData.getData){var g=a.clipboardData.getData("text/plain"),k=!1;if(null!=g&&0<g.length&&"%3CmxGraphModel%3E"==g.substring(0,18)){var n=decodeURIComponent(g);this.isCompatibleString(n)&&(k=!0,g=n)}k=k?null:a.clipboardData.getData("text/html");null!=k&&0<k.length?(c=this.parseHtmlData(k),e="text/plain"!=c.getAttribute("data-type")):null!=g&&0<g.length&&(c=document.createElement("div"),mxUtils.setTextContent(c,
-k))}g=c.getElementsByTagName("span");if(null!=g&&0<g.length&&"application/vnd.lucid.chart.objects"===g[0].getAttribute("data-lucid-type"))d=g[0].getAttribute("data-lucid-content"),null!=d&&0<d.length&&(this.convertLucidChart(d,mxUtils.bind(this,function(a){var c=this.editor.graph;c.lastPasteXml==a?c.pasteCounter++:(c.lastPasteXml=a,c.pasteCounter=0);var b=c.pasteCounter*c.gridSize;c.setSelectionCells(this.importXml(a,b,b));c.scrollCellToVisible(c.getSelectionCell())}),mxUtils.bind(this,function(a){this.handleError(a)})),
-mxEvent.consume(a));else{e=e?c.innerHTML:mxUtils.trim(null==c.innerText?mxUtils.getTextContent(c):c.innerText);k=!1;try{var m=e.lastIndexOf("%3E");0<=m&&m<e.length-3&&(e=e.substring(0,m+3))}catch(z){}try{g=c.getElementsByTagName("span"),n=null!=g&&0<g.length?mxUtils.trim(decodeURIComponent(g[0].textContent)):decodeURIComponent(e),this.isCompatibleString(n)&&(k=!0,e=n)}catch(z){}try{if(null!=e&&0<e.length){this.pasteXml(e,f,k,a);try{mxEvent.consume(a)}catch(z){}}else if(!d){var p=this.editor.graph;
+b=mxUtils.getXml(b.encodeCells(a)),navigator.clipboard.writeText(b))}return a};EditorUi.prototype.pasteXml=function(a,b,d,f){var c=this.editor.graph,e=null;c.lastPasteXml==a?c.pasteCounter++:(c.lastPasteXml=a,c.pasteCounter=0);var k=c.pasteCounter*c.gridSize;if(d||this.isCompatibleString(a))e=this.importXml(a,k,k),c.setSelectionCells(e);else if(b&&1==c.getSelectionCount()){k=c.getStartEditingCell(c.getSelectionCell(),f);if(/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(a)&&"image"==c.getCurrentCellStyle(k)[mxConstants.STYLE_SHAPE])c.setCellStyles(mxConstants.STYLE_IMAGE,
+a,[k]);else{c.model.beginUpdate();try{c.labelChanged(k,a),Graph.isLink(a)&&c.setLinkForCell(k,a)}finally{c.model.endUpdate()}}c.setSelectionCell(k)}else e=c.getInsertPoint(),c.isMouseInsertPoint()&&(k=0,c.lastPasteXml==a&&0<c.pasteCounter&&c.pasteCounter--),e=this.insertTextAt(a,e.x+k,e.y+k,!0),c.setSelectionCells(e);c.isSelectionEmpty()||(c.scrollCellToVisible(c.getSelectionCell()),null!=this.hoverIcons&&this.hoverIcons.update(c.view.getState(c.getSelectionCell())));return e};EditorUi.prototype.pasteCells=
+function(a,b,d,f){if(!mxEvent.isConsumed(a)){var c=b,e=!1;if(d&&null!=a.clipboardData&&a.clipboardData.getData){var k=a.clipboardData.getData("text/plain"),g=!1;if(null!=k&&0<k.length&&"%3CmxGraphModel%3E"==k.substring(0,18)){var n=decodeURIComponent(k);this.isCompatibleString(n)&&(g=!0,k=n)}g=g?null:a.clipboardData.getData("text/html");null!=g&&0<g.length?(c=this.parseHtmlData(g),e="text/plain"!=c.getAttribute("data-type")):null!=k&&0<k.length&&(c=document.createElement("div"),mxUtils.setTextContent(c,
+g))}k=c.getElementsByTagName("span");if(null!=k&&0<k.length&&"application/vnd.lucid.chart.objects"===k[0].getAttribute("data-lucid-type"))d=k[0].getAttribute("data-lucid-content"),null!=d&&0<d.length&&(this.convertLucidChart(d,mxUtils.bind(this,function(a){var c=this.editor.graph;c.lastPasteXml==a?c.pasteCounter++:(c.lastPasteXml=a,c.pasteCounter=0);var b=c.pasteCounter*c.gridSize;c.setSelectionCells(this.importXml(a,b,b));c.scrollCellToVisible(c.getSelectionCell())}),mxUtils.bind(this,function(a){this.handleError(a)})),
+mxEvent.consume(a));else{e=e?c.innerHTML:mxUtils.trim(null==c.innerText?mxUtils.getTextContent(c):c.innerText);g=!1;try{var m=e.lastIndexOf("%3E");0<=m&&m<e.length-3&&(e=e.substring(0,m+3))}catch(z){}try{k=c.getElementsByTagName("span"),n=null!=k&&0<k.length?mxUtils.trim(decodeURIComponent(k[0].textContent)):decodeURIComponent(e),this.isCompatibleString(n)&&(g=!0,e=n)}catch(z){}try{if(null!=e&&0<e.length){this.pasteXml(e,f,g,a);try{mxEvent.consume(a)}catch(z){}}else if(!d){var p=this.editor.graph;
p.lastPasteXml=null;p.pasteCounter=0}}catch(z){this.handleError(z)}}}b.innerHTML="&nbsp;"};EditorUi.prototype.addFileDropHandler=function(a){if(Graph.fileSupport)for(var c=null,b=0;b<a.length;b++)mxEvent.addListener(a[b],"dragleave",function(a){null!=c&&(c.parentNode.removeChild(c),c=null);a.stopPropagation();a.preventDefault()}),mxEvent.addListener(a[b],"dragover",mxUtils.bind(this,function(a){(this.editor.graph.isEnabled()||"1"!=urlParams.embed)&&null==c&&(!mxClient.IS_IE||10<document.documentMode&&
12>document.documentMode)&&(c=this.highlightElement());a.stopPropagation();a.preventDefault()})),mxEvent.addListener(a[b],"drop",mxUtils.bind(this,function(a){null!=c&&(c.parentNode.removeChild(c),c=null);if(this.editor.graph.isEnabled()||"1"!=urlParams.embed)if(0<a.dataTransfer.files.length)this.hideDialog(),"1"==urlParams.embed?this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,null,null,null,null,!mxEvent.isControlDown(a)&&!mxEvent.isShiftDown(a)):this.openFiles(a.dataTransfer.files,!0);
else{var b=this.extractGraphModelFromEvent(a);if(null==b){var d=null!=a.dataTransfer?a.dataTransfer:a.clipboardData;null!=d&&(10==document.documentMode||11==document.documentMode?b=d.getData("Text"):(b=null,b=0<=mxUtils.indexOf(d.types,"text/uri-list")?a.dataTransfer.getData("text/uri-list"):0<=mxUtils.indexOf(d.types,"text/html")?d.getData("text/html"):null,null!=b&&0<b.length?(d=document.createElement("div"),d.innerHTML=this.editor.graph.sanitizeHtml(b),d=d.getElementsByTagName("img"),0<d.length&&
(b=d[0].getAttribute("src"))):0<=mxUtils.indexOf(d.types,"text/plain")&&(b=d.getData("text/plain"))),null!=b&&("data:image/png;base64,"==b.substring(0,22)?(b=this.extractGraphModelFromPng(b),null!=b&&0<b.length&&this.openLocalFile(b,null,!0)):!this.isOffline()&&this.isRemoteFileFormat(b)?(new mxXmlRequest(OPEN_URL,"format=xml&data="+encodeURIComponent(b))).send(mxUtils.bind(this,function(a){200<=a.getStatus()&&299>=a.getStatus()&&this.openLocalFile(a.getText(),null,!0)})):/^https?:\/\//.test(b)&&
-(null==this.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(b):window.openWindow((mxClient.IS_CHROMEAPP?EditorUi.drawHost+"/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(b)))))}else this.openLocalFile(b,null,!0)}a.stopPropagation();a.preventDefault()}))};EditorUi.prototype.highlightElement=function(a){var c=0,b=0,d,f;if(null==a){f=document.body;var k=document.documentElement;d=(f.clientWidth||k.clientWidth)-3;f=Math.max(f.clientHeight||0,k.clientHeight)-
-3}else c=a.offsetTop,b=a.offsetLeft,d=a.clientWidth,f=a.clientHeight;k=document.createElement("div");k.style.zIndex=mxPopupMenu.prototype.zIndex+2;k.style.border="3px dotted rgb(254, 137, 12)";k.style.pointerEvents="none";k.style.position="absolute";k.style.top=c+"px";k.style.left=b+"px";k.style.width=Math.max(0,d-3)+"px";k.style.height=Math.max(0,f-3)+"px";null!=a&&a.parentNode==this.editor.graph.container?this.editor.graph.container.appendChild(k):document.body.appendChild(k);return k};EditorUi.prototype.stringToCells=
-function(a){a=mxUtils.parseXml(a);var c=this.editor.extractGraphModel(a.documentElement);a=[];if(null!=c){var b=new mxCodec(c.ownerDocument),d=new mxGraphModel;b.decode(c,d);c=d.getChildAt(d.getRoot(),0);for(b=0;b<d.getChildCount(c);b++)a.push(d.getChildAt(c,b))}return a};EditorUi.prototype.openFileHandle=function(a,b,d,f,k){if(null!=b&&0<b.length){!this.useCanvasForExport&&/(\.png)$/i.test(b)?b=b.substring(0,b.length-4)+".drawio":/(\.pdf)$/i.test(b)&&(b=b.substring(0,b.length-4)+".drawio");var c=
+(null==this.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(b):window.openWindow((mxClient.IS_CHROMEAPP?EditorUi.drawHost+"/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(b)))))}else this.openLocalFile(b,null,!0)}a.stopPropagation();a.preventDefault()}))};EditorUi.prototype.highlightElement=function(a){var c=0,b=0,d,f;if(null==a){f=document.body;var g=document.documentElement;d=(f.clientWidth||g.clientWidth)-3;f=Math.max(f.clientHeight||0,g.clientHeight)-
+3}else c=a.offsetTop,b=a.offsetLeft,d=a.clientWidth,f=a.clientHeight;g=document.createElement("div");g.style.zIndex=mxPopupMenu.prototype.zIndex+2;g.style.border="3px dotted rgb(254, 137, 12)";g.style.pointerEvents="none";g.style.position="absolute";g.style.top=c+"px";g.style.left=b+"px";g.style.width=Math.max(0,d-3)+"px";g.style.height=Math.max(0,f-3)+"px";null!=a&&a.parentNode==this.editor.graph.container?this.editor.graph.container.appendChild(g):document.body.appendChild(g);return g};EditorUi.prototype.stringToCells=
+function(a){a=mxUtils.parseXml(a);var c=this.editor.extractGraphModel(a.documentElement);a=[];if(null!=c){var b=new mxCodec(c.ownerDocument),d=new mxGraphModel;b.decode(c,d);c=d.getChildAt(d.getRoot(),0);for(b=0;b<d.getChildCount(c);b++)a.push(d.getChildAt(c,b))}return a};EditorUi.prototype.openFileHandle=function(a,b,d,f,g){if(null!=b&&0<b.length){!this.useCanvasForExport&&/(\.png)$/i.test(b)?b=b.substring(0,b.length-4)+".drawio":/(\.pdf)$/i.test(b)&&(b=b.substring(0,b.length-4)+".drawio");var c=
mxUtils.bind(this,function(a){b=0<=b.lastIndexOf(".")?b.substring(0,b.lastIndexOf("."))+".drawio":b+".drawio";if("<mxlibrary"==a.substring(0,10)){null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,f);try{this.loadLibrary(new LocalLibrary(this,a,b))}catch(A){this.handleError(A,mxResources.get("errorLoadingFile"))}}else this.openLocalFile(a,b,f)});if(/(\.v(dx|sdx?))($|\?)/i.test(b)||/(\.vs(x|sx?))($|\?)/i.test(b))this.importVisio(d,mxUtils.bind(this,
function(a){this.spinner.stop();c(a)}));else if(/(\.*<graphml )/.test(a))this.importGraphML(a,mxUtils.bind(this,function(a){this.spinner.stop();c(a)}));else if(Graph.fileSupport&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a,b))this.parseFile(d,mxUtils.bind(this,function(a){4==a.readyState&&(this.spinner.stop(),200<=a.status&&299>=a.status?c(a.responseText):this.handleError({message:mxResources.get(413==a.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))}));
else if(this.isLucidChartData(a))/(\.json)$/i.test(b)&&(b=b.substring(0,b.length-5)+".drawio"),this.convertLucidChart(a,mxUtils.bind(this,function(a){this.spinner.stop();this.openLocalFile(a,b,f)}),mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}));else if("<mxlibrary"==a.substring(0,10)){this.spinner.stop();null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,f);try{this.loadLibrary(new LocalLibrary(this,a,d.name))}catch(t){this.handleError(t,
-mxResources.get("errorLoadingFile"))}}else if(0==a.indexOf("PK"))this.importZipFile(d,mxUtils.bind(this,function(a){this.spinner.stop();c(a)}),mxUtils.bind(this,function(){this.spinner.stop();this.openLocalFile(a,b,f)}));else{if("image/png"==d.type.substring(0,9))a=this.extractGraphModelFromPng(a);else if("application/pdf"==d.type){var e=Editor.extractGraphModelFromPdf(a);null!=e&&(k=null,f=!0,a=e)}this.spinner.stop();this.openLocalFile(a,b,f,k,null!=k?d:null)}}};EditorUi.prototype.openFiles=function(a,
+mxResources.get("errorLoadingFile"))}}else if(0==a.indexOf("PK"))this.importZipFile(d,mxUtils.bind(this,function(a){this.spinner.stop();c(a)}),mxUtils.bind(this,function(){this.spinner.stop();this.openLocalFile(a,b,f)}));else{if("image/png"==d.type.substring(0,9))a=this.extractGraphModelFromPng(a);else if("application/pdf"==d.type){var e=Editor.extractGraphModelFromPdf(a);null!=e&&(g=null,f=!0,a=e)}this.spinner.stop();this.openLocalFile(a,b,f,g,null!=g?d:null)}}};EditorUi.prototype.openFiles=function(a,
b){if(this.spinner.spin(document.body,mxResources.get("loading")))for(var c=0;c<a.length;c++)mxUtils.bind(this,function(a){var c=new FileReader;c.onload=mxUtils.bind(this,function(c){try{this.openFileHandle(c.target.result,a.name,a,b)}catch(u){this.handleError(u)}});c.onerror=mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a);window.openFile=null});"image"!==a.type.substring(0,5)&&"application/pdf"!==a.type||"image/svg"===a.type.substring(0,9)?c.readAsText(a):c.readAsDataURL(a)})(a[c])};
-EditorUi.prototype.openLocalFile=function(a,b,d,f,k){var c=this.getCurrentFile(),e=mxUtils.bind(this,function(){window.openFile=null;if(null==b&&null!=this.getCurrentFile()&&this.isDiagramEmpty()){var c=mxUtils.parseXml(a);null!=c&&(this.editor.setGraphXml(c.documentElement),this.editor.graph.selectAll())}else this.fileLoaded(new LocalFile(this,a,b||this.defaultFilename,d,f,k))});if(null!=a&&0<a.length)null==c||!c.isModified()&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=f)?e():(mxClient.IS_CHROMEAPP||
+EditorUi.prototype.openLocalFile=function(a,b,d,f,g){var c=this.getCurrentFile(),e=mxUtils.bind(this,function(){window.openFile=null;if(null==b&&null!=this.getCurrentFile()&&this.isDiagramEmpty()){var c=mxUtils.parseXml(a);null!=c&&(this.editor.setGraphXml(c.documentElement),this.editor.graph.selectAll())}else this.fileLoaded(new LocalFile(this,a,b||this.defaultFilename,d,f,g))});if(null!=a&&0<a.length)null==c||!c.isModified()&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=f)?e():(mxClient.IS_CHROMEAPP||
EditorUi.isElectronApp||null!=f)&&null!=c&&c.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(a,b),window.openWindow(this.getUrl(),null,mxUtils.bind(this,function(){null!=c&&c.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 a={};if(null!=this.pages)for(var b=0;b<this.pages.length;b++)this.updatePageRoot(this.pages[b]),this.addBasenamesForCell(this.pages[b].root,a);else this.addBasenamesForCell(this.editor.graph.model.getRoot(),a);var b=[],d;for(d in a)b.push(d);return b};EditorUi.prototype.addBasenamesForCell=function(a,b){function c(a){if(null!=a){var c=a.lastIndexOf(".");0<c&&(a=a.substring(c+1,a.length));null==b[a]&&(b[a]=!0)}}var d=this.editor.graph,e=d.getCellStyle(a);
c(mxStencilRegistry.getBasenameForStencil(e[mxConstants.STYLE_SHAPE]));d.model.isEdge(a)&&(c(mxMarker.getPackageForType(e[mxConstants.STYLE_STARTARROW])),c(mxMarker.getPackageForType(e[mxConstants.STYLE_ENDARROW])));for(var e=d.model.getChildCount(a),f=0;f<e;f++)this.addBasenamesForCell(d.model.getChildAt(a,f),b)};EditorUi.prototype.setGraphEnabled=function(a){this.diagramContainer.style.visibility=a?"":"hidden";this.formatContainer.style.visibility=a?"":"hidden";this.sidebarFooterContainer.style.display=
a?"":"none";this.sidebarContainer.style.display=a?"":"none";this.hsplit.style.display=a?"":"none";this.editor.graph.setEnabled(a);null!=this.ruler&&(this.ruler.hRuler.container.style.visibility=a?"":"hidden",this.ruler.vRuler.container.style.visibility=a?"":"hidden");null!=this.tabContainer&&(this.tabContainer.style.visibility=a?"":"hidden");a||(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);(window.opener||window.parent)!=window&&("1"!=urlParams.spin||this.spinner.spin(document.body,mxResources.get("loading")))&&this.installMessageHandler(mxUtils.bind(this,function(a,b,d,f){this.spinner.stop();
-this.addEmbedButtons();this.setGraphEnabled(!0);if(null==a||0==a.length)a=this.emptyDiagramXml;this.setCurrentFile(new EmbedFile(this,a,{}));this.mode=App.MODE_EMBED;this.setFileData(a);if(f)try{var c=this.editor.graph;c.setGridEnabled(!1);c.pageVisible=!1;var e=c.model.cells,g;for(g in e){var k=e[g];null!=k&&null!=k.style&&(k.style+=";sketch=1;"+(-1==k.style.indexOf("fontFamily=")||-1<k.style.indexOf("fontFamily=Helvetica;")?"fontFamily=Architects Daughter;fontSource=https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter;":
+this.addEmbedButtons();this.setGraphEnabled(!0);if(null==a||0==a.length)a=this.emptyDiagramXml;this.setCurrentFile(new EmbedFile(this,a,{}));this.mode=App.MODE_EMBED;this.setFileData(a);if(f)try{var c=this.editor.graph;c.setGridEnabled(!1);c.pageVisible=!1;var e=c.model.cells,k;for(k in e){var g=e[k];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(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!=d?d:!1;this.updateUi();window.self!==window.top&&window.focus();null!=this.format&&this.format.refresh()}))};EditorUi.prototype.showLayersDialog=function(){1<this.editor.graph.getModel().getChildCount(this.editor.graph.getModel().getRoot())&&(null==this.actions.layersWindow?
this.actions.get("layers").funct():this.actions.layersWindow.window.setVisible(!0))};EditorUi.prototype.getPublicUrl=function(a,b){null!=a?a.getPublicUrl(b):b(null)};EditorUi.prototype.createLoadMessage=function(a){var c=this.editor.graph;return{event:a,pageVisible:c.pageVisible,translate:c.view.translate,bounds:c.getGraphBounds(),currentPage:this.getSelectedPageIndex(),scale:c.view.scale,page:c.view.getBackgroundPageBounds()}};EditorUi.prototype.installMessageHandler=function(a){var c=null,b=!1,
-d=!1,f=null,k=mxUtils.bind(this,function(a,c){this.editor.modified&&"0"!=urlParams.modified?null!=urlParams.modified&&this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(urlParams.modified))):this.editor.setStatus("")});this.editor.graph.model.addListener(mxEvent.CHANGE,k);mxEvent.addListener(window,"message",mxUtils.bind(this,function(e){if(e.source==(window.opener||window.parent)){var g=e.data,k=mxUtils.bind(this,function(a){if(null!=a&&"function"===typeof a.charAt&&"<"!=a.charAt(0))try{"data:image/png;base64,"==
+d=!1,f=null,g=mxUtils.bind(this,function(a,c){this.editor.modified&&"0"!=urlParams.modified?null!=urlParams.modified&&this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(urlParams.modified))):this.editor.setStatus("")});this.editor.graph.model.addListener(mxEvent.CHANGE,g);mxEvent.addListener(window,"message",mxUtils.bind(this,function(e){if(e.source==(window.opener||window.parent)){var g=e.data,k=mxUtils.bind(this,function(a){if(null!=a&&"function"===typeof a.charAt&&"<"!=a.charAt(0))try{"data:image/png;base64,"==
a.substring(0,22)?a=this.extractGraphModelFromPng(a):"data:image/svg+xml;base64,"==a.substring(0,26)?a=atob(a.substring(26)):"data:image/svg+xml;utf8,"==a.substring(0,24)&&(a=a.substring(24)),null!=a&&("%"==a.charAt(0)?a=decodeURIComponent(a):"<"!=a.charAt(0)&&(a=Graph.decompress(a)))}catch(ta){}return a});if("json"==urlParams.proto){var l=!1;try{g=JSON.parse(g)}catch(P){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.executeLayoutList(g.layouts);return}if("prompt"==g.action){this.spinner.stop();var n=new FilenameDialog(this,g.defaultValue||"",null!=g.okKey?mxResources.get(g.okKey):g.ok,function(a){null!=a?m.postMessage(JSON.stringify({event:"prompt",value:a,message:g}),"*"):m.postMessage(JSON.stringify({event:"prompt-cancel",message:g}),
"*")},null!=g.titleKey?mxResources.get(g.titleKey):g.title);this.showDialog(n.container,300,80,!0,!1);n.init();return}if("draft"==g.action){var p=k(g.xml);this.spinner.stop();n=new DraftDialog(this,mxResources.get("draftFound",[g.name||this.defaultFilename]),p,mxUtils.bind(this,function(){this.hideDialog();m.postMessage(JSON.stringify({event:"draft",result:"edit",message:g}),"*")}),mxUtils.bind(this,function(){this.hideDialog();m.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();m.postMessage(JSON.stringify({event:"draft",result:"ignore",message:g}),"*")}):null);this.showDialog(n.container,640,480,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));try{n.init()}catch(P){m.postMessage(JSON.stringify({event:"draft",error:P.toString(),message:g}),"*")}return}if("template"==g.action){this.spinner.stop();
-var q=1==g.enableRecent,t=1==g.enableSearch,u=1==g.enableCustomTemp;if("1"==urlParams.newTempDlg&&!g.templatesOnly&&null!=g.callback){var C=this.getCurrentUser(),A=new TemplatesDialog(this,function(a,c,b){a=a||this.emptyDiagramXml;m.postMessage(JSON.stringify({event:"template",xml:a,blank:a==this.emptyDiagramXml,name:c,tempUrl:b.url,libs:b.libs,builtIn:null!=b.info&&null!=b.info.custContentId,message:g}),"*")},mxUtils.bind(this,function(){this.actions.get("exit").funct()}),null,null,null!=C?C.id:
+var q=1==g.enableRecent,t=1==g.enableSearch,u=1==g.enableCustomTemp;if("1"==urlParams.newTempDlg&&!g.templatesOnly&&null!=g.callback){var D=this.getCurrentUser(),A=new TemplatesDialog(this,function(a,c,b){a=a||this.emptyDiagramXml;m.postMessage(JSON.stringify({event:"template",xml:a,blank:a==this.emptyDiagramXml,name:c,tempUrl:b.url,libs:b.libs,builtIn:null!=b.info&&null!=b.info.custContentId,message:g}),"*")},mxUtils.bind(this,function(){this.actions.get("exit").funct()}),null,null,null!=D?D.id:
null,q?mxUtils.bind(this,function(a,c,b){this.remoteInvoke("getRecentDiagrams",[b],null,a,c)}):null,t?mxUtils.bind(this,function(a,c,b,d){this.remoteInvoke("searchDiagrams",[a,d],null,c,b)}):null,mxUtils.bind(this,function(a,c,b){this.remoteInvoke("getFileContent",[a.url],null,c,b)}),null,u?mxUtils.bind(this,function(a){this.remoteInvoke("getCustomTemplates",null,null,a,function(){a({},0)})}):null,!1,!1,!0,!0);this.showDialog(A.container,window.innerWidth,window.innerHeight,!0,!1,null,!1,!0);return}n=
new NewDialog(this,!1,g.templatesOnly?!1:null!=g.callback,mxUtils.bind(this,function(c,b,d,f){c=c||this.emptyDiagramXml;null!=g.callback?m.postMessage(JSON.stringify({event:"template",xml:c,blank:c==this.emptyDiagramXml,name:b,tempUrl:d,libs:f,builtIn:!0,message:g}),"*"):(a(c,e,c!=this.emptyDiagramXml,g.toSketch),this.editor.modified||this.editor.setStatus(""))}),null,null,null,null,null,null,null,q?mxUtils.bind(this,function(a){this.remoteInvoke("getRecentDiagrams",[null],null,a,function(){a(null,
"Network Error!")})}):null,t?mxUtils.bind(this,function(a,c){this.remoteInvoke("searchDiagrams",[a,null],null,c,function(){c(null,"Network Error!")})}):null,mxUtils.bind(this,function(a,c,b){m.postMessage(JSON.stringify({event:"template",docUrl:a,info:c,name:b}),"*")}),null,null,u?mxUtils.bind(this,function(a){this.remoteInvoke("getCustomTemplates",null,null,a,function(){a({},0)})}):null,1==g.withoutType);this.showDialog(n.container,620,460,!0,!1,mxUtils.bind(this,function(a){this.sidebar.hideTooltip();
a&&this.actions.get("exit").funct()}));n.init();return}if("textContent"==g.action){var U=this.getDiagramTextContent();m.postMessage(JSON.stringify({event:"textContent",data:U,message:g}),"*");return}if("status"==g.action){null!=g.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(g.messageKey))):null!=g.message&&this.editor.setStatus(mxUtils.htmlEntities(g.message));null!=g.modified&&(this.editor.modified=g.modified);return}if("spinner"==g.action){var O=null!=g.messageKey?mxResources.get(g.messageKey):
-g.message;null==g.show||g.show?this.spinner.spin(document.body,O):this.spinner.stop();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 N=null!=g.xml?g.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var v=this.editor.graph,D=mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();var c=this.createLoadMessage("export");c.format=
-g.format;c.message=g;c.data=a;c.xml=N;m.postMessage(JSON.stringify(c),"*")}),B=mxUtils.bind(this,function(a){null==a&&(a=Editor.blankImage);"xmlpng"==g.format&&(a=Editor.writeGraphModelToPng(a,"tEXt","mxfile",encodeURIComponent(N)));v!=this.editor.graph&&v.container.parentNode.removeChild(v.container);D(a)}),J=g.pageId||(null!=this.pages?g.currentPage?this.currentPage.getId():this.pages[0].getId():null);if(this.isExportToCanvas()){null!=g.xml&&0<g.xml.length&&(b=!0,this.setFileData(N),b=!1);if(null!=
-this.pages&&this.currentPage.getId()!=J){for(var L=v.getGlobalVariable,v=this.createTemporaryGraph(v.getStylesheet()),W,Q=0;Q<this.pages.length;Q++)if(this.pages[Q].getId()==J){W=this.updatePageRoot(this.pages[Q]);break}null==W&&(W=this.currentPage);v.getGlobalVariable=function(a){return"page"==a?W.getName():"pagenumber"==a?1:L.apply(this,arguments)};document.body.appendChild(v.container);v.model.setRoot(W.root)}if(null!=g.layerIds){for(var aa=v.model,na=aa.getChildCells(aa.getRoot()),n={},Q=0;Q<
-g.layerIds.length;Q++)n[g.layerIds[Q]]=!0;for(Q=0;Q<na.length;Q++)aa.setVisible(na[Q],n[na[Q].id]||!1)}this.editor.exportToCanvas(mxUtils.bind(this,function(a){B(a.toDataURL("image/png"))}),g.width,null,g.background,mxUtils.bind(this,function(){B(null)}),null,null,g.scale,g.transparent,g.shadow,null,v,g.border,null,g.grid,g.keepTheme)}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==g.format?"1":"0")+(null!=J?"&pageId="+J:"")+(null!=g.layerIds&&0<g.layerIds.length?"&extras="+encodeURIComponent(JSON.stringify({layerIds:g.layerIds})):
-"")+(null!=g.scale?"&scale="+g.scale:"")+"&base64=1&xml="+encodeURIComponent(N))).send(mxUtils.bind(this,function(a){200<=a.getStatus()&&299>=a.getStatus()?D("data:image/png;base64,"+a.getText()):B(null)}),mxUtils.bind(this,function(){B(null)}))}}else{null!=g.xml&&0<g.xml.length&&(b=!0,this.setFileData(g.xml),b=!1);O=this.createLoadMessage("export");O.message=g;if("html2"==g.format||"html"==g.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length)){var ga=this.getXmlFileData();O.xml=
-mxUtils.getXml(ga);O.data=this.getFileData(null,null,!0,null,null,null,ga);O.format=g.format}else if("html"==g.format)N=this.editor.getGraphXml(),O.data=this.getHtml(N,this.editor.graph),O.xml=mxUtils.getXml(N),O.format=g.format;else{mxSvgCanvas2D.prototype.foAltText=null;var ea=null!=g.background?g.background:this.editor.graph.background;ea==mxConstants.NONE&&(ea=null);O.xml=this.getFileData(!0,null,null,null,null,null,null,null,null,!1);O.format="svg";var la=mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);
-this.spinner.stop();O.data=Editor.createSvgDataUri(a);m.postMessage(JSON.stringify(O),"*")});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(O.xml,this.editor.graph,null,!0,la,null,null,g.embedImages,ea,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);
-var V=this.editor.graph.getSvg(ea,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(V);this.embedFonts(V,mxUtils.bind(this,function(a){g.embedImages||null==g.embedImages?this.editor.convertImages(a,mxUtils.bind(this,function(a){la(mxUtils.getXml(a))})):la(mxUtils.getXml(a))}))}return}m.postMessage(JSON.stringify(O),"*")}return}if("load"==g.action){l=g.toSketch;d=1==
+g.message;null==g.show||g.show?this.spinner.spin(document.body,O):this.spinner.stop();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 N=null!=g.xml?g.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var v=this.editor.graph,C=mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();var c=this.createLoadMessage("export");c.format=
+g.format;c.message=g;c.data=a;c.xml=N;m.postMessage(JSON.stringify(c),"*")}),B=mxUtils.bind(this,function(a){null==a&&(a=Editor.blankImage);"xmlpng"==g.format&&(a=Editor.writeGraphModelToPng(a,"tEXt","mxfile",encodeURIComponent(N)));v!=this.editor.graph&&v.container.parentNode.removeChild(v.container);C(a)}),J=g.pageId||(null!=this.pages?g.currentPage?this.currentPage.getId():this.pages[0].getId():null);if(this.isExportToCanvas()){null!=g.xml&&0<g.xml.length&&(b=!0,this.setFileData(N),b=!1);if(null!=
+this.pages&&this.currentPage.getId()!=J){for(var L=v.getGlobalVariable,v=this.createTemporaryGraph(v.getStylesheet()),W,Q=0;Q<this.pages.length;Q++)if(this.pages[Q].getId()==J){W=this.updatePageRoot(this.pages[Q]);break}null==W&&(W=this.currentPage);v.getGlobalVariable=function(a){return"page"==a?W.getName():"pagenumber"==a?1:L.apply(this,arguments)};document.body.appendChild(v.container);v.model.setRoot(W.root)}if(null!=g.layerIds){for(var Z=v.model,na=Z.getChildCells(Z.getRoot()),n={},Q=0;Q<g.layerIds.length;Q++)n[g.layerIds[Q]]=
+!0;for(Q=0;Q<na.length;Q++)Z.setVisible(na[Q],n[na[Q].id]||!1)}this.editor.exportToCanvas(mxUtils.bind(this,function(a){B(a.toDataURL("image/png"))}),g.width,null,g.background,mxUtils.bind(this,function(){B(null)}),null,null,g.scale,g.transparent,g.shadow,null,v,g.border,null,g.grid,g.keepTheme)}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==g.format?"1":"0")+(null!=J?"&pageId="+J:"")+(null!=g.layerIds&&0<g.layerIds.length?"&extras="+encodeURIComponent(JSON.stringify({layerIds:g.layerIds})):
+"")+(null!=g.scale?"&scale="+g.scale:"")+"&base64=1&xml="+encodeURIComponent(N))).send(mxUtils.bind(this,function(a){200<=a.getStatus()&&299>=a.getStatus()?C("data:image/png;base64,"+a.getText()):B(null)}),mxUtils.bind(this,function(){B(null)}))}}else{null!=g.xml&&0<g.xml.length&&(b=!0,this.setFileData(g.xml),b=!1);O=this.createLoadMessage("export");O.message=g;if("html2"==g.format||"html"==g.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length)){var ga=this.getXmlFileData();O.xml=
+mxUtils.getXml(ga);O.data=this.getFileData(null,null,!0,null,null,null,ga);O.format=g.format}else if("html"==g.format)N=this.editor.getGraphXml(),O.data=this.getHtml(N,this.editor.graph),O.xml=mxUtils.getXml(N),O.format=g.format;else{mxSvgCanvas2D.prototype.foAltText=null;var da=null!=g.background?g.background:this.editor.graph.background;da==mxConstants.NONE&&(da=null);O.xml=this.getFileData(!0,null,null,null,null,null,null,null,null,!1);O.format="svg";var la=mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);
+this.spinner.stop();O.data=Editor.createSvgDataUri(a);m.postMessage(JSON.stringify(O),"*")});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(O.xml,this.editor.graph,null,!0,la,null,null,g.embedImages,da,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);
+var V=this.editor.graph.getSvg(da,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(V);this.embedFonts(V,mxUtils.bind(this,function(a){g.embedImages||null==g.embedImages?this.editor.convertImages(a,mxUtils.bind(this,function(a){la(mxUtils.getXml(a))})):la(mxUtils.getXml(a))}))}return}m.postMessage(JSON.stringify(O),"*")}return}if("load"==g.action){l=g.toSketch;d=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);null!=g.noExitBtn&&null==urlParams.noExitBtn&&(urlParams.noExitBtn=g.noExitBtn);null!=g.title&&null!=this.buttonContainer&&(p=document.createElement("span"),mxUtils.write(p,g.title),"atlas"==uiTheme?(this.buttonContainer.style.paddingRight=
"12px",this.buttonContainer.style.paddingTop="6px",this.buttonContainer.style.right="1"==urlParams.noLangIcon?"0":"25px"):"min"!=uiTheme&&(this.buttonContainer.style.paddingRight="38px",this.buttonContainer.style.paddingTop="6px"),null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan),this.buttonContainer.appendChild(p),this.embedFilenameSpan=p);try{g.libs&&this.sidebar.showEntries(g.libs)}catch(P){}g=null!=g.xmlpng?this.extractGraphModelFromPng(g.xmlpng):
-null!=g.descriptor?g.descriptor:g.xml}else{if("merge"==g.action){var ca=this.getCurrentFile();null!=ca&&(p=k(g.xml),null!=p&&""!=p&&ca.mergeFile(new LocalFile(this,p),function(){m.postMessage(JSON.stringify({event:"merge",message:g}),"*")},function(a){m.postMessage(JSON.stringify({event:"merge",message:g,error:a}),"*")}))}else"remoteInvokeReady"==g.action?this.handleRemoteInvokeReady(m):"remoteInvoke"==g.action?this.handleRemoteInvoke(g,e.origin):"remoteInvokeResponse"==g.action?this.handleRemoteInvokeResponse(g):
-m.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(g)}),"*");return}}catch(P){this.handleError(P)}}var ma=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())}),T=mxUtils.bind(this,function(e,g){b=!0;try{a(e,g,null,l)}catch(da){this.handleError(da)}b=!1;null!=urlParams.modified&&this.editor.setStatus("");f=ma();d&&null==c&&(c=mxUtils.bind(this,function(a,c){var d=ma();if(d!=
+null!=g.descriptor?g.descriptor:g.xml}else{if("merge"==g.action){var ba=this.getCurrentFile();null!=ba&&(p=k(g.xml),null!=p&&""!=p&&ba.mergeFile(new LocalFile(this,p),function(){m.postMessage(JSON.stringify({event:"merge",message:g}),"*")},function(a){m.postMessage(JSON.stringify({event:"merge",message:g,error:a}),"*")}))}else"remoteInvokeReady"==g.action?this.handleRemoteInvokeReady(m):"remoteInvoke"==g.action?this.handleRemoteInvoke(g,e.origin):"remoteInvokeResponse"==g.action?this.handleRemoteInvokeResponse(g):
+m.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(g)}),"*");return}}catch(P){this.handleError(P)}}var ma=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())}),T=mxUtils.bind(this,function(e,g){b=!0;try{a(e,g,null,l)}catch(ca){this.handleError(ca)}b=!1;null!=urlParams.modified&&this.editor.setStatus("");f=ma();d&&null==c&&(c=mxUtils.bind(this,function(a,c){var d=ma();if(d!=
f&&!b){var e=this.createLoadMessage("autosave");e.xml=d;(window.opener||window.parent).postMessage(JSON.stringify(e),"*")}f=d}),this.editor.graph.model.addListener(mxEvent.CHANGE,c),this.editor.graph.addListener("gridSizeChanged",c),this.editor.graph.addListener("shadowVisibleChanged",c),this.addListener("pageFormatChanged",c),this.addListener("pageScaleChanged",c),this.addListener("backgroundColorChanged",c),this.addListener("backgroundImageChanged",c),this.addListener("foldingEnabledChanged",c),
this.addListener("mathEnabledChanged",c),this.addListener("gridEnabledChanged",c),this.addListener("guidesEnabledChanged",c),this.addListener("pageViewChanged",c));if("1"==urlParams.returnbounds||"json"==urlParams.proto){var k=this.createLoadMessage("load");k.xml=e;m.postMessage(JSON.stringify(k),"*")}});null!=g&&"function"===typeof g.substring&&"data:application/vnd.visio;base64,"==g.substring(0,34)?(k="0M8R4KGxGuE"==g.substring(34,45)?"raw.vsd":"raw.vsdx",this.importVisio(this.base64ToBlob(g.substring(g.indexOf(",")+
1)),function(a){T(a,e)},mxUtils.bind(this,function(a){this.handleError(a)}),k)):null!=g&&"function"===typeof g.substring&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(g,"")?this.parseFile(new Blob([g],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&200<=a.status&&299>=a.status&&"<mxGraphModel"==a.responseText.substring(0,13)&&T(a.responseText,e)}),""):null!=g&&"function"===typeof g.substring&&this.isLucidChartData(g)?this.convertLucidChart(g,
-mxUtils.bind(this,function(a){T(a)}),mxUtils.bind(this,function(a){this.handleError(a)})):null==g||"object"!==typeof g||null==g.format||null==g.data&&null==g.url?(g=k(g),T(g,e)):this.loadDescriptor(g,mxUtils.bind(this,function(a){T(ma(),e)}),mxUtils.bind(this,function(a){this.handleError(a,mxResources.get("errorLoadingFile"))}))}}));var m=window.opener||window.parent,k="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";m.postMessage(k,"*");if("json"==urlParams.proto){var p=
+mxUtils.bind(this,function(a){T(a)}),mxUtils.bind(this,function(a){this.handleError(a)})):null==g||"object"!==typeof g||null==g.format||null==g.data&&null==g.url?(g=k(g),T(g,e)):this.loadDescriptor(g,mxUtils.bind(this,function(a){T(ma(),e)}),mxUtils.bind(this,function(a){this.handleError(a,mxResources.get("errorLoadingFile"))}))}}));var m=window.opener||window.parent,g="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";m.postMessage(g,"*");if("json"==urlParams.proto){var p=
this.editor.graph.openLink;this.editor.graph.openLink=function(a,c,b){p.apply(this,arguments);m.postMessage(JSON.stringify({event:"openLink",href:a,target:c,allowOpener:b}),"*")}}};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.menubar){var a=document.createElement("div");a.style.display="inline-block";a.style.position="absolute";a.style.paddingTop="atlas"==uiTheme?"2px":"0px";a.style.paddingLeft="8px";a.style.paddingBottom="2px";var b=document.createElement("button");b.className="geBigButton";
var d=b;if("1"==urlParams.noSaveBtn){if("0"!=urlParams.saveAndExit){var f="1"==urlParams.publishClose?mxResources.get("publish"):mxResources.get("saveAndExit");mxUtils.write(b,f);b.setAttribute("title",f);mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()}));a.appendChild(b)}}else mxUtils.write(b,mxResources.get("save")),b.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)"),mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()})),
a.appendChild(b),"1"==urlParams.saveAndExit&&(b=document.createElement("a"),mxUtils.write(b,mxResources.get("saveAndExit")),b.setAttribute("title",mxResources.get("saveAndExit")),b.className="geBigButton geBigStandardButton",b.style.marginLeft="6px",mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),a.appendChild(b),d=b);"1"!=urlParams.noExitBtn&&(b=document.createElement("a"),d="1"==urlParams.publishClose?mxResources.get("close"):mxResources.get("exit"),
mxUtils.write(b,d),b.setAttribute("title",d),b.className="geBigButton geBigStandardButton",b.style.marginLeft="6px",mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()})),a.appendChild(b),d=b);d.style.marginRight="20px";this.toolbar.container.appendChild(a);this.toolbar.staticElements.push(a);a.style.right="atlas"!=uiTheme?"52px":"42px"}};EditorUi.prototype.showImportCsvDialog=function(){null==this.importCsvDialog&&(this.importCsvDialog=new TextareaDialog(this,
mxResources.get("csv")+":",Editor.defaultCsvValue,mxUtils.bind(this,function(a){this.importCsv(a)}),null,null,620,430,null,!0,!0,mxResources.get("import"),this.isOffline()?null:"https://drawio-app.com/import-from-csv-to-drawio/"));this.showDialog(this.importCsvDialog.container,640,520,!0,!0,null,null,null,null,!0);this.importCsvDialog.init()};EditorUi.prototype.executeLayoutList=function(a,b){for(var c=this.editor.graph,d=c.getSelectionCells(),e=0;e<a.length;e++){var f=new window[a[e].layout](c);
-if(null!=a[e].config)for(var k in a[e].config)f[k]=a[e].config[k];this.executeLayout(function(){f.execute(c.getDefaultParent(),0==d.length?null:d)},e==a.length-1,b)}};EditorUi.prototype.importCsv=function(a,b){try{var c=a.split("\n"),d=[],e=[],f={};if(0<c.length){var k={},m=null,p=null,x=null,G=null,z=null,E=null,H=null,K=null,F=null,I="",C="auto",M="auto",U=null,O=null,N=40,v=40,D=100,B=0,J=this.editor.graph;J.getGraphBounds();for(var L=function(){null!=b?b(ra):(J.setSelectionCells(ra),J.scrollCellToVisible(J.getSelectionCell()))},
-W=J.getFreeInsertPoint(),Q=W.x,aa=W.y,W=aa,na=null,ga="auto",F=null,ea=[],la=null,V=null,ca=0;ca<c.length&&"#"==c[ca].charAt(0);){a=c[ca];for(ca++;ca<c.length&&"\\"==a.charAt(a.length-1)&&"#"==c[ca].charAt(0);)a=a.substring(0,a.length-1)+mxUtils.trim(c[ca].substring(1)),ca++;if("#"!=a.charAt(1)){var ma=a.indexOf(":");if(0<ma){var T=mxUtils.trim(a.substring(1,ma)),P=mxUtils.trim(a.substring(ma+1));"label"==T?na=J.sanitizeHtml(P):"labelname"==T&&0<P.length&&"-"!=P?z=P:"labels"==T&&0<P.length&&"-"!=
-P?E=JSON.parse(P):"style"==T?p=P:"parentstyle"==T?H=P:"stylename"==T&&0<P.length&&"-"!=P?G=P:"styles"==T&&0<P.length&&"-"!=P?x=JSON.parse(P):"vars"==T&&0<P.length&&"-"!=P?m=JSON.parse(P):"identity"==T&&0<P.length&&"-"!=P?K=P:"parent"==T&&0<P.length&&"-"!=P?F=P:"namespace"==T&&0<P.length&&"-"!=P?I=P:"width"==T?C=P:"height"==T?M=P:"left"==T&&0<P.length?U=P:"top"==T&&0<P.length?O=P:"ignore"==T?V=P.split(","):"connect"==T?ea.push(JSON.parse(P)):"link"==T?la=P:"padding"==T?B=parseFloat(P):"edgespacing"==
-T?N=parseFloat(P):"nodespacing"==T?v=parseFloat(P):"levelspacing"==T?D=parseFloat(P):"layout"==T&&(ga=P)}}}if(null==c[ca])throw Error(mxResources.get("invalidOrMissingFile"));for(var ta=this.editor.csvToArray(c[ca]),T=ma=null,P=[],X=0;X<ta.length;X++)K==ta[X]&&(ma=X),F==ta[X]&&(T=X),P.push(mxUtils.trim(ta[X]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,""));null==na&&(na="%"+P[0]+"%");if(null!=ea)for(var da=0;da<ea.length;da++)null==k[ea[da].to]&&(k[ea[da].to]={});K=[];for(X=ca+1;X<
-c.length;X++){var ia=this.editor.csvToArray(c[X]);if(null==ia){var pa=40<c[X].length?c[X].substring(0,40)+"...":c[X];throw Error(pa+" ("+X+"):\n"+mxResources.get("containsValidationErrors"));}0<ia.length&&K.push(ia)}J.model.beginUpdate();try{for(X=0;X<K.length;X++){var ia=K[X],R=null,ka=null!=ma?I+ia[ma]:null;null!=ka&&(R=J.model.getCell(ka));var c=null!=R,ba=new mxCell(na,new mxGeometry(Q,W,0,0),p||"whiteSpace=wrap;html=1;");ba.vertex=!0;ba.id=ka;for(var ja=0;ja<ia.length;ja++)J.setAttributeForCell(ba,
-P[ja],ia[ja]);if(null!=z&&null!=E){var Y=E[ba.getAttribute(z)];null!=Y&&J.labelChanged(ba,Y)}if(null!=G&&null!=x){var qa=x[ba.getAttribute(G)];null!=qa&&(ba.style=qa)}J.setAttributeForCell(ba,"placeholders","1");ba.style=J.replacePlaceholders(ba,ba.style,m);c&&(J.model.setGeometry(R,ba.geometry),J.model.setStyle(R,ba.style),0>mxUtils.indexOf(e,R)&&e.push(R));R=ba;if(!c)for(da=0;da<ea.length;da++)k[ea[da].to][R.getAttribute(ea[da].to)]=R;null!=la&&"link"!=la&&(J.setLinkForCell(R,R.getAttribute(la)),
-J.setAttributeForCell(R,la,null));J.fireEvent(new mxEventObject("cellsInserted","cells",[R]));var va=this.editor.graph.getPreferredSizeForCell(R);R.vertex&&(null!=U&&null!=R.getAttribute(U)&&(R.geometry.x=Q+parseFloat(R.getAttribute(U))),null!=O&&null!=R.getAttribute(O)&&(R.geometry.y=aa+parseFloat(R.getAttribute(O))),"@"==C.charAt(0)&&null!=R.getAttribute(C.substring(1))?R.geometry.width=parseFloat(R.getAttribute(C.substring(1))):R.geometry.width="auto"==C?va.width+B:parseFloat(C),"@"==M.charAt(0)&&
-null!=R.getAttribute(M.substring(1))?R.geometry.height=parseFloat(R.getAttribute(M.substring(1))):R.geometry.height="auto"==M?va.height+B:parseFloat(M),W+=R.geometry.height+v);c?(null==f[ka]&&(f[ka]=[]),f[ka].push(R)):(F=null!=T?J.model.getCell(I+ia[T]):null,d.push(R),null!=F?(F.style=J.replacePlaceholders(F,H,m),J.addCell(R,F)):e.push(J.addCell(R)))}for(var ua=e.slice(),ra=e.slice(),da=0;da<ea.length;da++)for(var ya=ea[da],X=0;X<d.length;X++){var R=d[X],za=mxUtils.bind(this,function(a,c,b){var d=
-c.getAttribute(b.from);if(null!=d&&(J.setAttributeForCell(c,b.from,null),""!=d))for(var d=d.split(","),e=0;e<d.length;e++){var f=k[b.to][d[e]];if(null!=f){var g=b.label;null!=b.fromlabel&&(g=(c.getAttribute(b.fromlabel)||"")+(g||""));null!=b.sourcelabel&&(g=J.replacePlaceholders(c,b.sourcelabel,m)+(g||""));null!=b.tolabel&&(g=(g||"")+(f.getAttribute(b.tolabel)||""));null!=b.targetlabel&&(g=(g||"")+J.replacePlaceholders(f,b.targetlabel,m));var l="target"==b.placeholders==!b.invert?f:a,l=null!=b.style?
-J.replacePlaceholders(l,b.style,m):J.createCurrentEdgeStyle(),g=J.insertEdge(null,null,g||"",b.invert?f:a,b.invert?a:f,l);if(null!=b.labels)for(l=0;l<b.labels.length;l++){var n=b.labels[l],p=new mxCell(n.label||l,new mxGeometry(null!=n.x?n.x:0,null!=n.y?n.y:0,0,0),"resizable=0;html=1;");p.vertex=!0;p.connectable=!1;p.geometry.relative=!0;null!=n.placeholders&&(p.value=J.replacePlaceholders("target"==n.placeholders==!b.invert?f:a,p.value,m));if(null!=n.dx||null!=n.dy)p.geometry.offset=new mxPoint(null!=
-n.dx?n.dx:0,null!=n.dy?n.dy:0);g.insert(p)}ra.push(g);mxUtils.remove(b.invert?a:f,ua)}}});za(R,R,ya);if(null!=f[R.id])for(ja=0;ja<f[R.id].length;ja++)za(R,f[R.id][ja],ya)}if(null!=V)for(X=0;X<d.length;X++)for(R=d[X],ja=0;ja<V.length;ja++)J.setAttributeForCell(R,mxUtils.trim(V[ja]),null);if(0<e.length){var S=new mxParallelEdgeLayout(J);S.spacing=N;S.checkOverlap=!0;var Aa=function(){0<S.spacing&&S.execute(J.getDefaultParent());for(var a=0;a<e.length;a++){var c=J.getCellGeometry(e[a]);c.x=Math.round(J.snap(c.x));
-c.y=Math.round(J.snap(c.y));"auto"==C&&(c.width=Math.round(J.snap(c.width)));"auto"==M&&(c.height=Math.round(J.snap(c.height)))}};if("["==ga.charAt(0)){var ha=L;J.view.validate();this.executeLayoutList(JSON.parse(ga),function(){Aa();ha()});L=null}else if("circle"==ga){var Ba=new mxCircleLayout(J);Ba.disableEdgeStyle=!1;Ba.resetEdges=!1;var wa=Ba.isVertexIgnored;Ba.isVertexIgnored=function(a){return wa.apply(this,arguments)||0>mxUtils.indexOf(e,a)};this.executeLayout(function(){Ba.execute(J.getDefaultParent());
+if(null!=a[e].config)for(var g in a[e].config)f[g]=a[e].config[g];this.executeLayout(function(){f.execute(c.getDefaultParent(),0==d.length?null:d)},e==a.length-1,b)}};EditorUi.prototype.importCsv=function(a,b){try{var c=a.split("\n"),d=[],e=[],f={};if(0<c.length){var g={},m=null,p=null,x=null,G=null,z=null,E=null,H=null,K=null,F=null,I="",D="auto",M="auto",U=null,O=null,N=40,v=40,C=100,B=0,J=this.editor.graph;J.getGraphBounds();for(var L=function(){null!=b?b(ra):(J.setSelectionCells(ra),J.scrollCellToVisible(J.getSelectionCell()))},
+W=J.getFreeInsertPoint(),Q=W.x,Z=W.y,W=Z,na=null,ga="auto",F=null,da=[],la=null,V=null,ba=0;ba<c.length&&"#"==c[ba].charAt(0);){a=c[ba];for(ba++;ba<c.length&&"\\"==a.charAt(a.length-1)&&"#"==c[ba].charAt(0);)a=a.substring(0,a.length-1)+mxUtils.trim(c[ba].substring(1)),ba++;if("#"!=a.charAt(1)){var ma=a.indexOf(":");if(0<ma){var T=mxUtils.trim(a.substring(1,ma)),P=mxUtils.trim(a.substring(ma+1));"label"==T?na=J.sanitizeHtml(P):"labelname"==T&&0<P.length&&"-"!=P?z=P:"labels"==T&&0<P.length&&"-"!=P?
+E=JSON.parse(P):"style"==T?p=P:"parentstyle"==T?H=P:"stylename"==T&&0<P.length&&"-"!=P?G=P:"styles"==T&&0<P.length&&"-"!=P?x=JSON.parse(P):"vars"==T&&0<P.length&&"-"!=P?m=JSON.parse(P):"identity"==T&&0<P.length&&"-"!=P?K=P:"parent"==T&&0<P.length&&"-"!=P?F=P:"namespace"==T&&0<P.length&&"-"!=P?I=P:"width"==T?D=P:"height"==T?M=P:"left"==T&&0<P.length?U=P:"top"==T&&0<P.length?O=P:"ignore"==T?V=P.split(","):"connect"==T?da.push(JSON.parse(P)):"link"==T?la=P:"padding"==T?B=parseFloat(P):"edgespacing"==
+T?N=parseFloat(P):"nodespacing"==T?v=parseFloat(P):"levelspacing"==T?C=parseFloat(P):"layout"==T&&(ga=P)}}}if(null==c[ba])throw Error(mxResources.get("invalidOrMissingFile"));for(var ta=this.editor.csvToArray(c[ba]),T=ma=null,P=[],X=0;X<ta.length;X++)K==ta[X]&&(ma=X),F==ta[X]&&(T=X),P.push(mxUtils.trim(ta[X]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,""));null==na&&(na="%"+P[0]+"%");if(null!=da)for(var ca=0;ca<da.length;ca++)null==g[da[ca].to]&&(g[da[ca].to]={});K=[];for(X=ba+1;X<
+c.length;X++){var ia=this.editor.csvToArray(c[X]);if(null==ia){var pa=40<c[X].length?c[X].substring(0,40)+"...":c[X];throw Error(pa+" ("+X+"):\n"+mxResources.get("containsValidationErrors"));}0<ia.length&&K.push(ia)}J.model.beginUpdate();try{for(X=0;X<K.length;X++){var ia=K[X],R=null,ka=null!=ma?I+ia[ma]:null;null!=ka&&(R=J.model.getCell(ka));var c=null!=R,aa=new mxCell(na,new mxGeometry(Q,W,0,0),p||"whiteSpace=wrap;html=1;");aa.vertex=!0;aa.id=ka;for(var ja=0;ja<ia.length;ja++)J.setAttributeForCell(aa,
+P[ja],ia[ja]);if(null!=z&&null!=E){var ea=E[aa.getAttribute(z)];null!=ea&&J.labelChanged(aa,ea)}if(null!=G&&null!=x){var qa=x[aa.getAttribute(G)];null!=qa&&(aa.style=qa)}J.setAttributeForCell(aa,"placeholders","1");aa.style=J.replacePlaceholders(aa,aa.style,m);c&&(J.model.setGeometry(R,aa.geometry),J.model.setStyle(R,aa.style),0>mxUtils.indexOf(e,R)&&e.push(R));R=aa;if(!c)for(ca=0;ca<da.length;ca++)g[da[ca].to][R.getAttribute(da[ca].to)]=R;null!=la&&"link"!=la&&(J.setLinkForCell(R,R.getAttribute(la)),
+J.setAttributeForCell(R,la,null));J.fireEvent(new mxEventObject("cellsInserted","cells",[R]));var ya=this.editor.graph.getPreferredSizeForCell(R);R.vertex&&(null!=U&&null!=R.getAttribute(U)&&(R.geometry.x=Q+parseFloat(R.getAttribute(U))),null!=O&&null!=R.getAttribute(O)&&(R.geometry.y=Z+parseFloat(R.getAttribute(O))),"@"==D.charAt(0)&&null!=R.getAttribute(D.substring(1))?R.geometry.width=parseFloat(R.getAttribute(D.substring(1))):R.geometry.width="auto"==D?ya.width+B:parseFloat(D),"@"==M.charAt(0)&&
+null!=R.getAttribute(M.substring(1))?R.geometry.height=parseFloat(R.getAttribute(M.substring(1))):R.geometry.height="auto"==M?ya.height+B:parseFloat(M),W+=R.geometry.height+v);c?(null==f[ka]&&(f[ka]=[]),f[ka].push(R)):(F=null!=T?J.model.getCell(I+ia[T]):null,d.push(R),null!=F?(F.style=J.replacePlaceholders(F,H,m),J.addCell(R,F)):e.push(J.addCell(R)))}for(var ua=e.slice(),ra=e.slice(),ca=0;ca<da.length;ca++)for(var xa=da[ca],X=0;X<d.length;X++){var R=d[X],za=mxUtils.bind(this,function(a,c,b){var d=
+c.getAttribute(b.from);if(null!=d&&(J.setAttributeForCell(c,b.from,null),""!=d))for(var d=d.split(","),e=0;e<d.length;e++){var f=g[b.to][d[e]];if(null!=f){var k=b.label;null!=b.fromlabel&&(k=(c.getAttribute(b.fromlabel)||"")+(k||""));null!=b.sourcelabel&&(k=J.replacePlaceholders(c,b.sourcelabel,m)+(k||""));null!=b.tolabel&&(k=(k||"")+(f.getAttribute(b.tolabel)||""));null!=b.targetlabel&&(k=(k||"")+J.replacePlaceholders(f,b.targetlabel,m));var l="target"==b.placeholders==!b.invert?f:a,l=null!=b.style?
+J.replacePlaceholders(l,b.style,m):J.createCurrentEdgeStyle(),k=J.insertEdge(null,null,k||"",b.invert?f:a,b.invert?a:f,l);if(null!=b.labels)for(l=0;l<b.labels.length;l++){var n=b.labels[l],p=new mxCell(n.label||l,new mxGeometry(null!=n.x?n.x:0,null!=n.y?n.y:0,0,0),"resizable=0;html=1;");p.vertex=!0;p.connectable=!1;p.geometry.relative=!0;null!=n.placeholders&&(p.value=J.replacePlaceholders("target"==n.placeholders==!b.invert?f:a,p.value,m));if(null!=n.dx||null!=n.dy)p.geometry.offset=new mxPoint(null!=
+n.dx?n.dx:0,null!=n.dy?n.dy:0);k.insert(p)}ra.push(k);mxUtils.remove(b.invert?a:f,ua)}}});za(R,R,xa);if(null!=f[R.id])for(ja=0;ja<f[R.id].length;ja++)za(R,f[R.id][ja],xa)}if(null!=V)for(X=0;X<d.length;X++)for(R=d[X],ja=0;ja<V.length;ja++)J.setAttributeForCell(R,mxUtils.trim(V[ja]),null);if(0<e.length){var S=new mxParallelEdgeLayout(J);S.spacing=N;S.checkOverlap=!0;var Aa=function(){0<S.spacing&&S.execute(J.getDefaultParent());for(var a=0;a<e.length;a++){var c=J.getCellGeometry(e[a]);c.x=Math.round(J.snap(c.x));
+c.y=Math.round(J.snap(c.y));"auto"==D&&(c.width=Math.round(J.snap(c.width)));"auto"==M&&(c.height=Math.round(J.snap(c.height)))}};if("["==ga.charAt(0)){var ha=L;J.view.validate();this.executeLayoutList(JSON.parse(ga),function(){Aa();ha()});L=null}else if("circle"==ga){var Ba=new mxCircleLayout(J);Ba.disableEdgeStyle=!1;Ba.resetEdges=!1;var va=Ba.isVertexIgnored;Ba.isVertexIgnored=function(a){return va.apply(this,arguments)||0>mxUtils.indexOf(e,a)};this.executeLayout(function(){Ba.execute(J.getDefaultParent());
Aa()},!0,L);L=null}else if("horizontaltree"==ga||"verticaltree"==ga||"auto"==ga&&ra.length==2*e.length-1&&1==ua.length){J.view.validate();var Da=new mxCompactTreeLayout(J,"horizontaltree"==ga);Da.levelDistance=v;Da.edgeRouting=!1;Da.resetEdges=!1;this.executeLayout(function(){Da.execute(J.getDefaultParent(),0<ua.length?ua[0]:null)},!0,L);L=null}else if("horizontalflow"==ga||"verticalflow"==ga||"auto"==ga&&1==ua.length){J.view.validate();var Ca=new mxHierarchicalLayout(J,"horizontalflow"==ga?mxConstants.DIRECTION_WEST:
-mxConstants.DIRECTION_NORTH);Ca.intraCellSpacing=v;Ca.parallelEdgeSpacing=N;Ca.interRankCellSpacing=D;Ca.disableEdgeStyle=!1;this.executeLayout(function(){Ca.execute(J.getDefaultParent(),ra);J.moveCells(ra,Q,aa)},!0,L);L=null}else if("organic"==ga||"auto"==ga&&ra.length>e.length){J.view.validate();var xa=new mxFastOrganicLayout(J);xa.forceConstant=3*v;xa.disableEdgeStyle=!1;xa.resetEdges=!1;var Fa=xa.isVertexIgnored;xa.isVertexIgnored=function(a){return Fa.apply(this,arguments)||0>mxUtils.indexOf(e,
-a)};this.executeLayout(function(){xa.execute(J.getDefaultParent());Aa()},!0,L);L=null}}this.hideDialog()}finally{J.model.endUpdate()}null!=L&&L()}}catch(Z){this.handleError(Z)}};EditorUi.prototype.getSearch=function(a){var c="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=a&&0<window.location.search.length){var b="?",d;for(d in urlParams)0>mxUtils.indexOf(a,d)&&null!=urlParams[d]&&(c+=b+d+"="+urlParams[d],b="&")}else c=window.location.search;return c};EditorUi.prototype.getUrl=function(a){a=
-null!=a?a:window.location.pathname;var c=0<a.indexOf("?")?1:0;if("1"==urlParams.offline)a+=window.location.search;else{var b="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "),d;for(d in urlParams)0>mxUtils.indexOf(b,d)&&(a=0==c?a+"?":a+"&",null!=urlParams[d]&&(a+=d+"="+urlParams[d],c++))}return a};EditorUi.prototype.showLinkDialog=function(a,b,d,f,k){a=new LinkDialog(this,a,b,d,!0,f,k);this.showDialog(a.container,560,130,!0,!0);a.init()};EditorUi.prototype.getServiceCount=
+mxConstants.DIRECTION_NORTH);Ca.intraCellSpacing=v;Ca.parallelEdgeSpacing=N;Ca.interRankCellSpacing=C;Ca.disableEdgeStyle=!1;this.executeLayout(function(){Ca.execute(J.getDefaultParent(),ra);J.moveCells(ra,Q,Z)},!0,L);L=null}else if("organic"==ga||"auto"==ga&&ra.length>e.length){J.view.validate();var wa=new mxFastOrganicLayout(J);wa.forceConstant=3*v;wa.disableEdgeStyle=!1;wa.resetEdges=!1;var Fa=wa.isVertexIgnored;wa.isVertexIgnored=function(a){return Fa.apply(this,arguments)||0>mxUtils.indexOf(e,
+a)};this.executeLayout(function(){wa.execute(J.getDefaultParent());Aa()},!0,L);L=null}}this.hideDialog()}finally{J.model.endUpdate()}null!=L&&L()}}catch(Y){this.handleError(Y)}};EditorUi.prototype.getSearch=function(a){var c="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=a&&0<window.location.search.length){var b="?",d;for(d in urlParams)0>mxUtils.indexOf(a,d)&&null!=urlParams[d]&&(c+=b+d+"="+urlParams[d],b="&")}else c=window.location.search;return c};EditorUi.prototype.getUrl=function(a){a=
+null!=a?a:window.location.pathname;var c=0<a.indexOf("?")?1:0;if("1"==urlParams.offline)a+=window.location.search;else{var b="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "),d;for(d in urlParams)0>mxUtils.indexOf(b,d)&&(a=0==c?a+"?":a+"&",null!=urlParams[d]&&(a+=d+"="+urlParams[d],c++))}return a};EditorUi.prototype.showLinkDialog=function(a,b,d,f,g){a=new LinkDialog(this,a,b,d,!0,f,g);this.showDialog(a.container,560,130,!0,!0);a.init()};EditorUi.prototype.getServiceCount=
function(a){var c=1;null==this.drive&&"function"!==typeof window.DriveClient||c++;null==this.dropbox&&"function"!==typeof window.DropboxClient||c++;null==this.oneDrive&&"function"!==typeof window.OneDriveClient||c++;null!=this.gitHub&&c++;null!=this.gitLab&&c++;null!=this.notion&&c++;a&&isLocalStorage&&"1"==urlParams.browser&&c++;return c};EditorUi.prototype.updateUi=function(){this.updateButtonContainer();this.updateActionStates();var a=this.getCurrentFile(),b=null!=a||"1"==urlParams.embed&&this.editor.graph.isEnabled();
this.menus.get("viewPanels").setEnabled(b);this.menus.get("viewZoom").setEnabled(b);var d=("1"!=urlParams.embed||!this.editor.graph.isEnabled())&&(null==a||a.isRestricted());this.actions.get("makeCopy").setEnabled(!d);this.actions.get("print").setEnabled(!d);this.menus.get("exportAs").setEnabled(!d);this.menus.get("embed").setEnabled(!d);d="1"!=urlParams.embed||this.editor.graph.isEnabled();this.menus.get("extras").setEnabled(d);Editor.enableCustomLibraries&&(this.menus.get("openLibraryFrom").setEnabled(d),
this.menus.get("newLibrary").setEnabled(d));a="1"==urlParams.embed&&this.editor.graph.isEnabled()||null!=a&&a.isEditable();this.actions.get("image").setEnabled(b);this.actions.get("zoomIn").setEnabled(b);this.actions.get("zoomOut").setEnabled(b);this.actions.get("resetView").setEnabled(b);this.actions.get("undo").setEnabled(this.canUndo()&&a);this.actions.get("redo").setEnabled(this.canRedo()&&a);this.menus.get("edit").setEnabled(b);this.menus.get("view").setEnabled(b);this.menus.get("importFrom").setEnabled(a);
@@ -3650,105 +3653,105 @@ return null!=a&&a.isEditable()||"1"==urlParams.embed&&this.editor.graph.isEnable
f.length||a.isSelectionEmpty());this.actions.get("shadowVisible").setEnabled(d);this.actions.get("connectionArrows").setEnabled(d);this.actions.get("connectionPoints").setEnabled(d);this.actions.get("copyStyle").setEnabled(d&&!a.isSelectionEmpty());this.actions.get("pasteStyle").setEnabled(d&&0<f.length);this.actions.get("editGeometry").setEnabled(0<f.length&&a.getModel().isVertex(f[0]));this.actions.get("createShape").setEnabled(d);this.actions.get("createRevision").setEnabled(d);this.actions.get("moveToFolder").setEnabled(null!=
b);this.actions.get("makeCopy").setEnabled(null!=b&&!b.isRestricted());this.actions.get("editDiagram").setEnabled(d&&(null==b||!b.isRestricted()));this.actions.get("publishLink").setEnabled(null!=b&&!b.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!=
b&&b.isRenamable()||"1"==urlParams.embed);this.actions.get("close").setEnabled(null!=b);this.menus.get("publish").setEnabled(null!=b&&!b.isRestricted());b=this.actions.get("findReplace");b.setEnabled("hidden"!=this.diagramContainer.style.visibility);b.label=mxResources.get("find")+(a.isEnabled()?"/"+mxResources.get("replace"):"")+"...";a=a.view.getState(a.getSelectionCell());this.actions.get("editShape").setEnabled(d&&null!=a&&null!=a.shape&&null!=a.shape.stencil)};var p=EditorUi.prototype.destroy;
-EditorUi.prototype.destroy=function(){null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);p.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(a,b,d,f,k,m,p,t){var c=a.editor.graph;if("xml"==d)a.hideDialog(),a.saveData(b,"xml",mxUtils.getXml(a.editor.getGraphXml()),"text/xml");else if("svg"==d)a.hideDialog(),a.saveData(b,"svg",mxUtils.getXml(c.getSvg(f,
-k,m)),"image/svg+xml");else{var e=a.getFileData(!0,null,null,null,null,!0),g=c.getGraphBounds(),l=Math.floor(g.width*k/c.view.scale),n=Math.floor(g.height*k/c.view.scale);if(e.length<=MAX_REQUEST_SIZE&&l*n<MAX_AREA)if(a.hideDialog(),"png"!=d&&"jpg"!=d&&"jpeg"!=d||!a.isExportToCanvas()){var q={globalVars:c.getExportVariables()};t&&(q.grid={size:c.gridSize,steps:c.view.gridSteps,color:c.view.gridColor});a.saveRequest(b,d,function(a,b){return new mxXmlRequest(EXPORT_URL,"format="+d+"&base64="+(b||"0")+
-(null!=a?"&filename="+encodeURIComponent(a):"")+"&extras="+encodeURIComponent(JSON.stringify(q))+(0<p?"&dpi="+p:"")+"&bg="+(null!=f?f:"none")+"&w="+l+"&h="+n+"&border="+m+"&xml="+encodeURIComponent(e))})}else"png"==d?a.exportImage(k,null==f||"none"==f,!0,!1,!1,m,!0,!1,null,t,p):a.exportImage(k,!1,!0,!1,!1,m,!0,!1,"jpeg",t);else mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.getDiagramTextContent=function(){this.editor.graph.setEnabled(!1);var a=this.editor.graph,b="";if(null!=
+EditorUi.prototype.destroy=function(){null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);p.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(a,b,d,f,g,m,p,t){var c=a.editor.graph;if("xml"==d)a.hideDialog(),a.saveData(b,"xml",mxUtils.getXml(a.editor.getGraphXml()),"text/xml");else if("svg"==d)a.hideDialog(),a.saveData(b,"svg",mxUtils.getXml(c.getSvg(f,
+g,m)),"image/svg+xml");else{var e=a.getFileData(!0,null,null,null,null,!0),k=c.getGraphBounds(),l=Math.floor(k.width*g/c.view.scale),n=Math.floor(k.height*g/c.view.scale);if(e.length<=MAX_REQUEST_SIZE&&l*n<MAX_AREA)if(a.hideDialog(),"png"!=d&&"jpg"!=d&&"jpeg"!=d||!a.isExportToCanvas()){var q={globalVars:c.getExportVariables()};t&&(q.grid={size:c.gridSize,steps:c.view.gridSteps,color:c.view.gridColor});a.saveRequest(b,d,function(a,b){return new mxXmlRequest(EXPORT_URL,"format="+d+"&base64="+(b||"0")+
+(null!=a?"&filename="+encodeURIComponent(a):"")+"&extras="+encodeURIComponent(JSON.stringify(q))+(0<p?"&dpi="+p:"")+"&bg="+(null!=f?f:"none")+"&w="+l+"&h="+n+"&border="+m+"&xml="+encodeURIComponent(e))})}else"png"==d?a.exportImage(g,null==f||"none"==f,!0,!1,!1,m,!0,!1,null,t,p):a.exportImage(g,!1,!0,!1,!1,m,!0,!1,"jpeg",t);else mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.getDiagramTextContent=function(){this.editor.graph.setEnabled(!1);var a=this.editor.graph,b="";if(null!=
this.pages)for(var d=0;d<this.pages.length;d++){var f=a;this.currentPage!=this.pages[d]&&(f=this.createTemporaryGraph(a.getStylesheet()),this.updatePageRoot(this.pages[d]),f.model.setRoot(this.pages[d].root));b+=this.pages[d].getName()+" "+f.getIndexableText()+" "}else b=a.getIndexableText();this.editor.graph.setEnabled(!0);return b};EditorUi.prototype.showRemotelyStoredLibrary=function(a){var b={},c=document.createElement("div");c.style.whiteSpace="nowrap";var d=document.createElement("h3");mxUtils.write(d,
-mxUtils.htmlEntities(a));d.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";c.appendChild(d);var f=document.createElement("div");f.style.cssText="border:1px solid lightGray;overflow: auto;height:300px";f.innerHTML='<div style="text-align:center;padding:8px;"><img src="'+IMAGE_PATH+'/spin.gif"></div>';var k={};try{var m=mxSettings.getCustomLibraries();for(a=0;a<m.length;a++){var p=m[a];if("R"==p.substring(0,1)){var A=JSON.parse(decodeURIComponent(p.substring(1)));k[A[0]]=
-{id:A[0],title:A[1],downloadUrl:A[2]}}}}catch(x){}this.remoteInvoke("getCustomLibraries",null,null,function(a){f.innerHTML="";if(0==a.length)f.innerHTML='<div style="text-align:center;padding-top:20px;color:gray;">'+mxUtils.htmlEntities(mxResources.get("noLibraries"))+"</div>";else for(var c=0;c<a.length;c++){var d=a[c];k[d.id]&&(b[d.id]=d);var e=this.addCheckbox(f,d.title,k[d.id]);(function(a,c){mxEvent.addListener(c,"change",function(){this.checked?b[a.id]=a:delete b[a.id]})})(d,e)}},mxUtils.bind(this,
-function(a){f.innerHTML="";var b=document.createElement("div");b.style.padding="8px";b.style.textAlign="center";mxUtils.write(b,mxResources.get("error")+": ");mxUtils.write(b,null!=a&&null!=a.message?a.message:mxResources.get("unknownError"));f.appendChild(b)}));c.appendChild(f);c=new CustomDialog(this,c,mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"));var a=0,c;for(c in b)null==k[c]&&(a++,mxUtils.bind(this,function(b){this.remoteInvoke("getFileContent",[b.downloadUrl],
-null,mxUtils.bind(this,function(c){a--;0==a&&this.spinner.stop();try{this.loadLibrary(new RemoteLibrary(this,c,b))}catch(H){this.handleError(H,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(){a--;0==a&&this.spinner.stop();this.handleError(null,mxResources.get("errorLoadingFile"))}))})(b[c]));for(c in k)b[c]||this.closeLibrary(new RemoteLibrary(this,null,k[c]));0==a&&this.spinner.stop()}),null,null,"https://www.diagrams.net/doc/faq/custom-libraries-confluence-cloud");this.showDialog(c.container,
+mxUtils.htmlEntities(a));d.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";c.appendChild(d);var f=document.createElement("div");f.style.cssText="border:1px solid lightGray;overflow: auto;height:300px";f.innerHTML='<div style="text-align:center;padding:8px;"><img src="'+IMAGE_PATH+'/spin.gif"></div>';var g={};try{var m=mxSettings.getCustomLibraries();for(a=0;a<m.length;a++){var p=m[a];if("R"==p.substring(0,1)){var A=JSON.parse(decodeURIComponent(p.substring(1)));g[A[0]]=
+{id:A[0],title:A[1],downloadUrl:A[2]}}}}catch(x){}this.remoteInvoke("getCustomLibraries",null,null,function(a){f.innerHTML="";if(0==a.length)f.innerHTML='<div style="text-align:center;padding-top:20px;color:gray;">'+mxUtils.htmlEntities(mxResources.get("noLibraries"))+"</div>";else for(var c=0;c<a.length;c++){var d=a[c];g[d.id]&&(b[d.id]=d);var e=this.addCheckbox(f,d.title,g[d.id]);(function(a,c){mxEvent.addListener(c,"change",function(){this.checked?b[a.id]=a:delete b[a.id]})})(d,e)}},mxUtils.bind(this,
+function(a){f.innerHTML="";var b=document.createElement("div");b.style.padding="8px";b.style.textAlign="center";mxUtils.write(b,mxResources.get("error")+": ");mxUtils.write(b,null!=a&&null!=a.message?a.message:mxResources.get("unknownError"));f.appendChild(b)}));c.appendChild(f);c=new CustomDialog(this,c,mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"));var a=0,c;for(c in b)null==g[c]&&(a++,mxUtils.bind(this,function(b){this.remoteInvoke("getFileContent",[b.downloadUrl],
+null,mxUtils.bind(this,function(c){a--;0==a&&this.spinner.stop();try{this.loadLibrary(new RemoteLibrary(this,c,b))}catch(H){this.handleError(H,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(){a--;0==a&&this.spinner.stop();this.handleError(null,mxResources.get("errorLoadingFile"))}))})(b[c]));for(c in g)b[c]||this.closeLibrary(new RemoteLibrary(this,null,g[c]));0==a&&this.spinner.stop()}),null,null,"https://www.diagrams.net/doc/faq/custom-libraries-confluence-cloud");this.showDialog(c.container,
340,375,!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(a){this.remoteWin=a;for(var b=0;b<this.remoteInvokeQueue.length;b++)a.postMessage(this.remoteInvokeQueue[b],
-"*");this.remoteInvokeQueue=[]};EditorUi.prototype.handleRemoteInvokeResponse=function(a){var b=a.msgMarkers,c=this.remoteInvokeCallbacks[b.callbackId];if(null==c)throw Error("No callback for "+(null!=b?b.callbackId:"null"));a.error?c.error&&c.error(a.error.errResp):c.callback&&c.callback.apply(this,a.resp);this.remoteInvokeCallbacks[b.callbackId]=null};EditorUi.prototype.remoteInvoke=function(a,b,d,f,k){var c=!0,e=window.setTimeout(mxUtils.bind(this,function(){c=!1;k({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),
-this.timeout),g=mxUtils.bind(this,function(){window.clearTimeout(e);c&&f.apply(this,arguments)}),l=mxUtils.bind(this,function(){window.clearTimeout(e);c&&k.apply(this,arguments)});d=d||{};d.callbackId=this.remoteInvokeCallbacks.length;this.remoteInvokeCallbacks.push({callback:g,error:l});a=JSON.stringify({event:"remoteInvoke",funtionName:a,functionArgs:b,msgMarkers:d});null!=this.remoteWin?this.remoteWin.postMessage(a,"*"):this.remoteInvokeQueue.push(a)};EditorUi.prototype.handleRemoteInvoke=function(a,
-b){var c=mxUtils.bind(this,function(b,c){var d={event:"remoteInvokeResponse",msgMarkers:a.msgMarkers};null!=c?d.error={errResp:c}:null!=b&&(d.resp=b);this.remoteWin.postMessage(JSON.stringify(d),"*")});try{var d=a.funtionName,e=this.remoteInvokableFns[d];if(null!=e&&"function"===typeof this[d]){if(e.allowedDomains){for(var f=!1,k=0;k<e.allowedDomains.length;k++)if(b=="https://"+e.allowedDomains[k]){f=!0;break}if(!f){c(null,"Invalid Call: "+d+" is not allowed.");return}}var m=a.functionArgs;Array.isArray(m)||
+"*");this.remoteInvokeQueue=[]};EditorUi.prototype.handleRemoteInvokeResponse=function(a){var b=a.msgMarkers,c=this.remoteInvokeCallbacks[b.callbackId];if(null==c)throw Error("No callback for "+(null!=b?b.callbackId:"null"));a.error?c.error&&c.error(a.error.errResp):c.callback&&c.callback.apply(this,a.resp);this.remoteInvokeCallbacks[b.callbackId]=null};EditorUi.prototype.remoteInvoke=function(a,b,d,f,g){var c=!0,e=window.setTimeout(mxUtils.bind(this,function(){c=!1;g({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),
+this.timeout),k=mxUtils.bind(this,function(){window.clearTimeout(e);c&&f.apply(this,arguments)}),l=mxUtils.bind(this,function(){window.clearTimeout(e);c&&g.apply(this,arguments)});d=d||{};d.callbackId=this.remoteInvokeCallbacks.length;this.remoteInvokeCallbacks.push({callback:k,error:l});a=JSON.stringify({event:"remoteInvoke",funtionName:a,functionArgs:b,msgMarkers:d});null!=this.remoteWin?this.remoteWin.postMessage(a,"*"):this.remoteInvokeQueue.push(a)};EditorUi.prototype.handleRemoteInvoke=function(a,
+b){var c=mxUtils.bind(this,function(b,c){var d={event:"remoteInvokeResponse",msgMarkers:a.msgMarkers};null!=c?d.error={errResp:c}:null!=b&&(d.resp=b);this.remoteWin.postMessage(JSON.stringify(d),"*")});try{var d=a.funtionName,e=this.remoteInvokableFns[d];if(null!=e&&"function"===typeof this[d]){if(e.allowedDomains){for(var f=!1,g=0;g<e.allowedDomains.length;g++)if(b=="https://"+e.allowedDomains[g]){f=!0;break}if(!f){c(null,"Invalid Call: "+d+" is not allowed.");return}}var m=a.functionArgs;Array.isArray(m)||
(m=[]);if(e.isAsync)m.push(function(){c(Array.prototype.slice.apply(arguments))}),m.push(function(a){c(null,a||"Unkown Error")}),this[d].apply(this,m);else{var p=this[d].apply(this,m);c([p])}}else c(null,"Invalid Call: "+d+" is not found.")}catch(x){c(null,"Invalid Call: An error occurred, "+x.message)}};EditorUi.prototype.openDatabase=function(a,b){if(null==this.database){var c=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB;if(null!=c)try{var d=c.open("database",2);d.onupgradeneeded=
function(a){try{var c=d.result;1>a.oldVersion&&c.createObjectStore("objects",{keyPath:"key"});2>a.oldVersion&&(c.createObjectStore("files",{keyPath:"title"}),c.createObjectStore("filesInfo",{keyPath:"title"}),EditorUi.migrateStorageFiles=isLocalStorage)}catch(u){null!=b&&b(u)}};d.onsuccess=mxUtils.bind(this,function(b){var c=d.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(a){if(!a||"1"==urlParams.forceMigration){var b=document.createElement("iframe");b.style.display="none";b.setAttribute("src","https://www.draw.io?embed=1&proto=json&forceMigration="+urlParams.forceMigration);document.body.appendChild(b);var c=!0,d=!1,e,f=0,g=mxUtils.bind(this,function(){d=!0;this.setDatabaseItem(".drawioMigrated3",!0);b.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",
-funtionName:"setMigratedFlag"}),"*")}),k=mxUtils.bind(this,function(){f++;l()}),l=mxUtils.bind(this,function(){try{if(f>=e.length)g();else{var a=e[f];StorageFile.getFileContent(this,a,mxUtils.bind(this,function(c){null==c||".scratchpad"==a&&c==this.emptyLibraryXml?b.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFile",functionArgs:[a]}),"*"):k()}),k)}}catch(C){console.log(C)}}),m=mxUtils.bind(this,function(a){try{this.setDatabaseItem(null,[{title:a.title,
-size:a.data.length,lastModified:Date.now(),type:a.isLib?"L":"F"},{title:a.title,data:a.data}],k,k,["filesInfo","files"])}catch(C){console.log(C)}});a=mxUtils.bind(this,function(a){try{if(a.source==b.contentWindow){var f={};try{f=JSON.parse(a.data)}catch(M){}"init"==f.event?(b.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),"*"),b.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=f.event||d||
-(c?null!=f.resp&&0<f.resp.length&&null!=f.resp[0]?(e=f.resp[0],c=!1,l()):g():null!=f.resp&&0<f.resp.length&&null!=f.resp[0]?m(f.resp[0]):k())}}catch(M){console.log(M)}});window.addEventListener("message",a)}})));a(c);c.onversionchange=function(){c.close()}});d.onerror=b;d.onblocked=function(){}}catch(l){null!=b&&b(l)}else null!=b&&b()}else a(this.database)};EditorUi.prototype.setDatabaseItem=function(a,b,d,f,k){this.openDatabase(mxUtils.bind(this,function(c){try{k=k||"objects";Array.isArray(k)||(k=
-[k],a=[a],b=[b]);var e=c.transaction(k,"readwrite");e.oncomplete=d;e.onerror=f;for(c=0;c<k.length;c++)e.objectStore(k[c]).put(null!=a&&null!=a[c]?{key:a[c],data:b[c]}:b[c])}catch(t){null!=f&&f(t)}}),f)};EditorUi.prototype.removeDatabaseItem=function(a,b,d,f){this.openDatabase(mxUtils.bind(this,function(c){f=f||"objects";Array.isArray(f)||(f=[f],a=[a]);c=c.transaction(f,"readwrite");c.oncomplete=b;c.onerror=d;for(var e=0;e<f.length;e++)c.objectStore(f[e])["delete"](a[e])}),d)};EditorUi.prototype.getDatabaseItem=
+funtionName:"setMigratedFlag"}),"*")}),k=mxUtils.bind(this,function(){f++;l()}),l=mxUtils.bind(this,function(){try{if(f>=e.length)g();else{var a=e[f];StorageFile.getFileContent(this,a,mxUtils.bind(this,function(c){null==c||".scratchpad"==a&&c==this.emptyLibraryXml?b.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFile",functionArgs:[a]}),"*"):k()}),k)}}catch(D){console.log(D)}}),m=mxUtils.bind(this,function(a){try{this.setDatabaseItem(null,[{title:a.title,
+size:a.data.length,lastModified:Date.now(),type:a.isLib?"L":"F"},{title:a.title,data:a.data}],k,k,["filesInfo","files"])}catch(D){console.log(D)}});a=mxUtils.bind(this,function(a){try{if(a.source==b.contentWindow){var f={};try{f=JSON.parse(a.data)}catch(M){}"init"==f.event?(b.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),"*"),b.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=f.event||d||
+(c?null!=f.resp&&0<f.resp.length&&null!=f.resp[0]?(e=f.resp[0],c=!1,l()):g():null!=f.resp&&0<f.resp.length&&null!=f.resp[0]?m(f.resp[0]):k())}}catch(M){console.log(M)}});window.addEventListener("message",a)}})));a(c);c.onversionchange=function(){c.close()}});d.onerror=b;d.onblocked=function(){}}catch(l){null!=b&&b(l)}else null!=b&&b()}else a(this.database)};EditorUi.prototype.setDatabaseItem=function(a,b,d,f,g){this.openDatabase(mxUtils.bind(this,function(c){try{g=g||"objects";Array.isArray(g)||(g=
+[g],a=[a],b=[b]);var e=c.transaction(g,"readwrite");e.oncomplete=d;e.onerror=f;for(c=0;c<g.length;c++)e.objectStore(g[c]).put(null!=a&&null!=a[c]?{key:a[c],data:b[c]}:b[c])}catch(t){null!=f&&f(t)}}),f)};EditorUi.prototype.removeDatabaseItem=function(a,b,d,f){this.openDatabase(mxUtils.bind(this,function(c){f=f||"objects";Array.isArray(f)||(f=[f],a=[a]);c=c.transaction(f,"readwrite");c.oncomplete=b;c.onerror=d;for(var e=0;e<f.length;e++)c.objectStore(f[e])["delete"](a[e])}),d)};EditorUi.prototype.getDatabaseItem=
function(a,b,d,f){this.openDatabase(mxUtils.bind(this,function(c){try{f=f||"objects";var e=c.transaction([f],"readonly").objectStore(f).get(a);e.onsuccess=function(){b(e.result)};e.onerror=d}catch(u){null!=d&&d(u)}}),d)};EditorUi.prototype.getDatabaseItems=function(a,b,d){this.openDatabase(mxUtils.bind(this,function(c){try{d=d||"objects";var e=c.transaction([d],"readonly").objectStore(d).openCursor(IDBKeyRange.lowerBound(0)),f=[];e.onsuccess=function(b){null==b.target.result?a(f):(f.push(b.target.result.value),
b.target.result["continue"]())};e.onerror=b}catch(u){null!=b&&b(u)}}),b)};EditorUi.prototype.getDatabaseItemKeys=function(a,b,d){this.openDatabase(mxUtils.bind(this,function(c){try{d=d||"objects";var e=c.transaction([d],"readonly").objectStore(d).getAllKeys();e.onsuccess=function(){a(e.result)};e.onerror=b}catch(q){null!=b&&b(q)}}),b)};EditorUi.prototype.commentsSupported=function(){var a=this.getCurrentFile();return null!=a?a.commentsSupported():!1};EditorUi.prototype.commentsRefreshNeeded=function(){var a=
this.getCurrentFile();return null!=a?a.commentsRefreshNeeded():!0};EditorUi.prototype.commentsSaveNeeded=function(){var a=this.getCurrentFile();return null!=a?a.commentsSaveNeeded():!1};EditorUi.prototype.getComments=function(a,b){var c=this.getCurrentFile();null!=c?c.getComments(a,b):a([])};EditorUi.prototype.addComment=function(a,b,d){var c=this.getCurrentFile();null!=c?c.addComment(a,b,d):b(Date.now())};EditorUi.prototype.canReplyToReplies=function(){var a=this.getCurrentFile();return null!=a?
a.canReplyToReplies():!0};EditorUi.prototype.canComment=function(){var a=this.getCurrentFile();return null!=a?a.canComment():!0};EditorUi.prototype.newComment=function(a,b){var c=this.getCurrentFile();return null!=c?c.newComment(a,b):new DrawioComment(this,null,a,Date.now(),Date.now(),!1,b)};EditorUi.prototype.isRevisionHistorySupported=function(){var a=this.getCurrentFile();return null!=a&&a.isRevisionHistorySupported()};EditorUi.prototype.getRevisions=function(a,b){var c=this.getCurrentFile();null!=
-c&&c.getRevisions?c.getRevisions(a,b):b({message:mxResources.get("unknownError")})};EditorUi.prototype.isRevisionHistoryEnabled=function(){var a=this.getCurrentFile();return null!=a&&(a.constructor==DriveFile&&a.isEditable()||a.constructor==DropboxFile)};EditorUi.prototype.getServiceName=function(){return"draw.io"};EditorUi.prototype.addRemoteServiceSecurityCheck=function(a){a.setRequestHeader("Content-Language","da, mi, en, de-DE")};EditorUi.prototype.loadUrl=function(a,b,d,f,k,m,p,t){EditorUi.logEvent("SHOULD NOT BE CALLED: loadUrl");
-return this.editor.loadUrl(a,b,d,f,k,m,p,t)};EditorUi.prototype.loadFonts=function(a){EditorUi.logEvent("SHOULD NOT BE CALLED: loadFonts");return this.editor.loadFonts(a)};EditorUi.prototype.createSvgDataUri=function(a){EditorUi.logEvent("SHOULD NOT BE CALLED: createSvgDataUri");return Editor.createSvgDataUri(a)};EditorUi.prototype.embedCssFonts=function(a,b){EditorUi.logEvent("SHOULD NOT BE CALLED: embedCssFonts");return this.editor.embedCssFonts(a,b)};EditorUi.prototype.embedExtFonts=function(a){EditorUi.logEvent("SHOULD NOT BE CALLED: embedExtFonts");
-return this.editor.embedExtFonts(a)};EditorUi.prototype.exportToCanvas=function(a,b,d,f,k,m,p,t,A,x,G,z,E,H,K,F){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas");return this.editor.exportToCanvas(a,b,d,f,k,m,p,t,A,x,G,z,E,H,K,F)};EditorUi.prototype.createImageUrlConverter=function(){EditorUi.logEvent("SHOULD NOT BE CALLED: createImageUrlConverter");return this.editor.createImageUrlConverter()};EditorUi.prototype.convertImages=function(a,b,d,f){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImages");
+c&&c.getRevisions?c.getRevisions(a,b):b({message:mxResources.get("unknownError")})};EditorUi.prototype.isRevisionHistoryEnabled=function(){var a=this.getCurrentFile();return null!=a&&(a.constructor==DriveFile&&a.isEditable()||a.constructor==DropboxFile)};EditorUi.prototype.getServiceName=function(){return"draw.io"};EditorUi.prototype.addRemoteServiceSecurityCheck=function(a){a.setRequestHeader("Content-Language","da, mi, en, de-DE")};EditorUi.prototype.loadUrl=function(a,b,d,f,g,m,p,t){EditorUi.logEvent("SHOULD NOT BE CALLED: loadUrl");
+return this.editor.loadUrl(a,b,d,f,g,m,p,t)};EditorUi.prototype.loadFonts=function(a){EditorUi.logEvent("SHOULD NOT BE CALLED: loadFonts");return this.editor.loadFonts(a)};EditorUi.prototype.createSvgDataUri=function(a){EditorUi.logEvent("SHOULD NOT BE CALLED: createSvgDataUri");return Editor.createSvgDataUri(a)};EditorUi.prototype.embedCssFonts=function(a,b){EditorUi.logEvent("SHOULD NOT BE CALLED: embedCssFonts");return this.editor.embedCssFonts(a,b)};EditorUi.prototype.embedExtFonts=function(a){EditorUi.logEvent("SHOULD NOT BE CALLED: embedExtFonts");
+return this.editor.embedExtFonts(a)};EditorUi.prototype.exportToCanvas=function(a,b,d,f,g,m,p,t,A,x,G,z,E,H,K,F){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas");return this.editor.exportToCanvas(a,b,d,f,g,m,p,t,A,x,G,z,E,H,K,F)};EditorUi.prototype.createImageUrlConverter=function(){EditorUi.logEvent("SHOULD NOT BE CALLED: createImageUrlConverter");return this.editor.createImageUrlConverter()};EditorUi.prototype.convertImages=function(a,b,d,f){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImages");
return this.editor.convertImages(a,b,d,f)};EditorUi.prototype.convertImageToDataUri=function(a,b){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImageToDataUri");return this.editor.convertImageToDataUri(a,b)};EditorUi.prototype.base64Encode=function(a){EditorUi.logEvent("SHOULD NOT BE CALLED: base64Encode");return Editor.base64Encode(a)};EditorUi.prototype.updateCRC=function(a,b,d,f){EditorUi.logEvent("SHOULD NOT BE CALLED: updateCRC");return Editor.updateCRC(a,b,d,f)};EditorUi.prototype.crc32=function(a){EditorUi.logEvent("SHOULD NOT BE CALLED: crc32");
-return Editor.crc32(a)};EditorUi.prototype.writeGraphModelToPng=function(a,b,d,f,k){EditorUi.logEvent("SHOULD NOT BE CALLED: writeGraphModelToPng");return Editor.writeGraphModelToPng(a,b,d,f,k)};EditorUi.prototype.getLocalStorageFileNames=function(){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;for(var a=[],b=0;b<localStorage.length;b++){var d=localStorage.key(b),f=localStorage.getItem(d);if(0<d.length&&(".scratchpad"==d||"."!=d.charAt(0))&&0<f.length){var k=
-"<mxfile "===f.substring(0,8)||"<?xml"===f.substring(0,5)||"\x3c!--[if IE]>"===f.substring(0,12),f="<mxlibrary>"===f.substring(0,11);(k||f)&&a.push(d)}}return a};EditorUi.prototype.getLocalStorageFile=function(a){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;var b=localStorage.getItem(a);return{title:a,data:b,isLib:"<mxlibrary>"===b.substring(0,11)}};EditorUi.prototype.setMigratedFlag=function(){localStorage.setItem(".localStorageMigrated","1")}})();
-var CommentsWindow=function(a,b,d,k,f,m){function p(){for(var a=z.getElementsByTagName("div"),b=0,c=0;c<a.length;c++)"none"!=a[c].style.display&&a[c].parentNode==z&&b++;E.style.display=0==b?"block":"none"}function c(a,b,c,d){function e(){b.removeChild(k);b.removeChild(l);g.style.display="block";f.style.display="block"}A={div:b,comment:a,saveCallback:c,deleteOnCancel:d};var f=b.querySelector(".geCommentTxt"),g=b.querySelector(".geCommentActionsList"),k=document.createElement("textarea");k.className=
+return Editor.crc32(a)};EditorUi.prototype.writeGraphModelToPng=function(a,b,d,f,g){EditorUi.logEvent("SHOULD NOT BE CALLED: writeGraphModelToPng");return Editor.writeGraphModelToPng(a,b,d,f,g)};EditorUi.prototype.getLocalStorageFileNames=function(){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;for(var a=[],b=0;b<localStorage.length;b++){var d=localStorage.key(b),f=localStorage.getItem(d);if(0<d.length&&(".scratchpad"==d||"."!=d.charAt(0))&&0<f.length){var g=
+"<mxfile "===f.substring(0,8)||"<?xml"===f.substring(0,5)||"\x3c!--[if IE]>"===f.substring(0,12),f="<mxlibrary>"===f.substring(0,11);(g||f)&&a.push(d)}}return a};EditorUi.prototype.getLocalStorageFile=function(a){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;var b=localStorage.getItem(a);return{title:a,data:b,isLib:"<mxlibrary>"===b.substring(0,11)}};EditorUi.prototype.setMigratedFlag=function(){localStorage.setItem(".localStorageMigrated","1")}})();
+var CommentsWindow=function(a,b,d,g,f,m){function p(){for(var a=z.getElementsByTagName("div"),b=0,c=0;c<a.length;c++)"none"!=a[c].style.display&&a[c].parentNode==z&&b++;E.style.display=0==b?"block":"none"}function c(a,b,c,d){function e(){b.removeChild(k);b.removeChild(l);g.style.display="block";f.style.display="block"}A={div:b,comment:a,saveCallback:c,deleteOnCancel:d};var f=b.querySelector(".geCommentTxt"),g=b.querySelector(".geCommentActionsList"),k=document.createElement("textarea");k.className=
"geCommentEditTxtArea";k.style.minHeight=f.offsetHeight+"px";k.value=a.content;b.insertBefore(k,f);var l=document.createElement("div");l.className="geCommentEditBtns";var m=mxUtils.button(mxResources.get("cancel"),function(){d?(b.parentNode.removeChild(b),p()):e();A=null});m.className="geCommentEditBtn";l.appendChild(m);var n=mxUtils.button(mxResources.get("save"),function(){f.innerHTML="";a.content=k.value;mxUtils.write(f,a.content);e();c(a);A=null});mxEvent.addListener(k,"keydown",mxUtils.bind(this,
function(a){mxEvent.isConsumed(a)||((mxEvent.isControlDown(a)||mxClient.IS_MAC&&mxEvent.isMetaDown(a))&&13==a.keyCode?(n.click(),mxEvent.consume(a)):27==a.keyCode&&(m.click(),mxEvent.consume(a)))}));n.focus();n.className="geCommentEditBtn gePrimaryBtn";l.appendChild(n);b.insertBefore(l,f);g.style.display="none";f.style.display="none";k.focus()}function e(b,c){c.innerHTML="";var d=new Date(b.modifiedDate),e=a.timeSince(d);null==e&&(e=mxResources.get("lessThanAMinute"));mxUtils.write(c,mxResources.get("timeAgo",
-[e],"{1} ago"));c.setAttribute("title",d.toLocaleDateString()+" "+d.toLocaleTimeString())}function g(a){var b=document.createElement("img");b.className="geCommentBusyImg";b.src=IMAGE_PATH+"/spin.gif";a.appendChild(b);a.busyImg=b}function n(a){a.style.border="1px solid red";a.removeChild(a.busyImg)}function l(a){a.style.border="";a.removeChild(a.busyImg)}function q(b,d,f,k,m){function v(a,c,d){var e=document.createElement("li");e.className="geCommentAction";var f=document.createElement("a");f.className=
-"geCommentActionLnk";mxUtils.write(f,a);e.appendChild(f);mxEvent.addListener(f,"click",function(a){c(a,b);a.preventDefault();mxEvent.consume(a)});K.appendChild(e);d&&(e.style.display="none")}function N(){function a(b){c.push(d);if(null!=b.replies)for(var e=0;e<b.replies.length;e++)d=d.nextSibling,a(b.replies[e])}var c=[],d=x;a(b);return{pdiv:d,replies:c}}function C(d,e,f,m,p){function v(){g(C);b.addReply(z,function(a){z.id=a;b.replies.push(z);l(C);f&&f()},function(b){t();n(C);a.handleError(b,null,
-null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},m,p)}function t(){c(z,C,function(a){v()},!0)}var u=N().pdiv,z=a.newComment(d,a.getCurrentUser());z.pCommentId=b.id;null==b.replies&&(b.replies=[]);var C=q(z,b.replies,u,k+1);e?t():v()}if(m||!b.isResolved){E.style.display="none";var x=document.createElement("div");x.className="geCommentContainer";x.setAttribute("data-commentId",b.id);x.style.marginLeft=20*k+5+"px";b.isResolved&&!Editor.isDarkMode()&&(x.style.backgroundColor="ghostWhite");
-var D=document.createElement("div");D.className="geCommentHeader";var O=document.createElement("img");O.className="geCommentUserImg";O.src=b.user.pictureUrl||Editor.userImage;D.appendChild(O);O=document.createElement("div");O.className="geCommentHeaderTxt";D.appendChild(O);var H=document.createElement("div");H.className="geCommentUsername";mxUtils.write(H,b.user.displayName||"");O.appendChild(H);H=document.createElement("div");H.className="geCommentDate";H.setAttribute("data-commentId",b.id);e(b,
-H);O.appendChild(H);x.appendChild(D);D=document.createElement("div");D.className="geCommentTxt";mxUtils.write(D,b.content||"");x.appendChild(D);b.isLocked&&(x.style.opacity="0.5");D=document.createElement("div");D.className="geCommentActions";var K=document.createElement("ul");K.className="geCommentActionsList";D.appendChild(K);u||b.isLocked||0!=k&&!t||v(mxResources.get("reply"),function(){C("",!0)},b.isResolved);O=a.getCurrentUser();null==O||O.id!=b.user.id||u||b.isLocked||(v(mxResources.get("edit"),
-function(){function d(){c(b,x,function(){g(x);b.editComment(b.content,function(){l(x)},function(b){n(x);d();a.handleError(b,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}d()},b.isResolved),v(mxResources.get("delete"),function(){a.confirm(mxResources.get("areYouSure"),function(){g(x);b.deleteComment(function(a){if(!0===a){a=x.querySelector(".geCommentTxt");a.innerHTML="";mxUtils.write(a,mxResources.get("msgDeleted"));var c=x.querySelectorAll(".geCommentAction");for(a=
-0;a<c.length;a++)c[a].parentNode.removeChild(c[a]);l(x);x.style.opacity="0.5"}else{c=N(b).replies;for(a=0;a<c.length;a++)z.removeChild(c[a]);for(a=0;a<d.length;a++)if(d[a]==b){d.splice(a,1);break}E.style.display=0==z.getElementsByTagName("div").length?"block":"none"}},function(b){n(x);a.handleError(b,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},b.isResolved));u||b.isLocked||0!=k||v(b.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(a){function c(){var c=
-a.target;c.innerHTML="";b.isResolved=!b.isResolved;mxUtils.write(c,b.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var d=b.isResolved?"none":"",e=N(b).replies,f=Editor.isDarkMode()?"transparent":b.isResolved?"ghostWhite":"white",g=0;g<e.length;g++){e[g].style.backgroundColor=f;for(var k=e[g].querySelectorAll(".geCommentAction"),l=0;l<k.length;l++)k[l]!=c.parentNode&&(k[l].style.display=d);F||(e[g].style.display="none")}p()}b.isResolved?C(mxResources.get("reOpened")+": ",!0,
-c,!1,!0):C(mxResources.get("markedAsResolved"),!1,c,!0)});x.appendChild(D);null!=f?z.insertBefore(x,f.nextSibling):z.appendChild(x);for(f=0;null!=b.replies&&f<b.replies.length;f++)D=b.replies[f],D.isResolved=b.isResolved,q(D,b.replies,null,k+1,m);null!=A&&(A.comment.id==b.id?(m=b.content,b.content=A.comment.content,c(b,x,A.saveCallback,A.deleteOnCancel),b.content=m):null==A.comment.id&&A.comment.pCommentId==b.id&&(z.appendChild(A.div),c(A.comment,A.div,A.saveCallback,A.deleteOnCancel)));return x}}
+[e],"{1} ago"));c.setAttribute("title",d.toLocaleDateString()+" "+d.toLocaleTimeString())}function k(a){var b=document.createElement("img");b.className="geCommentBusyImg";b.src=IMAGE_PATH+"/spin.gif";a.appendChild(b);a.busyImg=b}function n(a){a.style.border="1px solid red";a.removeChild(a.busyImg)}function l(a){a.style.border="";a.removeChild(a.busyImg)}function q(b,d,f,g,m){function v(a,c,d){var e=document.createElement("li");e.className="geCommentAction";var f=document.createElement("a");f.className=
+"geCommentActionLnk";mxUtils.write(f,a);e.appendChild(f);mxEvent.addListener(f,"click",function(a){c(a,b);a.preventDefault();mxEvent.consume(a)});K.appendChild(e);d&&(e.style.display="none")}function N(){function a(b){c.push(d);if(null!=b.replies)for(var e=0;e<b.replies.length;e++)d=d.nextSibling,a(b.replies[e])}var c=[],d=x;a(b);return{pdiv:d,replies:c}}function D(d,e,f,m,p){function v(){k(D);b.addReply(z,function(a){z.id=a;b.replies.push(z);l(D);f&&f()},function(b){t();n(D);a.handleError(b,null,
+null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},m,p)}function t(){c(z,D,function(a){v()},!0)}var u=N().pdiv,z=a.newComment(d,a.getCurrentUser());z.pCommentId=b.id;null==b.replies&&(b.replies=[]);var D=q(z,b.replies,u,g+1);e?t():v()}if(m||!b.isResolved){E.style.display="none";var x=document.createElement("div");x.className="geCommentContainer";x.setAttribute("data-commentId",b.id);x.style.marginLeft=20*g+5+"px";b.isResolved&&!Editor.isDarkMode()&&(x.style.backgroundColor="ghostWhite");
+var C=document.createElement("div");C.className="geCommentHeader";var O=document.createElement("img");O.className="geCommentUserImg";O.src=b.user.pictureUrl||Editor.userImage;C.appendChild(O);O=document.createElement("div");O.className="geCommentHeaderTxt";C.appendChild(O);var H=document.createElement("div");H.className="geCommentUsername";mxUtils.write(H,b.user.displayName||"");O.appendChild(H);H=document.createElement("div");H.className="geCommentDate";H.setAttribute("data-commentId",b.id);e(b,
+H);O.appendChild(H);x.appendChild(C);C=document.createElement("div");C.className="geCommentTxt";mxUtils.write(C,b.content||"");x.appendChild(C);b.isLocked&&(x.style.opacity="0.5");C=document.createElement("div");C.className="geCommentActions";var K=document.createElement("ul");K.className="geCommentActionsList";C.appendChild(K);u||b.isLocked||0!=g&&!t||v(mxResources.get("reply"),function(){D("",!0)},b.isResolved);O=a.getCurrentUser();null==O||O.id!=b.user.id||u||b.isLocked||(v(mxResources.get("edit"),
+function(){function d(){c(b,x,function(){k(x);b.editComment(b.content,function(){l(x)},function(b){n(x);d();a.handleError(b,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}d()},b.isResolved),v(mxResources.get("delete"),function(){a.confirm(mxResources.get("areYouSure"),function(){k(x);b.deleteComment(function(a){if(!0===a){a=x.querySelector(".geCommentTxt");a.innerHTML="";mxUtils.write(a,mxResources.get("msgDeleted"));var c=x.querySelectorAll(".geCommentAction");for(a=
+0;a<c.length;a++)c[a].parentNode.removeChild(c[a]);l(x);x.style.opacity="0.5"}else{c=N(b).replies;for(a=0;a<c.length;a++)z.removeChild(c[a]);for(a=0;a<d.length;a++)if(d[a]==b){d.splice(a,1);break}E.style.display=0==z.getElementsByTagName("div").length?"block":"none"}},function(b){n(x);a.handleError(b,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},b.isResolved));u||b.isLocked||0!=g||v(b.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(a){function c(){var c=
+a.target;c.innerHTML="";b.isResolved=!b.isResolved;mxUtils.write(c,b.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var d=b.isResolved?"none":"",e=N(b).replies,f=Editor.isDarkMode()?"transparent":b.isResolved?"ghostWhite":"white",g=0;g<e.length;g++){e[g].style.backgroundColor=f;for(var k=e[g].querySelectorAll(".geCommentAction"),l=0;l<k.length;l++)k[l]!=c.parentNode&&(k[l].style.display=d);F||(e[g].style.display="none")}p()}b.isResolved?D(mxResources.get("reOpened")+": ",!0,
+c,!1,!0):D(mxResources.get("markedAsResolved"),!1,c,!0)});x.appendChild(C);null!=f?z.insertBefore(x,f.nextSibling):z.appendChild(x);for(f=0;null!=b.replies&&f<b.replies.length;f++)C=b.replies[f],C.isResolved=b.isResolved,q(C,b.replies,null,g+1,m);null!=A&&(A.comment.id==b.id?(m=b.content,b.content=A.comment.content,c(b,x,A.saveCallback,A.deleteOnCancel),b.content=m):null==A.comment.id&&A.comment.pCommentId==b.id&&(z.appendChild(A.div),c(A.comment,A.div,A.saveCallback,A.deleteOnCancel)));return x}}
var u=!a.canComment(),t=a.canReplyToReplies(),A=null,x=document.createElement("div");x.className="geCommentsWin";x.style.background=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";var G=EditorUi.compactUi?"26px":"30px",z=document.createElement("div");z.className="geCommentsList";z.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";z.style.bottom=parseInt(G)+7+"px";x.appendChild(z);var E=document.createElement("span");E.style.cssText="display:none;padding-top:10px;text-align:center;";
mxUtils.write(E,mxResources.get("noCommentsFound"));var H=document.createElement("div");H.className="geToolbarContainer geCommentsToolbar";H.style.height=G;H.style.padding=EditorUi.compactUi?"4px 0px 3px 0px":"1px";H.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";G=document.createElement("a");G.className="geButton";if(!u){var K=G.cloneNode();K.innerHTML='<div class="geSprite geSprite-plus" style="display:inline-block;"></div>';K.setAttribute("title",mxResources.get("create")+
-"...");mxEvent.addListener(K,"click",function(b){function d(){c(e,f,function(b){g(f);a.addComment(b,function(a){b.id=a;I.push(b);l(f)},function(b){n(f);d();a.handleError(b,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},!0)}var e=a.newComment("",a.getCurrentUser()),f=q(e,I,null,0);d();b.preventDefault();mxEvent.consume(b)});H.appendChild(K)}K=G.cloneNode();K.innerHTML='<img src="'+IMAGE_PATH+'/check.png" style="width: 16px; padding: 2px;">';K.setAttribute("title",mxResources.get("showResolved"));
-var F=!1;Editor.isDarkMode()&&(K.style.filter="invert(100%)");mxEvent.addListener(K,"click",function(a){this.className=(F=!F)?"geButton geCheckedBtn":"geButton";C();a.preventDefault();mxEvent.consume(a)});H.appendChild(K);a.commentsRefreshNeeded()&&(K=G.cloneNode(),K.innerHTML='<img src="'+IMAGE_PATH+'/update16.png" style="width: 16px; padding: 2px;">',K.setAttribute("title",mxResources.get("refresh")),Editor.isDarkMode()&&(K.style.filter="invert(100%)"),mxEvent.addListener(K,"click",function(a){C();
-a.preventDefault();mxEvent.consume(a)}),H.appendChild(K));a.commentsSaveNeeded()&&(G=G.cloneNode(),G.innerHTML='<img src="'+IMAGE_PATH+'/save.png" style="width: 20px; padding: 2px;">',G.setAttribute("title",mxResources.get("save")),Editor.isDarkMode()&&(G.style.filter="invert(100%)"),mxEvent.addListener(G,"click",function(a){m();a.preventDefault();mxEvent.consume(a)}),H.appendChild(G));x.appendChild(H);var I=[],C=mxUtils.bind(this,function(){this.hasError=!1;if(null!=A)try{A.div=A.div.cloneNode(!0);
+"...");mxEvent.addListener(K,"click",function(b){function d(){c(e,f,function(b){k(f);a.addComment(b,function(a){b.id=a;I.push(b);l(f)},function(b){n(f);d();a.handleError(b,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},!0)}var e=a.newComment("",a.getCurrentUser()),f=q(e,I,null,0);d();b.preventDefault();mxEvent.consume(b)});H.appendChild(K)}K=G.cloneNode();K.innerHTML='<img src="'+IMAGE_PATH+'/check.png" style="width: 16px; padding: 2px;">';K.setAttribute("title",mxResources.get("showResolved"));
+var F=!1;Editor.isDarkMode()&&(K.style.filter="invert(100%)");mxEvent.addListener(K,"click",function(a){this.className=(F=!F)?"geButton geCheckedBtn":"geButton";D();a.preventDefault();mxEvent.consume(a)});H.appendChild(K);a.commentsRefreshNeeded()&&(K=G.cloneNode(),K.innerHTML='<img src="'+IMAGE_PATH+'/update16.png" style="width: 16px; padding: 2px;">',K.setAttribute("title",mxResources.get("refresh")),Editor.isDarkMode()&&(K.style.filter="invert(100%)"),mxEvent.addListener(K,"click",function(a){D();
+a.preventDefault();mxEvent.consume(a)}),H.appendChild(K));a.commentsSaveNeeded()&&(G=G.cloneNode(),G.innerHTML='<img src="'+IMAGE_PATH+'/save.png" style="width: 20px; padding: 2px;">',G.setAttribute("title",mxResources.get("save")),Editor.isDarkMode()&&(G.style.filter="invert(100%)"),mxEvent.addListener(G,"click",function(a){m();a.preventDefault();mxEvent.consume(a)}),H.appendChild(G));x.appendChild(H);var I=[],D=mxUtils.bind(this,function(){this.hasError=!1;if(null!=A)try{A.div=A.div.cloneNode(!0);
var b=A.div.querySelector(".geCommentEditTxtArea"),d=A.div.querySelector(".geCommentEditBtns");A.comment.content=b.value;b.parentNode.removeChild(b);d.parentNode.removeChild(d)}catch(N){a.handleError(N)}z.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+IMAGE_PATH+'/spin.gif" valign="middle"> '+mxUtils.htmlEntities(mxResources.get("loading"))+"...</div>";t=a.canReplyToReplies();a.commentsSupported()?a.getComments(function(a){function b(a){if(null!=a){a.sort(function(a,b){return new Date(a.modifiedDate)-
new Date(b.modifiedDate)});for(var c=0;c<a.length;c++)b(a[c].replies)}}a.sort(function(a,b){return new Date(a.modifiedDate)-new Date(b.modifiedDate)});z.innerHTML="";z.appendChild(E);E.style.display="block";I=a;for(a=0;a<I.length;a++)b(I[a].replies),q(I[a],I,null,0,F);null!=A&&null==A.comment.id&&null==A.comment.pCommentId&&(z.appendChild(A.div),c(A.comment,A.div,A.saveCallback,A.deleteOnCancel))},mxUtils.bind(this,function(a){z.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(a&&a.message?
-": "+a.message:""));this.hasError=!0})):z.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});C();this.refreshComments=C;H=mxUtils.bind(this,function(){function a(b){var d=c[b.id];if(null!=d)for(e(b,d),d=0;null!=b.replies&&d<b.replies.length;d++)a(b.replies[d])}if(this.window.isVisible()){for(var b=z.querySelectorAll(".geCommentDate"),c={},d=0;d<b.length;d++){var f=b[d];c[f.getAttribute("data-commentId")]=f}for(d=0;d<I.length;d++)a(I[d])}});setInterval(H,6E4);this.refreshCommentsTime=H;this.window=
-new mxWindow(mxResources.get("comments"),x,b,d,k,f,!0,!0);this.window.minimumSize=new mxRectangle(0,0,300,200);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.window.fit()}));this.window.setLocation=function(a,b){var c=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;a=Math.max(0,Math.min(a,(window.innerWidth||
+": "+a.message:""));this.hasError=!0})):z.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});D();this.refreshComments=D;H=mxUtils.bind(this,function(){function a(b){var d=c[b.id];if(null!=d)for(e(b,d),d=0;null!=b.replies&&d<b.replies.length;d++)a(b.replies[d])}if(this.window.isVisible()){for(var b=z.querySelectorAll(".geCommentDate"),c={},d=0;d<b.length;d++){var f=b[d];c[f.getAttribute("data-commentId")]=f}for(d=0;d<I.length;d++)a(I[d])}});setInterval(H,6E4);this.refreshCommentsTime=H;this.window=
+new mxWindow(mxResources.get("comments"),x,b,d,g,f,!0,!0);this.window.minimumSize=new mxRectangle(0,0,300,200);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.window.fit()}));this.window.setLocation=function(a,b){var c=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;a=Math.max(0,Math.min(a,(window.innerWidth||
document.body.clientWidth||document.documentElement.clientWidth)-this.table.clientWidth));b=Math.max(0,Math.min(b,c-this.table.clientHeight-48));this.getX()==a&&this.getY()==b||mxWindow.prototype.setLocation.apply(this,arguments)};var M=mxUtils.bind(this,function(){var a=this.window.getX(),b=this.window.getY();this.window.setLocation(a,b)});mxEvent.addListener(window,"resize",M);this.destroy=function(){mxEvent.removeListener(window,"resize",M);this.window.destroy()}},ConfirmDialog=function(a,b,d,
-k,f,m,p,c,e,g,n){var l=document.createElement("div");l.style.textAlign="center";n=null!=n?n:44;var q=document.createElement("div");q.style.padding="6px";q.style.overflow="auto";q.style.maxHeight=n+"px";q.style.lineHeight="1.2em";mxUtils.write(q,b);l.appendChild(q);null!=g&&(q=document.createElement("div"),q.style.padding="6px 0 6px 0",b=document.createElement("img"),b.setAttribute("src",g),q.appendChild(b),l.appendChild(q));g=document.createElement("div");g.style.textAlign="center";g.style.whiteSpace=
-"nowrap";var u=document.createElement("input");u.setAttribute("type","checkbox");m=mxUtils.button(m||mxResources.get("cancel"),function(){a.hideDialog();null!=k&&k(u.checked)});m.className="geBtn";null!=c&&(m.innerHTML=c+"<br>"+m.innerHTML,m.style.paddingBottom="8px",m.style.paddingTop="8px",m.style.height="auto",m.style.width="40%");a.editor.cancelFirst&&g.appendChild(m);var t=mxUtils.button(f||mxResources.get("ok"),function(){a.hideDialog();null!=d&&d(u.checked)});g.appendChild(t);null!=p?(t.innerHTML=
-p+"<br>"+t.innerHTML+"<br>",t.style.paddingBottom="8px",t.style.paddingTop="8px",t.style.height="auto",t.className="geBtn",t.style.width="40%"):t.className="geBtn gePrimaryBtn";a.editor.cancelFirst||g.appendChild(m);l.appendChild(g);e?(g.style.marginTop="10px",q=document.createElement("p"),q.style.marginTop="20px",q.style.marginBottom="0px",q.appendChild(u),f=document.createElement("span"),mxUtils.write(f," "+mxResources.get("rememberThisSetting")),q.appendChild(f),l.appendChild(q),mxEvent.addListener(f,
-"click",function(a){u.checked=!u.checked;mxEvent.consume(a)})):g.style.marginTop="12px";this.init=function(){t.focus()};this.container=l};function DiagramPage(a,b){this.node=a;null!=b?this.node.setAttribute("id",b):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")};
+g,f,m,p,c,e,k,n){var l=document.createElement("div");l.style.textAlign="center";n=null!=n?n:44;var q=document.createElement("div");q.style.padding="6px";q.style.overflow="auto";q.style.maxHeight=n+"px";q.style.lineHeight="1.2em";mxUtils.write(q,b);l.appendChild(q);null!=k&&(q=document.createElement("div"),q.style.padding="6px 0 6px 0",b=document.createElement("img"),b.setAttribute("src",k),q.appendChild(b),l.appendChild(q));k=document.createElement("div");k.style.textAlign="center";k.style.whiteSpace=
+"nowrap";var u=document.createElement("input");u.setAttribute("type","checkbox");m=mxUtils.button(m||mxResources.get("cancel"),function(){a.hideDialog();null!=g&&g(u.checked)});m.className="geBtn";null!=c&&(m.innerHTML=c+"<br>"+m.innerHTML,m.style.paddingBottom="8px",m.style.paddingTop="8px",m.style.height="auto",m.style.width="40%");a.editor.cancelFirst&&k.appendChild(m);var t=mxUtils.button(f||mxResources.get("ok"),function(){a.hideDialog();null!=d&&d(u.checked)});k.appendChild(t);null!=p?(t.innerHTML=
+p+"<br>"+t.innerHTML+"<br>",t.style.paddingBottom="8px",t.style.paddingTop="8px",t.style.height="auto",t.className="geBtn",t.style.width="40%"):t.className="geBtn gePrimaryBtn";a.editor.cancelFirst||k.appendChild(m);l.appendChild(k);e?(k.style.marginTop="10px",q=document.createElement("p"),q.style.marginTop="20px",q.style.marginBottom="0px",q.appendChild(u),f=document.createElement("span"),mxUtils.write(f," "+mxResources.get("rememberThisSetting")),q.appendChild(f),l.appendChild(q),mxEvent.addListener(f,
+"click",function(a){u.checked=!u.checked;mxEvent.consume(a)})):k.style.marginTop="12px";this.init=function(){t.focus()};this.container=l};function DiagramPage(a,b){this.node=a;null!=b?this.node.setAttribute("id",b):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(a){null==a?this.node.removeAttribute("name"):this.node.setAttribute("name",a)};function RenamePage(a,b,d){this.ui=a;this.page=b;this.previous=this.name=d}RenamePage.prototype.execute=function(){var a=this.page.getName();this.page.setName(this.previous);this.name=this.previous;this.previous=a;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageRenamed"))};
function MovePage(a,b,d){this.ui=a;this.oldIndex=b;this.newIndex=d}MovePage.prototype.execute=function(){this.ui.pages.splice(this.newIndex,0,this.ui.pages.splice(this.oldIndex,1)[0]);var a=this.oldIndex;this.oldIndex=this.newIndex;this.newIndex=a;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageMoved"))};
function SelectPage(a,b,d){this.ui=a;this.previousPage=this.page=b;this.neverShown=!0;null!=b&&(this.neverShown=null==b.viewState,this.ui.updatePageRoot(b),null!=d&&(b.viewState=d,this.neverShown=!1))}
-SelectPage.prototype.execute=function(){var a=mxUtils.indexOf(this.ui.pages,this.previousPage);if(null!=this.page&&0<=a){var a=this.ui.currentPage,b=this.ui.editor,d=b.graph,k=Graph.compressNode(b.getGraphXml(!0));mxUtils.setTextContent(a.node,k);a.viewState=d.getViewState();a.root=d.model.root;null!=a.model&&a.model.rootChanged(a.root);d.view.clear(a.root,!0);d.clearSelection();this.ui.currentPage=this.previousPage;this.previousPage=a;a=this.ui.currentPage;d.model.prefix=Editor.guid()+"-";d.model.rootChanged(a.root);
+SelectPage.prototype.execute=function(){var a=mxUtils.indexOf(this.ui.pages,this.previousPage);if(null!=this.page&&0<=a){var a=this.ui.currentPage,b=this.ui.editor,d=b.graph,g=Graph.compressNode(b.getGraphXml(!0));mxUtils.setTextContent(a.node,g);a.viewState=d.getViewState();a.root=d.model.root;null!=a.model&&a.model.rootChanged(a.root);d.view.clear(a.root,!0);d.clearSelection();this.ui.currentPage=this.previousPage;this.previousPage=a;a=this.ui.currentPage;d.model.prefix=Editor.guid()+"-";d.model.rootChanged(a.root);
d.setViewState(a.viewState);d.gridEnabled=d.gridEnabled&&(!this.ui.editor.isChromelessView()||"1"==urlParams.grid);b.updateGraphComponents();d.view.validate();d.blockMathRender=!0;d.sizeDidChange();d.blockMathRender=!1;this.neverShown&&(this.neverShown=!1,d.selectUnlockedLayer());b.graph.fireEvent(new mxEventObject(mxEvent.ROOT));b.fireEvent(new mxEventObject("pageSelected","change",this))}};
-function ChangePage(a,b,d,k,f){SelectPage.call(this,a,d);this.relatedPage=b;this.index=k;this.previousIndex=null;this.noSelect=f}mxUtils.extend(ChangePage,SelectPage);
+function ChangePage(a,b,d,g,f){SelectPage.call(this,a,d);this.relatedPage=b;this.index=g;this.previousIndex=null;this.noSelect=f}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 a=mxUtils.indexOf(this.ui.pages,this.relatedPage);this.ui.pages.splice(a,1);this.index=a}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(){var a=null;if(null!=this.pages&&null!=this.currentPage)for(var b=0;b<this.pages.length;b++)if(this.pages[b]==this.currentPage){a=b;break}return a};EditorUi.prototype.getPageById=function(a){if(null!=this.pages)for(var b=0;b<this.pages.length;b++)if(this.pages[b].getId()==a)return this.pages[b];return null};
EditorUi.prototype.createImageForPageLink=function(a){var b=a.indexOf(","),d=null;0<b&&(b=this.getPageById(a.substring(b+1)),null!=b&&b!=this.currentPage&&(d=this.getImageForPage(b),d.originalSrc=a));null==d&&(d={originalSrc:a});return d};
-EditorUi.prototype.getImageForPage=function(a){var b=this.editor.graph.getGlobalVariable,d=this.createTemporaryGraph(this.editor.graph.getStylesheet());d.getGlobalVariable=function(a){return b.apply(this,arguments)};document.body.appendChild(d.container);this.updatePageRoot(a);d.model.setRoot(a.root);a=d.getSvg();var k=d.getGraphBounds();document.body.removeChild(d.container);return new mxImage(Editor.createSvgDataUri(mxUtils.getXml(a)),k.width,k.height,k.x,k.y)};
+EditorUi.prototype.getImageForPage=function(a){var b=this.editor.graph.getGlobalVariable,d=this.createTemporaryGraph(this.editor.graph.getStylesheet());d.getGlobalVariable=function(a){return b.apply(this,arguments)};document.body.appendChild(d.container);this.updatePageRoot(a);d.model.setRoot(a.root);a=d.getSvg();var g=d.getGraphBounds();document.body.removeChild(d.container);return new mxImage(Editor.createSvgDataUri(mxUtils.getXml(a)),g.width,g.height,g.x,g.y)};
EditorUi.prototype.initPages=function(){if(!this.editor.graph.standalone){this.actions.addAction("previousPage",mxUtils.bind(this,function(){this.selectNextPage(!1)}));this.actions.addAction("nextPage",mxUtils.bind(this,function(){this.selectNextPage(!0)}));this.isPagesEnabled()&&(this.keyHandler.bindAction(33,!0,"previousPage",!0),this.keyHandler.bindAction(34,!0,"nextPage",!0));var a=this.editor.graph,b=a.view.validateBackground;a.view.validateBackground=mxUtils.bind(this,function(){if(null!=this.tabContainer){var d=
-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";d!=this.tabContainer.style.height&&this.refresh(!1)}b.apply(a.view,arguments)});var d=null,k=mxUtils.bind(this,function(){this.updateTabContainer();var b=this.currentPage;null!=b&&b!=d&&(null==b.viewState||null==b.viewState.scrollLeft?(this.resetScrollbars(),a.isLightboxView()&&this.lightboxFit(),null!=this.chromelessResize&&
+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";d!=this.tabContainer.style.height&&this.refresh(!1)}b.apply(a.view,arguments)});var d=null,g=mxUtils.bind(this,function(){this.updateTabContainer();var b=this.currentPage;null!=b&&b!=d&&(null==b.viewState||null==b.viewState.scrollLeft?(this.resetScrollbars(),a.isLightboxView()&&this.lightboxFit(),null!=this.chromelessResize&&
(a.container.scrollLeft=0,a.container.scrollTop=0,this.chromelessResize())):(a.container.scrollLeft=a.view.translate.x*a.view.scale+b.viewState.scrollLeft,a.container.scrollTop=a.view.translate.y*a.view.scale+b.viewState.scrollTop),d=b);null!=this.actions.layersWindow&&this.actions.layersWindow.refreshLayers();"undefined"!==typeof MathJax&&"undefined"!==typeof MathJax.Hub?1!=MathJax.Hub.queue.pending||null==this.editor||this.editor.graph.mathEnabled||MathJax.Hub.Queue(mxUtils.bind(this,function(){null!=
-this.editor&&this.editor.graph.refresh()})):"undefined"===typeof Editor.MathJaxClear||null!=this.editor&&this.editor.graph.mathEnabled||Editor.MathJaxClear()});this.editor.graph.model.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(a,b){for(var d=b.getProperty("edit").changes,c=0;c<d.length;c++)if(d[c]instanceof SelectPage||d[c]instanceof RenamePage||d[c]instanceof MovePage||d[c]instanceof mxRootChange){k();break}}));null!=this.toolbar&&this.editor.addListener("pageSelected",this.toolbar.updateZoom)}};
-EditorUi.prototype.restoreViewState=function(a,b,d){a=null!=a?this.getPageById(a.getId()):null;var k=this.editor.graph;null!=a&&null!=this.currentPage&&null!=this.pages&&(a!=this.currentPage?this.selectPage(a,!0,b):(k.setViewState(b),this.editor.updateGraphComponents(),k.view.revalidate(),k.sizeDidChange()),k.container.scrollLeft=k.view.translate.x*k.view.scale+b.scrollLeft,k.container.scrollTop=k.view.translate.y*k.view.scale+b.scrollTop,k.restoreSelection(d))};
-Graph.prototype.createViewState=function(a){var b=a.getAttribute("page"),d=parseFloat(a.getAttribute("pageScale")),k=parseFloat(a.getAttribute("pageWidth")),f=parseFloat(a.getAttribute("pageHeight")),m=a.getAttribute("background"),p=this.parseBackgroundImage(a.getAttribute("backgroundImage")),c=a.getAttribute("extFonts");if(c)try{c=c.split("|").map(function(a){a=a.split("^");return{name:a[0],url:a[1]}})}catch(e){console.log("ExtFonts format error: "+e.message)}return{gridEnabled:"0"!=a.getAttribute("grid"),
-gridSize:parseFloat(a.getAttribute("gridSize"))||mxGraph.prototype.gridSize,guidesEnabled:"0"!=a.getAttribute("guides"),foldingEnabled:"0"!=a.getAttribute("fold"),shadowVisible:"1"==a.getAttribute("shadow"),pageVisible:this.isLightboxView()?!1:null!=b?"0"!=b:this.defaultPageVisible,background:null!=m&&0<m.length?m:null,backgroundImage:p,pageScale:isNaN(d)?mxGraph.prototype.pageScale:d,pageFormat:isNaN(k)||isNaN(f)?"undefined"===typeof mxSettings||null!=this.defaultPageFormat?mxGraph.prototype.pageFormat:
-mxSettings.getPageFormat():new mxRectangle(0,0,k,f),tooltips:"0"!=a.getAttribute("tooltips"),connect:"0"!=a.getAttribute("connect"),arrows:"0"!=a.getAttribute("arrows"),mathEnabled:"1"==a.getAttribute("math"),selectionCells:null,defaultParent:null,scrollbars:this.defaultScrollbars,scale:1,extFonts:c||[]}};
-Graph.prototype.saveViewState=function(a,b,d){d||(b.setAttribute("grid",null==a||a.gridEnabled?"1":"0"),b.setAttribute("gridSize",null!=a?a.gridSize:mxGraph.prototype.gridSize),b.setAttribute("guides",null==a||a.guidesEnabled?"1":"0"),b.setAttribute("tooltips",null==a||a.tooltips?"1":"0"),b.setAttribute("connect",null==a||a.connect?"1":"0"),b.setAttribute("arrows",null==a||a.arrows?"1":"0"),b.setAttribute("page",null==a&&this.defaultPageVisible||null!=a&&a.pageVisible?"1":"0"),b.setAttribute("fold",
-null==a||a.foldingEnabled?"1":"0"));b.setAttribute("pageScale",null!=a&&null!=a.pageScale?a.pageScale:mxGraph.prototype.pageScale);d=null!=a?a.pageFormat:"undefined"===typeof mxSettings||null!=this.defaultPageFormat?mxGraph.prototype.pageFormat:mxSettings.getPageFormat();null!=d&&(b.setAttribute("pageWidth",d.width),b.setAttribute("pageHeight",d.height));null!=a&&null!=a.background&&b.setAttribute("background",a.background);d=this.getBackgroundImageObject(a.backgroundImage);null!=d&&b.setAttribute("backgroundImage",
-JSON.stringify(d));b.setAttribute("math",null!=a&&a.mathEnabled?"1":"0");b.setAttribute("shadow",null!=a&&a.shadowVisible?"1":"0");null!=a&&null!=a.extFonts&&0<a.extFonts.length&&b.setAttribute("extFonts",a.extFonts.map(function(a){return a.name+"^"+a.url}).join("|"))};
+this.editor&&this.editor.graph.refresh()})):"undefined"===typeof Editor.MathJaxClear||null!=this.editor&&this.editor.graph.mathEnabled||Editor.MathJaxClear()});this.editor.graph.model.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(a,b){for(var d=b.getProperty("edit").changes,c=0;c<d.length;c++)if(d[c]instanceof SelectPage||d[c]instanceof RenamePage||d[c]instanceof MovePage||d[c]instanceof mxRootChange){g();break}}));null!=this.toolbar&&this.editor.addListener("pageSelected",this.toolbar.updateZoom)}};
+EditorUi.prototype.restoreViewState=function(a,b,d){a=null!=a?this.getPageById(a.getId()):null;var g=this.editor.graph;null!=a&&null!=this.currentPage&&null!=this.pages&&(a!=this.currentPage?this.selectPage(a,!0,b):(g.setViewState(b),this.editor.updateGraphComponents(),g.view.revalidate(),g.sizeDidChange()),g.container.scrollLeft=g.view.translate.x*g.view.scale+b.scrollLeft,g.container.scrollTop=g.view.translate.y*g.view.scale+b.scrollTop,g.restoreSelection(d))};
+Graph.prototype.createViewState=function(a){var b=a.getAttribute("page"),d=parseFloat(a.getAttribute("pageScale")),g=parseFloat(a.getAttribute("pageWidth")),f=parseFloat(a.getAttribute("pageHeight")),m=a.getAttribute("background"),p=this.parseBackgroundImage(a.getAttribute("backgroundImage")),c=a.getAttribute("extFonts");if(c)try{c=c.split("|").map(function(a){a=a.split("^");return{name:a[0],url:a[1]}})}catch(e){console.log("ExtFonts format error: "+e.message)}return{gridEnabled:"0"!=a.getAttribute("grid"),
+gridSize:parseFloat(a.getAttribute("gridSize"))||mxGraph.prototype.gridSize,guidesEnabled:"0"!=a.getAttribute("guides"),foldingEnabled:"0"!=a.getAttribute("fold"),shadowVisible:"1"==a.getAttribute("shadow"),pageVisible:this.isLightboxView()?!1:null!=b?"0"!=b:this.defaultPageVisible,background:null!=m&&0<m.length?m:null,backgroundImage:p,pageScale:isNaN(d)?mxGraph.prototype.pageScale:d,pageFormat:isNaN(g)||isNaN(f)?"undefined"===typeof mxSettings||null!=this.defaultPageFormat?mxGraph.prototype.pageFormat:
+mxSettings.getPageFormat():new mxRectangle(0,0,g,f),tooltips:"0"!=a.getAttribute("tooltips"),connect:"0"!=a.getAttribute("connect"),arrows:"0"!=a.getAttribute("arrows"),mathEnabled:"1"==a.getAttribute("math"),selectionCells:null,defaultParent:null,scrollbars:this.defaultScrollbars,scale:1,extFonts:c||[]}};
+Graph.prototype.saveViewState=function(a,b,d,g){d||(b.setAttribute("grid",null==a||a.gridEnabled?"1":"0"),b.setAttribute("gridSize",null!=a?a.gridSize:mxGraph.prototype.gridSize),b.setAttribute("guides",null==a||a.guidesEnabled?"1":"0"),b.setAttribute("tooltips",null==a||a.tooltips?"1":"0"),b.setAttribute("connect",null==a||a.connect?"1":"0"),b.setAttribute("arrows",null==a||a.arrows?"1":"0"),b.setAttribute("page",null==a&&this.defaultPageVisible||null!=a&&a.pageVisible?"1":"0"),b.setAttribute("fold",
+null==a||a.foldingEnabled?"1":"0"));b.setAttribute("pageScale",null!=a&&null!=a.pageScale?a.pageScale:mxGraph.prototype.pageScale);d=null!=a?a.pageFormat:"undefined"===typeof mxSettings||null!=this.defaultPageFormat?mxGraph.prototype.pageFormat:mxSettings.getPageFormat();null!=d&&(b.setAttribute("pageWidth",d.width),b.setAttribute("pageHeight",d.height));null!=a&&null!=a.background&&b.setAttribute("background",a.background);g=this.getBackgroundImageObject(a.backgroundImage,g);null!=g&&b.setAttribute("backgroundImage",
+JSON.stringify(g));b.setAttribute("math",null!=a&&a.mathEnabled?"1":"0");b.setAttribute("shadow",null!=a&&a.shadowVisible?"1":"0");null!=a&&null!=a.extFonts&&0<a.extFonts.length&&b.setAttribute("extFonts",a.extFonts.map(function(a){return a.name+"^"+a.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,extFonts:this.extFonts}};
Graph.prototype.setViewState=function(a,b){if(null!=a){this.lastPasteXml=a.lastPasteXml;this.pasteCounter=a.pasteCounter||0;this.mathEnabled=a.mathEnabled;this.gridEnabled=a.gridEnabled;this.gridSize=a.gridSize;this.graphHandler.guidesEnabled=a.guidesEnabled;this.foldingEnabled=a.foldingEnabled;this.setShadowVisible(a.shadowVisible,!1);this.scrollbars=a.scrollbars;this.pageVisible=!this.isViewer()&&a.pageVisible;this.background=a.background;this.pageScale=a.pageScale;this.pageFormat=a.pageFormat;
-this.view.currentRoot=a.currentRoot;this.defaultParent=a.defaultParent;this.connectionArrowsEnabled=a.arrows;this.setTooltips(a.tooltips);this.setConnectable(a.connect);this.setBackgroundImage(a.backgroundImage);var d=this.extFonts;this.extFonts=a.extFonts||[];if(b&&null!=d)for(var k=0;k<d.length;k++){var f=document.getElementById("extFont_"+d[k].name);null!=f&&f.parentNode.removeChild(f)}for(k=0;k<this.extFonts.length;k++)this.addExtFont(this.extFonts[k].name,this.extFonts[k].url,!0);this.view.scale=
+this.view.currentRoot=a.currentRoot;this.defaultParent=a.defaultParent;this.connectionArrowsEnabled=a.arrows;this.setTooltips(a.tooltips);this.setConnectable(a.connect);this.setBackgroundImage(a.backgroundImage);var d=this.extFonts;this.extFonts=a.extFonts||[];if(b&&null!=d)for(var g=0;g<d.length;g++){var f=document.getElementById("extFont_"+d[g].name);null!=f&&f.parentNode.removeChild(f)}for(g=0;g<this.extFonts.length;g++)this.addExtFont(this.extFonts[g].name,this.extFonts[g].url,!0);this.view.scale=
null!=a.scale?a.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!=a.translate&&(this.view.translate=a.translate)}else this.view.currentRoot=null,this.view.scale=1,this.gridEnabled=this.defaultGridEnabled,this.gridSize=mxGraph.prototype.gridSize,this.pageScale=mxGraph.prototype.pageScale,this.pageFormat="undefined"===
typeof mxSettings||null!=this.defaultPageFormat?mxGraph.prototype.pageFormat:mxSettings.getPageFormat(),this.pageVisible=this.defaultPageVisible,this.backgroundImage=this.background=null,this.scrollbars=this.defaultScrollbars,this.foldingEnabled=this.graphHandler.guidesEnabled=!0,this.setShadowVisible(!1,!1),this.defaultParent=null,this.setTooltips(!0),this.setConnectable(!0),this.lastPasteXml=null,this.pasteCounter=0,this.mathEnabled=!1,this.connectionArrowsEnabled=!0,this.extFonts=[];this.preferPageSize=
this.pageBreaksVisible=this.pageVisible;this.fireEvent(new mxEventObject("viewStateChanged","state",a))};
-Graph.prototype.addExtFont=function(a,b,d){if(a&&b){"1"!=urlParams["ext-fonts"]&&(Graph.recentCustomFonts[a.toLowerCase()]={name:a,url:b});var k="extFont_"+a;if(null==document.getElementById(k))if(0==b.indexOf(Editor.GOOGLE_FONTS))mxClient.link("stylesheet",b,null,k);else{document.getElementsByTagName("head");var f=document.createElement("style");f.appendChild(document.createTextNode('@font-face {\n\tfont-family: "'+a+'";\n\tsrc: url("'+b+'");\n}'));f.setAttribute("id",k);document.getElementsByTagName("head")[0].appendChild(f)}if(!d){null==
-this.extFonts&&(this.extFonts=[]);d=this.extFonts;k=!0;for(f=0;f<d.length;f++)if(d[f].name==a){k=!1;break}k&&this.extFonts.push({name:a,url:b})}}};
-EditorUi.prototype.updatePageRoot=function(a,b){if(null==a.root){var d=this.editor.extractGraphModel(a.node,null,b),k=Editor.extractParserError(d);if(k)throw Error(k);null!=d?(a.graphModelNode=d,a.viewState=this.editor.graph.createViewState(d),k=new mxCodec(d.ownerDocument),a.root=k.decode(d).root):a.root=this.editor.graph.model.createRoot()}else if(null==a.viewState){if(null==a.graphModelNode){d=this.editor.extractGraphModel(a.node);if(k=Editor.extractParserError(d))throw Error(k);null!=d&&(a.graphModelNode=
+Graph.prototype.addExtFont=function(a,b,d){if(a&&b){"1"!=urlParams["ext-fonts"]&&(Graph.recentCustomFonts[a.toLowerCase()]={name:a,url:b});var g="extFont_"+a;if(null==document.getElementById(g))if(0==b.indexOf(Editor.GOOGLE_FONTS))mxClient.link("stylesheet",b,null,g);else{document.getElementsByTagName("head");var f=document.createElement("style");f.appendChild(document.createTextNode('@font-face {\n\tfont-family: "'+a+'";\n\tsrc: url("'+b+'");\n}'));f.setAttribute("id",g);document.getElementsByTagName("head")[0].appendChild(f)}if(!d){null==
+this.extFonts&&(this.extFonts=[]);d=this.extFonts;g=!0;for(f=0;f<d.length;f++)if(d[f].name==a){g=!1;break}g&&this.extFonts.push({name:a,url:b})}}};
+EditorUi.prototype.updatePageRoot=function(a,b){if(null==a.root){var d=this.editor.extractGraphModel(a.node,null,b),g=Editor.extractParserError(d);if(g)throw Error(g);null!=d?(a.graphModelNode=d,a.viewState=this.editor.graph.createViewState(d),g=new mxCodec(d.ownerDocument),a.root=g.decode(d).root):a.root=this.editor.graph.model.createRoot()}else if(null==a.viewState){if(null==a.graphModelNode){d=this.editor.extractGraphModel(a.node);if(g=Editor.extractParserError(d))throw Error(g);null!=d&&(a.graphModelNode=
d)}null!=a.graphModelNode&&(a.viewState=this.editor.graph.createViewState(a.graphModelNode))}return a};
-EditorUi.prototype.selectPage=function(a,b,d){try{if(a!=this.currentPage){this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1);b=null!=b?b:!1;this.editor.graph.isMouseDown=!1;this.editor.graph.reset();var k=this.editor.graph.model.createUndoableEdit();k.ignoreEdit=!0;var f=new SelectPage(this,a,d);f.execute();k.add(f);k.notify();this.editor.graph.tooltipHandler.hide();b||this.editor.graph.model.fireEvent(new mxEventObject(mxEvent.UNDO,"edit",k))}}catch(m){this.handleError(m)}};
+EditorUi.prototype.selectPage=function(a,b,d){try{if(a!=this.currentPage){this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1);b=null!=b?b:!1;this.editor.graph.isMouseDown=!1;this.editor.graph.reset();var g=this.editor.graph.model.createUndoableEdit();g.ignoreEdit=!0;var f=new SelectPage(this,a,d);f.execute();g.add(f);g.notify();this.editor.graph.tooltipHandler.hide();b||this.editor.graph.model.fireEvent(new mxEventObject(mxEvent.UNDO,"edit",g))}}catch(m){this.handleError(m)}};
EditorUi.prototype.selectNextPage=function(a){var b=this.currentPage;null!=b&&null!=this.pages&&(b=mxUtils.indexOf(this.pages,b),a?this.selectPage(this.pages[mxUtils.mod(b+1,this.pages.length)]):a||this.selectPage(this.pages[mxUtils.mod(b-1,this.pages.length)]))};
EditorUi.prototype.insertPage=function(a,b){if(this.editor.graph.isEnabled()){this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1);a=null!=a?a:this.createPage(null,this.createPageId());b=null!=b?b:this.pages.length;var d=new ChangePage(this,a,a,b);this.editor.graph.model.execute(d)}return a};EditorUi.prototype.createPageId=function(){var a;do a=Editor.guid();while(null!=this.getPageById(a));return a};
EditorUi.prototype.createPage=function(a,b){var d=new DiagramPage(this.fileNode.ownerDocument.createElement("diagram"),b);d.setName(null!=a?a:this.createPageName());return d};EditorUi.prototype.createPageName=function(){for(var a={},b=0;b<this.pages.length;b++){var d=this.pages[b].getName();null!=d&&0<d.length&&(a[d]=d)}b=this.pages.length;do d=mxResources.get("pageWithNumber",[++b]);while(null!=a[d]);return d};
-EditorUi.prototype.removePage=function(a){try{var b=this.editor.graph,d=mxUtils.indexOf(this.pages,a);if(b.isEnabled()&&0<=d){this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1);b.model.beginUpdate();try{var k=this.currentPage;k==a&&1<this.pages.length?(d==this.pages.length-1?d--:d++,k=this.pages[d]):1>=this.pages.length&&(k=this.insertPage(),b.model.execute(new RenamePage(this,k,mxResources.get("pageWithNumber",[1]))));b.model.execute(new ChangePage(this,a,k))}finally{b.model.endUpdate()}}}catch(f){this.handleError(f)}return a};
-EditorUi.prototype.duplicatePage=function(a,b){var d=null;try{var k=this.editor.graph;if(k.isEnabled()){k.isEditing()&&k.stopEditing();var f=a.node.cloneNode(!1);f.removeAttribute("id");var m={},p=k.createCellLookup([k.model.root]),d=new DiagramPage(f);d.root=k.cloneCell(k.model.root,null,m);d.viewState=k.getViewState();d.viewState.scale=1;d.viewState.scrollLeft=null;d.viewState.scrollTop=null;d.viewState.currentRoot=null;d.viewState.defaultParent=null;d.setName(b);d=this.insertPage(d,mxUtils.indexOf(this.pages,
-a)+1);k.updateCustomLinks(k.createCellMapping(m,p),[d.root])}}catch(c){this.handleError(c)}return d};EditorUi.prototype.renamePage=function(a){if(this.editor.graph.isEnabled()){var b=new FilenameDialog(this,a.getName(),mxResources.get("rename"),mxUtils.bind(this,function(b){null!=b&&0<b.length&&this.editor.graph.model.execute(new RenamePage(this,a,b))}),mxResources.get("rename"));this.showDialog(b.container,300,80,!0,!0);b.init()}return a};
+EditorUi.prototype.removePage=function(a){try{var b=this.editor.graph,d=mxUtils.indexOf(this.pages,a);if(b.isEnabled()&&0<=d){this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1);b.model.beginUpdate();try{var g=this.currentPage;g==a&&1<this.pages.length?(d==this.pages.length-1?d--:d++,g=this.pages[d]):1>=this.pages.length&&(g=this.insertPage(),b.model.execute(new RenamePage(this,g,mxResources.get("pageWithNumber",[1]))));b.model.execute(new ChangePage(this,a,g))}finally{b.model.endUpdate()}}}catch(f){this.handleError(f)}return a};
+EditorUi.prototype.duplicatePage=function(a,b){var d=null;try{var g=this.editor.graph;if(g.isEnabled()){g.isEditing()&&g.stopEditing();var f=a.node.cloneNode(!1);f.removeAttribute("id");var m={},p=g.createCellLookup([g.model.root]),d=new DiagramPage(f);d.root=g.cloneCell(g.model.root,null,m);d.viewState=g.getViewState();d.viewState.scale=1;d.viewState.scrollLeft=null;d.viewState.scrollTop=null;d.viewState.currentRoot=null;d.viewState.defaultParent=null;d.setName(b);d=this.insertPage(d,mxUtils.indexOf(this.pages,
+a)+1);g.updateCustomLinks(g.createCellMapping(m,p),[d.root])}}catch(c){this.handleError(c)}return d};EditorUi.prototype.renamePage=function(a){if(this.editor.graph.isEnabled()){var b=new FilenameDialog(this,a.getName(),mxResources.get("rename"),mxUtils.bind(this,function(b){null!=b&&0<b.length&&this.editor.graph.model.execute(new RenamePage(this,a,b))}),mxResources.get("rename"));this.showDialog(b.container,300,80,!0,!0);b.init()}return a};
EditorUi.prototype.movePage=function(a,b){this.editor.graph.model.execute(new MovePage(this,a,b))};EditorUi.prototype.createTabContainer=function(){var a=document.createElement("div");a.className="geTabContainer";a.style.position="absolute";a.style.whiteSpace="nowrap";a.style.overflow="hidden";a.style.height="0px";return a};
-EditorUi.prototype.updateTabContainer=function(){if(null!=this.tabContainer&&null!=this.pages){var a=this.editor.graph,b=document.createElement("div");b.style.position="relative";b.style.display="inline-block";b.style.verticalAlign="top";b.style.height=this.tabContainer.style.height;b.style.whiteSpace="nowrap";b.style.overflow="hidden";b.style.fontSize="13px";b.style.marginLeft="30px";for(var d=this.editor.isChromelessView()?29:59,k=Math.min(140,Math.max(20,(this.tabContainer.clientWidth-d)/this.pages.length)+
+EditorUi.prototype.updateTabContainer=function(){if(null!=this.tabContainer&&null!=this.pages){var a=this.editor.graph,b=document.createElement("div");b.style.position="relative";b.style.display="inline-block";b.style.verticalAlign="top";b.style.height=this.tabContainer.style.height;b.style.whiteSpace="nowrap";b.style.overflow="hidden";b.style.fontSize="13px";b.style.marginLeft="30px";for(var d=this.editor.isChromelessView()?29:59,g=Math.min(140,Math.max(20,(this.tabContainer.clientWidth-d)/this.pages.length)+
1),f=null,m=0;m<this.pages.length;m++)mxUtils.bind(this,function(c,d){this.pages[c]==this.currentPage?(d.className="geActivePage",d.style.backgroundColor=Editor.isDarkMode()?"#2a2a2a":"#fff"):d.className="geInactivePage";d.setAttribute("draggable","true");mxEvent.addListener(d,"dragstart",mxUtils.bind(this,function(b){a.isEnabled()?(mxClient.IS_FF&&b.dataTransfer.setData("Text","<diagram/>"),f=c):mxEvent.consume(b)}));mxEvent.addListener(d,"dragend",mxUtils.bind(this,function(a){f=null;a.stopPropagation();
-a.preventDefault()}));mxEvent.addListener(d,"dragover",mxUtils.bind(this,function(a){null!=f&&(a.dataTransfer.dropEffect="move");a.stopPropagation();a.preventDefault()}));mxEvent.addListener(d,"drop",mxUtils.bind(this,function(a){null!=f&&c!=f&&this.movePage(f,c);a.stopPropagation();a.preventDefault()}));b.appendChild(d)})(m,this.createTabForPage(this.pages[m],k,this.pages[m]!=this.currentPage,m+1));this.tabContainer.innerHTML="";this.tabContainer.appendChild(b);k=this.createPageMenuTab();this.tabContainer.appendChild(k);
-k=null;this.isPageInsertTabVisible()&&(k=this.createPageInsertTab(),this.tabContainer.appendChild(k));if(b.clientWidth>this.tabContainer.clientWidth-d){null!=k&&(k.style.position="absolute",k.style.right="0px",b.style.marginRight="30px");var p=this.createControlTab(4,"&nbsp;&#10094;&nbsp;");p.style.position="absolute";p.style.right=this.editor.chromeless?"29px":"55px";p.style.fontSize="13pt";this.tabContainer.appendChild(p);var c=this.createControlTab(4,"&nbsp;&#10095;");c.style.position="absolute";
+a.preventDefault()}));mxEvent.addListener(d,"dragover",mxUtils.bind(this,function(a){null!=f&&(a.dataTransfer.dropEffect="move");a.stopPropagation();a.preventDefault()}));mxEvent.addListener(d,"drop",mxUtils.bind(this,function(a){null!=f&&c!=f&&this.movePage(f,c);a.stopPropagation();a.preventDefault()}));b.appendChild(d)})(m,this.createTabForPage(this.pages[m],g,this.pages[m]!=this.currentPage,m+1));this.tabContainer.innerHTML="";this.tabContainer.appendChild(b);g=this.createPageMenuTab();this.tabContainer.appendChild(g);
+g=null;this.isPageInsertTabVisible()&&(g=this.createPageInsertTab(),this.tabContainer.appendChild(g));if(b.clientWidth>this.tabContainer.clientWidth-d){null!=g&&(g.style.position="absolute",g.style.right="0px",b.style.marginRight="30px");var p=this.createControlTab(4,"&nbsp;&#10094;&nbsp;");p.style.position="absolute";p.style.right=this.editor.chromeless?"29px":"55px";p.style.fontSize="13pt";this.tabContainer.appendChild(p);var c=this.createControlTab(4,"&nbsp;&#10095;");c.style.position="absolute";
c.style.right=this.editor.chromeless?"0px":"29px";c.style.fontSize="13pt";this.tabContainer.appendChild(c);var e=Math.max(0,this.tabContainer.clientWidth-(this.editor.chromeless?86:116));b.style.width=e+"px";mxEvent.addListener(p,"click",mxUtils.bind(this,function(a){b.scrollLeft-=Math.max(20,e-20);mxUtils.setOpacity(p,0<b.scrollLeft?100:50);mxUtils.setOpacity(c,b.scrollLeft<b.scrollWidth-b.clientWidth?100:50);mxEvent.consume(a)}));mxUtils.setOpacity(p,0<b.scrollLeft?100:50);mxUtils.setOpacity(c,
b.scrollLeft<b.scrollWidth-b.clientWidth?100:50);mxEvent.addListener(c,"click",mxUtils.bind(this,function(a){b.scrollLeft+=Math.max(20,e-20);mxUtils.setOpacity(p,0<b.scrollLeft?100:50);mxUtils.setOpacity(c,b.scrollLeft<b.scrollWidth-b.clientWidth?100:50);mxEvent.consume(a)}))}}};EditorUi.prototype.isPageInsertTabVisible=function(){return 1==urlParams.embed||null!=this.getCurrentFile()&&this.getCurrentFile().isEditable()};
EditorUi.prototype.createTab=function(a){var b=document.createElement("div");b.style.display="inline-block";b.style.whiteSpace="nowrap";b.style.boxSizing="border-box";b.style.position="relative";b.style.overflow="hidden";b.style.textAlign="center";b.style.marginLeft="-1px";b.style.height=this.tabContainer.clientHeight+"px";b.style.padding="12px 4px 8px 4px";b.style.border=Editor.isDarkMode()?"1px solid #505759":"1px solid #e8eaed";b.style.borderTopStyle="none";b.style.borderBottomStyle="none";b.style.backgroundColor=
@@ -3757,33 +3760,33 @@ EditorUi.prototype.createControlTab=function(a,b,d){d=this.createTab(null!=d?d:!
EditorUi.prototype.createPageMenuTab=function(a){a=this.createControlTab(3,'<div class="geSprite geSprite-dots" style="display:inline-block;margin-top:5px;width:21px;height:21px;"></div>',a);a.setAttribute("title",mxResources.get("pages"));a.style.position="absolute";a.style.marginLeft="0px";a.style.top="0px";a.style.left="1px";mxEvent.addListener(a,"click",mxUtils.bind(this,function(a){this.editor.graph.popupMenuHandler.hideMenu();var b=new mxPopupMenu(mxUtils.bind(this,function(a,b){for(var c=0;c<
this.pages.length;c++)mxUtils.bind(this,function(c){var d=a.addItem(this.pages[c].getName(),null,mxUtils.bind(this,function(){this.selectPage(this.pages[c])}),b),e=this.pages[c].getId();d.setAttribute("title",this.pages[c].getName()+(null!=e?" ("+e+")":"")+" ["+(c+1)+"]");this.pages[c]==this.currentPage&&a.addCheckmark(d,Editor.checkmarkImage)})(c);if(this.editor.graph.isEnabled()){a.addSeparator(b);a.addItem(mxResources.get("insertPage"),null,mxUtils.bind(this,function(){this.insertPage()}),b);var d=
this.currentPage;null!=d&&(a.addSeparator(b),c=d.getName(),a.addItem(mxResources.get("removeIt",[c]),null,mxUtils.bind(this,function(){this.removePage(d)}),b),a.addItem(mxResources.get("renameIt",[c]),null,mxUtils.bind(this,function(){this.renamePage(d,d.getName())}),b),a.addSeparator(b),a.addItem(mxResources.get("duplicateIt",[c]),null,mxUtils.bind(this,function(){this.duplicatePage(d,mxResources.get("copyOf",[d.getName()]))}),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()});var k=mxEvent.getClientX(a),f=mxEvent.getClientY(a);b.popup(k,f,null,a);this.setCurrentMenu(b);mxEvent.consume(a)}));return a};
+!0;b.autoExpand=!0;b.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(b,arguments);b.destroy()});var g=mxEvent.getClientX(a),f=mxEvent.getClientY(a);b.popup(g,f,null,a);this.setCurrentMenu(b);mxEvent.consume(a)}));return a};
EditorUi.prototype.createPageInsertTab=function(){var a=this.createControlTab(4,'<div class="geSprite geSprite-plus" style="display:inline-block;width:21px;height:21px;"></div>');a.setAttribute("title",mxResources.get("insertPage"));mxEvent.addListener(a,"click",mxUtils.bind(this,function(a){this.insertPage();mxEvent.consume(a)}));return a};
-EditorUi.prototype.createTabForPage=function(a,b,d,k){d=this.createTab(d);var f=a.getName()||mxResources.get("untitled"),m=a.getId();d.setAttribute("title",f+(null!=m?" ("+m+")":"")+" ["+k+"]");mxUtils.write(d,f);d.style.maxWidth=b+"px";d.style.width=b+"px";this.addTabListeners(a,d);42<b&&(d.style.textOverflow="ellipsis");return d};
-EditorUi.prototype.addTabListeners=function(a,b){mxEvent.disableContextMenu(b);var d=this.editor.graph;mxEvent.addListener(b,"dblclick",mxUtils.bind(this,function(b){this.renamePage(a);mxEvent.consume(b)}));var k=!1,f=!1;mxEvent.addGestureListeners(b,mxUtils.bind(this,function(b){k=null!=this.currentMenu;f=a==this.currentPage;d.isMouseDown||f||this.selectPage(a)}),null,mxUtils.bind(this,function(m){if(d.isEnabled()&&!d.isMouseDown&&(mxEvent.isTouchEvent(m)&&f||mxEvent.isPopupTrigger(m))){d.popupMenuHandler.hideMenu();
-this.hideCurrentMenu();if(!mxEvent.isTouchEvent(m)||!k){var p=new mxPopupMenu(this.createPageMenu(a));p.div.className+=" geMenubarMenu";p.smartSeparators=!0;p.showDisabled=!0;p.autoExpand=!0;p.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(p,arguments);this.resetCurrentMenu();p.destroy()});var c=mxEvent.getClientX(m),e=mxEvent.getClientY(m);p.popup(c,e,null,m);this.setCurrentMenu(p,b)}mxEvent.consume(m)}}))};
-EditorUi.prototype.getLinkForPage=function(a,b,d){if(!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp){var k=this.getCurrentFile();if(null!=k&&k.constructor!=LocalFile&&"draw.io"==this.getServiceName()){var f=this.getSearch("create title mode url drive splash state clibs ui viewbox hide-pages".split(" ")),f=f+((0==f.length?"?":"&")+"page-id="+a.getId());null!=b&&(f+="&"+b.join("&"));return(d&&"1"!=urlParams.dev?EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?
-EditorUi.drawHost:"https://"+window.location.host)+"/"+f+"#"+k.getHash()}}return null};
-EditorUi.prototype.createPageMenu=function(a,b){return mxUtils.bind(this,function(d,k){var f=this.editor.graph;d.addItem(mxResources.get("insert"),null,mxUtils.bind(this,function(){this.insertPage(null,mxUtils.indexOf(this.pages,a)+1)}),k);d.addItem(mxResources.get("delete"),null,mxUtils.bind(this,function(){this.removePage(a)}),k);d.addItem(mxResources.get("rename"),null,mxUtils.bind(this,function(){this.renamePage(a,b)}),k);null!=this.getLinkForPage(a)&&(d.addSeparator(k),d.addItem(mxResources.get("link"),
-null,mxUtils.bind(this,function(){this.showPublishLinkDialog(mxResources.get("url"),!0,null,null,mxUtils.bind(this,function(b,d,c,e,g,k){b=this.createUrlParameters(b,d,c,e,g,k);c||b.push("hide-pages=1");f.isSelectionEmpty()||(c=f.getBoundingBox(f.getSelectionCells()),d=f.view.translate,g=f.view.scale,c.width/=g,c.height/=g,c.x=c.x/g-d.x,c.y=c.y/g-d.y,b.push("viewbox="+encodeURIComponent(JSON.stringify({x:Math.round(c.x),y:Math.round(c.y),width:Math.round(c.width),height:Math.round(c.height),border:100}))));
-e=new EmbedDialog(this,this.getLinkForPage(a,b,e));this.showDialog(e.container,440,240,!0,!0);e.init()}))})));d.addSeparator(k);d.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){this.duplicatePage(a,mxResources.get("copyOf",[a.getName()]))}),k);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"draw.io"!=this.getServiceName()||(d.addSeparator(k),d.addItem(mxResources.get("openInNewWindow"),null,mxUtils.bind(this,function(){this.editor.editAsNew(this.getFileData(!0,null,null,null,
-!0,!0))}),k))})};(function(){var a=EditorUi.prototype.refresh;EditorUi.prototype.refresh=function(b){a.apply(this,arguments);this.updateTabContainer()}})();(function(){mxCodecRegistry.getCodec(ChangePageSetup).exclude.push("page")})();(function(){var a=new mxObjectCodec(new MovePage,["ui"]);a.beforeDecode=function(a,d,k){k.ui=a.ui;return d};a.afterDecode=function(a,d,k){a=k.oldIndex;k.oldIndex=k.newIndex;k.newIndex=a;return k};mxCodecRegistry.register(a)})();
-(function(){var a=new mxObjectCodec(new RenamePage,["ui","page"]);a.beforeDecode=function(a,d,k){k.ui=a.ui;return d};a.afterDecode=function(a,d,k){a=k.previous;k.previous=k.name;k.name=a;return k};mxCodecRegistry.register(a)})();
-(function(){var a=new mxObjectCodec(new ChangePage,"ui relatedPage index neverShown page previousPage".split(" ")),b="defaultParent currentRoot scrollLeft scrollTop scale translate lastPasteXml pasteCounter".split(" ");a.afterEncode=function(a,k,f){f.setAttribute("relatedPage",k.relatedPage.getId());null==k.index&&(f.setAttribute("name",k.relatedPage.getName()),null!=k.relatedPage.viewState&&f.setAttribute("viewState",JSON.stringify(k.relatedPage.viewState,function(a,d){return 0>mxUtils.indexOf(b,
-a)?d:void 0})),null!=k.relatedPage.root&&a.encodeCell(k.relatedPage.root,f));return f};a.beforeDecode=function(a,b,f){f.ui=a.ui;f.relatedPage=f.ui.getPageById(b.getAttribute("relatedPage"));if(null==f.relatedPage){var d=b.ownerDocument.createElement("diagram");d.setAttribute("id",b.getAttribute("relatedPage"));d.setAttribute("name",b.getAttribute("name"));f.relatedPage=new DiagramPage(d);d=b.getAttribute("viewState");null!=d&&(f.relatedPage.viewState=JSON.parse(d),b.removeAttribute("viewState"));
-b=b.cloneNode(!0);d=b.firstChild;if(null!=d)for(f.relatedPage.root=a.decodeCell(d,!1),f=d.nextSibling,d.parentNode.removeChild(d),d=f;null!=d;){f=d.nextSibling;if(d.nodeType==mxConstants.NODETYPE_ELEMENT){var k=d.getAttribute("id");null==a.lookup(k)&&a.decodeCell(d)}d.parentNode.removeChild(d);d=f}}return b};a.afterDecode=function(a,b,f){f.index=f.previousIndex;return f};mxCodecRegistry.register(a)})();(function(){EditorUi.prototype.altShiftActions[68]="selectDescendants";var a=Graph.prototype.foldCells;Graph.prototype.foldCells=function(b,d,m,p,c){d=null!=d?d:!1;null==m&&(m=this.getFoldableCells(this.getSelectionCells(),b));this.stopEditing();this.model.beginUpdate();try{for(var e=m.slice(),f=0;f<m.length;f++)"1"==mxUtils.getValue(this.getCurrentCellStyle(m[f]),"treeFolding","0")&&this.foldTreeCell(b,m[f]);m=e;m=a.apply(this,arguments)}finally{this.model.endUpdate()}return m};Graph.prototype.foldTreeCell=
+EditorUi.prototype.createTabForPage=function(a,b,d,g){d=this.createTab(d);var f=a.getName()||mxResources.get("untitled"),m=a.getId();d.setAttribute("title",f+(null!=m?" ("+m+")":"")+" ["+g+"]");mxUtils.write(d,f);d.style.maxWidth=b+"px";d.style.width=b+"px";this.addTabListeners(a,d);42<b&&(d.style.textOverflow="ellipsis");return d};
+EditorUi.prototype.addTabListeners=function(a,b){mxEvent.disableContextMenu(b);var d=this.editor.graph;mxEvent.addListener(b,"dblclick",mxUtils.bind(this,function(b){this.renamePage(a);mxEvent.consume(b)}));var g=!1,f=!1;mxEvent.addGestureListeners(b,mxUtils.bind(this,function(b){g=null!=this.currentMenu;f=a==this.currentPage;d.isMouseDown||f||this.selectPage(a)}),null,mxUtils.bind(this,function(m){if(d.isEnabled()&&!d.isMouseDown&&(mxEvent.isTouchEvent(m)&&f||mxEvent.isPopupTrigger(m))){d.popupMenuHandler.hideMenu();
+this.hideCurrentMenu();if(!mxEvent.isTouchEvent(m)||!g){var p=new mxPopupMenu(this.createPageMenu(a));p.div.className+=" geMenubarMenu";p.smartSeparators=!0;p.showDisabled=!0;p.autoExpand=!0;p.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(p,arguments);this.resetCurrentMenu();p.destroy()});var c=mxEvent.getClientX(m),e=mxEvent.getClientY(m);p.popup(c,e,null,m);this.setCurrentMenu(p,b)}mxEvent.consume(m)}}))};
+EditorUi.prototype.getLinkForPage=function(a,b,d){if(!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp){var g=this.getCurrentFile();if(null!=g&&g.constructor!=LocalFile&&"draw.io"==this.getServiceName()){var f=this.getSearch("create title mode url drive splash state clibs ui viewbox hide-pages".split(" ")),f=f+((0==f.length?"?":"&")+"page-id="+a.getId());null!=b&&(f+="&"+b.join("&"));return(d&&"1"!=urlParams.dev?EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?
+EditorUi.drawHost:"https://"+window.location.host)+"/"+f+"#"+g.getHash()}}return null};
+EditorUi.prototype.createPageMenu=function(a,b){return mxUtils.bind(this,function(d,g){var f=this.editor.graph;d.addItem(mxResources.get("insert"),null,mxUtils.bind(this,function(){this.insertPage(null,mxUtils.indexOf(this.pages,a)+1)}),g);d.addItem(mxResources.get("delete"),null,mxUtils.bind(this,function(){this.removePage(a)}),g);d.addItem(mxResources.get("rename"),null,mxUtils.bind(this,function(){this.renamePage(a,b)}),g);null!=this.getLinkForPage(a)&&(d.addSeparator(g),d.addItem(mxResources.get("link"),
+null,mxUtils.bind(this,function(){this.showPublishLinkDialog(mxResources.get("url"),!0,null,null,mxUtils.bind(this,function(b,d,c,e,g,n){b=this.createUrlParameters(b,d,c,e,g,n);c||b.push("hide-pages=1");f.isSelectionEmpty()||(c=f.getBoundingBox(f.getSelectionCells()),d=f.view.translate,g=f.view.scale,c.width/=g,c.height/=g,c.x=c.x/g-d.x,c.y=c.y/g-d.y,b.push("viewbox="+encodeURIComponent(JSON.stringify({x:Math.round(c.x),y:Math.round(c.y),width:Math.round(c.width),height:Math.round(c.height),border:100}))));
+e=new EmbedDialog(this,this.getLinkForPage(a,b,e));this.showDialog(e.container,440,240,!0,!0);e.init()}))})));d.addSeparator(g);d.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){this.duplicatePage(a,mxResources.get("copyOf",[a.getName()]))}),g);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"draw.io"!=this.getServiceName()||(d.addSeparator(g),d.addItem(mxResources.get("openInNewWindow"),null,mxUtils.bind(this,function(){this.editor.editAsNew(this.getFileData(!0,null,null,null,
+!0,!0))}),g))})};(function(){var a=EditorUi.prototype.refresh;EditorUi.prototype.refresh=function(b){a.apply(this,arguments);this.updateTabContainer()}})();(function(){mxCodecRegistry.getCodec(ChangePageSetup).exclude.push("page")})();(function(){var a=new mxObjectCodec(new MovePage,["ui"]);a.beforeDecode=function(a,d,g){g.ui=a.ui;return d};a.afterDecode=function(a,d,g){a=g.oldIndex;g.oldIndex=g.newIndex;g.newIndex=a;return g};mxCodecRegistry.register(a)})();
+(function(){var a=new mxObjectCodec(new RenamePage,["ui","page"]);a.beforeDecode=function(a,d,g){g.ui=a.ui;return d};a.afterDecode=function(a,d,g){a=g.previous;g.previous=g.name;g.name=a;return g};mxCodecRegistry.register(a)})();
+(function(){var a=new mxObjectCodec(new ChangePage,"ui relatedPage index neverShown page previousPage".split(" ")),b="defaultParent currentRoot scrollLeft scrollTop scale translate lastPasteXml pasteCounter".split(" ");a.afterEncode=function(a,g,f){f.setAttribute("relatedPage",g.relatedPage.getId());null==g.index&&(f.setAttribute("name",g.relatedPage.getName()),null!=g.relatedPage.viewState&&f.setAttribute("viewState",JSON.stringify(g.relatedPage.viewState,function(a,d){return 0>mxUtils.indexOf(b,
+a)?d:void 0})),null!=g.relatedPage.root&&a.encodeCell(g.relatedPage.root,f));return f};a.beforeDecode=function(a,b,f){f.ui=a.ui;f.relatedPage=f.ui.getPageById(b.getAttribute("relatedPage"));if(null==f.relatedPage){var d=b.ownerDocument.createElement("diagram");d.setAttribute("id",b.getAttribute("relatedPage"));d.setAttribute("name",b.getAttribute("name"));f.relatedPage=new DiagramPage(d);d=b.getAttribute("viewState");null!=d&&(f.relatedPage.viewState=JSON.parse(d),b.removeAttribute("viewState"));
+b=b.cloneNode(!0);d=b.firstChild;if(null!=d)for(f.relatedPage.root=a.decodeCell(d,!1),f=d.nextSibling,d.parentNode.removeChild(d),d=f;null!=d;){f=d.nextSibling;if(d.nodeType==mxConstants.NODETYPE_ELEMENT){var g=d.getAttribute("id");null==a.lookup(g)&&a.decodeCell(d)}d.parentNode.removeChild(d);d=f}}return b};a.afterDecode=function(a,b,f){f.index=f.previousIndex;return f};mxCodecRegistry.register(a)})();(function(){EditorUi.prototype.altShiftActions[68]="selectDescendants";var a=Graph.prototype.foldCells;Graph.prototype.foldCells=function(b,d,m,p,c){d=null!=d?d:!1;null==m&&(m=this.getFoldableCells(this.getSelectionCells(),b));this.stopEditing();this.model.beginUpdate();try{for(var e=m.slice(),f=0;f<m.length;f++)"1"==mxUtils.getValue(this.getCurrentCellStyle(m[f]),"treeFolding","0")&&this.foldTreeCell(b,m[f]);m=e;m=a.apply(this,arguments)}finally{this.model.endUpdate()}return m};Graph.prototype.foldTreeCell=
function(a,b){this.model.beginUpdate();try{var d=[];this.traverse(b,!0,mxUtils.bind(this,function(a,e){var c=null!=e&&this.isTreeEdge(e);c&&d.push(e);a==b||null!=e&&!c||d.push(a);return(null==e||c)&&(a==b||!this.model.isCollapsed(a))}));this.model.setCollapsed(b,a);for(var f=0;f<d.length;f++)this.model.setVisible(d[f],!a)}finally{this.model.endUpdate()}};Graph.prototype.isTreeEdge=function(a){return!this.isEdgeIgnored(a)};Graph.prototype.getTreeEdges=function(a,b,d,p,c,e){return this.model.filterCells(this.getEdges(a,
b,d,p,c,e),mxUtils.bind(this,function(a){return this.isTreeEdge(a)}))};Graph.prototype.getIncomingTreeEdges=function(a,b){return this.getTreeEdges(a,b,!0,!1,!1)};Graph.prototype.getOutgoingTreeEdges=function(a,b){return this.getTreeEdges(a,b,!1,!0,!1)};var b=EditorUi.prototype.init;EditorUi.prototype.init=function(){b.apply(this,arguments);this.editor.isChromelessView()&&!this.editor.editable||this.addTrees()};EditorUi.prototype.addTrees=function(){function a(a){return A.isVertex(a)&&d(a)}function b(a){var b=
!1;null!=a&&(b="1"==t.getCurrentCellStyle(a).treeMoving);return b}function d(a){var b=!1;null!=a&&(a=A.getParent(a),b=t.view.getState(a),b="tree"==(null!=b?b.style:t.getCellStyle(a)).containerType);return b}function p(a){var b=!1;null!=a&&(a=A.getParent(a),b=t.view.getState(a),t.view.getState(a),b=null!=(null!=b?b.style:t.getCellStyle(a)).childLayout);return b}function c(a){a=t.view.getState(a);if(null!=a){var b=t.getIncomingTreeEdges(a.cell);if(0<b.length&&(b=t.view.getState(b[0]),null!=b&&(b=b.absolutePoints,
null!=b&&0<b.length&&(b=b[b.length-1],null!=b)))){if(b.y==a.y&&Math.abs(b.x-a.getCenterX())<a.width/2)return mxConstants.DIRECTION_SOUTH;if(b.y==a.y+a.height&&Math.abs(b.x-a.getCenterX())<a.width/2)return mxConstants.DIRECTION_NORTH;if(b.x>a.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function e(a,b){b=null!=b?b:!0;t.model.beginUpdate();try{var d=t.model.getParent(a),e=t.getIncomingTreeEdges(a),f=t.cloneCells([e[0],a]);t.model.setTerminal(f[0],t.model.getTerminal(e[0],
!0),!0);var g=c(a),k=d.geometry;g==mxConstants.DIRECTION_SOUTH||g==mxConstants.DIRECTION_NORTH?f[1].geometry.x+=b?a.geometry.width+10:-f[1].geometry.width-10:f[1].geometry.y+=b?a.geometry.height+10:-f[1].geometry.height-10;t.view.currentRoot!=d&&(f[1].geometry.x-=k.x,f[1].geometry.y-=k.y);var l=t.view.getState(a),m=t.view.scale;if(null!=l){var n=mxRectangle.fromRectangle(l);g==mxConstants.DIRECTION_SOUTH||g==mxConstants.DIRECTION_NORTH?n.x+=(b?a.geometry.width+10:-f[1].geometry.width-10)*m:n.y+=(b?
a.geometry.height+10:-f[1].geometry.height-10)*m;var p=t.getOutgoingTreeEdges(t.model.getTerminal(e[0],!0));if(null!=p){for(var q=g==mxConstants.DIRECTION_SOUTH||g==mxConstants.DIRECTION_NORTH,v=k=e=0;v<p.length;v++){var u=t.model.getTerminal(p[v],!1);if(g==c(u)){var z=t.view.getState(u);u!=a&&null!=z&&(q&&b!=z.getCenterX()<l.getCenterX()||!q&&b!=z.getCenterY()<l.getCenterY())&&mxUtils.intersects(n,z)&&(e=10+Math.max(e,(Math.min(n.x+n.width,z.x+z.width)-Math.max(n.x,z.x))/m),k=10+Math.max(k,(Math.min(n.y+
-n.height,z.y+z.height)-Math.max(n.y,z.y))/m))}}q?k=0:e=0;for(v=0;v<p.length;v++)if(u=t.model.getTerminal(p[v],!1),g==c(u)&&(z=t.view.getState(u),u!=a&&null!=z&&(q&&b!=z.getCenterX()<l.getCenterX()||!q&&b!=z.getCenterY()<l.getCenterY()))){var C=[];t.traverse(z.cell,!0,function(a,b){var c=null!=b&&t.isTreeEdge(b);c&&C.push(b);(null==b||c)&&C.push(a);return null==b||c});t.moveCells(C,(b?1:-1)*e,(b?1:-1)*k)}}}return t.addCells(f,d)}finally{t.model.endUpdate()}}function g(a){t.model.beginUpdate();try{var b=
+n.height,z.y+z.height)-Math.max(n.y,z.y))/m))}}q?k=0:e=0;for(v=0;v<p.length;v++)if(u=t.model.getTerminal(p[v],!1),g==c(u)&&(z=t.view.getState(u),u!=a&&null!=z&&(q&&b!=z.getCenterX()<l.getCenterX()||!q&&b!=z.getCenterY()<l.getCenterY()))){var D=[];t.traverse(z.cell,!0,function(a,b){var c=null!=b&&t.isTreeEdge(b);c&&D.push(b);(null==b||c)&&D.push(a);return null==b||c});t.moveCells(D,(b?1:-1)*e,(b?1:-1)*k)}}}return t.addCells(f,d)}finally{t.model.endUpdate()}}function k(a){t.model.beginUpdate();try{var b=
c(a),d=t.getIncomingTreeEdges(a),e=t.cloneCells([d[0],a]);t.model.setTerminal(d[0],e[1],!1);t.model.setTerminal(e[0],e[1],!0);t.model.setTerminal(e[0],a,!1);var f=t.model.getParent(a),g=f.geometry,k=[];t.view.currentRoot!=f&&(e[1].geometry.x-=g.x,e[1].geometry.y-=g.y);t.traverse(a,!0,function(a,b){var c=null!=b&&t.isTreeEdge(b);c&&k.push(b);(null==b||c)&&k.push(a);return null==b||c});var l=a.geometry.width+40,m=a.geometry.height+40;b==mxConstants.DIRECTION_SOUTH?l=0:b==mxConstants.DIRECTION_NORTH?
(l=0,m=-m):b==mxConstants.DIRECTION_WEST?(l=-l,m=0):b==mxConstants.DIRECTION_EAST&&(m=0);t.moveCells(k,l,m);return t.addCells(e,f)}finally{t.model.endUpdate()}}function n(a,b){t.model.beginUpdate();try{var d=t.model.getParent(a),e=t.getIncomingTreeEdges(a),f=c(a);0==e.length&&(e=[t.createEdge(d,null,"",null,null,t.createCurrentEdgeStyle())],f=b);var g=t.cloneCells([e[0],a]);t.model.setTerminal(g[0],a,!0);if(null==t.model.getTerminal(g[0],!1)){t.model.setTerminal(g[0],g[1],!1);var k=t.getCellStyle(g[1]).newEdgeStyle;
-if(null!=k)try{var l=JSON.parse(k),m;for(m in l)t.setCellStyles(m,l[m],[g[0]]),"edgeStyle"==m&&"elbowEdgeStyle"==l[m]&&t.setCellStyles("elbow",f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NOTH?"vertical":"horizontal",[g[0]])}catch(ca){}}var e=t.getOutgoingTreeEdges(a),n=d.geometry,k=[];t.view.currentRoot==d&&(n=new mxRectangle);for(l=0;l<e.length;l++){var p=t.model.getTerminal(e[l],!1);null!=p&&k.push(p)}var q=t.view.getBounds(k),v=t.view.translate,u=t.view.scale;f==mxConstants.DIRECTION_SOUTH?
-(g[1].geometry.x=null==q?a.geometry.x+(a.geometry.width-g[1].geometry.width)/2:(q.x+q.width)/u-v.x-n.x+10,g[1].geometry.y+=g[1].geometry.height-n.y+40):f==mxConstants.DIRECTION_NORTH?(g[1].geometry.x=null==q?a.geometry.x+(a.geometry.width-g[1].geometry.width)/2:(q.x+q.width)/u-v.x+-n.x+10,g[1].geometry.y-=g[1].geometry.height+n.y+40):(g[1].geometry.x=f==mxConstants.DIRECTION_WEST?g[1].geometry.x-(g[1].geometry.width+n.x+40):g[1].geometry.x+(g[1].geometry.width-n.x+40),g[1].geometry.y=null==q?a.geometry.y+
-(a.geometry.height-g[1].geometry.height)/2:(q.y+q.height)/u-v.y+-n.y+10);return t.addCells(g,d)}finally{t.model.endUpdate()}}function l(a,b,c){a=t.getOutgoingTreeEdges(a);c=t.view.getState(c);var d=[];if(null!=c&&null!=a){for(var e=0;e<a.length;e++){var f=t.view.getState(t.model.getTerminal(a[e],!1));null!=f&&(!b&&Math.min(f.x+f.width,c.x+c.width)>=Math.max(f.x,c.x)||b&&Math.min(f.y+f.height,c.y+c.height)>=Math.max(f.y,c.y))&&d.push(f)}d.sort(function(a,c){return b?a.x+a.width-c.x-c.width:a.y+a.height-
+if(null!=k)try{var l=JSON.parse(k),m;for(m in l)t.setCellStyles(m,l[m],[g[0]]),"edgeStyle"==m&&"elbowEdgeStyle"==l[m]&&t.setCellStyles("elbow",f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NOTH?"vertical":"horizontal",[g[0]])}catch(ba){}}var e=t.getOutgoingTreeEdges(a),n=d.geometry,k=[];t.view.currentRoot==d&&(n=new mxRectangle);for(l=0;l<e.length;l++){var p=t.model.getTerminal(e[l],!1);null!=p&&k.push(p)}var q=t.view.getBounds(k),u=t.view.translate,v=t.view.scale;f==mxConstants.DIRECTION_SOUTH?
+(g[1].geometry.x=null==q?a.geometry.x+(a.geometry.width-g[1].geometry.width)/2:(q.x+q.width)/v-u.x-n.x+10,g[1].geometry.y+=g[1].geometry.height-n.y+40):f==mxConstants.DIRECTION_NORTH?(g[1].geometry.x=null==q?a.geometry.x+(a.geometry.width-g[1].geometry.width)/2:(q.x+q.width)/v-u.x+-n.x+10,g[1].geometry.y-=g[1].geometry.height+n.y+40):(g[1].geometry.x=f==mxConstants.DIRECTION_WEST?g[1].geometry.x-(g[1].geometry.width+n.x+40):g[1].geometry.x+(g[1].geometry.width-n.x+40),g[1].geometry.y=null==q?a.geometry.y+
+(a.geometry.height-g[1].geometry.height)/2:(q.y+q.height)/v-u.y+-n.y+10);return t.addCells(g,d)}finally{t.model.endUpdate()}}function l(a,b,c){a=t.getOutgoingTreeEdges(a);c=t.view.getState(c);var d=[];if(null!=c&&null!=a){for(var e=0;e<a.length;e++){var f=t.view.getState(t.model.getTerminal(a[e],!1));null!=f&&(!b&&Math.min(f.x+f.width,c.x+c.width)>=Math.max(f.x,c.x)||b&&Math.min(f.y+f.height,c.y+c.height)>=Math.max(f.y,c.y))&&d.push(f)}d.sort(function(a,c){return b?a.x+a.width-c.x-c.width:a.y+a.height-
c.y-c.height})}return d}function q(a,b){var d=c(a),e=b==mxConstants.DIRECTION_EAST||b==mxConstants.DIRECTION_WEST;(d==mxConstants.DIRECTION_EAST||d==mxConstants.DIRECTION_WEST)==e&&d!=b?u.actions.get("selectParent").funct():d==b?(e=t.getOutgoingTreeEdges(a),null!=e&&0<e.length&&t.setSelectionCell(t.model.getTerminal(e[0],!1))):(d=t.getIncomingTreeEdges(a),null!=d&&0<d.length&&(e=l(t.model.getTerminal(d[0],!0),e,a),d=t.view.getState(a),null!=d&&(d=mxUtils.indexOf(e,d),0<=d&&(d+=b==mxConstants.DIRECTION_NORTH||
b==mxConstants.DIRECTION_WEST?-1:1,0<=d&&d<=e.length-1&&t.setSelectionCell(e[d].cell)))))}var u=this,t=u.editor.graph,A=t.getModel(),x=u.menus.createPopupMenu;u.menus.createPopupMenu=function(b,c,d){x.apply(this,arguments);if(1==t.getSelectionCount()){c=t.getSelectionCell();var e=t.getOutgoingTreeEdges(c);b.addSeparator();0<e.length&&(a(t.getSelectionCell())&&this.addMenuItems(b,["selectChildren"],null,d),this.addMenuItems(b,["selectDescendants"],null,d));a(t.getSelectionCell())?(b.addSeparator(),
0<t.getIncomingTreeEdges(c).length&&this.addMenuItems(b,["selectSiblings","selectParent"],null,d)):0<t.model.getEdgeCount(c)&&this.addMenuItems(b,["selectConnections"],null,d)}};u.actions.addAction("selectChildren",function(){if(t.isEnabled()&&1==t.getSelectionCount()){var a=t.getSelectionCell(),a=t.getOutgoingTreeEdges(a);if(null!=a){for(var b=[],c=0;c<a.length;c++)b.push(t.model.getTerminal(a[c],!1));t.setSelectionCells(b)}}},null,null,"Alt+Shift+X");u.actions.addAction("selectSiblings",function(){if(t.isEnabled()&&
@@ -3792,13 +3795,13 @@ b==mxConstants.DIRECTION_WEST?-1:1,0<=d&&d<=e.length-1&&t.setSelectionCell(e[d].
var G=t.removeCells;t.removeCells=function(b,c){c=null!=c?c:!0;null==b&&(b=this.getDeletableCells(this.getSelectionCells()));c&&(b=this.getDeletableCells(this.addAllEdges(b)));for(var e=[],f=0;f<b.length;f++){var g=b[f];A.isEdge(g)&&d(g)&&(e.push(g),g=A.getTerminal(g,!1));if(a(g)){var k=[];t.traverse(g,!0,function(a,b){var c=null!=b&&t.isTreeEdge(b);c&&k.push(b);(null==b||c)&&k.push(a);return null==b||c});0<k.length&&(e=e.concat(k),g=t.getIncomingTreeEdges(b[f]),b=b.concat(g))}else null!=g&&e.push(b[f])}b=
e;return G.apply(this,arguments)};u.hoverIcons.getStateAt=function(b,c,d){return a(b.cell)?null:this.graph.view.getState(this.graph.getCellAt(c,d))};var z=t.duplicateCells;t.duplicateCells=function(b,c){b=null!=b?b:this.getSelectionCells();for(var d=b.slice(0),e=0;e<d.length;e++){var f=t.view.getState(d[e]);if(null!=f&&a(f.cell))for(var g=t.getIncomingTreeEdges(f.cell),f=0;f<g.length;f++)mxUtils.remove(g[f],b)}this.model.beginUpdate();try{var k=z.call(this,b,c);if(k.length==b.length)for(e=0;e<b.length;e++)if(a(b[e])){var l=
t.getIncomingTreeEdges(k[e]),g=t.getIncomingTreeEdges(b[e]);if(0==l.length&&0<g.length){var m=this.cloneCell(g[0]);this.addEdge(m,t.getDefaultParent(),this.model.getTerminal(g[0],!0),k[e])}}}finally{this.model.endUpdate()}return k};var E=t.moveCells;t.moveCells=function(b,c,d,e,f,g,k){var l=null;this.model.beginUpdate();try{var m=f,n=this.getCurrentCellStyle(f);if(null!=b&&a(f)&&"1"==mxUtils.getValue(n,"treeFolding","0")){for(var p=0;p<b.length;p++)if(a(b[p])||t.model.isEdge(b[p])&&null==t.model.getTerminal(b[p],
-!0)){f=t.model.getParent(b[p]);break}if(null!=m&&f!=m&&null!=this.view.getState(b[0])){var q=t.getIncomingTreeEdges(b[0]);if(0<q.length){var v=t.view.getState(t.model.getTerminal(q[0],!0));if(null!=v){var u=t.view.getState(m);null!=u&&(c=(u.getCenterX()-v.getCenterX())/t.view.scale,d=(u.getCenterY()-v.getCenterY())/t.view.scale)}}}}l=E.apply(this,arguments);if(null!=l&&null!=b&&l.length==b.length)for(p=0;p<l.length;p++)if(this.model.isEdge(l[p]))a(m)&&0>mxUtils.indexOf(l,this.model.getTerminal(l[p],
+!0)){f=t.model.getParent(b[p]);break}if(null!=m&&f!=m&&null!=this.view.getState(b[0])){var q=t.getIncomingTreeEdges(b[0]);if(0<q.length){var u=t.view.getState(t.model.getTerminal(q[0],!0));if(null!=u){var v=t.view.getState(m);null!=v&&(c=(v.getCenterX()-u.getCenterX())/t.view.scale,d=(v.getCenterY()-u.getCenterY())/t.view.scale)}}}}l=E.apply(this,arguments);if(null!=l&&null!=b&&l.length==b.length)for(p=0;p<l.length;p++)if(this.model.isEdge(l[p]))a(m)&&0>mxUtils.indexOf(l,this.model.getTerminal(l[p],
!0))&&this.model.setTerminal(l[p],m,!0);else if(a(b[p])&&(q=t.getIncomingTreeEdges(b[p]),0<q.length))if(!e)a(m)&&0>mxUtils.indexOf(b,this.model.getTerminal(q[0],!0))&&this.model.setTerminal(q[0],m,!0);else if(0==t.getIncomingTreeEdges(l[p]).length){n=m;if(null==n||n==t.model.getParent(b[p]))n=t.model.getTerminal(q[0],!0);e=this.cloneCell(q[0]);this.addEdge(e,t.getDefaultParent(),n,l[p])}}finally{this.model.endUpdate()}return l};if(null!=u.sidebar){var H=u.sidebar.dropAndConnect;u.sidebar.dropAndConnect=
function(b,c,d,e){var f=t.model,g=null;f.beginUpdate();try{if(g=H.apply(this,arguments),a(b))for(var k=0;k<g.length;k++)if(f.isEdge(g[k])&&null==f.getTerminal(g[k],!0)){f.setTerminal(g[k],b,!0);var l=t.getCellGeometry(g[k]);l.points=null;null!=l.getTerminalPoint(!0)&&l.setTerminalPoint(null,!0)}}finally{f.endUpdate()}return g}}var K={88:u.actions.get("selectChildren"),84:u.actions.get("selectSubtree"),80:u.actions.get("selectParent"),83:u.actions.get("selectSiblings")},F=u.onKeyDown;u.onKeyDown=function(b){try{if(t.isEnabled()&&
-!t.isEditing()&&a(t.getSelectionCell())&&1==t.getSelectionCount()){var c=null;0<t.getIncomingTreeEdges(t.getSelectionCell()).length&&(9==b.which?c=mxEvent.isShiftDown(b)?g(t.getSelectionCell()):n(t.getSelectionCell()):13==b.which&&(c=e(t.getSelectionCell(),!mxEvent.isShiftDown(b))));if(null!=c&&0<c.length)1==c.length&&t.model.isEdge(c[0])?t.setSelectionCell(t.model.getTerminal(c[0],!1)):t.setSelectionCell(c[c.length-1]),null!=u.hoverIcons&&u.hoverIcons.update(t.view.getState(t.getSelectionCell())),
+!t.isEditing()&&a(t.getSelectionCell())&&1==t.getSelectionCount()){var c=null;0<t.getIncomingTreeEdges(t.getSelectionCell()).length&&(9==b.which?c=mxEvent.isShiftDown(b)?k(t.getSelectionCell()):n(t.getSelectionCell()):13==b.which&&(c=e(t.getSelectionCell(),!mxEvent.isShiftDown(b))));if(null!=c&&0<c.length)1==c.length&&t.model.isEdge(c[0])?t.setSelectionCell(t.model.getTerminal(c[0],!1)):t.setSelectionCell(c[c.length-1]),null!=u.hoverIcons&&u.hoverIcons.update(t.view.getState(t.getSelectionCell())),
t.startEditingAtCell(t.getSelectionCell()),mxEvent.consume(b);else if(mxEvent.isAltDown(b)&&mxEvent.isShiftDown(b)){var d=K[b.keyCode];null!=d&&(d.funct(b),mxEvent.consume(b))}else 37==b.keyCode?(q(t.getSelectionCell(),mxConstants.DIRECTION_WEST),mxEvent.consume(b)):38==b.keyCode?(q(t.getSelectionCell(),mxConstants.DIRECTION_NORTH),mxEvent.consume(b)):39==b.keyCode?(q(t.getSelectionCell(),mxConstants.DIRECTION_EAST),mxEvent.consume(b)):40==b.keyCode&&(q(t.getSelectionCell(),mxConstants.DIRECTION_SOUTH),
-mxEvent.consume(b))}}catch(B){u.handleError(B)}mxEvent.isConsumed(b)||F.apply(this,arguments)};var I=t.connectVertex;t.connectVertex=function(b,d,f,k,l,m,p){var q=t.getIncomingTreeEdges(b);if(a(b)){var v=c(b),u=v==mxConstants.DIRECTION_EAST||v==mxConstants.DIRECTION_WEST,z=d==mxConstants.DIRECTION_EAST||d==mxConstants.DIRECTION_WEST;return v==d||0==q.length?n(b,d):u==z?g(b):e(b,d!=mxConstants.DIRECTION_NORTH&&d!=mxConstants.DIRECTION_WEST)}return I.apply(this,arguments)};t.getSubtree=function(c){var d=
-[c];!b(c)&&!a(c)||p(c)||t.traverse(c,!0,function(a,b){var c=null!=b&&t.isTreeEdge(b);c&&0>mxUtils.indexOf(d,b)&&d.push(b);(null==b||c)&&0>mxUtils.indexOf(d,a)&&d.push(a);return null==b||c});return d};var C=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){C.apply(this,arguments);(b(this.state.cell)||a(this.state.cell))&&!p(this.state.cell)&&0<this.graph.getOutgoingTreeEdges(this.state.cell).length&&(this.moveHandle=mxUtils.createImage(Editor.moveImage),this.moveHandle.setAttribute("title",
+mxEvent.consume(b))}}catch(B){u.handleError(B)}mxEvent.isConsumed(b)||F.apply(this,arguments)};var I=t.connectVertex;t.connectVertex=function(b,d,f,g,l,m,p){var q=t.getIncomingTreeEdges(b);if(a(b)){var u=c(b),v=u==mxConstants.DIRECTION_EAST||u==mxConstants.DIRECTION_WEST,z=d==mxConstants.DIRECTION_EAST||d==mxConstants.DIRECTION_WEST;return u==d||0==q.length?n(b,d):v==z?k(b):e(b,d!=mxConstants.DIRECTION_NORTH&&d!=mxConstants.DIRECTION_WEST)}return I.apply(this,arguments)};t.getSubtree=function(c){var d=
+[c];!b(c)&&!a(c)||p(c)||t.traverse(c,!0,function(a,b){var c=null!=b&&t.isTreeEdge(b);c&&0>mxUtils.indexOf(d,b)&&d.push(b);(null==b||c)&&0>mxUtils.indexOf(d,a)&&d.push(a);return null==b||c});return d};var D=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){D.apply(this,arguments);(b(this.state.cell)||a(this.state.cell))&&!p(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(a){this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(a),mxEvent.getClientY(a),this.graph.getSubtree(this.state.cell));this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(a);
this.graph.isMouseDown=!0;u.hoverIcons.reset();mxEvent.consume(a)})))};var M=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){M.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.style.left=this.state.x+this.state.width+(40>this.state.width?10:0)+2+"px",this.moveHandle.style.top=this.state.y+this.state.height+(40>this.state.height?10:0)+2+"px")};var U=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(a){U.apply(this,
arguments);null!=this.moveHandle&&(this.moveHandle.style.display=a?"":"none")};var O=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(a,b){O.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)}};if("undefined"!==typeof Sidebar){var d=Sidebar.prototype.createAdvancedShapes;Sidebar.prototype.createAdvancedShapes=function(){var a=d.apply(this,arguments),b=this.graph;return a.concat([this.addEntry("tree container",
@@ -3806,26 +3809,26 @@ function(){var a=new mxCell("Tree Container",new mxGeometry(0,0,400,320),"swimla
c.vertex=!0;var d=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");d.geometry.relative=!0;d.edge=!0;b.insertEdge(d,!0);c.insertEdge(d,!1);a.insert(d);a.insert(b);a.insert(c);return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap mindmaps central idea branch topic",function(){var a=new mxCell("Mindmap",new mxGeometry(0,0,420,126),"swimlane;startSize=20;horizontal=1;containerType=tree;");
a.vertex=!0;var b=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};');b.vertex=!0;var c=new mxCell("Topic",new mxGeometry(320,40,80,20),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
c.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;b.insertEdge(d,!0);c.insertEdge(d,!1);var f=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};');
-f.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;b.insertEdge(k,!0);f.insertEdge(k,!1);var l=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};');
+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;b.insertEdge(g,!0);f.insertEdge(g,!1);var l=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};');
l.vertex=!0;var q=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");q.geometry.relative=!0;q.edge=!0;b.insertEdge(q,!0);l.insertEdge(q,!1);var u=new mxCell("Branch",new mxGeometry(20,80,72,26),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
-u.vertex=!0;var t=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");t.geometry.relative=!0;t.edge=!0;b.insertEdge(t,!0);u.insertEdge(t,!1);a.insert(d);a.insert(k);a.insert(q);a.insert(t);a.insert(b);a.insert(c);a.insert(f);a.insert(l);a.insert(u);return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap mindmaps central idea",function(){var a=new mxCell("Central Idea",
+u.vertex=!0;var t=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");t.geometry.relative=!0;t.edge=!0;b.insertEdge(t,!0);u.insertEdge(t,!1);a.insert(d);a.insert(g);a.insert(q);a.insert(t);a.insert(b);a.insert(c);a.insert(f);a.insert(l);a.insert(u);return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap mindmaps central idea",function(){var a=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;');a.vertex=!0;return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap mindmaps branch",function(){var a=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};');
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.setTerminalPoint(new mxPoint(-40,40),!0);b.geometry.relative=!0;b.edge=!0;a.insertEdge(b,!1);return sb.createVertexTemplateFromCells([a,b],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap mindmaps sub topic",function(){var a=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};');
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.setTerminalPoint(new mxPoint(-40,40),!0);b.geometry.relative=!0;b.edge=!0;a.insertEdge(b,!1);return sb.createVertexTemplateFromCells([a,b],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree orgchart organization division",function(){var a=new mxCell("Orgchart",new mxGeometry(0,0,280,220),'swimlane;startSize=20;horizontal=1;containerType=tree;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');
a.vertex=!0;var d=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(d,"treeRoot","1");d.vertex=!0;var c=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"};');
-c.vertex=!0;var e=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");e.geometry.relative=!0;e.edge=!0;d.insertEdge(e,!0);c.insertEdge(e,!1);var f=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"};');f.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;d.insertEdge(k,!0);f.insertEdge(k,!1);a.insert(e);a.insert(k);a.insert(d);a.insert(c);a.insert(f);return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree root",function(){var a=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(a,"treeRoot",
+c.vertex=!0;var e=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");e.geometry.relative=!0;e.edge=!0;d.insertEdge(e,!0);c.insertEdge(e,!1);var f=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"};');f.vertex=!0;var g=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");
+g.geometry.relative=!0;g.edge=!0;d.insertEdge(g,!0);f.insertEdge(g,!1);a.insert(e);a.insert(g);a.insert(d);a.insert(c);a.insert(f);return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree root",function(){var a=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(a,"treeRoot",
"1");a.vertex=!0;return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree division",function(){var a=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"};');a.vertex=!0;var b=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");
b.geometry.setTerminalPoint(new mxPoint(0,0),!0);b.geometry.relative=!0;b.edge=!0;a.insertEdge(b,!1);return sb.createVertexTemplateFromCells([a,b],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree sub sections",function(){var a=new mxCell("Sub Section",new mxGeometry(0,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");a.vertex=!0;var b=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;startArrow=none;endArrow=none;rounded=0;targetPortConstraint=eastwest;sourcePortConstraint=northsouth;");
b.geometry.setTerminalPoint(new mxPoint(110,-40),!0);b.geometry.relative=!0;b.edge=!0;a.insertEdge(b,!1);var c=new mxCell("Sub Section",new mxGeometry(120,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");c.vertex=!0;var d=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;startArrow=none;endArrow=none;rounded=0;targetPortConstraint=eastwest;sourcePortConstraint=northsouth;");d.geometry.setTerminalPoint(new mxPoint(110,-40),!0);d.geometry.relative=
-!0;d.edge=!0;c.insertEdge(d,!1);return sb.createVertexTemplateFromCells([b,d,a,c],220,60,"Sub Sections")})])}}})();EditorUi.initMinimalTheme=function(){function a(a,b){var c=a.editor.graph;c.popupMenuHandler.hideMenu();null==a.formatWindow?(a.formatWindow=new k(a,mxResources.get("format"),"1"==urlParams.sketch?Math.max(10,a.diagramContainer.clientWidth-241):Math.max(10,a.diagramContainer.clientWidth-248),60,240,Math.min(566,c.container.clientHeight-10),function(b){var c=a.createFormat(b);c.init();a.addListener("darkModeChanged",mxUtils.bind(this,function(){c.refresh()}));return c}),a.formatWindow.window.minimumSize=
-new mxRectangle(0,0,240,80),a.formatWindow.window.setVisible(!0)):a.formatWindow.window.setVisible(null!=b?b:!a.formatWindow.window.isVisible());a.formatWindow.window.isVisible()&&"1"!=urlParams.sketch&&a.formatWindow.window.fit()}function b(a,b){var c=a.editor.graph;c.popupMenuHandler.hideMenu();new mxRectangle;if(null==a.sidebarWindow){var d=Math.min(c.container.clientWidth-10,218);a.sidebarWindow=new k(a,mxResources.get("shapes"),10,"1"==urlParams.sketch?15:56,d-6,Math.min(650,c.container.clientHeight-
+!0;d.edge=!0;c.insertEdge(d,!1);return sb.createVertexTemplateFromCells([b,d,a,c],220,60,"Sub Sections")})])}}})();EditorUi.initMinimalTheme=function(){function a(a,b){var c=a.editor.graph;c.popupMenuHandler.hideMenu();null==a.formatWindow?(a.formatWindow=new g(a,mxResources.get("format"),"1"==urlParams.sketch?Math.max(10,a.diagramContainer.clientWidth-241):Math.max(10,a.diagramContainer.clientWidth-248),60,240,Math.min(566,c.container.clientHeight-10),function(b){var c=a.createFormat(b);c.init();a.addListener("darkModeChanged",mxUtils.bind(this,function(){c.refresh()}));return c}),a.formatWindow.window.minimumSize=
+new mxRectangle(0,0,240,80),a.formatWindow.window.setVisible(!0)):a.formatWindow.window.setVisible(null!=b?b:!a.formatWindow.window.isVisible());a.formatWindow.window.isVisible()&&"1"!=urlParams.sketch&&a.formatWindow.window.fit()}function b(a,b){var c=a.editor.graph;c.popupMenuHandler.hideMenu();new mxRectangle;if(null==a.sidebarWindow){var d=Math.min(c.container.clientWidth-10,218);a.sidebarWindow=new g(a,mxResources.get("shapes"),10,"1"==urlParams.sketch?15:56,d-6,Math.min(650,c.container.clientHeight-
30),function(b){function c(c,d){var f=a.menus.get(c),g=e.addMenu(d,mxUtils.bind(this,function(){f.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";b.appendChild(g);return g}var d=document.createElement("div");d.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;";
d.className="geTitle";d.innerHTML='<span style="font-size:18px;margin-right:5px;">+</span>';mxUtils.write(d,mxResources.get("moreShapes"));b.appendChild(d);mxEvent.addListener(d,"click",function(){a.actions.get("shapes").funct()});var e=new Menubar(a,b);if(!Editor.enableCustomLibraries||"1"==urlParams.embed&&"1"!=urlParams.libraries)d.style.bottom="0";else if(null!=a.actions.get("newLibrary")){d=document.createElement("div");d.style.cssText="position:absolute;left:0px;width:50%;border-top:1px solid lightgray;height:30px;bottom:0px;text-align:center;cursor:pointer;padding:0px;";
d.className="geTitle";var f=document.createElement("span");f.style.cssText="position:relative;top:6px;";mxUtils.write(f,mxResources.get("newLibrary"));d.appendChild(f);b.appendChild(d);mxEvent.addListener(d,"click",a.actions.get("newLibrary").funct);d=document.createElement("div");d.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;";d.className="geTitle";f=document.createElement("span");
f.style.cssText="position:relative;top:6px;";mxUtils.write(f,mxResources.get("openLibrary"));d.appendChild(f);b.appendChild(d);mxEvent.addListener(d,"click",a.actions.get("openLibrary").funct)}else d=c("newLibrary",mxResources.get("newLibrary")),d.style.boxSizing="border-box",d.style.paddingRight="6px",d.style.paddingLeft="6px",d.style.height="32px",d.style.left="0",d=c("openLibraryFrom",mxResources.get("openLibraryFrom")),d.style.borderLeft="1px solid lightgray",d.style.boxSizing="border-box",d.style.paddingRight=
"6px",d.style.paddingLeft="6px",d.style.height="32px",d.style.left="50%";b.appendChild(a.sidebar.container);b.style.overflow="hidden";return b});a.sidebarWindow.window.minimumSize=new mxRectangle(0,0,90,90);a.sidebarWindow.window.setVisible(!0);a.getLocalData("sidebar",function(b){a.sidebar.showEntries(b,null,!0)});a.restoreLibraries()}else a.sidebarWindow.window.setVisible(null!=b?b:!a.sidebarWindow.window.isVisible());a.sidebarWindow.window.isVisible()&&a.sidebarWindow.window.fit()}if("1"==urlParams.lightbox||
-"0"==urlParams.chrome||"undefined"===typeof window.Format||"undefined"===typeof window.Menus)window.uiTheme=null;else{var d=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,k=function(a,b,c,d,e,f,g){var k=document.createElement("div");k.className="geSidebarContainer";k.style.position="absolute";k.style.width="100%";k.style.height="100%";k.style.border="1px solid whiteSmoke";k.style.overflowX="hidden";k.style.overflowY="auto";g(k);this.window=new mxWindow(b,k,c,d,
+"0"==urlParams.chrome||"undefined"===typeof window.Format||"undefined"===typeof window.Menus)window.uiTheme=null;else{var d=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,g=function(a,b,c,d,e,f,g){var k=document.createElement("div");k.className="geSidebarContainer";k.style.position="absolute";k.style.width="100%";k.style.height="100%";k.style.border="1px solid whiteSmoke";k.style.overflowX="hidden";k.style.overflowY="auto";g(k);this.window=new mxWindow(b,k,c,d,
e,f,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.window.setLocation=function(a,b){var c=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight;a=Math.max(0,Math.min(a,(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)-this.table.clientWidth));b=Math.max(0,Math.min(b,c-this.table.clientHeight-("1"==urlParams.sketch?3:48)));
this.getX()==a&&this.getY()==b||mxWindow.prototype.setLocation.apply(this,arguments)};mxClient.IS_SF&&(this.window.div.onselectstart=mxUtils.bind(this,function(b){null==b&&(b=window.event);return null!=b&&a.isSelectionAllowed(b)}))};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="#29b6f2"/>');
@@ -3844,7 +3847,7 @@ document.body.style.backgroundColor=Editor.isDarkMode()?"#2a2a2a":"#ffffff";m.in
(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?"html .geStatusAlertOrange, html .geStatusAlert { margin-top: -2px; }a.geStatus > div { overflow: hidden; text-overflow: ellipsis; max-width: 100%; }":"")};var m=document.createElement("style");m.type="text/css";m.innerHTML=Editor.createMinimalCss();document.getElementsByTagName("head")[0].appendChild(m);Editor.prototype.isChromelessView=function(){return!1};Graph.prototype.isLightboxView=
function(){return!1};var p=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");p.apply(this,arguments)};var c=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){c.apply(this,arguments);this.menus.get("save").setEnabled(null!=this.getCurrentFile()||"1"==urlParams.embed)};var e=
-Menus.prototype.addShortcut;Menus.prototype.addShortcut=function(a,b){null!=b.shortcut&&900>d&&!mxClient.IS_IOS?a.firstChild.nextSibling.setAttribute("title",b.shortcut):e.apply(this,arguments)};var g=App.prototype.updateUserElement;App.prototype.updateUserElement=function(){g.apply(this,arguments);if(null!=this.userElement){var a=this.userElement;a.style.cssText="position:relative;margin-right:4px;cursor:pointer;display:"+a.style.display;a.className="geToolbarButton";a.innerHTML="";a.style.backgroundImage=
+Menus.prototype.addShortcut;Menus.prototype.addShortcut=function(a,b){null!=b.shortcut&&900>d&&!mxClient.IS_IOS?a.firstChild.nextSibling.setAttribute("title",b.shortcut):e.apply(this,arguments)};var k=App.prototype.updateUserElement;App.prototype.updateUserElement=function(){k.apply(this,arguments);if(null!=this.userElement){var a=this.userElement;a.style.cssText="position:relative;margin-right:4px;cursor:pointer;display:"+a.style.display;a.className="geToolbarButton";a.innerHTML="";a.style.backgroundImage=
"url("+Editor.userImage+")";a.style.backgroundPosition="center center";a.style.backgroundRepeat="no-repeat";a.style.backgroundSize="24px 24px";a.style.height="24px";a.style.width="24px";a.style.cssFloat="right";a.setAttribute("title",mxResources.get("changeUser"));"none"!=a.style.display&&(a.style.display="inline-block")}};var n=App.prototype.updateButtonContainer;App.prototype.updateButtonContainer=function(){n.apply(this,arguments);if(null!=this.shareButton){var a=this.shareButton;a.style.cssText=
"display:inline-block;position:relative;box-sizing:border-box;margin-right:4px;cursor:pointer;";a.className="geToolbarButton";a.innerHTML="";a.style.backgroundImage="url("+Editor.shareImage+")";a.style.backgroundPosition="center center";a.style.backgroundRepeat="no-repeat";a.style.backgroundSize="24px 24px";a.style.height="24px";a.style.width="24px";"1"==urlParams.sketch&&(this.shareButton.style.display="none")}null!=this.buttonContainer&&(this.buttonContainer.style.marginTop="-2px",this.buttonContainer.style.paddingTop=
"4px")};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.buttonContainer){var a=document.createElement("div");a.style.display="inline-block";a.style.position="relative";a.style.marginTop="6px";a.style.marginRight="4px";var b=document.createElement("a");b.className="geMenuItem gePrimaryBtn";b.style.marginLeft="8px";b.style.padding="6px";if("1"==urlParams.noSaveBtn){var c="1"==urlParams.publishClose?mxResources.get("publish"):mxResources.get("saveAndExit");mxUtils.write(b,c);b.setAttribute("title",
@@ -3858,7 +3861,7 @@ Menus.prototype.addPopupMenuEditItems=function(a,b,c){u.apply(this,arguments);th
this.actions.layersWindow=null);null!=this.menus.tagsWindow&&(this.menus.tagsWindow.window.setVisible(!1),this.menus.tagsWindow.window.destroy(),this.menus.tagsWindow=null);null!=this.menus.findWindow&&(this.menus.findWindow.window.setVisible(!1),this.menus.findWindow.window.destroy(),this.menus.findWindow=null);null!=this.menus.findReplaceWindow&&(this.menus.findReplaceWindow.window.setVisible(!1),this.menus.findReplaceWindow.window.destroy(),this.menus.findReplaceWindow=null);t.apply(this,arguments)};
var A=EditorUi.prototype.setGraphEnabled;EditorUi.prototype.setGraphEnabled=function(a){A.apply(this,arguments);if(a){var b=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;1E3<=b&&null!=this.sidebarWindow&&"1"!=urlParams.sketch&&this.sidebarWindow.window.setVisible(!0);null!=this.formatWindow&&(1E3<=b||"1"==urlParams.sketch)&&this.formatWindow.window.setVisible(!0)}else null!=this.sidebarWindow&&this.sidebarWindow.window.setVisible(!1),null!=this.formatWindow&&this.formatWindow.window.setVisible(!1)};
EditorUi.prototype.chromelessWindowResize=function(){};var x=Menus.prototype.init;Menus.prototype.init=function(){x.apply(this,arguments);var c=this.editorUi,d=c.editor.graph;c.actions.get("editDiagram").label=mxResources.get("formatXml")+"...";c.actions.get("createShape").label=mxResources.get("shape")+"...";c.actions.get("outline").label=mxResources.get("outline")+"...";c.actions.get("layers").label=mxResources.get("layers")+"...";c.actions.get("forkme").visible="1"!=urlParams.sketch;c.actions.get("downloadDesktop").visible=
-"1"!=urlParams.sketch;var e=c.actions.put("toggleDarkMode",new Action(mxResources.get("dark"),function(){c.setDarkMode(!Editor.darkMode)}));e.setToggleAction(!0);e.setSelectedCallback(function(){return Editor.isDarkMode()});c.actions.put("importCsv",new Action(mxResources.get("csv")+"...",function(){d.popupMenuHandler.hideMenu();c.showImportCsvDialog()}));c.actions.put("importText",new Action(mxResources.get("text")+"...",function(){var a=new ParseDialog(c,"Insert from Text");c.showDialog(a.container,
+"1"!=urlParams.sketch;var e=c.actions.put("toggleDarkMode",new Action(mxResources.get("dark"),function(a){c.setDarkMode(!Editor.darkMode)}));e.setToggleAction(!0);e.setSelectedCallback(function(){return Editor.isDarkMode()});c.actions.put("importCsv",new Action(mxResources.get("csv")+"...",function(){d.popupMenuHandler.hideMenu();c.showImportCsvDialog()}));c.actions.put("importText",new Action(mxResources.get("text")+"...",function(){var a=new ParseDialog(c,"Insert from Text");c.showDialog(a.container,
620,420,!0,!1);a.init()}));c.actions.put("formatSql",new Action(mxResources.get("formatSql")+"...",function(){var a=new ParseDialog(c,"Insert from Text","formatSql");c.showDialog(a.container,620,420,!0,!1);a.init()}));c.actions.put("toggleShapes",new Action(mxResources.get("1"==urlParams.sketch?"moreShapes":"shapes")+"...",function(){b(c)},null,null,Editor.ctrlKey+"+Shift+K"));c.actions.put("toggleFormat",new Action(mxResources.get("format")+"...",function(){a(c)})).shortcut=c.actions.get("formatPanel").shortcut;
EditorUi.enablePlantUml&&!c.isOffline()&&c.actions.put("plantUml",new Action(mxResources.get("plantUml")+"...",function(){var a=new ParseDialog(c,mxResources.get("plantUml")+"...","plantUml");c.showDialog(a.container,620,420,!0,!1);a.init()}));c.actions.put("mermaid",new Action(mxResources.get("mermaid")+"...",function(){var a=new ParseDialog(c,mxResources.get("mermaid")+"...","mermaid");c.showDialog(a.container,620,420,!0,!1);a.init()}));var f=this.addPopupMenuCellEditItems;this.put("editCell",new Menu(mxUtils.bind(this,
function(a,b){var c=this.editorUi.editor.graph,d=c.getSelectionCell();f.call(this,a,d,null,b);this.addMenuItems(a,["editTooltip"],b);c.model.isVertex(d)&&this.addMenuItems(a,["editGeometry"],b);this.addMenuItems(a,["-","edit"],b)})));this.addPopupMenuCellEditItems=function(a,b,c,d){a.addSeparator();this.addSubmenu("editCell",a,d,mxResources.get("edit"))};this.put("diagram",new Menu(mxUtils.bind(this,function(a,b){var d=c.getCurrentFile();"1"!=urlParams.sketch&&(c.menus.addSubmenu("extras",a,b,mxResources.get("preferences")),
@@ -3873,128 +3876,129 @@ b);!c.isOfflineApp()&&isLocalStorage&&c.menus.addMenuItem(a,"plugins",b);a.addSe
d)):(b.apply(this,arguments),c.menus.addSubmenu("table",a,d),a.addSeparator(d));c.menus.addMenuItems(a,["-","toggleShapes"],d)}})();var m="horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "),n=function(a,b,d,e){a.addItem(d,null,mxUtils.bind(this,function(){var a=new CreateGraphDialog(c,d,e);c.showDialog(a.container,620,420,!0,!1);a.init()}),b)};this.put("insertLayout",new Menu(mxUtils.bind(this,function(a,b){for(var c=0;c<m.length;c++)"-"==m[c]?a.addSeparator(b):
n(a,b,mxResources.get(m[c])+"...",m[c])})));this.put("view",new Menu(mxUtils.bind(this,function(a,b){c.menus.addMenuItems(a,"grid guides ruler - connectionArrows connectionPoints -".split(" "),b);if("undefined"!==typeof MathJax){var d=c.menus.addMenuItem(a,"mathematicalTypesetting",b);c.menus.addLinkToItem(d,"https://www.diagrams.net/doc/faq/math-typesetting")}c.menus.addMenuItems(a,["copyConnect","collapseExpand","-"],b);d=c.getCurrentFile();null!=d&&null!=c.fileNode&&(d=null!=d.getTitle()?d.getTitle():
c.defaultFilename,/(\.html)$/i.test(d)||/(\.svg)$/i.test(d)||this.addMenuItems(a,["properties"],b));c.menus.addMenuItems(a,["pageScale"],b);"1"!=urlParams.sketch?c.menus.addMenuItems(a,["-","fullscreen","toggleDarkMode"],b):c.menus.addMenuItems(a,["pageSetup","-","layers"],b)})))};EditorUi.prototype.installFormatToolbar=function(a){var b=this.editor.graph,c=document.createElement("div");c.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%;";
-b.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(d,e){0<b.getSelectionCount()?(a.appendChild(c),c.innerHTML="Selected: "+b.getSelectionCount()):null!=c.parentNode&&c.parentNode.removeChild(c)}))};var G=EditorUi.prototype.init;EditorUi.prototype.init=function(){function c(a,b,c){var d=m.menus.get(a),e=t.addMenu(mxResources.get(a),mxUtils.bind(this,function(){d.funct.apply(this,arguments)}),q);e.className="geMenuItem";e.style.display="inline-block";e.style.boxSizing="border-box";
+b.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(d,e){0<b.getSelectionCount()?(a.appendChild(c),c.innerHTML="Selected: "+b.getSelectionCount()):null!=c.parentNode&&c.parentNode.removeChild(c)}))};var G=EditorUi.prototype.init;EditorUi.prototype.init=function(){function c(a,b,c){var d=m.menus.get(a),e=u.addMenu(mxResources.get(a),mxUtils.bind(this,function(){d.funct.apply(this,arguments)}),q);e.className="geMenuItem";e.style.display="inline-block";e.style.boxSizing="border-box";
e.style.top="6px";e.style.marginRight="6px";e.style.height="30px";e.style.paddingTop="6px";e.style.paddingBottom="6px";e.style.cursor="pointer";e.setAttribute("title",mxResources.get(a));m.menus.menuCreated(d,e,"geMenuItem");null!=c?(e.style.backgroundImage="url("+c+")",e.style.backgroundPosition="center center",e.style.backgroundRepeat="no-repeat",e.style.backgroundSize="24px 24px",e.style.width="34px",e.innerHTML=""):b||(e.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",e.style.backgroundPosition=
"right 6px center",e.style.backgroundRepeat="no-repeat",e.style.paddingRight="22px");return e}function e(a,b,c,d,e,f){var g=document.createElement("a");g.className="geMenuItem";g.style.display="inline-block";g.style.boxSizing="border-box";g.style.height="30px";g.style.padding="6px";g.style.position="relative";g.style.verticalAlign="top";g.style.top="0px";"1"==urlParams.sketch&&(g.style.borderStyle="none",g.style.boxShadow="none",g.style.padding="6px",g.style.margin="0px");null!=m.statusContainer?
p.insertBefore(g,m.statusContainer):p.appendChild(g);null!=f?(g.style.backgroundImage="url("+f+")",g.style.backgroundPosition="center center",g.style.backgroundRepeat="no-repeat",g.style.backgroundSize="24px 24px",g.style.width="34px"):mxUtils.write(g,a);mxEvent.addListener(g,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(a){a.preventDefault()}));mxEvent.addListener(g,"click",function(a){"disabled"!=g.getAttribute("disabled")&&b(a);mxEvent.consume(a)});null==c&&(g.style.marginRight=
"4px");null!=d&&g.setAttribute("title",d);null!=e&&(a=function(){e.isEnabled()?(g.removeAttribute("disabled"),g.style.cursor="pointer"):(g.setAttribute("disabled","disabled"),g.style.cursor="default")},e.addListener("stateChanged",a),n.addListener("enabledChanged",a),a());return g}function f(a,b,c){c=document.createElement("div");c.className="geMenuItem";c.style.display="inline-block";c.style.verticalAlign="top";c.style.marginRight="6px";c.style.padding="0 4px 0 4px";c.style.height="30px";c.style.position=
"relative";c.style.top="0px";"1"==urlParams.sketch&&(c.style.boxShadow="none");for(var d=0;d<a.length;d++)null!=a[d]&&("1"==urlParams.sketch&&(a[d].style.padding="10px 8px",a[d].style.width="30px"),a[d].style.margin="0px",a[d].style.boxShadow="none",c.appendChild(a[d]));null!=b&&mxUtils.setOpacity(c,b);null!=m.statusContainer&&"1"!=urlParams.sketch?p.insertBefore(c,m.statusContainer):p.appendChild(c);return c}function g(){for(var a=p.firstChild;null!=a;){var b=a.nextSibling;"geMenuItem"!=a.className&&
-"geItem"!=a.className||a.parentNode.removeChild(a);a=b}q=p.firstChild;d=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;(a=1E3>d||"1"==urlParams.sketch)||c("diagram");if("1"==urlParams.sketch)aa.style.left=58>Q.offsetTop-Q.offsetHeight/2?"70px":"10px";else if(f([a?c("diagram",null,IMAGE_PATH+"/drawlogo.svg"):null,e(mxResources.get("shapes"),m.actions.get("toggleShapes").funct,null,mxResources.get("shapes"),m.actions.get("image"),a?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTMgMTN2OGg4di04aC04ek0zIDIxaDh2LThIM3Y4ek0zIDN2OGg4VjNIM3ptMTMuNjYtMS4zMUwxMSA3LjM0IDE2LjY2IDEzbDUuNjYtNS42Ni01LjY2LTUuNjV6Ii8+PC9zdmc+":
-null),e(mxResources.get("format"),m.actions.get("toggleFormat").funct,null,mxResources.get("format")+" ("+m.actions.get("formatPanel").shortcut+")",m.actions.get("image"),a?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTIgM2MtNC45NyAwLTkgNC4wMy05IDlzNC4wMyA5IDkgOWMuODMgMCAxLjUtLjY3IDEuNS0xLjUgMC0uMzktLjE1LS43NC0uMzktMS4wMS0uMjMtLjI2LS4zOC0uNjEtLjM4LS45OSAwLS44My42Ny0xLjUgMS41LTEuNUgxNmMyLjc2IDAgNS0yLjI0IDUtNSAwLTQuNDItNC4wMy04LTktOHptLTUuNSA5Yy0uODMgMC0xLjUtLjY3LTEuNS0xLjVTNS42NyA5IDYuNSA5IDggOS42NyA4IDEwLjUgNy4zMyAxMiA2LjUgMTJ6bTMtNEM4LjY3IDggOCA3LjMzIDggNi41UzguNjcgNSA5LjUgNXMxLjUuNjcgMS41IDEuNVMxMC4zMyA4IDkuNSA4em01IDBjLS44MyAwLTEuNS0uNjctMS41LTEuNVMxMy42NyA1IDE0LjUgNXMxLjUuNjcgMS41IDEuNVMxNS4zMyA4IDE0LjUgOHptMyA0Yy0uODMgMC0xLjUtLjY3LTEuNS0xLjVTMTYuNjcgOSAxNy41IDlzMS41LjY3IDEuNSAxLjUtLjY3IDEuNS0xLjUgMS41eiIvPjwvc3ZnPg==":
-null)],a?60:null),b=c("insert",!0,a?L:null),f([b,e(mxResources.get("delete"),m.actions.get("delete").funct,null,mxResources.get("delete"),m.actions.get("delete"),a?ra:null)],a?60:null),411<=d&&(f([qa,va],60),520<=d&&(f([ua,640<=d?e("",P.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +)",P,ta):null,640<=d?e("",X.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",X,da):null],60),720<=d))){var g=e("",R.funct,null,mxResources.get("dark"),R,Editor.isDarkMode()?ba:ka);g.style.opacity=
-"0.4";m.addListener("darkModeChanged",mxUtils.bind(this,function(){g.style.backgroundImage="url("+(Editor.isDarkMode()?ba:ka)+")"}));null!=m.statusContainer&&"1"!=urlParams.sketch?p.insertBefore(g,m.statusContainer):p.appendChild(g)}a=m.menus.get("language");null!=a&&!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&600<=d&&"1"!=urlParams.sketch?(null==wa&&(b=t.addMenu("",a.funct),b.setAttribute("title",mxResources.get("language")),b.className="geToolbarButton",b.style.backgroundImage="url("+Editor.globeImage+
-")",b.style.backgroundPosition="center center",b.style.backgroundRepeat="no-repeat",b.style.backgroundSize="24px 24px",b.style.position="absolute",b.style.height="24px",b.style.width="24px",b.style.zIndex="1",b.style.right="8px",b.style.cursor="pointer",b.style.top="1"==urlParams.embed?"12px":"11px",p.appendChild(b),wa=b),m.buttonContainer.style.paddingRight="34px"):(m.buttonContainer.style.paddingRight="4px",null!=wa&&(wa.parentNode.removeChild(wa),wa=null))}G.apply(this,arguments);this.doSetDarkMode(null!=
-urlParams.dark?1==urlParams.dark:mxSettings.settings.darkMode);var k=document.createElement("div");k.style.cssText="position:absolute;left:0px;right:0px;top:0px;overflow-y:auto;overflow-x:hidden;";k.style.bottom="1"!=urlParams.embed||"1"==urlParams.libraries?"63px":"32px";this.sidebar=this.createSidebar(k);"1"==urlParams.sketch&&(this.toggleScratchpad(),this.editor.graph.isZoomWheelEvent=function(a){return!mxEvent.isShiftDown(a)&&!mxEvent.isMetaDown(a)&&!mxEvent.isAltDown(a)&&(!mxEvent.isControlDown(a)||
-mxClient.IS_MAC)});if("1"!=urlParams.sketch&&1E3<=d||null!=urlParams.clibs||null!=urlParams.libs||null!=urlParams["search-shapes"])b(this,!0),null!=this.sidebar&&null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes&&(this.sidebar.searchShapes(urlParams["search-shapes"]),this.sidebar.showEntries("search"));this.keyHandler.bindAction(75,!0,"toggleShapes",!0);if("1"==urlParams.sketch||1E3<=d)if(a(this,!0),"1"==urlParams.sketch){this.formatWindow.window.setClosable(!1);var l=this.formatWindow.window.toggleMinimized;
-this.formatWindow.window.toggleMinimized=function(){l.apply(this,arguments);this.minimized?(this.div.style.width="90px",this.table.style.width="90px",this.div.style.left=parseInt(this.div.style.left)+150+"px"):(this.div.style.width="240px",this.table.style.width="240px",this.div.style.left=parseInt(this.div.style.left)-150+"px");this.fit()};mxEvent.addListener(this.formatWindow.window.title,"dblclick",mxUtils.bind(this,function(a){mxEvent.getSource(a)==this.formatWindow.window.title&&this.formatWindow.window.toggleMinimized()}));
-this.formatWindow.window.toggleMinimized()}var m=this,n=m.editor.graph;m.toolbar=this.createToolbar(m.createDiv("geToolbar"));m.defaultLibraryName=mxResources.get("untitledLibrary");var p=document.createElement("div");p.className="geMenubarContainer";var q=null,t=new Menubar(m,p);m.statusContainer=m.createStatusContainer();m.statusContainer.style.position="relative";m.statusContainer.style.maxWidth="";m.statusContainer.style.marginTop="7px";m.statusContainer.style.marginLeft="6px";m.statusContainer.style.color=
-"gray";m.statusContainer.style.cursor="default";var u=m.hideCurrentMenu;m.hideCurrentMenu=function(){u.apply(this,arguments);this.editor.graph.popupMenuHandler.hideMenu()};var x=m.descriptorChanged;m.descriptorChanged=function(){x.apply(this,arguments);var a=m.getCurrentFile();if(null!=a&&null!=a.getTitle()){var b=a.getMode();"google"==b?b="googleDrive":"github"==b?b="gitHub":"gitlab"==b?b="gitLab":"onedrive"==b&&(b="oneDrive");b=mxResources.get(b);p.setAttribute("title",a.getTitle()+(null!=b?" ("+
-b+")":""))}else p.removeAttribute("title")};m.setStatusText(m.editor.getStatus());p.appendChild(m.statusContainer);m.buttonContainer=document.createElement("div");m.buttonContainer.style.cssText="position:absolute;right:0px;padding-right:34px;top:10px;white-space:nowrap;padding-top:2px;background-color:inherit;";p.appendChild(m.buttonContainer);m.menubarContainer=m.buttonContainer;m.tabContainer=document.createElement("div");m.tabContainer.className="geTabContainer";m.tabContainer.style.cssText="position:absolute;left:0px;right:0px;bottom:0px;height:30px;white-space:nowrap;margin-bottom:-2px;visibility:hidden;";
-var k=m.diagramContainer.parentNode,A=document.createElement("div");A.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";m.diagramContainer.style.top="1"==urlParams.sketch?"0px":"47px";var J=m.menus.get("viewZoom"),L="1"!=urlParams.sketch?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTkgMTNoLTZ2NmgtMnYtNkg1di0yaDZWNWgydjZoNnYyeiIvPjwvc3ZnPg==":"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGVuYWJsZS1iYWNrZ3JvdW5kPSJuZXcgMCAwIDI0IDI0IiBoZWlnaHQ9IjI0cHgiIHZpZXdCb3g9IjAgMCAyNCAyNCIgd2lkdGg9IjI0cHgiIGZpbGw9IiMwMDAwMDAiPjxnPjxwYXRoIGQ9Ik0wLDBoMjR2MjRIMFYweiIgZmlsbD0ibm9uZSIvPjwvZz48Zz48Zz48cGF0aCBkPSJNMywxMWg4VjNIM1YxMXogTTUsNWg0djRINVY1eiIvPjxwYXRoIGQ9Ik0xMywzdjhoOFYzSDEzeiBNMTksOWgtNFY1aDRWOXoiLz48cGF0aCBkPSJNMywyMWg4di04SDNWMjF6IE01LDE1aDR2NEg1VjE1eiIvPjxwb2x5Z29uIHBvaW50cz0iMTgsMTMgMTYsMTMgMTYsMTYgMTMsMTYgMTMsMTggMTYsMTggMTYsMjEgMTgsMjEgMTgsMTggMjEsMTggMjEsMTYgMTgsMTYiLz48L2c+PC9nPjwvc3ZnPg==",
-W="1"==urlParams.sketch?document.createElement("div"):null,Q="1"==urlParams.sketch?document.createElement("div"):null,aa="1"==urlParams.sketch?document.createElement("div"):null;m.addListener("darkModeChanged",mxUtils.bind(this,function(){null!=this.sidebar&&(this.sidebar.graph.stylesheet.styles=mxUtils.clone(n.stylesheet.styles),this.sidebar.container.innerHTML="",this.sidebar.palettes={},this.sidebar.init(),"1"==urlParams.sketch&&(this.scratchpad=null,this.toggleScratchpad()));n.refresh();n.refreshBackgroundImage();
+"geItem"!=a.className||a.parentNode.removeChild(a);a=b}q=p.firstChild;d=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;var a=1E3>d||"1"==urlParams.sketch,g=null;a||(g=c("diagram"));if("1"==urlParams.sketch)Z.style.left=58>Q.offsetTop-Q.offsetHeight/2?"70px":"10px";else if(b=a?c("diagram",null,IMAGE_PATH+"/drawlogo.svg"):null,null!=b&&(g=b),f([g,e(mxResources.get("shapes"),m.actions.get("toggleShapes").funct,null,mxResources.get("shapes"),m.actions.get("image"),
+a?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTMgMTN2OGg4di04aC04ek0zIDIxaDh2LThIM3Y4ek0zIDN2OGg4VjNIM3ptMTMuNjYtMS4zMUwxMSA3LjM0IDE2LjY2IDEzbDUuNjYtNS42Ni01LjY2LTUuNjV6Ii8+PC9zdmc+":null),e(mxResources.get("format"),m.actions.get("toggleFormat").funct,null,mxResources.get("format")+" ("+m.actions.get("formatPanel").shortcut+")",m.actions.get("image"),a?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTIgM2MtNC45NyAwLTkgNC4wMy05IDlzNC4wMyA5IDkgOWMuODMgMCAxLjUtLjY3IDEuNS0xLjUgMC0uMzktLjE1LS43NC0uMzktMS4wMS0uMjMtLjI2LS4zOC0uNjEtLjM4LS45OSAwLS44My42Ny0xLjUgMS41LTEuNUgxNmMyLjc2IDAgNS0yLjI0IDUtNSAwLTQuNDItNC4wMy04LTktOHptLTUuNSA5Yy0uODMgMC0xLjUtLjY3LTEuNS0xLjVTNS42NyA5IDYuNSA5IDggOS42NyA4IDEwLjUgNy4zMyAxMiA2LjUgMTJ6bTMtNEM4LjY3IDggOCA3LjMzIDggNi41UzguNjcgNSA5LjUgNXMxLjUuNjcgMS41IDEuNVMxMC4zMyA4IDkuNSA4em01IDBjLS44MyAwLTEuNS0uNjctMS41LTEuNVMxMy42NyA1IDE0LjUgNXMxLjUuNjcgMS41IDEuNVMxNS4zMyA4IDE0LjUgOHptMyA0Yy0uODMgMC0xLjUtLjY3LTEuNS0xLjVTMTYuNjcgOSAxNy41IDlzMS41LjY3IDEuNSAxLjUtLjY3IDEuNS0xLjUgMS41eiIvPjwvc3ZnPg==":
+null)],a?60:null),b=c("insert",!0,a?L:null),f([b,e(mxResources.get("delete"),m.actions.get("delete").funct,null,mxResources.get("delete"),m.actions.get("delete"),a?ra:null)],a?60:null),411<=d&&(f([qa,ya],60),520<=d&&(f([ua,640<=d?e("",P.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +)",P,ta):null,640<=d?e("",X.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",X,ca):null],60),720<=d))){var k=e("",R.funct,null,mxResources.get("dark"),R,Editor.isDarkMode()?aa:ka);k.style.opacity=
+"0.4";m.addListener("darkModeChanged",mxUtils.bind(this,function(){k.style.backgroundImage="url("+(Editor.isDarkMode()?aa:ka)+")"}));null!=m.statusContainer&&"1"!=urlParams.sketch?p.insertBefore(k,m.statusContainer):p.appendChild(k)}null!=g&&(mxEvent.disableContextMenu(g),mxEvent.addGestureListeners(g,mxUtils.bind(this,function(a){(mxEvent.isShiftDown(a)||mxEvent.isAltDown(a)||mxEvent.isMetaDown(a)||mxEvent.isControlDown(a)||mxEvent.isPopupTrigger(a))&&m.appIconClicked(a)}),null,null));b=m.menus.get("language");
+null!=b&&!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&600<=d&&"1"!=urlParams.sketch?(null==va&&(b=u.addMenu("",b.funct),b.setAttribute("title",mxResources.get("language")),b.className="geToolbarButton",b.style.backgroundImage="url("+Editor.globeImage+")",b.style.backgroundPosition="center center",b.style.backgroundRepeat="no-repeat",b.style.backgroundSize="24px 24px",b.style.position="absolute",b.style.height="24px",b.style.width="24px",b.style.zIndex="1",b.style.right="8px",b.style.cursor="pointer",
+b.style.top="1"==urlParams.embed?"12px":"11px",p.appendChild(b),va=b),m.buttonContainer.style.paddingRight="34px"):(m.buttonContainer.style.paddingRight="4px",null!=va&&(va.parentNode.removeChild(va),va=null))}G.apply(this,arguments);this.doSetDarkMode(null!=urlParams.dark?1==urlParams.dark:mxSettings.settings.darkMode);var k=document.createElement("div");k.style.cssText="position:absolute;left:0px;right:0px;top:0px;overflow-y:auto;overflow-x:hidden;";k.style.bottom="1"!=urlParams.embed||"1"==urlParams.libraries?
+"63px":"32px";this.sidebar=this.createSidebar(k);"1"==urlParams.sketch&&(this.toggleScratchpad(),this.editor.graph.isZoomWheelEvent=function(a){return!mxEvent.isShiftDown(a)&&!mxEvent.isMetaDown(a)&&!mxEvent.isAltDown(a)&&(!mxEvent.isControlDown(a)||mxClient.IS_MAC)});if("1"!=urlParams.sketch&&1E3<=d||null!=urlParams.clibs||null!=urlParams.libs||null!=urlParams["search-shapes"])b(this,!0),null!=this.sidebar&&null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes&&(this.sidebar.searchShapes(urlParams["search-shapes"]),
+this.sidebar.showEntries("search"));this.keyHandler.bindAction(75,!0,"toggleShapes",!0);if("1"==urlParams.sketch||1E3<=d)if(a(this,!0),"1"==urlParams.sketch){this.formatWindow.window.setClosable(!1);var l=this.formatWindow.window.toggleMinimized;this.formatWindow.window.toggleMinimized=function(){l.apply(this,arguments);this.minimized?(this.div.style.width="90px",this.table.style.width="90px",this.div.style.left=parseInt(this.div.style.left)+150+"px"):(this.div.style.width="240px",this.table.style.width=
+"240px",this.div.style.left=parseInt(this.div.style.left)-150+"px");this.fit()};mxEvent.addListener(this.formatWindow.window.title,"dblclick",mxUtils.bind(this,function(a){mxEvent.getSource(a)==this.formatWindow.window.title&&this.formatWindow.window.toggleMinimized()}));this.formatWindow.window.toggleMinimized()}var m=this,n=m.editor.graph;m.toolbar=this.createToolbar(m.createDiv("geToolbar"));m.defaultLibraryName=mxResources.get("untitledLibrary");var p=document.createElement("div");p.className=
+"geMenubarContainer";var q=null,u=new Menubar(m,p);m.statusContainer=m.createStatusContainer();m.statusContainer.style.position="relative";m.statusContainer.style.maxWidth="";m.statusContainer.style.marginTop="7px";m.statusContainer.style.marginLeft="6px";m.statusContainer.style.color="gray";m.statusContainer.style.cursor="default";var t=m.hideCurrentMenu;m.hideCurrentMenu=function(){t.apply(this,arguments);this.editor.graph.popupMenuHandler.hideMenu()};var x=m.descriptorChanged;m.descriptorChanged=
+function(){x.apply(this,arguments);var a=m.getCurrentFile();if(null!=a&&null!=a.getTitle()){var b=a.getMode();"google"==b?b="googleDrive":"github"==b?b="gitHub":"gitlab"==b?b="gitLab":"onedrive"==b&&(b="oneDrive");b=mxResources.get(b);p.setAttribute("title",a.getTitle()+(null!=b?" ("+b+")":""))}else p.removeAttribute("title")};m.setStatusText(m.editor.getStatus());p.appendChild(m.statusContainer);m.buttonContainer=document.createElement("div");m.buttonContainer.style.cssText="position:absolute;right:0px;padding-right:34px;top:10px;white-space:nowrap;padding-top:2px;background-color:inherit;";
+p.appendChild(m.buttonContainer);m.menubarContainer=m.buttonContainer;m.tabContainer=document.createElement("div");m.tabContainer.className="geTabContainer";m.tabContainer.style.cssText="position:absolute;left:0px;right:0px;bottom:0px;height:30px;white-space:nowrap;margin-bottom:-2px;visibility:hidden;";var k=m.diagramContainer.parentNode,A=document.createElement("div");A.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";m.diagramContainer.style.top="1"==urlParams.sketch?
+"0px":"47px";var J=m.menus.get("viewZoom"),L="1"!=urlParams.sketch?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTkgMTNoLTZ2NmgtMnYtNkg1di0yaDZWNWgydjZoNnYyeiIvPjwvc3ZnPg==":"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGVuYWJsZS1iYWNrZ3JvdW5kPSJuZXcgMCAwIDI0IDI0IiBoZWlnaHQ9IjI0cHgiIHZpZXdCb3g9IjAgMCAyNCAyNCIgd2lkdGg9IjI0cHgiIGZpbGw9IiMwMDAwMDAiPjxnPjxwYXRoIGQ9Ik0wLDBoMjR2MjRIMFYweiIgZmlsbD0ibm9uZSIvPjwvZz48Zz48Zz48cGF0aCBkPSJNMywxMWg4VjNIM1YxMXogTTUsNWg0djRINVY1eiIvPjxwYXRoIGQ9Ik0xMywzdjhoOFYzSDEzeiBNMTksOWgtNFY1aDRWOXoiLz48cGF0aCBkPSJNMywyMWg4di04SDNWMjF6IE01LDE1aDR2NEg1VjE1eiIvPjxwb2x5Z29uIHBvaW50cz0iMTgsMTMgMTYsMTMgMTYsMTYgMTMsMTYgMTMsMTggMTYsMTggMTYsMjEgMTgsMjEgMTgsMTggMjEsMTggMjEsMTYgMTgsMTYiLz48L2c+PC9nPjwvc3ZnPg==",
+W="1"==urlParams.sketch?document.createElement("div"):null,Q="1"==urlParams.sketch?document.createElement("div"):null,Z="1"==urlParams.sketch?document.createElement("div"):null;m.addListener("darkModeChanged",mxUtils.bind(this,function(){null!=this.sidebar&&(this.sidebar.graph.stylesheet.styles=mxUtils.clone(n.stylesheet.styles),this.sidebar.container.innerHTML="",this.sidebar.palettes={},this.sidebar.init(),"1"==urlParams.sketch&&(this.scratchpad=null,this.toggleScratchpad()));n.refresh();n.refreshBackgroundImage();
n.view.validateBackground()}));Graph.touchStyle&&(n.panningHandler.isPanningTrigger=function(a){var b=a.getEvent();return null==a.getState()&&!mxEvent.isMouseEvent(b)&&!n.freehand.isDrawing()||mxEvent.isPopupTrigger(b)&&(null==a.getState()||mxEvent.isControlDown(b)||mxEvent.isShiftDown(b))});if(null!=m.hoverIcons){var na=m.hoverIcons.update;m.hoverIcons.update=function(){n.freehand.isDrawing()||na.apply(this,arguments)}}if(null!=n.freehand){var ga=n.freehand.createStyle;n.freehand.createStyle=function(a){return ga.apply(this,
-arguments)+"sketch=0;"}}if("1"==urlParams.sketch){Q.className="geToolbarContainer";W.className="geToolbarContainer";aa.className="geToolbarContainer";p.className="geToolbarContainer";m.picker=Q;var ea=!1;mxEvent.addListener(p,"mouseenter",function(){m.statusContainer.style.display="inline-block"});mxEvent.addListener(p,"mouseleave",function(){ea||(m.statusContainer.style.display="none")});var la=mxUtils.bind(this,function(a){null!=m.notificationBtn&&(null!=a?m.notificationBtn.setAttribute("title",
+arguments)+"sketch=0;"}}if("1"==urlParams.sketch){Q.className="geToolbarContainer";W.className="geToolbarContainer";Z.className="geToolbarContainer";p.className="geToolbarContainer";m.picker=Q;var da=!1;mxEvent.addListener(p,"mouseenter",function(){m.statusContainer.style.display="inline-block"});mxEvent.addListener(p,"mouseleave",function(){da||(m.statusContainer.style.display="none")});var la=mxUtils.bind(this,function(a){null!=m.notificationBtn&&(null!=a?m.notificationBtn.setAttribute("title",
a):m.notificationBtn.removeAttribute("title"))});"1"!=urlParams.embed&&m.editor.addListener("statusChanged",mxUtils.bind(this,function(){m.setStatusText(m.editor.getStatus());if(0==m.statusContainer.children.length||1==m.statusContainer.children.length&&null==m.statusContainer.firstChild.getAttribute("class")){null!=m.statusContainer.firstChild?la(m.statusContainer.firstChild.getAttribute("title")):la(m.editor.getStatus());var a=m.getCurrentFile(),a=null!=a?a.savingStatusKey:DrawioFile.prototype.savingStatusKey;
-null!=m.notificationBtn&&m.notificationBtn.getAttribute("title")==mxResources.get(a)+"..."?(m.statusContainer.innerHTML='<img title="'+mxUtils.htmlEntities(mxResources.get(a))+'..."src="'+IMAGE_PATH+'/spin.gif">',m.statusContainer.style.display="inline-block",ea=!0):(m.statusContainer.style.display="none",ea=!1)}else m.statusContainer.style.display="inline-block",la(null),ea=!0}));S=c("diagram",null,IMAGE_PATH+"/drawlogo.svg");S.style.boxShadow="none";S.style.opacity="0.4";S.style.padding="6px";S.style.margin=
-"0px";aa.appendChild(S);m.statusContainer.style.position="";m.statusContainer.style.display="none";m.statusContainer.style.margin="0px";m.statusContainer.style.padding="6px 0px";m.statusContainer.style.maxWidth=Math.min(d-240,280)+"px";m.statusContainer.style.display="inline-block";m.statusContainer.style.textOverflow="ellipsis";m.buttonContainer.style.position="";m.buttonContainer.style.paddingRight="0px";m.buttonContainer.style.display="inline-block";var V=document.createElement("a");V.style.padding=
-"0px";V.style.boxShadow="none";V.className="geMenuItem";V.style.display="inline-block";V.style.width="40px";V.style.height="12px";V.style.marginBottom="-2px";V.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")";V.style.backgroundPosition="top center";V.style.backgroundRepeat="no-repeat";V.setAttribute("title","Minimize");var ca=!1,ma=mxUtils.bind(this,function(){Q.innerHTML="";if(!ca){var a=function(a,c,d){a=e("",a.funct,null,c,a,d);a.style.width="40px";return b(a,null,"pointer")},
-b=function(a,b,c){null!=b&&a.setAttribute("title",b);a.style.cursor=null!=c?c:"default";a.style.margin="2px 0px";Q.appendChild(a);mxUtils.br(Q);return a};b(m.sidebar.createVertexTemplate("text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;",40,20,"Text",mxResources.get("text"),!0,!0,null,!0),mxResources.get("text")+" ("+Editor.ctrlKey+"+Shift+X)");b(m.sidebar.createVertexTemplate("shape=note;whiteSpace=wrap;html=1;backgroundOutline=1;fontColor=#000000;darkOpacity=0.05;fillColor=#FFF9B2;strokeColor=none;fillStyle=solid;direction=west;gradientDirection=north;gradientColor=#FFF2A1;shadow=1;size=20;fontSize=24;pointerEvents=1;"+
-("0"!=urlParams.rough?"sketch=1;jiggle=2;":""),140,160,"",mxResources.get("note"),!0,!0,null,!0),mxResources.get("note"));b(m.sidebar.createVertexTemplate("rounded=0;whiteSpace=wrap;html=1;",160,80,"",mxResources.get("rectangle"),!0,!0,null,!0),mxResources.get("rectangle")+" ("+Editor.ctrlKey+"+K)");b(m.sidebar.createVertexTemplate("ellipse;whiteSpace=wrap;html=1;",160,100,"",mxResources.get("ellipse"),!0,!0,null,!0),mxResources.get("ellipse"));(function(){var a=new mxCell("",new mxGeometry(0,0,n.defaultEdgeLength,
-0),"edgeStyle=none;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;endArrow=open;sourcePerimeterSpacing=8;targetPerimeterSpacing=8;fontSize=16;"+("0"!=urlParams.rough?"sketch=1;":""));a.geometry.setTerminalPoint(new mxPoint(0,0),!0);a.geometry.setTerminalPoint(new mxPoint(a.geometry.width,0),!1);a.geometry.points=[];a.geometry.relative=!0;a.edge=!0;b(m.sidebar.createEdgeTemplateFromCells([a],a.geometry.width,a.geometry.height,mxResources.get("line"),!1,null,!0),mxResources.get("line"));
-a=a.clone();a.style+="shape=flexArrow;rounded=1;startSize=8;endSize=8;";a.geometry.width=n.defaultEdgeLength+20;a.geometry.setTerminalPoint(new mxPoint(0,20),!0);a.geometry.setTerminalPoint(new mxPoint(a.geometry.width,20),!1);a=b(m.sidebar.createEdgeTemplateFromCells([a],a.geometry.width,40,mxResources.get("arrow"),!1,null,!0),mxResources.get("arrow"));a.style.borderBottom="1px solid lightgray";a.style.paddingBottom="14px";a.style.marginBottom="14px"})();a(m.actions.get("insertFreehand"),mxResources.get("freehand"),
-"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMjRweCIgZmlsbD0iIzAwMDAwMCI+PHJlY3QgZmlsbD0ibm9uZSIgaGVpZ2h0PSIyNCIgd2lkdGg9IjI0Ii8+PHBhdGggZD0iTTQuNSw4YzEuMDQsMCwyLjM0LTEuNSw0LjI1LTEuNWMxLjUyLDAsMi43NSwxLjIzLDIuNzUsMi43NWMwLDIuMDQtMS45OSwzLjE1LTMuOTEsNC4yMkM1LjQyLDE0LjY3LDQsMTUuNTcsNCwxNyBjMCwxLjEsMC45LDIsMiwydjJjLTIuMjEsMC00LTEuNzktNC00YzAtMi43MSwyLjU2LTQuMTQsNC42Mi01LjI4YzEuNDItMC43OSwyLjg4LTEuNiwyLjg4LTIuNDdjMC0wLjQxLTAuMzQtMC43NS0wLjc1LTAuNzUgQzcuNSw4LjUsNi4yNSwxMCw0LjUsMTBDMy4xMiwxMCwyLDguODgsMiw3LjVDMiw1LjQ1LDQuMTcsMi44Myw1LDJsMS40MSwxLjQxQzUuNDEsNC40Miw0LDYuNDMsNCw3LjVDNCw3Ljc4LDQuMjIsOCw0LjUsOHogTTgsMjEgbDMuNzUsMGw4LjA2LTguMDZsLTMuNzUtMy43NUw4LDE3LjI1TDgsMjF6IE0xMCwxOC4wOGw2LjA2LTYuMDZsMC45MiwwLjkyTDEwLjkyLDE5TDEwLDE5TDEwLDE4LjA4eiBNMjAuMzcsNi4yOSBjLTAuMzktMC4zOS0xLjAyLTAuMzktMS40MSwwbC0xLjgzLDEuODNsMy43NSwzLjc1bDEuODMtMS44M2MwLjM5LTAuMzksMC4zOS0xLjAyLDAtMS40MUwyMC4zNyw2LjI5eiIvPjwvc3ZnPg==");
+null!=m.notificationBtn&&m.notificationBtn.getAttribute("title")==mxResources.get(a)+"..."?(m.statusContainer.innerHTML='<img title="'+mxUtils.htmlEntities(mxResources.get(a))+'..."src="'+IMAGE_PATH+'/spin.gif">',m.statusContainer.style.display="inline-block",da=!0):(m.statusContainer.style.display="none",da=!1)}else m.statusContainer.style.display="inline-block",la(null),da=!0}));S=c("diagram",null,IMAGE_PATH+"/drawlogo.svg");S.style.boxShadow="none";S.style.opacity="0.4";S.style.padding="6px";S.style.margin=
+"0px";Z.appendChild(S);mxEvent.disableContextMenu(S);mxEvent.addGestureListeners(S,mxUtils.bind(this,function(a){(mxEvent.isShiftDown(a)||mxEvent.isAltDown(a)||mxEvent.isMetaDown(a)||mxEvent.isControlDown(a)||mxEvent.isPopupTrigger(a))&&this.appIconClicked(a)}),null,null);m.statusContainer.style.position="";m.statusContainer.style.display="none";m.statusContainer.style.margin="0px";m.statusContainer.style.padding="6px 0px";m.statusContainer.style.maxWidth=Math.min(d-240,280)+"px";m.statusContainer.style.display=
+"inline-block";m.statusContainer.style.textOverflow="ellipsis";m.buttonContainer.style.position="";m.buttonContainer.style.paddingRight="0px";m.buttonContainer.style.display="inline-block";var V=document.createElement("a");V.style.padding="0px";V.style.boxShadow="none";V.className="geMenuItem";V.style.display="inline-block";V.style.width="40px";V.style.height="12px";V.style.marginBottom="-2px";V.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")";V.style.backgroundPosition="top center";
+V.style.backgroundRepeat="no-repeat";V.setAttribute("title","Minimize");var ba=!1,ma=mxUtils.bind(this,function(){Q.innerHTML="";if(!ba){var a=function(a,c,d){a=e("",a.funct,null,c,a,d);a.style.width="40px";return b(a,null,"pointer")},b=function(a,b,c){null!=b&&a.setAttribute("title",b);a.style.cursor=null!=c?c:"default";a.style.margin="2px 0px";Q.appendChild(a);mxUtils.br(Q);return a};b(m.sidebar.createVertexTemplate("text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;",
+40,20,"Text",mxResources.get("text"),!0,!0,null,!0),mxResources.get("text")+" ("+Editor.ctrlKey+"+Shift+X)");b(m.sidebar.createVertexTemplate("shape=note;whiteSpace=wrap;html=1;backgroundOutline=1;fontColor=#000000;darkOpacity=0.05;fillColor=#FFF9B2;strokeColor=none;fillStyle=solid;direction=west;gradientDirection=north;gradientColor=#FFF2A1;shadow=1;size=20;fontSize=24;pointerEvents=1;"+("0"!=urlParams.rough?"sketch=1;jiggle=2;":""),140,160,"",mxResources.get("note"),!0,!0,null,!0),mxResources.get("note"));
+b(m.sidebar.createVertexTemplate("rounded=0;whiteSpace=wrap;html=1;",160,80,"",mxResources.get("rectangle"),!0,!0,null,!0),mxResources.get("rectangle")+" ("+Editor.ctrlKey+"+K)");b(m.sidebar.createVertexTemplate("ellipse;whiteSpace=wrap;html=1;",160,100,"",mxResources.get("ellipse"),!0,!0,null,!0),mxResources.get("ellipse"));(function(){var a=new mxCell("",new mxGeometry(0,0,n.defaultEdgeLength,0),"edgeStyle=none;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;endArrow=open;sourcePerimeterSpacing=8;targetPerimeterSpacing=8;fontSize=16;"+
+("0"!=urlParams.rough?"sketch=1;":""));a.geometry.setTerminalPoint(new mxPoint(0,0),!0);a.geometry.setTerminalPoint(new mxPoint(a.geometry.width,0),!1);a.geometry.points=[];a.geometry.relative=!0;a.edge=!0;b(m.sidebar.createEdgeTemplateFromCells([a],a.geometry.width,a.geometry.height,mxResources.get("line"),!1,null,!0),mxResources.get("line"));a=a.clone();a.style+="shape=flexArrow;rounded=1;startSize=8;endSize=8;";a.geometry.width=n.defaultEdgeLength+20;a.geometry.setTerminalPoint(new mxPoint(0,20),
+!0);a.geometry.setTerminalPoint(new mxPoint(a.geometry.width,20),!1);a=b(m.sidebar.createEdgeTemplateFromCells([a],a.geometry.width,40,mxResources.get("arrow"),!1,null,!0),mxResources.get("arrow"));a.style.borderBottom="1px solid "+(Editor.isDarkMode()?"#505050":"lightgray");a.style.paddingBottom="14px";a.style.marginBottom="14px"})();a(m.actions.get("insertFreehand"),mxResources.get("freehand"),"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMjRweCIgZmlsbD0iIzAwMDAwMCI+PHJlY3QgZmlsbD0ibm9uZSIgaGVpZ2h0PSIyNCIgd2lkdGg9IjI0Ii8+PHBhdGggZD0iTTQuNSw4YzEuMDQsMCwyLjM0LTEuNSw0LjI1LTEuNWMxLjUyLDAsMi43NSwxLjIzLDIuNzUsMi43NWMwLDIuMDQtMS45OSwzLjE1LTMuOTEsNC4yMkM1LjQyLDE0LjY3LDQsMTUuNTcsNCwxNyBjMCwxLjEsMC45LDIsMiwydjJjLTIuMjEsMC00LTEuNzktNC00YzAtMi43MSwyLjU2LTQuMTQsNC42Mi01LjI4YzEuNDItMC43OSwyLjg4LTEuNiwyLjg4LTIuNDdjMC0wLjQxLTAuMzQtMC43NS0wLjc1LTAuNzUgQzcuNSw4LjUsNi4yNSwxMCw0LjUsMTBDMy4xMiwxMCwyLDguODgsMiw3LjVDMiw1LjQ1LDQuMTcsMi44Myw1LDJsMS40MSwxLjQxQzUuNDEsNC40Miw0LDYuNDMsNCw3LjVDNCw3Ljc4LDQuMjIsOCw0LjUsOHogTTgsMjEgbDMuNzUsMGw4LjA2LTguMDZsLTMuNzUtMy43NUw4LDE3LjI1TDgsMjF6IE0xMCwxOC4wOGw2LjA2LTYuMDZsMC45MiwwLjkyTDEwLjkyLDE5TDEwLDE5TDEwLDE4LjA4eiBNMjAuMzcsNi4yOSBjLTAuMzktMC4zOS0xLjAyLTAuMzktMS40MSwwbC0xLjgzLDEuODNsMy43NSwzLjc1bDEuODMtMS44M2MwLjM5LTAuMzksMC4zOS0xLjAyLDAtMS40MUwyMC4zNyw2LjI5eiIvPjwvc3ZnPg==");
var c=m.actions.get("toggleShapes");a(c,mxResources.get("shapes")+" ("+c.shortcut+")",L);a(m.actions.get("insertTemplate"),mxResources.get("template"),"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMjRweCIgZmlsbD0iIzAwMDAwMCI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTEzIDExaC0ydjNIOHYyaDN2M2gydi0zaDN2LTJoLTN6bTEtOUg2Yy0xLjEgMC0yIC45LTIgMnYxNmMwIDEuMS44OSAyIDEuOTkgMkgxOGMxLjEgMCAyLS45IDItMlY4bC02LTZ6bTQgMThINlY0aDd2NWg1djExeiIvPjwvc3ZnPg==")}Q.appendChild(V)});
-mxEvent.addListener(V,"click",mxUtils.bind(this,function(){ca?(mxUtils.setPrefixedStyle(Q.style,"transform","translate(0, -50%)"),Q.style.padding="8px 6px 4px",Q.style.top="50%",Q.style.bottom="",Q.style.height="",V.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",V.style.width="40px",V.style.height="12px",V.setAttribute("title","Minimize"),ca=!1,ma()):(Q.innerHTML="",Q.appendChild(V),mxUtils.setPrefixedStyle(Q.style,"transform","translate(0, 0)"),Q.style.top="",Q.style.bottom="12px",
-Q.style.padding="0px",Q.style.height="24px",V.style.height="24px",V.style.backgroundImage="url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTkgMTNoLTZ2NmgtMnYtNkg1di0yaDZWNWgydjZoNnYyeiIvPjwvc3ZnPg==)",V.setAttribute("title",mxResources.get("insert")),V.style.width="24px",ca=!0)}));ma();m.addListener("darkModeChanged",mxUtils.bind(this,function(){ma()}))}else m.editor.addListener("statusChanged",
+mxEvent.addListener(V,"click",mxUtils.bind(this,function(){ba?(mxUtils.setPrefixedStyle(Q.style,"transform","translate(0, -50%)"),Q.style.padding="8px 6px 4px",Q.style.top="50%",Q.style.bottom="",Q.style.height="",V.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",V.style.width="40px",V.style.height="12px",V.setAttribute("title","Minimize"),ba=!1,ma()):(Q.innerHTML="",Q.appendChild(V),mxUtils.setPrefixedStyle(Q.style,"transform","translate(0, 0)"),Q.style.top="",Q.style.bottom="12px",
+Q.style.padding="0px",Q.style.height="24px",V.style.height="24px",V.style.backgroundImage="url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTkgMTNoLTZ2NmgtMnYtNkg1di0yaDZWNWgydjZoNnYyeiIvPjwvc3ZnPg==)",V.setAttribute("title",mxResources.get("insert")),V.style.width="24px",ba=!0)}));ma();m.addListener("darkModeChanged",mxUtils.bind(this,function(){ma()}))}else m.editor.addListener("statusChanged",
mxUtils.bind(this,function(){m.setStatusText(m.editor.getStatus())}));if(null!=J){var T=function(a){n.popupMenuHandler.hideMenu();mxEvent.isAltDown(a)?m.actions.get("customZoom").funct():m.actions.get("smartFit").funct()},P=m.actions.get("zoomIn"),ta="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTUuNSAxNGgtLjc5bC0uMjgtLjI3QzE1LjQxIDEyLjU5IDE2IDExLjExIDE2IDkuNSAxNiA1LjkxIDEzLjA5IDMgOS41IDNTMyA1LjkxIDMgOS41IDUuOTEgMTYgOS41IDE2YzEuNjEgMCAzLjA5LS41OSA0LjIzLTEuNTdsLjI3LjI4di43OWw1IDQuOTlMMjAuNDkgMTlsLTQuOTktNXptLTYgMEM3LjAxIDE0IDUgMTEuOTkgNSA5LjVTNy4wMSA1IDkuNSA1IDE0IDcuMDEgMTQgOS41IDExLjk5IDE0IDkuNSAxNHptMi41LTRoLTJ2Mkg5di0ySDdWOWgyVjdoMXYyaDJ2MXoiLz48L3N2Zz4=",
-X=m.actions.get("zoomOut"),da="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTUuNSAxNGgtLjc5bC0uMjgtLjI3QzE1LjQxIDEyLjU5IDE2IDExLjExIDE2IDkuNSAxNiA1LjkxIDEzLjA5IDMgOS41IDNTMyA1LjkxIDMgOS41IDUuOTEgMTYgOS41IDE2YzEuNjEgMCAzLjA5LS41OSA0LjIzLTEuNTdsLjI3LjI4di43OWw1IDQuOTlMMjAuNDkgMTlsLTQuOTktNXptLTYgMEM3LjAxIDE0IDUgMTEuOTkgNSA5LjVTNy4wMSA1IDkuNSA1IDE0IDcuMDEgMTQgOS41IDExLjk5IDE0IDkuNSAxNHpNNyA5aDV2MUg3eiIvPjwvc3ZnPg==",
+X=m.actions.get("zoomOut"),ca="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTUuNSAxNGgtLjc5bC0uMjgtLjI3QzE1LjQxIDEyLjU5IDE2IDExLjExIDE2IDkuNSAxNiA1LjkxIDEzLjA5IDMgOS41IDNTMyA1LjkxIDMgOS41IDUuOTEgMTYgOS41IDE2YzEuNjEgMCAzLjA5LS41OSA0LjIzLTEuNTdsLjI3LjI4di43OWw1IDQuOTlMMjAuNDkgMTlsLTQuOTktNXptLTYgMEM3LjAxIDE0IDUgMTEuOTkgNSA5LjVTNy4wMSA1IDkuNSA1IDE0IDcuMDEgMTQgOS41IDExLjk5IDE0IDkuNSAxNHpNNyA5aDV2MUg3eiIvPjwvc3ZnPg==",
ia=m.actions.get("resetView"),pa=m.actions.get("fullscreen"),R=m.actions.get("toggleDarkMode"),ka="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGVuYWJsZS1iYWNrZ3JvdW5kPSJuZXcgMCAwIDI0IDI0IiBoZWlnaHQ9IjI0cHgiIHZpZXdCb3g9IjAgMCAyNCAyNCIgd2lkdGg9IjI0cHgiIGZpbGw9IiMwMDAwMDAiPjxyZWN0IGZpbGw9Im5vbmUiIGhlaWdodD0iMjQiIHdpZHRoPSIyNCIvPjxwYXRoIGQ9Ik05LjM3LDUuNTFDOS4xOSw2LjE1LDkuMSw2LjgyLDkuMSw3LjVjMCw0LjA4LDMuMzIsNy40LDcuNCw3LjRjMC42OCwwLDEuMzUtMC4wOSwxLjk5LTAuMjdDMTcuNDUsMTcuMTksMTQuOTMsMTksMTIsMTkgYy0zLjg2LDAtNy0zLjE0LTctN0M1LDkuMDcsNi44MSw2LjU1LDkuMzcsNS41MXogTTEyLDNjLTQuOTcsMC05LDQuMDMtOSw5czQuMDMsOSw5LDlzOS00LjAzLDktOWMwLTAuNDYtMC4wNC0wLjkyLTAuMS0xLjM2IGMtMC45OCwxLjM3LTIuNTgsMi4yNi00LjQsMi4yNmMtMi45OCwwLTUuNC0yLjQyLTUuNC01LjRjMC0xLjgxLDAuODktMy40MiwyLjI2LTQuNEMxMi45MiwzLjA0LDEyLjQ2LDMsMTIsM0wxMiwzeiIvPjwvc3ZnPg==",
-ba="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGVuYWJsZS1iYWNrZ3JvdW5kPSJuZXcgMCAwIDI0IDI0IiBoZWlnaHQ9IjI0cHgiIHZpZXdCb3g9IjAgMCAyNCAyNCIgd2lkdGg9IjI0cHgiIGZpbGw9IiMwMDAwMDAiPjxyZWN0IGZpbGw9Im5vbmUiIGhlaWdodD0iMjQiIHdpZHRoPSIyNCIvPjxwYXRoIGQ9Ik0xMiw5YzEuNjUsMCwzLDEuMzUsMywzcy0xLjM1LDMtMywzcy0zLTEuMzUtMy0zUzEwLjM1LDksMTIsOSBNMTIsN2MtMi43NiwwLTUsMi4yNC01LDVzMi4yNCw1LDUsNXM1LTIuMjQsNS01IFMxNC43Niw3LDEyLDdMMTIsN3ogTTIsMTNsMiwwYzAuNTUsMCwxLTAuNDUsMS0xcy0wLjQ1LTEtMS0xbC0yLDBjLTAuNTUsMC0xLDAuNDUtMSwxUzEuNDUsMTMsMiwxM3ogTTIwLDEzbDIsMGMwLjU1LDAsMS0wLjQ1LDEtMSBzLTAuNDUtMS0xLTFsLTIsMGMtMC41NSwwLTEsMC40NS0xLDFTMTkuNDUsMTMsMjAsMTN6IE0xMSwydjJjMCwwLjU1LDAuNDUsMSwxLDFzMS0wLjQ1LDEtMVYyYzAtMC41NS0wLjQ1LTEtMS0xUzExLDEuNDUsMTEsMnogTTExLDIwdjJjMCwwLjU1LDAuNDUsMSwxLDFzMS0wLjQ1LDEtMXYtMmMwLTAuNTUtMC40NS0xLTEtMUMxMS40NSwxOSwxMSwxOS40NSwxMSwyMHogTTUuOTksNC41OGMtMC4zOS0wLjM5LTEuMDMtMC4zOS0xLjQxLDAgYy0wLjM5LDAuMzktMC4zOSwxLjAzLDAsMS40MWwxLjA2LDEuMDZjMC4zOSwwLjM5LDEuMDMsMC4zOSwxLjQxLDBzMC4zOS0xLjAzLDAtMS40MUw1Ljk5LDQuNTh6IE0xOC4zNiwxNi45NSBjLTAuMzktMC4zOS0xLjAzLTAuMzktMS40MSwwYy0wLjM5LDAuMzktMC4zOSwxLjAzLDAsMS40MWwxLjA2LDEuMDZjMC4zOSwwLjM5LDEuMDMsMC4zOSwxLjQxLDBjMC4zOS0wLjM5LDAuMzktMS4wMywwLTEuNDEgTDE4LjM2LDE2Ljk1eiBNMTkuNDIsNS45OWMwLjM5LTAuMzksMC4zOS0xLjAzLDAtMS40MWMtMC4zOS0wLjM5LTEuMDMtMC4zOS0xLjQxLDBsLTEuMDYsMS4wNmMtMC4zOSwwLjM5LTAuMzksMS4wMywwLDEuNDEgczEuMDMsMC4zOSwxLjQxLDBMMTkuNDIsNS45OXogTTcuMDUsMTguMzZjMC4zOS0wLjM5LDAuMzktMS4wMywwLTEuNDFjLTAuMzktMC4zOS0xLjAzLTAuMzktMS40MSwwbC0xLjA2LDEuMDYgYy0wLjM5LDAuMzktMC4zOSwxLjAzLDAsMS40MXMxLjAzLDAuMzksMS40MSwwTDcuMDUsMTguMzZ6Ii8+PC9zdmc+",
-ja=m.actions.get("undo"),Y=m.actions.get("redo"),qa=e("",ja.funct,null,mxResources.get("undo")+" ("+ja.shortcut+")",ja,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTIuNSA4Yy0yLjY1IDAtNS4wNS45OS02LjkgMi42TDIgN3Y5aDlsLTMuNjItMy42MmMxLjM5LTEuMTYgMy4xNi0xLjg4IDUuMTItMS44OCAzLjU0IDAgNi41NSAyLjMxIDcuNiA1LjVsMi4zNy0uNzhDMjEuMDggMTEuMDMgMTcuMTUgOCAxMi41IDh6Ii8+PC9zdmc+"),va=e("",Y.funct,null,mxResources.get("redo")+
-" ("+Y.shortcut+")",Y,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTguNCAxMC42QzE2LjU1IDguOTkgMTQuMTUgOCAxMS41IDhjLTQuNjUgMC04LjU4IDMuMDMtOS45NiA3LjIyTDMuOSAxNmMxLjA1LTMuMTkgNC4wNS01LjUgNy42LTUuNSAxLjk1IDAgMy43My43MiA1LjEyIDEuODhMMTMgMTZoOVY3bC0zLjYgMy42eiIvPjwvc3ZnPg=="),ua=e("",T,!0,mxResources.get("fit")+" ("+Editor.ctrlKey+"+H)",ia,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGVuYWJsZS1iYWNrZ3JvdW5kPSJuZXcgMCAwIDI0IDI0IiBoZWlnaHQ9IjI0cHgiIHZpZXdCb3g9IjAgMCAyNCAyNCIgd2lkdGg9IjI0cHgiIGZpbGw9IiMwMDAwMDAiPjxnPjxwYXRoIGQ9Ik0wLDBoMjR2MjRIMFYweiIgZmlsbD0ibm9uZSIvPjwvZz48Zz48cGF0aCBkPSJNNiwxNmgxMlY4SDZWMTZ6IE04LDEwaDh2NEg4VjEweiBNNCwxNUgydjNjMCwxLjEsMC45LDIsMiwyaDN2LTJINFYxNXogTTQsNmgzVjRINEMyLjksNCwyLDQuOSwyLDZ2M2gyVjZ6IE0yMCw0aC0zdjJoM3YzIGgyVjZDMjIsNC45LDIxLjEsNCwyMCw0eiBNMjAsMThoLTN2MmgzYzEuMSwwLDItMC45LDItMnYtM2gtMlYxOHoiLz48L2c+PC9zdmc+"),
+aa="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGVuYWJsZS1iYWNrZ3JvdW5kPSJuZXcgMCAwIDI0IDI0IiBoZWlnaHQ9IjI0cHgiIHZpZXdCb3g9IjAgMCAyNCAyNCIgd2lkdGg9IjI0cHgiIGZpbGw9IiMwMDAwMDAiPjxyZWN0IGZpbGw9Im5vbmUiIGhlaWdodD0iMjQiIHdpZHRoPSIyNCIvPjxwYXRoIGQ9Ik0xMiw5YzEuNjUsMCwzLDEuMzUsMywzcy0xLjM1LDMtMywzcy0zLTEuMzUtMy0zUzEwLjM1LDksMTIsOSBNMTIsN2MtMi43NiwwLTUsMi4yNC01LDVzMi4yNCw1LDUsNXM1LTIuMjQsNS01IFMxNC43Niw3LDEyLDdMMTIsN3ogTTIsMTNsMiwwYzAuNTUsMCwxLTAuNDUsMS0xcy0wLjQ1LTEtMS0xbC0yLDBjLTAuNTUsMC0xLDAuNDUtMSwxUzEuNDUsMTMsMiwxM3ogTTIwLDEzbDIsMGMwLjU1LDAsMS0wLjQ1LDEtMSBzLTAuNDUtMS0xLTFsLTIsMGMtMC41NSwwLTEsMC40NS0xLDFTMTkuNDUsMTMsMjAsMTN6IE0xMSwydjJjMCwwLjU1LDAuNDUsMSwxLDFzMS0wLjQ1LDEtMVYyYzAtMC41NS0wLjQ1LTEtMS0xUzExLDEuNDUsMTEsMnogTTExLDIwdjJjMCwwLjU1LDAuNDUsMSwxLDFzMS0wLjQ1LDEtMXYtMmMwLTAuNTUtMC40NS0xLTEtMUMxMS40NSwxOSwxMSwxOS40NSwxMSwyMHogTTUuOTksNC41OGMtMC4zOS0wLjM5LTEuMDMtMC4zOS0xLjQxLDAgYy0wLjM5LDAuMzktMC4zOSwxLjAzLDAsMS40MWwxLjA2LDEuMDZjMC4zOSwwLjM5LDEuMDMsMC4zOSwxLjQxLDBzMC4zOS0xLjAzLDAtMS40MUw1Ljk5LDQuNTh6IE0xOC4zNiwxNi45NSBjLTAuMzktMC4zOS0xLjAzLTAuMzktMS40MSwwYy0wLjM5LDAuMzktMC4zOSwxLjAzLDAsMS40MWwxLjA2LDEuMDZjMC4zOSwwLjM5LDEuMDMsMC4zOSwxLjQxLDBjMC4zOS0wLjM5LDAuMzktMS4wMywwLTEuNDEgTDE4LjM2LDE2Ljk1eiBNMTkuNDIsNS45OWMwLjM5LTAuMzksMC4zOS0xLjAzLDAtMS40MWMtMC4zOS0wLjM5LTEuMDMtMC4zOS0xLjQxLDBsLTEuMDYsMS4wNmMtMC4zOSwwLjM5LTAuMzksMS4wMywwLDEuNDEgczEuMDMsMC4zOSwxLjQxLDBMMTkuNDIsNS45OXogTTcuMDUsMTguMzZjMC4zOS0wLjM5LDAuMzktMS4wMywwLTEuNDFjLTAuMzktMC4zOS0xLjAzLTAuMzktMS40MSwwbC0xLjA2LDEuMDYgYy0wLjM5LDAuMzktMC4zOSwxLjAzLDAsMS40MXMxLjAzLDAuMzksMS40MSwwTDcuMDUsMTguMzZ6Ii8+PC9zdmc+",
+ja=m.actions.get("undo"),ea=m.actions.get("redo"),qa=e("",ja.funct,null,mxResources.get("undo")+" ("+ja.shortcut+")",ja,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTIuNSA4Yy0yLjY1IDAtNS4wNS45OS02LjkgMi42TDIgN3Y5aDlsLTMuNjItMy42MmMxLjM5LTEuMTYgMy4xNi0xLjg4IDUuMTItMS44OCAzLjU0IDAgNi41NSAyLjMxIDcuNiA1LjVsMi4zNy0uNzhDMjEuMDggMTEuMDMgMTcuMTUgOCAxMi41IDh6Ii8+PC9zdmc+"),ya=e("",ea.funct,null,mxResources.get("redo")+
+" ("+ea.shortcut+")",ea,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTguNCAxMC42QzE2LjU1IDguOTkgMTQuMTUgOCAxMS41IDhjLTQuNjUgMC04LjU4IDMuMDMtOS45NiA3LjIyTDMuOSAxNmMxLjA1LTMuMTkgNC4wNS01LjUgNy42LTUuNSAxLjk1IDAgMy43My43MiA1LjEyIDEuODhMMTMgMTZoOVY3bC0zLjYgMy42eiIvPjwvc3ZnPg=="),ua=e("",T,!0,mxResources.get("fit")+" ("+Editor.ctrlKey+"+H)",ia,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGVuYWJsZS1iYWNrZ3JvdW5kPSJuZXcgMCAwIDI0IDI0IiBoZWlnaHQ9IjI0cHgiIHZpZXdCb3g9IjAgMCAyNCAyNCIgd2lkdGg9IjI0cHgiIGZpbGw9IiMwMDAwMDAiPjxnPjxwYXRoIGQ9Ik0wLDBoMjR2MjRIMFYweiIgZmlsbD0ibm9uZSIvPjwvZz48Zz48cGF0aCBkPSJNNiwxNmgxMlY4SDZWMTZ6IE04LDEwaDh2NEg4VjEweiBNNCwxNUgydjNjMCwxLjEsMC45LDIsMiwyaDN2LTJINFYxNXogTTQsNmgzVjRINEMyLjksNCwyLDQuOSwyLDZ2M2gyVjZ6IE0yMCw0aC0zdjJoM3YzIGgyVjZDMjIsNC45LDIxLjEsNCwyMCw0eiBNMjAsMThoLTN2MmgzYzEuMSwwLDItMC45LDItMnYtM2gtMlYxOHoiLz48L2c+PC9zdmc+"),
ia=e("",pa.funct,null,mxResources.get("fullscreen"),pa,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMyA1djRoMlY1aDRWM0g1Yy0xLjEgMC0yIC45LTIgMnptMiAxMEgzdjRjMCAxLjEuOSAyIDIgMmg0di0ySDV2LTR6bTE0IDRoLTR2Mmg0YzEuMSAwIDItLjkgMi0ydi00aC0ydjR6bTAtMTZoLTR2Mmg0djRoMlY1YzAtMS4xLS45LTItMi0yeiIvPjwvc3ZnPg=="),ra="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNNiAxOWMwIDEuMS45IDIgMiAyaDhjMS4xIDAgMi0uOSAyLTJWN0g2djEyek0xOSA0aC0zLjVsLTEtMWgtNWwtMSAxSDV2MmgxNFY0eiIvPjwvc3ZnPg==";
-if(null!=W){var ya=m.actions.get("delete"),za=e("",ya.funct,null,mxResources.get("delete"),ya,ra);za.style.opacity="0.1";aa.appendChild(za);ya.addListener("stateChanged",function(){za.style.opacity=ya.enabled?"0.4":"0.1"});J=function(){qa.style.display=0<m.editor.undoManager.history.length||n.isEditing()?"inline-block":"none";va.style.display=qa.style.display;qa.style.opacity=ja.enabled?"0.4":"0.1";va.style.opacity=Y.enabled?"0.4":"0.1"};aa.appendChild(qa);aa.appendChild(va);ja.addListener("stateChanged",
-J);Y.addListener("stateChanged",J);J();J=m.actions.get("outline");J=e("",J.funct,null,mxResources.get("outline"),J,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMjRweCIgZmlsbD0iIzAwMDAwMCI+PHBhdGggZD0iTTAgMGgyNHYyNEgweiIgZmlsbD0ibm9uZSIvPjxwYXRoIGQ9Ik0yMC41IDNsLS4xNi4wM0wxNSA1LjEgOSAzIDMuMzYgNC45Yy0uMjEuMDctLjM2LjI1LS4zNi40OFYyMC41YzAgLjI4LjIyLjUuNS41bC4xNi0uMDNMOSAxOC45bDYgMi4xIDUuNjQtMS45Yy4yMS0uMDcuMzYtLjI1LjM2LS40OFYzLjVjMC0uMjgtLjIyLS41LS41LS41ek0xNSAxOWwtNi0yLjExVjVsNiAyLjExVjE5eiIvPjwvc3ZnPg==");
-J.style.opacity="0.4";W.appendChild(J);J=e("",X.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -/Alt+Mousewheel)",X,da);J.style.opacity="0.4";W.appendChild(J);var S=document.createElement("div");S.innerHTML="100%";S.setAttribute("title",mxResources.get("fitWindow")+"/"+mxResources.get("resetView")+" (Enter)");S.style.display="inline-block";S.style.cursor="pointer";S.style.textAlign="center";S.style.whiteSpace="nowrap";S.style.paddingRight="10px";S.style.textDecoration="none";S.style.verticalAlign=
-"top";S.style.padding="6px 0";S.style.fontSize="14px";S.style.width="40px";S.style.opacity="0.4";W.appendChild(S);mxEvent.addListener(S,"click",T);T=e("",P.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +/Alt+Mousewheel)",P,ta);T.style.opacity="0.4";W.appendChild(T);var Aa=e("",R.funct,null,mxResources.get("dark"),R,Editor.isDarkMode()?ba:ka);Aa.style.opacity="0.4";W.appendChild(Aa);m.addListener("darkModeChanged",mxUtils.bind(this,function(){Aa.style.backgroundImage="url("+(Editor.isDarkMode()?
-ba:ka)+")"}));pa.visible&&(ia.style.opacity="0.4",W.appendChild(ia));var ha=this.createPageMenuTab(!1);ha.style.display="none";ha.style.position="";ha.style.marginLeft="";ha.style.top="";ha.style.left="";ha.style.height="100%";ha.style.lineHeight="";ha.style.borderStyle="none";ha.style.padding="3px 0";ha.style.margin="0px";ha.style.background="";ha.style.border="";ha.style.boxShadow="none";ha.style.verticalAlign="top";ha.firstChild.style.height="100%";ha.firstChild.style.opacity="0.6";ha.firstChild.style.margin=
-"0px";W.appendChild(ha);m.addListener("fileDescriptorChanged",function(){ha.style.display="1"==urlParams.pages||null!=m.pages&&1<m.pages.length?"inline-block":"none"});m.tabContainer.style.visibility="hidden";p.style.cssText="position:absolute;right:12px;top:10px;height:30px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px 0px 6px 6px;border-bottom:1px solid lightgray;text-align:right;white-space:nowrap;overflow:hidden;user-select:none;";aa.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;";
-W.style.cssText="position:absolute;right:12px;bottom:12px;height:28px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:8px;white-space:nowrap;user-select:none;";A.appendChild(aa);A.appendChild(W);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;";A.appendChild(Q);window.setTimeout(function(){mxUtils.setPrefixedStyle(Q.style,
-"transition","transform .3s ease-out")},0);"1"==urlParams["format-toolbar"]&&this.installFormatToolbar(A)}else p.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",S=t.addMenu("100%",J.funct),S.setAttribute("title",mxResources.get("zoom")+" (Alt+Mousewheel)"),S.style.whiteSpace="nowrap",S.style.paddingRight="10px",S.style.textDecoration="none",S.style.textDecoration="none",S.style.overflow="hidden",
+if(null!=W){var xa=m.actions.get("delete"),za=e("",xa.funct,null,mxResources.get("delete"),xa,ra);za.style.opacity="0.1";Z.appendChild(za);xa.addListener("stateChanged",function(){za.style.opacity=xa.enabled?"0.4":"0.1"});J=function(){qa.style.display=0<m.editor.undoManager.history.length||n.isEditing()?"inline-block":"none";ya.style.display=qa.style.display;qa.style.opacity=ja.enabled?"0.4":"0.1";ya.style.opacity=ea.enabled?"0.4":"0.1"};Z.appendChild(qa);Z.appendChild(ya);ja.addListener("stateChanged",
+J);ea.addListener("stateChanged",J);J();J=m.actions.get("outline");J=e("",J.funct,null,mxResources.get("outline"),J,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMjRweCIgZmlsbD0iIzAwMDAwMCI+PHBhdGggZD0iTTAgMGgyNHYyNEgweiIgZmlsbD0ibm9uZSIvPjxwYXRoIGQ9Ik0yMC41IDNsLS4xNi4wM0wxNSA1LjEgOSAzIDMuMzYgNC45Yy0uMjEuMDctLjM2LjI1LS4zNi40OFYyMC41YzAgLjI4LjIyLjUuNS41bC4xNi0uMDNMOSAxOC45bDYgMi4xIDUuNjQtMS45Yy4yMS0uMDcuMzYtLjI1LjM2LS40OFYzLjVjMC0uMjgtLjIyLS41LS41LS41ek0xNSAxOWwtNi0yLjExVjVsNiAyLjExVjE5eiIvPjwvc3ZnPg==");
+J.style.opacity="0.4";W.appendChild(J);J=e("",X.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -/Alt+Mousewheel)",X,ca);J.style.opacity="0.4";W.appendChild(J);var S=document.createElement("div");S.innerHTML="100%";S.setAttribute("title",mxResources.get("fitWindow")+"/"+mxResources.get("resetView")+" (Enter)");S.style.display="inline-block";S.style.cursor="pointer";S.style.textAlign="center";S.style.whiteSpace="nowrap";S.style.paddingRight="10px";S.style.textDecoration="none";S.style.verticalAlign=
+"top";S.style.padding="6px 0";S.style.fontSize="14px";S.style.width="40px";S.style.opacity="0.4";W.appendChild(S);mxEvent.addListener(S,"click",T);T=e("",P.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +/Alt+Mousewheel)",P,ta);T.style.opacity="0.4";W.appendChild(T);var Aa=e("",R.funct,null,mxResources.get("dark"),R,Editor.isDarkMode()?aa:ka);Aa.style.opacity="0.4";W.appendChild(Aa);m.addListener("darkModeChanged",mxUtils.bind(this,function(){Aa.style.backgroundImage="url("+(Editor.isDarkMode()?
+aa:ka)+")"}));pa.visible&&(ia.style.opacity="0.4",W.appendChild(ia));var ha=this.createPageMenuTab(!1);ha.style.display="none";ha.style.position="";ha.style.marginLeft="";ha.style.top="";ha.style.left="";ha.style.height="100%";ha.style.lineHeight="";ha.style.borderStyle="none";ha.style.padding="3px 0";ha.style.margin="0px";ha.style.background="";ha.style.border="";ha.style.boxShadow="none";ha.style.verticalAlign="top";ha.firstChild.style.height="100%";ha.firstChild.style.opacity="0.6";ha.firstChild.style.margin=
+"0px";W.appendChild(ha);m.addListener("fileDescriptorChanged",function(){ha.style.display="1"==urlParams.pages||null!=m.pages&&1<m.pages.length?"inline-block":"none"});m.tabContainer.style.visibility="hidden";p.style.cssText="position:absolute;right:12px;top:10px;height:30px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px 0px 6px 6px;border-bottom:1px solid lightgray;text-align:right;white-space:nowrap;overflow:hidden;user-select:none;";Z.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;";
+W.style.cssText="position:absolute;right:12px;bottom:12px;height:28px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:8px;white-space:nowrap;user-select:none;";A.appendChild(Z);A.appendChild(W);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;";A.appendChild(Q);window.setTimeout(function(){mxUtils.setPrefixedStyle(Q.style,
+"transition","transform .3s ease-out")},0);"1"==urlParams["format-toolbar"]&&this.installFormatToolbar(A)}else p.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",S=u.addMenu("100%",J.funct),S.setAttribute("title",mxResources.get("zoom")+" (Alt+Mousewheel)"),S.style.whiteSpace="nowrap",S.style.paddingRight="10px",S.style.textDecoration="none",S.style.textDecoration="none",S.style.overflow="hidden",
S.style.visibility="hidden",S.style.textAlign="center",S.style.cursor="pointer",S.style.height=parseInt(m.tabContainerHeight)-1+"px",S.style.lineHeight=parseInt(m.tabContainerHeight)+1+"px",S.style.position="absolute",S.style.display="block",S.style.fontSize="12px",S.style.width="59px",S.style.right="0px",S.style.bottom="0px",S.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+")",S.style.backgroundPosition="right 6px center",S.style.backgroundRepeat="no-repeat",A.appendChild(S);pa=mxUtils.bind(this,
function(){S.innerHTML=Math.round(100*m.editor.graph.view.scale)+"%"});m.editor.graph.view.addListener(mxEvent.EVENT_SCALE,pa);m.editor.addListener("resetGraphView",pa);m.editor.addListener("pageSelected",pa);var Ba=m.setGraphEnabled;m.setGraphEnabled=function(){Ba.apply(this,arguments);null!=this.tabContainer&&(S.style.visibility=this.tabContainer.style.visibility,this.diagramContainer.style.bottom="hidden"!=this.tabContainer.style.visibility&&null==W?this.tabContainerHeight+"px":"0px")}}A.appendChild(p);
-A.appendChild(m.diagramContainer);k.appendChild(A);m.updateTabContainer();null==W&&A.appendChild(m.tabContainer);var wa=null;g();mxEvent.addListener(window,"resize",function(){g();null!=m.sidebarWindow&&m.sidebarWindow.window.fit();null!=m.formatWindow&&m.formatWindow.window.fit();null!=m.actions.outlineWindow&&m.actions.outlineWindow.window.fit();null!=m.actions.layersWindow&&m.actions.layersWindow.window.fit();null!=m.menus.tagsWindow&&m.menus.tagsWindow.window.fit();null!=m.menus.findWindow&&m.menus.findWindow.window.fit();
-null!=m.menus.findReplaceWindow&&m.menus.findReplaceWindow.window.fit()})}}};(function(){var a=!1;"min"!=uiTheme||a||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),a=!0);var b=EditorUi.initTheme;EditorUi.initTheme=function(){b.apply(this,arguments);"min"!=uiTheme||a||(this.initMinimalTheme(),a=!0)}})();DrawioComment=function(a,b,d,k,f,m,p){this.file=a;this.id=b;this.content=d;this.modifiedDate=k;this.createdDate=f;this.isResolved=m;this.user=p;this.replies=[]};DrawioComment.prototype.addReplyDirect=function(a){null!=a&&this.replies.push(a)};DrawioComment.prototype.addReply=function(a,b,d,k,f){b()};DrawioComment.prototype.editComment=function(a,b,d){b()};DrawioComment.prototype.deleteComment=function(a,b){a()};DrawioUser=function(a,b,d,k,f){this.id=a;this.email=b;this.displayName=d;this.pictureUrl=k;this.locale=f};mxResources.parse('# *DO NOT DIRECTLY EDIT THIS FILE, IT IS AUTOMATICALLY GENERATED AND IT IS BASED ON:*\n# https://docs.google.com/spreadsheet/ccc?key=0AmQEO36liL4FdDJLWVNMaVV2UmRKSnpXU09MYkdGbEE\nabout=About \naboutDrawio=About draw.io\naccessDenied=Access Denied\naction=Action\nactualSize=Actual Size\nadd=Add\naddAccount=Add account\naddedFile=Added {1}\naddImages=Add Images\naddImageUrl=Add Image URL\naddLayer=Add Layer\naddProperty=Add Property\naddress=Address\naddToExistingDrawing=Add to Existing Drawing\naddWaypoint=Add Waypoint\nadjustTo=Adjust to\nadvanced=Advanced\nalign=Align\nalignment=Alignment\nallChangesLost=All changes will be lost!\nallPages=All Pages\nallProjects=All Projects\nallSpaces=All Spaces\nallTags=All Tags\nanchor=Anchor\nandroid=Android\nangle=Angle\narc=Arc\nareYouSure=Are you sure?\nensureDataSaved=Please ensure your data is saved before closing.\nallChangesSaved=All changes saved\nallChangesSavedInDrive=All changes saved in Drive\nallowPopups=Allow pop-ups to avoid this dialog.\nallowRelativeUrl=Allow relative URL\nalreadyConnected=Nodes already connected\napply=Apply\narchiMate21=ArchiMate 2.1\narrange=Arrange\narrow=Arrow\narrows=Arrows\nasNew=As New\natlas=Atlas\nauthor=Author\nauthorizationRequired=Authorization required\nauthorizeThisAppIn=Authorize this app in {1}:\nauthorize=Authorize\nauthorizing=Authorizing\nautomatic=Automatic\nautosave=Autosave\nautosize=Autosize\nattachments=Attachments\naws=AWS\naws3d=AWS 3D\nazure=Azure\nback=Back\nbackground=Background\nbackgroundColor=Background Color\nbackgroundImage=Background Image\nbasic=Basic\nblankDrawing=Blank Drawing\nblankDiagram=Blank Diagram\nblock=Block\nblockquote=Blockquote\nblog=Blog\nbold=Bold\nbootstrap=Bootstrap\nborder=Border\nborderColor=Border Color\nborderWidth=Border Width\nbottom=Bottom\nbottomAlign=Bottom Align\nbottomLeft=Bottom Left\nbottomRight=Bottom Right\nbpmn=BPMN\nbringForward=Bring Forward\nbrowser=Browser\nbulletedList=Bulleted List\nbusiness=Business\nbusy=Operation in progress\ncabinets=Cabinets\ncancel=Cancel\ncenter=Center\ncannotLoad=Load attempts failed. Please try again later.\ncannotLogin=Log in attempts failed. Please try again later.\ncannotOpenFile=Cannot open file\nchange=Change\nchangeOrientation=Change Orientation\nchangeUser=Change user\nchangeStorage=Change storage\nchangesNotSaved=Changes have not been saved\nclassDiagram=Class Diagram\nuserJoined={1} has joined\nuserLeft={1} has left\nchatWindowTitle=Chat\nchooseAnOption=Choose an option\nchromeApp=Chrome App\ncollaborativeEditingNotice=Important Notice for Collaborative Editing\ncompare=Compare\ncompressed=Compressed\ncommitMessage=Commit Message\nconfigLinkWarn=This link configures draw.io. Only click OK if you trust whoever gave you it!\nconfigLinkConfirm=Click OK to configure and restart draw.io.\ncontainer=Container\ncsv=CSV\ndark=Dark\ndiagramXmlDesc=XML File\ndiagramHtmlDesc=HTML File\ndiagramPngDesc=Editable Bitmap Image\ndiagramSvgDesc=Editable Vector Image\ndidYouMeanToExportToPdf=Did you mean to export to PDF?\ndraftFound=A draft for \'{1}\' has been found. Load it into the editor or discard it to continue.\ndraftRevisionMismatch=There is a different version of this diagram on a shared draft of this page. Please edit the diagram from the draft to ensure you are working with the latest version.\nselectDraft=Select a draft to continue editing:\ndragAndDropNotSupported=Drag and drop not supported for images. Would you like to import instead?\ndropboxCharsNotAllowed=The following characters are not allowed: / : ? * " |\ncheck=Check\nchecksum=Checksum\ncircle=Circle\ncisco=Cisco\nclassic=Classic\nclearDefaultStyle=Clear Default Style\nclearWaypoints=Clear Waypoints\nclipart=Clipart\nclose=Close\nclosingFile=Closing file\ncollaborator=Collaborator\ncollaborators=Collaborators\ncollapse=Collapse\ncollapseExpand=Collapse/Expand\ncollapse-expand=Click to collapse/expand\nShift-click to move neighbors \nAlt-click to protect group size\ncollapsible=Collapsible\ncomic=Comic\ncomment=Comment\ncommentsNotes=Comments/Notes\ncompress=Compress\nconfiguration=Configuration\nconnect=Connect\nconnecting=Connecting\nconnectWithDrive=Connect with Google Drive\nconnection=Connection\nconnectionArrows=Connection Arrows\nconnectionPoints=Connection Points\nconstrainProportions=Constrain Proportions\ncontainsValidationErrors=Contains validation errors\ncopiedToClipboard=Copied to clipboard\ncopy=Copy\ncopyConnect=Copy on connect\ncopyCreated=A copy of the file was created.\ncopyData=Copy Data\ncopyOf=Copy of {1}\ncopyOfDrawing=Copy of Drawing\ncopySize=Copy Size\ncopyStyle=Copy Style\ncreate=Create\ncreateNewDiagram=Create New Diagram\ncreateRevision=Create Revision\ncreateShape=Create Shape\ncrop=Crop\ncurved=Curved\ncustom=Custom\ncurrent=Current\ncurrentPage=Current page\ncut=Cut\ndashed=Dashed\ndecideLater=Decide later\ndefault=Default\ndelete=Delete\ndeleteColumn=Delete Column\ndeleteLibrary401=Insufficient permissions to delete this library\ndeleteLibrary404=Selected library could not be found\ndeleteLibrary500=Error deleting library\ndeleteLibraryConfirm=You are about to permanently delete this library. Are you sure you want to do this?\ndeleteRow=Delete Row\ndescription=Description\ndevice=Device\ndiagram=Diagram\ndiagramContent=Diagram Content\ndiagramLocked=Diagram has been locked to prevent further data loss.\ndiagramLockedBySince=The diagram is locked by {1} since {2} ago\ndiagramName=Diagram Name\ndiagramIsPublic=Diagram is public\ndiagramIsNotPublic=Diagram is not public\ndiamond=Diamond\ndiamondThin=Diamond (thin)\ndidYouKnow=Did you know...\ndirection=Direction\ndiscard=Discard\ndiscardChangesAndReconnect=Discard Changes and Reconnect\ngoogleDriveMissingClickHere=Google Drive missing? Click here!\ndiscardChanges=Discard Changes\ndisconnected=Disconnected\ndistribute=Distribute\ndone=Done\ndoNotShowAgain=Do not show again\ndotted=Dotted\ndoubleClickOrientation=Doubleclick to change orientation\ndoubleClickTooltip=Doubleclick to insert text\ndoubleClickChangeProperty=Doubleclick to change property name\ndownload=Download\ndownloadDesktop=Get Desktop\ndownloadAs=Download as\nclickHereToSave=Click here to save.\ndpi=DPI\ndraftDiscarded=Draft discarded\ndraftSaved=Draft saved\ndragElementsHere=Drag elements here\ndragImagesHere=Drag images or URLs here\ndragUrlsHere=Drag URLs here\ndraw.io=draw.io\ndrawing=Drawing{1}\ndrawingEmpty=Drawing is empty\ndrawingTooLarge=Drawing is too large\ndrawioForWork=Draw.io for GSuite\ndropbox=Dropbox\nduplicate=Duplicate\nduplicateIt=Duplicate {1}\ndivider=Divider\ndx=Dx\ndy=Dy\neast=East\nedit=Edit\neditData=Edit Data\neditDiagram=Edit Diagram\neditGeometry=Edit Geometry\neditImage=Edit Image\neditImageUrl=Edit Image URL\neditLink=Edit Link\neditShape=Edit Shape\neditStyle=Edit Style\neditText=Edit Text\neditTooltip=Edit Tooltip\nglass=Glass\ngoogleImages=Google Images\nimageSearch=Image Search\neip=EIP\nembed=Embed\nembedImages=Embed Images\nmainEmbedNotice=Paste this into the page\nelectrical=Electrical\nellipse=Ellipse\nembedNotice=Paste this once at the end of the page\nenterGroup=Enter Group\nenterName=Enter Name\nenterPropertyName=Enter Property Name\nenterValue=Enter Value\nentityRelation=Entity Relation\nentityRelationshipDiagram=Entity Relationship Diagram\nerror=Error\nerrorDeletingFile=Error deleting file\nerrorLoadingFile=Error loading file\nerrorRenamingFile=Error renaming file\nerrorRenamingFileNotFound=Error renaming file. File was not found.\nerrorRenamingFileForbidden=Error renaming file. Insufficient access rights.\nerrorSavingDraft=Error saving draft\nerrorSavingFile=Error saving file\nerrorSavingFileUnknown=Error authorizing with Google\'s servers. Please refresh the page to re-attempt.\nerrorSavingFileForbidden=Error saving file. Insufficient access rights.\nerrorSavingFileNameConflict=Could not save diagram. Current page already contains file named \'{1}\'.\nerrorSavingFileNotFound=Error saving file. File was not found.\nerrorSavingFileReadOnlyMode=Could not save diagram while read-only mode is active.\nerrorSavingFileSessionTimeout=Your session has ended. Please <a target=\'_blank\' href=\'{1}\'>{2}</a> and return to this tab to try to save again.\nerrorSendingFeedback=Error sending feedback.\nerrorUpdatingPreview=Error updating preview.\nexit=Exit\nexitGroup=Exit Group\nexpand=Expand\nexport=Export\nexporting=Exporting\nexportAs=Export as\nexportOptionsDisabled=Export options disabled\nexportOptionsDisabledDetails=The owner has disabled options to download, print or copy for commenters and viewers on this file.\nexternalChanges=External Changes\nextras=Extras\nfacebook=Facebook\nfailedToSaveTryReconnect=Failed to save, trying to reconnect\nfeatureRequest=Feature Request\nfeedback=Feedback\nfeedbackSent=Feedback successfully sent.\nfloorplans=Floorplans\nfile=File\nfileChangedOverwriteDialog=The file has been modified. Do you want to save the file and overwrite those changes?\nfileChangedSyncDialog=The file has been modified. Do you want to synchronize those changes?\nfileChangedSync=The file has been modified. Click here to synchronize.\noverwrite=Overwrite\nsynchronize=Synchronize\nfilename=Filename\nfileExists=File already exists\nfileMovedToTrash=File was moved to trash\nfileNearlyFullSeeFaq=File nearly full, please see FAQ\nfileNotFound=File not found\nrepositoryNotFound=Repository not found\nfileNotFoundOrDenied=The file was not found. It does not exist or you do not have access.\nfileNotLoaded=File not loaded\nfileNotSaved=File not saved\nfileOpenLocation=How would you like to open these file(s)?\nfiletypeHtml=.html causes file to save as HTML with redirect to cloud URL\nfiletypePng=.png causes file to save as PNG with embedded data\nfiletypeSvg=.svg causes file to save as SVG with embedded data\nfileWillBeSavedInAppFolder={1} will be saved in the app folder.\nfill=Fill\nfillColor=Fill Color\nfilterCards=Filter Cards\nfind=Find\nfit=Fit\nfitContainer=Resize Container\nfitIntoContainer=Fit into Container\nfitPage=Fit Page\nfitPageWidth=Fit Page Width\nfitTo=Fit to\nfitToSheetsAcross=sheet(s) across\nfitToBy=by\nfitToSheetsDown=sheet(s) down\nfitTwoPages=Two Pages\nfitWindow=Fit Window\nflip=Flip\nflipH=Flip Horizontal\nflipV=Flip Vertical\nflowchart=Flowchart\nfolder=Folder\nfont=Font\nfontColor=Font Color\nfontFamily=Font Family\nfontSize=Font Size\nforbidden=You are not authorized to access this file\nformat=Format\nformatPanel=Format Panel\nformatted=Formatted\nformattedText=Formatted Text\nformatPng=PNG\nformatGif=GIF\nformatJpg=JPEG\nformatPdf=PDF\nformatSql=SQL\nformatSvg=SVG\nformatHtmlEmbedded=HTML\nformatSvgEmbedded=SVG (with XML)\nformatVsdx=VSDX\nformatVssx=VSSX\nformatXmlPlain=XML (Plain)\nformatXml=XML\nforum=Discussion/Help Forums\nfreehand=Freehand\nfromTemplate=From Template\nfromTemplateUrl=From Template URL\nfromText=From Text\nfromUrl=From URL\nfromThisPage=From this page\nfullscreen=Fullscreen\ngap=Gap\ngcp=GCP\ngeneral=General\ngithub=GitHub\ngitlab=GitLab\ngliffy=Gliffy\nglobal=Global\ngoogleDocs=Google Docs\ngoogleDrive=Google Drive\ngoogleGadget=Google Gadget\ngooglePlus=Google+\ngoogleSharingNotAvailable=Sharing is only available via Google Drive. Please click Open below and share from the more actions menu:\ngoogleSlides=Google Slides\ngoogleSites=Google Sites\ngoogleSheets=Google Sheets\ngradient=Gradient\ngradientColor=Color\ngrid=Grid\ngridColor=Grid Color\ngridSize=Grid Size\ngroup=Group\nguides=Guides\nhateApp=I hate draw.io\nheading=Heading\nheight=Height\nhelp=Help\nhelpTranslate=Help us translate this application\nhide=Hide\nhideIt=Hide {1}\nhidden=Hidden\nhome=Home\nhorizontal=Horizontal\nhorizontalFlow=Horizontal Flow\nhorizontalTree=Horizontal Tree\nhowTranslate=How good is the translation in your language?\nhtml=HTML\nhtmlText=HTML Text\nid=ID\niframe=IFrame\nignore=Ignore\nimage=Image\nimageUrl=Image URL\nimages=Images\nimagePreviewError=This image couldn\'t be loaded for preview. Please check the URL.\nimageTooBig=Image too big\nimgur=Imgur\nimport=Import\nimportFrom=Import from\nincludeCopyOfMyDiagram=Include a copy of my diagram\nincreaseIndent=Increase Indent\ndecreaseIndent=Decrease Indent\ninsert=Insert\ninsertColumnBefore=Insert Column Left\ninsertColumnAfter=Insert Column Right\ninsertEllipse=Insert Ellipse\ninsertImage=Insert Image\ninsertHorizontalRule=Insert Horizontal Rule\ninsertLink=Insert Link\ninsertPage=Insert Page\ninsertRectangle=Insert Rectangle\ninsertRhombus=Insert Rhombus\ninsertRowBefore=Insert Row Above\ninsertRowAfter=Insert Row After\ninsertText=Insert Text\ninserting=Inserting\ninstallApp=Install App\ninvalidFilename=Diagram names must not contain the following characters: / | : ; { } < > & + ? = "\ninvalidLicenseSeeThisPage=Your license is invalid, please see this <a target="_blank" href="https://support.draw.io/display/DFCS/Licensing+your+draw.io+plugin">page</a>.\ninvalidInput=Invalid input\ninvalidName=Invalid name\ninvalidOrMissingFile=Invalid or missing file\ninvalidPublicUrl=Invalid public URL\nisometric=Isometric\nios=iOS\nitalic=Italic\nkennedy=Kennedy\nkeyboardShortcuts=Keyboard Shortcuts\nlayers=Layers\nlandscape=Landscape\nlanguage=Language\nleanMapping=Lean Mapping\nlastChange=Last change {1} ago\nlessThanAMinute=less than a minute\nlicensingError=Licensing Error\nlicenseHasExpired=The license for {1} has expired on {2}. Click here.\nlicenseRequired=This feature requires draw.io to be licensed.\nlicenseWillExpire=The license for {1} will expire on {2}. Click here.\nlineJumps=Line jumps\nlinkAccountRequired=If the diagram is not public a Google account is required to view the link.\nlinkText=Link Text\nlist=List\nminute=minute\nminutes=minutes\nhours=hours\ndays=days\nmonths=months\nyears=years\nrestartForChangeRequired=Changes will take effect after a restart of the application.\nlaneColor=Lanecolor\nlastModified=Last modified\nlayout=Layout\nleft=Left\nleftAlign=Left Align\nleftToRight=Left to right\nlibraryTooltip=Drag and drop shapes here or click + to insert. Double click to edit.\nlightbox=Lightbox\nline=Line\nlineend=Line end\nlineheight=Line Height\nlinestart=Line start\nlinewidth=Linewidth\nlink=Link\nlinks=Links\nloading=Loading\nlockUnlock=Lock/Unlock\nloggedOut=Logged Out\nlogIn=log in\nloveIt=I love {1}\nlucidchart=Lucidchart\nmaps=Maps\nmathematicalTypesetting=Mathematical Typesetting\nmakeCopy=Make a Copy\nmanual=Manual\nmerge=Merge\nmermaid=Mermaid\nmicrosoftOffice=Microsoft Office\nmicrosoftExcel=Microsoft Excel\nmicrosoftPowerPoint=Microsoft PowerPoint\nmicrosoftWord=Microsoft Word\nmiddle=Middle\nminimal=Minimal\nmisc=Misc\nmockups=Mockups\nmodificationDate=Modification date\nmodifiedBy=Modified by\nmore=More\nmoreResults=More Results\nmoreShapes=More Shapes\nmove=Move\nmoveToFolder=Move to Folder\nmoving=Moving\nmoveSelectionTo=Move selection to {1}\nname=Name\nnavigation=Navigation\nnetwork=Network\nnetworking=Networking\nnew=New\nnewLibrary=New Library\nnextPage=Next Page\nno=No\nnoPickFolder=No, pick folder\nnoAttachments=No attachments found\nnoColor=No Color\nnoFiles=No Files\nnoFileSelected=No file selected\nnoLibraries=No libraries found\nnoMoreResults=No more results\nnone=None\nnoOtherViewers=No other viewers\nnoPlugins=No plugins\nnoPreview=No preview\nnoResponse=No response from server\nnoResultsFor=No results for \'{1}\'\nnoRevisions=No revisions\nnoSearchResults=No search results found\nnoPageContentOrNotSaved=No anchors found on this page or it hasn\'t been saved yet\nnormal=Normal\nnorth=North\nnotADiagramFile=Not a diagram file\nnotALibraryFile=Not a library file\nnotAvailable=Not available\nnotAUtf8File=Not a UTF-8 file\nnotConnected=Not connected\nnote=Note\nnotion=Notion\nnotSatisfiedWithImport=Not satisfied with the import?\nnotUsingService=Not using {1}?\nnumberedList=Numbered list\noffline=Offline\nok=OK\noneDrive=OneDrive\nonline=Online\nopacity=Opacity\nopen=Open\nopenArrow=Open Arrow\nopenExistingDiagram=Open Existing Diagram\nopenFile=Open File\nopenFrom=Open from\nopenLibrary=Open Library\nopenLibraryFrom=Open Library from\nopenLink=Open Link\nopenInNewWindow=Open in New Window\nopenInThisWindow=Open in This Window\nopenIt=Open {1}\nopenRecent=Open Recent\nopenSupported=Supported formats are files saved from this software (.xml), .vsdx and .gliffy\noptions=Options\norganic=Organic\norgChart=Org Chart\northogonal=Orthogonal\notherViewer=other viewer\notherViewers=other viewers\noutline=Outline\noval=Oval\npage=Page\npageContent=Page Content\npageNotFound=Page not found\npageWithNumber=Page-{1}\npages=Pages\npageView=Page View\npageSetup=Page Setup\npageScale=Page Scale\npan=Pan\npanTooltip=Space+Drag to pan\npaperSize=Paper Size\npattern=Pattern\nparallels=Parallels\npaste=Paste\npasteData=Paste Data\npasteHere=Paste here\npasteSize=Paste Size\npasteStyle=Paste Style\nperimeter=Perimeter\npermissionAnyone=Anyone can edit\npermissionAuthor=Owner and admins can edit\npickFolder=Pick a folder\npickLibraryDialogTitle=Select Library\npublicDiagramUrl=Public URL of the diagram\nplaceholders=Placeholders\nplantUml=PlantUML\nplugins=Plugins\npluginUrl=Plugin URL\npluginWarning=The page has requested to load the following plugin(s):\n \n {1}\n \n Would you like to load these plugin(s) now?\n \n NOTE : Only allow plugins to run if you fully understand the security implications of doing so.\n\nplusTooltip=Click to connect and clone (ctrl+click to clone, shift+click to connect). Drag to connect (ctrl+drag to clone).\nportrait=Portrait\nposition=Position\nposterPrint=Poster Print\npreferences=Preferences\npreview=Preview\npreviousPage=Previous Page\nprint=Print\nprintAllPages=Print All Pages\nprocEng=Proc. Eng.\nproject=Project\npriority=Priority\nproperties=Properties\npublish=Publish\nquickStart=Quick Start Video\nrack=Rack\nradial=Radial\nradialTree=Radial Tree\nreadOnly=Read-only\nreconnecting=Reconnecting\nrecentlyUpdated=Recently Updated\nrecentlyViewed=Recently Viewed\nrectangle=Rectangle\nredirectToNewApp=This file was created or modified in a newer version of this app. You will be redirected now.\nrealtimeTimeout=It looks like you\'ve made a few changes while offline. We\'re sorry, these changes cannot be saved.\nredo=Redo\nrefresh=Refresh\nregularExpression=Regular Expression\nrelative=Relative\nrelativeUrlNotAllowed=Relative URL not allowed\nrememberMe=Remember me\nrememberThisSetting=Remember this setting\nremoveFormat=Clear Formatting\nremoveFromGroup=Remove from Group\nremoveIt=Remove {1}\nremoveWaypoint=Remove Waypoint\nrename=Rename\nrenamed=Renamed\nrenameIt=Rename {1}\nrenaming=Renaming\nreplace=Replace\nreplaceIt={1} already exists. Do you want to replace it?\nreplaceExistingDrawing=Replace existing drawing\nrequired=required\nreset=Reset\nresetView=Reset View\nresize=Resize\nresizeLargeImages=Do you want to resize large images to make the application run faster?\nretina=Retina\nresponsive=Responsive\nrestore=Restore\nrestoring=Restoring\nretryingIn=Retrying in {1} second(s)\nretryingLoad=Load failed. Retrying...\nretryingLogin=Login time out. Retrying...\nreverse=Reverse\nrevision=Revision\nrevisionHistory=Revision History\nrhombus=Rhombus\nright=Right\nrightAlign=Right Align\nrightToLeft=Right to left\nrotate=Rotate\nrotateTooltip=Click and drag to rotate, click to turn shape only by 90 degrees\nrotation=Rotation\nrounded=Rounded\nsave=Save\nsaveAndExit=Save & Exit\nsaveAs=Save as\nsaveAsXmlFile=Save as XML file?\nsaved=Saved\nsaveDiagramFirst=Please save the diagram first\nsaveDiagramsTo=Save diagrams to\nsaveLibrary403=Insufficient permissions to edit this library\nsaveLibrary500=There was an error while saving the library\nsaveLibraryReadOnly=Could not save library while read-only mode is active\nsaving=Saving\nscratchpad=Scratchpad\nscrollbars=Scrollbars\nsearch=Search\nsearchShapes=Search Shapes\nselectAll=Select All\nselectionOnly=Selection Only\nselectCard=Select Card\nselectEdges=Select Edges\nselectFile=Select File\nselectFolder=Select Folder\nselectFont=Select Font\nselectNone=Select None\nselectTemplate=Select Template\nselectVertices=Select Vertices\nsendBackward=Send Backward\nsendMessage=Send\nsendYourFeedback=Send your feedback\nserviceUnavailableOrBlocked=Service unavailable or blocked\nsessionExpired=Your session has expired. Please refresh the browser window.\nsessionTimeoutOnSave=Your session has timed out and you have been disconnected from the Google Drive. Press OK to login and save. \nsetAsDefaultStyle=Set as Default Style\nshadow=Shadow\nshape=Shape\nshapes=Shapes\nshare=Share\nshareLink=Link for shared editing\nsharingAvailable=Sharing available for Google Drive and OneDrive files.\nsharp=Sharp\nshow=Show\nshowStartScreen=Show Start Screen\nsidebarTooltip=Click to expand. Drag and drop shapes into the diagram. Shift+click to change selection. Alt+click to insert and connect.\nsigns=Signs\nsignOut=Sign out\nsimple=Simple\nsimpleArrow=Simple Arrow\nsimpleViewer=Simple Viewer\nsize=Size\nsketch=Sketch\nsolid=Solid\nsourceSpacing=Source Spacing\nsouth=South\nsoftware=Software\nspace=Space\nspacing=Spacing\nspecialLink=Special Link\nstandard=Standard\nstartDrawing=Start drawing\nstopDrawing=Stop drawing\nstarting=Starting\nstraight=Straight\nstrikethrough=Strikethrough\nstrokeColor=Line Color\nstyle=Style\nsubscript=Subscript\nsummary=Summary\nsuperscript=Superscript\nsupport=Support\nswimlaneDiagram=Swimlane Diagram\nsysml=SysML\ntags=Tags\ntable=Table\ntables=Tables\ntakeOver=Take Over\ntargetSpacing=Target Spacing\ntemplate=Template\ntemplates=Templates\ntext=Text\ntextAlignment=Text Alignment\ntextOpacity=Text Opacity\ntheme=Theme\ntimeout=Timeout\ntitle=Title\nto=to\ntoBack=To Back\ntoFront=To Front\ntooLargeUseDownload=Too large, use download instead.\ntoolbar=Toolbar\ntooltips=Tooltips\ntop=Top\ntopAlign=Top Align\ntopLeft=Top Left\ntopRight=Top Right\ntransparent=Transparent\ntransparentBackground=Transparent Background\ntrello=Trello\ntryAgain=Try again\ntryOpeningViaThisPage=Try opening via this page\nturn=Rotate shape only by 90°\ntype=Type\ntwitter=Twitter\numl=UML\nunderline=Underline\nundo=Undo\nungroup=Ungroup\nunsavedChanges=Unsaved changes\nunsavedChangesClickHereToSave=Unsaved changes. Click here to save.\nuntitled=Untitled\nuntitledDiagram=Untitled Diagram\nuntitledLayer=Untitled Layer\nuntitledLibrary=Untitled Library\nunknownError=Unknown error\nupdateFile=Update {1}\nupdatingDocument=Updating Document. Please wait...\nupdatingPreview=Updating Preview. Please wait...\nupdatingSelection=Updating Selection. Please wait...\nupload=Upload\nurl=URL\nuseOffline=Use Offline\nuseRootFolder=Use root folder?\nuserManual=User Manual\nvertical=Vertical\nverticalFlow=Vertical Flow\nverticalTree=Vertical Tree\nview=View\nviewerSettings=Viewer Settings\nviewUrl=Link to view: {1}\nvoiceAssistant=Voice Assistant (beta)\nwarning=Warning\nwaypoints=Waypoints\nwest=West\nwidth=Width\nwiki=Wiki\nwordWrap=Word Wrap\nwritingDirection=Writing Direction\nyes=Yes\nyourEmailAddress=Your email address\nzoom=Zoom\nzoomIn=Zoom In\nzoomOut=Zoom Out\nbasic=Basic\nbusinessprocess=Business Processes\ncharts=Charts\nengineering=Engineering\nflowcharts=Flowcharts\ngmdl=Material Design\nmindmaps=Mindmaps\nmockups=Mockups\nnetworkdiagrams=Network Diagrams\nnothingIsSelected=Nothing is selected\nother=Other\nsoftwaredesign=Software Design\nvenndiagrams=Venn Diagrams\nwebEmailOrOther=Web, email or any other internet address\nwebLink=Web Link\nwireframes=Wireframes\nproperty=Property\nvalue=Value\nshowMore=Show More\nshowLess=Show Less\nmyDiagrams=My Diagrams\nallDiagrams=All Diagrams\nrecentlyUsed=Recently used\nlistView=List view\ngridView=Grid view\nresultsFor=Results for \'{1}\'\noneDriveCharsNotAllowed=The following characters are not allowed: ~ " # % * : < > ? / { | }\noneDriveInvalidDeviceName=The specified device name is invalid\nofficeNotLoggedOD=You are not logged in to OneDrive. Please open draw.io task pane and login first.\nofficeSelectSingleDiag=Please select a single draw.io diagram only without other contents.\nofficeSelectDiag=Please select a draw.io diagram.\nofficeCannotFindDiagram=Cannot find a draw.io diagram in the selection\nnoDiagrams=No diagrams found\nauthFailed=Authentication failed\nofficeFailedAuthMsg=Unable to successfully authenticate user or authorize application.\nconvertingDiagramFailed=Converting diagram failed\nofficeCopyImgErrMsg=Due to some limitations in the host application, the image could not be inserted. Please manually copy the image then paste it to the document.\ninsertingImageFailed=Inserting image failed\nofficeCopyImgInst=Instructions: Right-click the image below. Select "Copy image" from the context menu. Then, in the document, right-click and select "Paste" from the context menu.\nfolderEmpty=Folder is empty\nrecent=Recent\nsharedWithMe=Shared With Me\nsharepointSites=Sharepoint Sites\nerrorFetchingFolder=Error fetching folder items\nerrorAuthOD=Error authenticating to OneDrive\nofficeMainHeader=Adds draw.io diagrams to your document.\nofficeStepsHeader=This add-in performs the following steps:\nofficeStep1=Connects to Microsoft OneDrive, Google Drive or your device.\nofficeStep2=Select a draw.io diagram.\nofficeStep3=Insert the diagram into the document.\nofficeAuthPopupInfo=Please complete the authentication in the pop-up window.\nofficeSelDiag=Select draw.io Diagram:\nfiles=Files\nshared=Shared\nsharepoint=Sharepoint\nofficeManualUpdateInst=Instructions: Copy draw.io diagram from the document. Then, in the box below, right-click and select "Paste" from the context menu.\nofficeClickToEdit=Click icon to start editing:\npasteDiagram=Paste draw.io diagram here\nconnectOD=Connect to OneDrive\nselectChildren=Select Children\nselectSiblings=Select Siblings\nselectParent=Select Parent\nselectDescendants=Select Descendants\nlastSaved=Last saved {1} ago\nresolve=Resolve\nreopen=Re-open\nshowResolved=Show Resolved\nreply=Reply\nobjectNotFound=Object not found\nreOpened=Re-opened\nmarkedAsResolved=Marked as resolved\nnoCommentsFound=No comments found\ncomments=Comments\ntimeAgo={1} ago\nconfluenceCloud=Confluence Cloud\nlibraries=Libraries\nconfAnchor=Confluence Page Anchor\nconfTimeout=The connection has timed out\nconfSrvTakeTooLong=The server at {1} is taking too long to respond.\nconfCannotInsertNew=Cannot insert draw.io diagram to a new Confluence page\nconfSaveTry=Please save the page and try again.\nconfCannotGetID=Unable to determine page ID\nconfContactAdmin=Please contact your Confluence administrator.\nreadErr=Read Error\neditingErr=Editing Error\nconfExtEditNotPossible=This diagram cannot be edited externally. Please try editing it while editing the page\nconfEditedExt=Diagram/Page edited externally\ndiagNotFound=Diagram Not Found\nconfEditedExtRefresh=Diagram/Page is edited externally. Please refresh the page.\nconfCannotEditDraftDelOrExt=Cannot edit diagrams in a draft page, diagram is deleted from the page, or diagram is edited externally. Please check the page.\nretBack=Return back\nconfDiagNotPublished=The diagram does not belong to a published page\ncreatedByDraw=Created by draw.io\nfilenameShort=Filename too short\ninvalidChars=Invalid characters\nalreadyExst={1} already exists\ndraftReadErr=Draft Read Error\ndiagCantLoad=Diagram cannot be loaded\ndraftWriteErr=Draft Write Error\ndraftCantCreate=Draft could not be created\nconfDuplName=Duplicate diagram name detected. Please pick another name.\nconfSessionExpired=Looks like your session expired. Log in again to keep working.\nlogin=Login\ndrawPrev=draw.io preview\ndrawDiag=draw.io diagram\ninvalidCallFnNotFound=Invalid Call: {1} not found\ninvalidCallErrOccured=Invalid Call: An error occurred, {1}\nanonymous=Anonymous\nconfGotoPage=Go to containing page\nshowComments=Show Comments\nconfError=Error: {1}\ngliffyImport=Gliffy Import\ngliffyImportInst1=Click the "Start Import" button to import all Gliffy diagrams to draw.io.\ngliffyImportInst2=Please note that the import procedure will take some time and the browser window must remain open until the import is completed.\nstartImport=Start Import\ndrawConfig=draw.io Configuration\ncustomLib=Custom Libraries\ncustomTemp=Custom Templates\npageIdsExp=Page IDs Export\ndrawReindex=draw.io re-indexing (beta)\nworking=Working\ndrawConfigNotFoundInst=draw.io Configuration Space (DRAWIOCONFIG) does not exist. This space is needed to store draw.io configuration files and custom libraries/templates.\ncreateConfSp=Create Config Space\nunexpErrRefresh=Unexpected error, please refresh the page and try again.\nconfigJSONInst=Write draw.io JSON configuration in the editor below then click save. If you need help, please refer to\nthisPage=this page\ncurCustLib=Current Custom Libraries\nlibName=Library Name\naction=Action\ndrawConfID=draw.io Config ID\naddLibInst=Click the "Add Library" button to upload a new library.\naddLib=Add Library\ncustomTempInst1=Custom templates are draw.io diagrams saved in children pages of\ncustomTempInst2=For more details, please refer to\ntempsPage=Templates page\npageIdsExpInst1=Select export target, then click the "Start Export" button to export all pages IDs.\npageIdsExpInst2=Please note that the export procedure will take some time and the browser window must remain open until the export is completed.\nstartExp=Start Export\nrefreshDrawIndex=Refresh draw.io Diagrams Index\nreindexInst1=Click the "Start Indexing" button to refresh draw.io diagrams index.\nreindexInst2=Please note that the indexing procedure will take some time and the browser window must remain open until the indexing is completed.\nstartIndexing=Start Indexing\nconfAPageFoundFetch=Page "{1}" found. Fetching\nconfAAllDiagDone=All {1} diagrams processed. Process finished.\nconfAStartedProcessing=Started processing page "{1}"\nconfAAllDiagInPageDone=All {1} diagrams in page "{2}" processed successfully.\nconfAPartialDiagDone={1} out of {2} {3} diagrams in page "{4}" processed successfully.\nconfAUpdatePageFailed=Updating page "{1}" failed.\nconfANoDiagFoundInPage=No {1} diagrams found in page "{2}".\nconfAFetchPageFailed=Fetching the page failed.\nconfANoDiagFound=No {1} diagrams found. Process finished.\nconfASearchFailed=Searching for {1} diagrams failed. Please try again later.\nconfAGliffyDiagFound={2} diagram "{1}" found. Importing\nconfAGliffyDiagImported={2} diagram "{1}" imported successfully.\nconfASavingImpGliffyFailed=Saving imported {2} diagram "{1}" failed.\nconfAImportedFromByDraw=Imported from "{1}" by draw.io\nconfAImportGliffyFailed=Importing {2} diagram "{1}" failed.\nconfAFetchGliffyFailed=Fetching {2} diagram "{1}" failed.\nconfACheckBrokenDiagLnk=Checking for broken diagrams links.\nconfADelDiagLinkOf=Deleting diagram link of "{1}"\nconfADupLnk=(duplicate link)\nconfADelDiagLnkFailed=Deleting diagram link of "{1}" failed.\nconfAUnexpErrProcessPage=Unexpected error during processing the page with id: {1}\nconfADiagFoundIndex=Diagram "{1}" found. Indexing\nconfADiagIndexSucc=Diagram "{1}" indexed successfully.\nconfAIndexDiagFailed=Indexing diagram "{1}" failed.\nconfASkipDiagOtherPage=Skipped "{1}" as it belongs to another page!\nconfADiagUptoDate=Diagram "{1}" is up to date.\nconfACheckPagesWDraw=Checking pages having draw.io diagrams.\nconfAErrOccured=An error occurred!\nsavedSucc=Saved successfully\nconfASaveFailedErr=Saving Failed (Unexpected Error)\ncharacter=Character\nconfAConfPageDesc=This page contains draw.io configuration file (configuration.json) as attachment\nconfALibPageDesc=This page contains draw.io custom libraries as attachments\nconfATempPageDesc=This page contains draw.io custom templates as attachments\nworking=Working\nconfAConfSpaceDesc=This space is used to store draw.io configuration files and custom libraries/templates\nconfANoCustLib=No Custom Libraries\ndelFailed=Delete failed!\nshowID=Show ID\nconfAIncorrectLibFileType=Incorrect file type. Libraries should be XML files.\nuploading=Uploading\nconfALibExist=This library already exists\nconfAUploadSucc=Uploaded successfully\nconfAUploadFailErr=Upload Failed (Unexpected Error)\nhiResPreview=High Res Preview\nofficeNotLoggedGD=You are not logged in to Google Drive. Please open draw.io task pane and login first.\nofficePopupInfo=Please complete the process in the pop-up window.\npickODFile=Pick OneDrive File\npickGDriveFile=Pick Google Drive File\npickDeviceFile=Pick Device File\nvsdNoConfig="vsdurl" is not configured\nruler=Ruler\nunits=Units\npoints=Points\ninches=Inches\nmillimeters=Millimeters\nconfEditDraftDelOrExt=This diagram is in a draft page, is deleted from the page, or is edited externally. It will be saved as a new attachment version and may not be reflected in the page.\nconfDiagEditedExt=Diagram is edited in another session. It will be saved as a new attachment version but the page will show other session\'s modifications.\nmacroNotFound=Macro Not Found\nconfAInvalidPageIdsFormat=Incorrect Page IDs file format\nconfACollectingCurPages=Collecting current pages\nconfABuildingPagesMap=Building pages mapping\nconfAProcessDrawDiag=Started processing imported draw.io diagrams\nconfAProcessDrawDiagDone=Finished processing imported draw.io diagrams\nconfAProcessImpPages=Started processing imported pages\nconfAErrPrcsDiagInPage=Error processing draw.io diagrams in page "{1}"\nconfAPrcsDiagInPage=Processing draw.io diagrams in page "{1}"\nconfAImpDiagram=Importing diagram "{1}"\nconfAImpDiagramFailed=Importing diagram "{1}" failed. Cannot find its new page ID. Maybe it points to a page that is not imported. \nconfAImpDiagramError=Error importing diagram "{1}". Cannot fetch or save the diagram. Cannot fix this diagram links.\nconfAUpdateDgrmCCFailed=Updating link to diagram "{1}" failed.\nconfImpDiagramSuccess=Updating diagram "{1}" done successfully.\nconfANoLnksInDrgm=No links to update in: {1}\nconfAUpdateLnkToPg=Updated link to page: "{1}" in diagram: "{2}"\nconfAUpdateLBLnkToPg=Updated lightbox link to page: "{1}" in diagram: "{2}"\nconfAUpdateLnkBase=Updated base URL from: "{1}" to: "{2}" in diagram: "{3}"\nconfAPageIdsImpDone=Page IDs Import finished\nconfAPrcsMacrosInPage=Processing draw.io macros in page "{1}"\nconfAErrFetchPage=Error fetching page "{1}"\nconfAFixingMacro=Fixing macro of diagram "{1}"\nconfAErrReadingExpFile=Error reading export file\nconfAPrcsDiagInPageDone=Processing draw.io diagrams in page "{1}" finished\nconfAFixingMacroSkipped=Fixing macro of diagram "{1}" failed. Cannot find its new page ID. Maybe it points to a page that is not imported. \npageIdsExpTrg=Export target\nconfALucidDiagImgImported={2} diagram "{1}" image extracted successfully\nconfASavingLucidDiagImgFailed=Extracting {2} diagram "{1}" image failed\nconfGetInfoFailed=Fetching file info from {1} failed.\nconfCheckCacheFailed=Cannot get cached file info.\nconfReadFileErr=Cannot read "{1}" file from {2}.\nconfSaveCacheFailed=Unexpected error. Cannot save cached file\norgChartType=Org Chart Type\nlinear=Linear\nhanger2=Hanger 2\nhanger4=Hanger 4\nfishbone1=Fishbone 1\nfishbone2=Fishbone 2\n1ColumnLeft=Single Column Left\n1ColumnRight=Single Column Right\nsmart=Smart\nparentChildSpacing=Parent Child Spacing\nsiblingSpacing=Sibling Spacing\nconfNoPermErr=Sorry, you don\'t have enough permissions to view this embedded diagram from page {1}\ncopyAsImage=Copy as Image\nlucidImport=Lucidchart Import\nlucidImportInst1=Click the "Start Import" button to import all Lucidchart diagrams.\ninstallFirst=Please install {1} first\ndrawioChromeExt=draw.io Chrome Extension\nloginFirstThen=Please login to {1} first, then {2}\nerrFetchDocList=Error: Couldn\'t fetch documents list\nbuiltinPlugins=Built-in Plugins\nextPlugins=External Plugins\nbackupFound=Backup file found\nchromeOnly=This feature only works in Google Chrome\nmsgDeleted=This message has been deleted\nconfAErrFetchDrawList=Error fetching diagrams list. Some diagrams are skipped.\nconfAErrCheckDrawDiag=Cannot check diagram {1}\nconfAErrFetchPageList=Error fetching pages list\nconfADiagImportIncom={1} diagram "{2}" is imported partially and may have missing shapes\ninvalidSel=Invalid selection\ndiagNameEmptyErr=Diagram name cannot be empty\nopenDiagram=Open Diagram\nnewDiagram=New diagram\neditable=Editable\nconfAReimportStarted=Re-import {1} diagrams started...\nspaceFilter=Filter by spaces\ncurViewState=Current Viewer State\npageLayers=Page and Layers\ncustomize=Customize\nfirstPage=First Page (All Layers)\ncurEditorState=Current Editor State\nnoAnchorsFound=No anchors found \nattachment=Attachment\ncurDiagram=Current Diagram\nrecentDiags=Recent Diagrams\ncsvImport=CSV Import\nchooseFile=Choose a file...\nchoose=Choose\ngdriveFname=Google Drive filename\nwidthOfViewer=Width of the viewer (px)\nheightOfViewer=Height of the viewer (px)\nautoSetViewerSize=Automatically set the size of the viewer\nthumbnail=Thumbnail\nprevInDraw=Preview in draw.io\nonedriveFname=OneDrive filename\ndiagFname=Diagram filename\ndiagUrl=Diagram URL\nshowDiag=Show Diagram\ndiagPreview=Diagram Preview\ncsvFileUrl=CSV File URL\ngenerate=Generate\nselectDiag2Insert=Please select a diagram to insert it.\nerrShowingDiag=Unexpected error. Cannot show diagram\nnoRecentDiags=No recent diagrams found\nfetchingRecentFailed=Failed to fetch recent diagrams\nuseSrch2FindDiags=Use the search box to find draw.io diagrams\ncantReadChckPerms=Cannot read the specified diagram. Please check you have read permission on that file.\ncantFetchChckPerms=Cannot fetch diagram info. Please check you have read permission on that file.\nsearchFailed=Searching failed. Please try again later.\nplsTypeStr=Please type a search string.\nunsupportedFileChckUrl=Unsupported file. Please check the specified URL\ndiagNotFoundChckUrl=Diagram not found or cannot be accessed. Please check the specified URL\ncsvNotFoundChckUrl=CSV file not found or cannot be accessed. Please check the specified URL\ncantReadUpload=Cannot read the uploaded diagram\nselect=Select\nerrCantGetIdType=Unexpected Error: Cannot get content id or type.\nerrGAuthWinBlocked=Error: Google Authentication window blocked\nauthDrawAccess=Authorize draw.io to access {1}\nconnTimeout=The connection has timed out\nerrAuthSrvc=Error authenticating to {1}\nplsSelectFile=Please select a file\nmustBgtZ={1} must be greater than zero\ncantLoadPrev=Cannot load file preview.\nerrAccessFile=Error: Access Denied. You do not have permission to access "{1}".\nnoPrevAvail=No preview is available.\npersonalAccNotSup=Personal accounts are not supported.\nerrSavingTryLater=Error occurred during saving, please try again later.\nplsEnterFld=Please enter {1}\ninvalidDiagUrl=Invalid Diagram URL\nunsupportedVsdx=Unsupported vsdx file\nunsupportedImg=Unsupported image file\nunsupportedFormat=Unsupported file format\nplsSelectSingleFile=Please select a single file only\nattCorrupt=Attachment file "{1}" is corrupted\nloadAttFailed=Failed to load attachment "{1}"\nembedDrawDiag=Embed draw.io Diagram\naddDiagram=Add Diagram\nembedDiagram=Embed Diagram\neditOwningPg=Edit owning page\ndeepIndexing=Deep Indexing (Index diagrams that aren\'t used in any page also)\nconfADeepIndexStarted=Deep Indexing Started\nconfADeepIndexDone=Deep Indexing Done\nofficeNoDiagramsSelected=No diagrams found in the selection\nofficeNoDiagramsInDoc=No diagrams found in the document\nofficeNotSupported=This feature is not supported in this host application\nsomeImagesFailed={1} out of {2} failed due to the following errors\nimportingNoUsedDiagrams=Importing {1} Diagrams not used in pages\nimportingDrafts=Importing {1} Diagrams in drafts\nprocessingDrafts=Processing drafts\nupdatingDrafts=Updating drafts\nupdateDrafts=Update drafts\nnotifications=Notifications\ndrawioImp=draw.io Import\nconfALibsImp=Importing draw.io Libraries\nconfALibsImpFailed=Importing {1} library failed\ncontributors=Contributors\ndrawDiagrams=draw.io Diagrams\nerrFileNotFoundOrNoPer=Error: Access Denied. File not found or you do not have permission to access "{1}" on {2}.\nconfACheckPagesWEmbed=Checking pages having embedded draw.io diagrams.\nconfADelBrokenEmbedDiagLnk=Removing broken embedded diagram links\nreplaceWith=Replace with\nreplaceAll=Replace All\nconfASkipDiagModified=Skipped "{1}" as it was modified after initial import\nreplFind=Replace/Find\nmatchesRepl={1} matches replaced\ndraftErrDataLoss=An error occurred while reading the draft file. The diagram cannot be edited now to prevent any possible data loss. Please try again later or contact support.\nibm=IBM\nlinkToDiagramHint=Add a link to this diagram. The diagram can only be edited from the page that owns it.\nlinkToDiagram=Link to Diagram\nchangedBy=Changed By\nlastModifiedOn=Last modified on\nsearchResults=Search Results\nshowAllTemps=Show all templates\nnotionToken=Notion Token\nselectDB=Select Database\nnoDBs=No Databases\ndiagramEdited={1} diagram "{2}" edited\n');Graph.prototype.defaultThemes["default-style2"]=mxUtils.parseXml('<mxStylesheet><add as="defaultVertex"><add as="shape" value="label"/><add as="perimeter" value="rectanglePerimeter"/><add as="fontSize" value="12"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="fillColor" value="#ffffff"/><add as="strokeColor" value="#000000"/><add as="fontColor" value="#000000"/></add><add as="defaultEdge"><add as="shape" value="connector"/><add as="labelBackgroundColor" value="#ffffff"/><add as="endArrow" value="classic"/><add as="fontSize" value="11"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="rounded" value="1"/><add as="strokeColor" value="#000000"/><add as="fontColor" value="#000000"/></add><add as="text"><add as="fillColor" value="none"/><add as="gradientColor" value="none"/><add as="strokeColor" value="none"/><add as="align" value="left"/><add as="verticalAlign" value="top"/></add><add as="edgeLabel" extend="text"><add as="labelBackgroundColor" value="#ffffff"/><add as="fontSize" value="11"/></add><add as="label"><add as="fontStyle" value="1"/><add as="align" value="left"/><add as="verticalAlign" value="middle"/><add as="spacing" value="2"/><add as="spacingLeft" value="52"/><add as="imageWidth" value="42"/><add as="imageHeight" value="42"/><add as="rounded" value="1"/></add><add as="icon" extend="label"><add as="align" value="center"/><add as="imageAlign" value="center"/><add as="verticalLabelPosition" value="bottom"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="4"/><add as="labelBackgroundColor" value="#ffffff"/><add as="spacing" value="0"/><add as="spacingLeft" value="0"/><add as="spacingTop" value="6"/><add as="fontStyle" value="0"/><add as="imageWidth" value="48"/><add as="imageHeight" value="48"/></add><add as="swimlane"><add as="shape" value="swimlane"/><add as="fontSize" value="12"/><add as="fontStyle" value="1"/><add as="startSize" value="23"/></add><add as="group"><add as="verticalAlign" value="top"/><add as="fillColor" value="none"/><add as="strokeColor" value="none"/><add as="gradientColor" value="none"/><add as="pointerEvents" value="0"/></add><add as="ellipse"><add as="shape" value="ellipse"/><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombus"><add as="shape" value="rhombus"/><add as="perimeter" value="rhombusPerimeter"/></add><add as="triangle"><add as="shape" value="triangle"/><add as="perimeter" value="trianglePerimeter"/></add><add as="line"><add as="shape" value="line"/><add as="strokeWidth" value="4"/><add as="labelBackgroundColor" value="#ffffff"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="8"/></add><add as="image"><add as="shape" value="image"/><add as="labelBackgroundColor" value="white"/><add as="verticalAlign" value="top"/><add as="verticalLabelPosition" value="bottom"/></add><add as="roundImage" extend="image"><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombusImage" extend="image"><add as="perimeter" value="rhombusPerimeter"/></add><add as="arrow"><add as="shape" value="arrow"/><add as="edgeStyle" value="none"/><add as="fillColor" value="#ffffff"/></add><add as="fancy"><add as="shadow" value="1"/><add as="glass" value="1"/></add><add as="gray" extend="fancy"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="blue" extend="fancy"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="green" extend="fancy"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="turquoise" extend="fancy"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="yellow" extend="fancy"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="orange" extend="fancy"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="red" extend="fancy"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="pink" extend="fancy"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="purple" extend="fancy"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add><add as="plain-gray"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="plain-blue"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="plain-green"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="plain-turquoise"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="plain-yellow"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="plain-orange"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="plain-red"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="plain-pink"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="plain-purple"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add></mxStylesheet>').documentElement;
+A.appendChild(m.diagramContainer);k.appendChild(A);m.updateTabContainer();null==W&&A.appendChild(m.tabContainer);var va=null;g();mxEvent.addListener(window,"resize",function(){g();null!=m.sidebarWindow&&m.sidebarWindow.window.fit();null!=m.formatWindow&&m.formatWindow.window.fit();null!=m.actions.outlineWindow&&m.actions.outlineWindow.window.fit();null!=m.actions.layersWindow&&m.actions.layersWindow.window.fit();null!=m.menus.tagsWindow&&m.menus.tagsWindow.window.fit();null!=m.menus.findWindow&&m.menus.findWindow.window.fit();
+null!=m.menus.findReplaceWindow&&m.menus.findReplaceWindow.window.fit()})}}};(function(){var a=!1;"min"!=uiTheme||a||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),a=!0);var b=EditorUi.initTheme;EditorUi.initTheme=function(){b.apply(this,arguments);"min"!=uiTheme||a||(this.initMinimalTheme(),a=!0)}})();DrawioComment=function(a,b,d,g,f,m,p){this.file=a;this.id=b;this.content=d;this.modifiedDate=g;this.createdDate=f;this.isResolved=m;this.user=p;this.replies=[]};DrawioComment.prototype.addReplyDirect=function(a){null!=a&&this.replies.push(a)};DrawioComment.prototype.addReply=function(a,b,d,g,f){b()};DrawioComment.prototype.editComment=function(a,b,d){b()};DrawioComment.prototype.deleteComment=function(a,b){a()};DrawioUser=function(a,b,d,g,f){this.id=a;this.email=b;this.displayName=d;this.pictureUrl=g;this.locale=f};mxResources.parse('# *DO NOT DIRECTLY EDIT THIS FILE, IT IS AUTOMATICALLY GENERATED AND IT IS BASED ON:*\n# https://docs.google.com/spreadsheet/ccc?key=0AmQEO36liL4FdDJLWVNMaVV2UmRKSnpXU09MYkdGbEE\nabout=About \naboutDrawio=About draw.io\naccessDenied=Access Denied\naction=Action\nactualSize=Actual Size\nadd=Add\naddAccount=Add account\naddedFile=Added {1}\naddImages=Add Images\naddImageUrl=Add Image URL\naddLayer=Add Layer\naddProperty=Add Property\naddress=Address\naddToExistingDrawing=Add to Existing Drawing\naddWaypoint=Add Waypoint\nadjustTo=Adjust to\nadvanced=Advanced\nalign=Align\nalignment=Alignment\nallChangesLost=All changes will be lost!\nallPages=All Pages\nallProjects=All Projects\nallSpaces=All Spaces\nallTags=All Tags\nanchor=Anchor\nandroid=Android\nangle=Angle\narc=Arc\nareYouSure=Are you sure?\nensureDataSaved=Please ensure your data is saved before closing.\nallChangesSaved=All changes saved\nallChangesSavedInDrive=All changes saved in Drive\nallowPopups=Allow pop-ups to avoid this dialog.\nallowRelativeUrl=Allow relative URL\nalreadyConnected=Nodes already connected\napply=Apply\narchiMate21=ArchiMate 2.1\narrange=Arrange\narrow=Arrow\narrows=Arrows\nasNew=As New\natlas=Atlas\nauthor=Author\nauthorizationRequired=Authorization required\nauthorizeThisAppIn=Authorize this app in {1}:\nauthorize=Authorize\nauthorizing=Authorizing\nautomatic=Automatic\nautosave=Autosave\nautosize=Autosize\nattachments=Attachments\naws=AWS\naws3d=AWS 3D\nazure=Azure\nback=Back\nbackground=Background\nbackgroundColor=Background Color\nbackgroundImage=Background Image\nbasic=Basic\nblankDrawing=Blank Drawing\nblankDiagram=Blank Diagram\nblock=Block\nblockquote=Blockquote\nblog=Blog\nbold=Bold\nbootstrap=Bootstrap\nborder=Border\nborderColor=Border Color\nborderWidth=Border Width\nbottom=Bottom\nbottomAlign=Bottom Align\nbottomLeft=Bottom Left\nbottomRight=Bottom Right\nbpmn=BPMN\nbringForward=Bring Forward\nbrowser=Browser\nbulletedList=Bulleted List\nbusiness=Business\nbusy=Operation in progress\ncabinets=Cabinets\ncancel=Cancel\ncenter=Center\ncannotLoad=Load attempts failed. Please try again later.\ncannotLogin=Log in attempts failed. Please try again later.\ncannotOpenFile=Cannot open file\nchange=Change\nchangeOrientation=Change Orientation\nchangeUser=Change user\nchangeStorage=Change storage\nchangesNotSaved=Changes have not been saved\nclassDiagram=Class Diagram\nuserJoined={1} has joined\nuserLeft={1} has left\nchatWindowTitle=Chat\nchooseAnOption=Choose an option\nchromeApp=Chrome App\ncollaborativeEditingNotice=Important Notice for Collaborative Editing\ncompare=Compare\ncompressed=Compressed\ncommitMessage=Commit Message\nconfigLinkWarn=This link configures draw.io. Only click OK if you trust whoever gave you it!\nconfigLinkConfirm=Click OK to configure and restart draw.io.\ncontainer=Container\ncsv=CSV\ndark=Dark\ndiagramXmlDesc=XML File\ndiagramHtmlDesc=HTML File\ndiagramPngDesc=Editable Bitmap Image\ndiagramSvgDesc=Editable Vector Image\ndidYouMeanToExportToPdf=Did you mean to export to PDF?\ndraftFound=A draft for \'{1}\' has been found. Load it into the editor or discard it to continue.\ndraftRevisionMismatch=There is a different version of this diagram on a shared draft of this page. Please edit the diagram from the draft to ensure you are working with the latest version.\nselectDraft=Select a draft to continue editing:\ndragAndDropNotSupported=Drag and drop not supported for images. Would you like to import instead?\ndropboxCharsNotAllowed=The following characters are not allowed: / : ? * " |\ncheck=Check\nchecksum=Checksum\ncircle=Circle\ncisco=Cisco\nclassic=Classic\nclearDefaultStyle=Clear Default Style\nclearWaypoints=Clear Waypoints\nclipart=Clipart\nclose=Close\nclosingFile=Closing file\ncollaborator=Collaborator\ncollaborators=Collaborators\ncollapse=Collapse\ncollapseExpand=Collapse/Expand\ncollapse-expand=Click to collapse/expand\nShift-click to move neighbors \nAlt-click to protect group size\ncollapsible=Collapsible\ncomic=Comic\ncomment=Comment\ncommentsNotes=Comments/Notes\ncompress=Compress\nconfiguration=Configuration\nconnect=Connect\nconnecting=Connecting\nconnectWithDrive=Connect with Google Drive\nconnection=Connection\nconnectionArrows=Connection Arrows\nconnectionPoints=Connection Points\nconstrainProportions=Constrain Proportions\ncontainsValidationErrors=Contains validation errors\ncopiedToClipboard=Copied to clipboard\ncopy=Copy\ncopyConnect=Copy on connect\ncopyCreated=A copy of the file was created.\ncopyData=Copy Data\ncopyOf=Copy of {1}\ncopyOfDrawing=Copy of Drawing\ncopySize=Copy Size\ncopyStyle=Copy Style\ncreate=Create\ncreateNewDiagram=Create New Diagram\ncreateRevision=Create Revision\ncreateShape=Create Shape\ncrop=Crop\ncurved=Curved\ncustom=Custom\ncurrent=Current\ncurrentPage=Current page\ncut=Cut\ndashed=Dashed\ndecideLater=Decide later\ndefault=Default\ndelete=Delete\ndeleteColumn=Delete Column\ndeleteLibrary401=Insufficient permissions to delete this library\ndeleteLibrary404=Selected library could not be found\ndeleteLibrary500=Error deleting library\ndeleteLibraryConfirm=You are about to permanently delete this library. Are you sure you want to do this?\ndeleteRow=Delete Row\ndescription=Description\ndevice=Device\ndiagram=Diagram\ndiagramContent=Diagram Content\ndiagramLocked=Diagram has been locked to prevent further data loss.\ndiagramLockedBySince=The diagram is locked by {1} since {2} ago\ndiagramName=Diagram Name\ndiagramIsPublic=Diagram is public\ndiagramIsNotPublic=Diagram is not public\ndiamond=Diamond\ndiamondThin=Diamond (thin)\ndidYouKnow=Did you know...\ndirection=Direction\ndiscard=Discard\ndiscardChangesAndReconnect=Discard Changes and Reconnect\ngoogleDriveMissingClickHere=Google Drive missing? Click here!\ndiscardChanges=Discard Changes\ndisconnected=Disconnected\ndistribute=Distribute\ndone=Done\ndoNotShowAgain=Do not show again\ndotted=Dotted\ndoubleClickOrientation=Doubleclick to change orientation\ndoubleClickTooltip=Doubleclick to insert text\ndoubleClickChangeProperty=Doubleclick to change property name\ndownload=Download\ndownloadDesktop=Get Desktop\ndownloadAs=Download as\nclickHereToSave=Click here to save.\ndpi=DPI\ndraftDiscarded=Draft discarded\ndraftSaved=Draft saved\ndragElementsHere=Drag elements here\ndragImagesHere=Drag images or URLs here\ndragUrlsHere=Drag URLs here\ndraw.io=draw.io\ndrawing=Drawing{1}\ndrawingEmpty=Drawing is empty\ndrawingTooLarge=Drawing is too large\ndrawioForWork=Draw.io for GSuite\ndropbox=Dropbox\nduplicate=Duplicate\nduplicateIt=Duplicate {1}\ndivider=Divider\ndx=Dx\ndy=Dy\neast=East\nedit=Edit\neditData=Edit Data\neditDiagram=Edit Diagram\neditGeometry=Edit Geometry\neditImage=Edit Image\neditImageUrl=Edit Image URL\neditLink=Edit Link\neditShape=Edit Shape\neditStyle=Edit Style\neditText=Edit Text\neditTooltip=Edit Tooltip\nglass=Glass\ngoogleImages=Google Images\nimageSearch=Image Search\neip=EIP\nembed=Embed\nembedImages=Embed Images\nmainEmbedNotice=Paste this into the page\nelectrical=Electrical\nellipse=Ellipse\nembedNotice=Paste this once at the end of the page\nenterGroup=Enter Group\nenterName=Enter Name\nenterPropertyName=Enter Property Name\nenterValue=Enter Value\nentityRelation=Entity Relation\nentityRelationshipDiagram=Entity Relationship Diagram\nerror=Error\nerrorDeletingFile=Error deleting file\nerrorLoadingFile=Error loading file\nerrorRenamingFile=Error renaming file\nerrorRenamingFileNotFound=Error renaming file. File was not found.\nerrorRenamingFileForbidden=Error renaming file. Insufficient access rights.\nerrorSavingDraft=Error saving draft\nerrorSavingFile=Error saving file\nerrorSavingFileUnknown=Error authorizing with Google\'s servers. Please refresh the page to re-attempt.\nerrorSavingFileForbidden=Error saving file. Insufficient access rights.\nerrorSavingFileNameConflict=Could not save diagram. Current page already contains file named \'{1}\'.\nerrorSavingFileNotFound=Error saving file. File was not found.\nerrorSavingFileReadOnlyMode=Could not save diagram while read-only mode is active.\nerrorSavingFileSessionTimeout=Your session has ended. Please <a target=\'_blank\' href=\'{1}\'>{2}</a> and return to this tab to try to save again.\nerrorSendingFeedback=Error sending feedback.\nerrorUpdatingPreview=Error updating preview.\nexit=Exit\nexitGroup=Exit Group\nexpand=Expand\nexport=Export\nexporting=Exporting\nexportAs=Export as\nexportOptionsDisabled=Export options disabled\nexportOptionsDisabledDetails=The owner has disabled options to download, print or copy for commenters and viewers on this file.\nexternalChanges=External Changes\nextras=Extras\nfacebook=Facebook\nfailedToSaveTryReconnect=Failed to save, trying to reconnect\nfeatureRequest=Feature Request\nfeedback=Feedback\nfeedbackSent=Feedback successfully sent.\nfloorplans=Floorplans\nfile=File\nfileChangedOverwriteDialog=The file has been modified. Do you want to save the file and overwrite those changes?\nfileChangedSyncDialog=The file has been modified. Do you want to synchronize those changes?\nfileChangedSync=The file has been modified. Click here to synchronize.\noverwrite=Overwrite\nsynchronize=Synchronize\nfilename=Filename\nfileExists=File already exists\nfileMovedToTrash=File was moved to trash\nfileNearlyFullSeeFaq=File nearly full, please see FAQ\nfileNotFound=File not found\nrepositoryNotFound=Repository not found\nfileNotFoundOrDenied=The file was not found. It does not exist or you do not have access.\nfileNotLoaded=File not loaded\nfileNotSaved=File not saved\nfileOpenLocation=How would you like to open these file(s)?\nfiletypeHtml=.html causes file to save as HTML with redirect to cloud URL\nfiletypePng=.png causes file to save as PNG with embedded data\nfiletypeSvg=.svg causes file to save as SVG with embedded data\nfileWillBeSavedInAppFolder={1} will be saved in the app folder.\nfill=Fill\nfillColor=Fill Color\nfilterCards=Filter Cards\nfind=Find\nfit=Fit\nfitContainer=Resize Container\nfitIntoContainer=Fit into Container\nfitPage=Fit Page\nfitPageWidth=Fit Page Width\nfitTo=Fit to\nfitToSheetsAcross=sheet(s) across\nfitToBy=by\nfitToSheetsDown=sheet(s) down\nfitTwoPages=Two Pages\nfitWindow=Fit Window\nflip=Flip\nflipH=Flip Horizontal\nflipV=Flip Vertical\nflowchart=Flowchart\nfolder=Folder\nfont=Font\nfontColor=Font Color\nfontFamily=Font Family\nfontSize=Font Size\nforbidden=You are not authorized to access this file\nformat=Format\nformatPanel=Format Panel\nformatted=Formatted\nformattedText=Formatted Text\nformatPng=PNG\nformatGif=GIF\nformatJpg=JPEG\nformatPdf=PDF\nformatSql=SQL\nformatSvg=SVG\nformatHtmlEmbedded=HTML\nformatSvgEmbedded=SVG (with XML)\nformatVsdx=VSDX\nformatVssx=VSSX\nformatXmlPlain=XML (Plain)\nformatXml=XML\nforum=Discussion/Help Forums\nfreehand=Freehand\nfromTemplate=From Template\nfromTemplateUrl=From Template URL\nfromText=From Text\nfromUrl=From URL\nfromThisPage=From this page\nfullscreen=Fullscreen\ngap=Gap\ngcp=GCP\ngeneral=General\ngithub=GitHub\ngitlab=GitLab\ngliffy=Gliffy\nglobal=Global\ngoogleDocs=Google Docs\ngoogleDrive=Google Drive\ngoogleGadget=Google Gadget\ngooglePlus=Google+\ngoogleSharingNotAvailable=Sharing is only available via Google Drive. Please click Open below and share from the more actions menu:\ngoogleSlides=Google Slides\ngoogleSites=Google Sites\ngoogleSheets=Google Sheets\ngradient=Gradient\ngradientColor=Color\ngrid=Grid\ngridColor=Grid Color\ngridSize=Grid Size\ngroup=Group\nguides=Guides\nhateApp=I hate draw.io\nheading=Heading\nheight=Height\nhelp=Help\nhelpTranslate=Help us translate this application\nhide=Hide\nhideIt=Hide {1}\nhidden=Hidden\nhome=Home\nhorizontal=Horizontal\nhorizontalFlow=Horizontal Flow\nhorizontalTree=Horizontal Tree\nhowTranslate=How good is the translation in your language?\nhtml=HTML\nhtmlText=HTML Text\nid=ID\niframe=IFrame\nignore=Ignore\nimage=Image\nimageUrl=Image URL\nimages=Images\nimagePreviewError=This image couldn\'t be loaded for preview. Please check the URL.\nimageTooBig=Image too big\nimgur=Imgur\nimport=Import\nimportFrom=Import from\nincludeCopyOfMyDiagram=Include a copy of my diagram\nincreaseIndent=Increase Indent\ndecreaseIndent=Decrease Indent\ninsert=Insert\ninsertColumnBefore=Insert Column Left\ninsertColumnAfter=Insert Column Right\ninsertEllipse=Insert Ellipse\ninsertImage=Insert Image\ninsertHorizontalRule=Insert Horizontal Rule\ninsertLink=Insert Link\ninsertPage=Insert Page\ninsertRectangle=Insert Rectangle\ninsertRhombus=Insert Rhombus\ninsertRowBefore=Insert Row Above\ninsertRowAfter=Insert Row After\ninsertText=Insert Text\ninserting=Inserting\ninstallApp=Install App\ninvalidFilename=Diagram names must not contain the following characters: / | : ; { } < > & + ? = "\ninvalidLicenseSeeThisPage=Your license is invalid, please see this <a target="_blank" href="https://support.draw.io/display/DFCS/Licensing+your+draw.io+plugin">page</a>.\ninvalidInput=Invalid input\ninvalidName=Invalid name\ninvalidOrMissingFile=Invalid or missing file\ninvalidPublicUrl=Invalid public URL\nisometric=Isometric\nios=iOS\nitalic=Italic\nkennedy=Kennedy\nkeyboardShortcuts=Keyboard Shortcuts\nlayers=Layers\nlandscape=Landscape\nlanguage=Language\nleanMapping=Lean Mapping\nlastChange=Last change {1} ago\nlessThanAMinute=less than a minute\nlicensingError=Licensing Error\nlicenseHasExpired=The license for {1} has expired on {2}. Click here.\nlicenseRequired=This feature requires draw.io to be licensed.\nlicenseWillExpire=The license for {1} will expire on {2}. Click here.\nlineJumps=Line jumps\nlinkAccountRequired=If the diagram is not public a Google account is required to view the link.\nlinkText=Link Text\nlist=List\nminute=minute\nminutes=minutes\nhours=hours\ndays=days\nmonths=months\nyears=years\nrestartForChangeRequired=Changes will take effect after a restart of the application.\nlaneColor=Lanecolor\nlastModified=Last modified\nlayout=Layout\nleft=Left\nleftAlign=Left Align\nleftToRight=Left to right\nlibraryTooltip=Drag and drop shapes here or click + to insert. Double click to edit.\nlightbox=Lightbox\nline=Line\nlineend=Line end\nlineheight=Line Height\nlinestart=Line start\nlinewidth=Linewidth\nlink=Link\nlinks=Links\nloading=Loading\nlockUnlock=Lock/Unlock\nloggedOut=Logged Out\nlogIn=log in\nloveIt=I love {1}\nlucidchart=Lucidchart\nmaps=Maps\nmathematicalTypesetting=Mathematical Typesetting\nmakeCopy=Make a Copy\nmanual=Manual\nmerge=Merge\nmermaid=Mermaid\nmicrosoftOffice=Microsoft Office\nmicrosoftExcel=Microsoft Excel\nmicrosoftPowerPoint=Microsoft PowerPoint\nmicrosoftWord=Microsoft Word\nmiddle=Middle\nminimal=Minimal\nmisc=Misc\nmockups=Mockups\nmodificationDate=Modification date\nmodifiedBy=Modified by\nmore=More\nmoreResults=More Results\nmoreShapes=More Shapes\nmove=Move\nmoveToFolder=Move to Folder\nmoving=Moving\nmoveSelectionTo=Move selection to {1}\nname=Name\nnavigation=Navigation\nnetwork=Network\nnetworking=Networking\nnew=New\nnewLibrary=New Library\nnextPage=Next Page\nno=No\nnoPickFolder=No, pick folder\nnoAttachments=No attachments found\nnoColor=No Color\nnoFiles=No Files\nnoFileSelected=No file selected\nnoLibraries=No libraries found\nnoMoreResults=No more results\nnone=None\nnoOtherViewers=No other viewers\nnoPlugins=No plugins\nnoPreview=No preview\nnoResponse=No response from server\nnoResultsFor=No results for \'{1}\'\nnoRevisions=No revisions\nnoSearchResults=No search results found\nnoPageContentOrNotSaved=No anchors found on this page or it hasn\'t been saved yet\nnormal=Normal\nnorth=North\nnotADiagramFile=Not a diagram file\nnotALibraryFile=Not a library file\nnotAvailable=Not available\nnotAUtf8File=Not a UTF-8 file\nnotConnected=Not connected\nnote=Note\nnotion=Notion\nnotSatisfiedWithImport=Not satisfied with the import?\nnotUsingService=Not using {1}?\nnumberedList=Numbered list\noffline=Offline\nok=OK\noneDrive=OneDrive\nonline=Online\nopacity=Opacity\nopen=Open\nopenArrow=Open Arrow\nopenExistingDiagram=Open Existing Diagram\nopenFile=Open File\nopenFrom=Open from\nopenLibrary=Open Library\nopenLibraryFrom=Open Library from\nopenLink=Open Link\nopenInNewWindow=Open in New Window\nopenInThisWindow=Open in This Window\nopenIt=Open {1}\nopenRecent=Open Recent\nopenSupported=Supported formats are files saved from this software (.xml), .vsdx and .gliffy\noptions=Options\norganic=Organic\norgChart=Org Chart\northogonal=Orthogonal\notherViewer=other viewer\notherViewers=other viewers\noutline=Outline\noval=Oval\npage=Page\npageContent=Page Content\npageNotFound=Page not found\npageWithNumber=Page-{1}\npages=Pages\npageView=Page View\npageSetup=Page Setup\npageScale=Page Scale\npan=Pan\npanTooltip=Space+Drag to pan\npaperSize=Paper Size\npattern=Pattern\nparallels=Parallels\npaste=Paste\npasteData=Paste Data\npasteHere=Paste here\npasteSize=Paste Size\npasteStyle=Paste Style\nperimeter=Perimeter\npermissionAnyone=Anyone can edit\npermissionAuthor=Owner and admins can edit\npickFolder=Pick a folder\npickLibraryDialogTitle=Select Library\npublicDiagramUrl=Public URL of the diagram\nplaceholders=Placeholders\nplantUml=PlantUML\nplugins=Plugins\npluginUrl=Plugin URL\npluginWarning=The page has requested to load the following plugin(s):\n \n {1}\n \n Would you like to load these plugin(s) now?\n \n NOTE : Only allow plugins to run if you fully understand the security implications of doing so.\n\nplusTooltip=Click to connect and clone (ctrl+click to clone, shift+click to connect). Drag to connect (ctrl+drag to clone).\nportrait=Portrait\nposition=Position\nposterPrint=Poster Print\npreferences=Preferences\npreview=Preview\npreviousPage=Previous Page\nprint=Print\nprintAllPages=Print All Pages\nprocEng=Proc. Eng.\nproject=Project\npriority=Priority\nproperties=Properties\npublish=Publish\nquickStart=Quick Start Video\nrack=Rack\nradial=Radial\nradialTree=Radial Tree\nreadOnly=Read-only\nreconnecting=Reconnecting\nrecentlyUpdated=Recently Updated\nrecentlyViewed=Recently Viewed\nrectangle=Rectangle\nredirectToNewApp=This file was created or modified in a newer version of this app. You will be redirected now.\nrealtimeTimeout=It looks like you\'ve made a few changes while offline. We\'re sorry, these changes cannot be saved.\nredo=Redo\nrefresh=Refresh\nregularExpression=Regular Expression\nrelative=Relative\nrelativeUrlNotAllowed=Relative URL not allowed\nrememberMe=Remember me\nrememberThisSetting=Remember this setting\nremoveFormat=Clear Formatting\nremoveFromGroup=Remove from Group\nremoveIt=Remove {1}\nremoveWaypoint=Remove Waypoint\nrename=Rename\nrenamed=Renamed\nrenameIt=Rename {1}\nrenaming=Renaming\nreplace=Replace\nreplaceIt={1} already exists. Do you want to replace it?\nreplaceExistingDrawing=Replace existing drawing\nrequired=required\nreset=Reset\nresetView=Reset View\nresize=Resize\nresizeLargeImages=Do you want to resize large images to make the application run faster?\nretina=Retina\nresponsive=Responsive\nrestore=Restore\nrestoring=Restoring\nretryingIn=Retrying in {1} second(s)\nretryingLoad=Load failed. Retrying...\nretryingLogin=Login time out. Retrying...\nreverse=Reverse\nrevision=Revision\nrevisionHistory=Revision History\nrhombus=Rhombus\nright=Right\nrightAlign=Right Align\nrightToLeft=Right to left\nrotate=Rotate\nrotateTooltip=Click and drag to rotate, click to turn shape only by 90 degrees\nrotation=Rotation\nrounded=Rounded\nsave=Save\nsaveAndExit=Save & Exit\nsaveAs=Save as\nsaveAsXmlFile=Save as XML file?\nsaved=Saved\nsaveDiagramFirst=Please save the diagram first\nsaveDiagramsTo=Save diagrams to\nsaveLibrary403=Insufficient permissions to edit this library\nsaveLibrary500=There was an error while saving the library\nsaveLibraryReadOnly=Could not save library while read-only mode is active\nsaving=Saving\nscratchpad=Scratchpad\nscrollbars=Scrollbars\nsearch=Search\nsearchShapes=Search Shapes\nselectAll=Select All\nselectionOnly=Selection Only\nselectCard=Select Card\nselectEdges=Select Edges\nselectFile=Select File\nselectFolder=Select Folder\nselectFont=Select Font\nselectNone=Select None\nselectTemplate=Select Template\nselectVertices=Select Vertices\nsendBackward=Send Backward\nsendMessage=Send\nsendYourFeedback=Send your feedback\nserviceUnavailableOrBlocked=Service unavailable or blocked\nsessionExpired=Your session has expired. Please refresh the browser window.\nsessionTimeoutOnSave=Your session has timed out and you have been disconnected from the Google Drive. Press OK to login and save. \nsetAsDefaultStyle=Set as Default Style\nshadow=Shadow\nshape=Shape\nshapes=Shapes\nshare=Share\nshareLink=Link for shared editing\nsharingAvailable=Sharing available for Google Drive and OneDrive files.\nsharp=Sharp\nshow=Show\nshowStartScreen=Show Start Screen\nsidebarTooltip=Click to expand. Drag and drop shapes into the diagram. Shift+click to change selection. Alt+click to insert and connect.\nsigns=Signs\nsignOut=Sign out\nsimple=Simple\nsimpleArrow=Simple Arrow\nsimpleViewer=Simple Viewer\nsize=Size\nsketch=Sketch\nsolid=Solid\nsourceSpacing=Source Spacing\nsouth=South\nsoftware=Software\nspace=Space\nspacing=Spacing\nspecialLink=Special Link\nstandard=Standard\nstartDrawing=Start drawing\nstopDrawing=Stop drawing\nstarting=Starting\nstraight=Straight\nstrikethrough=Strikethrough\nstrokeColor=Line Color\nstyle=Style\nsubscript=Subscript\nsummary=Summary\nsuperscript=Superscript\nsupport=Support\nswimlaneDiagram=Swimlane Diagram\nsysml=SysML\ntags=Tags\ntable=Table\ntables=Tables\ntakeOver=Take Over\ntargetSpacing=Target Spacing\ntemplate=Template\ntemplates=Templates\ntext=Text\ntextAlignment=Text Alignment\ntextOpacity=Text Opacity\ntheme=Theme\ntimeout=Timeout\ntitle=Title\nto=to\ntoBack=To Back\ntoFront=To Front\ntooLargeUseDownload=Too large, use download instead.\ntoolbar=Toolbar\ntooltips=Tooltips\ntop=Top\ntopAlign=Top Align\ntopLeft=Top Left\ntopRight=Top Right\ntransparent=Transparent\ntransparentBackground=Transparent Background\ntrello=Trello\ntryAgain=Try again\ntryOpeningViaThisPage=Try opening via this page\nturn=Rotate shape only by 90°\ntype=Type\ntwitter=Twitter\numl=UML\nunderline=Underline\nundo=Undo\nungroup=Ungroup\nunsavedChanges=Unsaved changes\nunsavedChangesClickHereToSave=Unsaved changes. Click here to save.\nuntitled=Untitled\nuntitledDiagram=Untitled Diagram\nuntitledLayer=Untitled Layer\nuntitledLibrary=Untitled Library\nunknownError=Unknown error\nupdateFile=Update {1}\nupdatingDocument=Updating Document. Please wait...\nupdatingPreview=Updating Preview. Please wait...\nupdatingSelection=Updating Selection. Please wait...\nupload=Upload\nurl=URL\nuseOffline=Use Offline\nuseRootFolder=Use root folder?\nuserManual=User Manual\nvertical=Vertical\nverticalFlow=Vertical Flow\nverticalTree=Vertical Tree\nview=View\nviewerSettings=Viewer Settings\nviewUrl=Link to view: {1}\nvoiceAssistant=Voice Assistant (beta)\nwarning=Warning\nwaypoints=Waypoints\nwest=West\nwidth=Width\nwiki=Wiki\nwordWrap=Word Wrap\nwritingDirection=Writing Direction\nyes=Yes\nyourEmailAddress=Your email address\nzoom=Zoom\nzoomIn=Zoom In\nzoomOut=Zoom Out\nbasic=Basic\nbusinessprocess=Business Processes\ncharts=Charts\nengineering=Engineering\nflowcharts=Flowcharts\ngmdl=Material Design\nmindmaps=Mindmaps\nmockups=Mockups\nnetworkdiagrams=Network Diagrams\nnothingIsSelected=Nothing is selected\nother=Other\nsoftwaredesign=Software Design\nvenndiagrams=Venn Diagrams\nwebEmailOrOther=Web, email or any other internet address\nwebLink=Web Link\nwireframes=Wireframes\nproperty=Property\nvalue=Value\nshowMore=Show More\nshowLess=Show Less\nmyDiagrams=My Diagrams\nallDiagrams=All Diagrams\nrecentlyUsed=Recently used\nlistView=List view\ngridView=Grid view\nresultsFor=Results for \'{1}\'\noneDriveCharsNotAllowed=The following characters are not allowed: ~ " # % * : < > ? / { | }\noneDriveInvalidDeviceName=The specified device name is invalid\nofficeNotLoggedOD=You are not logged in to OneDrive. Please open draw.io task pane and login first.\nofficeSelectSingleDiag=Please select a single draw.io diagram only without other contents.\nofficeSelectDiag=Please select a draw.io diagram.\nofficeCannotFindDiagram=Cannot find a draw.io diagram in the selection\nnoDiagrams=No diagrams found\nauthFailed=Authentication failed\nofficeFailedAuthMsg=Unable to successfully authenticate user or authorize application.\nconvertingDiagramFailed=Converting diagram failed\nofficeCopyImgErrMsg=Due to some limitations in the host application, the image could not be inserted. Please manually copy the image then paste it to the document.\ninsertingImageFailed=Inserting image failed\nofficeCopyImgInst=Instructions: Right-click the image below. Select "Copy image" from the context menu. Then, in the document, right-click and select "Paste" from the context menu.\nfolderEmpty=Folder is empty\nrecent=Recent\nsharedWithMe=Shared With Me\nsharepointSites=Sharepoint Sites\nerrorFetchingFolder=Error fetching folder items\nerrorAuthOD=Error authenticating to OneDrive\nofficeMainHeader=Adds draw.io diagrams to your document.\nofficeStepsHeader=This add-in performs the following steps:\nofficeStep1=Connects to Microsoft OneDrive, Google Drive or your device.\nofficeStep2=Select a draw.io diagram.\nofficeStep3=Insert the diagram into the document.\nofficeAuthPopupInfo=Please complete the authentication in the pop-up window.\nofficeSelDiag=Select draw.io Diagram:\nfiles=Files\nshared=Shared\nsharepoint=Sharepoint\nofficeManualUpdateInst=Instructions: Copy draw.io diagram from the document. Then, in the box below, right-click and select "Paste" from the context menu.\nofficeClickToEdit=Click icon to start editing:\npasteDiagram=Paste draw.io diagram here\nconnectOD=Connect to OneDrive\nselectChildren=Select Children\nselectSiblings=Select Siblings\nselectParent=Select Parent\nselectDescendants=Select Descendants\nlastSaved=Last saved {1} ago\nresolve=Resolve\nreopen=Re-open\nshowResolved=Show Resolved\nreply=Reply\nobjectNotFound=Object not found\nreOpened=Re-opened\nmarkedAsResolved=Marked as resolved\nnoCommentsFound=No comments found\ncomments=Comments\ntimeAgo={1} ago\nconfluenceCloud=Confluence Cloud\nlibraries=Libraries\nconfAnchor=Confluence Page Anchor\nconfTimeout=The connection has timed out\nconfSrvTakeTooLong=The server at {1} is taking too long to respond.\nconfCannotInsertNew=Cannot insert draw.io diagram to a new Confluence page\nconfSaveTry=Please save the page and try again.\nconfCannotGetID=Unable to determine page ID\nconfContactAdmin=Please contact your Confluence administrator.\nreadErr=Read Error\neditingErr=Editing Error\nconfExtEditNotPossible=This diagram cannot be edited externally. Please try editing it while editing the page\nconfEditedExt=Diagram/Page edited externally\ndiagNotFound=Diagram Not Found\nconfEditedExtRefresh=Diagram/Page is edited externally. Please refresh the page.\nconfCannotEditDraftDelOrExt=Cannot edit diagrams in a draft page, diagram is deleted from the page, or diagram is edited externally. Please check the page.\nretBack=Return back\nconfDiagNotPublished=The diagram does not belong to a published page\ncreatedByDraw=Created by draw.io\nfilenameShort=Filename too short\ninvalidChars=Invalid characters\nalreadyExst={1} already exists\ndraftReadErr=Draft Read Error\ndiagCantLoad=Diagram cannot be loaded\ndraftWriteErr=Draft Write Error\ndraftCantCreate=Draft could not be created\nconfDuplName=Duplicate diagram name detected. Please pick another name.\nconfSessionExpired=Looks like your session expired. Log in again to keep working.\nlogin=Login\ndrawPrev=draw.io preview\ndrawDiag=draw.io diagram\ninvalidCallFnNotFound=Invalid Call: {1} not found\ninvalidCallErrOccured=Invalid Call: An error occurred, {1}\nanonymous=Anonymous\nconfGotoPage=Go to containing page\nshowComments=Show Comments\nconfError=Error: {1}\ngliffyImport=Gliffy Import\ngliffyImportInst1=Click the "Start Import" button to import all Gliffy diagrams to draw.io.\ngliffyImportInst2=Please note that the import procedure will take some time and the browser window must remain open until the import is completed.\nstartImport=Start Import\ndrawConfig=draw.io Configuration\ncustomLib=Custom Libraries\ncustomTemp=Custom Templates\npageIdsExp=Page IDs Export\ndrawReindex=draw.io re-indexing (beta)\nworking=Working\ndrawConfigNotFoundInst=draw.io Configuration Space (DRAWIOCONFIG) does not exist. This space is needed to store draw.io configuration files and custom libraries/templates.\ncreateConfSp=Create Config Space\nunexpErrRefresh=Unexpected error, please refresh the page and try again.\nconfigJSONInst=Write draw.io JSON configuration in the editor below then click save. If you need help, please refer to\nthisPage=this page\ncurCustLib=Current Custom Libraries\nlibName=Library Name\naction=Action\ndrawConfID=draw.io Config ID\naddLibInst=Click the "Add Library" button to upload a new library.\naddLib=Add Library\ncustomTempInst1=Custom templates are draw.io diagrams saved in children pages of\ncustomTempInst2=For more details, please refer to\ntempsPage=Templates page\npageIdsExpInst1=Select export target, then click the "Start Export" button to export all pages IDs.\npageIdsExpInst2=Please note that the export procedure will take some time and the browser window must remain open until the export is completed.\nstartExp=Start Export\nrefreshDrawIndex=Refresh draw.io Diagrams Index\nreindexInst1=Click the "Start Indexing" button to refresh draw.io diagrams index.\nreindexInst2=Please note that the indexing procedure will take some time and the browser window must remain open until the indexing is completed.\nstartIndexing=Start Indexing\nconfAPageFoundFetch=Page "{1}" found. Fetching\nconfAAllDiagDone=All {1} diagrams processed. Process finished.\nconfAStartedProcessing=Started processing page "{1}"\nconfAAllDiagInPageDone=All {1} diagrams in page "{2}" processed successfully.\nconfAPartialDiagDone={1} out of {2} {3} diagrams in page "{4}" processed successfully.\nconfAUpdatePageFailed=Updating page "{1}" failed.\nconfANoDiagFoundInPage=No {1} diagrams found in page "{2}".\nconfAFetchPageFailed=Fetching the page failed.\nconfANoDiagFound=No {1} diagrams found. Process finished.\nconfASearchFailed=Searching for {1} diagrams failed. Please try again later.\nconfAGliffyDiagFound={2} diagram "{1}" found. Importing\nconfAGliffyDiagImported={2} diagram "{1}" imported successfully.\nconfASavingImpGliffyFailed=Saving imported {2} diagram "{1}" failed.\nconfAImportedFromByDraw=Imported from "{1}" by draw.io\nconfAImportGliffyFailed=Importing {2} diagram "{1}" failed.\nconfAFetchGliffyFailed=Fetching {2} diagram "{1}" failed.\nconfACheckBrokenDiagLnk=Checking for broken diagrams links.\nconfADelDiagLinkOf=Deleting diagram link of "{1}"\nconfADupLnk=(duplicate link)\nconfADelDiagLnkFailed=Deleting diagram link of "{1}" failed.\nconfAUnexpErrProcessPage=Unexpected error during processing the page with id: {1}\nconfADiagFoundIndex=Diagram "{1}" found. Indexing\nconfADiagIndexSucc=Diagram "{1}" indexed successfully.\nconfAIndexDiagFailed=Indexing diagram "{1}" failed.\nconfASkipDiagOtherPage=Skipped "{1}" as it belongs to another page!\nconfADiagUptoDate=Diagram "{1}" is up to date.\nconfACheckPagesWDraw=Checking pages having draw.io diagrams.\nconfAErrOccured=An error occurred!\nsavedSucc=Saved successfully\nconfASaveFailedErr=Saving Failed (Unexpected Error)\ncharacter=Character\nconfAConfPageDesc=This page contains draw.io configuration file (configuration.json) as attachment\nconfALibPageDesc=This page contains draw.io custom libraries as attachments\nconfATempPageDesc=This page contains draw.io custom templates as attachments\nworking=Working\nconfAConfSpaceDesc=This space is used to store draw.io configuration files and custom libraries/templates\nconfANoCustLib=No Custom Libraries\ndelFailed=Delete failed!\nshowID=Show ID\nconfAIncorrectLibFileType=Incorrect file type. Libraries should be XML files.\nuploading=Uploading\nconfALibExist=This library already exists\nconfAUploadSucc=Uploaded successfully\nconfAUploadFailErr=Upload Failed (Unexpected Error)\nhiResPreview=High Res Preview\nofficeNotLoggedGD=You are not logged in to Google Drive. Please open draw.io task pane and login first.\nofficePopupInfo=Please complete the process in the pop-up window.\npickODFile=Pick OneDrive File\npickGDriveFile=Pick Google Drive File\npickDeviceFile=Pick Device File\nvsdNoConfig="vsdurl" is not configured\nruler=Ruler\nunits=Units\npoints=Points\ninches=Inches\nmillimeters=Millimeters\nconfEditDraftDelOrExt=This diagram is in a draft page, is deleted from the page, or is edited externally. It will be saved as a new attachment version and may not be reflected in the page.\nconfDiagEditedExt=Diagram is edited in another session. It will be saved as a new attachment version but the page will show other session\'s modifications.\nmacroNotFound=Macro Not Found\nconfAInvalidPageIdsFormat=Incorrect Page IDs file format\nconfACollectingCurPages=Collecting current pages\nconfABuildingPagesMap=Building pages mapping\nconfAProcessDrawDiag=Started processing imported draw.io diagrams\nconfAProcessDrawDiagDone=Finished processing imported draw.io diagrams\nconfAProcessImpPages=Started processing imported pages\nconfAErrPrcsDiagInPage=Error processing draw.io diagrams in page "{1}"\nconfAPrcsDiagInPage=Processing draw.io diagrams in page "{1}"\nconfAImpDiagram=Importing diagram "{1}"\nconfAImpDiagramFailed=Importing diagram "{1}" failed. Cannot find its new page ID. Maybe it points to a page that is not imported. \nconfAImpDiagramError=Error importing diagram "{1}". Cannot fetch or save the diagram. Cannot fix this diagram links.\nconfAUpdateDgrmCCFailed=Updating link to diagram "{1}" failed.\nconfImpDiagramSuccess=Updating diagram "{1}" done successfully.\nconfANoLnksInDrgm=No links to update in: {1}\nconfAUpdateLnkToPg=Updated link to page: "{1}" in diagram: "{2}"\nconfAUpdateLBLnkToPg=Updated lightbox link to page: "{1}" in diagram: "{2}"\nconfAUpdateLnkBase=Updated base URL from: "{1}" to: "{2}" in diagram: "{3}"\nconfAPageIdsImpDone=Page IDs Import finished\nconfAPrcsMacrosInPage=Processing draw.io macros in page "{1}"\nconfAErrFetchPage=Error fetching page "{1}"\nconfAFixingMacro=Fixing macro of diagram "{1}"\nconfAErrReadingExpFile=Error reading export file\nconfAPrcsDiagInPageDone=Processing draw.io diagrams in page "{1}" finished\nconfAFixingMacroSkipped=Fixing macro of diagram "{1}" failed. Cannot find its new page ID. Maybe it points to a page that is not imported. \npageIdsExpTrg=Export target\nconfALucidDiagImgImported={2} diagram "{1}" image extracted successfully\nconfASavingLucidDiagImgFailed=Extracting {2} diagram "{1}" image failed\nconfGetInfoFailed=Fetching file info from {1} failed.\nconfCheckCacheFailed=Cannot get cached file info.\nconfReadFileErr=Cannot read "{1}" file from {2}.\nconfSaveCacheFailed=Unexpected error. Cannot save cached file\norgChartType=Org Chart Type\nlinear=Linear\nhanger2=Hanger 2\nhanger4=Hanger 4\nfishbone1=Fishbone 1\nfishbone2=Fishbone 2\n1ColumnLeft=Single Column Left\n1ColumnRight=Single Column Right\nsmart=Smart\nparentChildSpacing=Parent Child Spacing\nsiblingSpacing=Sibling Spacing\nconfNoPermErr=Sorry, you don\'t have enough permissions to view this embedded diagram from page {1}\ncopyAsImage=Copy as Image\nlucidImport=Lucidchart Import\nlucidImportInst1=Click the "Start Import" button to import all Lucidchart diagrams.\ninstallFirst=Please install {1} first\ndrawioChromeExt=draw.io Chrome Extension\nloginFirstThen=Please login to {1} first, then {2}\nerrFetchDocList=Error: Couldn\'t fetch documents list\nbuiltinPlugins=Built-in Plugins\nextPlugins=External Plugins\nbackupFound=Backup file found\nchromeOnly=This feature only works in Google Chrome\nmsgDeleted=This message has been deleted\nconfAErrFetchDrawList=Error fetching diagrams list. Some diagrams are skipped.\nconfAErrCheckDrawDiag=Cannot check diagram {1}\nconfAErrFetchPageList=Error fetching pages list\nconfADiagImportIncom={1} diagram "{2}" is imported partially and may have missing shapes\ninvalidSel=Invalid selection\ndiagNameEmptyErr=Diagram name cannot be empty\nopenDiagram=Open Diagram\nnewDiagram=New diagram\neditable=Editable\nconfAReimportStarted=Re-import {1} diagrams started...\nspaceFilter=Filter by spaces\ncurViewState=Current Viewer State\npageLayers=Page and Layers\ncustomize=Customize\nfirstPage=First Page (All Layers)\ncurEditorState=Current Editor State\nnoAnchorsFound=No anchors found \nattachment=Attachment\ncurDiagram=Current Diagram\nrecentDiags=Recent Diagrams\ncsvImport=CSV Import\nchooseFile=Choose a file...\nchoose=Choose\ngdriveFname=Google Drive filename\nwidthOfViewer=Width of the viewer (px)\nheightOfViewer=Height of the viewer (px)\nautoSetViewerSize=Automatically set the size of the viewer\nthumbnail=Thumbnail\nprevInDraw=Preview in draw.io\nonedriveFname=OneDrive filename\ndiagFname=Diagram filename\ndiagUrl=Diagram URL\nshowDiag=Show Diagram\ndiagPreview=Diagram Preview\ncsvFileUrl=CSV File URL\ngenerate=Generate\nselectDiag2Insert=Please select a diagram to insert it.\nerrShowingDiag=Unexpected error. Cannot show diagram\nnoRecentDiags=No recent diagrams found\nfetchingRecentFailed=Failed to fetch recent diagrams\nuseSrch2FindDiags=Use the search box to find draw.io diagrams\ncantReadChckPerms=Cannot read the specified diagram. Please check you have read permission on that file.\ncantFetchChckPerms=Cannot fetch diagram info. Please check you have read permission on that file.\nsearchFailed=Searching failed. Please try again later.\nplsTypeStr=Please type a search string.\nunsupportedFileChckUrl=Unsupported file. Please check the specified URL\ndiagNotFoundChckUrl=Diagram not found or cannot be accessed. Please check the specified URL\ncsvNotFoundChckUrl=CSV file not found or cannot be accessed. Please check the specified URL\ncantReadUpload=Cannot read the uploaded diagram\nselect=Select\nerrCantGetIdType=Unexpected Error: Cannot get content id or type.\nerrGAuthWinBlocked=Error: Google Authentication window blocked\nauthDrawAccess=Authorize draw.io to access {1}\nconnTimeout=The connection has timed out\nerrAuthSrvc=Error authenticating to {1}\nplsSelectFile=Please select a file\nmustBgtZ={1} must be greater than zero\ncantLoadPrev=Cannot load file preview.\nerrAccessFile=Error: Access Denied. You do not have permission to access "{1}".\nnoPrevAvail=No preview is available.\npersonalAccNotSup=Personal accounts are not supported.\nerrSavingTryLater=Error occurred during saving, please try again later.\nplsEnterFld=Please enter {1}\ninvalidDiagUrl=Invalid Diagram URL\nunsupportedVsdx=Unsupported vsdx file\nunsupportedImg=Unsupported image file\nunsupportedFormat=Unsupported file format\nplsSelectSingleFile=Please select a single file only\nattCorrupt=Attachment file "{1}" is corrupted\nloadAttFailed=Failed to load attachment "{1}"\nembedDrawDiag=Embed draw.io Diagram\naddDiagram=Add Diagram\nembedDiagram=Embed Diagram\neditOwningPg=Edit owning page\ndeepIndexing=Deep Indexing (Index diagrams that aren\'t used in any page also)\nconfADeepIndexStarted=Deep Indexing Started\nconfADeepIndexDone=Deep Indexing Done\nofficeNoDiagramsSelected=No diagrams found in the selection\nofficeNoDiagramsInDoc=No diagrams found in the document\nofficeNotSupported=This feature is not supported in this host application\nsomeImagesFailed={1} out of {2} failed due to the following errors\nimportingNoUsedDiagrams=Importing {1} Diagrams not used in pages\nimportingDrafts=Importing {1} Diagrams in drafts\nprocessingDrafts=Processing drafts\nupdatingDrafts=Updating drafts\nupdateDrafts=Update drafts\nnotifications=Notifications\ndrawioImp=draw.io Import\nconfALibsImp=Importing draw.io Libraries\nconfALibsImpFailed=Importing {1} library failed\ncontributors=Contributors\ndrawDiagrams=draw.io Diagrams\nerrFileNotFoundOrNoPer=Error: Access Denied. File not found or you do not have permission to access "{1}" on {2}.\nconfACheckPagesWEmbed=Checking pages having embedded draw.io diagrams.\nconfADelBrokenEmbedDiagLnk=Removing broken embedded diagram links\nreplaceWith=Replace with\nreplaceAll=Replace All\nconfASkipDiagModified=Skipped "{1}" as it was modified after initial import\nreplFind=Replace/Find\nmatchesRepl={1} matches replaced\ndraftErrDataLoss=An error occurred while reading the draft file. The diagram cannot be edited now to prevent any possible data loss. Please try again later or contact support.\nibm=IBM\nlinkToDiagramHint=Add a link to this diagram. The diagram can only be edited from the page that owns it.\nlinkToDiagram=Link to Diagram\nchangedBy=Changed By\nlastModifiedOn=Last modified on\nsearchResults=Search Results\nshowAllTemps=Show all templates\nnotionToken=Notion Token\nselectDB=Select Database\nnoDBs=No Databases\ndiagramEdited={1} diagram "{2}" edited\n');Graph.prototype.defaultThemes["default-style2"]=mxUtils.parseXml('<mxStylesheet><add as="defaultVertex"><add as="shape" value="label"/><add as="perimeter" value="rectanglePerimeter"/><add as="fontSize" value="12"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="fillColor" value="#ffffff"/><add as="strokeColor" value="#000000"/><add as="fontColor" value="#000000"/></add><add as="defaultEdge"><add as="shape" value="connector"/><add as="labelBackgroundColor" value="#ffffff"/><add as="endArrow" value="classic"/><add as="fontSize" value="11"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="rounded" value="1"/><add as="strokeColor" value="#000000"/><add as="fontColor" value="#000000"/></add><add as="text"><add as="fillColor" value="none"/><add as="gradientColor" value="none"/><add as="strokeColor" value="none"/><add as="align" value="left"/><add as="verticalAlign" value="top"/></add><add as="edgeLabel" extend="text"><add as="labelBackgroundColor" value="#ffffff"/><add as="fontSize" value="11"/></add><add as="label"><add as="fontStyle" value="1"/><add as="align" value="left"/><add as="verticalAlign" value="middle"/><add as="spacing" value="2"/><add as="spacingLeft" value="52"/><add as="imageWidth" value="42"/><add as="imageHeight" value="42"/><add as="rounded" value="1"/></add><add as="icon" extend="label"><add as="align" value="center"/><add as="imageAlign" value="center"/><add as="verticalLabelPosition" value="bottom"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="4"/><add as="labelBackgroundColor" value="#ffffff"/><add as="spacing" value="0"/><add as="spacingLeft" value="0"/><add as="spacingTop" value="6"/><add as="fontStyle" value="0"/><add as="imageWidth" value="48"/><add as="imageHeight" value="48"/></add><add as="swimlane"><add as="shape" value="swimlane"/><add as="fontSize" value="12"/><add as="fontStyle" value="1"/><add as="startSize" value="23"/></add><add as="group"><add as="verticalAlign" value="top"/><add as="fillColor" value="none"/><add as="strokeColor" value="none"/><add as="gradientColor" value="none"/><add as="pointerEvents" value="0"/></add><add as="ellipse"><add as="shape" value="ellipse"/><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombus"><add as="shape" value="rhombus"/><add as="perimeter" value="rhombusPerimeter"/></add><add as="triangle"><add as="shape" value="triangle"/><add as="perimeter" value="trianglePerimeter"/></add><add as="line"><add as="shape" value="line"/><add as="strokeWidth" value="4"/><add as="labelBackgroundColor" value="#ffffff"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="8"/></add><add as="image"><add as="shape" value="image"/><add as="labelBackgroundColor" value="white"/><add as="verticalAlign" value="top"/><add as="verticalLabelPosition" value="bottom"/></add><add as="roundImage" extend="image"><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombusImage" extend="image"><add as="perimeter" value="rhombusPerimeter"/></add><add as="arrow"><add as="shape" value="arrow"/><add as="edgeStyle" value="none"/><add as="fillColor" value="#ffffff"/></add><add as="fancy"><add as="shadow" value="1"/><add as="glass" value="1"/></add><add as="gray" extend="fancy"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="blue" extend="fancy"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="green" extend="fancy"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="turquoise" extend="fancy"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="yellow" extend="fancy"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="orange" extend="fancy"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="red" extend="fancy"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="pink" extend="fancy"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="purple" extend="fancy"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add><add as="plain-gray"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="plain-blue"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="plain-green"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="plain-turquoise"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="plain-yellow"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="plain-orange"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="plain-red"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="plain-pink"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="plain-purple"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add></mxStylesheet>').documentElement;
Graph.prototype.defaultThemes.darkTheme=mxUtils.parseXml('<mxStylesheet><add as="defaultVertex"><add as="shape" value="label"/><add as="perimeter" value="rectanglePerimeter"/><add as="fontSize" value="12"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="fillColor" value="#2a2a2a"/><add as="strokeColor" value="#f0f0f0"/><add as="fontColor" value="#f0f0f0"/></add><add as="defaultEdge"><add as="shape" value="connector"/><add as="labelBackgroundColor" value="#2a2a2a"/><add as="endArrow" value="classic"/><add as="fontSize" value="11"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="rounded" value="1"/><add as="strokeColor" value="#f0f0f0"/><add as="fontColor" value="#f0f0f0"/></add><add as="text"><add as="fillColor" value="none"/><add as="gradientColor" value="none"/><add as="strokeColor" value="none"/><add as="align" value="left"/><add as="verticalAlign" value="top"/></add><add as="edgeLabel" extend="text"><add as="labelBackgroundColor" value="#2a2a2a"/><add as="fontSize" value="11"/></add><add as="label"><add as="fontStyle" value="1"/><add as="align" value="left"/><add as="verticalAlign" value="middle"/><add as="spacing" value="2"/><add as="spacingLeft" value="52"/><add as="imageWidth" value="42"/><add as="imageHeight" value="42"/><add as="rounded" value="1"/></add><add as="icon" extend="label"><add as="align" value="center"/><add as="imageAlign" value="center"/><add as="verticalLabelPosition" value="bottom"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="4"/><add as="labelBackgroundColor" value="#2a2a2a"/><add as="spacing" value="0"/><add as="spacingLeft" value="0"/><add as="spacingTop" value="6"/><add as="fontStyle" value="0"/><add as="imageWidth" value="48"/><add as="imageHeight" value="48"/></add><add as="swimlane"><add as="shape" value="swimlane"/><add as="fontSize" value="12"/><add as="fontStyle" value="1"/><add as="startSize" value="23"/></add><add as="group"><add as="verticalAlign" value="top"/><add as="fillColor" value="none"/><add as="strokeColor" value="none"/><add as="gradientColor" value="none"/><add as="pointerEvents" value="0"/></add><add as="ellipse"><add as="shape" value="ellipse"/><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombus"><add as="shape" value="rhombus"/><add as="perimeter" value="rhombusPerimeter"/></add><add as="triangle"><add as="shape" value="triangle"/><add as="perimeter" value="trianglePerimeter"/></add><add as="line"><add as="shape" value="line"/><add as="strokeWidth" value="4"/><add as="labelBackgroundColor" value="#2a2a2a"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="8"/></add><add as="image"><add as="shape" value="image"/><add as="labelBackgroundColor" value="#2a2a2a"/><add as="verticalAlign" value="top"/><add as="verticalLabelPosition" value="bottom"/></add><add as="roundImage" extend="image"><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombusImage" extend="image"><add as="perimeter" value="rhombusPerimeter"/></add><add as="arrow"><add as="shape" value="arrow"/><add as="edgeStyle" value="none"/><add as="fillColor" value="#2a2a2a"/></add></mxStylesheet>').documentElement;GraphViewer=function(a,b,d){this.init(a,b,d)};mxUtils.extend(GraphViewer,mxEventSource);GraphViewer.prototype.editBlankUrl="https://app.diagrams.net/";GraphViewer.prototype.imageBaseUrl="https://viewer.diagrams.net/";GraphViewer.prototype.toolbarHeight="BackCompat"==document.compatMode?28:30;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(a,b,d){this.graphConfig=null!=d?d:{};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.lightboxEnabled=0<=mxUtils.indexOf(this.toolbarItems,"lightbox");this.lightboxClickEnabled=0!=this.graphConfig.lightbox;this.initialWidth=null!=a?a.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!=b&&(this.xmlDocument=b.ownerDocument,this.xmlNode=b,this.xml=mxUtils.getXml(b),null!=a)){var k=mxUtils.bind(this,function(){this.graph=new Graph(a);this.graph.enableFlowAnimation=!0;this.graph.defaultPageBackgroundColor="transparent";this.graph.transparentBackground=!1;if(this.responsive&&this.graph.dialect==mxConstants.DIALECT_SVG){var d=this.graph.view.getDrawPane().ownerSVGElement;
+this.pageId=this.graphConfig.pageId;this.editor=null;"inline"==this.graphConfig["toolbar-position"]&&(this.minHeight+=this.toolbarHeight);if(null!=b&&(this.xmlDocument=b.ownerDocument,this.xmlNode=b,this.xml=mxUtils.getXml(b),null!=a)){var g=mxUtils.bind(this,function(){this.graph=new Graph(a);this.graph.enableFlowAnimation=!0;this.graph.defaultPageBackgroundColor="transparent";this.graph.transparentBackground=!1;if(this.responsive&&this.graph.dialect==mxConstants.DIALECT_SVG){var d=this.graph.view.getDrawPane().ownerSVGElement;
this.graph.view.getCanvas();null!=this.graphConfig.border?d.style.padding=this.graphConfig.border+"px":""==a.style.padding&&(d.style.padding="8px");d.style.boxSizing="border-box";d.style.overflow="visible";this.graph.fit=function(){};this.graph.sizeDidChange=function(){var a=this.view.graphBounds,b=this.view.translate;d.setAttribute("viewBox",a.x+b.x-this.panDx+" "+(a.y+b.y-this.panDy)+" "+(a.width+1)+" "+(a.height+1));this.container.style.backgroundColor=d.style.backgroundColor;this.fireEvent(new mxEventObject(mxEvent.SIZE,
"bounds",a))}}this.graphConfig.move&&(this.graph.isMoveCellsEvent=function(a){return!0});this.lightboxClickEnabled&&(a.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!=b&&(this.xml=mxUtils.getXml(this.xmlNode),this.xmlDocument=this.xmlNode.ownerDocument);var c=this;this.graph.getImageFromBundles=function(a){return c.getImageUrl(a)};mxClient.IS_SVG&&this.graph.addSvgShadow(this.graph.view.canvas.ownerSVGElement,null,!0);if("mxfile"==this.xmlNode.nodeName){var e=this.xmlNode.getElementsByTagName("diagram");if(0<e.length){if(null!=this.pageId)for(var f=0;f<e.length;f++)if(this.pageId==e[f].getAttribute("id")){this.currentPage=f;break}var k=this.graph.getGlobalVariable,
-c=this;this.graph.getGlobalVariable=function(a){var b=e[c.currentPage];return"page"==a?b.getAttribute("name")||"Page-"+(c.currentPage+1):"pagenumber"==a?c.currentPage+1:"pagecount"==a?e.length:k.apply(this,arguments)}}}this.diagrams=[];var l=null;this.selectPage=function(a){this.handlingResize||(this.currentPage=mxUtils.mod(a,this.diagrams.length),this.updateGraphXml(Editor.parseDiagramNode(this.diagrams[this.currentPage])))};this.selectPageById=function(a){for(var b=!1,c=0;c<this.diagrams.length;c++)if(this.diagrams[c].getAttribute("id")==
+this.xmlNode!=b&&(this.xml=mxUtils.getXml(this.xmlNode),this.xmlDocument=this.xmlNode.ownerDocument);var c=this;this.graph.getImageFromBundles=function(a){return c.getImageUrl(a)};mxClient.IS_SVG&&this.graph.addSvgShadow(this.graph.view.canvas.ownerSVGElement,null,!0);if("mxfile"==this.xmlNode.nodeName){var e=this.xmlNode.getElementsByTagName("diagram");if(0<e.length){if(null!=this.pageId)for(var f=0;f<e.length;f++)if(this.pageId==e[f].getAttribute("id")){this.currentPage=f;break}var g=this.graph.getGlobalVariable,
+c=this;this.graph.getGlobalVariable=function(a){var b=e[c.currentPage];return"page"==a?b.getAttribute("name")||"Page-"+(c.currentPage+1):"pagenumber"==a?c.currentPage+1:"pagecount"==a?e.length:g.apply(this,arguments)}}}this.diagrams=[];var l=null;this.selectPage=function(a){this.handlingResize||(this.currentPage=mxUtils.mod(a,this.diagrams.length),this.updateGraphXml(Editor.parseDiagramNode(this.diagrams[this.currentPage])))};this.selectPageById=function(a){for(var b=!1,c=0;c<this.diagrams.length;c++)if(this.diagrams[c].getAttribute("id")==
a){this.selectPage(c);b=!0;break}return b};f=mxUtils.bind(this,function(){if(null==this.xmlNode||"mxfile"!=this.xmlNode.nodeName)this.diagrams=[];this.xmlNode!=l&&(this.diagrams=this.xmlNode.getElementsByTagName("diagram"),l=this.xmlNode)});this.addListener("xmlNodeChanged",f);f();urlParams.page=c.currentPage;f=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,f=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(a){return!mxEvent.isPopupTrigger(a.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&&a.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!=f&&this.setLayersVisible(f);
this.graph.customLinkClicked=function(a){if(Graph.isPageLink(a)){var b=a.indexOf(",");c.selectPageById(a.substring(b+1))||alert(mxResources.get("pageNotFound")||"Page not found")}else this.handleCustomLink(a);return!0};var m=this.graph.foldTreeCell;this.graph.foldTreeCell=mxUtils.bind(this,function(){this.treeCellFolded=!0;return m.apply(this.graph,arguments)});this.fireEvent(new mxEventObject("render"))});d=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;if(this.checkVisibleState&&
-0==a.offsetWidth&&"undefined"!==typeof d){var f=this.getObservableParent(a),m=new d(mxUtils.bind(this,function(b){0<a.offsetWidth&&(m.disconnect(),k())}));m.observe(f,{attributes:!0})}else k()}};GraphViewer.prototype.getObservableParent=function(a){for(a=a.parentNode;a!=document.body&&null!=a.parentNode&&"none"!==mxUtils.getCurrentStyle(a).display;)a=a.parentNode;return a};
+0==a.offsetWidth&&"undefined"!==typeof d){var f=this.getObservableParent(a),m=new d(mxUtils.bind(this,function(b){0<a.offsetWidth&&(m.disconnect(),g())}));m.observe(f,{attributes:!0})}else g()}};GraphViewer.prototype.getObservableParent=function(a){for(a=a.parentNode;a!=document.body&&null!=a.parentNode&&"none"!==mxUtils.getCurrentStyle(a).display;)a=a.parentNode;return a};
GraphViewer.prototype.getImageUrl=function(a){null!=a&&"http://"!=a.substring(0,7)&&"https://"!=a.substring(0,8)&&"data:image"!=a.substring(0,10)&&("/"==a.charAt(0)&&(a=a.substring(1,a.length)),a=this.imageBaseUrl+a);return a};GraphViewer.prototype.setXmlNode=function(a){a=this.editor.extractGraphModel(a,!0);this.xmlDocument=a.ownerDocument;this.xml=mxUtils.getXml(a);this.xmlNode=a;this.updateGraphXml(a);this.fireEvent(new mxEventObject("xmlNodeChanged"))};
GraphViewer.prototype.setFileNode=function(a){null==this.xmlNode&&(this.xmlDocument=a.ownerDocument,this.xml=mxUtils.getXml(a),this.xmlNode=a);this.setGraphXml(a)};GraphViewer.prototype.updateGraphXml=function(a){this.setGraphXml(a);this.fireEvent(new mxEventObject("graphChanged"))};
-GraphViewer.prototype.setLayersVisible=function(a){var b=!0;if(!this.autoOrigin){var d=[],k=this.graph.getModel();k.beginUpdate();try{for(var f=0;f<k.getChildCount(k.root);f++){var m=k.getChildAt(k.root,f),b=b&&k.isVisible(m);d.push(k.isVisible(m));k.setVisible(m,null!=a?a[f]:!0)}}finally{k.endUpdate()}}return b?null:d};
+GraphViewer.prototype.setLayersVisible=function(a){var b=!0;if(!this.autoOrigin){var d=[],g=this.graph.getModel();g.beginUpdate();try{for(var f=0;f<g.getChildCount(g.root);f++){var m=g.getChildAt(g.root,f),b=b&&g.isVisible(m);d.push(g.isVisible(m));g.setVisible(m,null!=a?a[f]:!0)}}finally{g.endUpdate()}}return b?null:d};
GraphViewer.prototype.setGraphXml=function(a){if(null!=this.graph){this.graph.view.translate=new mxPoint;this.graph.view.scale=1;var b=null;this.graph.getModel().beginUpdate();try{this.graph.getModel().clear(),this.editor.setGraphXml(a),b=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};b&&this.setLayersVisible(b)}};
-GraphViewer.prototype.addSizeHandler=function(){var a=this.graph.container,b=this.graph.getGraphBounds(),d=!1;a.style.overflow=1!=this.graphConfig["toolbar-nohide"]?"hidden":"visible";var k=mxUtils.bind(this,function(){if(!d){d=!0;var b=this.graph.getGraphBounds();a.style.overflow=1!=this.graphConfig["toolbar-nohide"]?b.width+2*this.graph.border>a.offsetWidth-2?"auto":"hidden":"visible";if(null!=this.toolbar&&1!=this.graphConfig["toolbar-nohide"]){var b=a.getBoundingClientRect(),e=mxUtils.getScrollOrigin(document.body),
+GraphViewer.prototype.addSizeHandler=function(){var a=this.graph.container,b=this.graph.getGraphBounds(),d=!1;a.style.overflow=1!=this.graphConfig["toolbar-nohide"]?"hidden":"visible";var g=mxUtils.bind(this,function(){if(!d){d=!0;var b=this.graph.getGraphBounds();a.style.overflow=1!=this.graphConfig["toolbar-nohide"]?b.width+2*this.graph.border>a.offsetWidth-2?"auto":"hidden":"visible";if(null!=this.toolbar&&1!=this.graphConfig["toolbar-nohide"]){var b=a.getBoundingClientRect(),e=mxUtils.getScrollOrigin(document.body),
e="relative"===document.body.style.position?document.body.getBoundingClientRect():{left:-e.x,top:-e.y},b={left:b.left-e.left,top:b.top-e.top,bottom:b.bottom-e.top,right:b.right-e.left};this.toolbar.style.left=b.left+"px";"bottom"==this.graphConfig["toolbar-position"]?this.toolbar.style.top=b.bottom-1+"px":"inline"!=this.graphConfig["toolbar-position"]?(this.toolbar.style.width=Math.max(this.minToolbarWidth,a.offsetWidth)+"px",this.toolbar.style.top=b.top+1+"px"):this.toolbar.style.top=b.top+"px"}else null!=
this.toolbar&&(this.toolbar.style.width=Math.max(this.minToolbarWidth,a.offsetWidth)+"px");this.treeCellFolded&&(this.treeCellFolded=!1,this.positionGraph(this.graph.view.translate),this.graph.initialViewState.translate=this.graph.view.translate.clone());d=!1}}),f=null;this.handlingResize=!1;this.fitGraph=mxUtils.bind(this,function(b){var c=a.offsetWidth;c==f||this.handlingResize||(this.handlingResize=!0,"auto"==a.style.overflow&&(a.style.overflow="hidden"),this.graph.maxFitScale=null!=b?b:this.graphConfig.zoom||
(this.allowZoomIn?null:1),this.graph.fit(null,null,null,null,null,!0),(this.center||0==this.graphConfig.resize&&""!=a.style.height)&&this.graph.center(),this.graph.maxFitScale=null,0==this.graphConfig.resize&&""!=a.style.height||this.updateContainerHeight(a,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},f=c,window.setTimeout(mxUtils.bind(this,function(){this.handlingResize=
-!1}),0))});GraphViewer.useResizeSensor&&(9>=document.documentMode?(mxEvent.addListener(window,"resize",k),this.graph.addListener("size",k)):new ResizeSensor(this.graph.container,k));if(this.graphConfig.resize||(this.zoomEnabled||!this.autoFit)&&0!=this.graphConfig.resize)this.graph.minimumContainerSize=new mxRectangle(0,0,this.minWidth,this.minHeight),this.graph.resizeContainer=!0;else if(!this.widthIsEmpty||""!=a.style.height&&this.autoFit||this.updateContainerWidth(a,b.width+2*this.graph.border),
-0==this.graphConfig.resize&&""!=a.style.height||this.updateContainerHeight(a,Math.max(this.minHeight,b.height+2*this.graph.border+1)),!this.zoomEnabled&&this.autoFit){var m=f=null,k=mxUtils.bind(this,function(){window.clearTimeout(m);this.handlingResize||(m=window.setTimeout(mxUtils.bind(this,this.fitGraph),100))});GraphViewer.useResizeSensor&&(9>=document.documentMode?mxEvent.addListener(window,"resize",k):new ResizeSensor(this.graph.container,k))}else 9>=document.documentMode||this.graph.addListener("size",
-k);var p=mxUtils.bind(this,function(c){var d=a.style.minWidth;this.widthIsEmpty&&(a.style.minWidth="100%");var g=null!=this.graphConfig["max-height"]?this.graphConfig["max-height"]:""!=a.style.height&&this.autoFit?a.offsetHeight:void 0;0<a.offsetWidth&&null==c&&this.allowZoomOut&&(this.allowZoomIn||b.width+2*this.graph.border>a.offsetWidth||b.height+2*this.graph.border>g)?(c=null,null!=g&&b.height+2*this.graph.border>g-2&&(c=(g-2*this.graph.border-2)/b.height),this.fitGraph(c)):this.widthIsEmpty||
+!1}),0))});GraphViewer.useResizeSensor&&(9>=document.documentMode?(mxEvent.addListener(window,"resize",g),this.graph.addListener("size",g)):new ResizeSensor(this.graph.container,g));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||""!=a.style.height&&this.autoFit||this.updateContainerWidth(a,b.width+2*this.graph.border),
+0==this.graphConfig.resize&&""!=a.style.height||this.updateContainerHeight(a,Math.max(this.minHeight,b.height+2*this.graph.border+1)),!this.zoomEnabled&&this.autoFit){var m=f=null,g=mxUtils.bind(this,function(){window.clearTimeout(m);this.handlingResize||(m=window.setTimeout(mxUtils.bind(this,this.fitGraph),100))});GraphViewer.useResizeSensor&&(9>=document.documentMode?mxEvent.addListener(window,"resize",g):new ResizeSensor(this.graph.container,g))}else 9>=document.documentMode||this.graph.addListener("size",
+g);var p=mxUtils.bind(this,function(c){var d=a.style.minWidth;this.widthIsEmpty&&(a.style.minWidth="100%");var g=null!=this.graphConfig["max-height"]?this.graphConfig["max-height"]:""!=a.style.height&&this.autoFit?a.offsetHeight:void 0;0<a.offsetWidth&&null==c&&this.allowZoomOut&&(this.allowZoomIn||b.width+2*this.graph.border>a.offsetWidth||b.height+2*this.graph.border>g)?(c=null,null!=g&&b.height+2*this.graph.border>g-2&&(c=(g-2*this.graph.border-2)/b.height),this.fitGraph(c)):this.widthIsEmpty||
null!=c||0!=this.graphConfig.resize||""==a.style.height?(c=null!=c?c:new mxPoint,this.graph.view.setTranslate(Math.floor(this.graph.border-b.x/this.graph.view.scale)+c.x,Math.floor(this.graph.border-b.y/this.graph.view.scale)+c.y),f=a.offsetWidth):this.graph.center((!this.widthIsEmpty||b.width<this.minWidth)&&1!=this.graphConfig.resize);a.style.minWidth=d});8==document.documentMode?window.setTimeout(p,0):p();this.positionGraph=function(a){b=this.graph.getGraphBounds();f=null;p(a)}};
-GraphViewer.prototype.crop=function(){var a=this.graph,b=a.getGraphBounds(),d=a.border,k=a.view.scale;a.view.setTranslate(null!=b.x?Math.floor(a.view.translate.x-b.x/k+d):d,null!=b.y?Math.floor(a.view.translate.y-b.y/k+d):d)};GraphViewer.prototype.updateContainerWidth=function(a,b){a.style.width=b+"px"};GraphViewer.prototype.updateContainerHeight=function(a,b){if(this.forceCenter||this.zoomEnabled||!this.autoFit||"BackCompat"==document.compatMode||8==document.documentMode)a.style.height=b+"px"};
-GraphViewer.prototype.showLayers=function(a,b){var d=this.graphConfig.layers,d=null!=d&&0<d.length?d.split(" "):[],k=this.graphConfig.layerIds,f=null!=k&&0<k.length,m=!1;if(0<d.length||f||null!=b){var p=null!=b?b.getModel():null,m=a.getModel();m.beginUpdate();try{var c=m.getChildCount(m.root);if(null==p){var p=!1,e={};if(f)for(var g=0;g<k.length;g++){var n=m.getCell(k[g]);null!=n&&(p=!0,e[n.id]=!0)}else for(g=0;g<d.length;g++)n=m.getChildAt(m.root,parseInt(d[g])),null!=n&&(p=!0,e[n.id]=!0);for(g=
-0;p&&g<c;g++)n=m.getChildAt(m.root,g),m.setVisible(n,e[n.id]||!1)}else for(g=0;g<c;g++)m.setVisible(m.getChildAt(m.root,g),p.isVisible(p.getChildAt(p.root,g)))}finally{m.endUpdate()}m=!0}return m};
+GraphViewer.prototype.crop=function(){var a=this.graph,b=a.getGraphBounds(),d=a.border,g=a.view.scale;a.view.setTranslate(null!=b.x?Math.floor(a.view.translate.x-b.x/g+d):d,null!=b.y?Math.floor(a.view.translate.y-b.y/g+d):d)};GraphViewer.prototype.updateContainerWidth=function(a,b){a.style.width=b+"px"};GraphViewer.prototype.updateContainerHeight=function(a,b){if(this.forceCenter||this.zoomEnabled||!this.autoFit||"BackCompat"==document.compatMode||8==document.documentMode)a.style.height=b+"px"};
+GraphViewer.prototype.showLayers=function(a,b){var d=this.graphConfig.layers,d=null!=d&&0<d.length?d.split(" "):[],g=this.graphConfig.layerIds,f=null!=g&&0<g.length,m=!1;if(0<d.length||f||null!=b){var p=null!=b?b.getModel():null,m=a.getModel();m.beginUpdate();try{var c=m.getChildCount(m.root);if(null==p){var p=!1,e={};if(f)for(var k=0;k<g.length;k++){var n=m.getCell(g[k]);null!=n&&(p=!0,e[n.id]=!0)}else for(k=0;k<d.length;k++)n=m.getChildAt(m.root,parseInt(d[k])),null!=n&&(p=!0,e[n.id]=!0);for(k=
+0;p&&k<c;k++)n=m.getChildAt(m.root,k),m.setVisible(n,e[n.id]||!1)}else for(k=0;k<c;k++)m.setVisible(m.getChildAt(m.root,k),p.isVisible(p.getChildAt(p.root,k)))}finally{m.endUpdate()}m=!0}return m};
GraphViewer.prototype.addToolbar=function(){function a(a,b,c,e){var f=document.createElement("div");f.style.borderRight="1px solid #d0d0d0";f.style.padding="3px 6px 3px 6px";mxEvent.addListener(f,"click",a);null!=c&&f.setAttribute("title",c);f.style.display="inline-block";a=document.createElement("img");a.setAttribute("border","0");a.setAttribute("src",b);null==e||e?(mxEvent.addListener(f,"mouseenter",function(){f.style.backgroundColor="#ddd"}),mxEvent.addListener(f,"mouseleave",function(){f.style.backgroundColor=
"#eee"}),mxUtils.setOpacity(a,60),f.style.cursor="pointer"):mxUtils.setOpacity(f,30);f.appendChild(a);d.appendChild(f);n++;return f}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,f=null,m=mxUtils.bind(this,function(a){null!=k&&(window.clearTimeout(k),fadeThead=null);null!=f&&(window.clearTimeout(f),fadeThead2=null);k=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(d,0);k=
-null;f=window.setTimeout(mxUtils.bind(this,function(){d.style.display="none";f=null}),100)}),a||200)}),p=mxUtils.bind(this,function(a){null!=k&&(window.clearTimeout(k),fadeThead=null);null!=f&&(window.clearTimeout(f),fadeThead2=null);d.style.display="";mxUtils.setOpacity(d,a||30)});mxEvent.addListener(this.graph.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||(p(30),m())}));mxEvent.addListener(d,mxClient.IS_POINTER?"pointermove":"mousemove",
+"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 g=null,f=null,m=mxUtils.bind(this,function(a){null!=g&&(window.clearTimeout(g),fadeThead=null);null!=f&&(window.clearTimeout(f),fadeThead2=null);g=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(d,0);g=
+null;f=window.setTimeout(mxUtils.bind(this,function(){d.style.display="none";f=null}),100)}),a||200)}),p=mxUtils.bind(this,function(a){null!=g&&(window.clearTimeout(g),fadeThead=null);null!=f&&(window.clearTimeout(f),fadeThead2=null);d.style.display="";mxUtils.setOpacity(d,a||30)});mxEvent.addListener(this.graph.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||(p(30),m())}));mxEvent.addListener(d,mxClient.IS_POINTER?"pointermove":"mousemove",
function(a){mxEvent.consume(a)});mxEvent.addListener(d,"mouseenter",mxUtils.bind(this,function(a){p(100)}));mxEvent.addListener(d,"mousemove",mxUtils.bind(this,function(a){p(100);mxEvent.consume(a)}));mxEvent.addListener(d,"mouseleave",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||p(30)}));var c=this.graph,e=c.getTolerance();c.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(a,b){this.startX=b.getGraphX();this.startY=b.getGraphY();this.scrollLeft=c.container.scrollLeft;
-this.scrollTop=c.container.scrollTop},mouseMove:function(a,b){},mouseUp:function(a,b){mxEvent.isTouchEvent(b.getEvent())&&Math.abs(this.scrollLeft-c.container.scrollLeft)<e&&Math.abs(this.scrollTop-c.container.scrollTop)<e&&Math.abs(this.startX-b.getGraphX())<e&&Math.abs(this.startY-b.getGraphY())<e&&(0<parseFloat(d.style.opacity||0)?m():p(30))}})}for(var g=this.toolbarItems,n=0,l=null,q=null,u=0;u<g.length;u++){var t=g[u];if("pages"==t){q=b.ownerDocument.createElement("div");q.style.cssText="display:inline-block;position:relative;padding:3px 4px 0 4px;vertical-align:top;font-family:Helvetica,Arial;font-size:12px;top:4px;cursor:default;";
+this.scrollTop=c.container.scrollTop},mouseMove:function(a,b){},mouseUp:function(a,b){mxEvent.isTouchEvent(b.getEvent())&&Math.abs(this.scrollLeft-c.container.scrollLeft)<e&&Math.abs(this.scrollTop-c.container.scrollTop)<e&&Math.abs(this.startX-b.getGraphX())<e&&Math.abs(this.startY-b.getGraphY())<e&&(0<parseFloat(d.style.opacity||0)?m():p(30))}})}for(var k=this.toolbarItems,n=0,l=null,q=null,u=0;u<k.length;u++){var t=k[u];if("pages"==t){q=b.ownerDocument.createElement("div");q.style.cssText="display:inline-block;position:relative;padding:3px 4px 0 4px;vertical-align:top;font-family:Helvetica,Arial;font-size:12px;top:4px;cursor:default;";
mxUtils.setOpacity(q,70);var A=a(mxUtils.bind(this,function(){this.selectPage(this.currentPage-1)}),Editor.previousImage,mxResources.get("previousPage")||"Previous Page");A.style.borderRightStyle="none";A.style.paddingLeft="0px";A.style.paddingRight="0px";d.appendChild(q);var x=a(mxUtils.bind(this,function(){this.selectPage(this.currentPage+1)}),Editor.nextImage,mxResources.get("nextPage")||"Next Page");x.style.paddingLeft="0px";x.style.paddingRight="0px";t=mxUtils.bind(this,function(){q.innerHTML=
"";mxUtils.write(q,this.currentPage+1+" / "+this.diagrams.length);q.style.display=1<this.diagrams.length?"inline-block":"none";A.style.display=q.style.display;x.style.display=q.style.display});this.addListener("graphChanged",t);t()}else if("zoom"==t)this.zoomEnabled&&(a(mxUtils.bind(this,function(){this.graph.zoomOut()}),Editor.zoomOutImage,mxResources.get("zoomOut")||"Zoom Out"),a(mxUtils.bind(this,function(){this.graph.zoomIn()}),Editor.zoomInImage,mxResources.get("zoomIn")||"Zoom In"),a(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"==t){if(this.layersEnabled){var G=this.graph.getModel(),z=a(mxUtils.bind(this,function(a){if(null!=l)l.parentNode.removeChild(l),l=null;else{l=this.graph.createLayersDialog(mxUtils.bind(this,function(){if(this.autoCrop)this.crop();else if(this.autoOrigin){var a=this.graph.getGraphBounds(),
b=this.graph.view;0>a.x||0>a.y?(this.crop(),this.graph.originalViewState=this.graph.initialViewState,this.graph.initialViewState={translate:b.translate.clone(),scale:b.scale}):null!=this.graph.originalViewState&&0<a.x/b.scale+this.graph.originalViewState.translate.x-b.translate.x&&0<a.y/b.scale+this.graph.originalViewState.translate.y-b.translate.y&&(b.setTranslate(this.graph.originalViewState.translate.x,this.graph.originalViewState.translate.y),this.graph.originalViewState=null,this.graph.initialViewState=
{translate:b.translate.clone(),scale:b.scale})}}));mxEvent.addListener(l,"mouseleave",function(){l.parentNode.removeChild(l);l=null});a=z.getBoundingClientRect();l.style.width="140px";l.style.padding="2px 0px 2px 0px";l.style.border="1px solid #d0d0d0";l.style.backgroundColor="#eee";l.style.fontFamily="Helvetica Neue,Helvetica,Arial Unicode MS,Arial";l.style.fontSize="11px";l.style.zIndex=this.toolbarZIndex+1;mxUtils.setOpacity(l,80);var b=mxUtils.getDocumentScrollOrigin(document);l.style.left=b.x+
a.left-1+"px";l.style.top=b.y+a.bottom-2+"px";document.body.appendChild(l)}}),Editor.layersImage,mxResources.get("layers")||"Layers");G.addListener(mxEvent.CHANGE,function(){z.style.display=1<G.getChildCount(G.root)?"inline-block":"none"});z.style.display=1<G.getChildCount(G.root)?"inline-block":"none"}}else"lightbox"==t?this.lightboxEnabled&&a(mxUtils.bind(this,function(){this.showLightbox()}),Editor.maximizeImage,mxResources.get("show")||"Show"):null!=this.graphConfig["toolbar-buttons"]&&(t=this.graphConfig["toolbar-buttons"][t],
-null!=t&&(t.elem=a(null==t.enabled||t.enabled?t.handler:function(){},t.image,t.title,t.enabled)))}null!=this.graph.minimumContainerSize&&(this.graph.minimumContainerSize.width=34*n);null!=this.graphConfig.title&&(g=b.ownerDocument.createElement("div"),g.style.cssText="display:inline-block;position:relative;padding:3px 6px 0 6px;vertical-align:top;font-family:Helvetica,Arial;font-size:12px;top:4px;cursor:default;",g.setAttribute("title",this.graphConfig.title),mxUtils.write(g,this.graphConfig.title),
-mxUtils.setOpacity(g,70),d.appendChild(g),this.filename=g);this.minToolbarWidth=34*n;var E=b.style.border,H=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 a=b.getBoundingClientRect(),c=mxUtils.getScrollOrigin(document.body),c="relative"===document.body.style.position?document.body.getBoundingClientRect():{left:-c.x,top:-c.y},
+null!=t&&(t.elem=a(null==t.enabled||t.enabled?t.handler:function(){},t.image,t.title,t.enabled)))}null!=this.graph.minimumContainerSize&&(this.graph.minimumContainerSize.width=34*n);null!=this.graphConfig.title&&(k=b.ownerDocument.createElement("div"),k.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;",k.setAttribute("title",this.graphConfig.title),mxUtils.write(k,this.graphConfig.title),
+mxUtils.setOpacity(k,70),d.appendChild(k),this.filename=k);this.minToolbarWidth=34*n;var E=b.style.border,H=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 a=b.getBoundingClientRect(),c=mxUtils.getScrollOrigin(document.body),c="relative"===document.body.style.position?document.body.getBoundingClientRect():{left:-c.x,top:-c.y},
a={left:a.left-c.left,top:a.top-c.top,bottom:a.bottom-c.top,right:a.right-c.left};d.style.left=a.left+"px";"bottom"==this.graphConfig["toolbar-position"]?d.style.top=a.bottom-1+"px":"inline"!=this.graphConfig["toolbar-position"]?(d.style.marginTop=-this.toolbarHeight+"px",d.style.top=a.top+1+"px"):d.style.top=a.top+"px";"1px solid transparent"==E&&(b.style.border="1px solid #d0d0d0");document.body.appendChild(d);var e=mxUtils.bind(this,function(){null!=d.parentNode&&d.parentNode.removeChild(d);null!=
l&&(l.parentNode.removeChild(l),l=null);b.style.border=E});mxEvent.addListener(document,"mousemove",function(a){for(a=mxEvent.getSource(a);null!=a;){if(a==b||a==d||a==l)return;a=a.parentNode}e()});mxEvent.addListener(document.body,"mouseleave",function(a){e()})}else d.style.top=-this.toolbarHeight+"px",b.appendChild(d)});1!=this.graphConfig["toolbar-nohide"]?mxEvent.addListener(b,"mouseenter",H):H();this.responsive&&"undefined"!==typeof ResizeObserver&&(new ResizeObserver(function(){null!=d.parentNode&&
H()})).observe(b)};GraphViewer.prototype.disableButton=function(a){var b=this.graphConfig["toolbar-buttons"][a];null!=b&&(mxUtils.setOpacity(b.elem,30),mxEvent.removeListener(b.elem,"click",b.handler),mxEvent.addListener(b.elem,"mouseenter",function(){b.elem.style.backgroundColor="#eee"}))};
-GraphViewer.prototype.addClickHandler=function(a,b){a.linkPolicy=this.graphConfig.target||a.linkPolicy;a.addClickHandler(this.graphConfig.highlight,mxUtils.bind(this,function(d,k){if(null==k)for(var f=mxEvent.getSource(d);f!=a.container&&null!=f&&null==k;)"a"==f.nodeName.toLowerCase()&&(k=f.getAttribute("href")),f=f.parentNode;null!=b?null==k||a.isCustomLink(k)?mxEvent.consume(d):a.isExternalProtocol(k)||a.isBlankLink(k)||window.setTimeout(function(){b.destroy()},0):null!=k&&null==b&&a.isCustomLink(k)&&
-(mxEvent.isTouchEvent(d)||!mxEvent.isPopupTrigger(d))&&a.customLinkClicked(k)&&(mxUtils.clearSelection(),mxEvent.consume(d))}),mxUtils.bind(this,function(a){null!=b||!this.lightboxClickEnabled||mxEvent.isTouchEvent(a)&&0!=this.toolbarItems.length||this.showLightbox()}))};
+GraphViewer.prototype.addClickHandler=function(a,b){a.linkPolicy=this.graphConfig.target||a.linkPolicy;a.addClickHandler(this.graphConfig.highlight,mxUtils.bind(this,function(d,g){if(null==g)for(var f=mxEvent.getSource(d);f!=a.container&&null!=f&&null==g;)"a"==f.nodeName.toLowerCase()&&(g=f.getAttribute("href")),f=f.parentNode;null!=b?null==g||a.isCustomLink(g)?mxEvent.consume(d):a.isExternalProtocol(g)||a.isBlankLink(g)||window.setTimeout(function(){b.destroy()},0):null!=g&&null==b&&a.isCustomLink(g)&&
+(mxEvent.isTouchEvent(d)||!mxEvent.isPopupTrigger(d))&&a.customLinkClicked(g)&&(mxUtils.clearSelection(),mxEvent.consume(d))}),mxUtils.bind(this,function(a){null!=b||!this.lightboxClickEnabled||mxEvent.isTouchEvent(a)&&0!=this.toolbarItems.length||this.showLightbox()}))};
GraphViewer.prototype.showLightbox=function(a,b,d){if("open"==this.graphConfig.lightbox||window.self!==window.top)if(null==this.lightboxWindow||this.lightboxWindow.closed){a=null!=a?a:null!=this.graphConfig.editable?this.graphConfig.editable:!0;d={client:1,target:null!=d?d:"blank"};a&&(d.edit=this.graphConfig.edit||"_blank");if(null!=b?b:1)d.close=1;this.layersEnabled&&(d.layers=1);null!=this.graphConfig&&0!=this.graphConfig.nav&&(d.nav=1);null!=this.graphConfig&&null!=this.graphConfig.highlight&&
(d.highlight=this.graphConfig.highlight.substring(1));null!=this.currentPage&&0<this.currentPage&&(d.page=this.currentPage);"undefined"!==typeof window.postMessage&&(null==document.documentMode||10<=document.documentMode)?null==this.lightboxWindow&&mxEvent.addListener(window,"message",mxUtils.bind(this,function(a){"ready"==a.data&&a.source==this.lightboxWindow&&this.lightboxWindow.postMessage(this.xml,"*")})):d.data=encodeURIComponent(this.xml);"1"==urlParams.dev&&(d.dev="1");this.lightboxWindow=
window.open(("1"!=urlParams.dev?EditorUi.lightboxHost:"https://test.draw.io")+"/#P"+encodeURIComponent(JSON.stringify(d)))}else this.lightboxWindow.focus();else this.showLocalLightbox()};
GraphViewer.prototype.showLocalLightbox=function(){mxUtils.getDocumentScrollOrigin(document);var a=document.createElement("div");a.style.cssText="position:fixed;top:0;left:0;bottom:0;right:0;";a.style.zIndex=this.lightboxZIndex;a.style.backgroundColor="#000000";mxUtils.setOpacity(a,70);document.body.appendChild(a);var b=document.createElement("img");b.setAttribute("border","0");b.setAttribute("src",Editor.closeImage);b.style.cssText="position:fixed;top:32px;right:32px;";b.style.cursor="pointer";mxEvent.addListener(b,
-"click",function(){k.destroy()});urlParams.pages="1";urlParams.page=this.currentPage;urlParams["page-id"]=this.graphConfig.pageId;urlParams["layer-ids"]=null!=this.graphConfig.layerIds&&0<this.graphConfig.layerIds.length?this.graphConfig.layerIds.join(" "):null;urlParams.nav=0!=this.graphConfig.nav?"1":"0";urlParams.layers=this.layersEnabled?"1":"0";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 d=Graph.prototype.shadowId;Graph.prototype.shadowId="lightboxDropShadow";var k=new EditorUi(new Editor(!0),document.createElement("div"),!0);k.editor.editBlankUrl=this.editBlankUrl;k.editor.graph.shadowId="lightboxDropShadow";Graph.prototype.shadowId=d;k.refresh=function(){};var f=mxUtils.bind(this,function(a){27==a.keyCode&&k.destroy()}),
-m=k.destroy;k.destroy=function(){mxEvent.removeListener(document.documentElement,"keydown",f);document.body.removeChild(a);document.body.removeChild(b);document.body.style.overflow="auto";GraphViewer.resizeSensorEnabled=!0;m.apply(this,arguments)};var p=k.editor.graph,c=p.container;c.style.overflow="hidden";this.lightboxChrome?(c.style.border="1px solid #c0c0c0",c.style.margin="40px",mxEvent.addListener(document.documentElement,"keydown",f)):(a.style.display="none",b.style.display="none");var e=this;
-p.getImageFromBundles=function(a){return e.getImageUrl(a)};var g=k.createTemporaryGraph;k.createTemporaryGraph=function(){var a=g.apply(this,arguments);a.getImageFromBundles=function(a){return e.getImageUrl(a)};return a};this.graphConfig.move&&(p.isMoveCellsEvent=function(a){return!0});mxUtils.setPrefixedStyle(c.style,"border-radius","4px");c.style.position="fixed";GraphViewer.resizeSensorEnabled=!1;document.body.style.overflow="hidden";mxClient.IS_SF||mxClient.IS_EDGE||(mxUtils.setPrefixedStyle(c.style,
-"transform","rotateY(90deg)"),mxUtils.setPrefixedStyle(c.style,"transition","all .25s ease-in-out"));this.addClickHandler(p,k);window.setTimeout(mxUtils.bind(this,function(){c.style.outline="none";c.style.zIndex=this.lightboxZIndex;b.style.zIndex=this.lightboxZIndex;document.body.appendChild(c);document.body.appendChild(b);k.setFileData(this.xml);mxUtils.setPrefixedStyle(c.style,"transform","rotateY(0deg)");k.chromelessToolbar.style.bottom="60px";k.chromelessToolbar.style.zIndex=this.lightboxZIndex;
-document.body.appendChild(k.chromelessToolbar);k.getEditBlankXml=mxUtils.bind(this,function(){return this.xml});k.lightboxFit();k.chromelessResize();this.showLayers(p,this.graph);mxEvent.addListener(a,"click",function(){k.destroy()})}),0);return k};
+"click",function(){g.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";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 d=Graph.prototype.shadowId;Graph.prototype.shadowId="lightboxDropShadow";var g=new EditorUi(new Editor(!0),document.createElement("div"),!0);g.editor.editBlankUrl=this.editBlankUrl;g.editor.graph.shadowId="lightboxDropShadow";Graph.prototype.shadowId=d;g.refresh=function(){};var f=mxUtils.bind(this,function(a){27==a.keyCode&&g.destroy()}),
+m=g.destroy;g.destroy=function(){mxEvent.removeListener(document.documentElement,"keydown",f);document.body.removeChild(a);document.body.removeChild(b);document.body.style.overflow="auto";GraphViewer.resizeSensorEnabled=!0;m.apply(this,arguments)};var p=g.editor.graph,c=p.container;c.style.overflow="hidden";this.lightboxChrome?(c.style.border="1px solid #c0c0c0",c.style.margin="40px",mxEvent.addListener(document.documentElement,"keydown",f)):(a.style.display="none",b.style.display="none");var e=this;
+p.getImageFromBundles=function(a){return e.getImageUrl(a)};var k=g.createTemporaryGraph;g.createTemporaryGraph=function(){var a=k.apply(this,arguments);a.getImageFromBundles=function(a){return e.getImageUrl(a)};return a};this.graphConfig.move&&(p.isMoveCellsEvent=function(a){return!0});mxUtils.setPrefixedStyle(c.style,"border-radius","4px");c.style.position="fixed";GraphViewer.resizeSensorEnabled=!1;document.body.style.overflow="hidden";mxClient.IS_SF||mxClient.IS_EDGE||(mxUtils.setPrefixedStyle(c.style,
+"transform","rotateY(90deg)"),mxUtils.setPrefixedStyle(c.style,"transition","all .25s ease-in-out"));this.addClickHandler(p,g);window.setTimeout(mxUtils.bind(this,function(){c.style.outline="none";c.style.zIndex=this.lightboxZIndex;b.style.zIndex=this.lightboxZIndex;document.body.appendChild(c);document.body.appendChild(b);g.setFileData(this.xml);mxUtils.setPrefixedStyle(c.style,"transform","rotateY(0deg)");g.chromelessToolbar.style.bottom="60px";g.chromelessToolbar.style.zIndex=this.lightboxZIndex;
+document.body.appendChild(g.chromelessToolbar);g.getEditBlankXml=mxUtils.bind(this,function(){return this.xml});g.lightboxFit();g.chromelessResize();this.showLayers(p,this.graph);mxEvent.addListener(a,"click",function(){g.destroy()})}),0);return g};
GraphViewer.prototype.updateTitle=function(a){a=a||"";this.showTitleAsTooltip&&null!=this.graph&&null!=this.graph.container&&this.graph.container.setAttribute("title",a);null!=this.filename&&(this.filename.innerHTML="",mxUtils.write(this.filename,a),this.filename.setAttribute("title",a))};
GraphViewer.processElements=function(a){mxUtils.forEach(GraphViewer.getElementsByClassName(a||"mxgraph"),function(a){try{a.innerHTML="",GraphViewer.createViewerForElement(a)}catch(d){a.innerHTML=d.message,null!=window.console&&console.error(d)}})};
-GraphViewer.getElementsByClassName=function(a){if(document.getElementsByClassName){var b=document.getElementsByClassName(a);a=[];for(var d=0;d<b.length;d++)a.push(b[d]);return a}for(var k=document.getElementsByTagName("*"),b=[],d=0;d<k.length;d++){var f=k[d].className;null!=f&&0<f.length&&(f=f.split(" "),0<=mxUtils.indexOf(f,a)&&b.push(k[d]))}return b};
-GraphViewer.createViewerForElement=function(a,b){var d=a.getAttribute("data-mxgraph");if(null!=d){var k=JSON.parse(d),f=function(d){d=mxUtils.parseXml(d);d=new GraphViewer(a,d.documentElement,k);null!=b&&b(d)};null!=k.url?GraphViewer.getUrl(k.url,function(a){f(a)}):f(k.xml)}};
+GraphViewer.getElementsByClassName=function(a){if(document.getElementsByClassName){var b=document.getElementsByClassName(a);a=[];for(var d=0;d<b.length;d++)a.push(b[d]);return a}for(var g=document.getElementsByTagName("*"),b=[],d=0;d<g.length;d++){var f=g[d].className;null!=f&&0<f.length&&(f=f.split(" "),0<=mxUtils.indexOf(f,a)&&b.push(g[d]))}return b};
+GraphViewer.createViewerForElement=function(a,b){var d=a.getAttribute("data-mxgraph");if(null!=d){var g=JSON.parse(d),f=function(d){d=mxUtils.parseXml(d);d=new GraphViewer(a,d.documentElement,g);null!=b&&b(d)};null!=g.url?GraphViewer.getUrl(g.url,function(a){f(a)}):f(g.xml)}};
GraphViewer.initCss=function(){try{var a=document.createElement("style");a.type="text/css";a.innerHTML="div.mxTooltip {\n-webkit-box-shadow: 3px 3px 12px #C0C0C0;\n-moz-box-shadow: 3px 3px 12px #C0C0C0;\nbox-shadow: 3px 3px 12px #C0C0C0;\nbackground: #FFFFCC;\nborder-style: solid;\nborder-width: 1px;\nborder-color: black;\nfont-family: Arial;\nfont-size: 8pt;\nposition: absolute;\ncursor: default;\npadding: 4px;\ncolor: black;}\ntd.mxPopupMenuIcon div {\nwidth:16px;\nheight:16px;}\nhtml div.mxPopupMenu {\n-webkit-box-shadow:2px 2px 3px #d5d5d5;\n-moz-box-shadow:2px 2px 3px #d5d5d5;\nbox-shadow:2px 2px 3px #d5d5d5;\n_filter:progid:DXImageTransform.Microsoft.DropShadow(OffX=2, OffY=2, Color='#d0d0d0',Positive='true');\nbackground:white;\nposition:absolute;\nborder:3px solid #e7e7e7;\npadding:3px;}\nhtml table.mxPopupMenu {\nborder-collapse:collapse;\nmargin:0px;}\nhtml td.mxPopupMenuItem {\npadding:7px 30px 7px 30px;\nfont-family:Helvetica Neue,Helvetica,Arial Unicode MS,Arial;\nfont-size:10pt;}\nhtml td.mxPopupMenuIcon {\nbackground-color:white;\npadding:0px;}\ntd.mxPopupMenuIcon .geIcon {\npadding:2px;\npadding-bottom:4px;\nmargin:2px;\nborder:1px solid transparent;\nopacity:0.5;\n_width:26px;\n_height:26px;}\ntd.mxPopupMenuIcon .geIcon:hover {\nborder:1px solid gray;\nborder-radius:2px;\nopacity:1;}\nhtml tr.mxPopupMenuItemHover {\nbackground-color: #eeeeee;\ncolor: black;}\ntable.mxPopupMenu hr {\ncolor:#cccccc;\nbackground-color:#cccccc;\nborder:none;\nheight:1px;}\ntable.mxPopupMenu tr {\tfont-size:4pt;}\n.geDialog { font-family:Helvetica Neue,Helvetica,Arial Unicode MS,Arial;\nfont-size:10pt;\nborder:none;\nmargin:0px;}\n.geDialog {\tposition:absolute;\tbackground:white;\toverflow:hidden;\tpadding:30px;\tborder:1px solid #acacac;\t-webkit-box-shadow:0px 0px 2px 2px #d5d5d5;\t-moz-box-shadow:0px 0px 2px 2px #d5d5d5;\tbox-shadow:0px 0px 2px 2px #d5d5d5;\t_filter:progid:DXImageTransform.Microsoft.DropShadow(OffX=2, OffY=2, Color='#d5d5d5', Positive='true');\tz-index: 2;}.geDialogClose {\tposition:absolute;\twidth:9px;\theight:9px;\topacity:0.5;\tcursor:pointer;\t_filter:alpha(opacity=50);}.geDialogClose:hover {\topacity:1;}.geDialogTitle {\tbox-sizing:border-box;\twhite-space:nowrap;\tbackground:rgb(229, 229, 229);\tborder-bottom:1px solid rgb(192, 192, 192);\tfont-size:15px;\tfont-weight:bold;\ttext-align:center;\tcolor:rgb(35, 86, 149);}.geDialogFooter {\tbackground:whiteSmoke;\twhite-space:nowrap;\ttext-align:right;\tbox-sizing:border-box;\tborder-top:1px solid #e5e5e5;\tcolor:darkGray;}\n.geBtn {\tbackground-color: #f5f5f5;\tborder-radius: 2px;\tborder: 1px solid #d8d8d8;\tcolor: #333;\tcursor: default;\tfont-size: 11px;\tfont-weight: bold;\theight: 29px;\tline-height: 27px;\tmargin: 0 0 0 8px;\tmin-width: 72px;\toutline: 0;\tpadding: 0 8px;\tcursor: pointer;}.geBtn:hover, .geBtn:focus {\t-webkit-box-shadow: 0px 1px 1px rgba(0,0,0,0.1);\t-moz-box-shadow: 0px 1px 1px rgba(0,0,0,0.1);\tbox-shadow: 0px 1px 1px rgba(0,0,0,0.1);\tborder: 1px solid #c6c6c6;\tbackground-color: #f8f8f8;\tbackground-image: linear-gradient(#f8f8f8 0px,#f1f1f1 100%);\tcolor: #111;}.geBtn:disabled {\topacity: .5;}.gePrimaryBtn {\tbackground-color: #4d90fe;\tbackground-image: linear-gradient(#4d90fe 0px,#4787ed 100%);\tborder: 1px solid #3079ed;\tcolor: #fff;}.gePrimaryBtn:hover, .gePrimaryBtn:focus {\tbackground-color: #357ae8;\tbackground-image: linear-gradient(#4d90fe 0px,#357ae8 100%);\tborder: 1px solid #2f5bb7;\tcolor: #fff;}.gePrimaryBtn:disabled {\topacity: .5;}";document.getElementsByTagName("head")[0].appendChild(a)}catch(b){}};
-GraphViewer.cachedUrls={};GraphViewer.getUrl=function(a,b,d){if(null!=GraphViewer.cachedUrls[a])b(GraphViewer.cachedUrls[a]);else{var k=null!=navigator.userAgent&&0<navigator.userAgent.indexOf("MSIE 9")?new XDomainRequest:new XMLHttpRequest;k.open("GET",a);k.onload=function(){b(null!=k.getText?k.getText():k.responseText)};k.onerror=d;k.send()}};GraphViewer.resizeSensorEnabled=!0;GraphViewer.useResizeSensor=!0;
-(function(){var a=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||function(a){return window.setTimeout(a,20)},b=function(d,k){function f(){this.q=[];this.add=function(a){this.q.push(a)};var a,b;this.call=function(){a=0;for(b=this.q.length;a<b;a++)this.q[a].call()}}function m(a,b){return a.currentStyle?a.currentStyle[b]:window.getComputedStyle?window.getComputedStyle(a,null).getPropertyValue(b):a.style[b]}function p(b,c){if(!b.resizedAttached)b.resizedAttached=
+GraphViewer.cachedUrls={};GraphViewer.getUrl=function(a,b,d){if(null!=GraphViewer.cachedUrls[a])b(GraphViewer.cachedUrls[a]);else{var g=null!=navigator.userAgent&&0<navigator.userAgent.indexOf("MSIE 9")?new XDomainRequest:new XMLHttpRequest;g.open("GET",a);g.onload=function(){b(null!=g.getText?g.getText():g.responseText)};g.onerror=d;g.send()}};GraphViewer.resizeSensorEnabled=!0;GraphViewer.useResizeSensor=!0;
+(function(){var a=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||function(a){return window.setTimeout(a,20)},b=function(d,g){function f(){this.q=[];this.add=function(a){this.q.push(a)};var a,b;this.call=function(){a=0;for(b=this.q.length;a<b;a++)this.q[a].call()}}function m(a,b){return a.currentStyle?a.currentStyle[b]:window.getComputedStyle?window.getComputedStyle(a,null).getPropertyValue(b):a.style[b]}function p(b,c){if(!b.resizedAttached)b.resizedAttached=
new f,b.resizedAttached.add(c);else if(b.resizedAttached){b.resizedAttached.add(c);return}b.resizeSensor=document.createElement("div");b.resizeSensor.className="resize-sensor";b.resizeSensor.style.cssText="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;";b.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>';
-b.appendChild(b.resizeSensor);"static"==m(b,"position")&&(b.style.position="relative");var d=b.resizeSensor.childNodes[0],e=d.childNodes[0],g=b.resizeSensor.childNodes[1],k=function(){e.style.width="100000px";e.style.height="100000px";d.scrollLeft=1E5;d.scrollTop=1E5;g.scrollLeft=1E5;g.scrollTop=1E5};k();var l=!1,n=function(){b.resizedAttached&&(l&&(b.resizedAttached.call(),l=!1),a(n))};a(n);var p,q,K,F,I=function(){if((K=b.offsetWidth)!=p||(F=b.offsetHeight)!=q)l=!0,p=K,q=F;k()},C=function(a,b,c){a.attachEvent?
-a.attachEvent("on"+b,c):a.addEventListener(b,c)};C(d,"scroll",I);C(g,"scroll",I)}var c=function(){GraphViewer.resizeSensorEnabled&&k()},e=Object.prototype.toString.call(d),g="[object Array]"===e||"[object NodeList]"===e||"[object HTMLCollection]"===e||"undefined"!==typeof jQuery&&d instanceof jQuery||"undefined"!==typeof Elements&&d instanceof Elements;if(g)for(var e=0,n=d.length;e<n;e++)p(d[e],c);else p(d,c);this.detach=function(){if(g)for(var a=0,c=d.length;a<c;a++)b.detach(d[a]);else b.detach(d)}};
+b.appendChild(b.resizeSensor);"static"==m(b,"position")&&(b.style.position="relative");var d=b.resizeSensor.childNodes[0],e=d.childNodes[0],g=b.resizeSensor.childNodes[1],k=function(){e.style.width="100000px";e.style.height="100000px";d.scrollLeft=1E5;d.scrollTop=1E5;g.scrollLeft=1E5;g.scrollTop=1E5};k();var l=!1,n=function(){b.resizedAttached&&(l&&(b.resizedAttached.call(),l=!1),a(n))};a(n);var p,q,K,F,I=function(){if((K=b.offsetWidth)!=p||(F=b.offsetHeight)!=q)l=!0,p=K,q=F;k()},D=function(a,b,c){a.attachEvent?
+a.attachEvent("on"+b,c):a.addEventListener(b,c)};D(d,"scroll",I);D(g,"scroll",I)}var c=function(){GraphViewer.resizeSensorEnabled&&g()},e=Object.prototype.toString.call(d),k="[object Array]"===e||"[object NodeList]"===e||"[object HTMLCollection]"===e||"undefined"!==typeof jQuery&&d instanceof jQuery||"undefined"!==typeof Elements&&d instanceof Elements;if(k)for(var e=0,n=d.length;e<n;e++)p(d[e],c);else p(d,c);this.detach=function(){if(k)for(var a=0,c=d.length;a<c;a++)b.detach(d[a]);else b.detach(d)}};
b.detach=function(a){a.resizeSensor&&(a.removeChild(a.resizeSensor),delete a.resizeSensor,delete a.resizedAttached)};window.ResizeSensor=b})();
function mxBpmnShape(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxBpmnShape,mxShape);
mxBpmnShape.prototype.customProperties=[{name:"symbol",dispName:"Event",type:"enum",defVal:"general",enumList:[{val:"general",dispName:"General"},{val:"message",dispName:"Message"},{val:"timer",dispName:"Timer"},{val:"escalation",dispName:"Escalation"},{val:"conditional",dispName:"Conditional"},{val:"link",dispName:"Link"},{val:"error",dispName:"Error"},{val:"cancel",dispName:"Cancel"},{val:"compensation",dispName:"Compensation"},{val:"signal",dispName:"Signal"},{val:"multiple",dispName:"Multiple"},
diff --git a/src/main/webapp/js/viewer.min.js b/src/main/webapp/js/viewer.min.js
index e570e8a8..3a037b1d 100644
--- a/src/main/webapp/js/viewer.min.js
+++ b/src/main/webapp/js/viewer.min.js
@@ -200,7 +200,7 @@ null!=a&&(DRAWIO_GITLAB_ID=a);window.DRAWIO_LOG_URL=window.DRAWIO_LOG_URL||"";a=
if("1"==urlParams.offline||"1"==urlParams.demo||"1"==urlParams.stealth||"1"==urlParams.local||"1"==urlParams.lockdown)urlParams.picker="0",urlParams.gapi="0",urlParams.db="0",urlParams.od="0",urlParams.gh="0",urlParams.gl="0",urlParams.tr="0";
"se.diagrams.net"==window.location.hostname&&(urlParams.db="0",urlParams.od="0",urlParams.gh="0",urlParams.gl="0",urlParams.tr="0",urlParams.plugins="0",urlParams.mode="google",urlParams.lockdown="1",window.DRAWIO_GOOGLE_APP_ID=window.DRAWIO_GOOGLE_APP_ID||"184079235871",window.DRAWIO_GOOGLE_CLIENT_ID=window.DRAWIO_GOOGLE_CLIENT_ID||"184079235871-pjf5nn0lff27lk8qf0770gmffiv9gt61.apps.googleusercontent.com");"trello"==urlParams.mode&&(urlParams.tr="1");
"embed.diagrams.net"==window.location.hostname&&(urlParams.embed="1");(null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.open&&(window.location.hash=urlParams.open);window.urlParams=window.urlParams||{};window.MAX_REQUEST_SIZE=window.MAX_REQUEST_SIZE||10485760;window.MAX_AREA=window.MAX_AREA||225E6;window.EXPORT_URL=window.EXPORT_URL||"/export";window.SAVE_URL=window.SAVE_URL||"/save";window.OPEN_URL=window.OPEN_URL||"/open";window.RESOURCES_PATH=window.RESOURCES_PATH||"resources";window.RESOURCE_BASE=window.RESOURCE_BASE||window.RESOURCES_PATH+"/grapheditor";window.STENCIL_PATH=window.STENCIL_PATH||"stencils";window.IMAGE_PATH=window.IMAGE_PATH||"images";
-window.STYLE_PATH=window.STYLE_PATH||"styles";window.CSS_PATH=window.CSS_PATH||"styles";window.OPEN_FORM=window.OPEN_FORM||"open.html";window.mxBasePath=window.mxBasePath||"mxgraph";window.mxImageBasePath=window.mxImageBasePath||"mxgraph/images";window.mxLanguage=window.mxLanguage||urlParams.lang;window.mxLanguages=window.mxLanguages||["de","se"];var mxClient={VERSION:"15.0.3",IS_IE:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE"),IS_IE11:null!=navigator.userAgent&&!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:null!=navigator.userAgent&&!!navigator.userAgent.match(/Edge\//),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&0>navigator.userAgent.indexOf("Edge/"),
+window.STYLE_PATH=window.STYLE_PATH||"styles";window.CSS_PATH=window.CSS_PATH||"styles";window.OPEN_FORM=window.OPEN_FORM||"open.html";window.mxBasePath=window.mxBasePath||"mxgraph";window.mxImageBasePath=window.mxImageBasePath||"mxgraph/images";window.mxLanguage=window.mxLanguage||urlParams.lang;window.mxLanguages=window.mxLanguages||["de","se"];var mxClient={VERSION:"15.0.4",IS_IE:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE"),IS_IE11:null!=navigator.userAgent&&!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:null!=navigator.userAgent&&!!navigator.userAgent.match(/Edge\//),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&0>navigator.userAgent.indexOf("Edge/"),
IS_OP:null!=navigator.userAgent&&(0<=navigator.userAgent.indexOf("Opera/")||0<=navigator.userAgent.indexOf("OPR/")),IS_OT:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Presto/")&&0>navigator.userAgent.indexOf("Presto/2.4.")&&0>navigator.userAgent.indexOf("Presto/2.3.")&&0>navigator.userAgent.indexOf("Presto/2.2.")&&0>navigator.userAgent.indexOf("Presto/2.1.")&&0>navigator.userAgent.indexOf("Presto/2.0.")&&0>navigator.userAgent.indexOf("Presto/1."),IS_SF:/Apple Computer, Inc/.test(navigator.vendor),
IS_ANDROID:0<=navigator.appVersion.indexOf("Android"),IS_IOS:/iP(hone|od|ad)/.test(navigator.platform),IS_GC:/Google Inc/.test(navigator.vendor),IS_CHROMEAPP:null!=window.chrome&&null!=chrome.app&&null!=chrome.app.runtime,IS_FF:"undefined"!==typeof InstallTrigger,IS_MT:0<=navigator.userAgent.indexOf("Firefox/")&&0>navigator.userAgent.indexOf("Firefox/1.")&&0>navigator.userAgent.indexOf("Firefox/2.")||0<=navigator.userAgent.indexOf("Iceweasel/")&&0>navigator.userAgent.indexOf("Iceweasel/1.")&&0>navigator.userAgent.indexOf("Iceweasel/2.")||
0<=navigator.userAgent.indexOf("SeaMonkey/")&&0>navigator.userAgent.indexOf("SeaMonkey/1.")||0<=navigator.userAgent.indexOf("Iceape/")&&0>navigator.userAgent.indexOf("Iceape/1."),IS_SVG:"MICROSOFT INTERNET EXPLORER"!=navigator.appName.toUpperCase(),NO_FO:!document.createElementNS||"[object SVGForeignObjectElement]"!=document.createElementNS("http://www.w3.org/2000/svg","foreignObject")||0<=navigator.userAgent.indexOf("Opera/"),IS_WIN:0<navigator.appVersion.indexOf("Win"),IS_MAC:0<navigator.appVersion.indexOf("Mac"),
@@ -1036,7 +1036,7 @@ q=g.isEventsEnabled();g.setEventsEnabled(!1);var r=this.graph.isEnabled();this.g
null;try{var B=[this.getRoot()];a=new mxTemporaryCellStates(g,c,B,null,mxUtils.bind(this,function(a){return this.getLinkForCellState(a)}))}finally{if(mxClient.IS_IE)g.overlayPane.innerHTML="",g.canvas.style.overflow="hidden",g.canvas.style.position="relative",g.canvas.style.top=this.marginTop+"px",g.canvas.style.width=f.width+"px",g.canvas.style.height=f.height+"px";else for(c=e.firstChild;null!=c;)B=c.nextSibling,b=c.nodeName.toLowerCase(),"svg"==b?(c.style.overflow="hidden",c.style.position="relative",
c.style.top=this.marginTop+"px",c.setAttribute("width",f.width),c.setAttribute("height",f.height),c.style.width="",c.style.height=""):"default"!=c.style.cursor&&"div"!=b&&c.parentNode.removeChild(c),c=B;this.printBackgroundImage&&(e=e.getElementsByTagName("svg"),0<e.length&&(e[0].style.position="absolute"));g.overlayPane.parentNode.removeChild(g.overlayPane);this.graph.setEnabled(r);this.graph.container=d;this.graph.cellRenderer.redraw=u;g.canvas=k;g.backgroundPane=l;g.drawPane=m;g.overlayPane=n;
g.translate=t;a.destroy();g.setEventsEnabled(q)}};mxPrintPreview.prototype.getLinkForCellState=function(a){return this.graph.getLinkForCell(a.cell)};
-mxPrintPreview.prototype.insertBackgroundImage=function(a,b,c){var d=this.graph.backgroundImage;if(null!=d){var e=document.createElement("img");e.style.position="absolute";e.style.marginLeft=Math.round(b*this.scale)+"px";e.style.marginTop=Math.round(c*this.scale)+"px";e.setAttribute("width",Math.round(this.scale*d.width));e.setAttribute("height",Math.round(this.scale*d.height));e.src=d.src;a.insertBefore(e,a.firstChild)}};mxPrintPreview.prototype.getCoverPages=function(){return null};
+mxPrintPreview.prototype.insertBackgroundImage=function(a,b,c){var d=this.graph.backgroundImage;if(null!=d){var e=document.createElement("img");e.style.position="absolute";e.style.marginLeft=Math.round((b+d.x)*this.scale)+"px";e.style.marginTop=Math.round((c+d.y)*this.scale)+"px";e.setAttribute("width",Math.round(d.width*this.scale));e.setAttribute("height",Math.round(d.height*this.scale));e.src=d.src;a.insertBefore(e,a.firstChild)}};mxPrintPreview.prototype.getCoverPages=function(){return null};
mxPrintPreview.prototype.getAppendices=function(){return null};mxPrintPreview.prototype.print=function(a){a=this.open(a);null!=a&&a.print()};mxPrintPreview.prototype.close=function(){null!=this.wnd&&(this.wnd.close(),this.wnd=null)};function mxStylesheet(){this.styles={};this.putDefaultVertexStyle(this.createDefaultVertexStyle());this.putDefaultEdgeStyle(this.createDefaultEdgeStyle())}
mxStylesheet.prototype.createDefaultVertexStyle=function(){var a={};a[mxConstants.STYLE_SHAPE]=mxConstants.SHAPE_RECTANGLE;a[mxConstants.STYLE_PERIMETER]=mxPerimeter.RectanglePerimeter;a[mxConstants.STYLE_VERTICAL_ALIGN]=mxConstants.ALIGN_MIDDLE;a[mxConstants.STYLE_ALIGN]=mxConstants.ALIGN_CENTER;a[mxConstants.STYLE_FILLCOLOR]="#C3D9FF";a[mxConstants.STYLE_STROKECOLOR]="#6482B9";a[mxConstants.STYLE_FONTCOLOR]="#774400";return a};
mxStylesheet.prototype.createDefaultEdgeStyle=function(){var a={};a[mxConstants.STYLE_SHAPE]=mxConstants.SHAPE_CONNECTOR;a[mxConstants.STYLE_ENDARROW]=mxConstants.ARROW_CLASSIC;a[mxConstants.STYLE_VERTICAL_ALIGN]=mxConstants.ALIGN_MIDDLE;a[mxConstants.STYLE_ALIGN]=mxConstants.ALIGN_CENTER;a[mxConstants.STYLE_STROKECOLOR]="#6482B9";a[mxConstants.STYLE_FONTCOLOR]="#446299";return a};mxStylesheet.prototype.putDefaultVertexStyle=function(a){this.putCellStyle("defaultVertex",a)};
@@ -2002,7 +2002,7 @@ d);this.exportColor(e)};this.fromRGB=function(a,b,c,d){0>a&&(a=0);1<a&&(a=1);0>b
function(a,b){var c=a.match(/^\W*([0-9A-F]{3}([0-9A-F]{3})?)\W*$/i);return c?(6===c[1].length?this.fromRGB(parseInt(c[1].substr(0,2),16)/255,parseInt(c[1].substr(2,2),16)/255,parseInt(c[1].substr(4,2),16)/255,b):this.fromRGB(parseInt(c[1].charAt(0)+c[1].charAt(0),16)/255,parseInt(c[1].charAt(1)+c[1].charAt(1),16)/255,parseInt(c[1].charAt(2)+c[1].charAt(2),16)/255,b),!0):!1};this.toString=function(){return(256|Math.round(255*this.rgb[0])).toString(16).substr(1)+(256|Math.round(255*this.rgb[1])).toString(16).substr(1)+
(256|Math.round(255*this.rgb[2])).toString(16).substr(1)};var r=this,t="hvs"===this.pickerMode.toLowerCase()?1:0,u=mxJSColor.fetchElement(this.valueElement),x=mxJSColor.fetchElement(this.styleElement),y=!1,B=!1,A=1,z=2,C=4,v=8;u&&(q=function(){r.fromString(u.value,A);p()},mxJSColor.addEvent(u,"keyup",q),mxJSColor.addEvent(u,"input",q),mxJSColor.addEvent(u,"blur",l),u.setAttribute("autocomplete","off"));x&&(x.jscStyle={backgroundImage:x.style.backgroundImage,backgroundColor:x.style.backgroundColor,
color:x.style.color});switch(t){case 0:mxJSColor.requireImage("hs.png");break;case 1:mxJSColor.requireImage("hv.png")}this.importColor()}};mxJSColor.install();
-Editor=function(a,b,d,k,f){mxEventSource.call(this);this.chromeless=null!=a?a:this.chromeless;this.initStencilRegistry();this.graph=k||this.createGraph(b,d);this.editable=null!=f?f:!a;this.undoManager=this.createUndoManager();this.status="";this.getOrCreateFilename=function(){return this.filename||mxResources.get("drawing",[Editor.pageCounter])+".xml"};this.getFilename=function(){return this.filename};this.setStatus=function(a){this.status=a;this.fireEvent(new mxEventObject("statusChanged"))};this.getStatus=
+Editor=function(a,b,d,g,f){mxEventSource.call(this);this.chromeless=null!=a?a:this.chromeless;this.initStencilRegistry();this.graph=g||this.createGraph(b,d);this.editable=null!=f?f:!a;this.undoManager=this.createUndoManager();this.status="";this.getOrCreateFilename=function(){return this.filename||mxResources.get("drawing",[Editor.pageCounter])+".xml"};this.getFilename=function(){return this.filename};this.setStatus=function(a){this.status=a;this.fireEvent(new mxEventObject("statusChanged"))};this.getStatus=
function(){return this.status};this.graphChangeListener=function(a,b){var c=null!=b?b.getProperty("edit"):null;null!=c&&c.ignoreEdit||this.setModified(!0)};this.graph.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){this.graphChangeListener.apply(this,arguments)}));this.graph.resetViewOnRootChange=!1;this.init()};Editor.pageCounter=0;
(function(){try{for(var a=window;null!=a.opener&&"undefined"!==typeof a.opener.Editor&&!isNaN(a.opener.Editor.pageCounter)&&a.opener!=a;)a=a.opener;null!=a&&(a.Editor.pageCounter++,Editor.pageCounter=a.Editor.pageCounter)}catch(b){}})();Editor.useLocalStorage="undefined"!=typeof Storage&&mxClient.IS_IOS;
Editor.moveImage=mxClient.IS_SVG?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCIgd2lkdGg9IjI4cHgiIGhlaWdodD0iMjhweCI+PGc+PC9nPjxnPjxnPjxnPjxwYXRoIHRyYW5zZm9ybT0idHJhbnNsYXRlKDIuNCwyLjQpc2NhbGUoMC44KXJvdGF0ZSg0NSwxMiwxMikiIHN0cm9rZT0iIzI5YjZmMiIgZmlsbD0iIzI5YjZmMiIgZD0iTTE1LDNsMi4zLDIuM2wtMi44OSwyLjg3bDEuNDIsMS40MkwxOC43LDYuN0wyMSw5VjNIMTV6IE0zLDlsMi4zLTIuM2wyLjg3LDIuODlsMS40Mi0xLjQyTDYuNyw1LjNMOSwzSDNWOXogTTksMjEgbC0yLjMtMi4zbDIuODktMi44N2wtMS40Mi0xLjQyTDUuMywxNy4zTDMsMTV2Nkg5eiBNMjEsMTVsLTIuMywyLjNsLTIuODctMi44OWwtMS40MiwxLjQybDIuODksMi44N0wxNSwyMWg2VjE1eiIvPjwvZz48L2c+PC9nPjwvc3ZnPgo=":IMAGE_PATH+
@@ -2030,7 +2030,7 @@ Editor.roughFillStyles=[{val:"auto",dispName:"Auto"},{val:"hachure",dispName:"Ha
Editor.enableNativeCipboard=window==window.top&&!mxClient.IS_FF&&null!=navigator.clipboard;Editor.darkMode=!1;Editor.isDarkMode=function(a){return Editor.darkMode||"dark"==uiTheme};Editor.helpImage=Editor.isDarkMode()&&mxClient.IS_SVG?Editor.darkHelpImage:Editor.lightHelpImage;Editor.checkmarkImage=Editor.isDarkMode()&&mxClient.IS_SVG?Editor.darkCheckmarkImage:Editor.lightCheckmarkImage;mxUtils.extend(Editor,mxEventSource);Editor.prototype.originalNoForeignObject=mxClient.NO_FO;
Editor.prototype.transparentImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhMAAwAIAAAP///wAAACH5BAEAAAAALAAAAAAwADAAAAIxhI+py+0Po5y02ouz3rz7D4biSJbmiabqyrbuC8fyTNf2jef6zvf+DwwKh8Si8egpAAA7":IMAGE_PATH+"/transparent.gif";Editor.prototype.extendCanvas=!0;Editor.prototype.chromeless=!1;Editor.prototype.cancelFirst=!0;Editor.prototype.enabled=!0;Editor.prototype.filename=null;Editor.prototype.modified=!1;Editor.prototype.autosave=!0;Editor.prototype.initialTopSpacing=0;Editor.prototype.appName=document.title;
Editor.prototype.editBlankUrl=window.location.protocol+"//"+window.location.host+"/";Editor.prototype.defaultGraphOverflow="hidden";Editor.prototype.init=function(){};Editor.prototype.isChromelessView=function(){return this.chromeless};Editor.prototype.setAutosave=function(a){this.autosave=a;this.fireEvent(new mxEventObject("autosaveChanged"))};Editor.prototype.getEditBlankUrl=function(a){return this.editBlankUrl+a};
-Editor.prototype.editAsNew=function(a,b){var d=null!=b?"?title="+encodeURIComponent(b):"";null!=urlParams.ui&&(d+=(0<d.length?"&":"?")+"ui="+urlParams.ui);if("undefined"!==typeof window.postMessage&&(null==document.documentMode||10<=document.documentMode)){var k=null,f=mxUtils.bind(this,function(b){"ready"==b.data&&b.source==k&&(mxEvent.removeListener(window,"message",f),k.postMessage(a,"*"))});mxEvent.addListener(window,"message",f);k=this.graph.openLink(this.getEditBlankUrl(d+(0<d.length?"&":"?")+
+Editor.prototype.editAsNew=function(a,b){var d=null!=b?"?title="+encodeURIComponent(b):"";null!=urlParams.ui&&(d+=(0<d.length?"&":"?")+"ui="+urlParams.ui);if("undefined"!==typeof window.postMessage&&(null==document.documentMode||10<=document.documentMode)){var g=null,f=mxUtils.bind(this,function(b){"ready"==b.data&&b.source==g&&(mxEvent.removeListener(window,"message",f),g.postMessage(a,"*"))});mxEvent.addListener(window,"message",f);g=this.graph.openLink(this.getEditBlankUrl(d+(0<d.length?"&":"?")+
"client=1"),null,!0)}else this.graph.openLink(this.getEditBlankUrl(d)+"#R"+encodeURIComponent(a))};Editor.prototype.createGraph=function(a,b){var d=new Graph(null,b,null,null,a);d.transparentBackground=!1;this.chromeless||(d.isBlankLink=function(a){return!this.isExternalProtocol(a)});return d};
Editor.prototype.resetGraph=function(){this.graph.gridEnabled=this.graph.defaultGridEnabled&&(!this.isChromelessView()||"1"==urlParams.grid);this.graph.graphHandler.guidesEnabled=!0;this.graph.setTooltips(!0);this.graph.setConnectable(!0);this.graph.foldingEnabled=!0;this.graph.scrollbars=this.graph.defaultScrollbars;this.graph.pageVisible=this.graph.defaultPageVisible;this.graph.pageBreaksVisible=this.graph.pageVisible;this.graph.preferPageSize=this.graph.pageBreaksVisible;this.graph.background=
null;this.graph.pageScale=mxGraph.prototype.pageScale;this.graph.pageFormat=mxGraph.prototype.pageFormat;this.graph.currentScale=1;this.graph.currentTranslate.x=0;this.graph.currentTranslate.y=0;this.updateGraphComponents();this.graph.view.setScale(1)};
@@ -2043,14 +2043,14 @@ 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(a,d){b.undoableEditHappened(d.getProperty("edit"))};var d=mxUtils.bind(this,function(a,b){this.undoListener.apply(this,arguments)});a.getModel().addListener(mxEvent.UNDO,d);a.getView().addListener(mxEvent.UNDO,d);d=function(b,d){var f=a.getSelectionCellsForChanges(d.getProperty("edit").changes,function(a){return!(a instanceof mxChildChange)});if(0<f.length){a.getModel();for(var k=[],c=0;c<
-f.length;c++)null!=a.view.getState(f[c])&&k.push(f[c]);a.setSelectionCells(k)}};b.addListener(mxEvent.UNDO,d);b.addListener(mxEvent.REDO,d);return b};Editor.prototype.initStencilRegistry=function(){};Editor.prototype.destroy=function(){null!=this.graph&&(this.graph.destroy(),this.graph=null)};OpenFile=function(a){this.consumer=this.producer=null;this.done=a;this.args=null};OpenFile.prototype.setConsumer=function(a){this.consumer=a;this.execute()};
+Editor.prototype.createUndoManager=function(){var a=this.graph,b=new mxUndoManager;this.undoListener=function(a,d){b.undoableEditHappened(d.getProperty("edit"))};var d=mxUtils.bind(this,function(a,b){this.undoListener.apply(this,arguments)});a.getModel().addListener(mxEvent.UNDO,d);a.getView().addListener(mxEvent.UNDO,d);d=function(b,d){var f=a.getSelectionCellsForChanges(d.getProperty("edit").changes,function(a){return!(a instanceof mxChildChange)});if(0<f.length){a.getModel();for(var g=[],c=0;c<
+f.length;c++)null!=a.view.getState(f[c])&&g.push(f[c]);a.setSelectionCells(g)}};b.addListener(mxEvent.UNDO,d);b.addListener(mxEvent.REDO,d);return b};Editor.prototype.initStencilRegistry=function(){};Editor.prototype.destroy=function(){null!=this.graph&&(this.graph.destroy(),this.graph=null)};OpenFile=function(a){this.consumer=this.producer=null;this.done=a;this.args=null};OpenFile.prototype.setConsumer=function(a){this.consumer=a;this.execute()};
OpenFile.prototype.setData=function(){this.args=arguments;this.execute()};OpenFile.prototype.error=function(a){this.cancel(!0);mxUtils.alert(a)};OpenFile.prototype.execute=function(){null!=this.consumer&&null!=this.args&&(this.cancel(!1),this.consumer.apply(this,this.args))};OpenFile.prototype.cancel=function(a){null!=this.done&&this.done(null!=a?a:!0)};
-function Dialog(a,b,d,k,f,m,p,c,e,g,n){var l=e?57:0,q=d,u=k,t=e?0:64,A=mxUtils.getDocumentSize();null!=window.innerHeight&&(A.height=window.innerHeight);var x=A.height,G=Math.max(1,Math.round((A.width-d-t)/2)),z=Math.max(1,Math.round((x-k-a.footerHeight)/3));b.style.maxHeight="100%";d=null!=document.body?Math.min(d,document.body.scrollWidth-t):d;k=Math.min(k,x-t);0<a.dialogs.length&&(this.zIndex+=2*a.dialogs.length);null==this.bg&&(this.bg=a.createDiv("background"),this.bg.style.position="absolute",
-this.bg.style.background=Dialog.backdropColor,this.bg.style.height=x+"px",this.bg.style.right="0px",this.bg.style.zIndex=this.zIndex-2,mxUtils.setOpacity(this.bg,this.bgOpacity));A=mxUtils.getDocumentScrollOrigin(document);this.bg.style.left=A.x+"px";this.bg.style.top=A.y+"px";G+=A.x;z+=A.y;f&&document.body.appendChild(this.bg);var E=a.createDiv(e?"geTransDialog":"geDialog");f=this.getPosition(G,z,d,k);G=f.x;z=f.y;E.style.width=d+"px";E.style.height=k+"px";E.style.left=G+"px";E.style.top=z+"px";E.style.zIndex=
+function Dialog(a,b,d,g,f,m,p,c,e,k,n){var l=e?57:0,q=d,u=g,t=e?0:64,A=mxUtils.getDocumentSize();null!=window.innerHeight&&(A.height=window.innerHeight);var x=A.height,G=Math.max(1,Math.round((A.width-d-t)/2)),z=Math.max(1,Math.round((x-g-a.footerHeight)/3));b.style.maxHeight="100%";d=null!=document.body?Math.min(d,document.body.scrollWidth-t):d;g=Math.min(g,x-t);0<a.dialogs.length&&(this.zIndex+=2*a.dialogs.length);null==this.bg&&(this.bg=a.createDiv("background"),this.bg.style.position="absolute",
+this.bg.style.background=Dialog.backdropColor,this.bg.style.height=x+"px",this.bg.style.right="0px",this.bg.style.zIndex=this.zIndex-2,mxUtils.setOpacity(this.bg,this.bgOpacity));A=mxUtils.getDocumentScrollOrigin(document);this.bg.style.left=A.x+"px";this.bg.style.top=A.y+"px";G+=A.x;z+=A.y;f&&document.body.appendChild(this.bg);var E=a.createDiv(e?"geTransDialog":"geDialog");f=this.getPosition(G,z,d,g);G=f.x;z=f.y;E.style.width=d+"px";E.style.height=g+"px";E.style.left=G+"px";E.style.top=z+"px";E.style.zIndex=
this.zIndex;E.appendChild(b);document.body.appendChild(E);!c&&b.clientHeight>E.clientHeight-t&&(b.style.overflowY="auto");if(m&&(m=document.createElement("img"),m.setAttribute("src",Dialog.prototype.closeImage),m.setAttribute("title",mxResources.get("close")),m.className="geDialogClose",m.style.top=z+14+"px",m.style.left=G+d+38-l+"px",m.style.zIndex=this.zIndex,mxEvent.addListener(m,"click",mxUtils.bind(this,function(){a.hideDialog(!0)})),document.body.appendChild(m),this.dialogImg=m,!n)){var H=!1;
-mxEvent.addGestureListeners(this.bg,mxUtils.bind(this,function(a){H=!0}),null,mxUtils.bind(this,function(c){H&&(a.hideDialog(!0),H=!1)}))}this.resizeListener=mxUtils.bind(this,function(){if(null!=g){var e=g();null!=e&&(q=d=e.w,u=k=e.h)}e=mxUtils.getDocumentSize();x=e.height;this.bg.style.height=x+"px";G=Math.max(1,Math.round((e.width-d-t)/2));z=Math.max(1,Math.round((x-k-a.footerHeight)/3));d=null!=document.body?Math.min(q,document.body.scrollWidth-t):q;k=Math.min(u,x-t);e=this.getPosition(G,z,d,
-k);G=e.x;z=e.y;E.style.left=G+"px";E.style.top=z+"px";E.style.width=d+"px";E.style.height=k+"px";!c&&b.clientHeight>E.clientHeight-t&&(b.style.overflowY="auto");null!=this.dialogImg&&(this.dialogImg.style.top=z+14+"px",this.dialogImg.style.left=G+d+38-l+"px")});mxEvent.addListener(window,"resize",this.resizeListener);this.onDialogClose=p;this.container=E;a.editor.fireEvent(new mxEventObject("showDialog"))}Dialog.backdropColor="white";Dialog.prototype.zIndex=mxPopupMenu.prototype.zIndex-2;
+mxEvent.addGestureListeners(this.bg,mxUtils.bind(this,function(a){H=!0}),null,mxUtils.bind(this,function(c){H&&(a.hideDialog(!0),H=!1)}))}this.resizeListener=mxUtils.bind(this,function(){if(null!=k){var e=k();null!=e&&(q=d=e.w,u=g=e.h)}e=mxUtils.getDocumentSize();x=e.height;this.bg.style.height=x+"px";G=Math.max(1,Math.round((e.width-d-t)/2));z=Math.max(1,Math.round((x-g-a.footerHeight)/3));d=null!=document.body?Math.min(q,document.body.scrollWidth-t):q;g=Math.min(u,x-t);e=this.getPosition(G,z,d,
+g);G=e.x;z=e.y;E.style.left=G+"px";E.style.top=z+"px";E.style.width=d+"px";E.style.height=g+"px";!c&&b.clientHeight>E.clientHeight-t&&(b.style.overflowY="auto");null!=this.dialogImg&&(this.dialogImg.style.top=z+14+"px",this.dialogImg.style.left=G+d+38-l+"px")});mxEvent.addListener(window,"resize",this.resizeListener);this.onDialogClose=p;this.container=E;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+
@@ -2059,48 +2059,49 @@ Dialog.prototype.lockedImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoA
"/locked.png";
Dialog.prototype.unlockedImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAMAAABhq6zVAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MzdDMDZCN0QxNzIxMTFFNUI0RTk5NTg4OTcyMUUyODEiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MzdDMDZCN0UxNzIxMTFFNUI0RTk5NTg4OTcyMUUyODEiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDozN0MwNkI3QjE3MjExMUU1QjRFOTk1ODg5NzIxRTI4MSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDozN0MwNkI3QzE3MjExMUU1QjRFOTk1ODg5NzIxRTI4MSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PkKMpVwAAAAYUExURZmZmbKysr+/v6ysrOXl5czMzLGxsf///zHN5lwAAAAIdFJOU/////////8A3oO9WQAAADxJREFUeNpUzFESACAEBNBVsfe/cZJU+8Mzs8CIABCidtfGOndnYsT40HDSiCcbPdoJo10o9aI677cpwACRoAF3dFNlswAAAABJRU5ErkJggg==":IMAGE_PATH+
"/unlocked.png";Dialog.prototype.bgOpacity=80;Dialog.prototype.getPosition=function(a,b){return new mxPoint(a,b)};Dialog.prototype.close=function(a,b){if(null!=this.onDialogClose){if(0==this.onDialogClose(a,b))return!1;this.onDialogClose=null}null!=this.dialogImg&&(this.dialogImg.parentNode.removeChild(this.dialogImg),this.dialogImg=null);null!=this.bg&&null!=this.bg.parentNode&&this.bg.parentNode.removeChild(this.bg);mxEvent.removeListener(window,"resize",this.resizeListener);this.container.parentNode.removeChild(this.container)};
-var ErrorDialog=function(a,b,d,k,f,m,p,c,e,g,n){e=null!=e?e:!0;var l=document.createElement("div");l.style.textAlign="center";if(null!=b){var q=document.createElement("div");q.style.padding="0px";q.style.margin="0px";q.style.fontSize="18px";q.style.paddingBottom="16px";q.style.marginBottom="10px";q.style.borderBottom="1px solid #c0c0c0";q.style.color="gray";q.style.whiteSpace="nowrap";q.style.textOverflow="ellipsis";q.style.overflow="hidden";mxUtils.write(q,b);q.setAttribute("title",b);l.appendChild(q)}b=
-document.createElement("div");b.style.lineHeight="1.2em";b.style.padding="6px";b.innerHTML=d;l.appendChild(b);d=document.createElement("div");d.style.marginTop="12px";d.style.textAlign="center";null!=m&&(b=mxUtils.button(mxResources.get("tryAgain"),function(){a.hideDialog();m()}),b.className="geBtn",d.appendChild(b),d.style.textAlign="center");null!=g&&(g=mxUtils.button(g,function(){null!=n&&n()}),g.className="geBtn",d.appendChild(g));var u=mxUtils.button(k,function(){e&&a.hideDialog();null!=f&&f()});
-u.className="geBtn";d.appendChild(u);null!=p&&(k=mxUtils.button(p,function(){e&&a.hideDialog();null!=c&&c()}),k.className="geBtn gePrimaryBtn",d.appendChild(k));this.init=function(){u.focus()};l.appendChild(d);this.container=l},PrintDialog=function(a,b){this.create(a,b)};
-PrintDialog.prototype.create=function(a){function b(a){var e=c.checked||g.checked,b=parseInt(l.value)/100;isNaN(b)&&(b=1,l.value="100%");var b=.75*b,f=d.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,k=1/d.pageScale;if(e){var q=c.checked?1:parseInt(n.value);isNaN(q)||(k=mxUtils.getScaleForPageCount(q,d,f))}d.getGraphBounds();var m=q=0,f=mxRectangle.fromRectangle(f);f.width=Math.ceil(f.width*b);f.height=Math.ceil(f.height*b);k*=b;!e&&d.pageVisible?(b=d.getPageLayout(),q-=b.x*f.width,m-=b.y*f.height):
-e=!0;e=PrintDialog.createPrintPreview(d,k,f,0,q,m,e);e.open();a&&PrintDialog.printPreview(e)}var d=a.editor.graph,k,f,m=document.createElement("table");m.style.width="100%";m.style.height="100%";var p=document.createElement("tbody");k=document.createElement("tr");var c=document.createElement("input");c.setAttribute("type","checkbox");f=document.createElement("td");f.setAttribute("colspan","2");f.style.fontSize="10pt";f.appendChild(c);var e=document.createElement("span");mxUtils.write(e," "+mxResources.get("fitPage"));
-f.appendChild(e);mxEvent.addListener(e,"click",function(a){c.checked=!c.checked;g.checked=!c.checked;mxEvent.consume(a)});mxEvent.addListener(c,"change",function(){g.checked=!c.checked});k.appendChild(f);p.appendChild(k);k=k.cloneNode(!1);var g=document.createElement("input");g.setAttribute("type","checkbox");f=document.createElement("td");f.style.fontSize="10pt";f.appendChild(g);e=document.createElement("span");mxUtils.write(e," "+mxResources.get("posterPrint")+":");f.appendChild(e);mxEvent.addListener(e,
-"click",function(a){g.checked=!g.checked;c.checked=!g.checked;mxEvent.consume(a)});k.appendChild(f);var n=document.createElement("input");n.setAttribute("value","1");n.setAttribute("type","number");n.setAttribute("min","1");n.setAttribute("size","4");n.setAttribute("disabled","disabled");n.style.width="50px";f=document.createElement("td");f.style.fontSize="10pt";f.appendChild(n);mxUtils.write(f," "+mxResources.get("pages")+" (max)");k.appendChild(f);p.appendChild(k);mxEvent.addListener(g,"change",
-function(){g.checked?n.removeAttribute("disabled"):n.setAttribute("disabled","disabled");c.checked=!g.checked});k=k.cloneNode(!1);f=document.createElement("td");mxUtils.write(f,mxResources.get("pageScale")+":");k.appendChild(f);f=document.createElement("td");var l=document.createElement("input");l.setAttribute("value","100 %");l.setAttribute("size","5");l.style.width="50px";f.appendChild(l);k.appendChild(f);p.appendChild(k);k=document.createElement("tr");f=document.createElement("td");f.colSpan=2;
+var ErrorDialog=function(a,b,d,g,f,m,p,c,e,k,n){e=null!=e?e:!0;var l=document.createElement("div");l.style.textAlign="center";if(null!=b){var q=document.createElement("div");q.style.padding="0px";q.style.margin="0px";q.style.fontSize="18px";q.style.paddingBottom="16px";q.style.marginBottom="10px";q.style.borderBottom="1px solid #c0c0c0";q.style.color="gray";q.style.whiteSpace="nowrap";q.style.textOverflow="ellipsis";q.style.overflow="hidden";mxUtils.write(q,b);q.setAttribute("title",b);l.appendChild(q)}b=
+document.createElement("div");b.style.lineHeight="1.2em";b.style.padding="6px";b.innerHTML=d;l.appendChild(b);d=document.createElement("div");d.style.marginTop="12px";d.style.textAlign="center";null!=m&&(b=mxUtils.button(mxResources.get("tryAgain"),function(){a.hideDialog();m()}),b.className="geBtn",d.appendChild(b),d.style.textAlign="center");null!=k&&(k=mxUtils.button(k,function(){null!=n&&n()}),k.className="geBtn",d.appendChild(k));var u=mxUtils.button(g,function(){e&&a.hideDialog();null!=f&&f()});
+u.className="geBtn";d.appendChild(u);null!=p&&(g=mxUtils.button(p,function(){e&&a.hideDialog();null!=c&&c()}),g.className="geBtn gePrimaryBtn",d.appendChild(g));this.init=function(){u.focus()};l.appendChild(d);this.container=l},PrintDialog=function(a,b){this.create(a,b)};
+PrintDialog.prototype.create=function(a){function b(a){var e=c.checked||k.checked,b=parseInt(l.value)/100;isNaN(b)&&(b=1,l.value="100%");var b=.75*b,f=d.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,g=1/d.pageScale;if(e){var q=c.checked?1:parseInt(n.value);isNaN(q)||(g=mxUtils.getScaleForPageCount(q,d,f))}d.getGraphBounds();var m=q=0,f=mxRectangle.fromRectangle(f);f.width=Math.ceil(f.width*b);f.height=Math.ceil(f.height*b);g*=b;!e&&d.pageVisible?(b=d.getPageLayout(),q-=b.x*f.width,m-=b.y*f.height):
+e=!0;e=PrintDialog.createPrintPreview(d,g,f,0,q,m,e);e.open();a&&PrintDialog.printPreview(e)}var d=a.editor.graph,g,f,m=document.createElement("table");m.style.width="100%";m.style.height="100%";var p=document.createElement("tbody");g=document.createElement("tr");var c=document.createElement("input");c.setAttribute("type","checkbox");f=document.createElement("td");f.setAttribute("colspan","2");f.style.fontSize="10pt";f.appendChild(c);var e=document.createElement("span");mxUtils.write(e," "+mxResources.get("fitPage"));
+f.appendChild(e);mxEvent.addListener(e,"click",function(a){c.checked=!c.checked;k.checked=!c.checked;mxEvent.consume(a)});mxEvent.addListener(c,"change",function(){k.checked=!c.checked});g.appendChild(f);p.appendChild(g);g=g.cloneNode(!1);var k=document.createElement("input");k.setAttribute("type","checkbox");f=document.createElement("td");f.style.fontSize="10pt";f.appendChild(k);e=document.createElement("span");mxUtils.write(e," "+mxResources.get("posterPrint")+":");f.appendChild(e);mxEvent.addListener(e,
+"click",function(a){k.checked=!k.checked;c.checked=!k.checked;mxEvent.consume(a)});g.appendChild(f);var n=document.createElement("input");n.setAttribute("value","1");n.setAttribute("type","number");n.setAttribute("min","1");n.setAttribute("size","4");n.setAttribute("disabled","disabled");n.style.width="50px";f=document.createElement("td");f.style.fontSize="10pt";f.appendChild(n);mxUtils.write(f," "+mxResources.get("pages")+" (max)");g.appendChild(f);p.appendChild(g);mxEvent.addListener(k,"change",
+function(){k.checked?n.removeAttribute("disabled"):n.setAttribute("disabled","disabled");c.checked=!k.checked});g=g.cloneNode(!1);f=document.createElement("td");mxUtils.write(f,mxResources.get("pageScale")+":");g.appendChild(f);f=document.createElement("td");var l=document.createElement("input");l.setAttribute("value","100 %");l.setAttribute("size","5");l.style.width="50px";f.appendChild(l);g.appendChild(f);p.appendChild(g);g=document.createElement("tr");f=document.createElement("td");f.colSpan=2;
f.style.paddingTop="20px";f.setAttribute("align","right");e=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});e.className="geBtn";a.editor.cancelFirst&&f.appendChild(e);if(PrintDialog.previewEnabled){var q=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog();b(!1)});q.className="geBtn";f.appendChild(q)}q=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){a.hideDialog();b(!0)});q.className="geBtn gePrimaryBtn";f.appendChild(q);a.editor.cancelFirst||
-f.appendChild(e);k.appendChild(f);p.appendChild(k);m.appendChild(p);this.container=m};PrintDialog.printPreview=function(a){try{if(null!=a.wnd){var b=function(){a.wnd.focus();a.wnd.print();a.wnd.close()};mxClient.IS_GC?window.setTimeout(b,500):b()}}catch(d){}};
-PrintDialog.createPrintPreview=function(a,b,d,k,f,m,p){b=new mxPrintPreview(a,b,d,k,f,m);b.title=mxResources.get("preview");b.printBackgroundImage=!0;b.autoOrigin=p;a=a.background;if(null==a||""==a||a==mxConstants.NONE)a="#ffffff";b.backgroundColor=a;var c=b.writeHead;b.writeHead=function(a){c.apply(this,arguments);a.writeln('<style type="text/css">');a.writeln("@media screen {");a.writeln(" body > div { padding:30px;box-sizing:content-box; }");a.writeln("}");a.writeln("</style>")};return b};
+f.appendChild(e);g.appendChild(f);p.appendChild(g);m.appendChild(p);this.container=m};PrintDialog.printPreview=function(a){try{if(null!=a.wnd){var b=function(){a.wnd.focus();a.wnd.print();a.wnd.close()};mxClient.IS_GC?window.setTimeout(b,500):b()}}catch(d){}};
+PrintDialog.createPrintPreview=function(a,b,d,g,f,m,p){b=new mxPrintPreview(a,b,d,g,f,m);b.title=mxResources.get("preview");b.printBackgroundImage=!0;b.autoOrigin=p;a=a.background;if(null==a||""==a||a==mxConstants.NONE)a="#ffffff";b.backgroundColor=a;var c=b.writeHead;b.writeHead=function(a){c.apply(this,arguments);a.writeln('<style type="text/css">');a.writeln("@media screen {");a.writeln(" body > div { padding:30px;box-sizing:content-box; }");a.writeln("}");a.writeln("</style>")};return b};
PrintDialog.previewEnabled=!0;
-var PageSetupDialog=function(a){function b(){null==n||n==mxConstants.NONE?(g.style.backgroundColor="",g.style.backgroundImage="url('"+Dialog.prototype.noColorImage+"')"):(g.style.backgroundColor=n,g.style.backgroundImage="")}function d(){var c=t;null!=c&&Graph.isPageLink(c.src)&&(c=a.createImageForPageLink(c.src));null!=c&&null!=c.src?(u.setAttribute("src",c.src),u.style.display=""):(u.removeAttribute("src"),u.style.display="none")}var k=a.editor.graph,f,m,p=document.createElement("table");p.style.width=
-"100%";p.style.height="100%";var c=document.createElement("tbody");f=document.createElement("tr");m=document.createElement("td");m.style.verticalAlign="top";m.style.fontSize="10pt";mxUtils.write(m,mxResources.get("paperSize")+":");f.appendChild(m);m=document.createElement("td");m.style.verticalAlign="top";m.style.fontSize="10pt";var e=PageSetupDialog.addPageFormatPanel(m,"pagesetupdialog",k.pageFormat);f.appendChild(m);c.appendChild(f);f=document.createElement("tr");m=document.createElement("td");
-mxUtils.write(m,mxResources.get("background")+":");f.appendChild(m);m=document.createElement("td");m.style.whiteSpace="nowrap";document.createElement("input").setAttribute("type","text");var g=document.createElement("button");g.style.width="22px";g.style.height="22px";g.style.cursor="pointer";g.style.marginRight="20px";g.style.backgroundPosition="center center";g.style.backgroundRepeat="no-repeat";mxClient.IS_FF&&(g.style.position="relative",g.style.top="-6px");var n=k.background;b();mxEvent.addListener(g,
-"click",function(c){a.pickColor(n||"none",function(a){n=a;b()});mxEvent.consume(c)});m.appendChild(g);mxUtils.write(m,mxResources.get("gridSize")+":");var l=document.createElement("input");l.setAttribute("type","number");l.setAttribute("min","0");l.style.width="40px";l.style.marginLeft="6px";l.value=k.getGridSize();m.appendChild(l);mxEvent.addListener(l,"change",function(){var a=parseInt(l.value);l.value=Math.max(1,isNaN(a)?k.getGridSize():a)});f.appendChild(m);c.appendChild(f);f=document.createElement("tr");
+var PageSetupDialog=function(a){function b(){null==n||n==mxConstants.NONE?(k.style.backgroundColor="",k.style.backgroundImage="url('"+Dialog.prototype.noColorImage+"')"):(k.style.backgroundColor=n,k.style.backgroundImage="")}function d(){var c=t;null!=c&&Graph.isPageLink(c.src)&&(c=a.createImageForPageLink(c.src));null!=c&&null!=c.src?(u.setAttribute("src",c.src),u.style.display=""):(u.removeAttribute("src"),u.style.display="none")}var g=a.editor.graph,f,m,p=document.createElement("table");p.style.width=
+"100%";p.style.height="100%";var c=document.createElement("tbody");f=document.createElement("tr");m=document.createElement("td");m.style.verticalAlign="top";m.style.fontSize="10pt";mxUtils.write(m,mxResources.get("paperSize")+":");f.appendChild(m);m=document.createElement("td");m.style.verticalAlign="top";m.style.fontSize="10pt";var e=PageSetupDialog.addPageFormatPanel(m,"pagesetupdialog",g.pageFormat);f.appendChild(m);c.appendChild(f);f=document.createElement("tr");m=document.createElement("td");
+mxUtils.write(m,mxResources.get("background")+":");f.appendChild(m);m=document.createElement("td");m.style.whiteSpace="nowrap";document.createElement("input").setAttribute("type","text");var k=document.createElement("button");k.style.width="22px";k.style.height="22px";k.style.cursor="pointer";k.style.marginRight="20px";k.style.backgroundPosition="center center";k.style.backgroundRepeat="no-repeat";mxClient.IS_FF&&(k.style.position="relative",k.style.top="-6px");var n=g.background;b();mxEvent.addListener(k,
+"click",function(c){a.pickColor(n||"none",function(a){n=a;b()});mxEvent.consume(c)});m.appendChild(k);mxUtils.write(m,mxResources.get("gridSize")+":");var l=document.createElement("input");l.setAttribute("type","number");l.setAttribute("min","0");l.style.width="40px";l.style.marginLeft="6px";l.value=g.getGridSize();m.appendChild(l);mxEvent.addListener(l,"change",function(){var a=parseInt(l.value);l.value=Math.max(1,isNaN(a)?g.getGridSize():a)});f.appendChild(m);c.appendChild(f);f=document.createElement("tr");
m=document.createElement("td");mxUtils.write(m,mxResources.get("image")+":");f.appendChild(m);m=document.createElement("td");var q=document.createElement("button");q.className="geBtn";q.style.margin="0px";mxUtils.write(q,mxResources.get("change")+"...");var u=document.createElement("img");u.setAttribute("valign","middle");u.style.verticalAlign="middle";u.style.border="1px solid lightGray";u.style.borderRadius="4px";u.style.marginRight="14px";u.style.maxWidth="100px";u.style.cursor="pointer";u.style.height=
-"60px";u.style.padding="4px";var t=k.backgroundImage,A=function(c){a.showBackgroundImageDialog(function(a,c){c||(t=a,d())},t);mxEvent.consume(c)};mxEvent.addListener(q,"click",A);mxEvent.addListener(u,"click",A);d();m.appendChild(u);m.appendChild(q);f.appendChild(m);c.appendChild(f);f=document.createElement("tr");m=document.createElement("td");m.colSpan=2;m.style.paddingTop="16px";m.setAttribute("align","right");q=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});q.className="geBtn";
-a.editor.cancelFirst&&m.appendChild(q);A=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();var c=parseInt(l.value);isNaN(c)||k.gridSize===c||k.setGridSize(c);c=new ChangePageSetup(a,n,t,e.get());c.ignoreColor=k.background==n;c.ignoreImage=(null!=k.backgroundImage?k.backgroundImage.src:null)===(null!=t?t.src:null);k.pageFormat.width==c.previousFormat.width&&k.pageFormat.height==c.previousFormat.height&&c.ignoreColor&&c.ignoreImage||k.model.execute(c)});A.className="geBtn gePrimaryBtn";
+"60px";u.style.padding="4px";var t=g.backgroundImage,A=function(c){a.showBackgroundImageDialog(function(a,c){c||(t=a,d())},t);mxEvent.consume(c)};mxEvent.addListener(q,"click",A);mxEvent.addListener(u,"click",A);d();m.appendChild(u);m.appendChild(q);f.appendChild(m);c.appendChild(f);f=document.createElement("tr");m=document.createElement("td");m.colSpan=2;m.style.paddingTop="16px";m.setAttribute("align","right");q=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});q.className="geBtn";
+a.editor.cancelFirst&&m.appendChild(q);A=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();var c=parseInt(l.value);isNaN(c)||g.gridSize===c||g.setGridSize(c);c=new ChangePageSetup(a,n,t,e.get());c.ignoreColor=g.background==n;c.ignoreImage=(null!=g.backgroundImage?g.backgroundImage.src:null)===(null!=t?t.src:null);g.pageFormat.width==c.previousFormat.width&&g.pageFormat.height==c.previousFormat.height&&c.ignoreColor&&c.ignoreImage||g.model.execute(c)});A.className="geBtn gePrimaryBtn";
m.appendChild(A);a.editor.cancelFirst||m.appendChild(q);f.appendChild(m);c.appendChild(f);p.appendChild(c);this.container=p};
-PageSetupDialog.addPageFormatPanel=function(a,b,d,k){function f(a,b,g){if(g||l!=document.activeElement&&q!=document.activeElement){a=!1;for(b=0;b<t.length;b++)g=t[b],z?"custom"==g.key&&(c.value=g.key,z=!1):null!=g.format&&("a4"==g.key?826==d.width?(d=mxRectangle.fromRectangle(d),d.width=827):826==d.height&&(d=mxRectangle.fromRectangle(d),d.height=827):"a5"==g.key&&(584==d.width?(d=mxRectangle.fromRectangle(d),d.width=583):584==d.height&&(d=mxRectangle.fromRectangle(d),d.height=583)),d.width==g.format.width&&
-d.height==g.format.height?(c.value=g.key,m.setAttribute("checked","checked"),m.defaultChecked=!0,m.checked=!0,p.removeAttribute("checked"),p.defaultChecked=!1,p.checked=!1,a=!0):d.width==g.format.height&&d.height==g.format.width&&(c.value=g.key,m.removeAttribute("checked"),m.defaultChecked=!1,m.checked=!1,p.setAttribute("checked","checked"),p.defaultChecked=!0,a=p.checked=!0));a?(e.style.display="",n.style.display="none"):(l.value=d.width/100,q.value=d.height/100,m.setAttribute("checked","checked"),
+PageSetupDialog.addPageFormatPanel=function(a,b,d,g){function f(a,b,k){if(k||l!=document.activeElement&&q!=document.activeElement){a=!1;for(b=0;b<t.length;b++)k=t[b],z?"custom"==k.key&&(c.value=k.key,z=!1):null!=k.format&&("a4"==k.key?826==d.width?(d=mxRectangle.fromRectangle(d),d.width=827):826==d.height&&(d=mxRectangle.fromRectangle(d),d.height=827):"a5"==k.key&&(584==d.width?(d=mxRectangle.fromRectangle(d),d.width=583):584==d.height&&(d=mxRectangle.fromRectangle(d),d.height=583)),d.width==k.format.width&&
+d.height==k.format.height?(c.value=k.key,m.setAttribute("checked","checked"),m.defaultChecked=!0,m.checked=!0,p.removeAttribute("checked"),p.defaultChecked=!1,p.checked=!1,a=!0):d.width==k.format.height&&d.height==k.format.width&&(c.value=k.key,m.removeAttribute("checked"),m.defaultChecked=!1,m.checked=!1,p.setAttribute("checked","checked"),p.defaultChecked=!0,a=p.checked=!0));a?(e.style.display="",n.style.display="none"):(l.value=d.width/100,q.value=d.height/100,m.setAttribute("checked","checked"),
c.value="custom",e.style.display="none",n.style.display="")}}b="format-"+b;var m=document.createElement("input");m.setAttribute("name",b);m.setAttribute("type","radio");m.setAttribute("value","portrait");var p=document.createElement("input");p.setAttribute("name",b);p.setAttribute("type","radio");p.setAttribute("value","landscape");var c=document.createElement("select");c.style.marginBottom="8px";c.style.width="202px";var e=document.createElement("div");e.style.marginLeft="4px";e.style.width="210px";
-e.style.height="24px";m.style.marginRight="6px";e.appendChild(m);b=document.createElement("span");b.style.maxWidth="100px";mxUtils.write(b,mxResources.get("portrait"));e.appendChild(b);p.style.marginLeft="10px";p.style.marginRight="6px";e.appendChild(p);var g=document.createElement("span");g.style.width="100px";mxUtils.write(g,mxResources.get("landscape"));e.appendChild(g);var n=document.createElement("div");n.style.marginLeft="4px";n.style.width="210px";n.style.height="24px";var l=document.createElement("input");
+e.style.height="24px";m.style.marginRight="6px";e.appendChild(m);b=document.createElement("span");b.style.maxWidth="100px";mxUtils.write(b,mxResources.get("portrait"));e.appendChild(b);p.style.marginLeft="10px";p.style.marginRight="6px";e.appendChild(p);var k=document.createElement("span");k.style.width="100px";mxUtils.write(k,mxResources.get("landscape"));e.appendChild(k);var n=document.createElement("div");n.style.marginLeft="4px";n.style.width="210px";n.style.height="24px";var l=document.createElement("input");
l.setAttribute("size","7");l.style.textAlign="right";n.appendChild(l);mxUtils.write(n," in x ");var q=document.createElement("input");q.setAttribute("size","7");q.style.textAlign="right";n.appendChild(q);mxUtils.write(n," in");e.style.display="none";n.style.display="none";for(var u={},t=PageSetupDialog.getFormats(),A=0;A<t.length;A++){var x=t[A];u[x.key]=x;var G=document.createElement("option");G.setAttribute("value",x.key);mxUtils.write(G,x.title);c.appendChild(G)}var z=!1;f();a.appendChild(c);mxUtils.br(a);
-a.appendChild(e);a.appendChild(n);var E=d,H=function(a,b){var g=u[c.value];null!=g.format?(l.value=g.format.width/100,q.value=g.format.height/100,n.style.display="none",e.style.display=""):(e.style.display="none",n.style.display="");g=parseFloat(l.value);if(isNaN(g)||0>=g)l.value=d.width/100;g=parseFloat(q.value);if(isNaN(g)||0>=g)q.value=d.height/100;g=new mxRectangle(0,0,Math.floor(100*parseFloat(l.value)),Math.floor(100*parseFloat(q.value)));"custom"!=c.value&&p.checked&&(g=new mxRectangle(0,0,
-g.height,g.width));b&&z||g.width==E.width&&g.height==E.height||(E=g,null!=k&&k(E))};mxEvent.addListener(b,"click",function(a){m.checked=!0;H(a);mxEvent.consume(a)});mxEvent.addListener(g,"click",function(a){p.checked=!0;H(a);mxEvent.consume(a)});mxEvent.addListener(l,"blur",H);mxEvent.addListener(l,"click",H);mxEvent.addListener(q,"blur",H);mxEvent.addListener(q,"click",H);mxEvent.addListener(p,"change",H);mxEvent.addListener(m,"change",H);mxEvent.addListener(c,"change",function(a){z="custom"==c.value;
+a.appendChild(e);a.appendChild(n);var E=d,H=function(a,b){var k=u[c.value];null!=k.format?(l.value=k.format.width/100,q.value=k.format.height/100,n.style.display="none",e.style.display=""):(e.style.display="none",n.style.display="");k=parseFloat(l.value);if(isNaN(k)||0>=k)l.value=d.width/100;k=parseFloat(q.value);if(isNaN(k)||0>=k)q.value=d.height/100;k=new mxRectangle(0,0,Math.floor(100*parseFloat(l.value)),Math.floor(100*parseFloat(q.value)));"custom"!=c.value&&p.checked&&(k=new mxRectangle(0,0,
+k.height,k.width));b&&z||k.width==E.width&&k.height==E.height||(E=k,null!=g&&g(E))};mxEvent.addListener(b,"click",function(a){m.checked=!0;H(a);mxEvent.consume(a)});mxEvent.addListener(k,"click",function(a){p.checked=!0;H(a);mxEvent.consume(a)});mxEvent.addListener(l,"blur",H);mxEvent.addListener(l,"click",H);mxEvent.addListener(q,"blur",H);mxEvent.addListener(q,"click",H);mxEvent.addListener(p,"change",H);mxEvent.addListener(m,"change",H);mxEvent.addListener(c,"change",function(a){z="custom"==c.value;
H(a,!0)});H();return{set:function(a){d=a;f(null,null,!0)},get:function(){return E},widthInput:l,heightInput:q}};
PageSetupDialog.getFormats=function(){return[{key:"letter",title:'US-Letter (8,5" x 11")',format:mxConstants.PAGE_FORMAT_LETTER_PORTRAIT},{key:"legal",title:'US-Legal (8,5" x 14")',format:new mxRectangle(0,0,850,1400)},{key:"tabloid",title:'US-Tabloid (11" x 17")',format:new mxRectangle(0,0,1100,1700)},{key:"executive",title:'US-Executive (7" x 10")',format:new mxRectangle(0,0,700,1E3)},{key:"a0",title:"A0 (841 mm x 1189 mm)",format:new mxRectangle(0,0,3300,4681)},{key:"a1",title:"A1 (594 mm x 841 mm)",
format:new mxRectangle(0,0,2339,3300)},{key:"a2",title:"A2 (420 mm x 594 mm)",format:new mxRectangle(0,0,1654,2336)},{key:"a3",title:"A3 (297 mm x 420 mm)",format:new mxRectangle(0,0,1169,1654)},{key:"a4",title:"A4 (210 mm x 297 mm)",format:mxConstants.PAGE_FORMAT_A4_PORTRAIT},{key:"a5",title:"A5 (148 mm x 210 mm)",format:new mxRectangle(0,0,583,827)},{key:"a6",title:"A6 (105 mm x 148 mm)",format:new mxRectangle(0,0,413,583)},{key:"a7",title:"A7 (74 mm x 105 mm)",format:new mxRectangle(0,0,291,413)},
{key:"b4",title:"B4 (250 mm x 353 mm)",format:new mxRectangle(0,0,980,1390)},{key:"b5",title:"B5 (176 mm x 250 mm)",format:new mxRectangle(0,0,690,980)},{key:"16-9",title:"16:9 (1600 x 900)",format:new mxRectangle(0,0,900,1600)},{key:"16-10",title:"16:10 (1920 x 1200)",format:new mxRectangle(0,0,1200,1920)},{key:"4-3",title:"4:3 (1600 x 1200)",format:new mxRectangle(0,0,1200,1600)},{key:"custom",title:mxResources.get("custom"),format:null}]};
-var FilenameDialog=function(a,b,d,k,f,m,p,c,e,g,n,l){e=null!=e?e:!0;var q,u,t=document.createElement("table"),A=document.createElement("tbody");t.style.marginTop="8px";q=document.createElement("tr");u=document.createElement("td");u.style.whiteSpace="nowrap";u.style.fontSize="10pt";u.style.width=n?"80px":"120px";mxUtils.write(u,(f||mxResources.get("filename"))+":");q.appendChild(u);var x=document.createElement("input");x.setAttribute("value",b||"");x.style.marginLeft="4px";x.style.width=null!=l?l+
-"px":"180px";var G=mxUtils.button(d,function(){if(null==m||m(x.value))e&&a.hideDialog(),k(x.value)});G.className="geBtn gePrimaryBtn";this.init=function(){if(null!=f||null==p)if(x.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?x.select():document.execCommand("selectAll",!1,null),Graph.fileSupport){var a=t.parentNode;if(null!=a){var c=null;mxEvent.addListener(a,"dragleave",function(a){null!=c&&(c.style.backgroundColor="",c=null);a.stopPropagation();a.preventDefault()});mxEvent.addListener(a,
-"dragover",mxUtils.bind(this,function(a){null==c&&(!mxClient.IS_IE||10<document.documentMode)&&(c=x,c.style.backgroundColor="#ebf2f9");a.stopPropagation();a.preventDefault()}));mxEvent.addListener(a,"drop",mxUtils.bind(this,function(a){null!=c&&(c.style.backgroundColor="",c=null);0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")&&(x.value=decodeURIComponent(a.dataTransfer.getData("text/uri-list")),G.click());a.stopPropagation();a.preventDefault()}))}}};u=document.createElement("td");u.style.whiteSpace=
-"nowrap";u.appendChild(x);q.appendChild(u);if(null!=f||null==p)A.appendChild(q),null!=n&&(null!=a.editor.diagramFileTypes&&(q=FilenameDialog.createFileTypes(a,x,a.editor.diagramFileTypes),q.style.marginLeft="6px",q.style.width="74px",u.appendChild(q),x.style.width=null!=l?l-40+"px":"140px"),u.appendChild(FilenameDialog.createTypeHint(a,x,n)));null!=p&&(q=document.createElement("tr"),u=document.createElement("td"),u.colSpan=2,u.appendChild(p),q.appendChild(u),A.appendChild(q));q=document.createElement("tr");
-u=document.createElement("td");u.colSpan=2;u.style.paddingTop="20px";u.style.whiteSpace="nowrap";u.setAttribute("align","right");n=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog();null!=g&&g()});n.className="geBtn";a.editor.cancelFirst&&u.appendChild(n);null!=c&&(l=mxUtils.button(mxResources.get("help"),function(){a.editor.graph.openLink(c)}),l.className="geBtn",u.appendChild(l));mxEvent.addListener(x,"keypress",function(a){13==a.keyCode&&G.click()});u.appendChild(G);a.editor.cancelFirst||
-u.appendChild(n);q.appendChild(u);A.appendChild(q);t.appendChild(A);this.container=t};FilenameDialog.filenameHelpLink=null;
-FilenameDialog.createTypeHint=function(a,b,d){var k=document.createElement("img");k.style.cssText="vertical-align:top;height:16px;width:16px;margin-left:4px;background-repeat:no-repeat;background-position:center bottom;cursor:pointer;";mxUtils.setOpacity(k,70);var f=function(){k.setAttribute("src",Editor.helpImage);k.setAttribute("title",mxResources.get("help"));for(var a=0;a<d.length;a++)if(0<d[a].ext.length&&b.value.toLowerCase().substring(b.value.length-d[a].ext.length-1)=="."+d[a].ext){k.setAttribute("src",
-mxClient.imageBasePath+"/warning.png");k.setAttribute("title",mxResources.get(d[a].title));break}};mxEvent.addListener(b,"keyup",f);mxEvent.addListener(b,"change",f);mxEvent.addListener(k,"click",function(b){var d=k.getAttribute("title");k.getAttribute("src")==Editor.helpImage?a.editor.graph.openLink(FilenameDialog.filenameHelpLink):""!=d&&a.showError(null,d,mxResources.get("help"),function(){a.editor.graph.openLink(FilenameDialog.filenameHelpLink)},null,mxResources.get("ok"),null,null,null,340,90);
-mxEvent.consume(b)});f();return k};
-FilenameDialog.createFileTypes=function(a,b,d){var k=document.createElement("select");for(a=0;a<d.length;a++){var f=document.createElement("option");f.setAttribute("value",a);mxUtils.write(f,mxResources.get(d[a].description)+" (."+d[a].extension+")");k.appendChild(f)}mxEvent.addListener(k,"change",function(a){a=d[k.value].extension;var f=b.value.lastIndexOf(".");0<f?(a=d[k.value].extension,b.value=b.value.substring(0,f+1)+a):b.value=b.value+"."+a;"createEvent"in document?(a=document.createEvent("HTMLEvents"),
-a.initEvent("change",!1,!0),b.dispatchEvent(a)):b.fireEvent("onchange")});a=function(a){var f=b.value.lastIndexOf(".");a=0;if(0<f)for(var f=b.value.toLowerCase().substring(f+1),c=0;c<d.length;c++)if(f==d[c].extension){a=c;break}k.value=a};mxEvent.addListener(b,"change",a);mxEvent.addListener(b,"keyup",a);a();return k};
+var FilenameDialog=function(a,b,d,g,f,m,p,c,e,k,n,l){e=null!=e?e:!0;var q,u,t=document.createElement("table"),A=document.createElement("tbody");t.style.position="absolute";t.style.top="30px";t.style.left="20px";q=document.createElement("tr");u=document.createElement("td");u.style.whiteSpace="nowrap";u.style.maxWidth="100px";u.style.textOverflow="ellipsis";u.style.fontSize="10pt";mxUtils.write(u,(f||mxResources.get("filename"))+":");q.appendChild(u);var x=document.createElement("input");x.setAttribute("value",
+b||"");x.style.marginLeft="4px";x.style.width=null!=l?l+"px":"180px";var G=mxUtils.button(d,function(){if(null==m||m(x.value))e&&a.hideDialog(),g(x.value)});G.className="geBtn gePrimaryBtn";this.init=function(){if(null!=f||null==p)if(x.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?x.select():document.execCommand("selectAll",!1,null),Graph.fileSupport){var a=t.parentNode;if(null!=a){var c=null;mxEvent.addListener(a,"dragleave",function(a){null!=c&&(c.style.backgroundColor="",c=null);
+a.stopPropagation();a.preventDefault()});mxEvent.addListener(a,"dragover",mxUtils.bind(this,function(a){null==c&&(!mxClient.IS_IE||10<document.documentMode)&&(c=x,c.style.backgroundColor="#ebf2f9");a.stopPropagation();a.preventDefault()}));mxEvent.addListener(a,"drop",mxUtils.bind(this,function(a){null!=c&&(c.style.backgroundColor="",c=null);0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")&&(x.value=decodeURIComponent(a.dataTransfer.getData("text/uri-list")),G.click());a.stopPropagation();
+a.preventDefault()}))}}};u=document.createElement("td");u.style.whiteSpace="nowrap";u.appendChild(x);q.appendChild(u);if(null!=f||null==p)A.appendChild(q),null!=n&&(u.appendChild(FilenameDialog.createTypeHint(a,x,n)),null!=a.editor.diagramFileTypes&&(q=document.createElement("tr"),u=document.createElement("td"),u.style.whiteSpace="nowrap",u.style.maxWidth="100px",u.style.textOverflow="ellipsis",u.style.fontSize="10pt",mxUtils.write(u,mxResources.get("type")+":"),q.appendChild(u),u=document.createElement("td"),
+u.style.whiteSpace="nowrap",q.appendChild(u),b=FilenameDialog.createFileTypes(a,x,a.editor.diagramFileTypes),b.style.marginLeft="4px",b.style.width="198px",u.appendChild(b),x.style.width=null!=l?l-40+"px":"190px",q.appendChild(u),A.appendChild(q)));null!=p&&(q=document.createElement("tr"),u=document.createElement("td"),u.colSpan=2,u.appendChild(p),q.appendChild(u),A.appendChild(q));q=document.createElement("tr");u=document.createElement("td");u.colSpan=2;u.style.paddingTop=null!=n?"12px":"20px";u.style.whiteSpace=
+"nowrap";u.setAttribute("align","right");n=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog();null!=k&&k()});n.className="geBtn";a.editor.cancelFirst&&u.appendChild(n);null!=c&&(l=mxUtils.button(mxResources.get("help"),function(){a.editor.graph.openLink(c)}),l.className="geBtn",u.appendChild(l));mxEvent.addListener(x,"keypress",function(a){13==a.keyCode&&G.click()});u.appendChild(G);a.editor.cancelFirst||u.appendChild(n);q.appendChild(u);A.appendChild(q);t.appendChild(A);this.container=
+t};FilenameDialog.filenameHelpLink=null;
+FilenameDialog.createTypeHint=function(a,b,d){var g=document.createElement("img");g.style.backgroundPosition="center bottom";g.style.backgroundRepeat="no-repeat";g.style.margin="2px 0 0 4px";g.style.verticalAlign="top";g.style.cursor="pointer";g.style.height="16px";g.style.width="16px";mxUtils.setOpacity(g,70);var f=function(){g.setAttribute("src",Editor.helpImage);g.setAttribute("title",mxResources.get("help"));for(var a=0;a<d.length;a++)if(0<d[a].ext.length&&b.value.toLowerCase().substring(b.value.length-
+d[a].ext.length-1)=="."+d[a].ext){g.setAttribute("title",mxResources.get(d[a].title));break}};mxEvent.addListener(b,"keyup",f);mxEvent.addListener(b,"change",f);mxEvent.addListener(g,"click",function(b){var d=g.getAttribute("title");g.getAttribute("src")==Editor.helpImage?a.editor.graph.openLink(FilenameDialog.filenameHelpLink):""!=d&&a.showError(null,d,mxResources.get("help"),function(){a.editor.graph.openLink(FilenameDialog.filenameHelpLink)},null,mxResources.get("ok"),null,null,null,340,90);mxEvent.consume(b)});
+f();return g};
+FilenameDialog.createFileTypes=function(a,b,d){var g=document.createElement("select");for(a=0;a<d.length;a++){var f=document.createElement("option");f.setAttribute("value",a);mxUtils.write(f,mxResources.get(d[a].description)+" (."+d[a].extension+")");g.appendChild(f)}mxEvent.addListener(g,"change",function(a){a=d[g.value].extension;var f=b.value.lastIndexOf(".drawio."),f=0<f?f:b.value.lastIndexOf(".");"drawio"!=a&&(a="drawio."+a);b.value=0<f?b.value.substring(0,f+1)+a:b.value+"."+a;"createEvent"in
+document?(a=document.createEvent("HTMLEvents"),a.initEvent("change",!1,!0),b.dispatchEvent(a)):b.fireEvent("onchange")});a=function(a){a=b.value.toLowerCase();for(var f=0,c=0;c<d.length;c++){var e=d[c].extension,k=null;"drawio"!=e&&(k=e,e=".drawio."+e);if(a.substring(a.length-e.length-1)=="."+e||null!=k&&a.substring(a.length-k.length-1)=="."+k){f=c;break}}g.value=f};mxEvent.addListener(b,"change",a);mxEvent.addListener(b,"keyup",a);a();return g};
(function(){mxGraphView.prototype.validateBackgroundPage=function(){var a=this.graph;if(null!=a.container&&!a.transparentBackground){if(a.pageVisible){var c=this.getBackgroundPageBounds();if(null==this.backgroundPageShape){for(var e=a.container.firstChild;null!=e&&e.nodeType!=mxConstants.NODETYPE_ELEMENT;)e=e.nextSibling;null!=e&&(this.backgroundPageShape=this.createBackgroundPageShape(c),this.backgroundPageShape.scale=1,this.backgroundPageShape.isShadow=!0,this.backgroundPageShape.dialect=mxConstants.DIALECT_STRICTHTML,
this.backgroundPageShape.init(a.container),e.style.position="absolute",a.container.insertBefore(this.backgroundPageShape.node,e),this.backgroundPageShape.redraw(),this.backgroundPageShape.node.className="geBackgroundPage",mxEvent.addListener(this.backgroundPageShape.node,"dblclick",mxUtils.bind(this,function(c){a.dblClick(c)})),mxEvent.addGestureListeners(this.backgroundPageShape.node,mxUtils.bind(this,function(c){a.fireMouseEvent(mxEvent.MOUSE_DOWN,new mxMouseEvent(c))}),mxUtils.bind(this,function(c){null!=
a.tooltipHandler&&a.tooltipHandler.isHideOnHover()&&a.tooltipHandler.hide();a.isMouseDown&&!mxEvent.isConsumed(c)&&a.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(c))}),mxUtils.bind(this,function(c){a.fireMouseEvent(mxEvent.MOUSE_UP,new mxMouseEvent(c))})))}else this.backgroundPageShape.scale=1,this.backgroundPageShape.bounds=c,this.backgroundPageShape.redraw()}else null!=this.backgroundPageShape&&(this.backgroundPageShape.destroy(),this.backgroundPageShape=null);this.validateBackgroundStyles()}};
@@ -2108,54 +2109,54 @@ mxGraphView.prototype.validateBackgroundStyles=function(){var a=this.graph,c=nul
")";var f=e=0;null!=a.view.backgroundPageShape&&(f=this.getBackgroundPageBounds(),e=1+f.x,f=1+f.y);d=-Math.round(d-mxUtils.mod(this.translate.x*this.scale-e,d))+"px "+-Math.round(d-mxUtils.mod(this.translate.y*this.scale-f,d))+"px"}e=a.view.canvas;null!=e.ownerSVGElement&&(e=e.ownerSVGElement);null!=a.view.backgroundPageShape?(a.view.backgroundPageShape.node.style.backgroundPosition=d,a.view.backgroundPageShape.node.style.backgroundImage=b,a.view.backgroundPageShape.node.style.backgroundColor=c,a.view.backgroundPageShape.node.style.borderColor=
a.defaultPageBorderColor,a.container.className="geDiagramContainer geDiagramBackdrop",e.style.backgroundImage="none",e.style.backgroundColor=""):(a.container.className="geDiagramContainer",e.style.backgroundPosition=d,e.style.backgroundColor=c,e.style.backgroundImage=b)};mxGraphView.prototype.createSvgGrid=function(a){for(var c=this.graph.gridSize*this.scale;c<this.minGridSize;)c*=2;for(var e=this.gridSteps*c,b=[],d=1;d<this.gridSteps;d++){var f=d*c;b.push("M 0 "+f+" L "+e+" "+f+" M "+f+" 0 L "+f+
" "+e)}return'<svg width="'+e+'" height="'+e+'" xmlns="'+mxConstants.NS_SVG+'"><defs><pattern id="grid" width="'+e+'" height="'+e+'" patternUnits="userSpaceOnUse"><path d="'+b.join(" ")+'" fill="none" stroke="'+a+'" opacity="0.2" stroke-width="1"/><path d="M '+e+" 0 L 0 0 0 "+e+'" fill="none" stroke="'+a+'" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(#grid)"/></svg>'};var a=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(b,c){a.apply(this,arguments);
-if(null!=this.shiftPreview1){var e=this.view.canvas;null!=e.ownerSVGElement&&(e=e.ownerSVGElement);var g=this.gridSize*this.view.scale*this.view.gridSteps,g=-Math.round(g-mxUtils.mod(this.view.translate.x*this.view.scale+b,g))+"px "+-Math.round(g-mxUtils.mod(this.view.translate.y*this.view.scale+c,g))+"px";e.style.backgroundPosition=g}};mxGraph.prototype.updatePageBreaks=function(a,c,e){var b=this.view.scale,d=this.view.translate,f=this.pageFormat,k=b*this.pageScale,m=this.view.getBackgroundPageBounds();
-c=m.width;e=m.height;var t=new mxRectangle(b*d.x,b*d.y,f.width*k,f.height*k),p=(a=a&&Math.min(t.width,t.height)>this.minPageBreakDist)?Math.ceil(e/t.height)-1:0,x=a?Math.ceil(c/t.width)-1:0,G=m.x+c,z=m.y+e;null==this.horizontalPageBreaks&&0<p&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<x&&(this.verticalPageBreaks=[]);a=mxUtils.bind(this,function(a){if(null!=a){for(var c=a==this.horizontalPageBreaks?p:x,e=0;e<=c;e++){var b=a==this.horizontalPageBreaks?[new mxPoint(Math.round(m.x),
+if(null!=this.shiftPreview1){var e=this.view.canvas;null!=e.ownerSVGElement&&(e=e.ownerSVGElement);var k=this.gridSize*this.view.scale*this.view.gridSteps,k=-Math.round(k-mxUtils.mod(this.view.translate.x*this.view.scale+b,k))+"px "+-Math.round(k-mxUtils.mod(this.view.translate.y*this.view.scale+c,k))+"px";e.style.backgroundPosition=k}};mxGraph.prototype.updatePageBreaks=function(a,c,e){var b=this.view.scale,d=this.view.translate,f=this.pageFormat,g=b*this.pageScale,m=this.view.getBackgroundPageBounds();
+c=m.width;e=m.height;var t=new mxRectangle(b*d.x,b*d.y,f.width*g,f.height*g),p=(a=a&&Math.min(t.width,t.height)>this.minPageBreakDist)?Math.ceil(e/t.height)-1:0,x=a?Math.ceil(c/t.width)-1:0,G=m.x+c,z=m.y+e;null==this.horizontalPageBreaks&&0<p&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<x&&(this.verticalPageBreaks=[]);a=mxUtils.bind(this,function(a){if(null!=a){for(var c=a==this.horizontalPageBreaks?p:x,e=0;e<=c;e++){var b=a==this.horizontalPageBreaks?[new mxPoint(Math.round(m.x),
Math.round(m.y+(e+1)*t.height)),new mxPoint(Math.round(G),Math.round(m.y+(e+1)*t.height))]:[new mxPoint(Math.round(m.x+(e+1)*t.width),Math.round(m.y)),new mxPoint(Math.round(m.x+(e+1)*t.width),Math.round(z))];null!=a[e]?(a[e].points=b,a[e].redraw()):(b=new mxPolyline(b,this.pageBreakColor),b.dialect=this.dialect,b.isDashed=this.pageBreakDashed,b.pointerEvents=!1,b.init(this.view.backgroundPane),b.redraw(),a[e]=b)}for(e=c;e<a.length;e++)a[e].destroy();a.splice(c,a.length-c)}});a(this.horizontalPageBreaks);
-a(this.verticalPageBreaks)};var b=mxGraphHandler.prototype.shouldRemoveCellsFromParent;mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(a,c,e){for(var g=0;g<c.length;g++){if(this.graph.isTableCell(c[g])||this.graph.isTableRow(c[g]))return!1;if(this.graph.getModel().isVertex(c[g])){var d=this.graph.getCellGeometry(c[g]);if(null!=d&&d.relative)return!1}}return b.apply(this,arguments)};var d=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var a=
+a(this.verticalPageBreaks)};var b=mxGraphHandler.prototype.shouldRemoveCellsFromParent;mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(a,c,e){for(var k=0;k<c.length;k++){if(this.graph.isTableCell(c[k])||this.graph.isTableRow(c[k]))return!1;if(this.graph.getModel().isVertex(c[k])){var d=this.graph.getCellGeometry(c[k]);if(null!=d&&d.relative)return!1}}return b.apply(this,arguments)};var d=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var a=
d.apply(this,arguments);a.intersects=mxUtils.bind(this,function(c,e){return this.isConnecting()?!0:mxCellMarker.prototype.intersects.apply(a,arguments)});return a};mxGraphView.prototype.createBackgroundPageShape=function(a){return new mxRectangleShape(a,"#ffffff",this.graph.defaultPageBorderColor)};mxGraphView.prototype.getBackgroundPageBounds=function(){var a=this.getGraphBounds(),c=0<a.width?a.x/this.scale-this.translate.x:0,e=0<a.height?a.y/this.scale-this.translate.y:0,b=this.graph.pageFormat,
-d=this.graph.pageScale,f=b.width*d,b=b.height*d,d=Math.floor(Math.min(0,c)/f),k=Math.floor(Math.min(0,e)/b);return new mxRectangle(this.scale*(this.translate.x+d*f),this.scale*(this.translate.y+k*b),this.scale*(Math.ceil(Math.max(1,c+a.width/this.scale)/f)-d)*f,this.scale*(Math.ceil(Math.max(1,e+a.height/this.scale)/b)-k)*b)};var k=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(a,c){k.apply(this,arguments);this.dialect==mxConstants.DIALECT_SVG||null==this.view.backgroundPageShape||
-this.useScrollbarsForPanning&&mxUtils.hasScrollbars(this.container)||(this.view.backgroundPageShape.node.style.marginLeft=a+"px",this.view.backgroundPageShape.node.style.marginTop=c+"px")};var f=mxPopupMenu.prototype.addItem;mxPopupMenu.prototype.addItem=function(a,c,e,b,d,k){var g=f.apply(this,arguments);null==k||k||mxEvent.addListener(g,"mousedown",function(a){mxEvent.consume(a)});return g};var m=mxGraphHandler.prototype.isPropagateSelectionCell;mxGraphHandler.prototype.isPropagateSelectionCell=
+d=this.graph.pageScale,f=b.width*d,b=b.height*d,d=Math.floor(Math.min(0,c)/f),g=Math.floor(Math.min(0,e)/b);return new mxRectangle(this.scale*(this.translate.x+d*f),this.scale*(this.translate.y+g*b),this.scale*(Math.ceil(Math.max(1,c+a.width/this.scale)/f)-d)*f,this.scale*(Math.ceil(Math.max(1,e+a.height/this.scale)/b)-g)*b)};var g=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(a,c){g.apply(this,arguments);this.dialect==mxConstants.DIALECT_SVG||null==this.view.backgroundPageShape||
+this.useScrollbarsForPanning&&mxUtils.hasScrollbars(this.container)||(this.view.backgroundPageShape.node.style.marginLeft=a+"px",this.view.backgroundPageShape.node.style.marginTop=c+"px")};var f=mxPopupMenu.prototype.addItem;mxPopupMenu.prototype.addItem=function(a,c,e,b,d,g){var k=f.apply(this,arguments);null==g||g||mxEvent.addListener(k,"mousedown",function(a){mxEvent.consume(a)});return k};var m=mxGraphHandler.prototype.isPropagateSelectionCell;mxGraphHandler.prototype.isPropagateSelectionCell=
function(a,c,e){var b,d=this.graph.model.getParent(a);if(c)b=this.graph.model.isEdge(a)?null:this.graph.getCellGeometry(a),b=!this.graph.model.isEdge(d)&&!this.graph.isSiblingSelected(a)&&(null!=b&&b.relative||!this.graph.isContainer(d)||this.graph.isPart(a));else if(b=m.apply(this,arguments),this.graph.isTableCell(a)||this.graph.isTableRow(a))b=d,this.graph.isTable(b)||(b=this.graph.model.getParent(b)),b=!this.graph.selectionCellsHandler.isHandled(b)||this.graph.isCellSelected(b)&&this.graph.isToggleEvent(e.getEvent())||
-this.graph.isCellSelected(a)&&!this.graph.isToggleEvent(e.getEvent())||this.graph.isTableCell(a)&&this.graph.isCellSelected(d);return b};mxPopupMenuHandler.prototype.getCellForPopupEvent=function(a){a=a.getCell();for(var c=this.graph.getModel(),e=c.getParent(a),b=this.graph.view.getState(e),d=this.graph.isCellSelected(a);null!=b&&(c.isVertex(e)||c.isEdge(e));){var f=this.graph.isCellSelected(e),d=d||f;if(f||!d&&(this.graph.isTableCell(a)||this.graph.isTableRow(a)))a=e;e=c.getParent(e)}return a}})();EditorUi=function(a,b,d){mxEventSource.call(this);this.destroyFunctions=[];this.editor=a||new Editor;this.container=b||document.body;var k=this.editor.graph;k.lightbox=d;this.initialDefaultVertexStyle=mxUtils.clone(k.defaultVertexStyle);this.initialDefaultEdgeStyle=mxUtils.clone(k.defaultEdgeStyle);k.useCssTransforms&&(this.lazyZoomDelay=0);mxClient.IS_SVG?mxPopupMenu.prototype.submenuImage="data:image/gif;base64,R0lGODlhCQAJAIAAAP///zMzMyH5BAEAAAAALAAAAAAJAAkAAAIPhI8WebHsHopSOVgb26AAADs=":(new Image).src=
-mxPopupMenu.prototype.submenuImage;mxClient.IS_SVG||null==mxConnectionHandler.prototype.connectImage||((new Image).src=mxConnectionHandler.prototype.connectImage.src);this.editor.chromeless&&!this.editor.editable&&(this.footerHeight=0,k.isEnabled=function(){return!1},k.panningHandler.isForcePanningEvent=function(a){return!mxEvent.isPopupTrigger(a.getEvent())});this.actions=new Actions(this);this.menus=this.createMenus();if(!k.standalone){var f="rounded shadow glass dashed dashPattern labelBackgroundColor comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification sketchStyle pointerEvents".split(" "),
-m="shape edgeStyle curved rounded elbow jumpStyle jumpSize comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification sketchStyle".split(" ");this.setDefaultStyle=function(a){try{var c=k.view.getState(a);if(null!=c){var e=a.clone();e.style="";var b=k.getCellStyle(e);a=[];var e=[],d;for(d in c.style)b[d]!=c.style[d]&&(a.push(c.style[d]),e.push(d));for(var g=k.getModel().getStyle(c.cell),f=null!=g?g.split(";"):[],g=0;g<f.length;g++){var n=
-f[g],l=n.indexOf("=");if(0<=l){d=n.substring(0,l);var q=n.substring(l+1);null!=b[d]&&"none"==q&&(a.push(q),e.push(d))}}k.getModel().isEdge(c.cell)?k.currentEdgeStyle={}:k.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",e,"values",a,"cells",[c.cell]))}}catch(aa){this.handleError(aa)}};this.clearDefaultStyle=function(){k.currentEdgeStyle=mxUtils.clone(k.defaultEdgeStyle);k.currentVertexStyle=mxUtils.clone(k.defaultVertexStyle);this.fireEvent(new mxEventObject("styleChanged",
+this.graph.isCellSelected(a)&&!this.graph.isToggleEvent(e.getEvent())||this.graph.isTableCell(a)&&this.graph.isCellSelected(d);return b};mxPopupMenuHandler.prototype.getCellForPopupEvent=function(a){a=a.getCell();for(var c=this.graph.getModel(),e=c.getParent(a),b=this.graph.view.getState(e),d=this.graph.isCellSelected(a);null!=b&&(c.isVertex(e)||c.isEdge(e));){var f=this.graph.isCellSelected(e),d=d||f;if(f||!d&&(this.graph.isTableCell(a)||this.graph.isTableRow(a)))a=e;e=c.getParent(e)}return a}})();EditorUi=function(a,b,d){mxEventSource.call(this);this.destroyFunctions=[];this.editor=a||new Editor;this.container=b||document.body;var g=this.editor.graph;g.lightbox=d;this.initialDefaultVertexStyle=mxUtils.clone(g.defaultVertexStyle);this.initialDefaultEdgeStyle=mxUtils.clone(g.defaultEdgeStyle);g.useCssTransforms&&(this.lazyZoomDelay=0);mxClient.IS_SVG?mxPopupMenu.prototype.submenuImage="data:image/gif;base64,R0lGODlhCQAJAIAAAP///zMzMyH5BAEAAAAALAAAAAAJAAkAAAIPhI8WebHsHopSOVgb26AAADs=":(new Image).src=
+mxPopupMenu.prototype.submenuImage;mxClient.IS_SVG||null==mxConnectionHandler.prototype.connectImage||((new Image).src=mxConnectionHandler.prototype.connectImage.src);this.editor.chromeless&&!this.editor.editable&&(this.footerHeight=0,g.isEnabled=function(){return!1},g.panningHandler.isForcePanningEvent=function(a){return!mxEvent.isPopupTrigger(a.getEvent())});this.actions=new Actions(this);this.menus=this.createMenus();if(!g.standalone){var f="rounded shadow glass dashed dashPattern labelBackgroundColor comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification sketchStyle pointerEvents".split(" "),
+m="shape edgeStyle curved rounded elbow jumpStyle jumpSize comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification sketchStyle".split(" ");this.setDefaultStyle=function(a){try{var c=g.view.getState(a);if(null!=c){var e=a.clone();e.style="";var b=g.getCellStyle(e);a=[];var e=[],d;for(d in c.style)b[d]!=c.style[d]&&(a.push(c.style[d]),e.push(d));for(var k=g.getModel().getStyle(c.cell),f=null!=k?k.split(";"):[],k=0;k<f.length;k++){var n=
+f[k],l=n.indexOf("=");if(0<=l){d=n.substring(0,l);var q=n.substring(l+1);null!=b[d]&&"none"==q&&(a.push(q),e.push(d))}}g.getModel().isEdge(c.cell)?g.currentEdgeStyle={}:g.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",e,"values",a,"cells",[c.cell]))}}catch(Z){this.handleError(Z)}};this.clearDefaultStyle=function(){g.currentEdgeStyle=mxUtils.clone(g.defaultEdgeStyle);g.currentVertexStyle=mxUtils.clone(g.defaultVertexStyle);this.fireEvent(new mxEventObject("styleChanged",
"keys",[],"values",[],"cells",[]))};var p=["fontFamily","fontSource","fontSize","fontColor"];for(b=0;b<p.length;b++)0>mxUtils.indexOf(f,p[b])&&f.push(p[b]);var c="edgeStyle startArrow startFill startSize endArrow endFill endSize".split(" "),e=[["startArrow","startFill","endArrow","endFill"],["startSize","endSize"],["sourcePerimeterSpacing","targetPerimeterSpacing"],["strokeColor","strokeWidth"],["fillColor","gradientColor","gradientDirection"],["align","verticalAlign"],["opacity"],["html"]];for(b=
-0;b<e.length;b++)for(d=0;d<e[b].length;d++)f.push(e[b][d]);for(b=0;b<m.length;b++)0>mxUtils.indexOf(f,m[b])&&f.push(m[b]);var g=function(a,c,b,d,g,n,l){d=null!=d?d:k.currentVertexStyle;g=null!=g?g:k.currentEdgeStyle;b=null!=b?b:k.getModel();if(l){l=[];for(var v=0;v<a.length;v++)l=l.concat(b.getDescendants(a[v]));a=l}b.beginUpdate();try{for(v=0;v<a.length;v++){var q=a[v],B;if(c)B=["fontSize","fontFamily","fontColor"];else{var t=b.getStyle(q),u=null!=t?t.split(";"):[];B=f.slice();for(var D=0;D<u.length;D++){var J=
-u[D],p=J.indexOf("=");if(0<=p){var x=J.substring(0,p),N=mxUtils.indexOf(B,x);0<=N&&B.splice(N,1);for(l=0;l<e.length;l++){var z=e[l];if(0<=mxUtils.indexOf(z,x))for(var A=0;A<z.length;A++){var C=mxUtils.indexOf(B,z[A]);0<=C&&B.splice(C,1)}}}}}var E=b.isEdge(q);l=E?g:d;for(var H=b.getStyle(q),D=0;D<B.length;D++){var x=B[D],G=l[x];null!=G&&("shape"!=x||E)&&(!E||n||0>mxUtils.indexOf(m,x))&&(H=mxUtils.setStyle(H,x,G))}Editor.simpleLabels&&(H=mxUtils.setStyle(mxUtils.setStyle(H,"html",null),"whiteSpace",
-null));b.setStyle(q,H)}}finally{b.endUpdate()}};k.addListener("cellsInserted",function(a,c){g(c.getProperty("cells"))});k.addListener("textInserted",function(a,c){g(c.getProperty("cells"),!0)});this.insertHandler=g;this.createDivs();this.createUi();this.refresh();var n=mxUtils.bind(this,function(a){null==a&&(a=window.event);return k.isEditing()||null!=a&&this.isSelectionAllowed(a)});this.container==document.body&&(this.menubarContainer.onselectstart=n,this.menubarContainer.onmousedown=n,this.toolbarContainer.onselectstart=
+0;b<e.length;b++)for(d=0;d<e[b].length;d++)f.push(e[b][d]);for(b=0;b<m.length;b++)0>mxUtils.indexOf(f,m[b])&&f.push(m[b]);var k=function(a,c,b,d,k,n,l){d=null!=d?d:g.currentVertexStyle;k=null!=k?k:g.currentEdgeStyle;b=null!=b?b:g.getModel();if(l){l=[];for(var v=0;v<a.length;v++)l=l.concat(b.getDescendants(a[v]));a=l}b.beginUpdate();try{for(v=0;v<a.length;v++){var q=a[v],B;if(c)B=["fontSize","fontFamily","fontColor"];else{var t=b.getStyle(q),u=null!=t?t.split(";"):[];B=f.slice();for(var C=0;C<u.length;C++){var J=
+u[C],x=J.indexOf("=");if(0<=x){var p=J.substring(0,x),z=mxUtils.indexOf(B,p);0<=z&&B.splice(z,1);for(l=0;l<e.length;l++){var N=e[l];if(0<=mxUtils.indexOf(N,p))for(var A=0;A<N.length;A++){var D=mxUtils.indexOf(B,N[A]);0<=D&&B.splice(D,1)}}}}}var E=b.isEdge(q);l=E?k:d;for(var H=b.getStyle(q),C=0;C<B.length;C++){var p=B[C],G=l[p];null!=G&&("shape"!=p||E)&&(!E||n||0>mxUtils.indexOf(m,p))&&(H=mxUtils.setStyle(H,p,G))}Editor.simpleLabels&&(H=mxUtils.setStyle(mxUtils.setStyle(H,"html",null),"whiteSpace",
+null));b.setStyle(q,H)}}finally{b.endUpdate()}};g.addListener("cellsInserted",function(a,c){k(c.getProperty("cells"))});g.addListener("textInserted",function(a,c){k(c.getProperty("cells"),!0)});this.insertHandler=k;this.createDivs();this.createUi();this.refresh();var n=mxUtils.bind(this,function(a){null==a&&(a=window.event);return g.isEditing()||null!=a&&this.isSelectionAllowed(a)});this.container==document.body&&(this.menubarContainer.onselectstart=n,this.menubarContainer.onmousedown=n,this.toolbarContainer.onselectstart=
n,this.toolbarContainer.onmousedown=n,this.diagramContainer.onselectstart=n,this.diagramContainer.onmousedown=n,this.sidebarContainer.onselectstart=n,this.sidebarContainer.onmousedown=n,this.formatContainer.onselectstart=n,this.formatContainer.onmousedown=n,this.footerContainer.onselectstart=n,this.footerContainer.onmousedown=n,null!=this.tabContainer&&(this.tabContainer.onselectstart=n));!this.editor.chromeless||this.editor.editable?(b=function(a){if(null!=a){var c=mxEvent.getSource(a);if("A"==c.nodeName)for(;null!=
-c;){if("geHint"==c.className)return!0;c=c.parentNode}}return n(a)},mxClient.IS_IE&&("undefined"===typeof document.documentMode||9>document.documentMode)?mxEvent.addListener(this.diagramContainer,"contextmenu",b):this.diagramContainer.oncontextmenu=b):k.panningHandler.usePopupTrigger=!1;k.init(this.diagramContainer);mxClient.IS_SVG&&null!=k.view.getDrawPane()&&(b=k.view.getDrawPane().ownerSVGElement,null!=b&&(b.style.position="absolute"));this.hoverIcons=this.createHoverIcons();if(null!=k.graphHandler){var l=
-k.graphHandler.start;k.graphHandler.start=function(){null!=F.hoverIcons&&F.hoverIcons.reset();l.apply(this,arguments)}}mxEvent.addListener(this.diagramContainer,"mousemove",mxUtils.bind(this,function(a){var c=mxUtils.getOffset(this.diagramContainer);0<mxEvent.getClientX(a)-c.x-this.diagramContainer.clientWidth||0<mxEvent.getClientY(a)-c.y-this.diagramContainer.clientHeight?this.diagramContainer.setAttribute("title",mxResources.get("panTooltip")):this.diagramContainer.removeAttribute("title")}));var q=
-!1,u=this.hoverIcons.isResetEvent;this.hoverIcons.isResetEvent=function(a,c){return q||u.apply(this,arguments)};this.keydownHandler=mxUtils.bind(this,function(a){32!=a.which||k.isEditing()?mxEvent.isConsumed(a)||27!=a.keyCode||this.hideDialog(null,!0):(q=!0,this.hoverIcons.reset(),k.container.style.cursor="move",k.isEditing()||mxEvent.getSource(a)!=k.container||mxEvent.consume(a))});mxEvent.addListener(document,"keydown",this.keydownHandler);this.keyupHandler=mxUtils.bind(this,function(a){k.container.style.cursor=
-"";q=!1});mxEvent.addListener(document,"keyup",this.keyupHandler);var t=k.panningHandler.isForcePanningEvent;k.panningHandler.isForcePanningEvent=function(a){return t.apply(this,arguments)||q||mxEvent.isMouseEvent(a.getEvent())&&(this.usePopupTrigger||!mxEvent.isPopupTrigger(a.getEvent()))&&(!mxEvent.isControlDown(a.getEvent())&&mxEvent.isRightMouseButton(a.getEvent())||mxEvent.isMiddleMouseButton(a.getEvent()))};var A=k.cellEditor.isStopEditingEvent;k.cellEditor.isStopEditingEvent=function(a){return A.apply(this,
-arguments)||13==a.keyCode&&(!mxClient.IS_SF&&mxEvent.isControlDown(a)||mxClient.IS_MAC&&mxEvent.isMetaDown(a)||mxClient.IS_SF&&mxEvent.isShiftDown(a))};var x=k.isZoomWheelEvent;k.isZoomWheelEvent=function(){return q||x.apply(this,arguments)};var G=!1,z=null,E=null,H=null,K=mxUtils.bind(this,function(){if(null!=this.toolbar&&G!=k.cellEditor.isContentEditing()){for(var a=this.toolbar.container.firstChild,c=[];null!=a;){var e=a.nextSibling;0>mxUtils.indexOf(this.toolbar.staticElements,a)&&(a.parentNode.removeChild(a),
-c.push(a));a=e}a=this.toolbar.fontMenu;e=this.toolbar.sizeMenu;if(null==H)this.toolbar.createTextToolbar();else{for(var b=0;b<H.length;b++)this.toolbar.container.appendChild(H[b]);this.toolbar.fontMenu=z;this.toolbar.sizeMenu=E}G=k.cellEditor.isContentEditing();z=a;E=e;H=c}}),F=this,I=k.cellEditor.startEditing;k.cellEditor.startEditing=function(){I.apply(this,arguments);K();if(k.cellEditor.isContentEditing()){var a=!1,c=function(){a||(a=!0,window.setTimeout(function(){var c=k.getSelectedEditingElement();
-null!=c&&(c=mxUtils.getCurrentStyle(c),null!=c&&null!=F.toolbar&&(F.toolbar.setFontName(Graph.stripQuotes(c.fontFamily)),F.toolbar.setFontSize(parseInt(c.fontSize))));a=!1},0))};mxEvent.addListener(k.cellEditor.textarea,"input",c);mxEvent.addListener(k.cellEditor.textarea,"touchend",c);mxEvent.addListener(k.cellEditor.textarea,"mouseup",c);mxEvent.addListener(k.cellEditor.textarea,"keyup",c);c()}};var C=k.cellEditor.stopEditing;k.cellEditor.stopEditing=function(a,c){try{C.apply(this,arguments),K()}catch(N){F.handleError(N)}};
-k.container.setAttribute("tabindex","0");k.container.style.cursor="default";if(window.self===window.top&&null!=k.container.parentNode)try{k.container.focus()}catch(U){}var M=k.fireMouseEvent;k.fireMouseEvent=function(a,c,e){a==mxEvent.MOUSE_DOWN&&this.container.focus();M.apply(this,arguments)};k.popupMenuHandler.autoExpand=!0;null!=this.menus&&(k.popupMenuHandler.factoryMethod=mxUtils.bind(this,function(a,c,e){this.menus.createPopupMenu(a,c,e)}));mxEvent.addGestureListeners(document,mxUtils.bind(this,
-function(a){k.popupMenuHandler.hideMenu()}));this.keyHandler=this.createKeyHandler(a);this.getKeyHandler=function(){return keyHandler};k.connectionHandler.addListener(mxEvent.CONNECT,function(a,c){var e=[c.getProperty("cell")];c.getProperty("terminalInserted")&&(e.push(c.getProperty("terminal")),window.setTimeout(function(){null!=F.hoverIcons&&F.hoverIcons.update(k.view.getState(e[e.length-1]))},0));g(e)});this.addListener("styleChanged",mxUtils.bind(this,function(a,e){var b=e.getProperty("cells"),
-d=!1,g=!1;if(0<b.length)for(var n=0;n<b.length&&(d=k.getModel().isVertex(b[n])||d,!(g=k.getModel().isEdge(b[n])||g)||!d);n++);else g=d=!0;for(var b=e.getProperty("keys"),l=e.getProperty("values"),n=0;n<b.length;n++){var q=0<=mxUtils.indexOf(p,b[n]);if("strokeColor"!=b[n]||null!=l[n]&&"none"!=l[n])if(0<=mxUtils.indexOf(m,b[n]))g||0<=mxUtils.indexOf(c,b[n])?null==l[n]?delete k.currentEdgeStyle[b[n]]:k.currentEdgeStyle[b[n]]=l[n]:d&&0<=mxUtils.indexOf(f,b[n])&&(null==l[n]?delete k.currentVertexStyle[b[n]]:
-k.currentVertexStyle[b[n]]=l[n]);else if(0<=mxUtils.indexOf(f,b[n])){if(d||q)null==l[n]?delete k.currentVertexStyle[b[n]]:k.currentVertexStyle[b[n]]=l[n];if(g||q||0<=mxUtils.indexOf(c,b[n]))null==l[n]?delete k.currentEdgeStyle[b[n]]:k.currentEdgeStyle[b[n]]=l[n]}}null!=this.toolbar&&(this.toolbar.setFontName(k.currentVertexStyle.fontFamily||Menus.prototype.defaultFont),this.toolbar.setFontSize(k.currentVertexStyle.fontSize||Menus.prototype.defaultFontSize),null!=this.toolbar.edgeStyleMenu&&(this.toolbar.edgeStyleMenu.getElementsByTagName("div")[0].className=
-"orthogonalEdgeStyle"==k.currentEdgeStyle.edgeStyle&&"1"==k.currentEdgeStyle.curved?"geSprite geSprite-curved":"straight"==k.currentEdgeStyle.edgeStyle||"none"==k.currentEdgeStyle.edgeStyle||null==k.currentEdgeStyle.edgeStyle?"geSprite geSprite-straight":"entityRelationEdgeStyle"==k.currentEdgeStyle.edgeStyle?"geSprite geSprite-entity":"elbowEdgeStyle"==k.currentEdgeStyle.edgeStyle?"geSprite geSprite-"+("vertical"==k.currentEdgeStyle.elbow?"verticalelbow":"horizontalelbow"):"isometricEdgeStyle"==
-k.currentEdgeStyle.edgeStyle?"geSprite geSprite-"+("vertical"==k.currentEdgeStyle.elbow?"verticalisometric":"horizontalisometric"):"geSprite geSprite-orthogonal"),null!=this.toolbar.edgeShapeMenu&&(this.toolbar.edgeShapeMenu.getElementsByTagName("div")[0].className="link"==k.currentEdgeStyle.shape?"geSprite geSprite-linkedge":"flexArrow"==k.currentEdgeStyle.shape?"geSprite geSprite-arrow":"arrow"==k.currentEdgeStyle.shape?"geSprite geSprite-simplearrow":"geSprite geSprite-connection"),null!=this.toolbar.lineStartMenu&&
-(this.toolbar.lineStartMenu.getElementsByTagName("div")[0].className=this.getCssClassForMarker("start",k.currentEdgeStyle.shape,k.currentEdgeStyle[mxConstants.STYLE_STARTARROW],mxUtils.getValue(k.currentEdgeStyle,"startFill","1"))),null!=this.toolbar.lineEndMenu&&(this.toolbar.lineEndMenu.getElementsByTagName("div")[0].className=this.getCssClassForMarker("end",k.currentEdgeStyle.shape,k.currentEdgeStyle[mxConstants.STYLE_ENDARROW],mxUtils.getValue(k.currentEdgeStyle,"endFill","1"))))}));null!=this.toolbar&&
-(a=mxUtils.bind(this,function(){var a=k.currentVertexStyle.fontFamily||"Helvetica",c=String(k.currentVertexStyle.fontSize||"12"),e=k.getView().getState(k.getSelectionCell());null!=e&&(a=e.style[mxConstants.STYLE_FONTFAMILY]||a,c=e.style[mxConstants.STYLE_FONTSIZE]||c,10<a.length&&(a=a.substring(0,8)+"..."));this.toolbar.setFontName(a);this.toolbar.setFontSize(c)}),k.getSelectionModel().addListener(mxEvent.CHANGE,a),k.getModel().addListener(mxEvent.CHANGE,a));k.addListener(mxEvent.CELLS_ADDED,function(a,
-c){var e=c.getProperty("cells"),b=c.getProperty("parent");k.getModel().isLayer(b)&&!k.isCellVisible(b)&&null!=e&&0<e.length&&k.getModel().setVisible(b,!0)});this.gestureHandler=mxUtils.bind(this,function(a){null!=this.currentMenu&&mxEvent.getSource(a)!=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,
+c;){if("geHint"==c.className)return!0;c=c.parentNode}}return n(a)},mxClient.IS_IE&&("undefined"===typeof document.documentMode||9>document.documentMode)?mxEvent.addListener(this.diagramContainer,"contextmenu",b):this.diagramContainer.oncontextmenu=b):g.panningHandler.usePopupTrigger=!1;g.init(this.diagramContainer);mxClient.IS_SVG&&null!=g.view.getDrawPane()&&(b=g.view.getDrawPane().ownerSVGElement,null!=b&&(b.style.position="absolute"));this.hoverIcons=this.createHoverIcons();if(null!=g.graphHandler){var l=
+g.graphHandler.start;g.graphHandler.start=function(){null!=F.hoverIcons&&F.hoverIcons.reset();l.apply(this,arguments)}}mxEvent.addListener(this.diagramContainer,"mousemove",mxUtils.bind(this,function(a){var c=mxUtils.getOffset(this.diagramContainer);0<mxEvent.getClientX(a)-c.x-this.diagramContainer.clientWidth||0<mxEvent.getClientY(a)-c.y-this.diagramContainer.clientHeight?this.diagramContainer.setAttribute("title",mxResources.get("panTooltip")):this.diagramContainer.removeAttribute("title")}));var q=
+!1,u=this.hoverIcons.isResetEvent;this.hoverIcons.isResetEvent=function(a,c){return q||u.apply(this,arguments)};this.keydownHandler=mxUtils.bind(this,function(a){32!=a.which||g.isEditing()?mxEvent.isConsumed(a)||27!=a.keyCode||this.hideDialog(null,!0):(q=!0,this.hoverIcons.reset(),g.container.style.cursor="move",g.isEditing()||mxEvent.getSource(a)!=g.container||mxEvent.consume(a))});mxEvent.addListener(document,"keydown",this.keydownHandler);this.keyupHandler=mxUtils.bind(this,function(a){g.container.style.cursor=
+"";q=!1});mxEvent.addListener(document,"keyup",this.keyupHandler);var t=g.panningHandler.isForcePanningEvent;g.panningHandler.isForcePanningEvent=function(a){return t.apply(this,arguments)||q||mxEvent.isMouseEvent(a.getEvent())&&(this.usePopupTrigger||!mxEvent.isPopupTrigger(a.getEvent()))&&(!mxEvent.isControlDown(a.getEvent())&&mxEvent.isRightMouseButton(a.getEvent())||mxEvent.isMiddleMouseButton(a.getEvent()))};var A=g.cellEditor.isStopEditingEvent;g.cellEditor.isStopEditingEvent=function(a){return A.apply(this,
+arguments)||13==a.keyCode&&(!mxClient.IS_SF&&mxEvent.isControlDown(a)||mxClient.IS_MAC&&mxEvent.isMetaDown(a)||mxClient.IS_SF&&mxEvent.isShiftDown(a))};var x=g.isZoomWheelEvent;g.isZoomWheelEvent=function(){return q||x.apply(this,arguments)};var G=!1,z=null,E=null,H=null,K=mxUtils.bind(this,function(){if(null!=this.toolbar&&G!=g.cellEditor.isContentEditing()){for(var a=this.toolbar.container.firstChild,c=[];null!=a;){var e=a.nextSibling;0>mxUtils.indexOf(this.toolbar.staticElements,a)&&(a.parentNode.removeChild(a),
+c.push(a));a=e}a=this.toolbar.fontMenu;e=this.toolbar.sizeMenu;if(null==H)this.toolbar.createTextToolbar();else{for(var b=0;b<H.length;b++)this.toolbar.container.appendChild(H[b]);this.toolbar.fontMenu=z;this.toolbar.sizeMenu=E}G=g.cellEditor.isContentEditing();z=a;E=e;H=c}}),F=this,I=g.cellEditor.startEditing;g.cellEditor.startEditing=function(){I.apply(this,arguments);K();if(g.cellEditor.isContentEditing()){var a=!1,c=function(){a||(a=!0,window.setTimeout(function(){var c=g.getSelectedEditingElement();
+null!=c&&(c=mxUtils.getCurrentStyle(c),null!=c&&null!=F.toolbar&&(F.toolbar.setFontName(Graph.stripQuotes(c.fontFamily)),F.toolbar.setFontSize(parseInt(c.fontSize))));a=!1},0))};mxEvent.addListener(g.cellEditor.textarea,"input",c);mxEvent.addListener(g.cellEditor.textarea,"touchend",c);mxEvent.addListener(g.cellEditor.textarea,"mouseup",c);mxEvent.addListener(g.cellEditor.textarea,"keyup",c);c()}};var D=g.cellEditor.stopEditing;g.cellEditor.stopEditing=function(a,c){try{D.apply(this,arguments),K()}catch(N){F.handleError(N)}};
+g.container.setAttribute("tabindex","0");g.container.style.cursor="default";if(window.self===window.top&&null!=g.container.parentNode)try{g.container.focus()}catch(U){}var M=g.fireMouseEvent;g.fireMouseEvent=function(a,c,e){a==mxEvent.MOUSE_DOWN&&this.container.focus();M.apply(this,arguments)};g.popupMenuHandler.autoExpand=!0;null!=this.menus&&(g.popupMenuHandler.factoryMethod=mxUtils.bind(this,function(a,c,e){this.menus.createPopupMenu(a,c,e)}));mxEvent.addGestureListeners(document,mxUtils.bind(this,
+function(a){g.popupMenuHandler.hideMenu()}));this.keyHandler=this.createKeyHandler(a);this.getKeyHandler=function(){return keyHandler};g.connectionHandler.addListener(mxEvent.CONNECT,function(a,c){var e=[c.getProperty("cell")];c.getProperty("terminalInserted")&&(e.push(c.getProperty("terminal")),window.setTimeout(function(){null!=F.hoverIcons&&F.hoverIcons.update(g.view.getState(e[e.length-1]))},0));k(e)});this.addListener("styleChanged",mxUtils.bind(this,function(a,e){var b=e.getProperty("cells"),
+d=!1,k=!1;if(0<b.length)for(var n=0;n<b.length&&(d=g.getModel().isVertex(b[n])||d,!(k=g.getModel().isEdge(b[n])||k)||!d);n++);else k=d=!0;for(var b=e.getProperty("keys"),l=e.getProperty("values"),n=0;n<b.length;n++){var q=0<=mxUtils.indexOf(p,b[n]);if("strokeColor"!=b[n]||null!=l[n]&&"none"!=l[n])if(0<=mxUtils.indexOf(m,b[n]))k||0<=mxUtils.indexOf(c,b[n])?null==l[n]?delete g.currentEdgeStyle[b[n]]:g.currentEdgeStyle[b[n]]=l[n]:d&&0<=mxUtils.indexOf(f,b[n])&&(null==l[n]?delete g.currentVertexStyle[b[n]]:
+g.currentVertexStyle[b[n]]=l[n]);else if(0<=mxUtils.indexOf(f,b[n])){if(d||q)null==l[n]?delete g.currentVertexStyle[b[n]]:g.currentVertexStyle[b[n]]=l[n];if(k||q||0<=mxUtils.indexOf(c,b[n]))null==l[n]?delete g.currentEdgeStyle[b[n]]:g.currentEdgeStyle[b[n]]=l[n]}}null!=this.toolbar&&(this.toolbar.setFontName(g.currentVertexStyle.fontFamily||Menus.prototype.defaultFont),this.toolbar.setFontSize(g.currentVertexStyle.fontSize||Menus.prototype.defaultFontSize),null!=this.toolbar.edgeStyleMenu&&(this.toolbar.edgeStyleMenu.getElementsByTagName("div")[0].className=
+"orthogonalEdgeStyle"==g.currentEdgeStyle.edgeStyle&&"1"==g.currentEdgeStyle.curved?"geSprite geSprite-curved":"straight"==g.currentEdgeStyle.edgeStyle||"none"==g.currentEdgeStyle.edgeStyle||null==g.currentEdgeStyle.edgeStyle?"geSprite geSprite-straight":"entityRelationEdgeStyle"==g.currentEdgeStyle.edgeStyle?"geSprite geSprite-entity":"elbowEdgeStyle"==g.currentEdgeStyle.edgeStyle?"geSprite geSprite-"+("vertical"==g.currentEdgeStyle.elbow?"verticalelbow":"horizontalelbow"):"isometricEdgeStyle"==
+g.currentEdgeStyle.edgeStyle?"geSprite geSprite-"+("vertical"==g.currentEdgeStyle.elbow?"verticalisometric":"horizontalisometric"):"geSprite geSprite-orthogonal"),null!=this.toolbar.edgeShapeMenu&&(this.toolbar.edgeShapeMenu.getElementsByTagName("div")[0].className="link"==g.currentEdgeStyle.shape?"geSprite geSprite-linkedge":"flexArrow"==g.currentEdgeStyle.shape?"geSprite geSprite-arrow":"arrow"==g.currentEdgeStyle.shape?"geSprite geSprite-simplearrow":"geSprite geSprite-connection"),null!=this.toolbar.lineStartMenu&&
+(this.toolbar.lineStartMenu.getElementsByTagName("div")[0].className=this.getCssClassForMarker("start",g.currentEdgeStyle.shape,g.currentEdgeStyle[mxConstants.STYLE_STARTARROW],mxUtils.getValue(g.currentEdgeStyle,"startFill","1"))),null!=this.toolbar.lineEndMenu&&(this.toolbar.lineEndMenu.getElementsByTagName("div")[0].className=this.getCssClassForMarker("end",g.currentEdgeStyle.shape,g.currentEdgeStyle[mxConstants.STYLE_ENDARROW],mxUtils.getValue(g.currentEdgeStyle,"endFill","1"))))}));null!=this.toolbar&&
+(a=mxUtils.bind(this,function(){var a=g.currentVertexStyle.fontFamily||"Helvetica",c=String(g.currentVertexStyle.fontSize||"12"),e=g.getView().getState(g.getSelectionCell());null!=e&&(a=e.style[mxConstants.STYLE_FONTFAMILY]||a,c=e.style[mxConstants.STYLE_FONTSIZE]||c,10<a.length&&(a=a.substring(0,8)+"..."));this.toolbar.setFontName(a);this.toolbar.setFontSize(c)}),g.getSelectionModel().addListener(mxEvent.CHANGE,a),g.getModel().addListener(mxEvent.CHANGE,a));g.addListener(mxEvent.CELLS_ADDED,function(a,
+c){var e=c.getProperty("cells"),b=c.getProperty("parent");g.getModel().isLayer(b)&&!g.isCellVisible(b)&&null!=e&&0<e.length&&g.getModel().setVisible(b,!0)});this.gestureHandler=mxUtils.bind(this,function(a){null!=this.currentMenu&&mxEvent.getSource(a)!=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&&(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(){k.view.validateBackground()}));this.addListener("backgroundColorChanged",mxUtils.bind(this,function(){k.view.validateBackground()}));k.addListener("gridSizeChanged",mxUtils.bind(this,function(){k.isGridEnabled()&&k.view.validateBackground()}));this.editor.resetGraph()}this.init();k.standalone||this.open()};mxUtils.extend(EditorUi,mxEventSource);EditorUi.compactUi=!0;EditorUi.prototype.splitSize=mxClient.IS_TOUCH||mxClient.IS_POINTER?12:8;EditorUi.prototype.menubarHeight=30;
+function(){g.view.validateBackground()}));this.addListener("backgroundColorChanged",mxUtils.bind(this,function(){g.view.validateBackground()}));g.addListener("gridSizeChanged",mxUtils.bind(this,function(){g.isGridEnabled()&&g.view.validateBackground()}));this.editor.resetGraph()}this.init();g.standalone||this.open()};mxUtils.extend(EditorUi,mxEventSource);EditorUi.compactUi=!0;EditorUi.prototype.splitSize=mxClient.IS_TOUCH||mxClient.IS_POINTER?12:8;EditorUi.prototype.menubarHeight=30;
EditorUi.prototype.formatEnabled=!0;EditorUi.prototype.formatWidth=240;EditorUi.prototype.toolbarHeight=38;EditorUi.prototype.footerHeight=28;EditorUi.prototype.sidebarFooterHeight=34;EditorUi.prototype.hsplitPosition=640>=screen.width?118:"large"!=urlParams["sidebar-entries"]?212:240;EditorUi.prototype.allowAnimation=!0;EditorUi.prototype.lightboxMaxFitScale=2;EditorUi.prototype.lightboxVerticalDivider=4;EditorUi.prototype.hsplitClickEnabled=!1;
EditorUi.prototype.init=function(){var a=this.editor.graph;if(!a.standalone){"0"!=urlParams["shape-picker"]&&this.installShapePicker();mxEvent.addListener(a.container,"scroll",mxUtils.bind(this,function(){a.tooltipHandler.hide();null!=a.connectionHandler&&null!=a.connectionHandler.constraintHandler&&a.connectionHandler.constraintHandler.reset()}));a.addListener(mxEvent.ESCAPE,mxUtils.bind(this,function(){a.tooltipHandler.hide();var b=a.getRubberband();null!=b&&b.cancel()}));mxEvent.addListener(a.container,
"keydown",mxUtils.bind(this,function(a){this.onKeyDown(a)}));mxEvent.addListener(a.container,"keypress",mxUtils.bind(this,function(a){this.onKeyPress(a)}));this.addUndoListener();this.addBeforeUnloadListener();a.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){this.updateActionStates()}));a.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){this.updateActionStates()}));var b=a.setDefaultParent,d=this;this.editor.graph.setDefaultParent=function(){b.apply(this,
arguments);d.updateActionStates()};a.editLink=d.actions.get("editLink").funct;this.updateActionStates();this.initClipboard();this.initCanvas();null!=this.format&&this.format.init()}};
EditorUi.prototype.installShapePicker=function(){var a=this.editor.graph,b=this;a.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(a,c){"mouseDown"==c.getProperty("eventName")&&b.hideShapePicker()}));a.addListener(mxEvent.ESCAPE,mxUtils.bind(this,function(){b.hideShapePicker(!0)}));a.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){b.hideShapePicker(!0)}));a.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){b.hideShapePicker(!0)}));var d=
-a.popupMenuHandler.isMenuShowing;a.popupMenuHandler.isMenuShowing=function(){return d.apply(this,arguments)||null!=b.shapePicker};var k=a.dblClick;a.dblClick=function(d,c){if(this.isEnabled())if(null!=c||null==b.sidebar||mxEvent.isShiftDown(d)||a.isCellLocked(a.getDefaultParent()))k.apply(this,arguments);else{mxEvent.consume(d);var e=mxUtils.convertPoint(this.container,mxEvent.getClientX(d),mxEvent.getClientY(d));window.setTimeout(mxUtils.bind(this,function(){b.showShapePicker(e.x,e.y)}),30)}};if(null!=
-this.hoverIcons){var f=this.hoverIcons.drag;this.hoverIcons.drag=function(){b.hideShapePicker();f.apply(this,arguments)};var m=this.hoverIcons.execute;this.hoverIcons.execute=function(d,c,e){var g=e.getEvent();this.graph.isCloneEvent(g)||mxEvent.isShiftDown(g)?m.apply(this,arguments):this.graph.connectVertex(d.cell,c,this.graph.defaultEdgeLength,g,null,null,mxUtils.bind(this,function(g,f,k){var n=a.getCompositeParent(d.cell);g=a.getCellGeometry(n);for(e.consume();null!=n&&a.model.isVertex(n)&&null!=
-g&&g.relative;)cell=n,n=a.model.getParent(cell),g=a.getCellGeometry(n);window.setTimeout(mxUtils.bind(this,function(){b.showShapePicker(e.getGraphX(),e.getGraphY(),n,mxUtils.bind(this,function(c){k(c);null!=b.hoverIcons&&b.hoverIcons.update(a.view.getState(c))}),c)}),30)}),mxUtils.bind(this,function(a){this.graph.selectCellsForConnectVertex(a,g,this)}))}}};
-EditorUi.prototype.showShapePicker=function(a,b,d,k,f){a=this.createShapePicker(a,b,d,k,f,mxUtils.bind(this,function(){this.hideShapePicker()}),this.getCellsForShapePicker(d));null!=a&&(null!=this.hoverIcons&&this.hoverIcons.reset(),b=this.editor.graph,b.popupMenuHandler.hideMenu(),b.tooltipHandler.hideTooltip(),this.hideCurrentMenu(),this.hideShapePicker(),this.shapePickerCallback=k,this.shapePicker=a)};
-EditorUi.prototype.createShapePicker=function(a,b,d,k,f,m,p){var c=null;if(null!=p&&0<p.length){var e=this,g=this.editor.graph,c=document.createElement("div");f=g.view.getState(d);var n=null==d||null!=f&&g.isTransparentState(f)?null:g.copyStyle(d);d=6>p.length?35*p.length:140;c.className="geToolbarContainer geSidebarContainer geSidebar";c.style.cssText="position:absolute;left:"+a+"px;top:"+b+"px;width:"+d+"px;border-radius:10px;padding:4px;text-align:center;box-shadow:0px 0px 3px 1px #d1d1d1;padding: 6px 0 8px 0;z-index: "+
-mxPopupMenu.prototype.zIndex+1+";";mxUtils.setPrefixedStyle(c.style,"transform","translate(-22px,-22px)");null!=g.background&&g.background!=mxConstants.NONE&&(c.style.backgroundColor=g.background);g.container.appendChild(c);d=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;";c.appendChild(f);null!=n&&"1"!=urlParams.sketch?
-this.sidebar.graph.pasteStyle(n,[d]):e.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 c=g.cloneCell(d);if(null!=k)k(c);else{c.geometry.x=g.snap(Math.round(a/g.view.scale)-g.view.translate.x-d.geometry.width/2);c.geometry.y=g.snap(Math.round(b/g.view.scale)-g.view.translate.y-d.geometry.height/2);g.model.beginUpdate();try{g.addCell(c)}finally{g.model.endUpdate()}g.setSelectionCell(c);
-g.scrollCellToVisible(c);g.startEditingAtCell(c);null!=e.hoverIcons&&e.hoverIcons.update(g.view.getState(c))}null!=m&&m()})});for(f=0;f<p.length;f++)d(p[f]);p=c.offsetTop+c.clientHeight-(g.container.scrollTop+g.container.offsetHeight);0<p&&(c.style.top=Math.max(g.container.scrollTop+22,b-p)+"px");p=c.offsetLeft+c.clientWidth-(g.container.scrollLeft+g.container.offsetWidth);0<p&&(c.style.left=Math.max(g.container.scrollLeft+22,a-p)+"px")}return c};
+a.popupMenuHandler.isMenuShowing;a.popupMenuHandler.isMenuShowing=function(){return d.apply(this,arguments)||null!=b.shapePicker};var g=a.dblClick;a.dblClick=function(d,c){if(this.isEnabled())if(null!=c||null==b.sidebar||mxEvent.isShiftDown(d)||a.isCellLocked(a.getDefaultParent()))g.apply(this,arguments);else{mxEvent.consume(d);var e=mxUtils.convertPoint(this.container,mxEvent.getClientX(d),mxEvent.getClientY(d));window.setTimeout(mxUtils.bind(this,function(){b.showShapePicker(e.x,e.y)}),30)}};if(null!=
+this.hoverIcons){var f=this.hoverIcons.drag;this.hoverIcons.drag=function(){b.hideShapePicker();f.apply(this,arguments)};var m=this.hoverIcons.execute;this.hoverIcons.execute=function(d,c,e){var k=e.getEvent();this.graph.isCloneEvent(k)||mxEvent.isShiftDown(k)?m.apply(this,arguments):this.graph.connectVertex(d.cell,c,this.graph.defaultEdgeLength,k,null,null,mxUtils.bind(this,function(k,f,g){var n=a.getCompositeParent(d.cell);k=a.getCellGeometry(n);for(e.consume();null!=n&&a.model.isVertex(n)&&null!=
+k&&k.relative;)cell=n,n=a.model.getParent(cell),k=a.getCellGeometry(n);window.setTimeout(mxUtils.bind(this,function(){b.showShapePicker(e.getGraphX(),e.getGraphY(),n,mxUtils.bind(this,function(c){g(c);null!=b.hoverIcons&&b.hoverIcons.update(a.view.getState(c))}),c)}),30)}),mxUtils.bind(this,function(a){this.graph.selectCellsForConnectVertex(a,k,this)}))}}};
+EditorUi.prototype.showShapePicker=function(a,b,d,g,f){a=this.createShapePicker(a,b,d,g,f,mxUtils.bind(this,function(){this.hideShapePicker()}),this.getCellsForShapePicker(d));null!=a&&(null!=this.hoverIcons&&this.hoverIcons.reset(),b=this.editor.graph,b.popupMenuHandler.hideMenu(),b.tooltipHandler.hideTooltip(),this.hideCurrentMenu(),this.hideShapePicker(),this.shapePickerCallback=g,this.shapePicker=a)};
+EditorUi.prototype.createShapePicker=function(a,b,d,g,f,m,p){var c=null;if(null!=p&&0<p.length){var e=this,k=this.editor.graph,c=document.createElement("div");f=k.view.getState(d);var n=null==d||null!=f&&k.isTransparentState(f)?null:k.copyStyle(d);d=6>p.length?35*p.length:140;c.className="geToolbarContainer geSidebarContainer geSidebar";c.style.cssText="position:absolute;left:"+a+"px;top:"+b+"px;width:"+d+"px;border-radius:10px;padding:4px;text-align:center;box-shadow:0px 0px 3px 1px #d1d1d1;padding: 6px 0 8px 0;z-index: "+
+mxPopupMenu.prototype.zIndex+1+";";mxUtils.setPrefixedStyle(c.style,"transform","translate(-22px,-22px)");null!=k.background&&k.background!=mxConstants.NONE&&(c.style.backgroundColor=k.background);k.container.appendChild(c);d=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;";c.appendChild(f);null!=n&&"1"!=urlParams.sketch?
+this.sidebar.graph.pasteStyle(n,[d]):e.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 c=k.cloneCell(d);if(null!=g)g(c);else{c.geometry.x=k.snap(Math.round(a/k.view.scale)-k.view.translate.x-d.geometry.width/2);c.geometry.y=k.snap(Math.round(b/k.view.scale)-k.view.translate.y-d.geometry.height/2);k.model.beginUpdate();try{k.addCell(c)}finally{k.model.endUpdate()}k.setSelectionCell(c);
+k.scrollCellToVisible(c);k.startEditingAtCell(c);null!=e.hoverIcons&&e.hoverIcons.update(k.view.getState(c))}null!=m&&m()})});for(f=0;f<p.length;f++)d(p[f]);p=c.offsetTop+c.clientHeight-(k.container.scrollTop+k.container.offsetHeight);0<p&&(c.style.top=Math.max(k.container.scrollTop+22,b-p)+"px");p=c.offsetLeft+c.clientWidth-(k.container.scrollLeft+k.container.offsetWidth);0<p&&(c.style.left=Math.max(k.container.scrollLeft+22,a-p)+"px")}return c};
EditorUi.prototype.getCellsForShapePicker=function(a){var b=mxUtils.bind(this,function(a,b,f,m){return this.editor.graph.createVertex(null,null,m||"",0,0,b||120,f||60,a,!1)});return[null!=a?this.editor.graph.cloneCell(a):b("text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;",40,20,"Text"),b("whiteSpace=wrap;html=1;"),b("rounded=1;whiteSpace=wrap;html=1;"),b("ellipse;whiteSpace=wrap;html=1;"),b("rhombus;whiteSpace=wrap;html=1;",80,80),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=cylinder;whiteSpace=wrap;html=1;boundedLbl=1;backgroundOutline=1;",60,80),b("shape=callout;rounded=1;whiteSpace=wrap;html=1;perimeter=calloutPerimeter;",120,80),b("shape=doubleArrow;whiteSpace=wrap;html=1;arrowWidth=0.4;arrowSize=0.3;"),b("shape=singleArrow;whiteSpace=wrap;html=1;arrowWidth=0.4;arrowSize=0.4;",80,60),b("shape=singleArrow;whiteSpace=wrap;html=1;arrowWidth=0.4;arrowSize=0.4;flipH=1;",80,60),b("shape=waypoint;sketch=0;size=6;pointerEvents=1;points=[];fillColor=none;resizable=0;rotatable=0;perimeter=centerPerimeter;snapToPoint=1;",
@@ -2164,25 +2165,25 @@ EditorUi.prototype.onKeyDown=function(a){var b=this.editor.graph;if(9==a.which&&
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.getCssClassForMarker=function(a,b,d,k){return"flexArrow"==b?null!=d&&d!=mxConstants.NONE?"geSprite geSprite-"+a+"blocktrans":"geSprite geSprite-noarrow":"box"==d||"halfCircle"==d?"geSprite geSvgSprite geSprite-"+d+("end"==a?" geFlipSprite":""):d==mxConstants.ARROW_CLASSIC?"1"==k?"geSprite geSprite-"+a+"classic":"geSprite geSprite-"+a+"classictrans":d==mxConstants.ARROW_CLASSIC_THIN?"1"==k?"geSprite geSprite-"+a+"classicthin":"geSprite geSprite-"+a+"classicthintrans":d==mxConstants.ARROW_OPEN?
-"geSprite geSprite-"+a+"open":d==mxConstants.ARROW_OPEN_THIN?"geSprite geSprite-"+a+"openthin":d==mxConstants.ARROW_BLOCK?"1"==k?"geSprite geSprite-"+a+"block":"geSprite geSprite-"+a+"blocktrans":d==mxConstants.ARROW_BLOCK_THIN?"1"==k?"geSprite geSprite-"+a+"blockthin":"geSprite geSprite-"+a+"blockthintrans":d==mxConstants.ARROW_OVAL?"1"==k?"geSprite geSprite-"+a+"oval":"geSprite geSprite-"+a+"ovaltrans":d==mxConstants.ARROW_DIAMOND?"1"==k?"geSprite geSprite-"+a+"diamond":"geSprite geSprite-"+a+"diamondtrans":
-d==mxConstants.ARROW_DIAMOND_THIN?"1"==k?"geSprite geSprite-"+a+"thindiamond":"geSprite geSprite-"+a+"thindiamondtrans":"openAsync"==d?"geSprite geSprite-"+a+"openasync":"dash"==d?"geSprite geSprite-"+a+"dash":"cross"==d?"geSprite geSprite-"+a+"cross":"async"==d?"1"==k?"geSprite geSprite-"+a+"async":"geSprite geSprite-"+a+"asynctrans":"circle"==d||"circlePlus"==d?"1"==k||"circle"==d?"geSprite geSprite-"+a+"circle":"geSprite geSprite-"+a+"circleplus":"ERone"==d?"geSprite geSprite-"+a+"erone":"ERmandOne"==
+EditorUi.prototype.getCssClassForMarker=function(a,b,d,g){return"flexArrow"==b?null!=d&&d!=mxConstants.NONE?"geSprite geSprite-"+a+"blocktrans":"geSprite geSprite-noarrow":"box"==d||"halfCircle"==d?"geSprite geSvgSprite geSprite-"+d+("end"==a?" geFlipSprite":""):d==mxConstants.ARROW_CLASSIC?"1"==g?"geSprite geSprite-"+a+"classic":"geSprite geSprite-"+a+"classictrans":d==mxConstants.ARROW_CLASSIC_THIN?"1"==g?"geSprite geSprite-"+a+"classicthin":"geSprite geSprite-"+a+"classicthintrans":d==mxConstants.ARROW_OPEN?
+"geSprite geSprite-"+a+"open":d==mxConstants.ARROW_OPEN_THIN?"geSprite geSprite-"+a+"openthin":d==mxConstants.ARROW_BLOCK?"1"==g?"geSprite geSprite-"+a+"block":"geSprite geSprite-"+a+"blocktrans":d==mxConstants.ARROW_BLOCK_THIN?"1"==g?"geSprite geSprite-"+a+"blockthin":"geSprite geSprite-"+a+"blockthintrans":d==mxConstants.ARROW_OVAL?"1"==g?"geSprite geSprite-"+a+"oval":"geSprite geSprite-"+a+"ovaltrans":d==mxConstants.ARROW_DIAMOND?"1"==g?"geSprite geSprite-"+a+"diamond":"geSprite geSprite-"+a+"diamondtrans":
+d==mxConstants.ARROW_DIAMOND_THIN?"1"==g?"geSprite geSprite-"+a+"thindiamond":"geSprite geSprite-"+a+"thindiamondtrans":"openAsync"==d?"geSprite geSprite-"+a+"openasync":"dash"==d?"geSprite geSprite-"+a+"dash":"cross"==d?"geSprite geSprite-"+a+"cross":"async"==d?"1"==g?"geSprite geSprite-"+a+"async":"geSprite geSprite-"+a+"asynctrans":"circle"==d||"circlePlus"==d?"1"==g||"circle"==d?"geSprite geSprite-"+a+"circle":"geSprite geSprite-"+a+"circleplus":"ERone"==d?"geSprite geSprite-"+a+"erone":"ERmandOne"==
d?"geSprite geSprite-"+a+"eronetoone":"ERmany"==d?"geSprite geSprite-"+a+"ermany":"ERoneToMany"==d?"geSprite geSprite-"+a+"eronetomany":"ERzeroToOne"==d?"geSprite geSprite-"+a+"eroneopt":"ERzeroToMany"==d?"geSprite geSprite-"+a+"ermanyopt":"geSprite geSprite-noarrow"};EditorUi.prototype.createMenus=function(){return null};
EditorUi.prototype.updatePasteActionStates=function(){var a=this.editor.graph,b=this.actions.get("paste"),d=this.actions.get("pasteHere");b.setEnabled(this.editor.graph.cellEditor.isContentEditing()||(!mxClient.IS_FF&&null!=navigator.clipboard||!mxClipboard.isEmpty())&&a.isEnabled()&&!a.isCellLocked(a.getDefaultParent()));d.setEnabled(b.isEnabled())};
-EditorUi.prototype.initClipboard=function(){var a=this,b=mxClipboard.cut;mxClipboard.cut=function(d){d.cellEditor.isContentEditing()?document.execCommand("cut",!1,null):b.apply(this,arguments);a.updatePasteActionStates()};mxClipboard.copy=function(b){var d=null;if(b.cellEditor.isContentEditing())document.execCommand("copy",!1,null);else{for(var d=d||b.getSelectionCells(),d=b.getExportableCells(b.model.getTopmostCells(d)),c={},e=b.createCellLookup(d),g=b.cloneCells(d,null,c),f=new mxGraphModel,k=f.getChildAt(f.getRoot(),
-0),q=0;q<g.length;q++){f.add(k,g[q]);var m=b.view.getState(d[q]);if(null!=m){var t=b.getCellGeometry(g[q]);null!=t&&t.relative&&!f.isEdge(d[q])&&null==e[mxObjectIdentity.get(f.getParent(d[q]))]&&(t.offset=null,t.relative=!1,t.x=m.x/m.view.scale-m.view.translate.x,t.y=m.y/m.view.scale-m.view.translate.y)}}b.updateCustomLinks(b.createCellMapping(c,e),g);mxClipboard.insertCount=1;mxClipboard.setCells(g)}a.updatePasteActionStates();return d};var d=mxClipboard.paste;mxClipboard.paste=function(b){var f=
-null;b.cellEditor.isContentEditing()?document.execCommand("paste",!1,null):f=d.apply(this,arguments);a.updatePasteActionStates();return f};var k=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){k.apply(this,arguments);a.updatePasteActionStates()};var f=this.editor.graph.cellEditor.stopEditing;this.editor.graph.cellEditor.stopEditing=function(b,d){f.apply(this,arguments);a.updatePasteActionStates()};this.updatePasteActionStates()};
+EditorUi.prototype.initClipboard=function(){var a=this,b=mxClipboard.cut;mxClipboard.cut=function(d){d.cellEditor.isContentEditing()?document.execCommand("cut",!1,null):b.apply(this,arguments);a.updatePasteActionStates()};mxClipboard.copy=function(b){var d=null;if(b.cellEditor.isContentEditing())document.execCommand("copy",!1,null);else{for(var d=d||b.getSelectionCells(),d=b.getExportableCells(b.model.getTopmostCells(d)),c={},e=b.createCellLookup(d),k=b.cloneCells(d,null,c),f=new mxGraphModel,g=f.getChildAt(f.getRoot(),
+0),q=0;q<k.length;q++){f.add(g,k[q]);var m=b.view.getState(d[q]);if(null!=m){var t=b.getCellGeometry(k[q]);null!=t&&t.relative&&!f.isEdge(d[q])&&null==e[mxObjectIdentity.get(f.getParent(d[q]))]&&(t.offset=null,t.relative=!1,t.x=m.x/m.view.scale-m.view.translate.x,t.y=m.y/m.view.scale-m.view.translate.y)}}b.updateCustomLinks(b.createCellMapping(c,e),k);mxClipboard.insertCount=1;mxClipboard.setCells(k)}a.updatePasteActionStates();return d};var d=mxClipboard.paste;mxClipboard.paste=function(b){var f=
+null;b.cellEditor.isContentEditing()?document.execCommand("paste",!1,null):f=d.apply(this,arguments);a.updatePasteActionStates();return f};var g=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){g.apply(this,arguments);a.updatePasteActionStates()};var f=this.editor.graph.cellEditor.stopEditing;this.editor.graph.cellEditor.stopEditing=function(b,d){f.apply(this,arguments);a.updatePasteActionStates()};this.updatePasteActionStates()};
EditorUi.prototype.lazyZoomDelay=20;EditorUi.prototype.wheelZoomDelay=400;EditorUi.prototype.buttonZoomDelay=600;
EditorUi.prototype.initCanvas=function(){var a=this.editor.graph;a.timerAutoScroll=!0;a.getPagePadding=function(){return new mxPoint(Math.max(0,Math.round((a.container.offsetWidth-34)/a.view.scale)),Math.max(0,Math.round((a.container.offsetHeight-34)/a.view.scale)))};a.view.getBackgroundPageBounds=function(){var a=this.graph.getPageLayout(),c=this.graph.getPageSize();return new mxRectangle(this.scale*(this.translate.x+a.x*c.width),this.scale*(this.translate.y+a.y*c.height),this.scale*a.width*c.width,
-this.scale*a.height*c.height)};a.getPreferredPageSize=function(a,c,e){a=this.getPageLayout();c=this.getPageSize();return new mxRectangle(0,0,a.width*c.width,a.height*c.height)};var b=null,d=this;if(this.editor.isChromelessView()){this.chromelessResize=b=mxUtils.bind(this,function(c,e,b,d){if(null!=a.container&&!a.isViewer()){b=null!=b?b:0;d=null!=d?d:0;var g=a.pageVisible?a.view.getBackgroundPageBounds():a.getGraphBounds(),f=mxUtils.hasScrollbars(a.container),n=a.view.translate,k=a.view.scale,v=mxRectangle.fromRectangle(g);
-v.x=v.x/k-n.x;v.y=v.y/k-n.y;v.width/=k;v.height/=k;var n=a.container.scrollTop,l=a.container.scrollLeft,q=8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)q+=3;var B=a.container.offsetWidth-q,q=a.container.offsetHeight-q;c=c?Math.max(.3,Math.min(e||1,B/v.width)):k;e=(B-c*v.width)/2/c;var m=0==this.lightboxVerticalDivider?0:(q-c*v.height)/this.lightboxVerticalDivider/c;f&&(e=Math.max(e,0),m=Math.max(m,0));if(f||g.width<B||g.height<q)a.view.scaleAndTranslate(c,Math.floor(e-
-v.x),Math.floor(m-v.y)),a.container.scrollTop=n*c/k,a.container.scrollLeft=l*c/k;else if(0!=b||0!=d)g=a.view.translate,a.view.setTranslate(Math.floor(g.x+b/k),Math.floor(g.y+d/k))}});this.chromelessWindowResize=mxUtils.bind(this,function(){this.chromelessResize(!1)});var k=mxUtils.bind(this,function(){this.chromelessWindowResize(!1)});mxEvent.addListener(window,"resize",k);this.destroyFunctions.push(function(){mxEvent.removeListener(window,"resize",k)});this.editor.addListener("resetGraphView",mxUtils.bind(this,
+this.scale*a.height*c.height)};a.getPreferredPageSize=function(a,c,e){a=this.getPageLayout();c=this.getPageSize();return new mxRectangle(0,0,a.width*c.width,a.height*c.height)};var b=null,d=this;if(this.editor.isChromelessView()){this.chromelessResize=b=mxUtils.bind(this,function(c,e,b,d){if(null!=a.container&&!a.isViewer()){b=null!=b?b:0;d=null!=d?d:0;var k=a.pageVisible?a.view.getBackgroundPageBounds():a.getGraphBounds(),f=mxUtils.hasScrollbars(a.container),n=a.view.translate,g=a.view.scale,v=mxRectangle.fromRectangle(k);
+v.x=v.x/g-n.x;v.y=v.y/g-n.y;v.width/=g;v.height/=g;var n=a.container.scrollTop,l=a.container.scrollLeft,q=8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)q+=3;var B=a.container.offsetWidth-q,q=a.container.offsetHeight-q;c=c?Math.max(.3,Math.min(e||1,B/v.width)):g;e=(B-c*v.width)/2/c;var t=0==this.lightboxVerticalDivider?0:(q-c*v.height)/this.lightboxVerticalDivider/c;f&&(e=Math.max(e,0),t=Math.max(t,0));if(f||k.width<B||k.height<q)a.view.scaleAndTranslate(c,Math.floor(e-
+v.x),Math.floor(t-v.y)),a.container.scrollTop=n*c/g,a.container.scrollLeft=l*c/g;else if(0!=b||0!=d)k=a.view.translate,a.view.setTranslate(Math.floor(k.x+b/g),Math.floor(k.y+d/g))}});this.chromelessWindowResize=mxUtils.bind(this,function(){this.chromelessResize(!1)});var g=mxUtils.bind(this,function(){this.chromelessWindowResize(!1)});mxEvent.addListener(window,"resize",g);this.destroyFunctions.push(function(){mxEvent.removeListener(window,"resize",g)});this.editor.addListener("resetGraphView",mxUtils.bind(this,
function(){this.chromelessResize(!0)}));this.actions.get("zoomIn").funct=mxUtils.bind(this,function(c){a.zoomIn();this.chromelessResize(!1)});this.actions.get("zoomOut").funct=mxUtils.bind(this,function(c){a.zoomOut();this.chromelessResize(!1)});if("0"!=urlParams.toolbar){var f=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.backgroundColor="#000000";this.chromelessToolbar.style.padding="10px 10px 8px 10px";this.chromelessToolbar.style.left=a.isViewer()?"0":"50%";mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"borderRadius","20px");mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transition","opacity 600ms ease-in-out");var m=mxUtils.bind(this,function(){var c=mxUtils.getCurrentStyle(a.container);a.isViewer()?this.chromelessToolbar.style.top=
"0":this.chromelessToolbar.style.bottom=(null!=c?parseInt(c["margin-bottom"]||0):0)+(null!=this.tabContainer?20+parseInt(this.tabContainer.style.height):20)+"px"});this.editor.addListener("resetGraphView",m);m();var p=0,m=mxUtils.bind(this,function(a,c,e){p++;var b=document.createElement("span");b.style.paddingLeft="8px";b.style.paddingRight="8px";b.style.cursor="pointer";mxEvent.addListener(b,"click",a);null!=e&&b.setAttribute("title",e);a=document.createElement("img");a.setAttribute("border","0");
a.setAttribute("src",c);b.appendChild(a);this.chromelessToolbar.appendChild(b);return b});null!=f.backBtn&&m(mxUtils.bind(this,function(a){window.location.href=f.backBtn.url;mxEvent.consume(a)}),Editor.backLargeImage,mxResources.get("back",null,"Back"));if(this.isPagesEnabled()){var c=m(mxUtils.bind(this,function(a){this.actions.get("previousPage").funct();mxEvent.consume(a)}),Editor.previousLargeImage,mxResources.get("previousPage")),e=document.createElement("div");e.style.display="inline-block";
-e.style.verticalAlign="top";e.style.fontFamily="Helvetica,Arial";e.style.marginTop="8px";e.style.fontSize="14px";e.style.color="#ffffff";this.chromelessToolbar.appendChild(e);var g=m(mxUtils.bind(this,function(a){this.actions.get("nextPage").funct();mxEvent.consume(a)}),Editor.nextLargeImage,mxResources.get("nextPage")),n=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&(e.innerHTML="",mxUtils.write(e,mxUtils.indexOf(this.pages,this.currentPage)+1+" / "+
-this.pages.length))});c.style.paddingLeft="0px";c.style.paddingRight="4px";g.style.paddingLeft="4px";g.style.paddingRight="0px";var l=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage?(g.style.display="",c.style.display="",e.style.display="inline-block"):(g.style.display="none",c.style.display="none",e.style.display="none");n()});this.editor.addListener("resetGraphView",l);this.editor.addListener("pageSelected",n)}m(mxUtils.bind(this,function(a){this.actions.get("zoomOut").funct();
+e.style.verticalAlign="top";e.style.fontFamily="Helvetica,Arial";e.style.marginTop="8px";e.style.fontSize="14px";e.style.color="#ffffff";this.chromelessToolbar.appendChild(e);var k=m(mxUtils.bind(this,function(a){this.actions.get("nextPage").funct();mxEvent.consume(a)}),Editor.nextLargeImage,mxResources.get("nextPage")),n=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&(e.innerHTML="",mxUtils.write(e,mxUtils.indexOf(this.pages,this.currentPage)+1+" / "+
+this.pages.length))});c.style.paddingLeft="0px";c.style.paddingRight="4px";k.style.paddingLeft="4px";k.style.paddingRight="0px";var l=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage?(k.style.display="",c.style.display="",e.style.display="inline-block"):(k.style.display="none",c.style.display="none",e.style.display="none");n()});this.editor.addListener("resetGraphView",l);this.editor.addListener("pageSelected",n)}m(mxUtils.bind(this,function(a){this.actions.get("zoomOut").funct();
mxEvent.consume(a)}),Editor.zoomOutLargeImage,mxResources.get("zoomOut")+" (Alt+Mousewheel)");m(mxUtils.bind(this,function(a){this.actions.get("zoomIn").funct();mxEvent.consume(a)}),Editor.zoomInLargeImage,mxResources.get("zoomIn")+" (Alt+Mousewheel)");m(mxUtils.bind(this,function(c){a.isLightboxView()?(1==a.view.scale?this.lightboxFit():a.zoomTo(1),this.chromelessResize(!1)):this.chromelessResize(!0);mxEvent.consume(c)}),Editor.actualSizeLargeImage,mxResources.get("fit"));var q=null,u=null,t=mxUtils.bind(this,
function(a){null!=q&&(window.clearTimeout(q),q=null);null!=u&&(window.clearTimeout(u),u=null);q=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(this.chromelessToolbar,0);q=null;u=window.setTimeout(mxUtils.bind(this,function(){this.chromelessToolbar.style.display="none";u=null}),600)}),a||200)}),A=mxUtils.bind(this,function(a){null!=q&&(window.clearTimeout(q),q=null);null!=u&&(window.clearTimeout(u),u=null);this.chromelessToolbar.style.display="";mxUtils.setOpacity(this.chromelessToolbar,
a||30)});if("1"==urlParams.layers){this.layersDialog=null;var x=m(mxUtils.bind(this,function(c){if(null!=this.layersDialog)this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null;else{this.layersDialog=a.createLayersDialog();mxEvent.addListener(this.layersDialog,"mouseleave",mxUtils.bind(this,function(){this.layersDialog.parentNode.removeChild(this.layersDialog);this.layersDialog=null}));var e=x.getBoundingClientRect();mxUtils.setPrefixedStyle(this.layersDialog.style,"borderRadius",
@@ -2194,52 +2195,52 @@ f.closeBtn?window.close():(this.destroy(),mxEvent.consume(a))}),Editor.closeLarg
mxClient.IS_POINTER?"pointermove":"mousemove",function(a){mxEvent.consume(a)});mxEvent.addListener(this.chromelessToolbar,"mouseenter",mxUtils.bind(this,function(a){mxEvent.isShiftDown(a)?t():A(100)}));mxEvent.addListener(this.chromelessToolbar,"mousemove",mxUtils.bind(this,function(a){mxEvent.isShiftDown(a)?t():A(100);mxEvent.consume(a)}));mxEvent.addListener(this.chromelessToolbar,"mouseleave",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||A(30)}));var E=a.getTolerance();a.addMouseListener({startX:0,
startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(c,e){this.startX=e.getGraphX();this.startY=e.getGraphY();this.scrollLeft=a.container.scrollLeft;this.scrollTop=a.container.scrollTop},mouseMove:function(a,c){},mouseUp:function(c,e){mxEvent.isTouchEvent(e.getEvent())&&Math.abs(this.scrollLeft-a.container.scrollLeft)<E&&Math.abs(this.scrollTop-a.container.scrollTop)<E&&Math.abs(this.startX-e.getGraphX())<E&&Math.abs(this.startY-e.getGraphY())<E&&(0<parseFloat(d.chromelessToolbar.style.opacity||0)?
t():A(30))}})}this.editor.editable||this.addChromelessClickHandler()}else if(this.editor.extendCanvas){var H=a.view.validate;a.view.validate=function(){if(null!=this.graph.container&&mxUtils.hasScrollbars(this.graph.container)){var a=this.graph.getPagePadding(),c=this.graph.getPageSize();this.translate.x=a.x-(this.x0||0)*c.width;this.translate.y=a.y-(this.y0||0)*c.height}H.apply(this,arguments)};if(!a.isViewer()){var K=a.sizeDidChange;a.sizeDidChange=function(){if(null!=this.container&&mxUtils.hasScrollbars(this.container)){var c=
-this.getPageLayout(),e=this.getPagePadding(),b=this.getPageSize(),d=Math.ceil(2*e.x+c.width*b.width),g=Math.ceil(2*e.y+c.height*b.height),f=a.minimumGraphSize;if(null==f||f.width!=d||f.height!=g)a.minimumGraphSize=new mxRectangle(0,0,d,g);d=e.x-c.x*b.width;e=e.y-c.y*b.height;this.autoTranslate||this.view.translate.x==d&&this.view.translate.y==e?K.apply(this,arguments):(this.autoTranslate=!0,this.view.x0=c.x,this.view.y0=c.y,c=a.view.translate.x,b=a.view.translate.y,a.view.setTranslate(d,e),a.container.scrollLeft+=
-Math.round((d-c)*a.view.scale),a.container.scrollTop+=Math.round((e-b)*a.view.scale),this.autoTranslate=!1)}else this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",this.getGraphBounds()))}}}var F=a.view.getBackgroundPane(),I=a.view.getDrawPane();a.cumulativeZoomFactor=1;var C=null,M=null,U=null,O=null,N=null,v=function(c){null!=C&&window.clearTimeout(C);window.setTimeout(function(){if(!a.isMouseDown||O)C=window.setTimeout(mxUtils.bind(this,function(){a.isFastZoomEnabled()&&(null!=a.view.backgroundPageShape&&
+this.getPageLayout(),e=this.getPagePadding(),b=this.getPageSize(),d=Math.ceil(2*e.x+c.width*b.width),k=Math.ceil(2*e.y+c.height*b.height),f=a.minimumGraphSize;if(null==f||f.width!=d||f.height!=k)a.minimumGraphSize=new mxRectangle(0,0,d,k);d=e.x-c.x*b.width;e=e.y-c.y*b.height;this.autoTranslate||this.view.translate.x==d&&this.view.translate.y==e?K.apply(this,arguments):(this.autoTranslate=!0,this.view.x0=c.x,this.view.y0=c.y,c=a.view.translate.x,b=a.view.translate.y,a.view.setTranslate(d,e),a.container.scrollLeft+=
+Math.round((d-c)*a.view.scale),a.container.scrollTop+=Math.round((e-b)*a.view.scale),this.autoTranslate=!1)}else this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",this.getGraphBounds()))}}}var F=a.view.getBackgroundPane(),I=a.view.getDrawPane();a.cumulativeZoomFactor=1;var D=null,M=null,U=null,O=null,N=null,v=function(c){null!=D&&window.clearTimeout(D);window.setTimeout(function(){if(!a.isMouseDown||O)D=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)),I.style.transformOrigin="",F.style.transformOrigin="",mxClient.IS_SF?(I.style.transform="scale(1)",F.style.transform="scale(1)",window.setTimeout(function(){I.style.transform="";F.style.transform=""},0)):(I.style.transform="",F.style.transform=""),a.view.getDecoratorPane().style.opacity="",
-a.view.getOverlayPane().style.opacity="");var c=new mxPoint(a.container.scrollLeft,a.container.scrollTop),e=mxUtils.getOffset(a.container),g=a.view.scale,f=0,n=0;null!=M&&(f=a.container.offsetWidth/2-M.x+e.x,n=a.container.offsetHeight/2-M.y+e.y);a.zoom(a.cumulativeZoomFactor);a.view.scale!=g&&(null!=U&&(f+=c.x-U.x,n+=c.y-U.y),null!=b&&d.chromelessResize(!1,null,f*(a.cumulativeZoomFactor-1),n*(a.cumulativeZoomFactor-1)),!mxUtils.hasScrollbars(a.container)||0==f&&0==n||(a.container.scrollLeft-=f*(a.cumulativeZoomFactor-
-1),a.container.scrollTop-=n*(a.cumulativeZoomFactor-1)));null!=N&&I.setAttribute("filter",N);a.cumulativeZoomFactor=1;N=O=M=U=C=null}),null!=c?c:a.isFastZoomEnabled()?d.wheelZoomDelay:d.lazyZoomDelay)},0)},D=Date.now();a.lazyZoom=function(c,e,b){(e=e||!a.scrollbars)&&(M=new mxPoint(a.container.offsetLeft+a.container.clientWidth/2,a.container.offsetTop+a.container.clientHeight/2));if(mxClient.IS_IOS||!(15>Date.now()-D)){D=Date.now();c?.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=
+a.view.getOverlayPane().style.opacity="");var c=new mxPoint(a.container.scrollLeft,a.container.scrollTop),e=mxUtils.getOffset(a.container),k=a.view.scale,f=0,n=0;null!=M&&(f=a.container.offsetWidth/2-M.x+e.x,n=a.container.offsetHeight/2-M.y+e.y);a.zoom(a.cumulativeZoomFactor);a.view.scale!=k&&(null!=U&&(f+=c.x-U.x,n+=c.y-U.y),null!=b&&d.chromelessResize(!1,null,f*(a.cumulativeZoomFactor-1),n*(a.cumulativeZoomFactor-1)),!mxUtils.hasScrollbars(a.container)||0==f&&0==n||(a.container.scrollLeft-=f*(a.cumulativeZoomFactor-
+1),a.container.scrollTop-=n*(a.cumulativeZoomFactor-1)));null!=N&&I.setAttribute("filter",N);a.cumulativeZoomFactor=1;N=O=M=U=D=null}),null!=c?c:a.isFastZoomEnabled()?d.wheelZoomDelay:d.lazyZoomDelay)},0)},C=Date.now();a.lazyZoom=function(c,e,b){(e=e||!a.scrollbars)&&(M=new mxPoint(a.container.offsetLeft+a.container.clientWidth/2,a.container.offsetTop+a.container.clientHeight/2));if(mxClient.IS_IOS||!(15>Date.now()-C)){C=Date.now();c?.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=
(this.view.scale+.05)/this.view.scale:(this.cumulativeZoomFactor*=this.zoomFactor,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*20)/20/this.view.scale):.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=(this.view.scale-.05)/this.view.scale:(this.cumulativeZoomFactor/=this.zoomFactor,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*20)/20/this.view.scale);this.cumulativeZoomFactor=Math.max(.05,Math.min(this.view.scale*
-this.cumulativeZoomFactor,160))/this.view.scale;if(a.isFastZoomEnabled()){null==N&&""!=I.getAttribute("filter")&&(N=I.getAttribute("filter"),I.removeAttribute("filter"));U=new mxPoint(a.container.scrollLeft,a.container.scrollTop);c=e?a.container.scrollLeft+a.container.clientWidth/2:M.x+a.container.scrollLeft-a.container.offsetLeft;var g=e?a.container.scrollTop+a.container.clientHeight/2:M.y+a.container.scrollTop-a.container.offsetTop;I.style.transformOrigin=c+"px "+g+"px";I.style.transform="scale("+
-this.cumulativeZoomFactor+")";F.style.transformOrigin=c+"px "+g+"px";F.style.transform="scale("+this.cumulativeZoomFactor+")";null!=a.view.backgroundPageShape&&null!=a.view.backgroundPageShape.node&&(c=a.view.backgroundPageShape.node,mxUtils.setPrefixedStyle(c.style,"transform-origin",(e?a.container.clientWidth/2+a.container.scrollLeft-c.offsetLeft+"px":M.x+a.container.scrollLeft-c.offsetLeft-a.container.offsetLeft+"px")+" "+(e?a.container.clientHeight/2+a.container.scrollTop-c.offsetTop+"px":M.y+
-a.container.scrollTop-c.offsetTop-a.container.offsetTop+"px")),mxUtils.setPrefixedStyle(c.style,"transform","scale("+this.cumulativeZoomFactor+")"));a.view.getDecoratorPane().style.opacity="0";a.view.getOverlayPane().style.opacity="0";null!=d.hoverIcons&&d.hoverIcons.reset()}v(b)}};mxEvent.addGestureListeners(a.container,function(a){null!=C&&window.clearTimeout(C)},null,function(c){1!=a.cumulativeZoomFactor&&v(0)});mxEvent.addListener(a.container,"scroll",function(c){null==C||a.isMouseDown||1==a.cumulativeZoomFactor||
-v(0)});mxEvent.addMouseWheelListener(mxUtils.bind(this,function(c,e,b,d,g){if(null==this.dialogs||0==this.dialogs.length)if(!a.scrollbars&&!b&&a.isScrollWheelEvent(c))b=a.view.getTranslate(),d=40/a.view.scale,mxEvent.isShiftDown(c)?a.view.setTranslate(b.x+(e?-d:d),b.y):a.view.setTranslate(b.x,b.y+(e?d:-d));else if(b||a.isZoomWheelEvent(c))for(var f=mxEvent.getSource(c);null!=f;){if(f==a.container)return a.tooltipHandler.hideTooltip(),M=null!=d&&null!=g?new mxPoint(d,g):new mxPoint(mxEvent.getClientX(c),
+this.cumulativeZoomFactor,160))/this.view.scale;if(a.isFastZoomEnabled()){null==N&&""!=I.getAttribute("filter")&&(N=I.getAttribute("filter"),I.removeAttribute("filter"));U=new mxPoint(a.container.scrollLeft,a.container.scrollTop);c=e?a.container.scrollLeft+a.container.clientWidth/2:M.x+a.container.scrollLeft-a.container.offsetLeft;var k=e?a.container.scrollTop+a.container.clientHeight/2:M.y+a.container.scrollTop-a.container.offsetTop;I.style.transformOrigin=c+"px "+k+"px";I.style.transform="scale("+
+this.cumulativeZoomFactor+")";F.style.transformOrigin=c+"px "+k+"px";F.style.transform="scale("+this.cumulativeZoomFactor+")";null!=a.view.backgroundPageShape&&null!=a.view.backgroundPageShape.node&&(c=a.view.backgroundPageShape.node,mxUtils.setPrefixedStyle(c.style,"transform-origin",(e?a.container.clientWidth/2+a.container.scrollLeft-c.offsetLeft+"px":M.x+a.container.scrollLeft-c.offsetLeft-a.container.offsetLeft+"px")+" "+(e?a.container.clientHeight/2+a.container.scrollTop-c.offsetTop+"px":M.y+
+a.container.scrollTop-c.offsetTop-a.container.offsetTop+"px")),mxUtils.setPrefixedStyle(c.style,"transform","scale("+this.cumulativeZoomFactor+")"));a.view.getDecoratorPane().style.opacity="0";a.view.getOverlayPane().style.opacity="0";null!=d.hoverIcons&&d.hoverIcons.reset()}v(b)}};mxEvent.addGestureListeners(a.container,function(a){null!=D&&window.clearTimeout(D)},null,function(c){1!=a.cumulativeZoomFactor&&v(0)});mxEvent.addListener(a.container,"scroll",function(c){null==D||a.isMouseDown||1==a.cumulativeZoomFactor||
+v(0)});mxEvent.addMouseWheelListener(mxUtils.bind(this,function(c,e,b,d,k){if(null==this.dialogs||0==this.dialogs.length)if(!a.scrollbars&&!b&&a.isScrollWheelEvent(c))b=a.view.getTranslate(),d=40/a.view.scale,mxEvent.isShiftDown(c)?a.view.setTranslate(b.x+(e?-d:d),b.y):a.view.setTranslate(b.x,b.y+(e?d:-d));else if(b||a.isZoomWheelEvent(c))for(var f=mxEvent.getSource(c);null!=f;){if(f==a.container)return a.tooltipHandler.hideTooltip(),M=null!=d&&null!=k?new mxPoint(d,k):new mxPoint(mxEvent.getClientX(c),
mxEvent.getClientY(c)),O=b,a.lazyZoom(e),mxEvent.consume(c),!1;f=f.parentNode}}),a.container);a.panningHandler.zoomGraph=function(c){a.cumulativeZoomFactor=c.scale;a.lazyZoom(0<c.scale,!0);mxEvent.consume(c)}};EditorUi.prototype.addChromelessToolbarItems=function(a){a(mxUtils.bind(this,function(a){this.actions.get("print").funct();mxEvent.consume(a)}),Editor.printLargeImage,mxResources.get("print"))};EditorUi.prototype.isPagesEnabled=function(){return this.editor.editable||"1"!=urlParams["hide-pages"]};
EditorUi.prototype.createTemporaryGraph=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};
EditorUi.prototype.addChromelessClickHandler=function(){var a=urlParams.highlight;null!=a&&0<a.length&&(a="#"+a);this.editor.graph.addClickHandler(a)};EditorUi.prototype.toggleFormatPanel=function(a){a=null!=a?a:0==this.formatWidth;null!=this.format&&(this.formatWidth=a?240:0,this.formatContainer.style.display=a?"":"none",this.refresh(),this.format.refresh(),this.fireEvent(new mxEventObject("formatWidthChanged")))};
EditorUi.prototype.lightboxFit=function(a){if(this.isDiagramEmpty())this.editor.graph.view.setScale(1);else{var b=urlParams.border,d=60;null!=b&&(d=parseInt(b));this.editor.graph.maxFitScale=this.lightboxMaxFitScale;this.editor.graph.fit(d,null,null,null,null,null,a);this.editor.graph.maxFitScale=null}};EditorUi.prototype.isDiagramEmpty=function(){var a=this.editor.graph.getModel();return 1==a.getChildCount(a.root)&&0==a.getChildCount(a.getChildAt(a.root,0))};
EditorUi.prototype.isSelectionAllowed=function(a){return"SELECT"==mxEvent.getSource(a).nodeName||"INPUT"==mxEvent.getSource(a).nodeName&&mxUtils.isAncestorNode(this.formatContainer,mxEvent.getSource(a))};EditorUi.prototype.addBeforeUnloadListener=function(){window.onbeforeunload=mxUtils.bind(this,function(){if(!this.editor.isChromelessView())return this.onBeforeUnload()})};EditorUi.prototype.onBeforeUnload=function(){if(this.editor.modified)return mxResources.get("allChangesLost")};
-EditorUi.prototype.open=function(){try{null!=window.opener&&null!=window.opener.openFile&&window.opener.openFile.setConsumer(mxUtils.bind(this,function(a,b){try{var d=mxUtils.parseXml(a);this.editor.setGraphXml(d.documentElement);this.editor.setModified(!1);this.editor.undoManager.clear();null!=b&&(this.editor.setFilename(b),this.updateDocumentTitle())}catch(k){mxUtils.alert(mxResources.get("invalidOrMissingFile")+": "+k.message)}}))}catch(a){}this.editor.graph.view.validate();this.editor.graph.sizeDidChange();
-this.editor.fireEvent(new mxEventObject("resetGraphView"))};EditorUi.prototype.showPopupMenu=function(a,b,d,k){this.editor.graph.popupMenuHandler.hideMenu();var f=new mxPopupMenu(a);f.div.className+=" geMenubarMenu";f.smartSeparators=!0;f.showDisabled=!0;f.autoExpand=!0;f.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(f,arguments);f.destroy()});f.popup(b,d,null,k);this.setCurrentMenu(f)};
+EditorUi.prototype.open=function(){try{null!=window.opener&&null!=window.opener.openFile&&window.opener.openFile.setConsumer(mxUtils.bind(this,function(a,b){try{var d=mxUtils.parseXml(a);this.editor.setGraphXml(d.documentElement);this.editor.setModified(!1);this.editor.undoManager.clear();null!=b&&(this.editor.setFilename(b),this.updateDocumentTitle())}catch(g){mxUtils.alert(mxResources.get("invalidOrMissingFile")+": "+g.message)}}))}catch(a){}this.editor.graph.view.validate();this.editor.graph.sizeDidChange();
+this.editor.fireEvent(new mxEventObject("resetGraphView"))};EditorUi.prototype.showPopupMenu=function(a,b,d,g){this.editor.graph.popupMenuHandler.hideMenu();var f=new mxPopupMenu(a);f.div.className+=" geMenubarMenu";f.smartSeparators=!0;f.showDisabled=!0;f.autoExpand=!0;f.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(f,arguments);f.destroy()});f.popup(b,d,null,g);this.setCurrentMenu(f)};
EditorUi.prototype.setCurrentMenu=function(a,b){this.currentMenuElt=b;this.currentMenu=a};EditorUi.prototype.resetCurrentMenu=function(){this.currentMenu=this.currentMenuElt=null};EditorUi.prototype.hideCurrentMenu=function(){null!=this.currentMenu&&(this.currentMenu.hideMenu(),this.resetCurrentMenu())};EditorUi.prototype.updateDocumentTitle=function(){var a=this.editor.getOrCreateFilename();null!=this.editor.appName&&(a+=" - "+this.editor.appName);document.title=a};
EditorUi.prototype.createHoverIcons=function(){return new HoverIcons(this.editor.graph)};EditorUi.prototype.redo=function(){try{this.editor.graph.isEditing()?document.execCommand("redo",!1,null):this.editor.undoManager.redo()}catch(a){}};EditorUi.prototype.undo=function(){try{var a=this.editor.graph;if(a.isEditing()){var b=a.cellEditor.textarea.innerHTML;document.execCommand("undo",!1,null);b==a.cellEditor.textarea.innerHTML&&(a.stopEditing(!0),this.editor.undoManager.undo())}else this.editor.undoManager.undo()}catch(d){}};
EditorUi.prototype.canRedo=function(){return this.editor.graph.isEditing()||this.editor.undoManager.canRedo()};EditorUi.prototype.canUndo=function(){return this.editor.graph.isEditing()||this.editor.undoManager.canUndo()};EditorUi.prototype.getEditBlankXml=function(){return mxUtils.getXml(this.editor.getGraphXml())};EditorUi.prototype.getUrl=function(a){a=null!=a?a:window.location.pathname;var b=0<a.indexOf("?")?1:0,d;for(d in urlParams)a=0==b?a+"?":a+"&",a+=d+"="+urlParams[d],b++;return a};
EditorUi.prototype.setScrollbars=function(a){var b=this.editor.graph,d=b.container.style.overflow;b.scrollbars=a;this.editor.updateGraphComponents();d!=b.container.style.overflow&&(b.container.scrollTop=0,b.container.scrollLeft=0,b.view.scaleAndTranslate(1,0,0),this.resetScrollbars());this.fireEvent(new mxEventObject("scrollbarsChanged"))};EditorUi.prototype.hasScrollbars=function(){return this.editor.graph.scrollbars};
EditorUi.prototype.resetScrollbars=function(){var a=this.editor.graph;if(!this.editor.extendCanvas)a.container.scrollTop=0,a.container.scrollLeft=0,mxUtils.hasScrollbars(a.container)||a.view.setTranslate(0,0);else if(!this.editor.isChromelessView())if(mxUtils.hasScrollbars(a.container))if(a.pageVisible){var b=a.getPagePadding();a.container.scrollTop=Math.floor(b.y-this.editor.initialTopSpacing)-1;a.container.scrollLeft=Math.floor(Math.min(b.x,(a.container.scrollWidth-a.container.clientWidth)/2))-
1;b=a.getGraphBounds();0<b.width&&0<b.height&&(b.x>a.container.scrollLeft+.9*a.container.clientWidth&&(a.container.scrollLeft=Math.min(b.x+b.width-a.container.clientWidth,b.x-10)),b.y>a.container.scrollTop+.9*a.container.clientHeight&&(a.container.scrollTop=Math.min(b.y+b.height-a.container.clientHeight,b.y-10)))}else{var b=a.getGraphBounds(),d=Math.max(b.width,a.scrollTileSize.width*a.view.scale);a.container.scrollTop=Math.floor(Math.max(0,b.y-Math.max(20,(a.container.clientHeight-Math.max(b.height,
-a.scrollTileSize.height*a.view.scale))/4)));a.container.scrollLeft=Math.floor(Math.max(0,b.x-Math.max(0,(a.container.clientWidth-d)/2)))}else{var b=mxRectangle.fromRectangle(a.pageVisible?a.view.getBackgroundPageBounds():a.getGraphBounds()),d=a.view.translate,k=a.view.scale;b.x=b.x/k-d.x;b.y=b.y/k-d.y;b.width/=k;b.height/=k;a.view.setTranslate(Math.floor(Math.max(0,(a.container.clientWidth-b.width)/2)-b.x+2),Math.floor((a.pageVisible?0:Math.max(0,(a.container.clientHeight-b.height)/4))-b.y+1))}};
-EditorUi.prototype.setPageVisible=function(a){var b=this.editor.graph,d=mxUtils.hasScrollbars(b.container),k=0,f=0;d&&(k=b.view.translate.x*b.view.scale-b.container.scrollLeft,f=b.view.translate.y*b.view.scale-b.container.scrollTop);b.pageVisible=a;b.pageBreaksVisible=a;b.preferPageSize=a;b.view.validateBackground();d&&(a=b.getSelectionCells(),b.clearSelection(),b.setSelectionCells(a));b.sizeDidChange();d&&(b.container.scrollLeft=b.view.translate.x*b.view.scale-k,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-d)/2)))}else{var b=mxRectangle.fromRectangle(a.pageVisible?a.view.getBackgroundPageBounds():a.getGraphBounds()),d=a.view.translate,g=a.view.scale;b.x=b.x/g-d.x;b.y=b.y/g-d.y;b.width/=g;b.height/=g;a.view.setTranslate(Math.floor(Math.max(0,(a.container.clientWidth-b.width)/2)-b.x+2),Math.floor((a.pageVisible?0:Math.max(0,(a.container.clientHeight-b.height)/4))-b.y+1))}};
+EditorUi.prototype.setPageVisible=function(a){var b=this.editor.graph,d=mxUtils.hasScrollbars(b.container),g=0,f=0;d&&(g=b.view.translate.x*b.view.scale-b.container.scrollLeft,f=b.view.translate.y*b.view.scale-b.container.scrollTop);b.pageVisible=a;b.pageBreaksVisible=a;b.preferPageSize=a;b.view.validateBackground();d&&(a=b.getSelectionCells(),b.clearSelection(),b.setSelectionCells(a));b.sizeDidChange();d&&(b.container.scrollLeft=b.view.translate.x*b.view.scale-g,b.container.scrollTop=b.view.translate.y*
b.view.scale-f);this.fireEvent(new mxEventObject("pageViewChanged"))};function ChangeGridColor(a,b){this.ui=a;this.color=b}ChangeGridColor.prototype.execute=function(){var a=this.ui.editor.graph.view.gridColor;this.ui.setGridColor(this.color);this.color=a};(function(){var a=new mxObjectCodec(new ChangeGridColor,["ui"]);mxCodecRegistry.register(a)})();
-function ChangePageSetup(a,b,d,k,f){this.ui=a;this.previousColor=this.color=b;this.previousImage=this.image=d;this.previousFormat=this.format=k;this.previousPageScale=this.pageScale=f;this.ignoreImage=this.ignoreColor=!1}
+function ChangePageSetup(a,b,d,g,f){this.ui=a;this.previousColor=this.color=b;this.previousImage=this.image=d;this.previousFormat=this.format=g;this.previousPageScale=this.pageScale=f;this.ignoreImage=this.ignoreColor=!1}
ChangePageSetup.prototype.execute=function(){var a=this.ui.editor.graph;if(!this.ignoreColor){this.color=this.previousColor;var b=a.background;this.ui.setBackgroundColor(this.previousColor);this.previousColor=b}if(!this.ignoreImage){this.image=this.previousImage;var b=a.backgroundImage,d=this.previousImage;null!=d&&null!=d.src&&"data:page/id,"==d.src.substring(0,13)&&(d=this.ui.createImageForPageLink(d.src));this.ui.setBackgroundImage(d);this.previousImage=b}null!=this.previousFormat&&(this.format=
this.previousFormat,b=a.pageFormat,this.previousFormat.width!=b.width||this.previousFormat.height!=b.height)&&(this.ui.setPageFormat(this.previousFormat),this.previousFormat=b);null!=this.foldingEnabled&&this.foldingEnabled!=this.ui.editor.graph.foldingEnabled&&(this.ui.setFoldingEnabled(this.foldingEnabled),this.foldingEnabled=!this.foldingEnabled);null!=this.previousPageScale&&(a=this.ui.editor.graph.pageScale,this.previousPageScale!=a&&(this.ui.setPageScale(this.previousPageScale),this.previousPageScale=
-a))};(function(){var a=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat","previousPageScale"]);a.afterDecode=function(a,d,k){k.previousColor=k.color;k.previousImage=k.image;k.previousFormat=k.format;k.previousPageScale=k.pageScale;null!=k.foldingEnabled&&(k.foldingEnabled=!k.foldingEnabled);return k};mxCodecRegistry.register(a)})();
+a))};(function(){var a=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat","previousPageScale"]);a.afterDecode=function(a,d,g){g.previousColor=g.color;g.previousImage=g.image;g.previousFormat=g.format;g.previousPageScale=g.pageScale;null!=g.foldingEnabled&&(g.foldingEnabled=!g.foldingEnabled);return g};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"),d=this.editor.undoManager,k=mxUtils.bind(this,function(){a.setEnabled(this.canUndo());b.setEnabled(this.canRedo())});d.addListener(mxEvent.ADD,k);d.addListener(mxEvent.UNDO,k);d.addListener(mxEvent.REDO,k);d.addListener(mxEvent.CLEAR,k);var f=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){f.apply(this,arguments);k()};var m=this.editor.graph.cellEditor.stopEditing;
-this.editor.graph.cellEditor.stopEditing=function(a,c){m.apply(this,arguments);k()};k()};
-EditorUi.prototype.updateActionStates=function(){var a=this.editor.graph,b=!1,d=!1,k=!1,f=!1,m=[],p=a.getSelectionCells();if(null!=p)for(var c=0;c<p.length;c++){var e=p[c];a.isCellEditable(e)&&(m.push(e),f=!0,a.getModel().isEdge(e)&&(k=!0),a.getModel().isVertex(e)&&(b=!0,0<a.getModel().getChildCount(e)||a.isContainer(e)))&&(d=!0)}p="cut copy bold italic underline delete duplicate editStyle editTooltip editLink backgroundColor borderColor edit toFront toBack solid dashed pasteSize dotted fillColor gradientColor shadow fontColor formattedText rounded toggleRounded sharp strokeColor".split(" ");for(c=
+EditorUi.prototype.addUndoListener=function(){var a=this.actions.get("undo"),b=this.actions.get("redo"),d=this.editor.undoManager,g=mxUtils.bind(this,function(){a.setEnabled(this.canUndo());b.setEnabled(this.canRedo())});d.addListener(mxEvent.ADD,g);d.addListener(mxEvent.UNDO,g);d.addListener(mxEvent.REDO,g);d.addListener(mxEvent.CLEAR,g);var f=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){f.apply(this,arguments);g()};var m=this.editor.graph.cellEditor.stopEditing;
+this.editor.graph.cellEditor.stopEditing=function(a,c){m.apply(this,arguments);g()};g()};
+EditorUi.prototype.updateActionStates=function(){var a=this.editor.graph,b=!1,d=!1,g=!1,f=!1,m=[],p=a.getSelectionCells();if(null!=p)for(var c=0;c<p.length;c++){var e=p[c];a.isCellEditable(e)&&(m.push(e),f=!0,a.getModel().isEdge(e)&&(g=!0),a.getModel().isVertex(e)&&(b=!0,0<a.getModel().getChildCount(e)||a.isContainer(e)))&&(d=!0)}p="cut copy bold italic underline delete duplicate editStyle editTooltip editLink backgroundColor borderColor edit toFront toBack solid dashed pasteSize dotted fillColor gradientColor shadow fontColor formattedText rounded toggleRounded sharp strokeColor".split(" ");for(c=
0;c<p.length;c++)this.actions.get(p[c]).setEnabled(f);this.actions.get("lockUnlock").setEnabled(!a.isSelectionEmpty());this.actions.get("setAsDefaultStyle").setEnabled(1==a.getSelectionCount());this.actions.get("clearWaypoints").setEnabled(f);this.actions.get("copySize").setEnabled(1==a.getSelectionCount());this.actions.get("bringForward").setEnabled(1==m.length);this.actions.get("sendBackward").setEnabled(1==m.length);this.actions.get("turn").setEnabled(0<a.getResizableCells(a.getSelectionCells()).length);
-this.actions.get("curved").setEnabled(k);this.actions.get("rotation").setEnabled(b);this.actions.get("wordWrap").setEnabled(b);this.actions.get("autosize").setEnabled(b);k=b&&1==a.getSelectionCount();this.actions.get("group").setEnabled(1<a.getSelectionCount()||k&&!a.isContainer(a.getSelectionCell()));this.actions.get("ungroup").setEnabled(d);this.actions.get("removeFromGroup").setEnabled(k&&a.getModel().isVertex(a.getModel().getParent(m[0])));a.view.getState(a.getSelectionCell());this.menus.get("navigation").setEnabled(f||
+this.actions.get("curved").setEnabled(g);this.actions.get("rotation").setEnabled(b);this.actions.get("wordWrap").setEnabled(b);this.actions.get("autosize").setEnabled(b);g=b&&1==a.getSelectionCount();this.actions.get("group").setEnabled(1<a.getSelectionCount()||g&&!a.isContainer(a.getSelectionCell()));this.actions.get("ungroup").setEnabled(d);this.actions.get("removeFromGroup").setEnabled(g&&a.getModel().isVertex(a.getModel().getParent(m[0])));a.view.getState(a.getSelectionCell());this.menus.get("navigation").setEnabled(f||
null!=a.view.currentRoot);this.actions.get("collapsible").setEnabled(b&&(a.isContainer(a.getSelectionCell())||0<a.model.getChildCount(a.getSelectionCell())));this.actions.get("home").setEnabled(null!=a.view.currentRoot);this.actions.get("exitGroup").setEnabled(null!=a.view.currentRoot);this.actions.get("enterGroup").setEnabled(1==a.getSelectionCount()&&a.isValidRoot(a.getSelectionCell()));d=1==a.getSelectionCount()&&a.isCellFoldable(a.getSelectionCell());this.actions.get("expand").setEnabled(d);this.actions.get("collapse").setEnabled(d);
this.actions.get("editLink").setEnabled(1==m.length);this.actions.get("openLink").setEnabled(1==a.getSelectionCount()&&null!=a.getLinkForCell(a.getSelectionCell()));this.actions.get("guides").setEnabled(a.isEnabled());this.actions.get("grid").setEnabled(!this.editor.chromeless||this.editor.editable);m=a.isEnabled()&&!a.isCellLocked(a.getDefaultParent());this.menus.get("layout").setEnabled(m);this.menus.get("insert").setEnabled(m);this.menus.get("direction").setEnabled(m&&b);this.menus.get("align").setEnabled(m&&
b&&1<a.getSelectionCount());this.menus.get("distribute").setEnabled(m&&b&&1<a.getSelectionCount());this.actions.get("selectVertices").setEnabled(m);this.actions.get("selectEdges").setEnabled(m);this.actions.get("selectAll").setEnabled(m);this.actions.get("selectNone").setEnabled(m);this.updatePasteActionStates()};EditorUi.prototype.zeroOffset=new mxPoint(0,0);EditorUi.prototype.getDiagramContainerOffset=function(){return this.zeroOffset};
-EditorUi.prototype.refresh=function(a){a=null!=a?a:!0;var b=this.container.clientWidth,d=this.container.clientHeight;this.container==document.body&&(b=document.body.clientWidth||document.documentElement.clientWidth,d=document.documentElement.clientHeight);var k=0;mxClient.IS_IOS&&!window.navigator.standalone&&window.innerHeight!=document.documentElement.clientHeight&&(k=document.documentElement.clientHeight-window.innerHeight,window.scrollTo(0,0));var f=Math.max(0,Math.min(this.hsplitPosition,b-this.splitSize-
-20)),m=0;null!=this.menubar&&(this.menubarContainer.style.height=this.menubarHeight+"px",m+=this.menubarHeight);null!=this.toolbar&&(this.toolbarContainer.style.top=this.menubarHeight+"px",this.toolbarContainer.style.height=this.toolbarHeight+"px",m+=this.toolbarHeight);0<m&&(m+=1);b=0;if(null!=this.sidebarFooterContainer){var p=this.footerHeight+k,b=Math.max(0,Math.min(d-m-p,this.sidebarFooterHeight));this.sidebarFooterContainer.style.width=f+"px";this.sidebarFooterContainer.style.height=b+"px";
+EditorUi.prototype.refresh=function(a){a=null!=a?a:!0;var b=this.container.clientWidth,d=this.container.clientHeight;this.container==document.body&&(b=document.body.clientWidth||document.documentElement.clientWidth,d=document.documentElement.clientHeight);var g=0;mxClient.IS_IOS&&!window.navigator.standalone&&window.innerHeight!=document.documentElement.clientHeight&&(g=document.documentElement.clientHeight-window.innerHeight,window.scrollTo(0,0));var f=Math.max(0,Math.min(this.hsplitPosition,b-this.splitSize-
+20)),m=0;null!=this.menubar&&(this.menubarContainer.style.height=this.menubarHeight+"px",m+=this.menubarHeight);null!=this.toolbar&&(this.toolbarContainer.style.top=this.menubarHeight+"px",this.toolbarContainer.style.height=this.toolbarHeight+"px",m+=this.toolbarHeight);0<m&&(m+=1);b=0;if(null!=this.sidebarFooterContainer){var p=this.footerHeight+g,b=Math.max(0,Math.min(d-m-p,this.sidebarFooterHeight));this.sidebarFooterContainer.style.width=f+"px";this.sidebarFooterContainer.style.height=b+"px";
this.sidebarFooterContainer.style.bottom=p+"px"}d=null!=this.format?this.formatWidth:0;this.sidebarContainer.style.top=m+"px";this.sidebarContainer.style.width=f+"px";this.formatContainer.style.top=m+"px";this.formatContainer.style.width=d+"px";this.formatContainer.style.display=null!=this.format?"":"none";var p=this.getDiagramContainerOffset(),c=null!=this.hsplit.parentNode?f+this.splitSize:0;this.diagramContainer.style.left=c+p.x+"px";this.diagramContainer.style.top=m+p.y+"px";this.footerContainer.style.height=
-this.footerHeight+"px";this.hsplit.style.top=this.sidebarContainer.style.top;this.hsplit.style.bottom=this.footerHeight+k+"px";this.hsplit.style.left=f+"px";this.footerContainer.style.display=0==this.footerHeight?"none":"";null!=this.tabContainer&&(this.tabContainer.style.left=c+"px");0<this.footerHeight&&(this.footerContainer.style.bottom=k+"px");this.diagramContainer.style.right=d+"px";f=0;null!=this.tabContainer&&(this.tabContainer.style.bottom=this.footerHeight+k+"px",this.tabContainer.style.right=
-this.diagramContainer.style.right,f=this.tabContainer.clientHeight);this.sidebarContainer.style.bottom=this.footerHeight+b+k+"px";this.formatContainer.style.bottom=this.footerHeight+k+"px";this.diagramContainer.style.bottom=this.footerHeight+k+f+"px";a&&this.editor.graph.sizeDidChange()};EditorUi.prototype.createTabContainer=function(){return null};
+this.footerHeight+"px";this.hsplit.style.top=this.sidebarContainer.style.top;this.hsplit.style.bottom=this.footerHeight+g+"px";this.hsplit.style.left=f+"px";this.footerContainer.style.display=0==this.footerHeight?"none":"";null!=this.tabContainer&&(this.tabContainer.style.left=c+"px");0<this.footerHeight&&(this.footerContainer.style.bottom=g+"px");this.diagramContainer.style.right=d+"px";f=0;null!=this.tabContainer&&(this.tabContainer.style.bottom=this.footerHeight+g+"px",this.tabContainer.style.right=
+this.diagramContainer.style.right,f=this.tabContainer.clientHeight);this.sidebarContainer.style.bottom=this.footerHeight+b+g+"px";this.formatContainer.style.bottom=this.footerHeight+g+"px";this.diagramContainer.style.bottom=this.footerHeight+g+f+"px";a&&this.editor.graph.sizeDidChange()};EditorUi.prototype.createTabContainer=function(){return null};
EditorUi.prototype.createDivs=function(){this.menubarContainer=this.createDiv("geMenubarContainer");this.toolbarContainer=this.createDiv("geToolbarContainer");this.sidebarContainer=this.createDiv("geSidebarContainer");this.formatContainer=this.createDiv("geSidebarContainer geFormatContainer");this.diagramContainer=this.createDiv("geDiagramContainer");this.footerContainer=this.createDiv("geFooterContainer");this.hsplit=this.createDiv("geHsplit");this.hsplit.setAttribute("title",mxResources.get("collapseExpand"));
this.menubarContainer.style.top="0px";this.menubarContainer.style.left="0px";this.menubarContainer.style.right="0px";this.toolbarContainer.style.left="0px";this.toolbarContainer.style.right="0px";this.sidebarContainer.style.left="0px";this.formatContainer.style.right="0px";this.formatContainer.style.zIndex="1";this.diagramContainer.style.right=(null!=this.format?this.formatWidth:0)+"px";this.footerContainer.style.left="0px";this.footerContainer.style.right="0px";this.footerContainer.style.bottom=
"0px";this.footerContainer.style.zIndex=mxPopupMenu.prototype.zIndex-3;this.hsplit.style.width=this.splitSize+"px";if(this.sidebarFooterContainer=this.createSidebarFooterContainer())this.sidebarFooterContainer.style.left="0px";this.editor.chromeless?this.diagramContainer.style.border="none":this.tabContainer=this.createTabContainer()};EditorUi.prototype.createSidebarFooterContainer=function(){return null};
@@ -2248,18 +2249,18 @@ this.sidebar=this.editor.chromeless?null:this.createSidebar(this.sidebarContaine
this.container.appendChild(this.sidebarFooterContainer);this.container.appendChild(this.diagramContainer);null!=this.container&&null!=this.tabContainer&&this.container.appendChild(this.tabContainer);this.toolbar=this.editor.chromeless?null:this.createToolbar(this.createDiv("geToolbar"));null!=this.toolbar&&(this.toolbarContainer.appendChild(this.toolbar.container),this.container.appendChild(this.toolbarContainer));null!=this.sidebar&&(this.container.appendChild(this.hsplit),this.addSplitHandler(this.hsplit,
!0,0,mxUtils.bind(this,function(a){this.hsplitPosition=a;this.refresh()})))};EditorUi.prototype.createStatusContainer=function(){var a=document.createElement("a");a.className="geItem geStatus";return a};EditorUi.prototype.setStatusText=function(a){this.statusContainer.innerHTML=a};EditorUi.prototype.createToolbar=function(a){return new Toolbar(this,a)};EditorUi.prototype.createSidebar=function(a){return new Sidebar(this,a)};EditorUi.prototype.createFormat=function(a){return new Format(this,a)};
EditorUi.prototype.createFooter=function(){return this.createDiv("geFooter")};EditorUi.prototype.createDiv=function(a){var b=document.createElement("div");b.className=a;return b};
-EditorUi.prototype.addSplitHandler=function(a,b,d,k){function f(a){if(null!=p){var f=new mxPoint(mxEvent.getClientX(a),mxEvent.getClientY(a));k(Math.max(0,c+(b?f.x-p.x:p.y-f.y)-d));mxEvent.consume(a);c!=n()&&(e=!0,g=null)}}function m(a){f(a);p=c=null}var p=null,c=null,e=!0,g=null;mxClient.IS_POINTER&&(a.style.touchAction="none");var n=mxUtils.bind(this,function(){var c=parseInt(b?a.style.left:a.style.bottom);b||(c=c+d-this.footerHeight);return c});mxEvent.addGestureListeners(a,function(a){p=new mxPoint(mxEvent.getClientX(a),
-mxEvent.getClientY(a));c=n();e=!1;mxEvent.consume(a)});mxEvent.addListener(a,"click",mxUtils.bind(this,function(a){if(!e&&this.hsplitClickEnabled){var c=null!=g?g-d:0;g=n();k(c);mxEvent.consume(a)}}));mxEvent.addGestureListeners(document,null,f,m);this.destroyFunctions.push(function(){mxEvent.removeGestureListeners(document,null,f,m)})};
-EditorUi.prototype.handleError=function(a,b,d,k,f){a=null!=a&&null!=a.error?a.error:a;if(null!=a||null!=b){f=mxUtils.htmlEntities(mxResources.get("unknownError"));var m=mxResources.get("ok");b=null!=b?b:mxResources.get("error");null!=a&&null!=a.message&&(f=mxUtils.htmlEntities(a.message));this.showError(b,f,m,d,null,null,null,null,null,null,null,null,k?d:null)}else null!=d&&d()};
-EditorUi.prototype.showError=function(a,b,d,k,f,m,p,c,e,g,n,l,q){a=new ErrorDialog(this,a,b,d||mxResources.get("ok"),k,f,m,p,l,c,e);b=Math.ceil(null!=b?b.length/50:1);this.showDialog(a.container,g||340,n||100+20*b,!0,!1,q);a.init()};EditorUi.prototype.showDialog=function(a,b,d,k,f,m,p,c,e,g){this.editor.graph.tooltipHandler.resetTimer();this.editor.graph.tooltipHandler.hideTooltip();null==this.dialogs&&(this.dialogs=[]);this.dialog=new Dialog(this,a,b,d,k,f,m,p,c,e,g);this.dialogs.push(this.dialog)};
+EditorUi.prototype.addSplitHandler=function(a,b,d,g){function f(a){if(null!=p){var f=new mxPoint(mxEvent.getClientX(a),mxEvent.getClientY(a));g(Math.max(0,c+(b?f.x-p.x:p.y-f.y)-d));mxEvent.consume(a);c!=n()&&(e=!0,k=null)}}function m(a){f(a);p=c=null}var p=null,c=null,e=!0,k=null;mxClient.IS_POINTER&&(a.style.touchAction="none");var n=mxUtils.bind(this,function(){var c=parseInt(b?a.style.left:a.style.bottom);b||(c=c+d-this.footerHeight);return c});mxEvent.addGestureListeners(a,function(a){p=new mxPoint(mxEvent.getClientX(a),
+mxEvent.getClientY(a));c=n();e=!1;mxEvent.consume(a)});mxEvent.addListener(a,"click",mxUtils.bind(this,function(a){if(!e&&this.hsplitClickEnabled){var c=null!=k?k-d:0;k=n();g(c);mxEvent.consume(a)}}));mxEvent.addGestureListeners(document,null,f,m);this.destroyFunctions.push(function(){mxEvent.removeGestureListeners(document,null,f,m)})};
+EditorUi.prototype.handleError=function(a,b,d,g,f){a=null!=a&&null!=a.error?a.error:a;if(null!=a||null!=b){f=mxUtils.htmlEntities(mxResources.get("unknownError"));var m=mxResources.get("ok");b=null!=b?b:mxResources.get("error");null!=a&&null!=a.message&&(f=mxUtils.htmlEntities(a.message));this.showError(b,f,m,d,null,null,null,null,null,null,null,null,g?d:null)}else null!=d&&d()};
+EditorUi.prototype.showError=function(a,b,d,g,f,m,p,c,e,k,n,l,q){a=new ErrorDialog(this,a,b,d||mxResources.get("ok"),g,f,m,p,l,c,e);b=Math.ceil(null!=b?b.length/50:1);this.showDialog(a.container,k||340,n||100+20*b,!0,!1,q);a.init()};EditorUi.prototype.showDialog=function(a,b,d,g,f,m,p,c,e,k){this.editor.graph.tooltipHandler.resetTimer();this.editor.graph.tooltipHandler.hideTooltip();null==this.dialogs&&(this.dialogs=[]);this.dialog=new Dialog(this,a,b,d,g,f,m,p,c,e,k);this.dialogs.push(this.dialog)};
EditorUi.prototype.hideDialog=function(a,b,d){null!=this.dialogs&&0<this.dialogs.length&&(null==d||d==this.dialog.container.firstChild)&&(d=this.dialogs.pop(),0==d.close(a,b)?this.dialogs.push(d):(this.dialog=0<this.dialogs.length?this.dialogs[this.dialogs.length-1]:null,this.editor.fireEvent(new mxEventObject("hideDialog")),null==this.dialog&&"hidden"!=this.editor.graph.container.style.visibility&&window.setTimeout(mxUtils.bind(this,function(){this.editor.graph.isEditing()&&null!=this.editor.graph.cellEditor.textarea?
-this.editor.graph.cellEditor.textarea.focus():(mxUtils.clearSelection(),this.editor.graph.container.focus())}),0)))};EditorUi.prototype.ctrlEnter=function(){var a=this.editor.graph;if(a.isEnabled())try{for(var b=a.getSelectionCells(),d=new mxDictionary,k=[],f=0;f<b.length;f++){var m=a.isTableCell(b[f])?a.model.getParent(b[f]):b[f];null==m||d.get(m)||(d.put(m,!0),k.push(m))}a.setSelectionCells(a.duplicateCells(k,!1))}catch(p){this.handleError(p)}};
-EditorUi.prototype.pickColor=function(a,b){var d=this.editor.graph,k=d.cellEditor.saveSelection(),f=230+17*(Math.ceil(ColorDialog.prototype.presetColors.length/12)+Math.ceil(ColorDialog.prototype.defaultColors.length/12)),m=new ColorDialog(this,a||"none",function(a){d.cellEditor.restoreSelection(k);b(a)},function(){d.cellEditor.restoreSelection(k)});this.showDialog(m.container,230,f,!0,!1);m.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(),d=new mxDictionary,g=[],f=0;f<b.length;f++){var m=a.isTableCell(b[f])?a.model.getParent(b[f]):b[f];null==m||d.get(m)||(d.put(m,!0),g.push(m))}a.setSelectionCells(a.duplicateCells(g,!1))}catch(p){this.handleError(p)}};
+EditorUi.prototype.pickColor=function(a,b){var d=this.editor.graph,g=d.cellEditor.saveSelection(),f=230+17*(Math.ceil(ColorDialog.prototype.presetColors.length/12)+Math.ceil(ColorDialog.prototype.defaultColors.length/12)),m=new ColorDialog(this,a||"none",function(a){d.cellEditor.restoreSelection(g);b(a)},function(){d.cellEditor.restoreSelection(g)});this.showDialog(m.container,230,f,!0,!1);m.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 d=a.indexOf("&lt;mxGraphModel ");if(0<=d){var k=a.lastIndexOf("&lt;/mxGraphModel&gt;");k>d&&(b=a.substring(d,k+21).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}}catch(f){}return b};
+EditorUi.prototype.extractGraphModelFromHtml=function(a){var b=null;try{var d=a.indexOf("&lt;mxGraphModel ");if(0<=d){var g=a.lastIndexOf("&lt;/mxGraphModel&gt;");g>d&&(b=a.substring(d,g+21).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}}catch(f){}return b};
EditorUi.prototype.readGraphModelFromClipboard=function(a){this.readGraphModelFromClipboardWithType(mxUtils.bind(this,function(b){null!=b?a(b):this.readGraphModelFromClipboardWithType(mxUtils.bind(this,function(b){if(null!=b){var d=decodeURIComponent(b);this.isCompatibleString(d)&&(b=d)}a(b)}),"text")}),"html")};
EditorUi.prototype.readGraphModelFromClipboardWithType=function(a,b){navigator.clipboard.read().then(mxUtils.bind(this,function(d){if(null!=d&&0<d.length&&"html"==b&&0<=mxUtils.indexOf(d[0].types,"text/html"))d[0].getType("text/html").then(mxUtils.bind(this,function(b){b.text().then(mxUtils.bind(this,function(b){try{var d=this.parseHtmlData(b),f="text/plain"!=d.getAttribute("data-type")?d.innerHTML:mxUtils.trim(null==d.innerText?mxUtils.getTextContent(d):d.innerText);try{var c=f.lastIndexOf("%3E");
-0<=c&&c<f.length-3&&(f=f.substring(0,c+3))}catch(n){}try{var e=d.getElementsByTagName("span"),g=null!=e&&0<e.length?mxUtils.trim(decodeURIComponent(e[0].textContent)):decodeURIComponent(f);this.isCompatibleString(g)&&(f=g)}catch(n){}}catch(n){}a(this.isCompatibleString(f)?f:null)}))["catch"](function(b){a(null)})}))["catch"](function(b){a(null)});else if(null!=d&&0<d.length&&"text"==b&&0<=mxUtils.indexOf(d[0].types,"text/plain"))d[0].getType("text/plain").then(function(b){b.text().then(function(b){a(b)})["catch"](function(){a(null)})})["catch"](function(){a(null)});
+0<=c&&c<f.length-3&&(f=f.substring(0,c+3))}catch(n){}try{var e=d.getElementsByTagName("span"),k=null!=e&&0<e.length?mxUtils.trim(decodeURIComponent(e[0].textContent)):decodeURIComponent(f);this.isCompatibleString(k)&&(f=k)}catch(n){}}catch(n){}a(this.isCompatibleString(f)?f:null)}))["catch"](function(b){a(null)})}))["catch"](function(b){a(null)});else if(null!=d&&0<d.length&&"text"==b&&0<=mxUtils.indexOf(d[0].types,"text/plain"))d[0].getType("text/plain").then(function(b){b.text().then(function(b){a(b)})["catch"](function(){a(null)})})["catch"](function(){a(null)});
else a(null)}))["catch"](function(b){a(null)})};
EditorUi.prototype.parseHtmlData=function(a){var b=null;if(null!=a&&0<a.length){var d="<meta "==a.substring(0,6),b=document.createElement("div");b.innerHTML=(d?'<meta charset="utf-8">':"")+this.editor.graph.sanitizeHtml(a);asHtml=!0;a=b.getElementsByTagName("style");if(null!=a)for(;0<a.length;)a[0].parentNode.removeChild(a[0]);null!=b.firstChild&&b.firstChild.nodeType==mxConstants.NODETYPE_ELEMENT&&null!=b.firstChild.nextSibling&&b.firstChild.nextSibling.nodeType==mxConstants.NODETYPE_ELEMENT&&"META"==
b.firstChild.nodeName&&"A"==b.firstChild.nextSibling.nodeName&&null==b.firstChild.nextSibling.nextSibling&&(a=null==b.firstChild.nextSibling.innerText?mxUtils.getTextContent(b.firstChild.nextSibling):b.firstChild.nextSibling.innerText,a==b.firstChild.nextSibling.getAttribute("href")&&(mxUtils.setTextContent(b,a),asHtml=!1));d=d&&null!=b.firstChild?b.firstChild.nextSibling:b.firstChild;null!=d&&null==d.nextSibling&&d.nodeType==mxConstants.NODETYPE_ELEMENT&&"IMG"==d.nodeName?(a=d.getAttribute("src"),
@@ -2269,150 +2270,150 @@ EditorUi.prototype.extractGraphModelFromEvent=function(a){var b=null,d=null;null
(b=d);return b};EditorUi.prototype.isCompatibleString=function(a){return!1};EditorUi.prototype.saveFile=function(a){a||null==this.editor.filename?(a=new FilenameDialog(this,this.editor.getOrCreateFilename(),mxResources.get("save"),mxUtils.bind(this,function(a){this.save(a)}),null,mxUtils.bind(this,function(a){if(null!=a&&0<a.length)return!0;mxUtils.confirm(mxResources.get("invalidName"));return!1})),this.showDialog(a.container,300,100,!0,!0),a.init()):this.save(this.editor.getOrCreateFilename())};
EditorUi.prototype.save=function(a){if(null!=a){this.editor.graph.isEditing()&&this.editor.graph.stopEditing();var b=mxUtils.getXml(this.editor.getGraphXml());try{if(Editor.useLocalStorage){if(null!=localStorage.getItem(a)&&!mxUtils.confirm(mxResources.get("replaceIt",[a])))return;localStorage.setItem(a,b);this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("saved"))+" "+new Date)}else if(b.length<MAX_REQUEST_SIZE)(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(a)+"&xml="+encodeURIComponent(b))).simulate(document,
"_blank");else{mxUtils.alert(mxResources.get("drawingTooLarge"));mxUtils.popup(b);return}this.editor.setModified(!1);this.editor.setFilename(a);this.updateDocumentTitle()}catch(d){this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("errorSavingFile")))}}};
-EditorUi.prototype.executeLayout=function(a,b,d){var k=this.editor.graph;if(k.isEnabled()){k.getModel().beginUpdate();try{a()}catch(f){throw f;}finally{this.allowAnimation&&b&&(null==navigator.userAgent||0>navigator.userAgent.indexOf("Camino"))?(a=new mxMorphing(k),a.addListener(mxEvent.DONE,mxUtils.bind(this,function(){k.getModel().endUpdate();null!=d&&d()})),a.startAnimation()):(k.getModel().endUpdate(),null!=d&&d())}}};
-EditorUi.prototype.showImageDialog=function(a,b,d,k){k=this.editor.graph.cellEditor;var f=k.saveSelection(),m=mxUtils.prompt(a,b);k.restoreSelection(f);if(null!=m&&0<m.length){var p=new Image;p.onload=function(){d(m,p.width,p.height)};p.onerror=function(){d(null);mxUtils.alert(mxResources.get("fileNotFound"))};p.src=m}else d(null)};EditorUi.prototype.showLinkDialog=function(a,b,d){a=new LinkDialog(this,a,b,d);this.showDialog(a.container,420,90,!0,!0);a.init()};
+EditorUi.prototype.executeLayout=function(a,b,d){var g=this.editor.graph;if(g.isEnabled()){g.getModel().beginUpdate();try{a()}catch(f){throw f;}finally{this.allowAnimation&&b&&(null==navigator.userAgent||0>navigator.userAgent.indexOf("Camino"))?(a=new mxMorphing(g),a.addListener(mxEvent.DONE,mxUtils.bind(this,function(){g.getModel().endUpdate();null!=d&&d()})),a.startAnimation()):(g.getModel().endUpdate(),null!=d&&d())}}};
+EditorUi.prototype.showImageDialog=function(a,b,d,g){g=this.editor.graph.cellEditor;var f=g.saveSelection(),m=mxUtils.prompt(a,b);g.restoreSelection(f);if(null!=m&&0<m.length){var p=new Image;p.onload=function(){d(m,p.width,p.height)};p.onerror=function(){d(null);mxUtils.alert(mxResources.get("fileNotFound"))};p.src=m}else d(null)};EditorUi.prototype.showLinkDialog=function(a,b,d){a=new LinkDialog(this,a,b,d);this.showDialog(a.container,420,90,!0,!0);a.init()};
EditorUi.prototype.showDataDialog=function(a){null!=a&&(a=new EditDataDialog(this,a),this.showDialog(a.container,480,420,!0,!1,null,!1),a.init())};
EditorUi.prototype.showBackgroundImageDialog=function(a,b){a=null!=a?a:mxUtils.bind(this,function(a){a=new ChangePageSetup(this,null,a);a.ignoreColor=!0;this.editor.graph.model.execute(a)});var d=mxUtils.prompt(mxResources.get("backgroundImage"),null!=b?b.src:"");null!=d&&0<d.length?(b=new Image,b.onload=function(){a(new mxImage(d,b.width,b.height),!1)},b.onerror=function(){a(null,!0);mxUtils.alert(mxResources.get("fileNotFound"))},b.src=d):a(null)};
EditorUi.prototype.setBackgroundImage=function(a){this.editor.graph.setBackgroundImage(a);this.editor.graph.view.validateBackgroundImage();this.fireEvent(new mxEventObject("backgroundImageChanged"))};EditorUi.prototype.confirm=function(a,b,d){mxUtils.confirm(a)?null!=b&&b():null!=d&&d()};EditorUi.prototype.createOutline=function(a){var b=new mxOutline(this.editor.graph);mxEvent.addListener(window,"resize",function(){b.update(!1)});return b};
EditorUi.prototype.altShiftActions={67:"clearWaypoints",65:"connectionArrows",76:"editLink",80:"connectionPoints",84:"editTooltip",86:"pasteSize",88:"copySize",66:"copyData",69:"pasteData"};
-EditorUi.prototype.createKeyHandler=function(a){function b(a,e,b){p.push(function(){if(!k.isSelectionEmpty()&&k.isEnabled())if(e=null!=e?e:1,b){k.getModel().beginUpdate();try{for(var c=k.getSelectionCells(),d=0;d<c.length;d++)if(k.getModel().isVertex(c[d])&&k.isCellResizable(c[d])){var g=k.getCellGeometry(c[d]);null!=g&&(g=g.clone(),37==a?g.width=Math.max(0,g.width-e):38==a?g.height=Math.max(0,g.height-e):39==a?g.width+=e:40==a&&(g.height+=e),k.getModel().setGeometry(c[d],g))}}finally{k.getModel().endUpdate()}}else{var f=
-k.getSelectionCell(),g=k.model.getParent(f),c=null;1==k.getSelectionCount()&&k.model.isVertex(f)&&null!=k.layoutManager&&!k.isCellLocked(f)&&(c=k.layoutManager.getLayout(g));if(null!=c&&c.constructor==mxStackLayout)c=g.getIndex(f),37==a||38==a?k.model.add(g,f,Math.max(0,c-1)):39!=a&&40!=a||k.model.add(g,f,Math.min(k.model.getChildCount(g),c+1));else{c=k.getMovableCells(k.getSelectionCells());f=[];for(d=0;d<c.length;d++)g=k.getCurrentCellStyle(c[d]),"1"==mxUtils.getValue(g,"part","0")?(g=k.model.getParent(c[d]),
-k.model.isVertex(g)&&0>mxUtils.indexOf(c,g)&&f.push(g)):f.push(c[d]);0<f.length&&(c=g=0,37==a?g=-e:38==a?c=-e:39==a?g=e:40==a&&(c=e),k.moveCells(f,g,c))}}});null!=c&&window.clearTimeout(c);c=window.setTimeout(function(){if(0<p.length){k.getModel().beginUpdate();try{for(var a=0;a<p.length;a++)p[a]();p=[]}finally{k.getModel().endUpdate()}}},200)}var d=this,k=this.editor.graph,f=new mxKeyHandler(k),m=f.isEventIgnored;f.isEventIgnored=function(a){return!(mxEvent.isShiftDown(a)&&9==a.keyCode)&&(!this.isControlDown(a)||
+EditorUi.prototype.createKeyHandler=function(a){function b(a,e,b){p.push(function(){if(!g.isSelectionEmpty()&&g.isEnabled())if(e=null!=e?e:1,b){g.getModel().beginUpdate();try{for(var c=g.getSelectionCells(),d=0;d<c.length;d++)if(g.getModel().isVertex(c[d])&&g.isCellResizable(c[d])){var k=g.getCellGeometry(c[d]);null!=k&&(k=k.clone(),37==a?k.width=Math.max(0,k.width-e):38==a?k.height=Math.max(0,k.height-e):39==a?k.width+=e:40==a&&(k.height+=e),g.getModel().setGeometry(c[d],k))}}finally{g.getModel().endUpdate()}}else{var f=
+g.getSelectionCell(),k=g.model.getParent(f),c=null;1==g.getSelectionCount()&&g.model.isVertex(f)&&null!=g.layoutManager&&!g.isCellLocked(f)&&(c=g.layoutManager.getLayout(k));if(null!=c&&c.constructor==mxStackLayout)c=k.getIndex(f),37==a||38==a?g.model.add(k,f,Math.max(0,c-1)):39!=a&&40!=a||g.model.add(k,f,Math.min(g.model.getChildCount(k),c+1));else{c=g.getMovableCells(g.getSelectionCells());f=[];for(d=0;d<c.length;d++)k=g.getCurrentCellStyle(c[d]),"1"==mxUtils.getValue(k,"part","0")?(k=g.model.getParent(c[d]),
+g.model.isVertex(k)&&0>mxUtils.indexOf(c,k)&&f.push(k)):f.push(c[d]);0<f.length&&(c=k=0,37==a?k=-e:38==a?c=-e:39==a?k=e:40==a&&(c=e),g.moveCells(f,k,c))}}});null!=c&&window.clearTimeout(c);c=window.setTimeout(function(){if(0<p.length){g.getModel().beginUpdate();try{for(var a=0;a<p.length;a++)p[a]();p=[]}finally{g.getModel().endUpdate()}}},200)}var d=this,g=this.editor.graph,f=new mxKeyHandler(g),m=f.isEventIgnored;f.isEventIgnored=function(a){return!(mxEvent.isShiftDown(a)&&9==a.keyCode)&&(!this.isControlDown(a)||
mxEvent.isShiftDown(a)||90!=a.keyCode&&89!=a.keyCode&&188!=a.keyCode&&190!=a.keyCode&&85!=a.keyCode)&&(66!=a.keyCode&&73!=a.keyCode||!this.isControlDown(a)||this.graph.cellEditor.isContentEditing()&&!mxClient.IS_FF&&!mxClient.IS_SF)&&m.apply(this,arguments)};f.isEnabledForEvent=function(a){return!mxEvent.isConsumed(a)&&this.isGraphEvent(a)&&this.isEnabled()&&(null==d.dialogs||0==d.dialogs.length)};f.isControlDown=function(a){return mxEvent.isControlDown(a)||mxClient.IS_MAC&&a.metaKey};var p=[],c=
-null,e={37:mxConstants.DIRECTION_WEST,38:mxConstants.DIRECTION_NORTH,39:mxConstants.DIRECTION_EAST,40:mxConstants.DIRECTION_SOUTH},g=f.getFunction;mxKeyHandler.prototype.getFunction=function(a){if(k.isEnabled()){if(mxEvent.isShiftDown(a)&&mxEvent.isAltDown(a)){var c=d.actions.get(d.altShiftActions[a.keyCode]);if(null!=c)return c.funct}if(null!=e[a.keyCode]&&!k.isSelectionEmpty())if(!this.isControlDown(a)&&mxEvent.isShiftDown(a)&&mxEvent.isAltDown(a)){if(k.model.isVertex(k.getSelectionCell()))return function(){var c=
-k.connectVertex(k.getSelectionCell(),e[a.keyCode],k.defaultEdgeLength,a,!0);null!=c&&0<c.length&&(1==c.length&&k.model.isEdge(c[0])?k.setSelectionCell(k.model.getTerminal(c[0],!1)):k.setSelectionCell(c[c.length-1]),k.scrollCellToVisible(k.getSelectionCell()),null!=d.hoverIcons&&d.hoverIcons.update(k.view.getState(k.getSelectionCell())))}}else return this.isControlDown(a)?function(){b(a.keyCode,mxEvent.isShiftDown(a)?k.gridSize:null,!0)}:function(){b(a.keyCode,mxEvent.isShiftDown(a)?k.gridSize:null)}}return g.apply(this,
-arguments)};f.bindAction=mxUtils.bind(this,function(a,c,e,b){var d=this.actions.get(e);null!=d&&(e=function(){d.isEnabled()&&d.funct()},c?b?f.bindControlShiftKey(a,e):f.bindControlKey(a,e):b?f.bindShiftKey(a,e):f.bindKey(a,e))});var n=this,l=f.escape;f.escape=function(a){l.apply(this,arguments)};f.enter=function(){};f.bindControlShiftKey(36,function(){k.exitGroup()});f.bindControlShiftKey(35,function(){k.enterGroup()});f.bindShiftKey(36,function(){k.home()});f.bindKey(35,function(){k.refresh()});
-f.bindAction(107,!0,"zoomIn");f.bindAction(109,!0,"zoomOut");f.bindAction(80,!0,"print");f.bindAction(79,!0,"outline",!0);if(!this.editor.chromeless||this.editor.editable)f.bindControlKey(36,function(){k.isEnabled()&&k.foldCells(!0)}),f.bindControlKey(35,function(){k.isEnabled()&&k.foldCells(!1)}),f.bindControlKey(13,function(){n.ctrlEnter()}),f.bindAction(8,!1,"delete"),f.bindAction(8,!0,"deleteAll"),f.bindAction(8,!1,"deleteLabels",!0),f.bindAction(46,!1,"delete"),f.bindAction(46,!0,"deleteAll"),
+null,e={37:mxConstants.DIRECTION_WEST,38:mxConstants.DIRECTION_NORTH,39:mxConstants.DIRECTION_EAST,40:mxConstants.DIRECTION_SOUTH},k=f.getFunction;mxKeyHandler.prototype.getFunction=function(a){if(g.isEnabled()){if(mxEvent.isShiftDown(a)&&mxEvent.isAltDown(a)){var c=d.actions.get(d.altShiftActions[a.keyCode]);if(null!=c)return c.funct}if(null!=e[a.keyCode]&&!g.isSelectionEmpty())if(!this.isControlDown(a)&&mxEvent.isShiftDown(a)&&mxEvent.isAltDown(a)){if(g.model.isVertex(g.getSelectionCell()))return function(){var c=
+g.connectVertex(g.getSelectionCell(),e[a.keyCode],g.defaultEdgeLength,a,!0);null!=c&&0<c.length&&(1==c.length&&g.model.isEdge(c[0])?g.setSelectionCell(g.model.getTerminal(c[0],!1)):g.setSelectionCell(c[c.length-1]),g.scrollCellToVisible(g.getSelectionCell()),null!=d.hoverIcons&&d.hoverIcons.update(g.view.getState(g.getSelectionCell())))}}else return this.isControlDown(a)?function(){b(a.keyCode,mxEvent.isShiftDown(a)?g.gridSize:null,!0)}:function(){b(a.keyCode,mxEvent.isShiftDown(a)?g.gridSize:null)}}return k.apply(this,
+arguments)};f.bindAction=mxUtils.bind(this,function(a,c,e,b){var d=this.actions.get(e);null!=d&&(e=function(){d.isEnabled()&&d.funct()},c?b?f.bindControlShiftKey(a,e):f.bindControlKey(a,e):b?f.bindShiftKey(a,e):f.bindKey(a,e))});var n=this,l=f.escape;f.escape=function(a){l.apply(this,arguments)};f.enter=function(){};f.bindControlShiftKey(36,function(){g.exitGroup()});f.bindControlShiftKey(35,function(){g.enterGroup()});f.bindShiftKey(36,function(){g.home()});f.bindKey(35,function(){g.refresh()});
+f.bindAction(107,!0,"zoomIn");f.bindAction(109,!0,"zoomOut");f.bindAction(80,!0,"print");f.bindAction(79,!0,"outline",!0);if(!this.editor.chromeless||this.editor.editable)f.bindControlKey(36,function(){g.isEnabled()&&g.foldCells(!0)}),f.bindControlKey(35,function(){g.isEnabled()&&g.foldCells(!1)}),f.bindControlKey(13,function(){n.ctrlEnter()}),f.bindAction(8,!1,"delete"),f.bindAction(8,!0,"deleteAll"),f.bindAction(8,!1,"deleteLabels",!0),f.bindAction(46,!1,"delete"),f.bindAction(46,!0,"deleteAll"),
f.bindAction(46,!1,"deleteLabels",!0),f.bindAction(36,!1,"resetView"),f.bindAction(72,!0,"fitWindow",!0),f.bindAction(74,!0,"fitPage"),f.bindAction(74,!0,"fitTwoPages",!0),f.bindAction(48,!0,"customZoom"),f.bindAction(82,!0,"turn"),f.bindAction(82,!0,"clearDefaultStyle",!0),f.bindAction(83,!0,"save"),f.bindAction(83,!0,"saveAs",!0),f.bindAction(65,!0,"selectAll"),f.bindAction(65,!0,"selectNone",!0),f.bindAction(73,!0,"selectVertices",!0),f.bindAction(69,!0,"selectEdges",!0),f.bindAction(69,!0,"editStyle"),
f.bindAction(66,!0,"bold"),f.bindAction(66,!0,"toBack",!0),f.bindAction(70,!0,"toFront",!0),f.bindAction(68,!0,"duplicate"),f.bindAction(68,!0,"setAsDefaultStyle",!0),f.bindAction(90,!0,"undo"),f.bindAction(89,!0,"autosize",!0),f.bindAction(88,!0,"cut"),f.bindAction(67,!0,"copy"),f.bindAction(86,!0,"paste"),f.bindAction(71,!0,"group"),f.bindAction(77,!0,"editData"),f.bindAction(71,!0,"grid",!0),f.bindAction(73,!0,"italic"),f.bindAction(76,!0,"lockUnlock"),f.bindAction(76,!0,"layers",!0),f.bindAction(80,
-!0,"formatPanel",!0),f.bindAction(85,!0,"underline"),f.bindAction(85,!0,"ungroup",!0),f.bindAction(190,!0,"superscript"),f.bindAction(188,!0,"subscript"),f.bindAction(13,!1,"keyPressEnter"),f.bindKey(113,function(){k.isEnabled()&&k.startEditingAtCell()});mxClient.IS_WIN?f.bindAction(89,!0,"redo"):f.bindAction(90,!0,"redo",!0);return f};
+!0,"formatPanel",!0),f.bindAction(85,!0,"underline"),f.bindAction(85,!0,"ungroup",!0),f.bindAction(190,!0,"superscript"),f.bindAction(188,!0,"subscript"),f.bindAction(13,!1,"keyPressEnter"),f.bindKey(113,function(){g.isEnabled()&&g.startEditingAtCell()});mxClient.IS_WIN?f.bindAction(89,!0,"redo"):f.bindAction(90,!0,"redo",!0);return f};
EditorUi.prototype.destroy=function(){null!=this.editor&&(this.editor.destroy(),this.editor=null);null!=this.menubar&&(this.menubar.destroy(),this.menubar=null);null!=this.toolbar&&(this.toolbar.destroy(),this.toolbar=null);null!=this.sidebar&&(this.sidebar.destroy(),this.sidebar=null);null!=this.keyHandler&&(this.keyHandler.destroy(),this.keyHandler=null);null!=this.keydownHandler&&(mxEvent.removeListener(document,"keydown",this.keydownHandler),this.keydownHandler=null);null!=this.keyupHandler&&
(mxEvent.removeListener(document,"keyup",this.keyupHandler),this.keyupHandler=null);null!=this.resizeHandler&&(mxEvent.removeListener(window,"resize",this.resizeHandler),this.resizeHandler=null);null!=this.gestureHandler&&(mxEvent.removeGestureListeners(document,this.gestureHandler),this.gestureHandler=null);null!=this.orientationChangeHandler&&(mxEvent.removeListener(window,"orientationchange",this.orientationChangeHandler),this.orientationChangeHandler=null);null!=this.scrollHandler&&(mxEvent.removeListener(window,
-"scroll",this.scrollHandler),this.scrollHandler=null);if(null!=this.destroyFunctions){for(var a=0;a<this.destroyFunctions.length;a++)this.destroyFunctions[a]();this.destroyFunctions=null}for(var b=[this.menubarContainer,this.toolbarContainer,this.sidebarContainer,this.formatContainer,this.diagramContainer,this.footerContainer,this.chromelessToolbar,this.hsplit,this.sidebarFooterContainer,this.layersDialog],a=0;a<b.length;a++)null!=b[a]&&null!=b[a].parentNode&&b[a].parentNode.removeChild(b[a])};"undefined"!==typeof html4&&(html4.ATTRIBS["a::target"]=0,html4.ATTRIBS["source::src"]=0,html4.ATTRIBS["video::src"]=0);(function(){var a=[["nbsp","160"],["shy","173"]],b=mxUtils.parseXml;mxUtils.parseXml=function(d){for(var k=0;k<a.length;k++)d=d.replace(new RegExp("&"+a[k][0]+";","g"),"&#"+a[k][1]+";");return b(d)}})();
+"scroll",this.scrollHandler),this.scrollHandler=null);if(null!=this.destroyFunctions){for(var a=0;a<this.destroyFunctions.length;a++)this.destroyFunctions[a]();this.destroyFunctions=null}for(var b=[this.menubarContainer,this.toolbarContainer,this.sidebarContainer,this.formatContainer,this.diagramContainer,this.footerContainer,this.chromelessToolbar,this.hsplit,this.sidebarFooterContainer,this.layersDialog],a=0;a<b.length;a++)null!=b[a]&&null!=b[a].parentNode&&b[a].parentNode.removeChild(b[a])};"undefined"!==typeof html4&&(html4.ATTRIBS["a::target"]=0,html4.ATTRIBS["source::src"]=0,html4.ATTRIBS["video::src"]=0);(function(){var a=[["nbsp","160"],["shy","173"]],b=mxUtils.parseXml;mxUtils.parseXml=function(d){for(var g=0;g<a.length;g++)d=d.replace(new RegExp("&"+a[g][0]+";","g"),"&#"+a[g][1]+";");return b(d)}})();
Date.prototype.toISOString||function(){function a(a){a=String(a);1===a.length&&(a="0"+a);return a}Date.prototype.toISOString=function(){return this.getUTCFullYear()+"-"+a(this.getUTCMonth()+1)+"-"+a(this.getUTCDate())+"T"+a(this.getUTCHours())+":"+a(this.getUTCMinutes())+":"+a(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"}}();Date.now||(Date.now=function(){return(new Date).getTime()});
-Uint8Array.from||(Uint8Array.from=function(){var a=Object.prototype.toString,b=function(b){return"function"===typeof b||"[object Function]"===a.call(b)},d=Math.pow(2,53)-1;return function(a){var f=Object(a);if(null==a)throw new TypeError("Array.from requires an array-like object - not null or undefined");var k=1<arguments.length?arguments[1]:void 0,p;if("undefined"!==typeof k){if(!b(k))throw new TypeError("Array.from: when provided, the second argument must be a function");2<arguments.length&&(p=
-arguments[2])}var c;c=Number(f.length);c=isNaN(c)?0:0!==c&&isFinite(c)?(0<c?1:-1)*Math.floor(Math.abs(c)):c;c=Math.min(Math.max(c,0),d);for(var e=b(this)?Object(new this(c)):Array(c),g=0,n;g<c;)n=f[g],e[g]=k?"undefined"===typeof p?k(n,g):k.call(p,n,g):n,g+=1;e.length=c;return e}}());mxConstants.POINTS=1;mxConstants.MILLIMETERS=2;mxConstants.INCHES=3;mxConstants.PIXELS_PER_MM=3.937;mxConstants.PIXELS_PER_INCH=100;mxConstants.SHADOW_OPACITY=.25;mxConstants.SHADOWCOLOR="#000000";
+Uint8Array.from||(Uint8Array.from=function(){var a=Object.prototype.toString,b=function(b){return"function"===typeof b||"[object Function]"===a.call(b)},d=Math.pow(2,53)-1;return function(a){var f=Object(a);if(null==a)throw new TypeError("Array.from requires an array-like object - not null or undefined");var g=1<arguments.length?arguments[1]:void 0,p;if("undefined"!==typeof g){if(!b(g))throw new TypeError("Array.from: when provided, the second argument must be a function");2<arguments.length&&(p=
+arguments[2])}var c;c=Number(f.length);c=isNaN(c)?0:0!==c&&isFinite(c)?(0<c?1:-1)*Math.floor(Math.abs(c)):c;c=Math.min(Math.max(c,0),d);for(var e=b(this)?Object(new this(c)):Array(c),k=0,n;k<c;)n=f[k],e[k]=g?"undefined"===typeof p?g(n,k):g.call(p,n,k):n,k+=1;e.length=c;return e}}());mxConstants.POINTS=1;mxConstants.MILLIMETERS=2;mxConstants.INCHES=3;mxConstants.PIXELS_PER_MM=3.937;mxConstants.PIXELS_PER_INCH=100;mxConstants.SHADOW_OPACITY=.25;mxConstants.SHADOWCOLOR="#000000";
mxConstants.VML_SHADOWCOLOR="#d0d0d0";mxGraph.prototype.pageBreakColor="#c0c0c0";mxGraph.prototype.pageScale=1;(function(){try{if(null!=navigator&&null!=navigator.language){var a=navigator.language.toLowerCase();mxGraph.prototype.pageFormat="en-us"===a||"en-ca"===a||"es-mx"===a?mxConstants.PAGE_FORMAT_LETTER_PORTRAIT:mxConstants.PAGE_FORMAT_A4_PORTRAIT}}catch(b){}})();mxText.prototype.baseSpacingTop=5;mxText.prototype.baseSpacingBottom=1;mxGraphModel.prototype.ignoreRelativeEdgeParent=!1;
mxGraphView.prototype.gridImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhCgAKAJEAAAAAAP///8zMzP///yH5BAEAAAMALAAAAAAKAAoAAAIJ1I6py+0Po2wFADs=":IMAGE_PATH+"/grid.gif";mxGraphView.prototype.gridSteps=4;mxGraphView.prototype.minGridSize=4;mxGraphView.prototype.defaultGridColor="#d0d0d0";mxGraphView.prototype.defaultDarkGridColor="#6e6e6e";mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultGridColor;mxGraphView.prototype.unit=mxConstants.POINTS;
mxGraphView.prototype.setUnit=function(a){this.unit!=a&&(this.unit=a,this.fireEvent(new mxEventObject("unitChanged","unit",a)))};mxSvgCanvas2D.prototype.foAltText="[Not supported by viewer]";mxShape.prototype.getConstraints=function(a,b,d){return null};
mxImageShape.prototype.getImageDataUri=function(){var a=this.image;if("data:image/svg+xml;base64,"==a.substring(0,26)&&null!=this.style&&"1"==mxUtils.getValue(this.style,"clipSvg","0")){if(null==this.clippedSvg||this.clippedImage!=a)this.clippedSvg=Graph.clipSvgDataUri(a),this.clippedImage=a;a=this.clippedSvg}return a};
-Graph=function(a,b,d,k,f,m){mxGraph.call(this,a,b,d,k);this.themes=f||this.defaultThemes;this.currentEdgeStyle=mxUtils.clone(this.defaultEdgeStyle);this.currentVertexStyle=mxUtils.clone(this.defaultVertexStyle);this.standalone=null!=m?m:!1;a=this.baseUrl;b=a.indexOf("//");this.domainPathUrl=this.domainUrl="";0<b&&(b=a.indexOf("/",b+2),0<b&&(this.domainUrl=a.substring(0,b)),b=a.lastIndexOf("/"),0<b&&(this.domainPathUrl=a.substring(0,b+1)));this.isHtmlLabel=function(a){a=this.getCurrentCellStyle(a);
-return null!=a?"1"==a.html||"wrap"==a[mxConstants.STYLE_WHITE_SPACE]:!1};if(this.edgeMode){var p=null,c=null,e=null,g=null,n=!1;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(a,b){if("mouseDown"==b.getProperty("eventName")&&this.isEnabled()){var d=b.getProperty("event"),f=d.getState();if(!mxEvent.isAltDown(d.getEvent())&&null!=f)if(this.model.isEdge(f.cell))if(p=new mxPoint(d.getGraphX(),d.getGraphY()),n=this.isCellSelected(f.cell),e=f,c=d,null!=f.text&&null!=f.text.boundingBox&&
-mxUtils.contains(f.text.boundingBox,d.getGraphX(),d.getGraphY()))g=mxEvent.LABEL_HANDLE;else{var k=this.selectionCellsHandler.getHandler(f.cell);null!=k&&null!=k.bends&&0<k.bends.length&&(g=k.getHandleForEvent(d))}else if(!this.panningHandler.isActive()&&!mxEvent.isControlDown(d.getEvent())&&(k=this.selectionCellsHandler.getHandler(f.cell),null==k||null==k.getHandleForEvent(d))){var v=new mxRectangle(d.getGraphX()-1,d.getGraphY()-1);v.grow(mxEvent.isTouchEvent(d.getEvent())?mxShape.prototype.svgStrokeTolerance-
-1:(mxShape.prototype.svgStrokeTolerance+1)/2);if(this.isTableCell(f.cell)&&!this.isCellSelected(f.cell)){var l=this.model.getParent(f.cell),k=this.model.getParent(l);if(!this.isCellSelected(k)&&(mxUtils.intersects(v,new mxRectangle(f.x,f.y-2,f.width,3))&&this.model.getChildAt(k,0)!=l||mxUtils.intersects(v,new mxRectangle(f.x,f.y+f.height-2,f.width,3))||mxUtils.intersects(v,new mxRectangle(f.x-2,f.y,2,f.height))&&this.model.getChildAt(l,0)!=f.cell||mxUtils.intersects(v,new mxRectangle(f.x+f.width-
-2,f.y,2,f.height)))&&(l=this.selectionCellsHandler.isHandled(k),this.selectCellForEvent(k,d.getEvent()),k=this.selectionCellsHandler.getHandler(k),null!=k)){var q=k.getHandleForEvent(d);null!=q&&(k.start(d.getGraphX(),d.getGraphY(),q),k.blockDelayedSelection=!l,d.consume())}}for(;!d.isConsumed()&&null!=f&&(this.isTableCell(f.cell)||this.isTableRow(f.cell)||this.isTable(f.cell));)this.isSwimlane(f.cell)&&(k=this.getActualStartSize(f.cell),l=this.view.scale,(0<k.x||0<k.width)&&mxUtils.intersects(v,
-new mxRectangle(f.x+(k.x-k.width-1)*l+(0==k.x?f.width:0),f.y,1,f.height))||(0<k.y||0<k.height)&&mxUtils.intersects(v,new mxRectangle(f.x,f.y+(k.y-k.height-1)*l+(0==k.y?f.height:0),f.width,1)))&&(this.selectCellForEvent(f.cell,d.getEvent()),k=this.selectionCellsHandler.getHandler(f.cell),null!=k&&(q=mxEvent.CUSTOM_HANDLE-k.customHandles.length+1,k.start(d.getGraphX(),d.getGraphY(),q),d.consume())),f=this.view.getState(this.model.getParent(f.cell))}}}));this.addMouseListener({mouseDown:function(a,c){},
-mouseMove:mxUtils.bind(this,function(a,b){var d=this.selectionCellsHandler.handlers.map,f;for(f in d)if(null!=d[f].index)return;if(this.isEnabled()&&!this.panningHandler.isActive()&&!mxEvent.isAltDown(b.getEvent()))if(f=this.tolerance,null!=p&&null!=e&&null!=c){if(d=e,Math.abs(p.x-b.getGraphX())>f||Math.abs(p.y-b.getGraphY())>f){var k=this.selectionCellsHandler.getHandler(d.cell);null==k&&this.model.isEdge(d.cell)&&(k=this.createHandler(d));if(null!=k&&null!=k.bends&&0<k.bends.length){f=k.getHandleForEvent(c);
-var v=this.view.getEdgeStyle(d),l=v==mxEdgeStyle.EntityRelation;n||g!=mxEvent.LABEL_HANDLE||(f=g);if(l&&0!=f&&f!=k.bends.length-1&&f!=mxEvent.LABEL_HANDLE)!l||null==d.visibleSourceState&&null==d.visibleTargetState||(this.graphHandler.reset(),b.consume());else if(f==mxEvent.LABEL_HANDLE||0==f||null!=d.visibleSourceState||f==k.bends.length-1||null!=d.visibleTargetState)l||f==mxEvent.LABEL_HANDLE||(l=d.absolutePoints,null!=l&&(null==v&&null==f||v==mxEdgeStyle.OrthConnector)&&(f=g,null==f&&(f=new mxRectangle(p.x,
-p.y),f.grow(mxEdgeHandler.prototype.handleImage.width/2),mxUtils.contains(f,l[0].x,l[0].y)?f=0:mxUtils.contains(f,l[l.length-1].x,l[l.length-1].y)?f=k.bends.length-1:null!=v&&(2==l.length||3==l.length&&(0==Math.round(l[0].x-l[1].x)&&0==Math.round(l[1].x-l[2].x)||0==Math.round(l[0].y-l[1].y)&&0==Math.round(l[1].y-l[2].y)))?f=2:(f=mxUtils.findNearestSegment(d,p.x,p.y),f=null==v?mxEvent.VIRTUAL_HANDLE-f:f+1))),null==f&&(f=mxEvent.VIRTUAL_HANDLE)),k.start(b.getGraphX(),b.getGraphX(),f),b.consume(),this.graphHandler.reset()}null!=
-k&&(this.selectionCellsHandler.isHandlerActive(k)?this.isCellSelected(d.cell)||(this.selectionCellsHandler.handlers.put(d.cell,k),this.selectCellForEvent(d.cell,b.getEvent())):this.isCellSelected(d.cell)||k.destroy());n=!1;p=c=e=g=null}}else if(d=b.getState(),null!=d&&this.isCellEditable(d.cell)){k=null;if(this.model.isEdge(d.cell)){if(f=new mxRectangle(b.getGraphX(),b.getGraphY()),f.grow(mxEdgeHandler.prototype.handleImage.width/2),l=d.absolutePoints,null!=l)if(null!=d.text&&null!=d.text.boundingBox&&
-mxUtils.contains(d.text.boundingBox,b.getGraphX(),b.getGraphY()))k="move";else if(mxUtils.contains(f,l[0].x,l[0].y)||mxUtils.contains(f,l[l.length-1].x,l[l.length-1].y))k="pointer";else if(null!=d.visibleSourceState||null!=d.visibleTargetState)f=this.view.getEdgeStyle(d),k="crosshair",f!=mxEdgeStyle.EntityRelation&&this.isOrthogonal(d)&&(f=mxUtils.findNearestSegment(d,b.getGraphX(),b.getGraphY()),f<l.length-1&&0<=f&&(k=0==Math.round(l[f].x-l[f+1].x)?"col-resize":"row-resize"))}else if(!mxEvent.isControlDown(b.getEvent())){f=
-new mxRectangle(b.getGraphX()-1,b.getGraphY()-1);f.grow(mxShape.prototype.svgStrokeTolerance/2);if(this.isTableCell(d.cell)&&(l=this.model.getParent(d.cell),v=this.model.getParent(l),!this.isCellSelected(v)))if(mxUtils.intersects(f,new mxRectangle(d.x-2,d.y,2,d.height))&&this.model.getChildAt(l,0)!=d.cell||mxUtils.intersects(f,new mxRectangle(d.x+d.width-2,d.y,2,d.height)))k="col-resize";else if(mxUtils.intersects(f,new mxRectangle(d.x,d.y-2,d.width,3))&&this.model.getChildAt(v,0)!=l||mxUtils.intersects(f,
-new mxRectangle(d.x,d.y+d.height-2,d.width,3)))k="row-resize";for(l=d;null==k&&null!=l&&(this.isTableCell(l.cell)||this.isTableRow(l.cell)||this.isTable(l.cell));){if(this.isSwimlane(l.cell)){var v=this.getActualStartSize(l.cell),q=this.view.scale;(0<v.x||0<v.width)&&mxUtils.intersects(f,new mxRectangle(l.x+(v.x-v.width-1)*q+(0==v.x?l.width*q:0),l.y,1,l.height))?k="col-resize":(0<v.y||0<v.height)&&mxUtils.intersects(f,new mxRectangle(l.x,l.y+(v.y-v.height-1)*q+(0==v.y?l.height:0),l.width,1))&&(k=
-"row-resize")}l=this.view.getState(this.model.getParent(l.cell))}}null!=k&&d.setCursor(k)}}),mouseUp:mxUtils.bind(this,function(a,b){g=p=c=e=null})})}this.cellRenderer.minSvgStrokeWidth=.1;this.cellRenderer.getLabelValue=function(a){var c=mxCellRenderer.prototype.getLabelValue.apply(this,arguments);a.view.graph.isHtmlLabel(a.cell)&&(c=1!=a.style.html?mxUtils.htmlEntities(c,!1):a.view.graph.sanitizeHtml(c));return c};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(a,c){return!1};this.alternateEdgeStyle="vertical";null==k&&this.loadStylesheet();var l=this.graphHandler.getGuideStates;this.graphHandler.getGuideStates=
-function(){var a=l.apply(this,arguments);if(this.graph.pageVisible){for(var c=[],e=this.graph.pageFormat,b=this.graph.pageScale,d=e.width*b,e=e.height*b,b=this.graph.view.translate,g=this.graph.view.scale,f=this.graph.getPageLayout(),k=0;k<f.width;k++)c.push(new mxRectangle(((f.x+k)*d+b.x)*g,(f.y*e+b.y)*g,d*g,e*g));for(k=1;k<f.height;k++)c.push(new mxRectangle((f.x*d+b.x)*g,((f.y+k)*e+b.y)*g,d*g,e*g));a=c.concat(a)}return a};mxDragSource.prototype.dragElementZIndex=mxPopupMenu.prototype.zIndex;mxGuide.prototype.getGuideColor=
-function(a,c){return null==a.cell?"#ffa500":mxConstants.GUIDE_COLOR};this.graphHandler.createPreviewShape=function(a){this.previewColor="#000000"==this.graph.background?"#ffffff":mxGraphHandler.prototype.previewColor;return mxGraphHandler.prototype.createPreviewShape.apply(this,arguments)};var q=this.graphHandler.getCells;this.graphHandler.getCells=function(a){for(var c=q.apply(this,arguments),e=new mxDictionary,b=[],d=0;d<c.length;d++){var g=this.graph.isTableCell(a)&&this.graph.isTableCell(c[d])&&
-this.graph.isCellSelected(c[d])?this.graph.model.getParent(c[d]):this.graph.isTableRow(a)&&this.graph.isTableRow(c[d])&&this.graph.isCellSelected(c[d])?c[d]:this.graph.getCompositeParent(c[d]);null==g||e.get(g)||(e.put(g,!0),b.push(g))}return b};var u=this.graphHandler.start;this.graphHandler.start=function(a,c,e,b){var d=!1;this.graph.isTableCell(a)&&(this.graph.isCellSelected(a)?d=!0:a=this.graph.model.getParent(a));d||this.graph.isTableRow(a)&&this.graph.isCellSelected(a)||(a=this.graph.getCompositeParent(a));
+Graph=function(a,b,d,g,f,m){mxGraph.call(this,a,b,d,g);this.themes=f||this.defaultThemes;this.currentEdgeStyle=mxUtils.clone(this.defaultEdgeStyle);this.currentVertexStyle=mxUtils.clone(this.defaultVertexStyle);this.standalone=null!=m?m:!1;a=this.baseUrl;b=a.indexOf("//");this.domainPathUrl=this.domainUrl="";0<b&&(b=a.indexOf("/",b+2),0<b&&(this.domainUrl=a.substring(0,b)),b=a.lastIndexOf("/"),0<b&&(this.domainPathUrl=a.substring(0,b+1)));this.isHtmlLabel=function(a){a=this.getCurrentCellStyle(a);
+return null!=a?"1"==a.html||"wrap"==a[mxConstants.STYLE_WHITE_SPACE]:!1};if(this.edgeMode){var p=null,c=null,e=null,k=null,n=!1;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(a,b){if("mouseDown"==b.getProperty("eventName")&&this.isEnabled()){var d=b.getProperty("event"),f=d.getState();if(!mxEvent.isAltDown(d.getEvent())&&null!=f)if(this.model.isEdge(f.cell))if(p=new mxPoint(d.getGraphX(),d.getGraphY()),n=this.isCellSelected(f.cell),e=f,c=d,null!=f.text&&null!=f.text.boundingBox&&
+mxUtils.contains(f.text.boundingBox,d.getGraphX(),d.getGraphY()))k=mxEvent.LABEL_HANDLE;else{var g=this.selectionCellsHandler.getHandler(f.cell);null!=g&&null!=g.bends&&0<g.bends.length&&(k=g.getHandleForEvent(d))}else if(!this.panningHandler.isActive()&&!mxEvent.isControlDown(d.getEvent())&&(g=this.selectionCellsHandler.getHandler(f.cell),null==g||null==g.getHandleForEvent(d))){var v=new mxRectangle(d.getGraphX()-1,d.getGraphY()-1);v.grow(mxEvent.isTouchEvent(d.getEvent())?mxShape.prototype.svgStrokeTolerance-
+1:(mxShape.prototype.svgStrokeTolerance+1)/2);if(this.isTableCell(f.cell)&&!this.isCellSelected(f.cell)){var l=this.model.getParent(f.cell),g=this.model.getParent(l);if(!this.isCellSelected(g)&&(mxUtils.intersects(v,new mxRectangle(f.x,f.y-2,f.width,3))&&this.model.getChildAt(g,0)!=l||mxUtils.intersects(v,new mxRectangle(f.x,f.y+f.height-2,f.width,3))||mxUtils.intersects(v,new mxRectangle(f.x-2,f.y,2,f.height))&&this.model.getChildAt(l,0)!=f.cell||mxUtils.intersects(v,new mxRectangle(f.x+f.width-
+2,f.y,2,f.height)))&&(l=this.selectionCellsHandler.isHandled(g),this.selectCellForEvent(g,d.getEvent()),g=this.selectionCellsHandler.getHandler(g),null!=g)){var q=g.getHandleForEvent(d);null!=q&&(g.start(d.getGraphX(),d.getGraphY(),q),g.blockDelayedSelection=!l,d.consume())}}for(;!d.isConsumed()&&null!=f&&(this.isTableCell(f.cell)||this.isTableRow(f.cell)||this.isTable(f.cell));)this.isSwimlane(f.cell)&&(g=this.getActualStartSize(f.cell),l=this.view.scale,(0<g.x||0<g.width)&&mxUtils.intersects(v,
+new mxRectangle(f.x+(g.x-g.width-1)*l+(0==g.x?f.width:0),f.y,1,f.height))||(0<g.y||0<g.height)&&mxUtils.intersects(v,new mxRectangle(f.x,f.y+(g.y-g.height-1)*l+(0==g.y?f.height:0),f.width,1)))&&(this.selectCellForEvent(f.cell,d.getEvent()),g=this.selectionCellsHandler.getHandler(f.cell),null!=g&&(q=mxEvent.CUSTOM_HANDLE-g.customHandles.length+1,g.start(d.getGraphX(),d.getGraphY(),q),d.consume())),f=this.view.getState(this.model.getParent(f.cell))}}}));this.addMouseListener({mouseDown:function(a,c){},
+mouseMove:mxUtils.bind(this,function(a,b){var d=this.selectionCellsHandler.handlers.map,f;for(f in d)if(null!=d[f].index)return;if(this.isEnabled()&&!this.panningHandler.isActive()&&!mxEvent.isAltDown(b.getEvent()))if(f=this.tolerance,null!=p&&null!=e&&null!=c){if(d=e,Math.abs(p.x-b.getGraphX())>f||Math.abs(p.y-b.getGraphY())>f){var g=this.selectionCellsHandler.getHandler(d.cell);null==g&&this.model.isEdge(d.cell)&&(g=this.createHandler(d));if(null!=g&&null!=g.bends&&0<g.bends.length){f=g.getHandleForEvent(c);
+var v=this.view.getEdgeStyle(d),l=v==mxEdgeStyle.EntityRelation;n||k!=mxEvent.LABEL_HANDLE||(f=k);if(l&&0!=f&&f!=g.bends.length-1&&f!=mxEvent.LABEL_HANDLE)!l||null==d.visibleSourceState&&null==d.visibleTargetState||(this.graphHandler.reset(),b.consume());else if(f==mxEvent.LABEL_HANDLE||0==f||null!=d.visibleSourceState||f==g.bends.length-1||null!=d.visibleTargetState)l||f==mxEvent.LABEL_HANDLE||(l=d.absolutePoints,null!=l&&(null==v&&null==f||v==mxEdgeStyle.OrthConnector)&&(f=k,null==f&&(f=new mxRectangle(p.x,
+p.y),f.grow(mxEdgeHandler.prototype.handleImage.width/2),mxUtils.contains(f,l[0].x,l[0].y)?f=0:mxUtils.contains(f,l[l.length-1].x,l[l.length-1].y)?f=g.bends.length-1:null!=v&&(2==l.length||3==l.length&&(0==Math.round(l[0].x-l[1].x)&&0==Math.round(l[1].x-l[2].x)||0==Math.round(l[0].y-l[1].y)&&0==Math.round(l[1].y-l[2].y)))?f=2:(f=mxUtils.findNearestSegment(d,p.x,p.y),f=null==v?mxEvent.VIRTUAL_HANDLE-f:f+1))),null==f&&(f=mxEvent.VIRTUAL_HANDLE)),g.start(b.getGraphX(),b.getGraphX(),f),b.consume(),this.graphHandler.reset()}null!=
+g&&(this.selectionCellsHandler.isHandlerActive(g)?this.isCellSelected(d.cell)||(this.selectionCellsHandler.handlers.put(d.cell,g),this.selectCellForEvent(d.cell,b.getEvent())):this.isCellSelected(d.cell)||g.destroy());n=!1;p=c=e=k=null}}else if(d=b.getState(),null!=d&&this.isCellEditable(d.cell)){g=null;if(this.model.isEdge(d.cell)){if(f=new mxRectangle(b.getGraphX(),b.getGraphY()),f.grow(mxEdgeHandler.prototype.handleImage.width/2),l=d.absolutePoints,null!=l)if(null!=d.text&&null!=d.text.boundingBox&&
+mxUtils.contains(d.text.boundingBox,b.getGraphX(),b.getGraphY()))g="move";else if(mxUtils.contains(f,l[0].x,l[0].y)||mxUtils.contains(f,l[l.length-1].x,l[l.length-1].y))g="pointer";else if(null!=d.visibleSourceState||null!=d.visibleTargetState)f=this.view.getEdgeStyle(d),g="crosshair",f!=mxEdgeStyle.EntityRelation&&this.isOrthogonal(d)&&(f=mxUtils.findNearestSegment(d,b.getGraphX(),b.getGraphY()),f<l.length-1&&0<=f&&(g=0==Math.round(l[f].x-l[f+1].x)?"col-resize":"row-resize"))}else if(!mxEvent.isControlDown(b.getEvent())){f=
+new mxRectangle(b.getGraphX()-1,b.getGraphY()-1);f.grow(mxShape.prototype.svgStrokeTolerance/2);if(this.isTableCell(d.cell)&&(l=this.model.getParent(d.cell),v=this.model.getParent(l),!this.isCellSelected(v)))if(mxUtils.intersects(f,new mxRectangle(d.x-2,d.y,2,d.height))&&this.model.getChildAt(l,0)!=d.cell||mxUtils.intersects(f,new mxRectangle(d.x+d.width-2,d.y,2,d.height)))g="col-resize";else if(mxUtils.intersects(f,new mxRectangle(d.x,d.y-2,d.width,3))&&this.model.getChildAt(v,0)!=l||mxUtils.intersects(f,
+new mxRectangle(d.x,d.y+d.height-2,d.width,3)))g="row-resize";for(l=d;null==g&&null!=l&&(this.isTableCell(l.cell)||this.isTableRow(l.cell)||this.isTable(l.cell));){if(this.isSwimlane(l.cell)){var v=this.getActualStartSize(l.cell),q=this.view.scale;(0<v.x||0<v.width)&&mxUtils.intersects(f,new mxRectangle(l.x+(v.x-v.width-1)*q+(0==v.x?l.width*q:0),l.y,1,l.height))?g="col-resize":(0<v.y||0<v.height)&&mxUtils.intersects(f,new mxRectangle(l.x,l.y+(v.y-v.height-1)*q+(0==v.y?l.height:0),l.width,1))&&(g=
+"row-resize")}l=this.view.getState(this.model.getParent(l.cell))}}null!=g&&d.setCursor(g)}}),mouseUp:mxUtils.bind(this,function(a,b){k=p=c=e=null})})}this.cellRenderer.minSvgStrokeWidth=.1;this.cellRenderer.getLabelValue=function(a){var c=mxCellRenderer.prototype.getLabelValue.apply(this,arguments);a.view.graph.isHtmlLabel(a.cell)&&(c=1!=a.style.html?mxUtils.htmlEntities(c,!1):a.view.graph.sanitizeHtml(c));return c};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(a,c){return!1};this.alternateEdgeStyle="vertical";null==g&&this.loadStylesheet();var l=this.graphHandler.getGuideStates;this.graphHandler.getGuideStates=
+function(){var a=l.apply(this,arguments);if(this.graph.pageVisible){for(var c=[],e=this.graph.pageFormat,b=this.graph.pageScale,d=e.width*b,e=e.height*b,b=this.graph.view.translate,k=this.graph.view.scale,f=this.graph.getPageLayout(),g=0;g<f.width;g++)c.push(new mxRectangle(((f.x+g)*d+b.x)*k,(f.y*e+b.y)*k,d*k,e*k));for(g=1;g<f.height;g++)c.push(new mxRectangle((f.x*d+b.x)*k,((f.y+g)*e+b.y)*k,d*k,e*k));a=c.concat(a)}return a};mxDragSource.prototype.dragElementZIndex=mxPopupMenu.prototype.zIndex;mxGuide.prototype.getGuideColor=
+function(a,c){return null==a.cell?"#ffa500":mxConstants.GUIDE_COLOR};this.graphHandler.createPreviewShape=function(a){this.previewColor="#000000"==this.graph.background?"#ffffff":mxGraphHandler.prototype.previewColor;return mxGraphHandler.prototype.createPreviewShape.apply(this,arguments)};var q=this.graphHandler.getCells;this.graphHandler.getCells=function(a){for(var c=q.apply(this,arguments),e=new mxDictionary,b=[],d=0;d<c.length;d++){var k=this.graph.isTableCell(a)&&this.graph.isTableCell(c[d])&&
+this.graph.isCellSelected(c[d])?this.graph.model.getParent(c[d]):this.graph.isTableRow(a)&&this.graph.isTableRow(c[d])&&this.graph.isCellSelected(c[d])?c[d]:this.graph.getCompositeParent(c[d]);null==k||e.get(k)||(e.put(k,!0),b.push(k))}return b};var u=this.graphHandler.start;this.graphHandler.start=function(a,c,e,b){var d=!1;this.graph.isTableCell(a)&&(this.graph.isCellSelected(a)?d=!0:a=this.graph.model.getParent(a));d||this.graph.isTableRow(a)&&this.graph.isCellSelected(a)||(a=this.graph.getCompositeParent(a));
u.apply(this,arguments)};this.connectionHandler.createTargetVertex=function(a,c){c=this.graph.getCompositeParent(c);return mxConnectionHandler.prototype.createTargetVertex.apply(this,arguments)};var t=new mxRubberband(this);this.getRubberband=function(){return t};var A=(new Date).getTime(),x=0,G=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=function(){var a=this.currentState;G.apply(this,arguments);a!=this.currentState?(A=(new Date).getTime(),x=0):x=(new Date).getTime()-A};var z=
this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=function(a){return null!=this.currentState&&a.getState()==this.currentState&&2E3<x||(null==this.currentState||"0"!=mxUtils.getValue(this.currentState.style,"outlineConnect","1"))&&z.apply(this,arguments)};var E=this.isToggleEvent;this.isToggleEvent=function(a){return E.apply(this,arguments)||!mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(a)};var H=t.isForceRubberbandEvent;t.isForceRubberbandEvent=function(a){return H.apply(this,
arguments)&&!mxEvent.isShiftDown(a.getEvent())&&!mxEvent.isControlDown(a.getEvent())||mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(a.getEvent())||mxUtils.hasScrollbars(this.graph.container)&&mxClient.IS_FF&&mxClient.IS_WIN&&null==a.getState()&&mxEvent.isTouchEvent(a.getEvent())};var K=null;this.panningHandler.addListener(mxEvent.PAN_START,mxUtils.bind(this,function(){this.isEnabled()&&(K=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=K)}));this.popupMenuHandler.autoExpand=!0;this.popupMenuHandler.isSelectOnPopup=function(a){return mxEvent.isMouseEvent(a.getEvent())};var F=this.click;this.click=function(a){var c=null==a.state&&null!=a.sourceState&&this.isCellLocked(a.sourceState.cell);if(this.isEnabled()&&!c||a.isConsumed())return F.apply(this,arguments);var e=c?a.sourceState.cell:a.getCell();null!=e&&(e=this.getClickableLinkForCell(e),null!=e&&(this.isCustomLink(e)?
this.customLinkClicked(e):this.openLink(e)));this.isEnabled()&&c&&this.clearSelection()};this.tooltipHandler.getStateForEvent=function(a){return a.sourceState};var I=this.tooltipHandler.show;this.tooltipHandler.show=function(){I.apply(this,arguments);if(null!=this.div)for(var a=this.div.getElementsByTagName("a"),c=0;c<a.length;c++)null!=a[c].getAttribute("href")&&null==a[c].getAttribute("target")&&a[c].setAttribute("target","_blank")};this.tooltipHandler.getStateForEvent=function(a){return a.sourceState};
-this.getCursorForMouseEvent=function(a){var c=null==a.state&&null!=a.sourceState&&this.isCellLocked(a.sourceState.cell);return this.getCursorForCell(c?a.sourceState.cell:a.getCell())};var C=this.getCursorForCell;this.getCursorForCell=function(a){if(!this.isEnabled()||this.isCellLocked(a)){if(null!=this.getClickableLinkForCell(a))return"pointer";if(this.isCellLocked(a))return"default"}return C.apply(this,arguments)};this.selectRegion=function(a,c){var e=this.getCells(a.x,a.y,a.width,a.height,null,
+this.getCursorForMouseEvent=function(a){var c=null==a.state&&null!=a.sourceState&&this.isCellLocked(a.sourceState.cell);return this.getCursorForCell(c?a.sourceState.cell:a.getCell())};var D=this.getCursorForCell;this.getCursorForCell=function(a){if(!this.isEnabled()||this.isCellLocked(a)){if(null!=this.getClickableLinkForCell(a))return"pointer";if(this.isCellLocked(a))return"default"}return D.apply(this,arguments)};this.selectRegion=function(a,c){var e=this.getCells(a.x,a.y,a.width,a.height,null,
null,null,function(a){return"1"==mxUtils.getValue(a.style,"locked","0")},!0);this.selectCellsForEvent(e,c);return e};var M=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(a,c,e){return this.graph.isCellSelected(a)?!1:M.apply(this,arguments)};this.isCellLocked=function(a){for(;null!=a;){if("1"==mxUtils.getValue(this.getCurrentCellStyle(a),"locked","0"))return!0;a=this.model.getParent(a)}return!1};var U=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,
mxUtils.bind(this,function(a,c){if("mouseDown"==c.getProperty("eventName")){var e=c.getProperty("event").getState();U=null==e||this.isSelectionEmpty()||this.isCellSelected(e.cell)?null:this.getSelectionCells()}}));this.addListener(mxEvent.TAP_AND_HOLD,mxUtils.bind(this,function(a,c){if(!mxEvent.isMultiTouchEvent(c)){var e=c.getProperty("event"),b=c.getProperty("cell");null==b?(e=mxUtils.convertPoint(this.container,mxEvent.getClientX(e),mxEvent.getClientY(e)),t.start(e.x,e.y)):null!=U?this.addSelectionCells(U):
1<this.getSelectionCount()&&this.isCellSelected(b)&&this.removeSelectionCell(b);U=null;c.consume()}}));this.connectionHandler.selectCells=function(a,c){this.graph.setSelectionCell(c||a)};this.connectionHandler.constraintHandler.isStateIgnored=function(a,c){var e=a.view.graph;return c&&(e.isCellSelected(a.cell)||e.isTableRow(a.cell)&&e.selectionCellsHandler.isHandled(e.model.getParent(a.cell)))};this.selectionModel.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){var a=this.connectionHandler.constraintHandler;
null!=a.currentFocus&&a.isStateIgnored(a.currentFocus,!0)&&(a.currentFocus=null,a.constraints=null,a.destroyIcons());a.destroyFocusHighlight()}));Graph.touchStyle&&this.initTouch();var O=this.updateMouseEvent;this.updateMouseEvent=function(a){a=O.apply(this,arguments);null!=a.state&&this.isCellLocked(a.getCell())&&(a.state=null);return a}}this.currentTranslate=new mxPoint(0,0)};
Graph.touchStyle=mxClient.IS_TOUCH||mxClient.IS_FF&&mxClient.IS_WIN||0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints||null==window.urlParams||"1"==urlParams.touch;Graph.fileSupport=null!=window.File&&null!=window.FileReader&&null!=window.FileList&&(null==window.urlParams||"0"!=urlParams.filesupport);Graph.translateDiagram="1"==urlParams["translate-diagram"];Graph.diagramLanguage=null!=urlParams["diagram-language"]?urlParams["diagram-language"]:mxClient.language;Graph.lineJumpsEnabled=!0;
Graph.defaultJumpSize=6;Graph.minTableColumnWidth=20;Graph.minTableRowHeight=20;Graph.foreignObjectWarningText="Viewer does not support full SVG 1.1";Graph.foreignObjectWarningLink="https://www.diagrams.net/doc/faq/svg-export-text-problems";Graph.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.createSvgImage=function(a,b,d,k,f){d=unescape(encodeURIComponent('<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="'+a+'px" height="'+b+'px" '+(null!=k&&null!=f?'viewBox="0 0 '+k+" "+f+'" ':"")+'version="1.1">'+d+"</svg>"));return new mxImage("data:image/svg+xml;base64,"+(window.btoa?btoa(d):Base64.encode(d,!0)),a,b)};
-Graph.zapGremlins=function(a){for(var b=0,d=[],k=0;k<a.length;k++){var f=a.charCodeAt(k);(32<=f||9==f||10==f||13==f)&&65535!=f&&65534!=f||(d.push(a.substring(b,k)),b=k+1)}0<b&&b<a.length&&d.push(a.substring(b));return 0==d.length?a:d.join("")};Graph.stringToBytes=function(a){for(var b=Array(a.length),d=0;d<a.length;d++)b[d]=a.charCodeAt(d);return b};Graph.bytesToString=function(a){for(var b=Array(a.length),d=0;d<a.length;d++)b[d]=String.fromCharCode(a[d]);return b.join("")};
+Graph.createSvgImage=function(a,b,d,g,f){d=unescape(encodeURIComponent('<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="'+a+'px" height="'+b+'px" '+(null!=g&&null!=f?'viewBox="0 0 '+g+" "+f+'" ':"")+'version="1.1">'+d+"</svg>"));return new mxImage("data:image/svg+xml;base64,"+(window.btoa?btoa(d):Base64.encode(d,!0)),a,b)};
+Graph.zapGremlins=function(a){for(var b=0,d=[],g=0;g<a.length;g++){var f=a.charCodeAt(g);(32<=f||9==f||10==f||13==f)&&65535!=f&&65534!=f||(d.push(a.substring(b,g)),b=g+1)}0<b&&b<a.length&&d.push(a.substring(b));return 0==d.length?a:d.join("")};Graph.stringToBytes=function(a){for(var b=Array(a.length),d=0;d<a.length;d++)b[d]=a.charCodeAt(d);return b};Graph.bytesToString=function(a){for(var b=Array(a.length),d=0;d<a.length;d++)b[d]=String.fromCharCode(a[d]);return b.join("")};
Graph.base64EncodeUnicode=function(a){return btoa(encodeURIComponent(a).replace(/%([0-9A-F]{2})/g,function(a,d){return String.fromCharCode(parseInt(d,16))}))};Graph.base64DecodeUnicode=function(a){return decodeURIComponent(Array.prototype.map.call(atob(a),function(a){return"%"+("00"+a.charCodeAt(0).toString(16)).slice(-2)}).join(""))};Graph.compressNode=function(a,b){var d=mxUtils.getXml(a);return Graph.compress(b?d:Graph.zapGremlins(d))};
-Graph.arrayBufferToString=function(a){var b="";a=new Uint8Array(a);for(var d=a.byteLength,k=0;k<d;k++)b+=String.fromCharCode(a[k]);return b};Graph.stringToArrayBuffer=function(a){return Uint8Array.from(a,function(a){return a.charCodeAt(0)})};
-Graph.arrayBufferIndexOfString=function(a,b,d){var k=b.charCodeAt(0),f=1,m=-1;for(d=d||0;d<a.byteLength;d++)if(a[d]==k){m=d;break}for(d=m+1;-1<m&&d<a.byteLength&&d<m+b.length-1;d++){if(a[d]!=b.charCodeAt(f))return Graph.arrayBufferIndexOfString(a,b,m+1);f++}return f==b.length-1?m:-1};Graph.compress=function(a,b){if(null==a||0==a.length||"undefined"===typeof pako)return a;var d=b?pako.deflate(encodeURIComponent(a)):pako.deflateRaw(encodeURIComponent(a));return btoa(Graph.arrayBufferToString(new Uint8Array(d)))};
+Graph.arrayBufferToString=function(a){var b="";a=new Uint8Array(a);for(var d=a.byteLength,g=0;g<d;g++)b+=String.fromCharCode(a[g]);return b};Graph.stringToArrayBuffer=function(a){return Uint8Array.from(a,function(a){return a.charCodeAt(0)})};
+Graph.arrayBufferIndexOfString=function(a,b,d){var g=b.charCodeAt(0),f=1,m=-1;for(d=d||0;d<a.byteLength;d++)if(a[d]==g){m=d;break}for(d=m+1;-1<m&&d<a.byteLength&&d<m+b.length-1;d++){if(a[d]!=b.charCodeAt(f))return Graph.arrayBufferIndexOfString(a,b,m+1);f++}return f==b.length-1?m:-1};Graph.compress=function(a,b){if(null==a||0==a.length||"undefined"===typeof pako)return a;var d=b?pako.deflate(encodeURIComponent(a)):pako.deflateRaw(encodeURIComponent(a));return btoa(Graph.arrayBufferToString(new Uint8Array(d)))};
Graph.decompress=function(a,b,d){if(null==a||0==a.length||"undefined"===typeof pako)return a;a=Graph.stringToArrayBuffer(atob(a));b=decodeURIComponent(b?pako.inflate(a,{to:"string"}):pako.inflateRaw(a,{to:"string"}));return d?b:Graph.zapGremlins(b)};
-Graph.fadeNodes=function(a,b,d,k,f){f=null!=f?f:1E3;Graph.setTransitionForNodes(a,null);Graph.setOpacityForNodes(a,b);window.setTimeout(function(){Graph.setTransitionForNodes(a,"all "+f+"ms ease-in-out");Graph.setOpacityForNodes(a,d);window.setTimeout(function(){Graph.setTransitionForNodes(a,null);null!=k&&k()},f)},0)};Graph.setTransitionForNodes=function(a,b){for(var d=0;d<a.length;d++)mxUtils.setPrefixedStyle(a[d].style,"transition",b)};
+Graph.fadeNodes=function(a,b,d,g,f){f=null!=f?f:1E3;Graph.setTransitionForNodes(a,null);Graph.setOpacityForNodes(a,b);window.setTimeout(function(){Graph.setTransitionForNodes(a,"all "+f+"ms ease-in-out");Graph.setOpacityForNodes(a,d);window.setTimeout(function(){Graph.setTransitionForNodes(a,null);null!=g&&g()},f)},0)};Graph.setTransitionForNodes=function(a,b){for(var d=0;d<a.length;d++)mxUtils.setPrefixedStyle(a[d].style,"transition",b)};
Graph.setOpacityForNodes=function(a,b){for(var d=0;d<a.length;d++)a[d].style.opacity=b};Graph.removePasteFormatting=function(a){for(;null!=a;)null!=a.firstChild&&Graph.removePasteFormatting(a.firstChild),a.nodeType==mxConstants.NODETYPE_ELEMENT&&null!=a.style&&(a.style.whiteSpace="","#000000"==a.style.color&&(a.style.color="")),a=a.nextSibling};Graph.sanitizeHtml=function(a,b){return html_sanitize(a,function(a){return null!=a&&"javascript:"!==a.toString().toLowerCase().substring(0,11)?a:null},function(a){return a})};
-Graph.sanitizeSvg=function(a){for(var b=a.getElementsByTagName("*"),d=0;d<b.length;d++)for(var k=0;k<b[d].attributes.length;k++){var f=b[d].attributes[k];2<f.name.length&&"on"==f.name.toLowerCase().substring(0,2)&&b[d].removeAttribute(f.name)}for(a=a.getElementsByTagName("script");0<a.length;)a[0].parentNode.removeChild(a[0])};
-Graph.clipSvgDataUri=function(a){if(!mxClient.IS_IE&&!mxClient.IS_IE11&&null!=a&&"data:image/svg+xml;base64,"==a.substring(0,26))try{var b=document.createElement("div");b.style.position="absolute";b.style.visibility="hidden";var d=decodeURIComponent(escape(atob(a.substring(26)))),k=d.indexOf("<svg");if(0<=k){b.innerHTML=d.substring(k);Graph.sanitizeSvg(b);var f=b.getElementsByTagName("svg");if(0<f.length){document.body.appendChild(b);try{var m=f[0].getBBox();0<m.width&&0<m.height&&(b.getElementsByTagName("svg")[0].setAttribute("viewBox",
+Graph.sanitizeSvg=function(a){for(var b=a.getElementsByTagName("*"),d=0;d<b.length;d++)for(var g=0;g<b[d].attributes.length;g++){var f=b[d].attributes[g];2<f.name.length&&"on"==f.name.toLowerCase().substring(0,2)&&b[d].removeAttribute(f.name)}for(a=a.getElementsByTagName("script");0<a.length;)a[0].parentNode.removeChild(a[0])};
+Graph.clipSvgDataUri=function(a){if(!mxClient.IS_IE&&!mxClient.IS_IE11&&null!=a&&"data:image/svg+xml;base64,"==a.substring(0,26))try{var b=document.createElement("div");b.style.position="absolute";b.style.visibility="hidden";var d=decodeURIComponent(escape(atob(a.substring(26)))),g=d.indexOf("<svg");if(0<=g){b.innerHTML=d.substring(g);Graph.sanitizeSvg(b);var f=b.getElementsByTagName("svg");if(0<f.length){document.body.appendChild(b);try{var m=f[0].getBBox();0<m.width&&0<m.height&&(b.getElementsByTagName("svg")[0].setAttribute("viewBox",
m.x+" "+m.y+" "+m.width+" "+m.height),b.getElementsByTagName("svg")[0].setAttribute("width",m.width),b.getElementsByTagName("svg")[0].setAttribute("height",m.height))}catch(p){}finally{document.body.removeChild(b)}a=Editor.createSvgDataUri(mxUtils.getXml(f[0]))}}}catch(p){}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.isPageLink=function(a){return null!=a&&"data:page/id,"==a.substring(0,13)};Graph.isLink=function(a){return null!=a&&Graph.linkPattern.test(a)};Graph.linkPattern=/^(https?:\/\/)?((([a-z\d]([a-z\d-]*[a-z\d])*)\.)+[a-z]{2,}|((\d{1,3}\.){3}\d{1,3}))(\:\d+)?(\/[-a-z\d%_.~+]*)*(\?[;&a-z\d%_.~+=-]*)?(\#[-a-z\d_]*)?$/i;
mxUtils.extend(Graph,mxGraph);Graph.prototype.minFitScale=null;Graph.prototype.maxFitScale=null;Graph.prototype.linkPolicy="frame"==urlParams.target?"blank":urlParams.target||"auto";Graph.prototype.linkTarget="frame"==urlParams.target?"_self":"_blank";Graph.prototype.linkRelation="nofollow noopener noreferrer";Graph.prototype.defaultScrollbars=!mxClient.IS_IOS;Graph.prototype.defaultPageVisible=!0;Graph.prototype.defaultGridEnabled=!0;Graph.prototype.lightbox=!1;
Graph.prototype.defaultPageBackgroundColor="#ffffff";Graph.prototype.defaultPageBorderColor="#ffffff";Graph.prototype.scrollTileSize=new mxRectangle(0,0,400,400);Graph.prototype.transparentBackground=!0;Graph.prototype.selectParentAfterDelete=!1;Graph.prototype.defaultEdgeLength=80;Graph.prototype.edgeMode=!1;Graph.prototype.connectionArrowsEnabled=!0;Graph.prototype.placeholderPattern=RegExp("%(date{.*}|[^%^{^}]+)%","g");Graph.prototype.absoluteUrlPattern=/^(?:[a-z]+:)?\/\//i;
Graph.prototype.defaultThemeName="default";Graph.prototype.defaultThemes={};Graph.prototype.baseUrl=null!=urlParams.base?decodeURIComponent(urlParams.base):(window!=window.top?document.referrer:document.location.toString()).split("#")[0];Graph.prototype.editAfterInsert=!1;Graph.prototype.builtInProperties=["label","tooltip","placeholders","placeholder"];Graph.prototype.standalone=!1;Graph.prototype.enableFlowAnimation=!1;
-Graph.prototype.init=function(a){mxGraph.prototype.init.apply(this,arguments);this.cellRenderer.initializeLabel=function(a,b){mxCellRenderer.prototype.initializeLabel.apply(this,arguments);var d=a.view.graph.tolerance,k=!0,p=null,c=mxUtils.bind(this,function(a){k=!0;p=new mxPoint(mxEvent.getClientX(a),mxEvent.getClientY(a))}),e=mxUtils.bind(this,function(a){k=k&&null!=p&&Math.abs(p.x-mxEvent.getClientX(a))<d&&Math.abs(p.y-mxEvent.getClientY(a))<d}),g=mxUtils.bind(this,function(c){if(k)for(var e=mxEvent.getSource(c);null!=
-e&&e!=b.node;){if("a"==e.nodeName.toLowerCase()){a.view.graph.labelLinkClicked(a,e,c);break}e=e.parentNode}});mxEvent.addGestureListeners(b.node,c,e,g);mxEvent.addListener(b.node,"click",function(a){mxEvent.consume(a)})};if(null!=this.tooltipHandler){var b=this.tooltipHandler.init;this.tooltipHandler.init=function(){b.apply(this,arguments);null!=this.div&&mxEvent.addListener(this.div,"click",mxUtils.bind(this,function(a){var b=mxEvent.getSource(a);"A"==b.nodeName&&(b=b.getAttribute("href"),null!=
+Graph.prototype.init=function(a){mxGraph.prototype.init.apply(this,arguments);this.cellRenderer.initializeLabel=function(a,b){mxCellRenderer.prototype.initializeLabel.apply(this,arguments);var d=a.view.graph.tolerance,g=!0,p=null,c=mxUtils.bind(this,function(a){g=!0;p=new mxPoint(mxEvent.getClientX(a),mxEvent.getClientY(a))}),e=mxUtils.bind(this,function(a){g=g&&null!=p&&Math.abs(p.x-mxEvent.getClientX(a))<d&&Math.abs(p.y-mxEvent.getClientY(a))<d}),k=mxUtils.bind(this,function(c){if(g)for(var e=mxEvent.getSource(c);null!=
+e&&e!=b.node;){if("a"==e.nodeName.toLowerCase()){a.view.graph.labelLinkClicked(a,e,c);break}e=e.parentNode}});mxEvent.addGestureListeners(b.node,c,e,k);mxEvent.addListener(b.node,"click",function(a){mxEvent.consume(a)})};if(null!=this.tooltipHandler){var b=this.tooltipHandler.init;this.tooltipHandler.init=function(){b.apply(this,arguments);null!=this.div&&mxEvent.addListener(this.div,"click",mxUtils.bind(this,function(a){var b=mxEvent.getSource(a);"A"==b.nodeName&&(b=b.getAttribute("href"),null!=
b&&this.graph.isCustomLink(b)&&(mxEvent.isTouchEvent(a)||!mxEvent.isPopupTrigger(a))&&this.graph.customLinkClicked(b)&&mxEvent.consume(a))}))}}this.addListener(mxEvent.SIZE,mxUtils.bind(this,function(a,b){if(null!=this.container&&this.flowAnimationStyle){var d=this.flowAnimationStyle.getAttribute("id");this.flowAnimationStyle.innerHTML=this.getFlowAnimationStyleCss(d)}}));this.initLayoutManager()};
(function(){Graph.prototype.useCssTransforms=!1;Graph.prototype.currentScale=1;Graph.prototype.currentTranslate=new mxPoint(0,0);Graph.prototype.getVerticesAndEdges=function(a,b){a=null!=a?a:!0;b=null!=b?b:!0;var c=this.model;return c.filterDescendants(function(e){return a&&c.isVertex(e)||b&&c.isEdge(e)},c.getRoot())};Graph.prototype.getCommonStyle=function(a){for(var b={},c=0;c<a.length;c++){var e=this.view.getState(a[c]);this.mergeStyle(e.style,b,0==c)}return b};Graph.prototype.mergeStyle=function(a,
b,c){if(null!=a){var e={},d;for(d in a){var f=a[d];null!=f&&(e[d]=!0,null==b[d]&&c?b[d]=f:b[d]!=f&&delete b[d])}for(d in b)e[d]||delete b[d]}};Graph.prototype.getStartEditingCell=function(a,b){var c=this.getCellStyle(a),c=parseInt(mxUtils.getValue(c,mxConstants.STYLE_STARTSIZE,0));this.isTable(a)&&(!this.isSwimlane(a)||0==c)&&""==this.getLabel(a)&&0<this.model.getChildCount(a)&&(a=this.model.getChildAt(a,0),c=this.getCellStyle(a),c=parseInt(mxUtils.getValue(c,mxConstants.STYLE_STARTSIZE,0)));if(this.isTableRow(a)&&
(!this.isSwimlane(a)||0==c)&&""==this.getLabel(a)&&0<this.model.getChildCount(a))for(c=0;c<this.model.getChildCount(a);c++){var e=this.model.getChildAt(a,c);if(this.isCellEditable(e)){a=e;break}}return a};Graph.prototype.copyStyle=function(a){var b=null;if(null!=a){b=mxUtils.clone(this.getCurrentCellStyle(a));a=this.model.getStyle(a);a=null!=a?a.split(";"):[];for(var c=0;c<a.length;c++){var e=a[c],d=e.indexOf("=");if(0<=d){var f=e.substring(0,d),e=e.substring(d+1);null==b[f]&&e==mxConstants.NONE&&
-(b[f]=mxConstants.NONE)}}}return b};Graph.prototype.pasteStyle=function(a,b,c){c=null!=c?c:Graph.pasteStyles;this.model.beginUpdate();try{for(var e=0;e<b.length;e++)for(var d=this.getCurrentCellStyle(b[e]),f=0;f<c.length;f++){var k=d[c[f]],q=a[c[f]];k==q||null==k&&q==mxConstants.NONE||this.setCellStyles(c[f],q,[b[e]])}}finally{this.model.endUpdate()}};Graph.prototype.isFastZoomEnabled=function(){return"nocss"!=urlParams.zoom&&!mxClient.NO_FO&&!mxClient.IS_EDGE&&!this.useCssTransforms&&(this.isCssTransformsSupported()||
+(b[f]=mxConstants.NONE)}}}return b};Graph.prototype.pasteStyle=function(a,b,c){c=null!=c?c:Graph.pasteStyles;this.model.beginUpdate();try{for(var e=0;e<b.length;e++)for(var d=this.getCurrentCellStyle(b[e]),f=0;f<c.length;f++){var g=d[c[f]],q=a[c[f]];g==q||null==g&&q==mxConstants.NONE||this.setCellStyles(c[f],q,[b[e]])}}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(a,b,c,e,d,f){this.useCssTransforms&&(a=a/this.currentScale-this.currentTranslate.x,b=b/this.currentScale-this.currentTranslate.y);return this.getScaledCellAt.apply(this,arguments)};Graph.prototype.getScaledCellAt=function(a,b,c,e,d,f){e=null!=e?e:!0;d=null!=d?d:!0;null==c&&(c=this.getCurrentRoot(),
-null==c&&(c=this.getModel().getRoot()));if(null!=c)for(var g=this.model.getChildCount(c)-1;0<=g;g--){var k=this.model.getChildAt(c,g),n=this.getScaledCellAt(a,b,k,e,d,f);if(null!=n)return n;if(this.isCellVisible(k)&&(d&&this.model.isEdge(k)||e&&this.model.isVertex(k))&&(n=this.view.getState(k),null!=n&&(null==f||!f(n,a,b))&&this.intersects(n,a,b)))return k}return null};Graph.prototype.isRecursiveVertexResize=function(a){return!this.isSwimlane(a.cell)&&0<this.model.getChildCount(a.cell)&&!this.isCellCollapsed(a.cell)&&
+null==c&&(c=this.getModel().getRoot()));if(null!=c)for(var k=this.model.getChildCount(c)-1;0<=k;k--){var g=this.model.getChildAt(c,k),n=this.getScaledCellAt(a,b,g,e,d,f);if(null!=n)return n;if(this.isCellVisible(g)&&(d&&this.model.isEdge(g)||e&&this.model.isVertex(g))&&(n=this.view.getState(g),null!=n&&(null==f||!f(n,a,b))&&this.intersects(n,a,b)))return g}return null};Graph.prototype.isRecursiveVertexResize=function(a){return!this.isSwimlane(a.cell)&&0<this.model.getChildCount(a.cell)&&!this.isCellCollapsed(a.cell)&&
"1"==mxUtils.getValue(a.style,"recursiveResize","1")&&null==mxUtils.getValue(a.style,"childLayout",null)};Graph.prototype.getAbsoluteParent=function(a){for(var b=this.getCellGeometry(a);null!=b&&b.relative;)a=this.getModel().getParent(a),b=this.getCellGeometry(cellToClone);return a};Graph.prototype.isPart=function(a){return"1"==mxUtils.getValue(this.getCurrentCellStyle(a),"part","0")||this.isTableCell(a)||this.isTableRow(a)};Graph.prototype.getCompositeParent=function(a){for(;this.isPart(a);){var b=
this.model.getParent(a);if(!this.model.isVertex(b))break;a=b}return a};Graph.prototype.filterSelectionCells=function(a){var b=this.getSelectionCells();if(null!=a){for(var c=[],e=0;e<b.length;e++)a(b[e])||c.push(b[e]);b=c}return b};mxCellHighlight.prototype.getStrokeWidth=function(a){a=this.strokeWidth;this.graph.useCssTransforms&&(a/=this.graph.currentScale);return a};mxGraphView.prototype.getGraphBounds=function(){var a=this.graphBounds;if(this.graph.useCssTransforms)var b=this.graph.currentTranslate,
c=this.graph.currentScale,a=new mxRectangle((a.x+b.x)*c,(a.y+b.y)*c,a.width*c,a.height*c);return a};mxGraphView.prototype.viewStateChanged=function(){this.graph.useCssTransforms?this.validate():this.revalidate();this.graph.sizeDidChange()};var a=mxGraphView.prototype.validate;mxGraphView.prototype.validate=function(b){this.graph.useCssTransforms&&(this.graph.currentScale=this.scale,this.graph.currentTranslate.x=this.translate.x,this.graph.currentTranslate.y=this.translate.y,this.scale=1,this.translate.x=
0,this.translate.y=0);a.apply(this,arguments);this.graph.useCssTransforms&&(this.graph.updateCssTransform(),this.scale=this.graph.currentScale,this.translate.x=this.graph.currentTranslate.x,this.translate.y=this.graph.currentTranslate.y)};var b=mxGraph.prototype.getCellsForGroup;Graph.prototype.getCellsForGroup=function(a){a=b.apply(this,arguments);for(var d=[],c=0;c<a.length;c++)this.isTableRow(a[c])||this.isTableCell(a[c])||d.push(a[c]);return d};var d=mxGraph.prototype.getCellsForUngroup;Graph.prototype.getCellsForUngroup=
function(a){a=d.apply(this,arguments);for(var b=[],c=0;c<a.length;c++)this.isTable(a[c])||this.isTableRow(a[c])||this.isTableCell(a[c])||b.push(a[c]);return b};Graph.prototype.updateCssTransform=function(){var a=this.view.getDrawPane();if(null!=a)if(a=a.parentNode,this.useCssTransforms){var b=a.getAttribute("transform");a.setAttribute("transformOrigin","0 0");var c=Math.round(100*this.currentScale)/100;a.setAttribute("transform","scale("+c+","+c+")translate("+Math.round(100*this.currentTranslate.x)/
-100+","+Math.round(100*this.currentTranslate.y)/100+")");b!=a.getAttribute("transform")&&this.fireEvent(new mxEventObject("cssTransformChanged"),"transform",a.getAttribute("transform"))}else a.removeAttribute("transformOrigin"),a.removeAttribute("transform")};var k=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){var a=this.graph.useCssTransforms,b=this.scale,c=this.translate;a&&(this.scale=this.graph.currentScale,this.translate=this.graph.currentTranslate);
-k.apply(this,arguments);a&&(this.scale=b,this.translate=c)};var f=mxGraph.prototype.updatePageBreaks;mxGraph.prototype.updatePageBreaks=function(a,b,c){var e=this.useCssTransforms,d=this.view.scale,k=this.view.translate;e&&(this.view.scale=1,this.view.translate=new mxPoint(0,0),this.useCssTransforms=!1);f.apply(this,arguments);e&&(this.view.scale=d,this.view.translate=k,this.useCssTransforms=!0)}})();Graph.prototype.isLightboxView=function(){return this.lightbox};Graph.prototype.isViewer=function(){return!1};
+100+","+Math.round(100*this.currentTranslate.y)/100+")");b!=a.getAttribute("transform")&&this.fireEvent(new mxEventObject("cssTransformChanged"),"transform",a.getAttribute("transform"))}else a.removeAttribute("transformOrigin"),a.removeAttribute("transform")};var g=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){var a=this.graph.useCssTransforms,b=this.scale,c=this.translate;a&&(this.scale=this.graph.currentScale,this.translate=this.graph.currentTranslate);
+g.apply(this,arguments);a&&(this.scale=b,this.translate=c)};var f=mxGraph.prototype.updatePageBreaks;mxGraph.prototype.updatePageBreaks=function(a,b,c){var e=this.useCssTransforms,d=this.view.scale,g=this.view.translate;e&&(this.view.scale=1,this.view.translate=new mxPoint(0,0),this.useCssTransforms=!1);f.apply(this,arguments);e&&(this.view.scale=d,this.view.translate=g,this.useCssTransforms=!0)}})();Graph.prototype.isLightboxView=function(){return this.lightbox};Graph.prototype.isViewer=function(){return!1};
Graph.prototype.labelLinkClicked=function(a,b,d){b=b.getAttribute("href");if(null!=b&&!this.isCustomLink(b)&&(mxEvent.isLeftMouseButton(d)&&!mxEvent.isPopupTrigger(d)||mxEvent.isTouchEvent(d))){if(!this.isEnabled()||this.isCellLocked(a.cell))a=this.isBlankLink(b)?this.linkTarget:"_top",this.openLink(this.getAbsoluteUrl(b),a);mxEvent.consume(d)}};
-Graph.prototype.openLink=function(a,b,d){var k=window;try{if("_self"==b&&window!=window.top)window.location.href=a;else if(a.substring(0,this.baseUrl.length)==this.baseUrl&&"#"==a.charAt(this.baseUrl.length)&&"_top"==b&&window==window.top){var f=a.split("#")[1];window.location.hash=="#"+f&&(window.location.hash="");window.location.hash=f}else k=window.open(a,null!=b?b:"_blank"),null==k||d||(k.opener=null)}catch(m){}return k};
+Graph.prototype.openLink=function(a,b,d){var g=window;try{if("_self"==b&&window!=window.top)window.location.href=a;else if(a.substring(0,this.baseUrl.length)==this.baseUrl&&"#"==a.charAt(this.baseUrl.length)&&"_top"==b&&window==window.top){var f=a.split("#")[1];window.location.hash=="#"+f&&(window.location.hash="");window.location.hash=f}else g=window.open(a,null!=b?b:"_blank"),null==g||d||(g.opener=null)}catch(m){}return g};
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,b){return null!=this.graph.getCellStyle(a).childLayout};this.layoutManager.getLayout=function(a,b){var d=this.graph.model.getParent(a);if(b!=mxEvent.BEGIN_UPDATE||this.hasLayout(d,b)){d=this.graph.getCellStyle(a);if("stackLayout"==d.childLayout){var k=new mxStackLayout(this.graph,!0);k.resizeParentMax="1"==mxUtils.getValue(d,"resizeParentMax","1");k.horizontal="1"==mxUtils.getValue(d,
-"horizontalStack","1");k.resizeParent="1"==mxUtils.getValue(d,"resizeParent","1");k.resizeLast="1"==mxUtils.getValue(d,"resizeLast","0");k.spacing=d.stackSpacing||k.spacing;k.border=d.stackBorder||k.border;k.marginLeft=d.marginLeft||0;k.marginRight=d.marginRight||0;k.marginTop=d.marginTop||0;k.marginBottom=d.marginBottom||0;k.allowGaps=d.allowGaps||0;k.fill=!0;k.allowGaps&&(k.gridSize=parseFloat(mxUtils.getValue(d,"stackUnitSize",20)));return k}if("treeLayout"==d.childLayout)return k=new mxCompactTreeLayout(this.graph),
-k.horizontal="1"==mxUtils.getValue(d,"horizontalTree","1"),k.resizeParent="1"==mxUtils.getValue(d,"resizeParent","1"),k.groupPadding=mxUtils.getValue(d,"parentPadding",20),k.levelDistance=mxUtils.getValue(d,"treeLevelDistance",30),k.maintainParentLocation=!0,k.edgeRouting=!1,k.resetEdges=!1,k;if("flowLayout"==d.childLayout)return k=new mxHierarchicalLayout(this.graph,mxUtils.getValue(d,"flowOrientation",mxConstants.DIRECTION_EAST)),k.resizeParent="1"==mxUtils.getValue(d,"resizeParent","1"),k.parentBorder=
-mxUtils.getValue(d,"parentPadding",20),k.maintainParentLocation=!0,k.intraCellSpacing=mxUtils.getValue(d,"intraCellSpacing",mxHierarchicalLayout.prototype.intraCellSpacing),k.interRankCellSpacing=mxUtils.getValue(d,"interRankCellSpacing",mxHierarchicalLayout.prototype.interRankCellSpacing),k.interHierarchySpacing=mxUtils.getValue(d,"interHierarchySpacing",mxHierarchicalLayout.prototype.interHierarchySpacing),k.parallelEdgeSpacing=mxUtils.getValue(d,"parallelEdgeSpacing",mxHierarchicalLayout.prototype.parallelEdgeSpacing),
-k;if("circleLayout"==d.childLayout)return new mxCircleLayout(this.graph);if("organicLayout"==d.childLayout)return new mxFastOrganicLayout(this.graph);if("tableLayout"==d.childLayout)return new TableLayout(this.graph)}return null}};Graph.prototype.getDataForCells=function(a){for(var b=[],d=0;d<a.length;d++){var k=null!=a[d].value?a[d].value.attributes:null,f={};f.id=a[d].id;if(null!=k)for(var m=0;m<k.length;m++)f[k[m].nodeName]=k[m].nodeValue;else f.label=this.convertValueToString(a[d]);b.push(f)}return b};
-Graph.prototype.getNodesForCells=function(a){for(var b=[],d=0;d<a.length;d++){var k=this.view.getState(a[d]);if(null!=k){for(var f=this.cellRenderer.getShapesForState(k),m=0;m<f.length;m++)null!=f[m]&&null!=f[m].node&&b.push(f[m].node);null!=k.control&&null!=k.control.node&&b.push(k.control.node)}}return b};
-Graph.prototype.createWipeAnimations=function(a,b){for(var d=[],k=0;k<a.length;k++){var f=this.view.getState(a[k]);null!=f&&null!=f.shape&&(this.model.isEdge(f.cell)&&null!=f.absolutePoints&&1<f.absolutePoints.length?d.push(this.createEdgeWipeAnimation(f,b)):this.model.isVertex(f.cell)&&null!=f.shape.bounds&&d.push(this.createVertexWipeAnimation(f,b)))}return d};
-Graph.prototype.createEdgeWipeAnimation=function(a,b){var d=a.absolutePoints.slice(),k=a.segments,f=a.length,m=d.length;return{execute:mxUtils.bind(this,function(p,c){if(null!=a.shape){var e=[d[0]],g=p/c;b||(g=1-g);for(var n=f*g,l=1;l<m;l++)if(n<=k[l-1]){e.push(new mxPoint(d[l-1].x+(d[l].x-d[l-1].x)*n/k[l-1],d[l-1].y+(d[l].y-d[l-1].y)*n/k[l-1]));break}else n-=k[l-1],e.push(d[l]);a.shape.points=e;a.shape.redraw();0==p&&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.points=d,a.shape.redraw(),null!=a.text&&null!=a.text.node&&(a.text.node.style.opacity=""),Graph.setOpacityForNodes(this.getNodesForCells([a.cell]),b?1:0))})}};
-Graph.prototype.createVertexWipeAnimation=function(a,b){var d=new mxRectangle.fromRectangle(a.shape.bounds);return{execute:mxUtils.bind(this,function(k,f){if(null!=a.shape){var m=k/f;b||(m=1-m);a.shape.bounds=new mxRectangle(d.x,d.y,d.width*m,d.height);a.shape.redraw();0==k&&Graph.setOpacityForNodes(this.getNodesForCells([a.cell]),1);null!=a.text&&null!=a.text.node&&(a.text.node.style.opacity=m)}}),stop:mxUtils.bind(this,function(){null!=a.shape&&(a.shape.bounds=d,a.shape.redraw(),null!=a.text&&null!=
-a.text.node&&(a.text.node.style.opacity=""),Graph.setOpacityForNodes(this.getNodesForCells([a.cell]),b?1:0))})}};Graph.prototype.executeAnimations=function(a,b,d,k){d=null!=d?d:30;k=null!=k?k:30;var f=null,m=0,p=mxUtils.bind(this,function(){if(m==d||this.stoppingCustomActions){window.clearInterval(f);for(var c=0;c<a.length;c++)a[c].stop();null!=b&&b()}else for(c=0;c<a.length;c++)a[c].execute(m,d);m++}),f=window.setInterval(p,k);p()};
+Graph.prototype.initLayoutManager=function(){this.layoutManager=new mxLayoutManager(this);this.layoutManager.hasLayout=function(a,b){return null!=this.graph.getCellStyle(a).childLayout};this.layoutManager.getLayout=function(a,b){var d=this.graph.model.getParent(a);if(b!=mxEvent.BEGIN_UPDATE||this.hasLayout(d,b)){d=this.graph.getCellStyle(a);if("stackLayout"==d.childLayout){var g=new mxStackLayout(this.graph,!0);g.resizeParentMax="1"==mxUtils.getValue(d,"resizeParentMax","1");g.horizontal="1"==mxUtils.getValue(d,
+"horizontalStack","1");g.resizeParent="1"==mxUtils.getValue(d,"resizeParent","1");g.resizeLast="1"==mxUtils.getValue(d,"resizeLast","0");g.spacing=d.stackSpacing||g.spacing;g.border=d.stackBorder||g.border;g.marginLeft=d.marginLeft||0;g.marginRight=d.marginRight||0;g.marginTop=d.marginTop||0;g.marginBottom=d.marginBottom||0;g.allowGaps=d.allowGaps||0;g.fill=!0;g.allowGaps&&(g.gridSize=parseFloat(mxUtils.getValue(d,"stackUnitSize",20)));return g}if("treeLayout"==d.childLayout)return g=new mxCompactTreeLayout(this.graph),
+g.horizontal="1"==mxUtils.getValue(d,"horizontalTree","1"),g.resizeParent="1"==mxUtils.getValue(d,"resizeParent","1"),g.groupPadding=mxUtils.getValue(d,"parentPadding",20),g.levelDistance=mxUtils.getValue(d,"treeLevelDistance",30),g.maintainParentLocation=!0,g.edgeRouting=!1,g.resetEdges=!1,g;if("flowLayout"==d.childLayout)return g=new mxHierarchicalLayout(this.graph,mxUtils.getValue(d,"flowOrientation",mxConstants.DIRECTION_EAST)),g.resizeParent="1"==mxUtils.getValue(d,"resizeParent","1"),g.parentBorder=
+mxUtils.getValue(d,"parentPadding",20),g.maintainParentLocation=!0,g.intraCellSpacing=mxUtils.getValue(d,"intraCellSpacing",mxHierarchicalLayout.prototype.intraCellSpacing),g.interRankCellSpacing=mxUtils.getValue(d,"interRankCellSpacing",mxHierarchicalLayout.prototype.interRankCellSpacing),g.interHierarchySpacing=mxUtils.getValue(d,"interHierarchySpacing",mxHierarchicalLayout.prototype.interHierarchySpacing),g.parallelEdgeSpacing=mxUtils.getValue(d,"parallelEdgeSpacing",mxHierarchicalLayout.prototype.parallelEdgeSpacing),
+g;if("circleLayout"==d.childLayout)return new mxCircleLayout(this.graph);if("organicLayout"==d.childLayout)return new mxFastOrganicLayout(this.graph);if("tableLayout"==d.childLayout)return new TableLayout(this.graph)}return null}};Graph.prototype.getDataForCells=function(a){for(var b=[],d=0;d<a.length;d++){var g=null!=a[d].value?a[d].value.attributes:null,f={};f.id=a[d].id;if(null!=g)for(var m=0;m<g.length;m++)f[g[m].nodeName]=g[m].nodeValue;else f.label=this.convertValueToString(a[d]);b.push(f)}return b};
+Graph.prototype.getNodesForCells=function(a){for(var b=[],d=0;d<a.length;d++){var g=this.view.getState(a[d]);if(null!=g){for(var f=this.cellRenderer.getShapesForState(g),m=0;m<f.length;m++)null!=f[m]&&null!=f[m].node&&b.push(f[m].node);null!=g.control&&null!=g.control.node&&b.push(g.control.node)}}return b};
+Graph.prototype.createWipeAnimations=function(a,b){for(var d=[],g=0;g<a.length;g++){var f=this.view.getState(a[g]);null!=f&&null!=f.shape&&(this.model.isEdge(f.cell)&&null!=f.absolutePoints&&1<f.absolutePoints.length?d.push(this.createEdgeWipeAnimation(f,b)):this.model.isVertex(f.cell)&&null!=f.shape.bounds&&d.push(this.createVertexWipeAnimation(f,b)))}return d};
+Graph.prototype.createEdgeWipeAnimation=function(a,b){var d=a.absolutePoints.slice(),g=a.segments,f=a.length,m=d.length;return{execute:mxUtils.bind(this,function(p,c){if(null!=a.shape){var e=[d[0]],k=p/c;b||(k=1-k);for(var n=f*k,l=1;l<m;l++)if(n<=g[l-1]){e.push(new mxPoint(d[l-1].x+(d[l].x-d[l-1].x)*n/g[l-1],d[l-1].y+(d[l].y-d[l-1].y)*n/g[l-1]));break}else n-=g[l-1],e.push(d[l]);a.shape.points=e;a.shape.redraw();0==p&&Graph.setOpacityForNodes(this.getNodesForCells([a.cell]),1);null!=a.text&&null!=
+a.text.node&&(a.text.node.style.opacity=k)}}),stop:mxUtils.bind(this,function(){null!=a.shape&&(a.shape.points=d,a.shape.redraw(),null!=a.text&&null!=a.text.node&&(a.text.node.style.opacity=""),Graph.setOpacityForNodes(this.getNodesForCells([a.cell]),b?1:0))})}};
+Graph.prototype.createVertexWipeAnimation=function(a,b){var d=new mxRectangle.fromRectangle(a.shape.bounds);return{execute:mxUtils.bind(this,function(g,f){if(null!=a.shape){var m=g/f;b||(m=1-m);a.shape.bounds=new mxRectangle(d.x,d.y,d.width*m,d.height);a.shape.redraw();0==g&&Graph.setOpacityForNodes(this.getNodesForCells([a.cell]),1);null!=a.text&&null!=a.text.node&&(a.text.node.style.opacity=m)}}),stop:mxUtils.bind(this,function(){null!=a.shape&&(a.shape.bounds=d,a.shape.redraw(),null!=a.text&&null!=
+a.text.node&&(a.text.node.style.opacity=""),Graph.setOpacityForNodes(this.getNodesForCells([a.cell]),b?1:0))})}};Graph.prototype.executeAnimations=function(a,b,d,g){d=null!=d?d:30;g=null!=g?g:30;var f=null,m=0,p=mxUtils.bind(this,function(){if(m==d||this.stoppingCustomActions){window.clearInterval(f);for(var c=0;c<a.length;c++)a[c].stop();null!=b&&b()}else for(c=0;c<a.length;c++)a[c].execute(m,d);m++}),f=window.setInterval(p,g);p()};
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 d=Math.floor(Math.ceil(b.x/this.view.scale-this.view.translate.x)/a.width),k=Math.floor(Math.ceil(b.y/this.view.scale-this.view.translate.y)/a.height);return new mxRectangle(d,k,Math.ceil((Math.floor((b.x+b.width)/this.view.scale)-this.view.translate.x)/a.width)-d,Math.ceil((Math.floor((b.y+b.height)/this.view.scale)-this.view.translate.y)/a.height)-
-k)};Graph.prototype.sanitizeHtml=function(a,b){return Graph.sanitizeHtml(a,b)};Graph.prototype.updatePlaceholders=function(){var a=!1,b;for(b in this.model.cells){var d=this.model.cells[b];this.isReplacePlaceholders(d)&&(this.view.invalidate(d,!1,!1),a=!0)}a&&this.view.validate()};Graph.prototype.isReplacePlaceholders=function(a){return null!=a.value&&"object"==typeof a.value&&"1"==a.value.getAttribute("placeholders")};Graph.prototype.isZoomWheelEvent=function(a){return mxEvent.isAltDown(a)||mxEvent.isControlDown(a)};
+Graph.prototype.getPageLayout=function(){var a=this.getPageSize(),b=this.getGraphBounds();if(0==b.width||0==b.height)return new mxRectangle(0,0,1,1);var d=Math.floor(Math.ceil(b.x/this.view.scale-this.view.translate.x)/a.width),g=Math.floor(Math.ceil(b.y/this.view.scale-this.view.translate.y)/a.height);return new mxRectangle(d,g,Math.ceil((Math.floor((b.x+b.width)/this.view.scale)-this.view.translate.x)/a.width)-d,Math.ceil((Math.floor((b.y+b.height)/this.view.scale)-this.view.translate.y)/a.height)-
+g)};Graph.prototype.sanitizeHtml=function(a,b){return Graph.sanitizeHtml(a,b)};Graph.prototype.updatePlaceholders=function(){var a=!1,b;for(b in this.model.cells){var d=this.model.cells[b];this.isReplacePlaceholders(d)&&(this.view.invalidate(d,!1,!1),a=!0)}a&&this.view.validate()};Graph.prototype.isReplacePlaceholders=function(a){return null!=a.value&&"object"==typeof a.value&&"1"==a.value.getAttribute("placeholders")};Graph.prototype.isZoomWheelEvent=function(a){return 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.isShiftDown(a)&&(mxEvent.isControlDown(a)||mxClient.IS_MAC&&mxEvent.isMetaDown(a))};Graph.prototype.isEdgeIgnored=function(a){var b=!1;null!=a&&(a=this.getCurrentCellStyle(a),b="1"==mxUtils.getValue(a,"ignoreEdge","0"));return b};
Graph.prototype.isSplitTarget=function(a,b,d){return!this.model.isEdge(b[0])&&!mxEvent.isAltDown(d)&&!mxEvent.isShiftDown(d)&&mxGraph.prototype.isSplitTarget.apply(this,arguments)};Graph.prototype.getLabel=function(a){var b=mxGraph.prototype.getLabel.apply(this,arguments);null!=b&&this.isReplacePlaceholders(a)&&null==a.getAttribute("placeholder")&&(b=this.replacePlaceholders(a,b));return b};
Graph.prototype.isLabelMovable=function(a){var b=this.getCurrentCellStyle(a);return!this.isCellLocked(a)&&(this.model.isEdge(a)&&this.edgeLabelsMovable||this.model.isVertex(a)&&(this.vertexLabelsMovable||"1"==mxUtils.getValue(b,"labelMovable","0")))};Graph.prototype.setGridSize=function(a){this.gridSize=a;this.fireEvent(new mxEventObject("gridSizeChanged"))};Graph.prototype.setDefaultParent=function(a){this.defaultParent=a;this.fireEvent(new mxEventObject("defaultParentChanged"))};
Graph.prototype.getClickableLinkForCell=function(a){do{var b=this.getLinkForCell(a);if(null!=b)return b;a=this.model.getParent(a)}while(null!=a);return null};Graph.prototype.getGlobalVariable=function(a){var b=null;"date"==a?b=(new Date).toLocaleDateString():"time"==a?b=(new Date).toLocaleTimeString():"timestamp"==a?b=(new Date).toLocaleString():"date{"==a.substring(0,5)&&(a=a.substring(5,a.length-1),b=this.formatDate(new Date,a));return b};
Graph.prototype.formatDate=function(a,b,d){null==this.dateFormatCache&&(this.dateFormatCache={i18n:{dayNames:"Sun Mon Tue Wed Thu Fri Sat Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),monthNames:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec January February March April May June July August September October November December".split(" ")},masks:{"default":"ddd mmm dd yyyy HH:MM:ss",shortDate:"m/d/yy",mediumDate:"mmm d, yyyy",longDate:"mmmm d, yyyy",fullDate:"dddd, mmmm d, yyyy",
-shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:ss",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'"}});var k=this.dateFormatCache,f=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,m=/[^-+\dA-Z]/g,p=function(a,c){a=String(a);for(c=c||2;a.length<c;)a="0"+a;return a};1!=arguments.length||"[object String]"!=Object.prototype.toString.call(a)||
-/\d/.test(a)||(b=a,a=void 0);a=a?new Date(a):new Date;if(isNaN(a))throw SyntaxError("invalid date");b=String(k.masks[b]||b||k.masks["default"]);"UTC:"==b.slice(0,4)&&(b=b.slice(4),d=!0);var c=d?"getUTC":"get",e=a[c+"Date"](),g=a[c+"Day"](),n=a[c+"Month"](),l=a[c+"FullYear"](),q=a[c+"Hours"](),u=a[c+"Minutes"](),t=a[c+"Seconds"](),c=a[c+"Milliseconds"](),A=d?0:a.getTimezoneOffset(),x={d:e,dd:p(e),ddd:k.i18n.dayNames[g],dddd:k.i18n.dayNames[g+7],m:n+1,mm:p(n+1),mmm:k.i18n.monthNames[n],mmmm:k.i18n.monthNames[n+
+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 g=this.dateFormatCache,f=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,m=/[^-+\dA-Z]/g,p=function(a,c){a=String(a);for(c=c||2;a.length<c;)a="0"+a;return a};1!=arguments.length||"[object String]"!=Object.prototype.toString.call(a)||
+/\d/.test(a)||(b=a,a=void 0);a=a?new Date(a):new Date;if(isNaN(a))throw SyntaxError("invalid date");b=String(g.masks[b]||b||g.masks["default"]);"UTC:"==b.slice(0,4)&&(b=b.slice(4),d=!0);var c=d?"getUTC":"get",e=a[c+"Date"](),k=a[c+"Day"](),n=a[c+"Month"](),l=a[c+"FullYear"](),q=a[c+"Hours"](),u=a[c+"Minutes"](),t=a[c+"Seconds"](),c=a[c+"Milliseconds"](),A=d?0:a.getTimezoneOffset(),x={d:e,dd:p(e),ddd:g.i18n.dayNames[k],dddd:g.i18n.dayNames[k+7],m:n+1,mm:p(n+1),mmm:g.i18n.monthNames[n],mmmm:g.i18n.monthNames[n+
12],yy:String(l).slice(2),yyyy:l,h:q%12||12,hh:p(q%12||12),H:q,HH:p(q),M:u,MM:p(u),s:t,ss:p(t),l:p(c,3),L:p(99<c?Math.round(c/10):c),t:12>q?"a":"p",tt:12>q?"am":"pm",T:12>q?"A":"P",TT:12>q?"AM":"PM",Z:d?"UTC":(String(a).match(f)||[""]).pop().replace(m,""),o:(0<A?"-":"+")+p(100*Math.floor(Math.abs(A)/60)+Math.abs(A)%60,4),S:["th","st","nd","rd"][3<e%10?0:(10!=e%100-e%10)*e%10]};return b.replace(/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,function(a){return a in x?x[a]:a.slice(1,
a.length-1)})};Graph.prototype.getLayerForCells=function(a){var b=null;if(0<a.length){for(b=a[0];!this.model.isLayer(b);)b=this.model.getParent(b);for(var d=1;d<a.length;d++)if(!this.model.isAncestor(b,a[d])){b=null;break}}return b};
-Graph.prototype.createLayersDialog=function(a){var b=document.createElement("div");b.style.position="absolute";for(var d=this.getModel(),k=d.getChildCount(d.root),f=0;f<k;f++)mxUtils.bind(this,function(f){var k=document.createElement("div");k.style.overflow="hidden";k.style.textOverflow="ellipsis";k.style.padding="2px";k.style.whiteSpace="nowrap";var c=document.createElement("input");c.style.display="inline-block";c.setAttribute("type","checkbox");d.isVisible(f)&&(c.setAttribute("checked","checked"),
-c.defaultChecked=!0);k.appendChild(c);var e=this.convertValueToString(f)||mxResources.get("background")||"Background";k.setAttribute("title",e);mxUtils.write(k,e);b.appendChild(k);mxEvent.addListener(c,"click",function(){null!=c.getAttribute("checked")?c.removeAttribute("checked"):c.setAttribute("checked","checked");d.setVisible(f,c.checked);null!=a&&a(f)})})(d.getChildAt(d.root,f));return b};
-Graph.prototype.replacePlaceholders=function(a,b,d,k){k=[];if(null!=b){for(var f=0;match=this.placeholderPattern.exec(b);){var m=match[0];if(2<m.length&&"%label%"!=m&&"%tooltip%"!=m){var p=null;if(match.index>f&&"%"==b.charAt(match.index-1))p=m.substring(1);else{var c=m.substring(1,m.length-1);if("id"==c)p=a.id;else if(0>c.indexOf("{"))for(var e=a;null==p&&null!=e;)null!=e.value&&"object"==typeof e.value&&(Graph.translateDiagram&&null!=Graph.diagramLanguage&&(p=e.getAttribute(c+"_"+Graph.diagramLanguage)),
-null==p&&(p=e.hasAttribute(c)?null!=e.getAttribute(c)?e.getAttribute(c):"":null)),e=this.model.getParent(e);null==p&&(p=this.getGlobalVariable(c));null==p&&null!=d&&(p=d[c])}k.push(b.substring(f,match.index)+(null!=p?p:m));f=match.index+m.length}}k.push(b.substring(f))}return k.join("")};Graph.prototype.restoreSelection=function(a){if(null!=a&&0<a.length){for(var b=[],d=0;d<a.length;d++){var k=this.model.getCell(a[d].id);null!=k&&b.push(k)}this.setSelectionCells(b)}else this.clearSelection()};
+Graph.prototype.createLayersDialog=function(a){var b=document.createElement("div");b.style.position="absolute";for(var d=this.getModel(),g=d.getChildCount(d.root),f=0;f<g;f++)mxUtils.bind(this,function(f){var g=document.createElement("div");g.style.overflow="hidden";g.style.textOverflow="ellipsis";g.style.padding="2px";g.style.whiteSpace="nowrap";var c=document.createElement("input");c.style.display="inline-block";c.setAttribute("type","checkbox");d.isVisible(f)&&(c.setAttribute("checked","checked"),
+c.defaultChecked=!0);g.appendChild(c);var e=this.convertValueToString(f)||mxResources.get("background")||"Background";g.setAttribute("title",e);mxUtils.write(g,e);b.appendChild(g);mxEvent.addListener(c,"click",function(){null!=c.getAttribute("checked")?c.removeAttribute("checked"):c.setAttribute("checked","checked");d.setVisible(f,c.checked);null!=a&&a(f)})})(d.getChildAt(d.root,f));return b};
+Graph.prototype.replacePlaceholders=function(a,b,d,g){g=[];if(null!=b){for(var f=0;match=this.placeholderPattern.exec(b);){var m=match[0];if(2<m.length&&"%label%"!=m&&"%tooltip%"!=m){var p=null;if(match.index>f&&"%"==b.charAt(match.index-1))p=m.substring(1);else{var c=m.substring(1,m.length-1);if("id"==c)p=a.id;else if(0>c.indexOf("{"))for(var e=a;null==p&&null!=e;)null!=e.value&&"object"==typeof e.value&&(Graph.translateDiagram&&null!=Graph.diagramLanguage&&(p=e.getAttribute(c+"_"+Graph.diagramLanguage)),
+null==p&&(p=e.hasAttribute(c)?null!=e.getAttribute(c)?e.getAttribute(c):"":null)),e=this.model.getParent(e);null==p&&(p=this.getGlobalVariable(c));null==p&&null!=d&&(p=d[c])}g.push(b.substring(f,match.index)+(null!=p?p:m));f=match.index+m.length}}g.push(b.substring(f))}return g.join("")};Graph.prototype.restoreSelection=function(a){if(null!=a&&0<a.length){for(var b=[],d=0;d<a.length;d++){var g=this.model.getCell(a[d].id);null!=g&&b.push(g)}this.setSelectionCells(b)}else this.clearSelection()};
Graph.prototype.selectCellsForConnectVertex=function(a,b,d){2==a.length&&this.model.isVertex(a[1])?(this.setSelectionCell(a[1]),this.scrollCellToVisible(a[1]),null!=d&&(mxEvent.isTouchEvent(b)?d.update(d.getState(this.view.getState(a[1]))):d.reset())):this.setSelectionCells(a)};Graph.prototype.isCloneConnectSource=function(a){var b=null;null!=this.layoutManager&&(b=this.layoutManager.getLayout(this.model.getParent(a)));return this.isTableRow(a)||this.isTableCell(a)||null!=b&&b.constructor==mxStackLayout};
-Graph.prototype.connectVertex=function(a,b,d,k,f,m,p,c){m=m?m:!1;if(a.geometry.relative&&this.model.isEdge(a.parent))return[];for(;a.geometry.relative&&this.model.isVertex(a.parent);)a=a.parent;var e=this.isCloneConnectSource(a),g=e?a:this.getCompositeParent(a),n=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(g.geometry.x,g.geometry.y);b==mxConstants.DIRECTION_NORTH?(n.x+=g.geometry.width/2,n.y-=d):b==
-mxConstants.DIRECTION_SOUTH?(n.x+=g.geometry.width/2,n.y+=g.geometry.height+d):(n.x=b==mxConstants.DIRECTION_WEST?n.x-d:n.x+(g.geometry.width+d),n.y+=g.geometry.height/2);var l=this.view.getState(this.model.getParent(a));d=this.view.scale;var q=this.view.translate,g=q.x*d,q=q.y*d;null!=l&&this.model.isVertex(l.cell)&&(g=l.x,q=l.y);this.model.isVertex(a.parent)&&a.geometry.relative&&(n.x+=a.parent.geometry.x,n.y+=a.parent.geometry.y);m=m?null:(new mxRectangle(g+n.x*d,q+n.y*d)).grow(40*d);m=null!=m?
+Graph.prototype.connectVertex=function(a,b,d,g,f,m,p,c){m=m?m:!1;if(a.geometry.relative&&this.model.isEdge(a.parent))return[];for(;a.geometry.relative&&this.model.isVertex(a.parent);)a=a.parent;var e=this.isCloneConnectSource(a),k=e?a:this.getCompositeParent(a),n=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(k.geometry.x,k.geometry.y);b==mxConstants.DIRECTION_NORTH?(n.x+=k.geometry.width/2,n.y-=d):b==
+mxConstants.DIRECTION_SOUTH?(n.x+=k.geometry.width/2,n.y+=k.geometry.height+d):(n.x=b==mxConstants.DIRECTION_WEST?n.x-d:n.x+(k.geometry.width+d),n.y+=k.geometry.height/2);var l=this.view.getState(this.model.getParent(a));d=this.view.scale;var q=this.view.translate,k=q.x*d,q=q.y*d;null!=l&&this.model.isVertex(l.cell)&&(k=l.x,q=l.y);this.model.isVertex(a.parent)&&a.geometry.relative&&(n.x+=a.parent.geometry.x,n.y+=a.parent.geometry.y);m=m?null:(new mxRectangle(k+n.x*d,q+n.y*d)).grow(40*d);m=null!=m?
this.getCells(0,0,0,0,null,null,m,null,!0):null;var l=this.view.getState(a),u=null,t=null;if(null!=m){m=m.reverse();for(var A=0;A<m.length;A++)if(!this.isCellLocked(m[A])&&!this.model.isEdge(m[A])&&m[A]!=a)if(!this.model.isAncestor(a,m[A])&&this.isContainer(m[A])&&(null==u||m[A]==this.model.getParent(a)))u=m[A];else if(null==t&&this.isCellConnectable(m[A])&&!this.model.isAncestor(m[A],a)&&!this.isSwimlane(m[A])){var x=this.view.getState(m[A]);null==l||null==x||mxUtils.intersects(l,x)||(t=m[A])}}var G=
-!mxEvent.isShiftDown(k)||mxEvent.isControlDown(k)||f;G&&("1"!=urlParams.sketch||f)&&(b==mxConstants.DIRECTION_NORTH?n.y-=a.geometry.height/2:b==mxConstants.DIRECTION_SOUTH?n.y+=a.geometry.height/2:n.x=b==mxConstants.DIRECTION_WEST?n.x-a.geometry.width/2:n.x+a.geometry.width/2);var z=[],E=t,t=u;f=mxUtils.bind(this,function(d){if(null==p||null!=d||null==t&&e){this.model.beginUpdate();try{if(null==E&&G){var g=this.getAbsoluteParent(null!=d?d:a),g=e?a:this.getCompositeParent(g);E=null!=d?d:this.duplicateCells([g],
-!1)[0];null!=d&&this.addCells([E],this.model.getParent(a),null,null,null,!0);var f=this.getCellGeometry(E);null!=f&&(null!=d&&"1"==urlParams.sketch&&(b==mxConstants.DIRECTION_NORTH?n.y-=f.height/2:b==mxConstants.DIRECTION_SOUTH?n.y+=f.height/2:n.x=b==mxConstants.DIRECTION_WEST?n.x-f.width/2:n.x+f.width/2),f.x=n.x-f.width/2,f.y=n.y-f.height/2);null!=u?(this.addCells([E],u,null,null,null,!0),t=null):G&&!e&&this.addCells([E],this.getDefaultParent(),null,null,null,!0)}var l=mxEvent.isControlDown(k)&&
-mxEvent.isShiftDown(k)&&G||null==t&&e?null:this.insertEdge(this.model.getParent(a),null,"",a,E,this.createCurrentEdgeStyle());if(null!=l&&this.connectionHandler.insertBeforeSource){var q=null;for(d=a;null!=d.parent&&null!=d.geometry&&d.geometry.relative&&d.parent!=l.parent;)d=this.model.getParent(d);null!=d&&null!=d.parent&&d.parent==l.parent&&(q=d.parent.getIndex(d),this.model.add(d.parent,l,q))}null==t&&null!=E&&null!=a.parent&&e&&b==mxConstants.DIRECTION_WEST&&(q=a.parent.getIndex(a),this.model.add(a.parent,
-E,q));null!=l&&z.push(l);null==t&&null!=E&&z.push(E);null==E&&null!=l&&l.geometry.setTerminalPoint(n,!1);null!=l&&this.fireEvent(new mxEventObject("cellsInserted","cells",[l]))}finally{this.model.endUpdate()}}if(null!=c)c(z);else return z});if(null==p||null!=E||!G||null==t&&e)return f(E);p(g+n.x*d,q+n.y*d,f)};
-Graph.prototype.getIndexableText=function(){var a=document.createElement("div"),b=[],d,k;for(k in this.model.cells)if(d=this.model.cells[k],this.model.isVertex(d)||this.model.isEdge(d))this.isHtmlLabel(d)?(a.innerHTML=this.sanitizeHtml(this.getLabel(d)),d=mxUtils.extractTextWithWhitespace([a])):d=this.getLabel(d),d=mxUtils.trim(d.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")),0<d.length&&b.push(d);return b.join(" ")};
-Graph.prototype.convertValueToString=function(a){var b=this.model.getValue(a);if(null!=b&&"object"==typeof b){var d=null;if(this.isReplacePlaceholders(a)&&null!=a.getAttribute("placeholder"))for(var b=a.getAttribute("placeholder"),k=a;null==d&&null!=k;)null!=k.value&&"object"==typeof k.value&&(d=k.hasAttribute(b)?null!=k.getAttribute(b)?k.getAttribute(b):"":null),k=this.model.getParent(k);else d=null,Graph.translateDiagram&&null!=Graph.diagramLanguage&&(d=b.getAttribute("label_"+Graph.diagramLanguage)),
+!mxEvent.isShiftDown(g)||mxEvent.isControlDown(g)||f;G&&("1"!=urlParams.sketch||f)&&(b==mxConstants.DIRECTION_NORTH?n.y-=a.geometry.height/2:b==mxConstants.DIRECTION_SOUTH?n.y+=a.geometry.height/2:n.x=b==mxConstants.DIRECTION_WEST?n.x-a.geometry.width/2:n.x+a.geometry.width/2);var z=[],E=t,t=u;f=mxUtils.bind(this,function(d){if(null==p||null!=d||null==t&&e){this.model.beginUpdate();try{if(null==E&&G){var k=this.getAbsoluteParent(null!=d?d:a),k=e?a:this.getCompositeParent(k);E=null!=d?d:this.duplicateCells([k],
+!1)[0];null!=d&&this.addCells([E],this.model.getParent(a),null,null,null,!0);var f=this.getCellGeometry(E);null!=f&&(null!=d&&"1"==urlParams.sketch&&(b==mxConstants.DIRECTION_NORTH?n.y-=f.height/2:b==mxConstants.DIRECTION_SOUTH?n.y+=f.height/2:n.x=b==mxConstants.DIRECTION_WEST?n.x-f.width/2:n.x+f.width/2),f.x=n.x-f.width/2,f.y=n.y-f.height/2);null!=u?(this.addCells([E],u,null,null,null,!0),t=null):G&&!e&&this.addCells([E],this.getDefaultParent(),null,null,null,!0)}var l=mxEvent.isControlDown(g)&&
+mxEvent.isShiftDown(g)&&G||null==t&&e?null:this.insertEdge(this.model.getParent(a),null,"",a,E,this.createCurrentEdgeStyle());if(null!=l&&this.connectionHandler.insertBeforeSource){var q=null;for(d=a;null!=d.parent&&null!=d.geometry&&d.geometry.relative&&d.parent!=l.parent;)d=this.model.getParent(d);null!=d&&null!=d.parent&&d.parent==l.parent&&(q=d.parent.getIndex(d),this.model.add(d.parent,l,q))}null==t&&null!=E&&null!=a.parent&&e&&b==mxConstants.DIRECTION_WEST&&(q=a.parent.getIndex(a),this.model.add(a.parent,
+E,q));null!=l&&z.push(l);null==t&&null!=E&&z.push(E);null==E&&null!=l&&l.geometry.setTerminalPoint(n,!1);null!=l&&this.fireEvent(new mxEventObject("cellsInserted","cells",[l]))}finally{this.model.endUpdate()}}if(null!=c)c(z);else return z});if(null==p||null!=E||!G||null==t&&e)return f(E);p(k+n.x*d,q+n.y*d,f)};
+Graph.prototype.getIndexableText=function(){var a=document.createElement("div"),b=[],d,g;for(g in this.model.cells)if(d=this.model.cells[g],this.model.isVertex(d)||this.model.isEdge(d))this.isHtmlLabel(d)?(a.innerHTML=this.sanitizeHtml(this.getLabel(d)),d=mxUtils.extractTextWithWhitespace([a])):d=this.getLabel(d),d=mxUtils.trim(d.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")),0<d.length&&b.push(d);return b.join(" ")};
+Graph.prototype.convertValueToString=function(a){var b=this.model.getValue(a);if(null!=b&&"object"==typeof b){var d=null;if(this.isReplacePlaceholders(a)&&null!=a.getAttribute("placeholder"))for(var b=a.getAttribute("placeholder"),g=a;null==d&&null!=g;)null!=g.value&&"object"==typeof g.value&&(d=g.hasAttribute(b)?null!=g.getAttribute(b)?g.getAttribute(b):"":null),g=this.model.getParent(g);else d=null,Graph.translateDiagram&&null!=Graph.diagramLanguage&&(d=b.getAttribute("label_"+Graph.diagramLanguage)),
null==d&&(d=b.getAttribute("label")||"");return d||""}return mxGraph.prototype.convertValueToString.apply(this,arguments)};Graph.prototype.getLinksForState=function(a){return null!=a&&null!=a.text&&null!=a.text.node?a.text.node.getElementsByTagName("a"):null};Graph.prototype.getLinkForCell=function(a){return null!=a.value&&"object"==typeof a.value?(a=a.value.getAttribute("link"),null!=a&&"javascript:"===a.toLowerCase().substring(0,11)&&(a=a.substring(11)),a):null};
Graph.prototype.getLinkTargetForCell=function(a){return null!=a.value&&"object"==typeof a.value?a.value.getAttribute("linkTarget"):null};Graph.prototype.getCellStyle=function(a){var b=mxGraph.prototype.getCellStyle.apply(this,arguments);if(null!=a&&null!=this.layoutManager){var d=this.model.getParent(a);this.model.isVertex(d)&&this.isCellCollapsed(a)&&(d=this.layoutManager.getLayout(d),null!=d&&d.constructor==mxStackLayout&&(b[mxConstants.STYLE_HORIZONTAL]=!d.horizontal))}return b};
-Graph.prototype.updateAlternateBounds=function(a,b,d){if(null!=a&&null!=b&&null!=this.layoutManager&&null!=b.alternateBounds){var k=this.layoutManager.getLayout(this.model.getParent(a));null!=k&&k.constructor==mxStackLayout&&(k.horizontal?b.alternateBounds.height=0:b.alternateBounds.width=0)}mxGraph.prototype.updateAlternateBounds.apply(this,arguments)};Graph.prototype.isMoveCellsEvent=function(a,b){return mxEvent.isShiftDown(a)||"1"==mxUtils.getValue(b.style,"moveCells","0")};
-Graph.prototype.foldCells=function(a,b,d,k,f){b=null!=b?b:!1;null==d&&(d=this.getFoldableCells(this.getSelectionCells(),a));if(null!=d){this.model.beginUpdate();try{if(mxGraph.prototype.foldCells.apply(this,arguments),null!=this.layoutManager)for(var m=0;m<d.length;m++){var p=this.view.getState(d[m]),c=this.getCellGeometry(d[m]);if(null!=p&&null!=c){var e=Math.round(c.width-p.width/this.view.scale),g=Math.round(c.height-p.height/this.view.scale);if(0!=g||0!=e){var n=this.model.getParent(d[m]),l=this.layoutManager.getLayout(n);
-null==l?null!=f&&this.isMoveCellsEvent(f,p)&&this.moveSiblings(p,n,e,g):null!=f&&mxEvent.isAltDown(f)||l.constructor!=mxStackLayout||l.resizeLast||this.resizeParentStacks(n,l,e,g)}}}}finally{this.model.endUpdate()}this.isEnabled()&&this.setSelectionCells(d)}};
-Graph.prototype.moveSiblings=function(a,b,d,k){this.model.beginUpdate();try{var f=this.getCellsBeyond(a.x,a.y,b,!0,!0);for(b=0;b<f.length;b++)if(f[b]!=a.cell){var m=this.view.getState(f[b]),p=this.getCellGeometry(f[b]);null!=m&&null!=p&&(p=p.clone(),p.translate(Math.round(d*Math.max(0,Math.min(1,(m.x-a.x)/a.width))),Math.round(k*Math.max(0,Math.min(1,(m.y-a.y)/a.height)))),this.model.setGeometry(f[b],p))}}finally{this.model.endUpdate()}};
-Graph.prototype.resizeParentStacks=function(a,b,d,k){if(null!=this.layoutManager&&null!=b&&b.constructor==mxStackLayout&&!b.resizeLast){this.model.beginUpdate();try{for(var f=b.horizontal;null!=a&&null!=b&&b.constructor==mxStackLayout&&b.horizontal==f&&!b.resizeLast;){var m=this.getCellGeometry(a),p=this.view.getState(a);null!=p&&null!=m&&(m=m.clone(),b.horizontal?m.width+=d+Math.min(0,p.width/this.view.scale-m.width):m.height+=k+Math.min(0,p.height/this.view.scale-m.height),this.model.setGeometry(a,
+Graph.prototype.updateAlternateBounds=function(a,b,d){if(null!=a&&null!=b&&null!=this.layoutManager&&null!=b.alternateBounds){var g=this.layoutManager.getLayout(this.model.getParent(a));null!=g&&g.constructor==mxStackLayout&&(g.horizontal?b.alternateBounds.height=0:b.alternateBounds.width=0)}mxGraph.prototype.updateAlternateBounds.apply(this,arguments)};Graph.prototype.isMoveCellsEvent=function(a,b){return mxEvent.isShiftDown(a)||"1"==mxUtils.getValue(b.style,"moveCells","0")};
+Graph.prototype.foldCells=function(a,b,d,g,f){b=null!=b?b:!1;null==d&&(d=this.getFoldableCells(this.getSelectionCells(),a));if(null!=d){this.model.beginUpdate();try{if(mxGraph.prototype.foldCells.apply(this,arguments),null!=this.layoutManager)for(var m=0;m<d.length;m++){var p=this.view.getState(d[m]),c=this.getCellGeometry(d[m]);if(null!=p&&null!=c){var e=Math.round(c.width-p.width/this.view.scale),k=Math.round(c.height-p.height/this.view.scale);if(0!=k||0!=e){var n=this.model.getParent(d[m]),l=this.layoutManager.getLayout(n);
+null==l?null!=f&&this.isMoveCellsEvent(f,p)&&this.moveSiblings(p,n,e,k):null!=f&&mxEvent.isAltDown(f)||l.constructor!=mxStackLayout||l.resizeLast||this.resizeParentStacks(n,l,e,k)}}}}finally{this.model.endUpdate()}this.isEnabled()&&this.setSelectionCells(d)}};
+Graph.prototype.moveSiblings=function(a,b,d,g){this.model.beginUpdate();try{var f=this.getCellsBeyond(a.x,a.y,b,!0,!0);for(b=0;b<f.length;b++)if(f[b]!=a.cell){var m=this.view.getState(f[b]),p=this.getCellGeometry(f[b]);null!=m&&null!=p&&(p=p.clone(),p.translate(Math.round(d*Math.max(0,Math.min(1,(m.x-a.x)/a.width))),Math.round(g*Math.max(0,Math.min(1,(m.y-a.y)/a.height)))),this.model.setGeometry(f[b],p))}}finally{this.model.endUpdate()}};
+Graph.prototype.resizeParentStacks=function(a,b,d,g){if(null!=this.layoutManager&&null!=b&&b.constructor==mxStackLayout&&!b.resizeLast){this.model.beginUpdate();try{for(var f=b.horizontal;null!=a&&null!=b&&b.constructor==mxStackLayout&&b.horizontal==f&&!b.resizeLast;){var m=this.getCellGeometry(a),p=this.view.getState(a);null!=p&&null!=m&&(m=m.clone(),b.horizontal?m.width+=d+Math.min(0,p.width/this.view.scale-m.width):m.height+=g+Math.min(0,p.height/this.view.scale-m.height),this.model.setGeometry(a,
m));a=this.model.getParent(a);b=this.layoutManager.getLayout(a)}}finally{this.model.endUpdate()}}};Graph.prototype.isContainer=function(a){var b=this.getCurrentCellStyle(a);return this.isSwimlane(a)?"0"!=b.container:"1"==b.container};Graph.prototype.isCellConnectable=function(a){var b=this.getCurrentCellStyle(a);return null!=b.connectable?"0"!=b.connectable:mxGraph.prototype.isCellConnectable.apply(this,arguments)};
Graph.prototype.isLabelMovable=function(a){var b=this.getCurrentCellStyle(a);return null!=b.movableLabel?"0"!=b.movableLabel:mxGraph.prototype.isLabelMovable.apply(this,arguments)};Graph.prototype.selectAll=function(a){a=a||this.getDefaultParent();this.isCellLocked(a)||mxGraph.prototype.selectAll.apply(this,arguments)};Graph.prototype.selectCells=function(a,b,d){d=d||this.getDefaultParent();this.isCellLocked(d)||mxGraph.prototype.selectCells.apply(this,arguments)};
-Graph.prototype.getSwimlaneAt=function(a,b,d){var k=mxGraph.prototype.getSwimlaneAt.apply(this,arguments);this.isCellLocked(k)&&(k=null);return k};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,d){var g=mxGraph.prototype.getSwimlaneAt.apply(this,arguments);this.isCellLocked(g)&&(g=null);return g};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 d=this.container.clientWidth-b,k=this.container.clientHeight-b,f=Math.floor(20*Math.min(d/a.width,k/a.height))/20;this.zoomTo(f);if(mxUtils.hasScrollbars(this.container)){var m=this.view.translate;this.container.scrollTop=(a.y+m.y)*f-Math.max((k-a.height*f)/2+b/2,0);this.container.scrollLeft=(a.x+m.x)*f-Math.max((d-a.width*f)/2+b/2,0)}};
-Graph.prototype.getTooltipForCell=function(a){var b="";if(mxUtils.isNode(a.value)){var d=null;Graph.translateDiagram&&null!=Graph.diagramLanguage&&(d=a.value.getAttribute("tooltip_"+Graph.diagramLanguage));null==d&&(d=a.value.getAttribute("tooltip"));if(null!=d)null!=d&&this.isReplacePlaceholders(a)&&(d=this.replacePlaceholders(a,d)),b=this.sanitizeHtml(d);else{d=this.builtInProperties;a=a.value.attributes;var k=[];this.isEnabled()&&(d.push("linkTarget"),d.push("link"));for(var f=0;f<a.length;f++)0>
-mxUtils.indexOf(d,a[f].nodeName)&&0<a[f].nodeValue.length&&k.push({name:a[f].nodeName,value:a[f].nodeValue});k.sort(function(a,b){return a.name<b.name?-1:a.name>b.name?1:0});for(f=0;f<k.length;f++)"link"==k[f].name&&this.isCustomLink(k[f].value)||(b+=("link"!=k[f].name?"<b>"+k[f].name+":</b> ":"")+mxUtils.htmlEntities(k[f].value)+"\n");0<b.length&&(b=b.substring(0,b.length-1),mxClient.IS_SVG&&(b='<div style="max-width:360px;text-overflow:ellipsis;overflow:hidden;">'+b+"</div>"))}}return b};
+Graph.prototype.fitWindow=function(a,b){b=null!=b?b:10;var d=this.container.clientWidth-b,g=this.container.clientHeight-b,f=Math.floor(20*Math.min(d/a.width,g/a.height))/20;this.zoomTo(f);if(mxUtils.hasScrollbars(this.container)){var m=this.view.translate;this.container.scrollTop=(a.y+m.y)*f-Math.max((g-a.height*f)/2+b/2,0);this.container.scrollLeft=(a.x+m.x)*f-Math.max((d-a.width*f)/2+b/2,0)}};
+Graph.prototype.getTooltipForCell=function(a){var b="";if(mxUtils.isNode(a.value)){var d=null;Graph.translateDiagram&&null!=Graph.diagramLanguage&&(d=a.value.getAttribute("tooltip_"+Graph.diagramLanguage));null==d&&(d=a.value.getAttribute("tooltip"));if(null!=d)null!=d&&this.isReplacePlaceholders(a)&&(d=this.replacePlaceholders(a,d)),b=this.sanitizeHtml(d);else{d=this.builtInProperties;a=a.value.attributes;var g=[];this.isEnabled()&&(d.push("linkTarget"),d.push("link"));for(var f=0;f<a.length;f++)0>
+mxUtils.indexOf(d,a[f].nodeName)&&0<a[f].nodeValue.length&&g.push({name:a[f].nodeName,value:a[f].nodeValue});g.sort(function(a,b){return a.name<b.name?-1:a.name>b.name?1:0});for(f=0;f<g.length;f++)"link"==g[f].name&&this.isCustomLink(g[f].value)||(b+=("link"!=g[f].name?"<b>"+g[f].name+":</b> ":"")+mxUtils.htmlEntities(g[f].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){this.graph=a;this.init()};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;
@@ -2424,9 +2425,9 @@ 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"));this.arrowRight=this.createArrow(this.triangleRight,mxResources.get("plusTooltip"));this.arrowDown=this.createArrow(this.triangleDown,mxResources.get("plusTooltip"));this.arrowLeft=this.createArrow(this.triangleLeft,mxResources.get("plusTooltip"));this.elts=[this.arrowUp,this.arrowRight,this.arrowDown,this.arrowLeft];this.resetHandler=mxUtils.bind(this,function(){this.reset()});this.repaintHandler=
mxUtils.bind(this,function(){this.repaint()});this.graph.selectionModel.addListener(mxEvent.CHANGE,this.resetHandler);this.graph.model.addListener(mxEvent.CHANGE,this.repaintHandler);this.graph.view.addListener(mxEvent.SCALE_AND_TRANSLATE,this.repaintHandler);this.graph.view.addListener(mxEvent.TRANSLATE,this.repaintHandler);this.graph.view.addListener(mxEvent.SCALE,this.repaintHandler);this.graph.view.addListener(mxEvent.DOWN,this.repaintHandler);this.graph.view.addListener(mxEvent.UP,this.repaintHandler);
this.graph.addListener(mxEvent.ROOT,this.repaintHandler);this.graph.addListener(mxEvent.ESCAPE,this.resetHandler);mxEvent.addListener(this.graph.container,"scroll",this.resetHandler);this.graph.addListener(mxEvent.ESCAPE,mxUtils.bind(this,function(){this.mouseDownPoint=null}));mxEvent.addListener(this.graph.container,"mouseleave",mxUtils.bind(this,function(a){null!=a.relatedTarget&&mxEvent.getSource(a)==this.graph.container&&this.setDisplay("none")}));this.graph.addListener(mxEvent.START_EDITING,
-mxUtils.bind(this,function(a){this.reset()}));var a=this.graph.click;this.graph.click=mxUtils.bind(this,function(b){a.apply(this.graph,arguments);null==this.currentState||this.graph.isCellSelected(this.currentState.cell)||!mxEvent.isTouchEvent(b.getEvent())||this.graph.model.isVertex(b.getCell())||this.reset()});var b=!1;this.graph.addMouseListener({mouseDown:mxUtils.bind(this,function(a,k){b=!1;var d=k.getEvent();if(this.isResetEvent(d))this.reset();else if(!this.isActive()){var m=this.getState(k.getState());
-null==m&&mxEvent.isTouchEvent(d)||this.update(m)}this.setDisplay("none")}),mouseMove:mxUtils.bind(this,function(a,k){var d=k.getEvent();this.isResetEvent(d)?this.reset():this.graph.isMouseDown||mxEvent.isTouchEvent(d)||this.update(this.getState(k.getState()),k.getGraphX(),k.getGraphY());null!=this.graph.connectionHandler&&null!=this.graph.connectionHandler.shape&&(b=!0)}),mouseUp:mxUtils.bind(this,function(a,k){var d=k.getEvent();mxUtils.convertPoint(this.graph.container,mxEvent.getClientX(d),mxEvent.getClientY(d));
-this.isResetEvent(d)?this.reset():this.isActive()&&!b&&null!=this.mouseDownPoint?this.click(this.currentState,this.getDirection(),k):this.isActive()?1==this.graph.getSelectionCount()&&this.graph.model.isEdge(this.graph.getSelectionCell())?this.reset():this.update(this.getState(this.graph.view.getState(this.graph.getCellAt(k.getGraphX(),k.getGraphY())))):mxEvent.isTouchEvent(d)||null!=this.bbox&&mxUtils.contains(this.bbox,k.getGraphX(),k.getGraphY())?(this.setDisplay(""),this.repaint()):mxEvent.isTouchEvent(d)||
+mxUtils.bind(this,function(a){this.reset()}));var a=this.graph.click;this.graph.click=mxUtils.bind(this,function(b){a.apply(this.graph,arguments);null==this.currentState||this.graph.isCellSelected(this.currentState.cell)||!mxEvent.isTouchEvent(b.getEvent())||this.graph.model.isVertex(b.getCell())||this.reset()});var b=!1;this.graph.addMouseListener({mouseDown:mxUtils.bind(this,function(a,g){b=!1;var d=g.getEvent();if(this.isResetEvent(d))this.reset();else if(!this.isActive()){var m=this.getState(g.getState());
+null==m&&mxEvent.isTouchEvent(d)||this.update(m)}this.setDisplay("none")}),mouseMove:mxUtils.bind(this,function(a,g){var d=g.getEvent();this.isResetEvent(d)?this.reset():this.graph.isMouseDown||mxEvent.isTouchEvent(d)||this.update(this.getState(g.getState()),g.getGraphX(),g.getGraphY());null!=this.graph.connectionHandler&&null!=this.graph.connectionHandler.shape&&(b=!0)}),mouseUp:mxUtils.bind(this,function(a,g){var d=g.getEvent();mxUtils.convertPoint(this.graph.container,mxEvent.getClientX(d),mxEvent.getClientY(d));
+this.isResetEvent(d)?this.reset():this.isActive()&&!b&&null!=this.mouseDownPoint?this.click(this.currentState,this.getDirection(),g):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(g.getGraphX(),g.getGraphY())))):mxEvent.isTouchEvent(d)||null!=this.bbox&&mxUtils.contains(this.bbox,g.getGraphX(),g.getGraphY())?(this.setDisplay(""),this.repaint()):mxEvent.isTouchEvent(d)||
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){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(a){null==this.currentState||this.isResetEvent(a)||(this.mouseDownPoint=mxUtils.convertPoint(this.graph.container,mxEvent.getClientX(a),mxEvent.getClientY(a)),this.drag(a,this.mouseDownPoint.x,
this.mouseDownPoint.y),this.activeArrow=d,this.setDisplay("none"),mxEvent.consume(a))}));mxEvent.redirectMouseEvents(d,this.graph,this.currentState);mxEvent.addListener(d,"mouseenter",mxUtils.bind(this,function(a){mxEvent.isMouseEvent(a)&&(null!=this.activeArrow&&this.activeArrow!=d&&mxUtils.setOpacity(this.activeArrow,this.inactiveOpacity),this.graph.connectionHandler.constraintHandler.reset(),mxUtils.setOpacity(d,100),this.activeArrow=d)}));mxEvent.addListener(d,"mouseleave",mxUtils.bind(this,function(a){this.graph.isMouseDown||
@@ -2434,141 +2435,141 @@ this.resetActiveArrow()}));return d};HoverIcons.prototype.resetActiveArrow=funct
HoverIcons.prototype.visitNodes=function(a){for(var b=0;b<this.elts.length;b++)null!=this.elts[b]&&a(this.elts[b])};HoverIcons.prototype.removeNodes=function(){this.visitNodes(function(a){null!=a.parentNode&&a.parentNode.removeChild(a)})};HoverIcons.prototype.setDisplay=function(a){this.visitNodes(function(b){b.style.display=a})};HoverIcons.prototype.isActive=function(){return null!=this.activeArrow&&null!=this.currentState};
HoverIcons.prototype.drag=function(a,b,d){this.graph.popupMenuHandler.hideMenu();this.graph.stopEditing(!1);null!=this.currentState&&(this.graph.connectionHandler.start(this.currentState,b,d),this.graph.isMouseTrigger=mxEvent.isMouseEvent(a),this.graph.isMouseDown=!0,b=this.graph.selectionCellsHandler.getHandler(this.currentState.cell),null!=b&&b.setHandlesVisible(!1),b=this.graph.connectionHandler.edgeState,null!=a&&mxEvent.isShiftDown(a)&&mxEvent.isControlDown(a)&&null!=b&&"orthogonalEdgeStyle"===
mxUtils.getValue(b.style,mxConstants.STYLE_EDGE,null)&&(a=this.getDirection(),b.cell.style=mxUtils.setStyle(b.cell.style,"sourcePortConstraint",a),b.style.sourcePortConstraint=a))};HoverIcons.prototype.getStateAt=function(a,b,d){return this.graph.view.getState(this.graph.getCellAt(b,d))};
-HoverIcons.prototype.click=function(a,b,d){var k=d.getEvent(),f=d.getGraphX(),m=d.getGraphY(),f=this.getStateAt(a,f,m);null==f||!this.graph.model.isEdge(f.cell)||this.graph.isCloneEvent(k)||f.getVisibleTerminalState(!0)!=a&&f.getVisibleTerminalState(!1)!=a?null!=a&&this.execute(a,b,d):(this.graph.setSelectionCell(f.cell),this.reset());d.consume()};
+HoverIcons.prototype.click=function(a,b,d){var g=d.getEvent(),f=d.getGraphX(),m=d.getGraphY(),f=this.getStateAt(a,f,m);null==f||!this.graph.model.isEdge(f.cell)||this.graph.isCloneEvent(g)||f.getVisibleTerminalState(!0)!=a&&f.getVisibleTerminalState(!1)!=a?null!=a&&this.execute(a,b,d):(this.graph.setSelectionCell(f.cell),this.reset());d.consume()};
HoverIcons.prototype.execute=function(a,b,d){d=d.getEvent();this.graph.selectCellsForConnectVertex(this.graph.connectVertex(a.cell,b,this.graph.defaultEdgeLength,d,this.graph.isCloneEvent(d),this.graph.isCloneEvent(d)),d,this)};HoverIcons.prototype.reset=function(a){null!=a&&!a||null==this.updateThread||window.clearTimeout(this.updateThread);this.activeArrow=this.currentState=this.mouseDownPoint=null;this.removeNodes();this.bbox=null};
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 d=null;null!=b&&(a.x-=b.horizontalOffset/2,a.y-=b.verticalOffset/2,a.width+=b.horizontalOffset,a.height+=b.verticalOffset,null!=b.rotationShape&&null!=b.rotationShape.node&&"hidden"!=b.rotationShape.node.style.visibility&&"none"!=b.rotationShape.node.style.display&&null!=b.rotationShape.boundingBox&&
(d=b.rotationShape.boundingBox));b=mxUtils.bind(this,function(a,e,b){if(null!=d){var c=new mxRectangle(e,b,a.clientWidth,a.clientHeight);mxUtils.intersects(c,d)&&(a==this.arrowUp?b-=c.y+c.height-d.y:a==this.arrowRight?e+=d.x+d.width-c.x:a==this.arrowDown?b+=d.y+d.height-c.y:a==this.arrowLeft&&(e-=c.x+c.width-d.x))}a.style.left=e+"px";a.style.top=b+"px";mxUtils.setOpacity(a,this.inactiveOpacity)});b(this.arrowUp,Math.round(this.currentState.getCenterX()-this.triangleUp.width/2-this.tolerance),Math.round(a.y-
this.triangleUp.height-this.tolerance));b(this.arrowRight,Math.round(a.x+a.width-this.tolerance),Math.round(this.currentState.getCenterY()-this.triangleRight.height/2-this.tolerance));b(this.arrowDown,parseInt(this.arrowUp.style.left),Math.round(a.y+a.height-this.tolerance));b(this.arrowLeft,Math.round(a.x-this.triangleLeft.width-this.tolerance),parseInt(this.arrowRight.style.top));if(this.checkCollisions){var b=this.graph.getCellAt(a.x+a.width+this.triangleRight.width/2,this.currentState.getCenterY()),
-k=this.graph.getCellAt(a.x-this.triangleLeft.width/2,this.currentState.getCenterY()),f=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==k&&k==f&&f==a&&(a=f=k=b=null);var m=this.graph.getCellGeometry(this.currentState.cell),p=mxUtils.bind(this,function(a,e){var c=this.graph.model.isVertex(a)&&this.graph.getCellGeometry(a);null==a||this.graph.model.isAncestor(a,
-this.currentState.cell)||this.graph.isSwimlane(a)||!(null==c||null==m||c.height<3*m.height&&c.width<3*m.width)?e.style.visibility="visible":e.style.visibility="hidden"});p(b,this.arrowRight);p(k,this.arrowLeft);p(f,this.arrowUp);p(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")),
+g=this.graph.getCellAt(a.x-this.triangleLeft.width/2,this.currentState.getCenterY()),f=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==g&&g==f&&f==a&&(a=f=g=b=null);var m=this.graph.getCellGeometry(this.currentState.cell),p=mxUtils.bind(this,function(a,e){var c=this.graph.model.isVertex(a)&&this.graph.getCellGeometry(a);null==a||this.graph.model.isAncestor(a,
+this.currentState.cell)||this.graph.isSwimlane(a)||!(null==c||null==m||c.height<3*m.height&&c.width<3*m.width)?e.style.visibility="visible":e.style.visibility="hidden"});p(b,this.arrowRight);p(g,this.arrowLeft);p(f,this.arrowUp);p(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,d){if(!this.graph.connectionArrowsEnabled||null!=a&&"0"==mxUtils.getValue(a.style,"allowArrows","1"))this.reset();else{null!=a&&null!=a.cell.geometry&&a.cell.geometry.relative&&this.graph.model.isEdge(a.cell.parent)&&(a=null);var k=null;this.prev!=a||this.isActive()?(this.startTime=(new Date).getTime(),this.prev=a,k=0,null!=this.updateThread&&window.clearTimeout(this.updateThread),null!=a&&(this.updateThread=window.setTimeout(mxUtils.bind(this,function(){this.isActive()||
-this.graph.isMouseDown||this.graph.panningHandler.isActive()||(this.prev=a,this.update(a,b,d))}),this.updateDelay+10))):null!=this.startTime&&(k=(new Date).getTime()-this.startTime);this.setDisplay("");null!=this.currentState&&this.currentState!=a&&k<this.activationDelay&&null!=this.bbox&&!mxUtils.contains(this.bbox,b,d)?this.reset(!1):(null!=this.currentState||k>this.activationDelay)&&this.currentState!=a&&(k>this.updateDelay&&null!=a||null==this.bbox||null==b||null==d||!mxUtils.contains(this.bbox,
+HoverIcons.prototype.update=function(a,b,d){if(!this.graph.connectionArrowsEnabled||null!=a&&"0"==mxUtils.getValue(a.style,"allowArrows","1"))this.reset();else{null!=a&&null!=a.cell.geometry&&a.cell.geometry.relative&&this.graph.model.isEdge(a.cell.parent)&&(a=null);var g=null;this.prev!=a||this.isActive()?(this.startTime=(new Date).getTime(),this.prev=a,g=0,null!=this.updateThread&&window.clearTimeout(this.updateThread),null!=a&&(this.updateThread=window.setTimeout(mxUtils.bind(this,function(){this.isActive()||
+this.graph.isMouseDown||this.graph.panningHandler.isActive()||(this.prev=a,this.update(a,b,d))}),this.updateDelay+10))):null!=this.startTime&&(g=(new Date).getTime()-this.startTime);this.setDisplay("");null!=this.currentState&&this.currentState!=a&&g<this.activationDelay&&null!=this.bbox&&!mxUtils.contains(this.bbox,b,d)?this.reset(!1):(null!=this.currentState||g>this.activationDelay)&&this.currentState!=a&&(g>this.updateDelay&&null!=a||null==this.bbox||null==b||null==d||!mxUtils.contains(this.bbox,
b,d))&&(null!=a&&this.graph.isEnabled()?(this.removeNodes(),this.setCurrentState(a),this.repaint(),this.graph.connectionHandler.constraintHandler.currentFocus!=a&&this.graph.connectionHandler.constraintHandler.reset()):this.reset())}};
-HoverIcons.prototype.setCurrentState=function(a){"eastwest"!=a.style.portConstraint&&(this.graph.container.appendChild(this.arrowUp),this.graph.container.appendChild(this.arrowDown));this.graph.container.appendChild(this.arrowRight);this.graph.container.appendChild(this.arrowLeft);this.currentState=a};Graph.prototype.createParent=function(a,b,d,k,f){a=this.cloneCell(a);for(var m=0;m<d;m++){var p=this.cloneCell(b),c=this.getCellGeometry(p);null!=c&&(c.x+=m*k,c.y+=m*f);a.insert(p)}return a};
-Graph.prototype.createTable=function(a,b,d,k,f,m,p,c,e){d=null!=d?d:60;k=null!=k?k:40;m=null!=m?m:30;c=null!=c?c:"shape=partialRectangle;collapsible=0;dropTarget=0;pointerEvents=0;fillColor=none;top=0;left=0;bottom=0;right=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;";e=null!=e?e:"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!=f?f:"",0,0,b*d,
-a*k+(null!=f?m:0),null!=p?p:"shape=table;startSize="+(null!=f?m:"0")+";container=1;collapsible=0;childLayout=tableLayout;"),this.createParent(this.createVertex(null,null,"",0,0,b*d,k,c),this.createVertex(null,null,"",0,0,d,k,e),b,d,0),a,0,k)};Graph.prototype.setTableValues=function(a,b,d){for(var k=this.model.getChildCells(a,!0),f=0;f<k.length;f++)if(null!=d&&(k[f].value=d[f]),null!=b)for(var m=this.model.getChildCells(k[f],!0),p=0;p<m.length;p++)null!=b[f][p]&&(m[p].value=b[f][p]);return a};
-Graph.prototype.createCrossFunctionalSwimlane=function(a,b,d,k,f,m,p,c,e){d=null!=d?d:120;k=null!=k?k:120;var g=null==f?0:40;p=null!=p?p:"swimlane;horizontal=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;startSize="+g+";collapsible=0;recursiveResize=0;expand=0;pointerEvents=0;";c=null!=c?c:"swimlane;connectable=0;startSize=40;collapsible=0;recursiveResize=0;expand=0;pointerEvents=0;";e=null!=e?e:"swimlane;connectable=0;startSize="+(null==f?"40":"0")+";collapsible=0;recursiveResize=0;expand=0;pointerEvents=0;";
-f=this.createVertex(null,null,null!=f?f:"",0,0,b*d,a*k,null!=m?m:"shape=table;childLayout=tableLayout;rowLines=0;columnLines=0;startSize="+g+";"+(null==f?"fillColor=none;":"")+"collapsible=0;recursiveResize=0;expand=0;pointerEvents=0;");m=mxUtils.getValue(this.getCellStyle(f),mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE);f.geometry.width+=m;f.geometry.height+=m;p=this.createVertex(null,null,"",0,m,b*d+m,k,p);f.insert(this.createParent(p,this.createVertex(null,null,"",m,0,d,k,c),b,d,0));
-return 1<a?(p.geometry.y=k+m,this.createParent(f,this.createParent(p,this.createVertex(null,null,"",m,0,d,k,e),b,d,0),a-1,0,k)):f};Graph.prototype.isTableCell=function(a){return this.model.isVertex(a)&&this.isTableRow(this.model.getParent(a))};Graph.prototype.isTableRow=function(a){return this.model.isVertex(a)&&this.isTable(this.model.getParent(a))};Graph.prototype.isTable=function(a){a=this.getCellStyle(a);return null!=a&&"tableLayout"==a.childLayout};
-Graph.prototype.setTableRowHeight=function(a,b,d){d=null!=d?d:!0;var k=this.getModel();k.beginUpdate();try{var f=this.getCellGeometry(a);if(null!=f){f=f.clone();f.height+=b;k.setGeometry(a,f);var m=k.getParent(a),p=k.getChildCells(m,!0);if(!d){var c=mxUtils.indexOf(p,a);if(c<p.length-1){var e=p[c+1],g=this.getCellGeometry(e);null!=g&&(g=g.clone(),g.y+=b,g.height-=b,k.setGeometry(e,g))}}var n=this.getCellGeometry(m);null!=n&&(d||(d=a==p[p.length-1]),d&&(n=n.clone(),n.height+=b,k.setGeometry(m,n)));
-null!=this.layoutManager&&this.layoutManager.executeLayout(m,!0)}}finally{k.endUpdate()}};
-Graph.prototype.setTableColumnWidth=function(a,b,d){d=null!=d?d:!1;var k=this.getModel(),f=k.getParent(a),m=k.getParent(f),p=k.getChildCells(f,!0);a=mxUtils.indexOf(p,a);var c=a==p.length-1;k.beginUpdate();try{for(var e=k.getChildCells(m,!0),g=0;g<e.length;g++){var f=e[g],p=k.getChildCells(f,!0),n=p[a],l=this.getCellGeometry(n);null!=l&&(l=l.clone(),l.width+=b,k.setGeometry(n,l));a<p.length-1&&(n=p[a+1],l=this.getCellGeometry(n),null!=l&&(l=l.clone(),l.x+=b,d||(l.width-=b),k.setGeometry(n,l)))}if(c||
-d){var q=this.getCellGeometry(m);null!=q&&(q=q.clone(),q.width+=b,k.setGeometry(m,q))}null!=this.layoutManager&&this.layoutManager.executeLayout(m,!0)}finally{k.endUpdate()}};function TableLayout(a){mxGraphLayout.call(this,a)}TableLayout.prototype=new mxStackLayout;TableLayout.prototype.constructor=TableLayout;TableLayout.prototype.isHorizontal=function(){return!1};TableLayout.prototype.isVertexIgnored=function(a){return!this.graph.getModel().isVertex(a)||!this.graph.isCellVisible(a)};
-TableLayout.prototype.getSize=function(a,b){for(var d=0,k=0;k<a.length;k++)if(!this.isVertexIgnored(a[k])){var f=this.graph.getCellGeometry(a[k]);null!=f&&(d+=b?f.width:f.height)}return d};TableLayout.prototype.getRowLayout=function(a,b){for(var d=this.graph.model.getChildCells(a,!0),k=this.graph.getActualStartSize(a,!0),f=this.getSize(d,!0),m=b-k.x-k.width,p=[],k=k.x,c=0;c<d.length;c++){var e=this.graph.getCellGeometry(d[c]);null!=e&&(k+=e.width*m/f,p.push(Math.round(k)))}return p};
-TableLayout.prototype.layoutRow=function(a,b,d,k){var f=this.graph.getModel(),m=f.getChildCells(a,!0);a=this.graph.getActualStartSize(a,!0);var p=a.x,c=0;null!=b&&(b=b.slice(),b.splice(0,0,a.x));for(var e=0;e<m.length;e++){var g=this.graph.getCellGeometry(m[e]);null!=g&&(g=g.clone(),g.y=a.y,g.height=d-a.y-a.height,null!=b?(g.x=b[e],g.width=b[e+1]-g.x,e==m.length-1&&e<b.length-2&&(g.width=k-g.x-a.x-a.width)):(g.x=p,p+=g.width,e==m.length-1?g.width=k-a.x-a.width-c:c+=g.width),f.setGeometry(m[e],g))}return c};
-TableLayout.prototype.execute=function(a){if(null!=a){var b=this.graph.getActualStartSize(a,!0),d=this.graph.getCellGeometry(a),k=this.graph.getCellStyle(a),f="1"==mxUtils.getValue(k,"resizeLastRow","0"),m="1"==mxUtils.getValue(k,"resizeLast","0"),k="1"==mxUtils.getValue(k,"fixedRows","0"),p=this.graph.getModel(),c=0;p.beginUpdate();try{var e=d.height-b.y-b.height,g=d.width-b.x-b.width,n=p.getChildCells(a,!0),l=this.getSize(n,!1);if(0<e&&0<g&&0<n.length&&0<l){if(f){var q=this.graph.getCellGeometry(n[n.length-
-1]);null!=q&&(q=q.clone(),q.height=e-l+q.height,p.setGeometry(n[n.length-1],q))}for(var u=m?null:this.getRowLayout(n[0],g),t=b.y,A=0;A<n.length;A++)q=this.graph.getCellGeometry(n[A]),null!=q&&(q=q.clone(),q.x=b.x,q.width=g,q.y=Math.round(t),t=f||k?t+q.height:t+q.height/l*e,q.height=Math.round(t)-q.y,p.setGeometry(n[A],q)),c=Math.max(c,this.layoutRow(n[A],u,q.height,g));k&&e<l&&(d=d.clone(),d.height=t+b.height,p.setGeometry(a,d));m&&g<c+Graph.minTableColumnWidth&&(d=d.clone(),d.width=c+b.width+b.x+
+HoverIcons.prototype.setCurrentState=function(a){"eastwest"!=a.style.portConstraint&&(this.graph.container.appendChild(this.arrowUp),this.graph.container.appendChild(this.arrowDown));this.graph.container.appendChild(this.arrowRight);this.graph.container.appendChild(this.arrowLeft);this.currentState=a};Graph.prototype.createParent=function(a,b,d,g,f){a=this.cloneCell(a);for(var m=0;m<d;m++){var p=this.cloneCell(b),c=this.getCellGeometry(p);null!=c&&(c.x+=m*g,c.y+=m*f);a.insert(p)}return a};
+Graph.prototype.createTable=function(a,b,d,g,f,m,p,c,e){d=null!=d?d:60;g=null!=g?g:40;m=null!=m?m:30;c=null!=c?c:"shape=partialRectangle;collapsible=0;dropTarget=0;pointerEvents=0;fillColor=none;top=0;left=0;bottom=0;right=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;";e=null!=e?e:"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!=f?f:"",0,0,b*d,
+a*g+(null!=f?m:0),null!=p?p:"shape=table;startSize="+(null!=f?m:"0")+";container=1;collapsible=0;childLayout=tableLayout;"),this.createParent(this.createVertex(null,null,"",0,0,b*d,g,c),this.createVertex(null,null,"",0,0,d,g,e),b,d,0),a,0,g)};Graph.prototype.setTableValues=function(a,b,d){for(var g=this.model.getChildCells(a,!0),f=0;f<g.length;f++)if(null!=d&&(g[f].value=d[f]),null!=b)for(var m=this.model.getChildCells(g[f],!0),p=0;p<m.length;p++)null!=b[f][p]&&(m[p].value=b[f][p]);return a};
+Graph.prototype.createCrossFunctionalSwimlane=function(a,b,d,g,f,m,p,c,e){d=null!=d?d:120;g=null!=g?g:120;var k=null==f?0:40;p=null!=p?p:"swimlane;horizontal=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;startSize="+k+";collapsible=0;recursiveResize=0;expand=0;pointerEvents=0;";c=null!=c?c:"swimlane;connectable=0;startSize=40;collapsible=0;recursiveResize=0;expand=0;pointerEvents=0;";e=null!=e?e:"swimlane;connectable=0;startSize="+(null==f?"40":"0")+";collapsible=0;recursiveResize=0;expand=0;pointerEvents=0;";
+f=this.createVertex(null,null,null!=f?f:"",0,0,b*d,a*g,null!=m?m:"shape=table;childLayout=tableLayout;rowLines=0;columnLines=0;startSize="+k+";"+(null==f?"fillColor=none;":"")+"collapsible=0;recursiveResize=0;expand=0;pointerEvents=0;");m=mxUtils.getValue(this.getCellStyle(f),mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE);f.geometry.width+=m;f.geometry.height+=m;p=this.createVertex(null,null,"",0,m,b*d+m,g,p);f.insert(this.createParent(p,this.createVertex(null,null,"",m,0,d,g,c),b,d,0));
+return 1<a?(p.geometry.y=g+m,this.createParent(f,this.createParent(p,this.createVertex(null,null,"",m,0,d,g,e),b,d,0),a-1,0,g)):f};Graph.prototype.isTableCell=function(a){return this.model.isVertex(a)&&this.isTableRow(this.model.getParent(a))};Graph.prototype.isTableRow=function(a){return this.model.isVertex(a)&&this.isTable(this.model.getParent(a))};Graph.prototype.isTable=function(a){a=this.getCellStyle(a);return null!=a&&"tableLayout"==a.childLayout};
+Graph.prototype.setTableRowHeight=function(a,b,d){d=null!=d?d:!0;var g=this.getModel();g.beginUpdate();try{var f=this.getCellGeometry(a);if(null!=f){f=f.clone();f.height+=b;g.setGeometry(a,f);var m=g.getParent(a),p=g.getChildCells(m,!0);if(!d){var c=mxUtils.indexOf(p,a);if(c<p.length-1){var e=p[c+1],k=this.getCellGeometry(e);null!=k&&(k=k.clone(),k.y+=b,k.height-=b,g.setGeometry(e,k))}}var n=this.getCellGeometry(m);null!=n&&(d||(d=a==p[p.length-1]),d&&(n=n.clone(),n.height+=b,g.setGeometry(m,n)));
+null!=this.layoutManager&&this.layoutManager.executeLayout(m,!0)}}finally{g.endUpdate()}};
+Graph.prototype.setTableColumnWidth=function(a,b,d){d=null!=d?d:!1;var g=this.getModel(),f=g.getParent(a),m=g.getParent(f),p=g.getChildCells(f,!0);a=mxUtils.indexOf(p,a);var c=a==p.length-1;g.beginUpdate();try{for(var e=g.getChildCells(m,!0),k=0;k<e.length;k++){var f=e[k],p=g.getChildCells(f,!0),n=p[a],l=this.getCellGeometry(n);null!=l&&(l=l.clone(),l.width+=b,g.setGeometry(n,l));a<p.length-1&&(n=p[a+1],l=this.getCellGeometry(n),null!=l&&(l=l.clone(),l.x+=b,d||(l.width-=b),g.setGeometry(n,l)))}if(c||
+d){var q=this.getCellGeometry(m);null!=q&&(q=q.clone(),q.width+=b,g.setGeometry(m,q))}null!=this.layoutManager&&this.layoutManager.executeLayout(m,!0)}finally{g.endUpdate()}};function TableLayout(a){mxGraphLayout.call(this,a)}TableLayout.prototype=new mxStackLayout;TableLayout.prototype.constructor=TableLayout;TableLayout.prototype.isHorizontal=function(){return!1};TableLayout.prototype.isVertexIgnored=function(a){return!this.graph.getModel().isVertex(a)||!this.graph.isCellVisible(a)};
+TableLayout.prototype.getSize=function(a,b){for(var d=0,g=0;g<a.length;g++)if(!this.isVertexIgnored(a[g])){var f=this.graph.getCellGeometry(a[g]);null!=f&&(d+=b?f.width:f.height)}return d};TableLayout.prototype.getRowLayout=function(a,b){for(var d=this.graph.model.getChildCells(a,!0),g=this.graph.getActualStartSize(a,!0),f=this.getSize(d,!0),m=b-g.x-g.width,p=[],g=g.x,c=0;c<d.length;c++){var e=this.graph.getCellGeometry(d[c]);null!=e&&(g+=e.width*m/f,p.push(Math.round(g)))}return p};
+TableLayout.prototype.layoutRow=function(a,b,d,g){var f=this.graph.getModel(),m=f.getChildCells(a,!0);a=this.graph.getActualStartSize(a,!0);var p=a.x,c=0;null!=b&&(b=b.slice(),b.splice(0,0,a.x));for(var e=0;e<m.length;e++){var k=this.graph.getCellGeometry(m[e]);null!=k&&(k=k.clone(),k.y=a.y,k.height=d-a.y-a.height,null!=b?(k.x=b[e],k.width=b[e+1]-k.x,e==m.length-1&&e<b.length-2&&(k.width=g-k.x-a.x-a.width)):(k.x=p,p+=k.width,e==m.length-1?k.width=g-a.x-a.width-c:c+=k.width),f.setGeometry(m[e],k))}return c};
+TableLayout.prototype.execute=function(a){if(null!=a){var b=this.graph.getActualStartSize(a,!0),d=this.graph.getCellGeometry(a),g=this.graph.getCellStyle(a),f="1"==mxUtils.getValue(g,"resizeLastRow","0"),m="1"==mxUtils.getValue(g,"resizeLast","0"),g="1"==mxUtils.getValue(g,"fixedRows","0"),p=this.graph.getModel(),c=0;p.beginUpdate();try{var e=d.height-b.y-b.height,k=d.width-b.x-b.width,n=p.getChildCells(a,!0),l=this.getSize(n,!1);if(0<e&&0<k&&0<n.length&&0<l){if(f){var q=this.graph.getCellGeometry(n[n.length-
+1]);null!=q&&(q=q.clone(),q.height=e-l+q.height,p.setGeometry(n[n.length-1],q))}for(var u=m?null:this.getRowLayout(n[0],k),t=b.y,A=0;A<n.length;A++)q=this.graph.getCellGeometry(n[A]),null!=q&&(q=q.clone(),q.x=b.x,q.width=k,q.y=Math.round(t),t=f||g?t+q.height:t+q.height/l*e,q.height=Math.round(t)-q.y,p.setGeometry(n[A],q)),c=Math.max(c,this.layoutRow(n[A],u,q.height,k));g&&e<l&&(d=d.clone(),d.height=t+b.height,p.setGeometry(a,d));m&&k<c+Graph.minTableColumnWidth&&(d=d.clone(),d.width=c+b.width+b.x+
Graph.minTableColumnWidth,p.setGeometry(a,d))}}finally{p.endUpdate()}}};
(function(){var a=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){a.apply(this,arguments);this.validEdges=[]};var b=mxGraphView.prototype.validateCellState;mxGraphView.prototype.validateCellState=function(a,c){c=null!=c?c:!0;var e=this.getState(a);null!=e&&c&&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=b.apply(this,
arguments);null!=e&&c&&this.graph.model.isEdge(e.cell)&&null!=e.style&&1!=e.style[mxConstants.STYLE_CURVED]&&this.validEdges.push(e);return e};var d=mxShape.prototype.paint;mxShape.prototype.paint=function(){d.apply(this,arguments);if(null!=this.state&&null!=this.node&&this.state.view.graph.enableFlowAnimation&&this.state.view.graph.model.isEdge(this.state.cell)&&"1"==mxUtils.getValue(this.state.style,"flowAnimation","0")){var a=this.node.getElementsByTagName("path");if(1<a.length){"1"!=mxUtils.getValue(this.state.style,
-mxConstants.STYLE_DASHED,"0")&&a[1].setAttribute("stroke-dasharray",8*this.state.view.scale);var c=this.state.view.graph.getFlowAnimationStyle();null!=c&&a[1].setAttribute("class",c.getAttribute("id"))}}};var k=mxCellRenderer.prototype.isShapeInvalid;mxCellRenderer.prototype.isShapeInvalid=function(a,c){return k.apply(this,arguments)||null!=a.routedPoints&&null!=c.routedPoints&&!mxUtils.equalPoints(c.routedPoints,a.routedPoints)};var f=mxGraphView.prototype.updateCellState;mxGraphView.prototype.updateCellState=
-function(a){f.apply(this,arguments);this.graph.model.isEdge(a.cell)&&1!=a.style[mxConstants.STYLE_CURVED]&&this.updateLineJumps(a)};mxGraphView.prototype.updateLineJumps=function(a){var c=a.absolutePoints;if(Graph.lineJumpsEnabled){var e=null!=a.routedPoints,b=null;if(null!=c&&null!=this.validEdges&&"none"!==mxUtils.getValue(a.style,"jumpStyle","none")){for(var d=function(c,e,d){var g=new mxPoint(e,d);g.type=c;b.push(g);g=null!=a.routedPoints?a.routedPoints[b.length-1]:null;return null==g||g.type!=
-c||g.x!=e||g.y!=d},g=.5*this.scale,e=!1,b=[],f=0;f<c.length-1;f++){for(var k=c[f+1],n=c[f],m=[],p=c[f+2];f<c.length-2&&mxUtils.ptSegDistSq(n.x,n.y,p.x,p.y,k.x,k.y)<1*this.scale*this.scale;)k=p,f++,p=c[f+2];for(var e=d(0,n.x,n.y)||e,K=0;K<this.validEdges.length;K++){var F=this.validEdges[K],I=F.absolutePoints;if(null!=I&&mxUtils.intersects(a,F)&&"1"!=F.style.noJump)for(F=0;F<I.length-1;F++){for(var C=I[F+1],M=I[F],p=I[F+2];F<I.length-2&&mxUtils.ptSegDistSq(M.x,M.y,p.x,p.y,C.x,C.y)<1*this.scale*this.scale;)C=
-p,F++,p=I[F+2];p=mxUtils.intersection(n.x,n.y,k.x,k.y,M.x,M.y,C.x,C.y);if(null!=p&&(Math.abs(p.x-n.x)>g||Math.abs(p.y-n.y)>g)&&(Math.abs(p.x-k.x)>g||Math.abs(p.y-k.y)>g)&&(Math.abs(p.x-M.x)>g||Math.abs(p.y-M.y)>g)&&(Math.abs(p.x-C.x)>g||Math.abs(p.y-C.y)>g)){C=p.x-n.x;M=p.y-n.y;p={distSq:C*C+M*M,x:p.x,y:p.y};for(C=0;C<m.length;C++)if(m[C].distSq>p.distSq){m.splice(C,0,p);p=null;break}null==p||0!=m.length&&m[m.length-1].x===p.x&&m[m.length-1].y===p.y||m.push(p)}}}for(F=0;F<m.length;F++)e=d(1,m[F].x,
+mxConstants.STYLE_DASHED,"0")&&a[1].setAttribute("stroke-dasharray",8*this.state.view.scale);var c=this.state.view.graph.getFlowAnimationStyle();null!=c&&a[1].setAttribute("class",c.getAttribute("id"))}}};var g=mxCellRenderer.prototype.isShapeInvalid;mxCellRenderer.prototype.isShapeInvalid=function(a,c){return g.apply(this,arguments)||null!=a.routedPoints&&null!=c.routedPoints&&!mxUtils.equalPoints(c.routedPoints,a.routedPoints)};var f=mxGraphView.prototype.updateCellState;mxGraphView.prototype.updateCellState=
+function(a){f.apply(this,arguments);this.graph.model.isEdge(a.cell)&&1!=a.style[mxConstants.STYLE_CURVED]&&this.updateLineJumps(a)};mxGraphView.prototype.updateLineJumps=function(a){var c=a.absolutePoints;if(Graph.lineJumpsEnabled){var e=null!=a.routedPoints,b=null;if(null!=c&&null!=this.validEdges&&"none"!==mxUtils.getValue(a.style,"jumpStyle","none")){for(var d=function(c,e,d){var k=new mxPoint(e,d);k.type=c;b.push(k);k=null!=a.routedPoints?a.routedPoints[b.length-1]:null;return null==k||k.type!=
+c||k.x!=e||k.y!=d},k=.5*this.scale,e=!1,b=[],f=0;f<c.length-1;f++){for(var g=c[f+1],n=c[f],m=[],p=c[f+2];f<c.length-2&&mxUtils.ptSegDistSq(n.x,n.y,p.x,p.y,g.x,g.y)<1*this.scale*this.scale;)g=p,f++,p=c[f+2];for(var e=d(0,n.x,n.y)||e,K=0;K<this.validEdges.length;K++){var F=this.validEdges[K],I=F.absolutePoints;if(null!=I&&mxUtils.intersects(a,F)&&"1"!=F.style.noJump)for(F=0;F<I.length-1;F++){for(var D=I[F+1],M=I[F],p=I[F+2];F<I.length-2&&mxUtils.ptSegDistSq(M.x,M.y,p.x,p.y,D.x,D.y)<1*this.scale*this.scale;)D=
+p,F++,p=I[F+2];p=mxUtils.intersection(n.x,n.y,g.x,g.y,M.x,M.y,D.x,D.y);if(null!=p&&(Math.abs(p.x-n.x)>k||Math.abs(p.y-n.y)>k)&&(Math.abs(p.x-g.x)>k||Math.abs(p.y-g.y)>k)&&(Math.abs(p.x-M.x)>k||Math.abs(p.y-M.y)>k)&&(Math.abs(p.x-D.x)>k||Math.abs(p.y-D.y)>k)){D=p.x-n.x;M=p.y-n.y;p={distSq:D*D+M*M,x:p.x,y:p.y};for(D=0;D<m.length;D++)if(m[D].distSq>p.distSq){m.splice(D,0,p);p=null;break}null==p||0!=m.length&&m[m.length-1].x===p.x&&m[m.length-1].y===p.y||m.push(p)}}}for(F=0;F<m.length;F++)e=d(1,m[F].x,
m[F].y)||e}p=c[c.length-1];e=d(0,p.x,p.y)||e}a.routedPoints=b;return e}return!1};var m=mxConnector.prototype.paintLine;mxConnector.prototype.paintLine=function(a,c,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)m.apply(this,arguments);else{var b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2,d=(parseInt(mxUtils.getValue(this.style,
-"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,g=mxUtils.getValue(this.style,"jumpStyle","none"),f=!0,k=null,n=null,l=[],q=null;a.begin();for(var p=0;p<this.state.routedPoints.length;p++){var F=this.state.routedPoints[p],I=new mxPoint(F.x/this.scale,F.y/this.scale);0==p?I=c[0]:p==this.state.routedPoints.length-1&&(I=c[c.length-1]);var C=!1;if(null!=k&&1==F.type){var M=this.state.routedPoints[p+1],F=M.x/this.scale-I.x,M=M.y/this.scale-I.y,F=F*F+M*M;null==q&&(q=new mxPoint(I.x-k.x,I.y-k.y),
-n=Math.sqrt(q.x*q.x+q.y*q.y),0<n?(q.x=q.x*d/n,q.y=q.y*d/n):q=null);F>d*d&&0<n&&(F=k.x-I.x,M=k.y-I.y,F=F*F+M*M,F>d*d&&(C=new mxPoint(I.x-q.x,I.y-q.y),F=new mxPoint(I.x+q.x,I.y+q.y),l.push(C),this.addPoints(a,l,e,b,!1,null,f),l=0>Math.round(q.x)||0==Math.round(q.x)&&0>=Math.round(q.y)?1:-1,f=!1,"sharp"==g?(a.lineTo(C.x-q.y*l,C.y+q.x*l),a.lineTo(F.x-q.y*l,F.y+q.x*l),a.lineTo(F.x,F.y)):"line"==g?(a.moveTo(C.x+q.y*l,C.y-q.x*l),a.lineTo(C.x-q.y*l,C.y+q.x*l),a.moveTo(F.x-q.y*l,F.y+q.x*l),a.lineTo(F.x+q.y*
-l,F.y-q.x*l),a.moveTo(F.x,F.y)):"arc"==g?(l*=1.3,a.curveTo(C.x-q.y*l,C.y+q.x*l,F.x-q.y*l,F.y+q.x*l,F.x,F.y)):(a.moveTo(F.x,F.y),f=!0),l=[F],C=!0))}else q=null;C||(l.push(I),k=I)}this.addPoints(a,l,e,b,!1,null,f);a.stroke()}};var p=mxGraphView.prototype.getFixedTerminalPoint;mxGraphView.prototype.getFixedTerminalPoint=function(a,c,e,b){return null!=c&&"centerPerimeter"==c.style[mxConstants.STYLE_PERIMETER]?new mxPoint(c.getCenterX(),c.getCenterY()):p.apply(this,arguments)};var c=mxGraphView.prototype.updateFloatingTerminalPoint;
-mxGraphView.prototype.updateFloatingTerminalPoint=function(a,e,b,d){if(null==e||null==a||"1"!=e.style.snapToPoint&&"1"!=a.style.snapToPoint)c.apply(this,arguments);else{e=this.getTerminalPort(a,e,d);var g=this.getNextPoint(a,b,d),f=this.graph.isOrthogonal(a),k=mxUtils.toRadians(Number(e.style[mxConstants.STYLE_ROTATION]||"0")),n=new mxPoint(e.getCenterX(),e.getCenterY());if(0!=k)var l=Math.cos(-k),q=Math.sin(-k),g=mxUtils.getRotatedPoint(g,l,q,n);l=parseFloat(a.style[mxConstants.STYLE_PERIMETER_SPACING]||
-0);l+=parseFloat(a.style[d?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||0);g=this.getPerimeterPoint(e,g,0==k&&f,l);0!=k&&(l=Math.cos(k),q=Math.sin(k),g=mxUtils.getRotatedPoint(g,l,q,n));a.setAbsoluteTerminalPoint(this.snapToAnchorPoint(a,e,b,d,g),d)}};mxGraphView.prototype.snapToAnchorPoint=function(a,c,e,b,d){if(null!=c&&null!=a){a=this.graph.getAllConnectionConstraints(c);b=e=null;if(null!=a)for(var g=0;g<a.length;g++){var f=this.graph.getConnectionPoint(c,
-a[g]);if(null!=f){var k=(f.x-d.x)*(f.x-d.x)+(f.y-d.y)*(f.y-d.y);if(null==b||k<b)e=f,b=k}}null!=e&&(d=e)}return d};var e=mxStencil.prototype.evaluateTextAttribute;mxStencil.prototype.evaluateTextAttribute=function(a,c,b){var d=e.apply(this,arguments);"1"==a.getAttribute("placeholders")&&null!=b.state&&(d=b.state.view.graph.replacePlaceholders(b.state.cell,d));return d};var g=mxCellRenderer.prototype.createShape;mxCellRenderer.prototype.createShape=function(a){if(null!=a.style&&"undefined"!==typeof pako){var c=
-mxUtils.getValue(a.style,mxConstants.STYLE_SHAPE,null);if(null!=c&&"string"===typeof c&&"stencil("==c.substring(0,8))try{var e=c.substring(8,c.length-1),b=mxUtils.parseXml(Graph.decompress(e));return new mxShape(new mxStencil(b.documentElement))}catch(t){null!=window.console&&console.log("Error in shape: "+t)}}return g.apply(this,arguments)}})();mxStencilRegistry.libraries={};mxStencilRegistry.dynamicLoading=!0;mxStencilRegistry.allowEval=!0;mxStencilRegistry.packages=[];
+"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,k=mxUtils.getValue(this.style,"jumpStyle","none"),f=!0,g=null,n=null,l=[],q=null;a.begin();for(var p=0;p<this.state.routedPoints.length;p++){var F=this.state.routedPoints[p],I=new mxPoint(F.x/this.scale,F.y/this.scale);0==p?I=c[0]:p==this.state.routedPoints.length-1&&(I=c[c.length-1]);var D=!1;if(null!=g&&1==F.type){var M=this.state.routedPoints[p+1],F=M.x/this.scale-I.x,M=M.y/this.scale-I.y,F=F*F+M*M;null==q&&(q=new mxPoint(I.x-g.x,I.y-g.y),
+n=Math.sqrt(q.x*q.x+q.y*q.y),0<n?(q.x=q.x*d/n,q.y=q.y*d/n):q=null);F>d*d&&0<n&&(F=g.x-I.x,M=g.y-I.y,F=F*F+M*M,F>d*d&&(D=new mxPoint(I.x-q.x,I.y-q.y),F=new mxPoint(I.x+q.x,I.y+q.y),l.push(D),this.addPoints(a,l,e,b,!1,null,f),l=0>Math.round(q.x)||0==Math.round(q.x)&&0>=Math.round(q.y)?1:-1,f=!1,"sharp"==k?(a.lineTo(D.x-q.y*l,D.y+q.x*l),a.lineTo(F.x-q.y*l,F.y+q.x*l),a.lineTo(F.x,F.y)):"line"==k?(a.moveTo(D.x+q.y*l,D.y-q.x*l),a.lineTo(D.x-q.y*l,D.y+q.x*l),a.moveTo(F.x-q.y*l,F.y+q.x*l),a.lineTo(F.x+q.y*
+l,F.y-q.x*l),a.moveTo(F.x,F.y)):"arc"==k?(l*=1.3,a.curveTo(D.x-q.y*l,D.y+q.x*l,F.x-q.y*l,F.y+q.x*l,F.x,F.y)):(a.moveTo(F.x,F.y),f=!0),l=[F],D=!0))}else q=null;D||(l.push(I),g=I)}this.addPoints(a,l,e,b,!1,null,f);a.stroke()}};var p=mxGraphView.prototype.getFixedTerminalPoint;mxGraphView.prototype.getFixedTerminalPoint=function(a,c,e,b){return null!=c&&"centerPerimeter"==c.style[mxConstants.STYLE_PERIMETER]?new mxPoint(c.getCenterX(),c.getCenterY()):p.apply(this,arguments)};var c=mxGraphView.prototype.updateFloatingTerminalPoint;
+mxGraphView.prototype.updateFloatingTerminalPoint=function(a,e,b,d){if(null==e||null==a||"1"!=e.style.snapToPoint&&"1"!=a.style.snapToPoint)c.apply(this,arguments);else{e=this.getTerminalPort(a,e,d);var k=this.getNextPoint(a,b,d),f=this.graph.isOrthogonal(a),g=mxUtils.toRadians(Number(e.style[mxConstants.STYLE_ROTATION]||"0")),n=new mxPoint(e.getCenterX(),e.getCenterY());if(0!=g)var l=Math.cos(-g),q=Math.sin(-g),k=mxUtils.getRotatedPoint(k,l,q,n);l=parseFloat(a.style[mxConstants.STYLE_PERIMETER_SPACING]||
+0);l+=parseFloat(a.style[d?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||0);k=this.getPerimeterPoint(e,k,0==g&&f,l);0!=g&&(l=Math.cos(g),q=Math.sin(g),k=mxUtils.getRotatedPoint(k,l,q,n));a.setAbsoluteTerminalPoint(this.snapToAnchorPoint(a,e,b,d,k),d)}};mxGraphView.prototype.snapToAnchorPoint=function(a,c,e,b,d){if(null!=c&&null!=a){a=this.graph.getAllConnectionConstraints(c);b=e=null;if(null!=a)for(var k=0;k<a.length;k++){var f=this.graph.getConnectionPoint(c,
+a[k]);if(null!=f){var g=(f.x-d.x)*(f.x-d.x)+(f.y-d.y)*(f.y-d.y);if(null==b||g<b)e=f,b=g}}null!=e&&(d=e)}return d};var e=mxStencil.prototype.evaluateTextAttribute;mxStencil.prototype.evaluateTextAttribute=function(a,c,b){var d=e.apply(this,arguments);"1"==a.getAttribute("placeholders")&&null!=b.state&&(d=b.state.view.graph.replacePlaceholders(b.state.cell,d));return d};var k=mxCellRenderer.prototype.createShape;mxCellRenderer.prototype.createShape=function(a){if(null!=a.style&&"undefined"!==typeof pako){var c=
+mxUtils.getValue(a.style,mxConstants.STYLE_SHAPE,null);if(null!=c&&"string"===typeof c&&"stencil("==c.substring(0,8))try{var e=c.substring(8,c.length-1),b=mxUtils.parseXml(Graph.decompress(e));return new mxShape(new mxStencil(b.documentElement))}catch(t){null!=window.console&&console.log("Error in shape: "+t)}}return k.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 d=mxStencilRegistry.getBasenameForStencil(a);if(null!=d){b=mxStencilRegistry.libraries[d];if(null!=b){if(null==mxStencilRegistry.packages[d]){for(var k=0;k<b.length;k++){var f=b[k];if(!mxStencilRegistry.filesLoaded[f])if(mxStencilRegistry.filesLoaded[f]=!0,".xml"==f.toLowerCase().substring(f.length-4,f.length))mxStencilRegistry.loadStencilSet(f,
+mxStencilRegistry.getStencil=function(a){var b=mxStencilRegistry.stencils[a];if(null==b&&null==mxCellRenderer.defaultShapes[a]&&mxStencilRegistry.dynamicLoading){var d=mxStencilRegistry.getBasenameForStencil(a);if(null!=d){b=mxStencilRegistry.libraries[d];if(null!=b){if(null==mxStencilRegistry.packages[d]){for(var g=0;g<b.length;g++){var f=b[g];if(!mxStencilRegistry.filesLoaded[f])if(mxStencilRegistry.filesLoaded[f]=!0,".xml"==f.toLowerCase().substring(f.length-4,f.length))mxStencilRegistry.loadStencilSet(f,
null);else if(".js"==f.toLowerCase().substring(f.length-3,f.length))try{if(mxStencilRegistry.allowEval){var m=mxUtils.load(f);null!=m&&200<=m.getStatus()&&299>=m.getStatus()&&eval.call(window,m.getText())}}catch(p){null!=window.console&&console.log("error in getStencil:",a,d,b,f,p)}}mxStencilRegistry.packages[d]=1}}else d=d.replace("_-_","_"),mxStencilRegistry.loadStencilSet(STENCIL_PATH+"/"+d+".xml",null);b=mxStencilRegistry.stencils[a]}}return b};
mxStencilRegistry.getBasenameForStencil=function(a){var b=null;if(null!=a&&"string"===typeof a&&(a=a.split("."),0<a.length&&"mxgraph"==a[0]))for(var b=a[1],d=2;d<a.length-1;d++)b+="/"+a[d];return b};
-mxStencilRegistry.loadStencilSet=function(a,b,d,k){var f=mxStencilRegistry.packages[a];if(null!=d&&d||null==f){var m=!1;if(null==f)try{if(k){mxStencilRegistry.loadStencil(a,mxUtils.bind(this,function(d){null!=d&&null!=d.documentElement&&(mxStencilRegistry.packages[a]=d,m=!0,mxStencilRegistry.parseStencilSet(d.documentElement,b,m))}));return}f=mxStencilRegistry.loadStencil(a);mxStencilRegistry.packages[a]=f;m=!0}catch(p){null!=window.console&&console.log("error in loadStencilSet:",a,p)}null!=f&&null!=
+mxStencilRegistry.loadStencilSet=function(a,b,d,g){var f=mxStencilRegistry.packages[a];if(null!=d&&d||null==f){var m=!1;if(null==f)try{if(g){mxStencilRegistry.loadStencil(a,mxUtils.bind(this,function(d){null!=d&&null!=d.documentElement&&(mxStencilRegistry.packages[a]=d,m=!0,mxStencilRegistry.parseStencilSet(d.documentElement,b,m))}));return}f=mxStencilRegistry.loadStencil(a);mxStencilRegistry.packages[a]=f;m=!0}catch(p){null!=window.console&&console.log("error in loadStencilSet:",a,p)}null!=f&&null!=
f.documentElement&&mxStencilRegistry.parseStencilSet(f.documentElement,b,m)}};mxStencilRegistry.loadStencil=function(a,b){if(null!=b)mxUtils.get(a,mxUtils.bind(this,function(a){b(200<=a.getStatus()&&299>=a.getStatus()?a.getXml():null)}));else return mxUtils.load(a).getXml()};mxStencilRegistry.parseStencilSets=function(a){for(var b=0;b<a.length;b++)mxStencilRegistry.parseStencilSet(mxUtils.parseXml(a[b]).documentElement)};
-mxStencilRegistry.parseStencilSet=function(a,b,d){if("stencils"==a.nodeName)for(var k=a.firstChild;null!=k;)"shapes"==k.nodeName&&mxStencilRegistry.parseStencilSet(k,b,d),k=k.nextSibling;else{d=null!=d?d:!0;var k=a.firstChild,f="";a=a.getAttribute("name");for(null!=a&&(f=a+".");null!=k;){if(k.nodeType==mxConstants.NODETYPE_ELEMENT&&(a=k.getAttribute("name"),null!=a)){var f=f.toLowerCase(),m=a.replace(/ /g,"_");d&&mxStencilRegistry.addStencil(f+m.toLowerCase(),new mxStencil(k));if(null!=b){var p=k.getAttribute("w"),
-c=k.getAttribute("h"),p=null==p?80:parseInt(p,10),c=null==c?80:parseInt(c,10);b(f,m,a,p,c)}}k=k.nextSibling}}};
+mxStencilRegistry.parseStencilSet=function(a,b,d){if("stencils"==a.nodeName)for(var g=a.firstChild;null!=g;)"shapes"==g.nodeName&&mxStencilRegistry.parseStencilSet(g,b,d),g=g.nextSibling;else{d=null!=d?d:!0;var g=a.firstChild,f="";a=a.getAttribute("name");for(null!=a&&(f=a+".");null!=g;){if(g.nodeType==mxConstants.NODETYPE_ELEMENT&&(a=g.getAttribute("name"),null!=a)){var f=f.toLowerCase(),m=a.replace(/ /g,"_");d&&mxStencilRegistry.addStencil(f+m.toLowerCase(),new mxStencil(g));if(null!=b){var p=g.getAttribute("w"),
+c=g.getAttribute("h"),p=null==p?80:parseInt(p,10),c=null==c?80:parseInt(c,10);b(f,m,a,p,c)}}g=g.nextSibling}}};
"undefined"!=typeof mxVertexHandler&&function(){function a(){var a=document.createElement("div");a.className="geHint";a.style.whiteSpace="nowrap";a.style.position="absolute";return a}function b(a,c){switch(c){case mxConstants.POINTS:return a;case mxConstants.MILLIMETERS:return(a/mxConstants.PIXELS_PER_MM).toFixed(1);case mxConstants.INCHES:return(a/mxConstants.PIXELS_PER_INCH).toFixed(2)}}mxConstants.HANDLE_FILLCOLOR="#29b6f2";mxConstants.HANDLE_STROKECOLOR="#0088cf";mxConstants.VERTEX_SELECTION_COLOR=
"#00a8ff";mxConstants.OUTLINE_COLOR="#00a8ff";mxConstants.OUTLINE_HANDLE_FILLCOLOR="#99ccff";mxConstants.OUTLINE_HANDLE_STROKECOLOR="#00a8ff";mxConstants.CONNECT_HANDLE_FILLCOLOR="#cee7ff";mxConstants.EDGE_SELECTION_COLOR="#00a8ff";mxConstants.DEFAULT_VALID_COLOR="#00a8ff";mxConstants.LABEL_HANDLE_FILLCOLOR="#cee7ff";mxConstants.GUIDE_COLOR="#0088cf";mxConstants.HIGHLIGHT_OPACITY=30;mxConstants.HIGHLIGHT_SIZE=5;mxEdgeHandler.prototype.snapToTerminals=!0;mxGraphHandler.prototype.guidesEnabled=!0;mxGraphHandler.prototype.removeEmptyParents=
-!0;mxRubberband.prototype.fadeOut=!0;mxGuide.prototype.isEnabledForEvent=function(a){return!mxEvent.isAltDown(a)};var d=mxGraphLayout.prototype.isVertexIgnored;mxGraphLayout.prototype.isVertexIgnored=function(a){return d.apply(this,arguments)||this.graph.isTableRow(a)||this.graph.isTableCell(a)};var k=mxGraphLayout.prototype.isEdgeIgnored;mxGraphLayout.prototype.isEdgeIgnored=function(a){return k.apply(this,arguments)||this.graph.isEdgeIgnored(a)};var f=mxConnectionHandler.prototype.isCreateTarget;
+!0;mxRubberband.prototype.fadeOut=!0;mxGuide.prototype.isEnabledForEvent=function(a){return!mxEvent.isAltDown(a)};var d=mxGraphLayout.prototype.isVertexIgnored;mxGraphLayout.prototype.isVertexIgnored=function(a){return d.apply(this,arguments)||this.graph.isTableRow(a)||this.graph.isTableCell(a)};var g=mxGraphLayout.prototype.isEdgeIgnored;mxGraphLayout.prototype.isEdgeIgnored=function(a){return g.apply(this,arguments)||this.graph.isEdgeIgnored(a)};var f=mxConnectionHandler.prototype.isCreateTarget;
mxConnectionHandler.prototype.isCreateTarget=function(a){return this.graph.isCloneEvent(a)||f.apply(this,arguments)};mxConstraintHandler.prototype.createHighlightShape=function(){var a=new mxEllipse(null,this.highlightColor,this.highlightColor,0);a.opacity=mxConstants.HIGHLIGHT_OPACITY;return a};mxConnectionHandler.prototype.livePreview=!0;mxConnectionHandler.prototype.cursor="crosshair";mxConnectionHandler.prototype.createEdgeState=function(a){a=this.graph.createCurrentEdgeStyle();a=this.graph.createEdge(null,
null,null,null,null,a);a=new mxCellState(this.graph.view,a,this.graph.getCellStyle(a));for(var c in this.graph.currentEdgeStyle)a.style[c]=this.graph.currentEdgeStyle[c];return a};var m=mxConnectionHandler.prototype.createShape;mxConnectionHandler.prototype.createShape=function(){var a=m.apply(this,arguments);a.isDashed="1"==this.graph.currentEdgeStyle[mxConstants.STYLE_DASHED];return a};mxConnectionHandler.prototype.updatePreview=function(a){};var p=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=
function(){var a=p.apply(this,arguments),c=a.getCell;a.getCell=mxUtils.bind(this,function(a){var e=c.apply(this,arguments);this.error=null;return e});return a};Graph.prototype.defaultVertexStyle={};Graph.prototype.defaultEdgeStyle={edgeStyle:"orthogonalEdgeStyle",rounded:"0",jettySize:"auto",orthogonalLoop:"1"};Graph.prototype.createCurrentEdgeStyle=function(){for(var a="edgeStyle="+(this.currentEdgeStyle.edgeStyle||"none")+";",c="shape curved rounded comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification comicStyle jumpStyle jumpSize".split(" "),
e=0;e<c.length;e++)null!=this.currentEdgeStyle[c[e]]&&(a+=c[e]+"="+this.currentEdgeStyle[c[e]]+";");null!=this.currentEdgeStyle.orthogonalLoop?a+="orthogonalLoop="+this.currentEdgeStyle.orthogonalLoop+";":null!=Graph.prototype.defaultEdgeStyle.orthogonalLoop&&(a+="orthogonalLoop="+Graph.prototype.defaultEdgeStyle.orthogonalLoop+";");null!=this.currentEdgeStyle.jettySize?a+="jettySize="+this.currentEdgeStyle.jettySize+";":null!=Graph.prototype.defaultEdgeStyle.jettySize&&(a+="jettySize="+Graph.prototype.defaultEdgeStyle.jettySize+
";");"elbowEdgeStyle"==this.currentEdgeStyle.edgeStyle&&null!=this.currentEdgeStyle.elbow&&(a+="elbow="+this.currentEdgeStyle.elbow+";");return a=null!=this.currentEdgeStyle.html?a+("html="+this.currentEdgeStyle.html+";"):a+"html=1;"};Graph.prototype.updateCellStyles=function(a,c,e){this.model.beginUpdate();try{for(var b=0;b<e.length;b++)if(this.model.isVertex(e[b])||this.model.isEdge(e[b])){this.setCellStyles(a,null,[e[b]]);var d=this.getCellStyle(e[b])[a];c!=(null==d?mxConstants.NONE:d)&&this.setCellStyles(a,
c,[e[b]])}}finally{this.model.endUpdate()}};Graph.prototype.getPagePadding=function(){return new mxPoint(0,0)};Graph.prototype.loadStylesheet=function(){var a=null!=this.themes?this.themes[this.defaultThemeName]:mxStyleRegistry.dynamicLoading?mxUtils.load(STYLE_PATH+"/default.xml").getDocumentElement():null;null!=a&&(new mxCodec(a.ownerDocument)).decode(a,this.getStylesheet())};Graph.prototype.createCellLookup=function(a,c){c=null!=c?c:{};for(var e=0;e<a.length;e++){var b=a[e];c[mxObjectIdentity.get(b)]=
-b.getId();for(var d=this.model.getChildCount(b),g=0;g<d;g++)this.createCellLookup([this.model.getChildAt(b,g)],c)}return c};Graph.prototype.createCellMapping=function(a,c,e){e=null!=e?e:{};for(var b in a){var d=c[b];null==e[d]&&(e[d]=a[b].getId()||"")}return e};Graph.prototype.importGraphModel=function(a,c,e,b){c=null!=c?c:0;e=null!=e?e:0;var d=new mxCodec(a.ownerDocument),g=new mxGraphModel;d.decode(a,g);a=[];var d={},f={},k=g.getChildren(this.cloneCell(g.root,this.isCloneInvalidEdges(),d));if(null!=
-k){var n=this.createCellLookup([g.root]),k=k.slice();this.model.beginUpdate();try{if(1!=k.length||this.isCellLocked(this.getDefaultParent()))for(g=0;g<k.length;g++)l=this.model.getChildren(this.moveCells([k[g]],c,e,!1,this.model.getRoot())[0]),null!=l&&(a=a.concat(l));else{var l=g.getChildren(k[0]);null!=l&&(a=this.moveCells(l,c,e,!1,this.getDefaultParent()),f[g.getChildAt(g.root,0).getId()]=this.getDefaultParent().getId())}if(null!=a&&(this.createCellMapping(d,n,f),this.updateCustomLinks(f,a),b)){this.isGridEnabled()&&
-(c=this.snap(c),e=this.snap(e));var v=this.getBoundingBoxFromGeometry(a,!0);null!=v&&this.moveCells(a,c-v.x,e-v.y)}}finally{this.model.endUpdate()}}return a};Graph.prototype.encodeCells=function(a){for(var c={},e=this.cloneCells(a,null,c),b=new mxDictionary,d=0;d<a.length;d++)b.put(a[d],!0);for(var g=new mxCodec,f=new mxGraphModel,k=f.getChildAt(f.getRoot(),0),d=0;d<e.length;d++){f.add(k,e[d]);var l=this.view.getState(a[d]);if(null!=l){var n=this.getCellGeometry(e[d]);null!=n&&n.relative&&!this.model.isEdge(a[d])&&
-null==b.get(this.model.getParent(a[d]))&&(n.offset=null,n.relative=!1,n.x=l.x/l.view.scale-l.view.translate.x,n.y=l.y/l.view.scale-l.view.translate.y)}}this.updateCustomLinks(this.createCellMapping(c,this.createCellLookup(a)),e);return g.encode(f)};Graph.prototype.isSwimlane=function(a,c){if(null!=a&&this.model.getParent(a)!=this.model.getRoot()&&!this.model.isEdge(a)){var e=this.getCurrentCellStyle(a,c)[mxConstants.STYLE_SHAPE];return e==mxConstants.SHAPE_SWIMLANE||"table"==e}return!1};var c=Graph.prototype.isExtendParent;
-Graph.prototype.isExtendParent=function(a){var e=this.model.getParent(a);if(null!=e){var b=this.getCurrentCellStyle(e);if(null!=b.expand)return"0"!=b.expand}return c.apply(this,arguments)&&(null==e||!this.isTable(e))};var e=Graph.prototype.splitEdge;Graph.prototype.splitEdge=function(a,c,b,d,g,f,k,l){null==l&&(l=this.model.getParent(a),this.isTable(l)||this.isTableRow(l))&&(l=this.getCellAt(f,k,null,!0,!1));b=null;this.model.beginUpdate();try{b=e.apply(this,[a,c,b,d,g,f,k,l]);this.model.setValue(b,
-"");var n=this.getChildCells(b,!0);for(c=0;c<n.length;c++){var v=this.getCellGeometry(n[c]);null!=v&&v.relative&&0<v.x&&this.model.remove(n[c])}var q=this.getChildCells(a,!0);for(c=0;c<q.length;c++)v=this.getCellGeometry(q[c]),null!=v&&v.relative&&0>=v.x&&this.model.remove(q[c]);this.setCellStyles(mxConstants.STYLE_TARGET_PERIMETER_SPACING,null,[b]);this.setCellStyles(mxConstants.STYLE_ENDARROW,mxConstants.NONE,[b]);this.setCellStyles(mxConstants.STYLE_SOURCE_PERIMETER_SPACING,null,[a]);this.setCellStyles(mxConstants.STYLE_STARTARROW,
-mxConstants.NONE,[a]);var Y=this.model.getTerminal(b,!1);if(null!=Y){var t=this.getCurrentCellStyle(Y);null!=t&&"1"==t.snapToPoint&&(this.setCellStyles(mxConstants.STYLE_EXIT_X,null,[a]),this.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[a]),this.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[b]),this.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[b]))}}finally{this.model.endUpdate()}return b};var g=Graph.prototype.selectCell;Graph.prototype.selectCell=function(a,c,e){if(c||e)g.apply(this,arguments);
-else{var b=this.getSelectionCell(),d=null,f=[],k=mxUtils.bind(this,function(c){if(null!=this.view.getState(c)&&(this.model.isVertex(c)||this.model.isEdge(c)))if(f.push(c),c==b)d=f.length-1;else if(a&&null==b&&0<f.length||null!=d&&a&&f.length>d||!a&&0<d)return;for(var e=0;e<this.model.getChildCount(c);e++)k(this.model.getChildAt(c,e))});k(this.model.root);0<f.length&&(d=null!=d?mxUtils.mod(d+(a?1:-1),f.length):0,this.setSelectionCell(f[d]))}};var n=Graph.prototype.moveCells;Graph.prototype.moveCells=
-function(a,c,e,b,d,g,f){f=null!=f?f:{};if(this.isTable(d)){for(var k=[],l=0;l<a.length;l++)this.isTable(a[l])?k=k.concat(this.model.getChildCells(a[l],!0).reverse()):k.push(a[l]);a=k}this.model.beginUpdate();try{k=[];for(l=0;l<a.length;l++)if(null!=d&&this.isTableRow(a[l])){var v=this.model.getParent(a[l]),q=this.getCellGeometry(a[l]);this.isTable(v)&&k.push(v);if(null!=v&&null!=q&&this.isTable(v)&&this.isTable(d)&&(b||v!=d)){if(!b){var Y=this.getCellGeometry(v);null!=Y&&(Y=Y.clone(),Y.height-=q.height,
-this.model.setGeometry(v,Y))}Y=this.getCellGeometry(d);null!=Y&&(Y=Y.clone(),Y.height+=q.height,this.model.setGeometry(d,Y));var t=this.model.getChildCells(d,!0);if(0<t.length){a[l]=b?this.cloneCell(a[l]):a[l];var u=this.model.getChildCells(a[l],!0),m=this.model.getChildCells(t[0],!0),D=m.length-u.length;if(0<D)for(var B=0;B<D;B++){var x=this.cloneCell(u[u.length-1]);null!=x&&(x.value="",this.model.add(a[l],x))}else if(0>D)for(B=0;B>D;B--)this.model.remove(u[u.length+B-1]);u=this.model.getChildCells(a[l],
-!0);for(B=0;B<m.length;B++){var qa=this.getCellGeometry(m[B]),p=this.getCellGeometry(u[B]);null!=qa&&null!=p&&(p=p.clone(),p.width=qa.width,this.model.setGeometry(u[B],p))}}}}for(var va=n.apply(this,arguments),l=0;l<k.length;l++)!b&&this.model.contains(k[l])&&0==this.model.getChildCount(k[l])&&this.model.remove(k[l]);b&&this.updateCustomLinks(this.createCellMapping(f,this.createCellLookup(a)),va)}finally{this.model.endUpdate()}return va};var l=Graph.prototype.removeCells;Graph.prototype.removeCells=
-function(a,c){var e=[];this.model.beginUpdate();try{for(var b=0;b<a.length;b++)if(this.isTableCell(a[b])){var d=this.model.getParent(a[b]),g=this.model.getParent(d);1==this.model.getChildCount(d)&&1==this.model.getChildCount(g)?0>mxUtils.indexOf(a,g)&&0>mxUtils.indexOf(e,g)&&e.push(g):this.labelChanged(a[b],"")}else{if(this.isTableRow(a[b])&&(g=this.model.getParent(a[b]),0>mxUtils.indexOf(a,g)&&0>mxUtils.indexOf(e,g))){for(var f=this.model.getChildCells(g,!0),k=0,n=0;n<f.length;n++)0<=mxUtils.indexOf(a,
-f[n])&&k++;k==f.length&&e.push(g)}e.push(a[b])}e=l.apply(this,[e,c])}finally{this.model.endUpdate()}return e};Graph.prototype.updateCustomLinks=function(a,c,e){e=null!=e?e:new Graph;for(var b=0;b<c.length;b++)null!=c[b]&&e.updateCustomLinksForCell(a,c[b],e)};Graph.prototype.updateCustomLinksForCell=function(a,c){this.doUpdateCustomLinksForCell(a,c);for(var e=this.model.getChildCount(c),b=0;b<e;b++)this.updateCustomLinksForCell(a,this.model.getChildAt(c,b))};Graph.prototype.doUpdateCustomLinksForCell=
-function(a,c){};Graph.prototype.getAllConnectionConstraints=function(a,c){if(null!=a){var e=mxUtils.getValue(a.style,"points",null);if(null!=e){var b=[];try{for(var d=JSON.parse(e),e=0;e<d.length;e++){var g=d[e];b.push(new mxConnectionConstraint(new mxPoint(g[0],g[1]),2<g.length?"0"!=g[2]:!0,null,3<g.length?g[3]:0,4<g.length?g[4]:0))}}catch(za){}return b}if(null!=a.shape&&null!=a.shape.bounds){g=a.shape.direction;d=a.shape.bounds;e=a.shape.scale;b=d.width/e;d=d.height/e;if(g==mxConstants.DIRECTION_NORTH||
-g==mxConstants.DIRECTION_SOUTH)g=b,b=d,d=g;e=a.shape.getConstraints(a.style,b,d);if(null!=e)return e;if(null!=a.shape.stencil&&null!=a.shape.stencil.constraints)return a.shape.stencil.constraints;if(null!=a.shape.constraints)return a.shape.constraints}}return null};Graph.prototype.flipEdge=function(a){if(null!=a){var c=this.getCurrentCellStyle(a),c=mxUtils.getValue(c,mxConstants.STYLE_ELBOW,mxConstants.ELBOW_HORIZONTAL)==mxConstants.ELBOW_HORIZONTAL?mxConstants.ELBOW_VERTICAL:mxConstants.ELBOW_HORIZONTAL;
-this.setCellStyles(mxConstants.STYLE_ELBOW,c,[a])}};Graph.prototype.isValidRoot=function(a){for(var c=this.model.getChildCount(a),e=0,b=0;b<c;b++){var d=this.model.getChildAt(a,b);this.model.isVertex(d)&&(d=this.getCellGeometry(d),null==d||d.relative||e++)}return 0<e||this.isContainer(a)};Graph.prototype.isValidDropTarget=function(a,c,e){for(var b=this.getCurrentCellStyle(a),d=!0,g=!0,f=0;f<c.length&&g;f++)d=d&&this.isTable(c[f]),g=g&&this.isTableRow(c[f]);return("1"!=mxUtils.getValue(b,"part","0")||
-this.isContainer(a))&&"0"!=mxUtils.getValue(b,"dropTarget","1")&&(mxGraph.prototype.isValidDropTarget.apply(this,arguments)||this.isContainer(a))&&!this.isTableRow(a)&&(!this.isTable(a)||g||d)};Graph.prototype.createGroupCell=function(){var a=mxGraph.prototype.createGroupCell.apply(this,arguments);a.setStyle("group");return a};Graph.prototype.isExtendParentsOnAdd=function(a){var c=mxGraph.prototype.isExtendParentsOnAdd.apply(this,arguments);if(c&&null!=a&&null!=this.layoutManager){var e=this.model.getParent(a);
-null!=e&&(e=this.layoutManager.getLayout(e),null!=e&&e.constructor==mxStackLayout&&(c=!1))}return c};Graph.prototype.getPreferredSizeForCell=function(a){var c=mxGraph.prototype.getPreferredSizeForCell.apply(this,arguments);null!=c&&(c.width+=10,c.height+=4,this.gridEnabled&&(c.width=this.snap(c.width),c.height=this.snap(c.height)));return c};Graph.prototype.turnShapes=function(a,c){var e=this.getModel(),b=[];e.beginUpdate();try{for(var d=0;d<a.length;d++){var g=a[d];if(e.isEdge(g)){var f=e.getTerminal(g,
-!0),k=e.getTerminal(g,!1);e.setTerminal(g,k,!0);e.setTerminal(g,f,!1);var l=e.getGeometry(g);if(null!=l){l=l.clone();null!=l.points&&l.points.reverse();var n=l.getTerminalPoint(!0),v=l.getTerminalPoint(!1);l.setTerminalPoint(n,!1);l.setTerminalPoint(v,!0);e.setGeometry(g,l);var q=this.view.getState(g),t=this.view.getState(f),Y=this.view.getState(k);if(null!=q){var u=null!=t?this.getConnectionConstraint(q,t,!0):null,m=null!=Y?this.getConnectionConstraint(q,Y,!1):null;this.setConnectionConstraint(g,
-f,!0,m);this.setConnectionConstraint(g,k,!1,u);var D=mxUtils.getValue(q.style,mxConstants.STYLE_SOURCE_PERIMETER_SPACING);this.setCellStyles(mxConstants.STYLE_SOURCE_PERIMETER_SPACING,mxUtils.getValue(q.style,mxConstants.STYLE_TARGET_PERIMETER_SPACING),[g]);this.setCellStyles(mxConstants.STYLE_TARGET_PERIMETER_SPACING,D,[g])}b.push(g)}}else if(e.isVertex(g)&&(l=this.getCellGeometry(g),null!=l)){if(!(this.isTable(g)||this.isTableRow(g)||this.isTableCell(g)||this.isSwimlane(g))){l=l.clone();l.x+=l.width/
-2-l.height/2;l.y+=l.height/2-l.width/2;var B=l.width;l.width=l.height;l.height=B;e.setGeometry(g,l)}var x=this.view.getState(g);if(null!=x){var p=[mxConstants.DIRECTION_EAST,mxConstants.DIRECTION_SOUTH,mxConstants.DIRECTION_WEST,mxConstants.DIRECTION_NORTH],z=mxUtils.getValue(x.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST);this.setCellStyles(mxConstants.STYLE_DIRECTION,p[mxUtils.mod(mxUtils.indexOf(p,z)+(c?-1:1),p.length)],[g])}b.push(g)}}}finally{e.endUpdate()}return b};Graph.prototype.stencilHasPlaceholders=
+b.getId();for(var d=this.model.getChildCount(b),k=0;k<d;k++)this.createCellLookup([this.model.getChildAt(b,k)],c)}return c};Graph.prototype.createCellMapping=function(a,c,e){e=null!=e?e:{};for(var b in a){var d=c[b];null==e[d]&&(e[d]=a[b].getId()||"")}return e};Graph.prototype.importGraphModel=function(a,c,e,b){c=null!=c?c:0;e=null!=e?e:0;var d=new mxCodec(a.ownerDocument),k=new mxGraphModel;d.decode(a,k);a=[];var d={},f={},g=k.getChildren(this.cloneCell(k.root,this.isCloneInvalidEdges(),d));if(null!=
+g){var l=this.createCellLookup([k.root]),g=g.slice();this.model.beginUpdate();try{if(1!=g.length||this.isCellLocked(this.getDefaultParent()))for(k=0;k<g.length;k++)n=this.model.getChildren(this.moveCells([g[k]],c,e,!1,this.model.getRoot())[0]),null!=n&&(a=a.concat(n));else{var n=k.getChildren(g[0]);null!=n&&(a=this.moveCells(n,c,e,!1,this.getDefaultParent()),f[k.getChildAt(k.root,0).getId()]=this.getDefaultParent().getId())}if(null!=a&&(this.createCellMapping(d,l,f),this.updateCustomLinks(f,a),b)){this.isGridEnabled()&&
+(c=this.snap(c),e=this.snap(e));var v=this.getBoundingBoxFromGeometry(a,!0);null!=v&&this.moveCells(a,c-v.x,e-v.y)}}finally{this.model.endUpdate()}}return a};Graph.prototype.encodeCells=function(a){for(var c={},e=this.cloneCells(a,null,c),b=new mxDictionary,d=0;d<a.length;d++)b.put(a[d],!0);for(var k=new mxCodec,f=new mxGraphModel,g=f.getChildAt(f.getRoot(),0),d=0;d<e.length;d++){f.add(g,e[d]);var n=this.view.getState(a[d]);if(null!=n){var l=this.getCellGeometry(e[d]);null!=l&&l.relative&&!this.model.isEdge(a[d])&&
+null==b.get(this.model.getParent(a[d]))&&(l.offset=null,l.relative=!1,l.x=n.x/n.view.scale-n.view.translate.x,l.y=n.y/n.view.scale-n.view.translate.y)}}this.updateCustomLinks(this.createCellMapping(c,this.createCellLookup(a)),e);return k.encode(f)};Graph.prototype.isSwimlane=function(a,c){if(null!=a&&this.model.getParent(a)!=this.model.getRoot()&&!this.model.isEdge(a)){var e=this.getCurrentCellStyle(a,c)[mxConstants.STYLE_SHAPE];return e==mxConstants.SHAPE_SWIMLANE||"table"==e}return!1};var c=Graph.prototype.isExtendParent;
+Graph.prototype.isExtendParent=function(a){var e=this.model.getParent(a);if(null!=e){var b=this.getCurrentCellStyle(e);if(null!=b.expand)return"0"!=b.expand}return c.apply(this,arguments)&&(null==e||!this.isTable(e))};var e=Graph.prototype.splitEdge;Graph.prototype.splitEdge=function(a,c,b,d,k,f,g,n){null==n&&(n=this.model.getParent(a),this.isTable(n)||this.isTableRow(n))&&(n=this.getCellAt(f,g,null,!0,!1));b=null;this.model.beginUpdate();try{b=e.apply(this,[a,c,b,d,k,f,g,n]);this.model.setValue(b,
+"");var l=this.getChildCells(b,!0);for(c=0;c<l.length;c++){var v=this.getCellGeometry(l[c]);null!=v&&v.relative&&0<v.x&&this.model.remove(l[c])}var q=this.getChildCells(a,!0);for(c=0;c<q.length;c++)v=this.getCellGeometry(q[c]),null!=v&&v.relative&&0>=v.x&&this.model.remove(q[c]);this.setCellStyles(mxConstants.STYLE_TARGET_PERIMETER_SPACING,null,[b]);this.setCellStyles(mxConstants.STYLE_ENDARROW,mxConstants.NONE,[b]);this.setCellStyles(mxConstants.STYLE_SOURCE_PERIMETER_SPACING,null,[a]);this.setCellStyles(mxConstants.STYLE_STARTARROW,
+mxConstants.NONE,[a]);var ea=this.model.getTerminal(b,!1);if(null!=ea){var t=this.getCurrentCellStyle(ea);null!=t&&"1"==t.snapToPoint&&(this.setCellStyles(mxConstants.STYLE_EXIT_X,null,[a]),this.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[a]),this.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[b]),this.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[b]))}}finally{this.model.endUpdate()}return b};var k=Graph.prototype.selectCell;Graph.prototype.selectCell=function(a,c,e){if(c||e)k.apply(this,arguments);
+else{var b=this.getSelectionCell(),d=null,f=[],g=mxUtils.bind(this,function(c){if(null!=this.view.getState(c)&&(this.model.isVertex(c)||this.model.isEdge(c)))if(f.push(c),c==b)d=f.length-1;else if(a&&null==b&&0<f.length||null!=d&&a&&f.length>d||!a&&0<d)return;for(var e=0;e<this.model.getChildCount(c);e++)g(this.model.getChildAt(c,e))});g(this.model.root);0<f.length&&(d=null!=d?mxUtils.mod(d+(a?1:-1),f.length):0,this.setSelectionCell(f[d]))}};var n=Graph.prototype.moveCells;Graph.prototype.moveCells=
+function(a,c,e,b,d,k,f){f=null!=f?f:{};if(this.isTable(d)){for(var g=[],l=0;l<a.length;l++)this.isTable(a[l])?g=g.concat(this.model.getChildCells(a[l],!0).reverse()):g.push(a[l]);a=g}this.model.beginUpdate();try{g=[];for(l=0;l<a.length;l++)if(null!=d&&this.isTableRow(a[l])){var v=this.model.getParent(a[l]),q=this.getCellGeometry(a[l]);this.isTable(v)&&g.push(v);if(null!=v&&null!=q&&this.isTable(v)&&this.isTable(d)&&(b||v!=d)){if(!b){var t=this.getCellGeometry(v);null!=t&&(t=t.clone(),t.height-=q.height,
+this.model.setGeometry(v,t))}t=this.getCellGeometry(d);null!=t&&(t=t.clone(),t.height+=q.height,this.model.setGeometry(d,t));var ea=this.model.getChildCells(d,!0);if(0<ea.length){a[l]=b?this.cloneCell(a[l]):a[l];var u=this.model.getChildCells(a[l],!0),m=this.model.getChildCells(ea[0],!0),C=m.length-u.length;if(0<C)for(var B=0;B<C;B++){var x=this.cloneCell(u[u.length-1]);null!=x&&(x.value="",this.model.add(a[l],x))}else if(0>C)for(B=0;B>C;B--)this.model.remove(u[u.length+B-1]);u=this.model.getChildCells(a[l],
+!0);for(B=0;B<m.length;B++){var qa=this.getCellGeometry(m[B]),p=this.getCellGeometry(u[B]);null!=qa&&null!=p&&(p=p.clone(),p.width=qa.width,this.model.setGeometry(u[B],p))}}}}for(var z=n.apply(this,arguments),l=0;l<g.length;l++)!b&&this.model.contains(g[l])&&0==this.model.getChildCount(g[l])&&this.model.remove(g[l]);b&&this.updateCustomLinks(this.createCellMapping(f,this.createCellLookup(a)),z)}finally{this.model.endUpdate()}return z};var l=Graph.prototype.removeCells;Graph.prototype.removeCells=
+function(a,c){var e=[];this.model.beginUpdate();try{for(var b=0;b<a.length;b++)if(this.isTableCell(a[b])){var d=this.model.getParent(a[b]),k=this.model.getParent(d);1==this.model.getChildCount(d)&&1==this.model.getChildCount(k)?0>mxUtils.indexOf(a,k)&&0>mxUtils.indexOf(e,k)&&e.push(k):this.labelChanged(a[b],"")}else{if(this.isTableRow(a[b])&&(k=this.model.getParent(a[b]),0>mxUtils.indexOf(a,k)&&0>mxUtils.indexOf(e,k))){for(var f=this.model.getChildCells(k,!0),g=0,n=0;n<f.length;n++)0<=mxUtils.indexOf(a,
+f[n])&&g++;g==f.length&&e.push(k)}e.push(a[b])}e=l.apply(this,[e,c])}finally{this.model.endUpdate()}return e};Graph.prototype.updateCustomLinks=function(a,c,e){e=null!=e?e:new Graph;for(var b=0;b<c.length;b++)null!=c[b]&&e.updateCustomLinksForCell(a,c[b],e)};Graph.prototype.updateCustomLinksForCell=function(a,c){this.doUpdateCustomLinksForCell(a,c);for(var e=this.model.getChildCount(c),b=0;b<e;b++)this.updateCustomLinksForCell(a,this.model.getChildAt(c,b))};Graph.prototype.doUpdateCustomLinksForCell=
+function(a,c){};Graph.prototype.getAllConnectionConstraints=function(a,c){if(null!=a){var e=mxUtils.getValue(a.style,"points",null);if(null!=e){var b=[];try{for(var d=JSON.parse(e),e=0;e<d.length;e++){var k=d[e];b.push(new mxConnectionConstraint(new mxPoint(k[0],k[1]),2<k.length?"0"!=k[2]:!0,null,3<k.length?k[3]:0,4<k.length?k[4]:0))}}catch(za){}return b}if(null!=a.shape&&null!=a.shape.bounds){k=a.shape.direction;d=a.shape.bounds;e=a.shape.scale;b=d.width/e;d=d.height/e;if(k==mxConstants.DIRECTION_NORTH||
+k==mxConstants.DIRECTION_SOUTH)k=b,b=d,d=k;e=a.shape.getConstraints(a.style,b,d);if(null!=e)return e;if(null!=a.shape.stencil&&null!=a.shape.stencil.constraints)return a.shape.stencil.constraints;if(null!=a.shape.constraints)return a.shape.constraints}}return null};Graph.prototype.flipEdge=function(a){if(null!=a){var c=this.getCurrentCellStyle(a),c=mxUtils.getValue(c,mxConstants.STYLE_ELBOW,mxConstants.ELBOW_HORIZONTAL)==mxConstants.ELBOW_HORIZONTAL?mxConstants.ELBOW_VERTICAL:mxConstants.ELBOW_HORIZONTAL;
+this.setCellStyles(mxConstants.STYLE_ELBOW,c,[a])}};Graph.prototype.isValidRoot=function(a){for(var c=this.model.getChildCount(a),e=0,b=0;b<c;b++){var d=this.model.getChildAt(a,b);this.model.isVertex(d)&&(d=this.getCellGeometry(d),null==d||d.relative||e++)}return 0<e||this.isContainer(a)};Graph.prototype.isValidDropTarget=function(a,c,e){for(var b=this.getCurrentCellStyle(a),d=!0,k=!0,f=0;f<c.length&&k;f++)d=d&&this.isTable(c[f]),k=k&&this.isTableRow(c[f]);return("1"!=mxUtils.getValue(b,"part","0")||
+this.isContainer(a))&&"0"!=mxUtils.getValue(b,"dropTarget","1")&&(mxGraph.prototype.isValidDropTarget.apply(this,arguments)||this.isContainer(a))&&!this.isTableRow(a)&&(!this.isTable(a)||k||d)};Graph.prototype.createGroupCell=function(){var a=mxGraph.prototype.createGroupCell.apply(this,arguments);a.setStyle("group");return a};Graph.prototype.isExtendParentsOnAdd=function(a){var c=mxGraph.prototype.isExtendParentsOnAdd.apply(this,arguments);if(c&&null!=a&&null!=this.layoutManager){var e=this.model.getParent(a);
+null!=e&&(e=this.layoutManager.getLayout(e),null!=e&&e.constructor==mxStackLayout&&(c=!1))}return c};Graph.prototype.getPreferredSizeForCell=function(a){var c=mxGraph.prototype.getPreferredSizeForCell.apply(this,arguments);null!=c&&(c.width+=10,c.height+=4,this.gridEnabled&&(c.width=this.snap(c.width),c.height=this.snap(c.height)));return c};Graph.prototype.turnShapes=function(a,c){var e=this.getModel(),b=[];e.beginUpdate();try{for(var d=0;d<a.length;d++){var k=a[d];if(e.isEdge(k)){var f=e.getTerminal(k,
+!0),g=e.getTerminal(k,!1);e.setTerminal(k,g,!0);e.setTerminal(k,f,!1);var l=e.getGeometry(k);if(null!=l){l=l.clone();null!=l.points&&l.points.reverse();var n=l.getTerminalPoint(!0),v=l.getTerminalPoint(!1);l.setTerminalPoint(n,!1);l.setTerminalPoint(v,!0);e.setGeometry(k,l);var q=this.view.getState(k),t=this.view.getState(f),u=this.view.getState(g);if(null!=q){var ea=null!=t?this.getConnectionConstraint(q,t,!0):null,m=null!=u?this.getConnectionConstraint(q,u,!1):null;this.setConnectionConstraint(k,
+f,!0,m);this.setConnectionConstraint(k,g,!1,ea);var C=mxUtils.getValue(q.style,mxConstants.STYLE_SOURCE_PERIMETER_SPACING);this.setCellStyles(mxConstants.STYLE_SOURCE_PERIMETER_SPACING,mxUtils.getValue(q.style,mxConstants.STYLE_TARGET_PERIMETER_SPACING),[k]);this.setCellStyles(mxConstants.STYLE_TARGET_PERIMETER_SPACING,C,[k])}b.push(k)}}else if(e.isVertex(k)&&(l=this.getCellGeometry(k),null!=l)){if(!(this.isTable(k)||this.isTableRow(k)||this.isTableCell(k)||this.isSwimlane(k))){l=l.clone();l.x+=l.width/
+2-l.height/2;l.y+=l.height/2-l.width/2;var B=l.width;l.width=l.height;l.height=B;e.setGeometry(k,l)}var x=this.view.getState(k);if(null!=x){var p=[mxConstants.DIRECTION_EAST,mxConstants.DIRECTION_SOUTH,mxConstants.DIRECTION_WEST,mxConstants.DIRECTION_NORTH],z=mxUtils.getValue(x.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST);this.setCellStyles(mxConstants.STYLE_DIRECTION,p[mxUtils.mod(mxUtils.indexOf(p,z)+(c?-1:1),p.length)],[k])}b.push(k)}}}finally{e.endUpdate()}return b};Graph.prototype.stencilHasPlaceholders=
function(a){if(null!=a&&null!=a.fgNode)for(a=a.fgNode.firstChild;null!=a;){if("text"==a.nodeName&&"1"==a.getAttribute("placeholders"))return!0;a=a.nextSibling}return!1};var q=Graph.prototype.processChange;Graph.prototype.processChange=function(a){if(a instanceof mxGeometryChange&&(this.isTableCell(a.cell)||this.isTableRow(a.cell))&&(null==a.previous&&null!=a.geometry||null!=a.previous&&!a.previous.equals(a.geometry))){var c=a.cell;this.isTableCell(c)&&(c=this.model.getParent(c));this.isTableRow(c)&&
(c=this.model.getParent(c));var e=this.view.getState(c);null!=e&&null!=e.shape&&(this.view.invalidate(c),e.shape.bounds=null)}q.apply(this,arguments);a instanceof mxValueChange&&null!=a.cell&&null!=a.cell.value&&"object"==typeof a.cell.value&&this.invalidateDescendantsWithPlaceholders(a.cell)};Graph.prototype.invalidateDescendantsWithPlaceholders=function(a){a=this.model.getDescendants(a);if(0<a.length)for(var c=0;c<a.length;c++){var e=this.view.getState(a[c]);null!=e&&null!=e.shape&&null!=e.shape.stencil&&
this.stencilHasPlaceholders(e.shape.stencil)?this.removeStateForCell(a[c]):this.isReplacePlaceholders(a[c])&&this.view.invalidate(a[c],!1,!1)}};Graph.prototype.replaceElement=function(a,c){for(var e=a.ownerDocument.createElement(null!=c?c:"span"),b=Array.prototype.slice.call(a.attributes);attr=b.pop();)e.setAttribute(attr.nodeName,attr.nodeValue);e.innerHTML=a.innerHTML;a.parentNode.replaceChild(e,a)};Graph.prototype.processElements=function(a,c){if(null!=a)for(var e=a.getElementsByTagName("*"),b=
-0;b<e.length;b++)c(e[b])};Graph.prototype.updateLabelElements=function(a,c,e){a=null!=a?a:this.getSelectionCells();for(var b=document.createElement("div"),d=0;d<a.length;d++)if(this.isHtmlLabel(a[d])){var g=this.convertValueToString(a[d]);if(null!=g&&0<g.length){b.innerHTML=g;for(var f=b.getElementsByTagName(null!=e?e:"*"),k=0;k<f.length;k++)c(f[k]);b.innerHTML!=g&&this.cellLabelChanged(a[d],b.innerHTML)}}};Graph.prototype.cellLabelChanged=function(a,c,e){c=Graph.zapGremlins(c);this.model.beginUpdate();
-try{if(null!=a.value&&"object"==typeof a.value){if(this.isReplacePlaceholders(a)&&null!=a.getAttribute("placeholder"))for(var b=a.getAttribute("placeholder"),d=a;null!=d;){if(d==this.model.getRoot()||null!=d.value&&"object"==typeof d.value&&d.hasAttribute(b)){this.setAttributeForCell(d,b,c);break}d=this.model.getParent(d)}var g=a.value.cloneNode(!0);Graph.translateDiagram&&null!=Graph.diagramLanguage&&g.hasAttribute("label_"+Graph.diagramLanguage)?g.setAttribute("label_"+Graph.diagramLanguage,c):
-g.setAttribute("label",c);c=g}mxGraph.prototype.cellLabelChanged.apply(this,arguments)}finally{this.model.endUpdate()}};Graph.prototype.cellsRemoved=function(a){if(null!=a){for(var c=new mxDictionary,e=0;e<a.length;e++)c.put(a[e],!0);for(var b=[],e=0;e<a.length;e++){var d=this.model.getParent(a[e]);null==d||c.get(d)||(c.put(d,!0),b.push(d))}for(e=0;e<b.length;e++)if(d=this.view.getState(b[e]),null!=d&&(this.model.isEdge(d.cell)||this.model.isVertex(d.cell))&&this.isCellDeletable(d.cell)&&this.isTransparentState(d)){for(var g=
-!0,f=0;f<this.model.getChildCount(d.cell)&&g;f++)c.get(this.model.getChildAt(d.cell,f))||(g=!1);g&&a.push(d.cell)}}mxGraph.prototype.cellsRemoved.apply(this,arguments)};Graph.prototype.removeCellsAfterUngroup=function(a){for(var c=[],e=0;e<a.length;e++)this.isCellDeletable(a[e])&&this.isTransparentState(this.view.getState(a[e]))&&c.push(a[e]);a=c;mxGraph.prototype.removeCellsAfterUngroup.apply(this,arguments)};Graph.prototype.setLinkForCell=function(a,c){this.setAttributeForCell(a,"link",c)};Graph.prototype.setTooltipForCell=
+0;b<e.length;b++)c(e[b])};Graph.prototype.updateLabelElements=function(a,c,e){a=null!=a?a:this.getSelectionCells();for(var b=document.createElement("div"),d=0;d<a.length;d++)if(this.isHtmlLabel(a[d])){var k=this.convertValueToString(a[d]);if(null!=k&&0<k.length){b.innerHTML=k;for(var f=b.getElementsByTagName(null!=e?e:"*"),g=0;g<f.length;g++)c(f[g]);b.innerHTML!=k&&this.cellLabelChanged(a[d],b.innerHTML)}}};Graph.prototype.cellLabelChanged=function(a,c,e){c=Graph.zapGremlins(c);this.model.beginUpdate();
+try{if(null!=a.value&&"object"==typeof a.value){if(this.isReplacePlaceholders(a)&&null!=a.getAttribute("placeholder"))for(var b=a.getAttribute("placeholder"),d=a;null!=d;){if(d==this.model.getRoot()||null!=d.value&&"object"==typeof d.value&&d.hasAttribute(b)){this.setAttributeForCell(d,b,c);break}d=this.model.getParent(d)}var k=a.value.cloneNode(!0);Graph.translateDiagram&&null!=Graph.diagramLanguage&&k.hasAttribute("label_"+Graph.diagramLanguage)?k.setAttribute("label_"+Graph.diagramLanguage,c):
+k.setAttribute("label",c);c=k}mxGraph.prototype.cellLabelChanged.apply(this,arguments)}finally{this.model.endUpdate()}};Graph.prototype.cellsRemoved=function(a){if(null!=a){for(var c=new mxDictionary,e=0;e<a.length;e++)c.put(a[e],!0);for(var b=[],e=0;e<a.length;e++){var d=this.model.getParent(a[e]);null==d||c.get(d)||(c.put(d,!0),b.push(d))}for(e=0;e<b.length;e++)if(d=this.view.getState(b[e]),null!=d&&(this.model.isEdge(d.cell)||this.model.isVertex(d.cell))&&this.isCellDeletable(d.cell)&&this.isTransparentState(d)){for(var k=
+!0,f=0;f<this.model.getChildCount(d.cell)&&k;f++)c.get(this.model.getChildAt(d.cell,f))||(k=!1);k&&a.push(d.cell)}}mxGraph.prototype.cellsRemoved.apply(this,arguments)};Graph.prototype.removeCellsAfterUngroup=function(a){for(var c=[],e=0;e<a.length;e++)this.isCellDeletable(a[e])&&this.isTransparentState(this.view.getState(a[e]))&&c.push(a[e]);a=c;mxGraph.prototype.removeCellsAfterUngroup.apply(this,arguments)};Graph.prototype.setLinkForCell=function(a,c){this.setAttributeForCell(a,"link",c)};Graph.prototype.setTooltipForCell=
function(a,c){var e="tooltip";Graph.translateDiagram&&null!=Graph.diagramLanguage&&mxUtils.isNode(a.value)&&a.value.hasAttribute("tooltip_"+Graph.diagramLanguage)&&(e="tooltip_"+Graph.diagramLanguage);this.setAttributeForCell(a,e,c)};Graph.prototype.getAttributeForCell=function(a,c,e){a=null!=a.value&&"object"===typeof a.value?a.value.getAttribute(c):null;return null!=a?a:e};Graph.prototype.setAttributeForCell=function(a,c,e){var b;null!=a.value&&"object"==typeof a.value?b=a.value.cloneNode(!0):(b=
-mxUtils.createXmlDocument().createElement("UserObject"),b.setAttribute("label",a.value||""));null!=e?b.setAttribute(c,e):b.removeAttribute(c);this.model.setValue(a,b)};var u=Graph.prototype.getDropTarget;Graph.prototype.getDropTarget=function(a,c,e,b){this.getModel();if(mxEvent.isAltDown(c))return null;for(var d=0;d<a.length;d++){var g=this.model.getParent(a[d]);if(this.model.isEdge(g)&&0>mxUtils.indexOf(a,g))return null}for(var g=u.apply(this,arguments),f=!0,d=0;d<a.length&&f;d++)f=f&&this.isTableRow(a[d]);
-f&&(this.isTableCell(g)&&(g=this.model.getParent(g)),this.isTableRow(g)&&(g=this.model.getParent(g)),this.isTable(g)||(g=null));return g};Graph.prototype.click=function(a){mxGraph.prototype.click.call(this,a);this.firstClickState=a.getState();this.firstClickSource=a.getSource()};Graph.prototype.dblClick=function(a,c){this.isEnabled()&&(c=this.insertTextForEvent(a,c),mxGraph.prototype.dblClick.call(this,a,c))};Graph.prototype.insertTextForEvent=function(a,c){var e=mxUtils.convertPoint(this.container,
+mxUtils.createXmlDocument().createElement("UserObject"),b.setAttribute("label",a.value||""));null!=e?b.setAttribute(c,e):b.removeAttribute(c);this.model.setValue(a,b)};var u=Graph.prototype.getDropTarget;Graph.prototype.getDropTarget=function(a,c,e,b){this.getModel();if(mxEvent.isAltDown(c))return null;for(var d=0;d<a.length;d++){var k=this.model.getParent(a[d]);if(this.model.isEdge(k)&&0>mxUtils.indexOf(a,k))return null}for(var k=u.apply(this,arguments),f=!0,d=0;d<a.length&&f;d++)f=f&&this.isTableRow(a[d]);
+f&&(this.isTableCell(k)&&(k=this.model.getParent(k)),this.isTableRow(k)&&(k=this.model.getParent(k)),this.isTable(k)||(k=null));return k};Graph.prototype.click=function(a){mxGraph.prototype.click.call(this,a);this.firstClickState=a.getState();this.firstClickSource=a.getSource()};Graph.prototype.dblClick=function(a,c){this.isEnabled()&&(c=this.insertTextForEvent(a,c),mxGraph.prototype.dblClick.call(this,a,c))};Graph.prototype.insertTextForEvent=function(a,c){var e=mxUtils.convertPoint(this.container,
mxEvent.getClientX(a),mxEvent.getClientY(a));if(null!=a&&!this.model.isVertex(c)){var b=this.model.isEdge(c)?this.view.getState(c):null,d=mxEvent.getSource(a);this.firstClickState!=b||this.firstClickSource!=d||null!=b&&null!=b.text&&null!=b.text.node&&null!=b.text.boundingBox&&(mxUtils.contains(b.text.boundingBox,e.x,e.y)||mxUtils.isAncestorNode(b.text.node,mxEvent.getSource(a)))||(null!=b||this.isCellLocked(this.getDefaultParent()))&&(null==b||this.isCellLocked(b.cell))||!(null!=b||mxClient.IS_SVG&&
d==this.view.getCanvas().ownerSVGElement)||(null==b&&(b=this.view.getState(this.getCellAt(e.x,e.y))),c=this.addText(e.x,e.y,b))}return c};Graph.prototype.getInsertPoint=function(){var a=this.getGridSize(),c=this.container.scrollLeft/this.view.scale-this.view.translate.x,e=this.container.scrollTop/this.view.scale-this.view.translate.y;if(this.pageVisible)var b=this.getPageLayout(),d=this.getPageSize(),c=Math.max(c,b.x*d.width),e=Math.max(e,b.y*d.height);return new mxPoint(this.snap(c+a),this.snap(e+
a))};Graph.prototype.getFreeInsertPoint=function(){var a=this.view,c=this.getGraphBounds(),e=this.getInsertPoint(),b=this.snap(Math.round(Math.max(e.x,c.x/a.scale-a.translate.x+(0==c.width?2*this.gridSize:0)))),a=this.snap(Math.round(Math.max(e.y,(c.y+c.height)/a.scale-a.translate.y+2*this.gridSize)));return new mxPoint(b,a)};Graph.prototype.getCenterInsertPoint=function(a){a=null!=a?a: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-a.width/2)),this.snap(Math.round((this.container.scrollTop+this.container.clientHeight/2)/this.view.scale-this.view.translate.y-a.height/2))):new mxPoint(this.snap(Math.round(this.container.clientWidth/2/this.view.scale-this.view.translate.x-a.width/2)),this.snap(Math.round(this.container.clientHeight/2/this.view.scale-this.view.translate.y-a.height/2)))};Graph.prototype.isMouseInsertPoint=function(){return!1};Graph.prototype.addText=
-function(a,c,e){var b=new mxCell;b.value="Text";b.geometry=new mxGeometry(0,0,0,0);b.vertex=!0;if(null!=e&&this.model.isEdge(e.cell)){b.style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];";b.geometry.relative=!0;b.connectable=!1;var d=this.view.getRelativePoint(e,a,c);b.geometry.x=Math.round(1E4*d.x)/1E4;b.geometry.y=Math.round(d.y);b.geometry.offset=new mxPoint(0,0);var d=this.view.getPoint(e,b.geometry),g=this.view.scale;b.geometry.offset=new mxPoint(Math.round((a-d.x)/
-g),Math.round((c-d.y)/g))}else d=this.view.translate,b.style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];",b.geometry.width=40,b.geometry.height=20,b.geometry.x=Math.round(a/this.view.scale)-d.x-(null!=e?e.origin.x:0),b.geometry.y=Math.round(c/this.view.scale)-d.y-(null!=e?e.origin.y:0),b.style+="autosize=1;";this.getModel().beginUpdate();try{this.addCells([b],null!=e?e.cell:null),this.fireEvent(new mxEventObject("textInserted","cells",[b])),this.autoSizeCell(b)}finally{this.getModel().endUpdate()}return b};
-Graph.prototype.addClickHandler=function(a,c,e){var b=mxUtils.bind(this,function(){var a=this.container.getElementsByTagName("a");if(null!=a)for(var e=0;e<a.length;e++){var b=this.getAbsoluteUrl(a[e].getAttribute("href"));null!=b&&(a[e].setAttribute("rel",this.linkRelation),a[e].setAttribute("href",b),null!=c&&mxEvent.addGestureListeners(a[e],null,null,c))}});this.model.addListener(mxEvent.CHANGE,b);b();var d=this.container.style.cursor,g=this.getTolerance(),f=this,k={currentState:null,currentLink:null,
+function(a,c,e){var b=new mxCell;b.value="Text";b.geometry=new mxGeometry(0,0,0,0);b.vertex=!0;if(null!=e&&this.model.isEdge(e.cell)){b.style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];";b.geometry.relative=!0;b.connectable=!1;var d=this.view.getRelativePoint(e,a,c);b.geometry.x=Math.round(1E4*d.x)/1E4;b.geometry.y=Math.round(d.y);b.geometry.offset=new mxPoint(0,0);var d=this.view.getPoint(e,b.geometry),k=this.view.scale;b.geometry.offset=new mxPoint(Math.round((a-d.x)/
+k),Math.round((c-d.y)/k))}else d=this.view.translate,b.style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];",b.geometry.width=40,b.geometry.height=20,b.geometry.x=Math.round(a/this.view.scale)-d.x-(null!=e?e.origin.x:0),b.geometry.y=Math.round(c/this.view.scale)-d.y-(null!=e?e.origin.y:0),b.style+="autosize=1;";this.getModel().beginUpdate();try{this.addCells([b],null!=e?e.cell:null),this.fireEvent(new mxEventObject("textInserted","cells",[b])),this.autoSizeCell(b)}finally{this.getModel().endUpdate()}return b};
+Graph.prototype.addClickHandler=function(a,c,e){var b=mxUtils.bind(this,function(){var a=this.container.getElementsByTagName("a");if(null!=a)for(var e=0;e<a.length;e++){var b=this.getAbsoluteUrl(a[e].getAttribute("href"));null!=b&&(a[e].setAttribute("rel",this.linkRelation),a[e].setAttribute("href",b),null!=c&&mxEvent.addGestureListeners(a[e],null,null,c))}});this.model.addListener(mxEvent.CHANGE,b);b();var d=this.container.style.cursor,k=this.getTolerance(),f=this,g={currentState:null,currentLink:null,
currentTarget:null,highlight:null!=a&&""!=a&&a!=mxConstants.NONE?new mxCellHighlight(f,a,4):null,startX:0,startY:0,scrollLeft:0,scrollTop:0,updateCurrentState:function(a){var c=a.sourceState;if(null==c||null==f.getLinkForCell(c.cell))a=f.getCellAt(a.getGraphX(),a.getGraphY(),null,null,null,function(a,c,e){return null==f.getLinkForCell(a.cell)}),c=f.view.getState(a);c!=this.currentState&&(null!=this.currentState&&this.clear(),this.currentState=c,null!=this.currentState&&this.activate(this.currentState))},
-mouseDown:function(a,c){this.startX=c.getGraphX();this.startY=c.getGraphY();this.scrollLeft=f.container.scrollLeft;this.scrollTop=f.container.scrollTop;null==this.currentLink&&"auto"==f.container.style.overflow&&(f.container.style.cursor="move");this.updateCurrentState(c)},mouseMove:function(a,c){if(f.isMouseDown){if(null!=this.currentLink){var e=Math.abs(this.startX-c.getGraphX()),b=Math.abs(this.startY-c.getGraphY());(e>g||b>g)&&this.clear()}}else{for(e=c.getSource();null!=e&&"a"!=e.nodeName.toLowerCase();)e=
-e.parentNode;null!=e?this.clear():(null!=f.tooltipHandler&&null!=this.currentLink&&null!=this.currentState&&f.tooltipHandler.reset(c,!0,this.currentState),(null==this.currentState||c.getState()!=this.currentState&&null!=c.sourceState||!f.intersects(this.currentState,c.getGraphX(),c.getGraphY()))&&this.updateCurrentState(c))}},mouseUp:function(a,b){for(var d=b.getSource(),k=b.getEvent();null!=d&&"a"!=d.nodeName.toLowerCase();)d=d.parentNode;null==d&&Math.abs(this.scrollLeft-f.container.scrollLeft)<
-g&&Math.abs(this.scrollTop-f.container.scrollTop)<g&&(null==b.sourceState||!b.isSource(b.sourceState.control))&&((mxEvent.isLeftMouseButton(k)||mxEvent.isMiddleMouseButton(k))&&!mxEvent.isPopupTrigger(k)||mxEvent.isTouchEvent(k))&&(null!=this.currentLink?(d=f.isBlankLink(this.currentLink),"data:"!==this.currentLink.substring(0,5)&&d||null==c||c(k,this.currentLink),mxEvent.isConsumed(k)||(k=null!=this.currentTarget?this.currentTarget:mxEvent.isMiddleMouseButton(k)?"_blank":d?f.linkTarget:"_top",f.openLink(this.currentLink,
-k),b.consume())):null!=e&&!b.isConsumed()&&Math.abs(this.scrollLeft-f.container.scrollLeft)<g&&Math.abs(this.scrollTop-f.container.scrollTop)<g&&Math.abs(this.startX-b.getGraphX())<g&&Math.abs(this.startY-b.getGraphY())<g&&e(b.getEvent()));this.clear()},activate:function(a){this.currentLink=f.getAbsoluteUrl(f.getLinkForCell(a.cell));null!=this.currentLink&&(this.currentTarget=f.getLinkTargetForCell(a.cell),f.container.style.cursor="pointer",null!=this.highlight&&this.highlight.highlight(a))},clear:function(){null!=
-f.container&&(f.container.style.cursor=d);this.currentLink=this.currentState=this.currentTarget=null;null!=this.highlight&&this.highlight.hide();null!=f.tooltipHandler&&f.tooltipHandler.hide()}};f.click=function(a){};f.addMouseListener(k);mxEvent.addListener(document,"mouseleave",function(a){k.clear()})};Graph.prototype.duplicateCells=function(a,c){a=null!=a?a:this.getSelectionCells();c=null!=c?c:!0;for(var e=0;e<a.length;e++)this.isTableCell(a[e])&&(a[e]=this.model.getParent(a[e]));a=this.model.getTopmostCells(a);
-var b=this.getModel(),d=this.gridSize,g=[];b.beginUpdate();try{for(var f={},k=this.createCellLookup(a),l=this.cloneCells(a,!1,f,!0),e=0;e<a.length;e++){var n=b.getParent(a[e]),v=this.moveCells([l[e]],d,d,!1)[0];g.push(v);if(c)b.add(n,l[e]);else{var q=n.getIndex(a[e]);b.add(n,l[e],q+1)}if(this.isTable(n)){var t=this.getCellGeometry(l[e]),u=this.getCellGeometry(n);null!=t&&null!=u&&(u=u.clone(),u.height+=t.height,b.setGeometry(n,u))}}this.updateCustomLinks(this.createCellMapping(f,k),l,this)}finally{b.endUpdate()}return g};
-Graph.prototype.insertImage=function(a,c,e){if(null!=a&&null!=this.cellEditor.textarea){for(var b=this.cellEditor.textarea.getElementsByTagName("img"),d=[],g=0;g<b.length;g++)d.push(b[g]);document.execCommand("insertimage",!1,a);a=this.cellEditor.textarea.getElementsByTagName("img");if(a.length==d.length+1)for(g=a.length-1;0<=g;g--)if(0==g||a[g]!=d[g-1]){a[g].setAttribute("width",c);a[g].setAttribute("height",e);break}}};Graph.prototype.insertLink=function(a){if(null!=this.cellEditor.textarea)if(0==
+mouseDown:function(a,c){this.startX=c.getGraphX();this.startY=c.getGraphY();this.scrollLeft=f.container.scrollLeft;this.scrollTop=f.container.scrollTop;null==this.currentLink&&"auto"==f.container.style.overflow&&(f.container.style.cursor="move");this.updateCurrentState(c)},mouseMove:function(a,c){if(f.isMouseDown){if(null!=this.currentLink){var e=Math.abs(this.startX-c.getGraphX()),b=Math.abs(this.startY-c.getGraphY());(e>k||b>k)&&this.clear()}}else{for(e=c.getSource();null!=e&&"a"!=e.nodeName.toLowerCase();)e=
+e.parentNode;null!=e?this.clear():(null!=f.tooltipHandler&&null!=this.currentLink&&null!=this.currentState&&f.tooltipHandler.reset(c,!0,this.currentState),(null==this.currentState||c.getState()!=this.currentState&&null!=c.sourceState||!f.intersects(this.currentState,c.getGraphX(),c.getGraphY()))&&this.updateCurrentState(c))}},mouseUp:function(a,b){for(var d=b.getSource(),g=b.getEvent();null!=d&&"a"!=d.nodeName.toLowerCase();)d=d.parentNode;null==d&&Math.abs(this.scrollLeft-f.container.scrollLeft)<
+k&&Math.abs(this.scrollTop-f.container.scrollTop)<k&&(null==b.sourceState||!b.isSource(b.sourceState.control))&&((mxEvent.isLeftMouseButton(g)||mxEvent.isMiddleMouseButton(g))&&!mxEvent.isPopupTrigger(g)||mxEvent.isTouchEvent(g))&&(null!=this.currentLink?(d=f.isBlankLink(this.currentLink),"data:"!==this.currentLink.substring(0,5)&&d||null==c||c(g,this.currentLink),mxEvent.isConsumed(g)||(g=null!=this.currentTarget?this.currentTarget:mxEvent.isMiddleMouseButton(g)?"_blank":d?f.linkTarget:"_top",f.openLink(this.currentLink,
+g),b.consume())):null!=e&&!b.isConsumed()&&Math.abs(this.scrollLeft-f.container.scrollLeft)<k&&Math.abs(this.scrollTop-f.container.scrollTop)<k&&Math.abs(this.startX-b.getGraphX())<k&&Math.abs(this.startY-b.getGraphY())<k&&e(b.getEvent()));this.clear()},activate:function(a){this.currentLink=f.getAbsoluteUrl(f.getLinkForCell(a.cell));null!=this.currentLink&&(this.currentTarget=f.getLinkTargetForCell(a.cell),f.container.style.cursor="pointer",null!=this.highlight&&this.highlight.highlight(a))},clear:function(){null!=
+f.container&&(f.container.style.cursor=d);this.currentLink=this.currentState=this.currentTarget=null;null!=this.highlight&&this.highlight.hide();null!=f.tooltipHandler&&f.tooltipHandler.hide()}};f.click=function(a){};f.addMouseListener(g);mxEvent.addListener(document,"mouseleave",function(a){g.clear()})};Graph.prototype.duplicateCells=function(a,c){a=null!=a?a:this.getSelectionCells();c=null!=c?c:!0;for(var e=0;e<a.length;e++)this.isTableCell(a[e])&&(a[e]=this.model.getParent(a[e]));a=this.model.getTopmostCells(a);
+var b=this.getModel(),d=this.gridSize,k=[];b.beginUpdate();try{for(var f={},g=this.createCellLookup(a),l=this.cloneCells(a,!1,f,!0),e=0;e<a.length;e++){var n=b.getParent(a[e]),v=this.moveCells([l[e]],d,d,!1)[0];k.push(v);if(c)b.add(n,l[e]);else{var q=n.getIndex(a[e]);b.add(n,l[e],q+1)}if(this.isTable(n)){var t=this.getCellGeometry(l[e]),u=this.getCellGeometry(n);null!=t&&null!=u&&(u=u.clone(),u.height+=t.height,b.setGeometry(n,u))}}this.updateCustomLinks(this.createCellMapping(f,g),l,this)}finally{b.endUpdate()}return k};
+Graph.prototype.insertImage=function(a,c,e){if(null!=a&&null!=this.cellEditor.textarea){for(var b=this.cellEditor.textarea.getElementsByTagName("img"),d=[],k=0;k<b.length;k++)d.push(b[k]);document.execCommand("insertimage",!1,a);a=this.cellEditor.textarea.getElementsByTagName("img");if(a.length==d.length+1)for(k=a.length-1;0<=k;k--)if(0==k||a[k]!=d[k-1]){a[k].setAttribute("width",c);a[k].setAttribute("height",e);break}}};Graph.prototype.insertLink=function(a){if(null!=this.cellEditor.textarea)if(0==
a.length)document.execCommand("unlink",!1);else if(mxClient.IS_FF){for(var c=this.cellEditor.textarea.getElementsByTagName("a"),e=[],b=0;b<c.length;b++)e.push(c[b]);document.execCommand("createlink",!1,mxUtils.trim(a));c=this.cellEditor.textarea.getElementsByTagName("a");if(c.length==e.length+1)for(b=c.length-1;0<=b;b--)if(c[b]!=e[b-1]){for(c=c[b].getElementsByTagName("a");0<c.length;){for(e=c[0].parentNode;null!=c[0].firstChild;)e.insertBefore(c[0].firstChild,c[0]);e.removeChild(c[0])}break}}else document.execCommand("createlink",
-!1,mxUtils.trim(a))};Graph.prototype.isCellResizable=function(a){var c=mxGraph.prototype.isCellResizable.apply(this,arguments),e=this.getCurrentCellStyle(a);return!this.isTableCell(a)&&!this.isTableRow(a)&&(c||"0"!=mxUtils.getValue(e,mxConstants.STYLE_RESIZABLE,"1")&&"wrap"==e[mxConstants.STYLE_WHITE_SPACE])};Graph.prototype.distributeCells=function(a,c){null==c&&(c=this.getSelectionCells());if(null!=c&&1<c.length){for(var e=[],b=null,d=null,g=0;g<c.length;g++)if(this.getModel().isVertex(c[g])){var f=
-this.view.getState(c[g]);if(null!=f){var k=a?f.getCenterX():f.getCenterY(),b=null!=b?Math.max(b,k):k,d=null!=d?Math.min(d,k):k;e.push(f)}}if(2<e.length){e.sort(function(c,e){return a?c.x-e.x:c.y-e.y});f=this.view.translate;k=this.view.scale;d=d/k-(a?f.x:f.y);b=b/k-(a?f.x:f.y);this.getModel().beginUpdate();try{for(var l=(b-d)/(e.length-1),b=d,g=1;g<e.length-1;g++){var n=this.view.getState(this.model.getParent(e[g].cell)),v=this.getCellGeometry(e[g].cell),b=b+l;null!=v&&null!=n&&(v=v.clone(),a?v.x=
-Math.round(b-v.width/2)-n.origin.x:v.y=Math.round(b-v.height/2)-n.origin.y,this.getModel().setGeometry(e[g].cell,v))}}finally{this.getModel().endUpdate()}}}return c};Graph.prototype.isCloneEvent=function(a){return mxClient.IS_MAC&&mxEvent.isMetaDown(a)||mxEvent.isControlDown(a)};Graph.prototype.createSvgImageExport=function(){var a=new mxImageExport;a.getLinkForCellState=mxUtils.bind(this,function(a,c){return this.getLinkForCell(a.cell)});return a};Graph.prototype.parseBackgroundImage=function(a){var c=
-null;null!=a&&0<a.length&&(a=JSON.parse(a),c=new mxImage(a.src,a.width,a.height));return c};Graph.prototype.getBackgroundImageObject=function(a){return a};Graph.prototype.getSvg=function(a,c,e,b,d,g,f,k,l,n,v,q,t,u){var m=null;if(null!=u)for(m=new mxDictionary,v=0;v<u.length;v++)m.put(u[v],!0);if(u=this.useCssTransforms)this.useCssTransforms=!1,this.view.revalidate(),this.sizeDidChange();try{c=null!=c?c:1;e=null!=e?e:0;d=null!=d?d:!0;g=null!=g?g:!0;f=null!=f?f:!0;var D="page"==t?this.view.getBackgroundPageBounds():
-g&&null==m||b||"diagram"==t?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells()),B=this.view.scale;"diagram"==t&&null!=this.backgroundImage&&D.add(new mxRectangle((this.view.translate.x+this.backgroundImage.x)*B,(this.view.translate.y+this.backgroundImage.y)*B,this.backgroundImage.width*B,this.backgroundImage.height*B));if(null==D)throw Error(mxResources.get("drawingEmpty"));var x=mxUtils.createXmlDocument(),p=null!=x.createElementNS?x.createElementNS(mxConstants.NS_SVG,"svg"):x.createElement("svg");
-null!=a&&(null!=p.style?p.style.backgroundColor=a:p.setAttribute("style","background-color:"+a));null==x.createElementNS?(p.setAttribute("xmlns",mxConstants.NS_SVG),p.setAttribute("xmlns:xlink",mxConstants.NS_XLINK)):p.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",mxConstants.NS_XLINK);a=c/B;var z=Math.max(1,Math.ceil(D.width*a)+2*e)+(n?5:0),L=Math.max(1,Math.ceil(D.height*a)+2*e)+(n?5:0);p.setAttribute("version","1.1");p.setAttribute("width",z+"px");p.setAttribute("height",L+"px");
-p.setAttribute("viewBox",(d?"-0.5 -0.5":"0 0")+" "+z+" "+L);x.appendChild(p);var Y=null!=x.createElementNS?x.createElementNS(mxConstants.NS_SVG,"g"):x.createElement("g");p.appendChild(Y);var J=this.createSvgCanvas(Y);J.foOffset=d?-.5:0;J.textOffset=d?-.5:0;J.imageOffset=d?-.5:0;J.translate(Math.floor(e/c-D.x/B),Math.floor(e/c-D.y/B));var A=document.createElement("div"),C=J.getAlternateText;J.getAlternateText=function(a,c,e,b,d,g,f,k,l,n,v,q,y){if(null!=g&&0<this.state.fontSize)try{mxUtils.isNode(g)?
-g=g.innerText:(A.innerHTML=g,g=mxUtils.extractTextWithWhitespace(A.childNodes));for(var sa=Math.ceil(2*b/this.state.fontSize),Pa=[],oa=0,Qa=0;(0==sa||oa<sa)&&Qa<g.length;){var Ta=g.charCodeAt(Qa);if(10==Ta||13==Ta){if(0<oa)break}else Pa.push(g.charAt(Qa)),255>Ta&&oa++;Qa++}Pa.length<g.length&&1<g.length-Pa.length&&(g=mxUtils.trim(Pa.join(""))+"...");return g}catch(fb){return C.apply(this,arguments)}else return C.apply(this,arguments)};var N=this.backgroundImage;if(null!=N){c=B/c;var W=this.view.translate,
-qa=new mxRectangle((N.x+W.x)*c,(N.y+W.y)*c,N.width*c,N.height*c);mxUtils.intersects(D,qa)&&J.image(N.x+W.x,N.y+W.y,N.width,N.height,N.src,!0)}J.scale(a);J.textEnabled=f;k=null!=k?k:this.createSvgImageExport();var E=k.drawCellState,Q=k.getLinkForCellState;k.getLinkForCellState=function(a,c){var e=Q.apply(this,arguments);return null==e||a.view.graph.isCustomLink(e)?null:e};k.getLinkTargetForCellState=function(a,c){return a.view.graph.getLinkTargetForCell(a.cell)};k.drawCellState=function(a,c){for(var e=
-a.view.graph,b=null!=m?m.get(a.cell):e.isCellSelected(a.cell),d=e.model.getParent(a.cell);!(g&&null==m||b)&&null!=d;)b=null!=m?m.get(d):e.isCellSelected(d),d=e.model.getParent(d);(g&&null==m||b)&&E.apply(this,arguments)};k.drawState(this.getView().getState(this.model.root),J);this.updateSvgLinks(p,l,!0);this.addForeignObjectWarning(J,p);return p}finally{u&&(this.useCssTransforms=!0,this.view.revalidate(),this.sizeDidChange())}};Graph.prototype.addForeignObjectWarning=function(a,c){if("0"!=urlParams["svg-warning"]&&
+!1,mxUtils.trim(a))};Graph.prototype.isCellResizable=function(a){var c=mxGraph.prototype.isCellResizable.apply(this,arguments),e=this.getCurrentCellStyle(a);return!this.isTableCell(a)&&!this.isTableRow(a)&&(c||"0"!=mxUtils.getValue(e,mxConstants.STYLE_RESIZABLE,"1")&&"wrap"==e[mxConstants.STYLE_WHITE_SPACE])};Graph.prototype.distributeCells=function(a,c){null==c&&(c=this.getSelectionCells());if(null!=c&&1<c.length){for(var e=[],b=null,d=null,k=0;k<c.length;k++)if(this.getModel().isVertex(c[k])){var f=
+this.view.getState(c[k]);if(null!=f){var g=a?f.getCenterX():f.getCenterY(),b=null!=b?Math.max(b,g):g,d=null!=d?Math.min(d,g):g;e.push(f)}}if(2<e.length){e.sort(function(c,e){return a?c.x-e.x:c.y-e.y});f=this.view.translate;g=this.view.scale;d=d/g-(a?f.x:f.y);b=b/g-(a?f.x:f.y);this.getModel().beginUpdate();try{for(var l=(b-d)/(e.length-1),b=d,k=1;k<e.length-1;k++){var n=this.view.getState(this.model.getParent(e[k].cell)),v=this.getCellGeometry(e[k].cell),b=b+l;null!=v&&null!=n&&(v=v.clone(),a?v.x=
+Math.round(b-v.width/2)-n.origin.x:v.y=Math.round(b-v.height/2)-n.origin.y,this.getModel().setGeometry(e[k].cell,v))}}finally{this.getModel().endUpdate()}}}return c};Graph.prototype.isCloneEvent=function(a){return mxClient.IS_MAC&&mxEvent.isMetaDown(a)||mxEvent.isControlDown(a)};Graph.prototype.createSvgImageExport=function(){var a=new mxImageExport;a.getLinkForCellState=mxUtils.bind(this,function(a,c){return this.getLinkForCell(a.cell)});return a};Graph.prototype.parseBackgroundImage=function(a){var c=
+null;null!=a&&0<a.length&&(a=JSON.parse(a),c=new mxImage(a.src,a.width,a.height));return c};Graph.prototype.getBackgroundImageObject=function(a){return a};Graph.prototype.getSvg=function(a,c,e,b,d,k,f,g,l,n,v,q,t,u){var m=null;if(null!=u)for(m=new mxDictionary,v=0;v<u.length;v++)m.put(u[v],!0);if(u=this.useCssTransforms)this.useCssTransforms=!1,this.view.revalidate(),this.sizeDidChange();try{c=null!=c?c:1;e=null!=e?e:0;d=null!=d?d:!0;k=null!=k?k:!0;f=null!=f?f:!0;var C="page"==t?this.view.getBackgroundPageBounds():
+k&&null==m||b||"diagram"==t?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells()),B=this.view.scale;"diagram"==t&&null!=this.backgroundImage&&C.add(new mxRectangle((this.view.translate.x+this.backgroundImage.x)*B,(this.view.translate.y+this.backgroundImage.y)*B,this.backgroundImage.width*B,this.backgroundImage.height*B));if(null==C)throw Error(mxResources.get("drawingEmpty"));var x=mxUtils.createXmlDocument(),p=null!=x.createElementNS?x.createElementNS(mxConstants.NS_SVG,"svg"):x.createElement("svg");
+null!=a&&(null!=p.style?p.style.backgroundColor=a:p.setAttribute("style","background-color:"+a));null==x.createElementNS?(p.setAttribute("xmlns",mxConstants.NS_SVG),p.setAttribute("xmlns:xlink",mxConstants.NS_XLINK)):p.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",mxConstants.NS_XLINK);a=c/B;var z=Math.max(1,Math.ceil(C.width*a)+2*e)+(n?5:0),L=Math.max(1,Math.ceil(C.height*a)+2*e)+(n?5:0);p.setAttribute("version","1.1");p.setAttribute("width",z+"px");p.setAttribute("height",L+"px");
+p.setAttribute("viewBox",(d?"-0.5 -0.5":"0 0")+" "+z+" "+L);x.appendChild(p);var ea=null!=x.createElementNS?x.createElementNS(mxConstants.NS_SVG,"g"):x.createElement("g");p.appendChild(ea);var J=this.createSvgCanvas(ea);J.foOffset=d?-.5:0;J.textOffset=d?-.5:0;J.imageOffset=d?-.5:0;J.translate(Math.floor(e/c-C.x/B),Math.floor(e/c-C.y/B));var A=document.createElement("div"),D=J.getAlternateText;J.getAlternateText=function(a,c,e,b,d,k,f,g,l,n,v,q,y){if(null!=k&&0<this.state.fontSize)try{mxUtils.isNode(k)?
+k=k.innerText:(A.innerHTML=k,k=mxUtils.extractTextWithWhitespace(A.childNodes));for(var sa=Math.ceil(2*b/this.state.fontSize),Pa=[],oa=0,Qa=0;(0==sa||oa<sa)&&Qa<k.length;){var Ta=k.charCodeAt(Qa);if(10==Ta||13==Ta){if(0<oa)break}else Pa.push(k.charAt(Qa)),255>Ta&&oa++;Qa++}Pa.length<k.length&&1<k.length-Pa.length&&(k=mxUtils.trim(Pa.join(""))+"...");return k}catch(fb){return D.apply(this,arguments)}else return D.apply(this,arguments)};var N=this.backgroundImage;if(null!=N){c=B/c;var W=this.view.translate,
+qa=new mxRectangle((N.x+W.x)*c,(N.y+W.y)*c,N.width*c,N.height*c);mxUtils.intersects(C,qa)&&J.image(N.x+W.x,N.y+W.y,N.width,N.height,N.src,!0)}J.scale(a);J.textEnabled=f;g=null!=g?g:this.createSvgImageExport();var E=g.drawCellState,Q=g.getLinkForCellState;g.getLinkForCellState=function(a,c){var e=Q.apply(this,arguments);return null==e||a.view.graph.isCustomLink(e)?null:e};g.getLinkTargetForCellState=function(a,c){return a.view.graph.getLinkTargetForCell(a.cell)};g.drawCellState=function(a,c){for(var e=
+a.view.graph,b=null!=m?m.get(a.cell):e.isCellSelected(a.cell),d=e.model.getParent(a.cell);!(k&&null==m||b)&&null!=d;)b=null!=m?m.get(d):e.isCellSelected(d),d=e.model.getParent(d);(k&&null==m||b)&&E.apply(this,arguments)};g.drawState(this.getView().getState(this.model.root),J);this.updateSvgLinks(p,l,!0);this.addForeignObjectWarning(J,p);return p}finally{u&&(this.useCssTransforms=!0,this.view.revalidate(),this.sizeDidChange())}};Graph.prototype.addForeignObjectWarning=function(a,c){if("0"!=urlParams["svg-warning"]&&
0<c.getElementsByTagName("foreignObject").length){var e=a.createElement("switch"),b=a.createElement("g");b.setAttribute("requiredFeatures","http://www.w3.org/TR/SVG11/feature#Extensibility");var d=a.createElement("a");d.setAttribute("transform","translate(0,-5)");null==d.setAttributeNS||c.ownerDocument!=document&&null==document.documentMode?(d.setAttribute("xlink:href",Graph.foreignObjectWarningLink),d.setAttribute("target","_blank")):(d.setAttributeNS(mxConstants.NS_XLINK,"xlink:href",Graph.foreignObjectWarningLink),
-d.setAttributeNS(mxConstants.NS_XLINK,"target","_blank"));var g=a.createElement("text");g.setAttribute("text-anchor","middle");g.setAttribute("font-size","10px");g.setAttribute("x","50%");g.setAttribute("y","100%");mxUtils.write(g,Graph.foreignObjectWarningText);e.appendChild(b);d.appendChild(g);e.appendChild(d);c.appendChild(e)}};Graph.prototype.updateSvgLinks=function(a,c,e){a=a.getElementsByTagName("a");for(var b=0;b<a.length;b++)if(null==a[b].getAttribute("target")){var d=a[b].getAttribute("href");
+d.setAttributeNS(mxConstants.NS_XLINK,"target","_blank"));var k=a.createElement("text");k.setAttribute("text-anchor","middle");k.setAttribute("font-size","10px");k.setAttribute("x","50%");k.setAttribute("y","100%");mxUtils.write(k,Graph.foreignObjectWarningText);e.appendChild(b);d.appendChild(k);e.appendChild(d);c.appendChild(e)}};Graph.prototype.updateSvgLinks=function(a,c,e){a=a.getElementsByTagName("a");for(var b=0;b<a.length;b++)if(null==a[b].getAttribute("target")){var d=a[b].getAttribute("href");
null==d&&(d=a[b].getAttribute("xlink:href"));null!=d&&(null!=c&&/^https?:\/\//.test(d)?a[b].setAttribute("target",c):e&&this.isCustomLink(d)&&a[b].setAttribute("href","javascript:void(0);"))}};Graph.prototype.createSvgCanvas=function(a){a=new mxSvgCanvas2D(a);a.pointerEvents=!0;return a};Graph.prototype.getSelectedElement=function(){var a=null;if(window.getSelection){var c=window.getSelection();c.getRangeAt&&c.rangeCount&&(a=c.getRangeAt(0).commonAncestorContainer)}else document.selection&&(a=document.selection.createRange().parentElement());
return a};Graph.prototype.getSelectedEditingElement=function(){for(var a=this.getSelectedElement();null!=a&&a.nodeType!=mxConstants.NODETYPE_ELEMENT;)a=a.parentNode;null!=a&&a==this.cellEditor.textarea&&1==this.cellEditor.textarea.children.length&&this.cellEditor.textarea.firstChild.nodeType==mxConstants.NODETYPE_ELEMENT&&(a=this.cellEditor.textarea.firstChild);return a};Graph.prototype.getParentByName=function(a,c,e){for(;null!=a&&a.nodeName!=c;){if(a==e)return null;a=a.parentNode}return a};Graph.prototype.getParentByNames=
function(a,c,e){for(;null!=a&&!(0<=mxUtils.indexOf(c,a.nodeName));){if(a==e)return null;a=a.parentNode}return a};Graph.prototype.selectNode=function(a){var c=null;if(window.getSelection){if(c=window.getSelection(),c.getRangeAt&&c.rangeCount){var e=document.createRange();e.selectNode(a);c.removeAllRanges();c.addRange(e)}}else(c=document.selection)&&"Control"!=c.type&&(a=c.createRange(),a.collapse(!0),e=c.createRange(),e.setEndPoint("StartToStart",a),e.select())};Graph.prototype.deleteCells=function(a,
-c){var e=null;if(null!=a&&0<a.length){this.model.beginUpdate();try{for(var b=0;b<a.length;b++){var d=this.model.getParent(a[b]);if(this.isTable(d)){var g=this.getCellGeometry(a[b]),f=this.getCellGeometry(d);null!=g&&null!=f&&(f=f.clone(),f.height-=g.height,this.model.setGeometry(d,f))}}var k=this.selectParentAfterDelete?this.model.getParents(a):null;this.removeCells(a,c)}finally{this.model.endUpdate()}if(null!=k)for(e=[],b=0;b<k.length;b++)this.model.contains(k[b])&&(this.model.isVertex(k[b])||this.model.isEdge(k[b]))&&
-e.push(k[b])}return e};Graph.prototype.insertTableColumn=function(a,c){var e=this.getModel();e.beginUpdate();try{var b=a,d=0;if(this.isTableCell(a))var g=e.getParent(a),b=e.getParent(g),d=mxUtils.indexOf(e.getChildCells(g,!0),a);else this.isTableRow(a)?b=e.getParent(a):a=e.getChildCells(b,!0)[0],c||(d=e.getChildCells(a,!0).length-1);for(var f=e.getChildCells(b,!0),k=Graph.minTableColumnWidth,g=0;g<f.length;g++){var l=e.getChildCells(f[g],!0)[d],n=e.cloneCell(l,!1),v=this.getCellGeometry(n);n.value=
-null;if(null!=v){var k=v.width,q=this.getCellGeometry(f[g]);null!=q&&(v.height=q.height)}e.add(f[g],n,d+(c?0:1))}var t=this.getCellGeometry(b);null!=t&&(t=t.clone(),t.width+=k,e.setGeometry(b,t))}finally{e.endUpdate()}};Graph.prototype.insertTableRow=function(a,c){var e=this.getModel();e.beginUpdate();try{var b=a,d=a;if(this.isTableCell(a))d=e.getParent(a),b=e.getParent(d);else if(this.isTableRow(a))b=e.getParent(a);else var g=e.getChildCells(b,!0),d=g[c?0:g.length-1];var f=e.getChildCells(d,!0),
-k=b.getIndex(d),d=e.cloneCell(d,!1);d.value=null;var l=this.getCellGeometry(d);if(null!=l){for(g=0;g<f.length;g++){a=e.cloneCell(f[g],!1);d.insert(a);a.value=null;var n=this.getCellGeometry(a);null!=n&&(n.height=l.height)}e.add(b,d,k+(c?0:1));var v=this.getCellGeometry(b);null!=v&&(v=v.clone(),v.height+=l.height,e.setGeometry(b,v))}}finally{e.endUpdate()}};Graph.prototype.deleteTableColumn=function(a){var c=this.getModel();c.beginUpdate();try{var e=a,b=a;this.isTableCell(a)&&(b=c.getParent(a));this.isTableRow(b)&&
-(e=c.getParent(b));var d=c.getChildCells(e,!0);if(0==d.length)c.remove(e);else{this.isTableRow(b)||(b=d[0]);var g=c.getChildCells(b,!0);if(1>=g.length)c.remove(e);else{var f=g.length-1;this.isTableCell(a)&&(f=mxUtils.indexOf(g,a));for(b=a=0;b<d.length;b++){var k=c.getChildCells(d[b],!0)[f];c.remove(k);var l=this.getCellGeometry(k);null!=l&&(a=Math.max(a,l.width))}var n=this.getCellGeometry(e);null!=n&&(n=n.clone(),n.width-=a,c.setGeometry(e,n))}}}finally{c.endUpdate()}};Graph.prototype.deleteTableRow=
-function(a){var c=this.getModel();c.beginUpdate();try{var e=a,b=a;this.isTableCell(a)&&(a=b=c.getParent(a));this.isTableRow(a)&&(e=c.getParent(b));var d=c.getChildCells(e,!0);if(1>=d.length)c.remove(e);else{this.isTableRow(b)||(b=d[d.length-1]);c.remove(b);a=0;var g=this.getCellGeometry(b);null!=g&&(a=g.height);var f=this.getCellGeometry(e);null!=f&&(f=f.clone(),f.height-=a,c.setGeometry(e,f))}}finally{c.endUpdate()}};Graph.prototype.insertRow=function(a,c){for(var e=a.tBodies[0],b=e.rows[0].cells,
-d=0,g=0;g<b.length;g++)var f=b[g].getAttribute("colspan"),d=d+(null!=f?parseInt(f):1);e=e.insertRow(c);for(g=0;g<d;g++)mxUtils.br(e.insertCell(-1));return e.cells[0]};Graph.prototype.deleteRow=function(a,c){a.tBodies[0].deleteRow(c)};Graph.prototype.insertColumn=function(a,c){var e=a.tHead;if(null!=e)for(var b=0;b<e.rows.length;b++){var d=document.createElement("th");e.rows[b].appendChild(d);mxUtils.br(d)}e=a.tBodies[0];for(b=0;b<e.rows.length;b++)d=e.rows[b].insertCell(c),mxUtils.br(d);return e.rows[0].cells[0<=
+c){var e=null;if(null!=a&&0<a.length){this.model.beginUpdate();try{for(var b=0;b<a.length;b++){var d=this.model.getParent(a[b]);if(this.isTable(d)){var k=this.getCellGeometry(a[b]),f=this.getCellGeometry(d);null!=k&&null!=f&&(f=f.clone(),f.height-=k.height,this.model.setGeometry(d,f))}}var g=this.selectParentAfterDelete?this.model.getParents(a):null;this.removeCells(a,c)}finally{this.model.endUpdate()}if(null!=g)for(e=[],b=0;b<g.length;b++)this.model.contains(g[b])&&(this.model.isVertex(g[b])||this.model.isEdge(g[b]))&&
+e.push(g[b])}return e};Graph.prototype.insertTableColumn=function(a,c){var e=this.getModel();e.beginUpdate();try{var b=a,d=0;if(this.isTableCell(a))var k=e.getParent(a),b=e.getParent(k),d=mxUtils.indexOf(e.getChildCells(k,!0),a);else this.isTableRow(a)?b=e.getParent(a):a=e.getChildCells(b,!0)[0],c||(d=e.getChildCells(a,!0).length-1);for(var f=e.getChildCells(b,!0),g=Graph.minTableColumnWidth,k=0;k<f.length;k++){var l=e.getChildCells(f[k],!0)[d],n=e.cloneCell(l,!1),v=this.getCellGeometry(n);n.value=
+null;if(null!=v){var g=v.width,q=this.getCellGeometry(f[k]);null!=q&&(v.height=q.height)}e.add(f[k],n,d+(c?0:1))}var t=this.getCellGeometry(b);null!=t&&(t=t.clone(),t.width+=g,e.setGeometry(b,t))}finally{e.endUpdate()}};Graph.prototype.insertTableRow=function(a,c){var e=this.getModel();e.beginUpdate();try{var b=a,d=a;if(this.isTableCell(a))d=e.getParent(a),b=e.getParent(d);else if(this.isTableRow(a))b=e.getParent(a);else var k=e.getChildCells(b,!0),d=k[c?0:k.length-1];var f=e.getChildCells(d,!0),
+g=b.getIndex(d),d=e.cloneCell(d,!1);d.value=null;var l=this.getCellGeometry(d);if(null!=l){for(k=0;k<f.length;k++){a=e.cloneCell(f[k],!1);d.insert(a);a.value=null;var n=this.getCellGeometry(a);null!=n&&(n.height=l.height)}e.add(b,d,g+(c?0:1));var v=this.getCellGeometry(b);null!=v&&(v=v.clone(),v.height+=l.height,e.setGeometry(b,v))}}finally{e.endUpdate()}};Graph.prototype.deleteTableColumn=function(a){var c=this.getModel();c.beginUpdate();try{var e=a,b=a;this.isTableCell(a)&&(b=c.getParent(a));this.isTableRow(b)&&
+(e=c.getParent(b));var d=c.getChildCells(e,!0);if(0==d.length)c.remove(e);else{this.isTableRow(b)||(b=d[0]);var k=c.getChildCells(b,!0);if(1>=k.length)c.remove(e);else{var f=k.length-1;this.isTableCell(a)&&(f=mxUtils.indexOf(k,a));for(b=a=0;b<d.length;b++){var g=c.getChildCells(d[b],!0)[f];c.remove(g);var l=this.getCellGeometry(g);null!=l&&(a=Math.max(a,l.width))}var n=this.getCellGeometry(e);null!=n&&(n=n.clone(),n.width-=a,c.setGeometry(e,n))}}}finally{c.endUpdate()}};Graph.prototype.deleteTableRow=
+function(a){var c=this.getModel();c.beginUpdate();try{var e=a,b=a;this.isTableCell(a)&&(a=b=c.getParent(a));this.isTableRow(a)&&(e=c.getParent(b));var d=c.getChildCells(e,!0);if(1>=d.length)c.remove(e);else{this.isTableRow(b)||(b=d[d.length-1]);c.remove(b);a=0;var k=this.getCellGeometry(b);null!=k&&(a=k.height);var f=this.getCellGeometry(e);null!=f&&(f=f.clone(),f.height-=a,c.setGeometry(e,f))}}finally{c.endUpdate()}};Graph.prototype.insertRow=function(a,c){for(var e=a.tBodies[0],b=e.rows[0].cells,
+d=0,k=0;k<b.length;k++)var f=b[k].getAttribute("colspan"),d=d+(null!=f?parseInt(f):1);e=e.insertRow(c);for(k=0;k<d;k++)mxUtils.br(e.insertCell(-1));return e.cells[0]};Graph.prototype.deleteRow=function(a,c){a.tBodies[0].deleteRow(c)};Graph.prototype.insertColumn=function(a,c){var e=a.tHead;if(null!=e)for(var b=0;b<e.rows.length;b++){var d=document.createElement("th");e.rows[b].appendChild(d);mxUtils.br(d)}e=a.tBodies[0];for(b=0;b<e.rows.length;b++)d=e.rows[b].insertCell(c),mxUtils.br(d);return e.rows[0].cells[0<=
c?c:e.rows[0].cells.length-1]};Graph.prototype.deleteColumn=function(a,c){if(0<=c)for(var e=a.tBodies[0].rows,b=0;b<e.length;b++)e[b].cells.length>c&&e[b].deleteCell(c)};Graph.prototype.pasteHtmlAtCaret=function(a){var c;if(window.getSelection){if(c=window.getSelection(),c.getRangeAt&&c.rangeCount){c=c.getRangeAt(0);c.deleteContents();var e=document.createElement("div");e.innerHTML=a;a=document.createDocumentFragment();for(var b;b=e.firstChild;)lastNode=a.appendChild(b);c.insertNode(a)}}else(c=document.selection)&&
"Control"!=c.type&&c.createRange().pasteHTML(a)};Graph.prototype.createLinkForHint=function(a,c){function e(a,c){a.length>c&&(a=a.substring(0,Math.round(c/2))+"..."+a.substring(a.length-Math.round(c/4)));return a}a=null!=a?a:"javascript:void(0);";if(null==c||0==c.length)c=this.isCustomLink(a)?this.getLinkTitle(a):a;var b=document.createElement("a");b.setAttribute("rel",this.linkRelation);b.setAttribute("href",this.getAbsoluteUrl(a));b.setAttribute("title",e(this.isCustomLink(a)?this.getLinkTitle(a):
a,80));null!=this.linkTarget&&b.setAttribute("target",this.linkTarget);mxUtils.write(b,e(c,40));this.isCustomLink(a)&&mxEvent.addListener(b,"click",mxUtils.bind(this,function(c){this.customLinkClicked(a);mxEvent.consume(c)}));return b};Graph.prototype.initTouch=function(){this.connectionHandler.marker.isEnabled=function(){return null!=this.graph.connectionHandler.first};this.addListener(mxEvent.START_EDITING,function(a,c){this.popupMenuHandler.hideMenu()});var a=this.updateMouseEvent;this.updateMouseEvent=
function(c){c=a.apply(this,arguments);if(mxEvent.isTouchEvent(c.getEvent())&&null==c.getState()){var e=this.getCellAt(c.graphX,c.graphY);null!=e&&this.isSwimlane(e)&&this.hitsSwimlaneContent(e,c.graphX,c.graphY)||(c.state=this.view.getState(e),null!=c.state&&null!=c.state.shape&&(this.container.style.cursor=c.state.shape.node.style.cursor))}null==c.getState()&&this.isEnabled()&&(this.container.style.cursor="default");return c};var c=!1,e=!1,b=!1,d=this.fireMouseEvent;this.fireMouseEvent=function(a,
-g,f){a==mxEvent.MOUSE_DOWN&&(g=this.updateMouseEvent(g),c=this.isCellSelected(g.getCell()),e=this.isSelectionEmpty(),b=this.popupMenuHandler.isMenuShowing());d.apply(this,arguments)};this.popupMenuHandler.mouseUp=mxUtils.bind(this,function(a,d){this.popupMenuHandler.popupTrigger=!this.isEditing()&&this.isEnabled()&&(null==d.getState()||!d.isSource(d.getState().control))&&(this.popupMenuHandler.popupTrigger||!b&&!mxEvent.isMouseEvent(d.getEvent())&&(e&&null==d.getCell()&&this.isSelectionEmpty()||c&&
-this.isCellSelected(d.getCell())));var g=c?mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,function(a){if(!this.isEditing()){var c=mxUtils.getScrollOrigin();this.popupMenuHandler.popup(d.getX()+c.x+1,d.getY()+c.y+1,a,d.getEvent())}}),500)}):null;mxPopupMenuHandler.prototype.mouseUp.apply(this.popupMenuHandler,[a,d,g])})};mxCellEditor.prototype.isContentEditing=function(){var a=this.graph.view.getState(this.editingCell);return null!=a&&1==a.style.html};mxCellEditor.prototype.isTableSelected=
+k,f){a==mxEvent.MOUSE_DOWN&&(k=this.updateMouseEvent(k),c=this.isCellSelected(k.getCell()),e=this.isSelectionEmpty(),b=this.popupMenuHandler.isMenuShowing());d.apply(this,arguments)};this.popupMenuHandler.mouseUp=mxUtils.bind(this,function(a,d){this.popupMenuHandler.popupTrigger=!this.isEditing()&&this.isEnabled()&&(null==d.getState()||!d.isSource(d.getState().control))&&(this.popupMenuHandler.popupTrigger||!b&&!mxEvent.isMouseEvent(d.getEvent())&&(e&&null==d.getCell()&&this.isSelectionEmpty()||c&&
+this.isCellSelected(d.getCell())));var k=c?mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,function(a){if(!this.isEditing()){var c=mxUtils.getScrollOrigin();this.popupMenuHandler.popup(d.getX()+c.x+1,d.getY()+c.y+1,a,d.getEvent())}}),500)}):null;mxPopupMenuHandler.prototype.mouseUp.apply(this.popupMenuHandler,[a,d,k])})};mxCellEditor.prototype.isContentEditing=function(){var a=this.graph.view.getState(this.editingCell);return null!=a&&1==a.style.html};mxCellEditor.prototype.isTableSelected=
function(){return null!=this.graph.getParentByName(this.graph.getSelectedElement(),"TABLE",this.textarea)};mxCellEditor.prototype.isTextSelected=function(){var a="";window.getSelection?a=window.getSelection():document.getSelection?a=document.getSelection():document.selection&&(a=document.selection.createRange().text);return""!=a};mxCellEditor.prototype.insertTab=function(a){var c=this.textarea.ownerDocument.defaultView.getSelection(),e=c.getRangeAt(0),b="\t";if(null!=a)for(b="";0<a;)b+=" ",a--;a=
document.createElement("span");a.style.whiteSpace="pre";a.appendChild(document.createTextNode(b));e.insertNode(a);e.setStartAfter(a);e.setEndAfter(a);c.removeAllRanges();c.addRange(e)};mxCellEditor.prototype.alignText=function(a,c){var e=null!=c&&mxEvent.isShiftDown(c);if(e||null!=window.getSelection&&null!=window.getSelection().containsNode){var b=!0;this.graph.processElements(this.textarea,function(a){e||window.getSelection().containsNode(a,!0)?(a.removeAttribute("align"),a.style.textAlign=null):
b=!1});b&&this.graph.cellEditor.setAlign(a)}document.execCommand("justify"+a.toLowerCase(),!1,null)};mxCellEditor.prototype.saveSelection=function(){if(window.getSelection){var a=window.getSelection();if(a.getRangeAt&&a.rangeCount){for(var c=[],e=0,b=a.rangeCount;e<b;++e)c.push(a.getRangeAt(e));return c}}else if(document.selection&&document.selection.createRange)return document.selection.createRange();return null};mxCellEditor.prototype.restoreSelection=function(a){try{if(a)if(window.getSelection){sel=
@@ -2578,9 +2579,9 @@ this.codeViewMode=!1;this.switchSelectionState=null;this.graph.setSelectionCell(
for(var b=e.firstChild;null!=a&&null!=b;)c(a,b),a=a.nextSibling,b=b.nextSibling;return e}function e(a,c){if(null!=a)if(c.originalNode!=a)b(a);else for(a=a.firstChild,c=c.firstChild;null!=a;){var d=a.nextSibling;null==c?b(a):(e(a,c),c=c.nextSibling);a=d}}function b(a){for(var c=a.firstChild;null!=c;){var e=c.nextSibling;b(c);c=e}1==a.nodeType&&("BR"===a.nodeName||null!=a.firstChild)||3==a.nodeType&&0!=mxUtils.trim(mxUtils.getTextContent(a)).length?(3==a.nodeType&&mxUtils.setTextContent(a,mxUtils.getTextContent(a).replace(/\n|\r/g,
"")),1==a.nodeType&&(a.removeAttribute("style"),a.removeAttribute("class"),a.removeAttribute("width"),a.removeAttribute("cellpadding"),a.removeAttribute("cellspacing"),a.removeAttribute("border"))):a.parentNode.removeChild(a)}G.apply(this,arguments);7!==document.documentMode&&8!==document.documentMode&&mxEvent.addListener(this.textarea,"paste",mxUtils.bind(this,function(a){var b=c(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]>")?e(this.textarea,b):Graph.removePasteFormatting(this.textarea))}),0)}))};mxCellEditor.prototype.toggleViewMode=function(){var a=this.graph.view.getState(this.editingCell);if(null!=a){var c=null!=a&&"0"!=mxUtils.getValue(a.style,"nl2Br","1"),e=this.saveSelection();if(this.codeViewMode){l=mxUtils.extractTextWithWhitespace(this.textarea.childNodes);0<l.length&&"\n"==l.charAt(l.length-1)&&(l=l.substring(0,l.length-1));l=this.graph.sanitizeHtml(c?
-l.replace(/\n/g,"<br/>"):l,!0);this.textarea.className="mxCellEditor geContentEditable";var b=mxUtils.getValue(a.style,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE),c=mxUtils.getValue(a.style,mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY),d=mxUtils.getValue(a.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT),g=(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD,f=(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&
-mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC,k=[];(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&k.push("underline");(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_STRIKETHROUGH)==mxConstants.FONT_STRIKETHROUGH&&k.push("line-through");this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(b*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(b)+
-"px";this.textarea.style.textDecoration=k.join(" ");this.textarea.style.fontWeight=g?"bold":"normal";this.textarea.style.fontStyle=f?"italic":"";this.textarea.style.fontFamily=c;this.textarea.style.textAlign=d;this.textarea.style.padding="0px";this.textarea.innerHTML!=l&&(this.textarea.innerHTML=l,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==
+l.replace(/\n/g,"<br/>"):l,!0);this.textarea.className="mxCellEditor geContentEditable";var b=mxUtils.getValue(a.style,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE),c=mxUtils.getValue(a.style,mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY),d=mxUtils.getValue(a.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT),k=(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD,f=(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&
+mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC,g=[];(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&g.push("underline");(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_STRIKETHROUGH)==mxConstants.FONT_STRIKETHROUGH&&g.push("line-through");this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(b*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(b)+
+"px";this.textarea.style.textDecoration=g.join(" ");this.textarea.style.fontWeight=k?"bold":"normal";this.textarea.style.fontStyle=f?"italic":"";this.textarea.style.fontFamily=c;this.textarea.style.textAlign=d;this.textarea.style.padding="0px";this.textarea.innerHTML!=l&&(this.textarea.innerHTML=l,0==this.textarea.innerHTML.length&&(this.textarea.innerHTML=this.getEmptyLabelText(),this.clearOnChange=0<this.textarea.innerHTML.length));this.codeViewMode=!1}else{this.clearOnChange&&this.textarea.innerHTML==
this.getEmptyLabelText()&&(this.clearOnChange=!1,this.textarea.innerHTML="");var l=mxUtils.htmlEntities(this.textarea.innerHTML);8!=document.documentMode&&(l=mxUtils.replaceTrailingNewlines(l,"<div><br></div>"));l=this.graph.sanitizeHtml(c?l.replace(/\n/g,"").replace(/&lt;br\s*.?&gt;/g,"<br>"):l,!0);this.textarea.className="mxCellEditor mxPlainTextEditor";var b=mxConstants.DEFAULT_FONTSIZE;this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(b*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;
this.textarea.style.fontSize=Math.round(b)+"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!=l&&(this.textarea.innerHTML=l);this.codeViewMode=!0}this.textarea.focus();null!=this.switchSelectionState&&this.restoreSelection(this.switchSelectionState);
this.switchSelectionState=e;this.resize()}};var z=mxCellEditor.prototype.resize;mxCellEditor.prototype.resize=function(a,c){if(null!=this.textarea)if(a=this.graph.getView().getState(this.editingCell),this.codeViewMode&&null!=a){var e=a.view.scale;this.bounds=mxRectangle.fromRectangle(a);if(0==this.bounds.width&&0==this.bounds.height){this.bounds.width=160*e;this.bounds.height=60*e;var b=null!=a.text?a.text.margin:null;null==b&&(b=mxUtils.getAlignmentAsPoint(mxUtils.getValue(a.style,mxConstants.STYLE_ALIGN,
@@ -2588,32 +2589,32 @@ mxConstants.ALIGN_CENTER),mxUtils.getValue(a.style,mxConstants.STYLE_VERTICAL_AL
this.textarea.clientHeight)+"px",this.bounds.height=parseInt(this.textarea.style.height)*e);this.textarea.clientWidth<this.textarea.offsetWidth&&(this.textarea.style.width=Math.round(this.bounds.width/e)+(this.textarea.offsetWidth-this.textarea.clientWidth)+"px",this.bounds.width=parseInt(this.textarea.style.width)*e);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("+e+","+
e+")")}else this.textarea.style.height="",this.textarea.style.overflow="",z.apply(this,arguments)};mxCellEditorGetInitialValue=mxCellEditor.prototype.getInitialValue;mxCellEditor.prototype.getInitialValue=function(a,c){if("0"==mxUtils.getValue(a.style,"html","0"))return mxCellEditorGetInitialValue.apply(this,arguments);var e=this.graph.getEditingValue(a.cell,c);"1"==mxUtils.getValue(a.style,"nl2Br","1")&&(e=e.replace(/\n/g,"<br/>"));return e=this.graph.sanitizeHtml(e,!0)};mxCellEditorGetCurrentValue=
mxCellEditor.prototype.getCurrentValue;mxCellEditor.prototype.getCurrentValue=function(a){if("0"==mxUtils.getValue(a.style,"html","0"))return mxCellEditorGetCurrentValue.apply(this,arguments);var c=this.graph.sanitizeHtml(this.textarea.innerHTML,!0);return c="1"==mxUtils.getValue(a.style,"nl2Br","1")?c.replace(/\r\n/g,"<br/>").replace(/\n/g,"<br/>"):c.replace(/\r\n/g,"").replace(/\n/g,"")};var E=mxCellEditor.prototype.stopEditing;mxCellEditor.prototype.stopEditing=function(a){this.codeViewMode&&this.toggleViewMode();
-E.apply(this,arguments);this.focusContainer()};mxCellEditor.prototype.focusContainer=function(){try{this.graph.container.focus()}catch(Y){}};var H=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(a,c){this.graph.getModel().beginUpdate();try{H.apply(this,arguments),""==c&&this.graph.isCellDeletable(a.cell)&&0==this.graph.model.getChildCount(a.cell)&&this.graph.isTransparentState(a)&&this.graph.removeCells([a.cell],!1)}finally{this.graph.getModel().endUpdate()}};mxCellEditor.prototype.getBackgroundColor=
+E.apply(this,arguments);this.focusContainer()};mxCellEditor.prototype.focusContainer=function(){try{this.graph.container.focus()}catch(ea){}};var H=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(a,c){this.graph.getModel().beginUpdate();try{H.apply(this,arguments),""==c&&this.graph.isCellDeletable(a.cell)&&0==this.graph.model.getChildCount(a.cell)&&this.graph.isTransparentState(a)&&this.graph.removeCells([a.cell],!1)}finally{this.graph.getModel().endUpdate()}};mxCellEditor.prototype.getBackgroundColor=
function(a){var c=mxUtils.getValue(a.style,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,null);null!=c&&c!=mxConstants.NONE||!(null!=a.cell.geometry&&0<a.cell.geometry.width)||0==mxUtils.getValue(a.style,mxConstants.STYLE_ROTATION,0)&&0!=mxUtils.getValue(a.style,mxConstants.STYLE_HORIZONTAL,1)||(c=mxUtils.getValue(a.style,mxConstants.STYLE_FILLCOLOR,null));c==mxConstants.NONE&&(c=null);return c};mxCellEditor.prototype.getMinimumSize=function(a){var c=this.graph.getView().scale;return new mxRectangle(0,
0,null==a.text?30:a.text.size*c+20,30)};mxGraphHandlerIsValidDropTarget=mxGraphHandler.prototype.isValidDropTarget;mxGraphHandler.prototype.isValidDropTarget=function(a,c){return mxGraphHandlerIsValidDropTarget.apply(this,arguments)&&!mxEvent.isAltDown(c.getEvent)};mxGraphView.prototype.formatUnitText=function(a){return a?b(a,this.unit):a};mxGraphHandler.prototype.updateHint=function(c){if(null!=this.pBounds&&(null!=this.shape||this.livePreviewActive)){null==this.hint&&(this.hint=a(),this.graph.container.appendChild(this.hint));
var e=this.graph.view.translate,d=this.graph.view.scale;c=this.roundLength((this.bounds.x+this.currentDx)/d-e.x);e=this.roundLength((this.bounds.y+this.currentDy)/d-e.y);d=this.graph.view.unit;this.hint.innerHTML=b(c,d)+", "+b(e,d);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 K=mxStackLayout.prototype.resizeCell;mxStackLayout.prototype.resizeCell=function(a,c){K.apply(this,arguments);var e=this.graph.getCellStyle(a);if(null==e.childLayout){var b=this.graph.model.getParent(a),d=null!=b?this.graph.getCellGeometry(b):null;if(null!=d&&(e=this.graph.getCellStyle(b),"stackLayout"==e.childLayout)){var g=parseFloat(mxUtils.getValue(e,"stackBorder",mxStackLayout.prototype.border)),e="1"==mxUtils.getValue(e,"horizontalStack",
-"1"),f=this.graph.getActualStartSize(b),d=d.clone();e?d.height=c.height+f.y+f.height+2*g:d.width=c.width+f.x+f.width+2*g;this.graph.model.setGeometry(b,d)}}};var F=mxSelectionCellsHandler.prototype.getHandledSelectionCells;mxSelectionCellsHandler.prototype.getHandledSelectionCells=function(){function a(a){e.get(a)||(e.put(a,!0),d.push(a))}for(var c=F.apply(this,arguments),e=new mxDictionary,b=this.graph.model,d=[],g=0;g<c.length;g++){var f=c[g];this.graph.isTableCell(f)?a(b.getParent(b.getParent(f))):
-this.graph.isTableRow(f)&&a(b.getParent(f));a(f)}return d};var I=mxVertexHandler.prototype.createParentHighlightShape;mxVertexHandler.prototype.createParentHighlightShape=function(a){var c=I.apply(this,arguments);c.stroke="#C0C0C0";c.strokewidth=1;return c};var C=mxEdgeHandler.prototype.createParentHighlightShape;mxEdgeHandler.prototype.createParentHighlightShape=function(a){var c=C.apply(this,arguments);c.stroke="#C0C0C0";c.strokewidth=1;return c};mxVertexHandler.prototype.rotationHandleVSpacing=
+(this.hint.parentNode.removeChild(this.hint),this.hint=null)};var K=mxStackLayout.prototype.resizeCell;mxStackLayout.prototype.resizeCell=function(a,c){K.apply(this,arguments);var e=this.graph.getCellStyle(a);if(null==e.childLayout){var b=this.graph.model.getParent(a),d=null!=b?this.graph.getCellGeometry(b):null;if(null!=d&&(e=this.graph.getCellStyle(b),"stackLayout"==e.childLayout)){var k=parseFloat(mxUtils.getValue(e,"stackBorder",mxStackLayout.prototype.border)),e="1"==mxUtils.getValue(e,"horizontalStack",
+"1"),f=this.graph.getActualStartSize(b),d=d.clone();e?d.height=c.height+f.y+f.height+2*k:d.width=c.width+f.x+f.width+2*k;this.graph.model.setGeometry(b,d)}}};var F=mxSelectionCellsHandler.prototype.getHandledSelectionCells;mxSelectionCellsHandler.prototype.getHandledSelectionCells=function(){function a(a){e.get(a)||(e.put(a,!0),d.push(a))}for(var c=F.apply(this,arguments),e=new mxDictionary,b=this.graph.model,d=[],k=0;k<c.length;k++){var f=c[k];this.graph.isTableCell(f)?a(b.getParent(b.getParent(f))):
+this.graph.isTableRow(f)&&a(b.getParent(f));a(f)}return d};var I=mxVertexHandler.prototype.createParentHighlightShape;mxVertexHandler.prototype.createParentHighlightShape=function(a){var c=I.apply(this,arguments);c.stroke="#C0C0C0";c.strokewidth=1;return c};var D=mxEdgeHandler.prototype.createParentHighlightShape;mxEdgeHandler.prototype.createParentHighlightShape=function(a){var c=D.apply(this,arguments);c.stroke="#C0C0C0";c.strokewidth=1;return c};mxVertexHandler.prototype.rotationHandleVSpacing=
-12;mxVertexHandler.prototype.getRotationHandlePosition=function(){var a=this.getHandlePadding();return new mxPoint(this.bounds.x+this.bounds.width-this.rotationHandleVSpacing+a.x/2,this.bounds.y+this.rotationHandleVSpacing-a.y/2)};mxVertexHandler.prototype.isRecursiveResize=function(a,c){return this.graph.isRecursiveVertexResize(a)&&!mxEvent.isControlDown(c.getEvent())};mxVertexHandler.prototype.isCenteredEvent=function(a,c){return!(!this.graph.isSwimlane(a.cell)&&0<this.graph.model.getChildCount(a.cell)&&
!this.graph.isCellCollapsed(a.cell)&&"1"==mxUtils.getValue(a.style,"recursiveResize","1")&&null==mxUtils.getValue(a.style,"childLayout",null))&&mxEvent.isControlDown(c.getEvent())||mxEvent.isMetaDown(c.getEvent())};var M=mxVertexHandler.prototype.isRotationHandleVisible;mxVertexHandler.prototype.isRotationHandleVisible=function(){return M.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 U=mxVertexHandler.prototype.isParentHighlightVisible;mxVertexHandler.prototype.isParentHighlightVisible=function(){return U.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)};var O=mxVertexHandler.prototype.isCustomHandleVisible;mxVertexHandler.prototype.isCustomHandleVisible=
function(a){return a.tableHandle||O.apply(this,arguments)&&(!this.graph.isTable(this.state.cell)||this.graph.isCellSelected(this.state.cell))};mxVertexHandler.prototype.getSelectionBorderInset=function(){var a=0;this.graph.isTableRow(this.state.cell)?a=1:this.graph.isTableCell(this.state.cell)&&(a=2);return a};var N=mxVertexHandler.prototype.getSelectionBorderBounds;mxVertexHandler.prototype.getSelectionBorderBounds=function(){return N.apply(this,arguments).grow(-this.getSelectionBorderInset())};
-var v=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){var a=v.apply(this,arguments);if(this.graph.isTable(this.state.cell)){var c=this.graph,e=c.model,b=this.state,d=this.selectionBorder,g=this;null==a&&(a=[]);var f=c.view.getCellStates(e.getChildCells(this.state.cell,!0));if(0<f.length){for(var k=c.view.getCellStates(e.getChildCells(f[0].cell,!0)),e=0;e<k.length;e++)mxUtils.bind(this,function(e){var f=k[e],l=e<k.length-1?k[e+1]:null,n=new mxLine(new mxRectangle,
-mxConstants.NONE,1,!0);n.isDashed=d.isDashed;n.svgStrokeTolerance++;n=new mxHandle(f,"col-resize",null,n);n.tableHandle=!0;var v=0;n.shape.node.parentNode.insertBefore(n.shape.node,n.shape.node.parentNode.firstChild);n.redraw=function(){if(null!=this.shape&&null!=this.state.shape){var a=c.getActualStartSize(b.cell);this.shape.stroke=0==v?mxConstants.NONE:d.stroke;this.shape.bounds.x=this.state.x+this.state.width+v*this.graph.view.scale;this.shape.bounds.width=1;this.shape.bounds.y=b.y+(e==k.length-
-1?0:a.y*this.graph.view.scale);this.shape.bounds.height=b.height-(e==k.length-1?0:(a.height+a.y)*this.graph.view.scale);this.shape.redraw()}};var q=!1;n.setPosition=function(a,e,b){v=Math.max(Graph.minTableColumnWidth-a.width,e.x-a.x-a.width);q=mxEvent.isShiftDown(b.getEvent());null==l||q||(v=Math.min((l.x+l.width-f.x-f.width)/c.view.scale-Graph.minTableColumnWidth,v))};n.execute=function(a){if(0!=v)c.setTableColumnWidth(this.state.cell,v,q);else if(!g.blockDelayedSelection){var e=c.getCellAt(a.getGraphX(),
-a.getGraphY())||b.cell;c.graphHandler.selectCellForEvent(e,a)}v=0};n.reset=function(){v=0};a.push(n)})(e);for(e=0;e<f.length;e++)mxUtils.bind(this,function(e){e=f[e];var k=new mxLine(new mxRectangle,mxConstants.NONE,1);k.isDashed=d.isDashed;k.svgStrokeTolerance++;e=new mxHandle(e,"row-resize",null,k);e.tableHandle=!0;var l=0;e.shape.node.parentNode.insertBefore(e.shape.node,e.shape.node.parentNode.firstChild);e.redraw=function(){null!=this.shape&&null!=this.state.shape&&(this.shape.stroke=0==l?mxConstants.NONE:
-d.stroke,this.shape.bounds.x=this.state.x,this.shape.bounds.width=this.state.width,this.shape.bounds.y=this.state.y+this.state.height+l*this.graph.view.scale,this.shape.bounds.height=1,this.shape.redraw())};e.setPosition=function(a,c,e){l=Math.max(Graph.minTableRowHeight-a.height,c.y-a.y-a.height)};e.execute=function(a){if(0!=l)c.setTableRowHeight(this.state.cell,l,!mxEvent.isShiftDown(a.getEvent()));else if(!g.blockDelayedSelection){var e=c.getCellAt(a.getGraphX(),a.getGraphY())||b.cell;c.graphHandler.selectCellForEvent(e,
-a)}l=0};e.reset=function(){l=0};a.push(e)})(e)}}return null!=a?a.reverse():null};var D=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(a){D.apply(this,arguments);if(null!=this.moveHandles)for(var c=0;c<this.moveHandles.length;c++)this.moveHandles[c].style.visibility=a?"":"hidden";if(null!=this.cornerHandles)for(c=0;c<this.cornerHandles.length;c++)this.cornerHandles[c].node.style.visibility=a?"":"hidden"};mxVertexHandler.prototype.refreshMoveHandles=
+var v=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){var a=v.apply(this,arguments);if(this.graph.isTable(this.state.cell)){var c=this.graph,e=c.model,b=this.state,d=this.selectionBorder,k=this;null==a&&(a=[]);var f=c.view.getCellStates(e.getChildCells(this.state.cell,!0));if(0<f.length){for(var g=c.view.getCellStates(e.getChildCells(f[0].cell,!0)),e=0;e<g.length;e++)mxUtils.bind(this,function(e){var f=g[e],l=e<g.length-1?g[e+1]:null,n=new mxLine(new mxRectangle,
+mxConstants.NONE,1,!0);n.isDashed=d.isDashed;n.svgStrokeTolerance++;n=new mxHandle(f,"col-resize",null,n);n.tableHandle=!0;var v=0;n.shape.node.parentNode.insertBefore(n.shape.node,n.shape.node.parentNode.firstChild);n.redraw=function(){if(null!=this.shape&&null!=this.state.shape){var a=c.getActualStartSize(b.cell);this.shape.stroke=0==v?mxConstants.NONE:d.stroke;this.shape.bounds.x=this.state.x+this.state.width+v*this.graph.view.scale;this.shape.bounds.width=1;this.shape.bounds.y=b.y+(e==g.length-
+1?0:a.y*this.graph.view.scale);this.shape.bounds.height=b.height-(e==g.length-1?0:(a.height+a.y)*this.graph.view.scale);this.shape.redraw()}};var q=!1;n.setPosition=function(a,e,b){v=Math.max(Graph.minTableColumnWidth-a.width,e.x-a.x-a.width);q=mxEvent.isShiftDown(b.getEvent());null==l||q||(v=Math.min((l.x+l.width-f.x-f.width)/c.view.scale-Graph.minTableColumnWidth,v))};n.execute=function(a){if(0!=v)c.setTableColumnWidth(this.state.cell,v,q);else if(!k.blockDelayedSelection){var e=c.getCellAt(a.getGraphX(),
+a.getGraphY())||b.cell;c.graphHandler.selectCellForEvent(e,a)}v=0};n.reset=function(){v=0};a.push(n)})(e);for(e=0;e<f.length;e++)mxUtils.bind(this,function(e){e=f[e];var g=new mxLine(new mxRectangle,mxConstants.NONE,1);g.isDashed=d.isDashed;g.svgStrokeTolerance++;e=new mxHandle(e,"row-resize",null,g);e.tableHandle=!0;var l=0;e.shape.node.parentNode.insertBefore(e.shape.node,e.shape.node.parentNode.firstChild);e.redraw=function(){null!=this.shape&&null!=this.state.shape&&(this.shape.stroke=0==l?mxConstants.NONE:
+d.stroke,this.shape.bounds.x=this.state.x,this.shape.bounds.width=this.state.width,this.shape.bounds.y=this.state.y+this.state.height+l*this.graph.view.scale,this.shape.bounds.height=1,this.shape.redraw())};e.setPosition=function(a,c,e){l=Math.max(Graph.minTableRowHeight-a.height,c.y-a.y-a.height)};e.execute=function(a){if(0!=l)c.setTableRowHeight(this.state.cell,l,!mxEvent.isShiftDown(a.getEvent()));else if(!k.blockDelayedSelection){var e=c.getCellAt(a.getGraphX(),a.getGraphY())||b.cell;c.graphHandler.selectCellForEvent(e,
+a)}l=0};e.reset=function(){l=0};a.push(e)})(e)}}return null!=a?a.reverse():null};var C=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(a){C.apply(this,arguments);if(null!=this.moveHandles)for(var c=0;c<this.moveHandles.length;c++)this.moveHandles[c].style.visibility=a?"":"hidden";if(null!=this.cornerHandles)for(c=0;c<this.cornerHandles.length;c++)this.cornerHandles[c].node.style.visibility=a?"":"hidden"};mxVertexHandler.prototype.refreshMoveHandles=
function(){var a=this.graph.model;if(null!=this.moveHandles){for(var c=0;c<this.moveHandles.length;c++)this.moveHandles[c].parentNode.removeChild(this.moveHandles[c]);this.moveHandles=null}this.moveHandles=[];for(c=0;c<a.getChildCount(this.state.cell);c++)mxUtils.bind(this,function(c){if(null!=c&&a.isVertex(c.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=
c;mxEvent.addGestureListeners(e,mxUtils.bind(this,function(a){this.graph.popupMenuHandler.hideMenu();this.graph.stopEditing(!1);!this.graph.isToggleEvent(a)&&this.graph.isCellSelected(c.cell)||this.graph.selectCellForEvent(c.cell,a);mxEvent.isPopupTrigger(a)||(this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(a),mxEvent.getClientY(a),this.graph.getSelectionCells()),this.graph.graphHandler.cellWasClicked=!0,this.graph.isMouseTrigger=mxEvent.isMouseEvent(a),this.graph.isMouseDown=!0);
mxEvent.consume(a)}),null,mxUtils.bind(this,function(a){mxEvent.isPopupTrigger(a)&&(this.graph.popupMenuHandler.popup(mxEvent.getClientX(a),mxEvent.getClientY(a),c.cell,a),mxEvent.consume(a))}));this.moveHandles.push(e);this.graph.container.appendChild(e)}})(this.graph.view.getState(a.getChildAt(this.state.cell,c)))};mxVertexHandler.prototype.refresh=function(){if(null!=this.customHandles){for(var a=0;a<this.customHandles.length;a++)this.customHandles[a].destroy();this.customHandles=this.createCustomHandles()}this.graph.isTable(this.state.cell)&&
this.refreshMoveHandles()};var B=mxVertexHandler.prototype.getHandlePadding;mxVertexHandler.prototype.getHandlePadding=function(){var a=new mxPoint(0,0),c=this.tolerance,e=this.state.style.shape;null==mxCellRenderer.defaultShapes[e]&&mxStencilRegistry.getStencil(e);e=this.graph.isTable(this.state.cell)||this.graph.cellEditor.getEditingCell()==this.state.cell;if(!e&&null!=this.customHandles)for(var b=0;b<this.customHandles.length;b++)if(null!=this.customHandles[b].shape&&null!=this.customHandles[b].shape.bounds){var d=
-this.customHandles[b].shape.bounds,g=d.getCenterX(),f=d.getCenterY();if(Math.abs(this.state.x-g)<d.width/2||Math.abs(this.state.y-f)<d.height/2||Math.abs(this.state.x+this.state.width-g)<d.width/2||Math.abs(this.state.y+this.state.height-f)<d.height/2){e=!0;break}}e&&null!=this.sizers&&0<this.sizers.length&&null!=this.sizers[0]?(c/=2,this.graph.isTable(this.state.cell)&&(c+=7),a.x=this.sizers[0].bounds.width+c,a.y=this.sizers[0].bounds.height+c):a=B.apply(this,arguments);return a};mxVertexHandler.prototype.updateHint=
+this.customHandles[b].shape.bounds,k=d.getCenterX(),f=d.getCenterY();if(Math.abs(this.state.x-k)<d.width/2||Math.abs(this.state.y-f)<d.height/2||Math.abs(this.state.x+this.state.width-k)<d.width/2||Math.abs(this.state.y+this.state.height-f)<d.height/2){e=!0;break}}e&&null!=this.sizers&&0<this.sizers.length&&null!=this.sizers[0]?(c/=2,this.graph.isTable(this.state.cell)&&(c+=7),a.x=this.sizers[0].bounds.width+c,a.y=this.sizers[0].bounds.height+c):a=B.apply(this,arguments);return a};mxVertexHandler.prototype.updateHint=
function(c){if(this.index!=mxEvent.LABEL_HANDLE){null==this.hint&&(this.hint=a(),this.state.view.graph.container.appendChild(this.hint));if(this.index==mxEvent.ROTATION_HANDLE)this.hint.innerHTML=this.currentAlpha+"&deg;";else{c=this.state.view.scale;var e=this.state.view.unit;this.hint.innerHTML=b(this.roundLength(this.bounds.width/c),e)+" x "+b(this.roundLength(this.bounds.height/c),e)}c=mxUtils.getBoundingBox(this.bounds,null!=this.currentAlpha?this.currentAlpha:this.state.style[mxConstants.STYLE_ROTATION]||
"0");null==c&&(c=this.bounds);this.hint.style.left=c.x+Math.round((c.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=c.y+c.height+Editor.hintOffset+"px";null!=this.linkHint&&(this.linkHint.style.display="none")}};mxVertexHandler.prototype.removeHint=function(){mxGraphHandler.prototype.removeHint.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.display="")};var J=mxEdgeHandler.prototype.mouseMove;mxEdgeHandler.prototype.mouseMove=function(a,c){J.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 L=mxEdgeHandler.prototype.mouseUp;mxEdgeHandler.prototype.mouseUp=function(a,c){L.apply(this,arguments);null!=this.linkHint&&"none"==this.linkHint.style.display&&(this.linkHint.style.display="")};mxEdgeHandler.prototype.updateHint=function(c,e){null==this.hint&&(this.hint=a(),this.state.view.graph.container.appendChild(this.hint));var d=
-this.graph.view.translate,g=this.graph.view.scale,f=this.roundLength(e.x/g-d.x),d=this.roundLength(e.y/g-d.y),g=this.graph.view.unit;this.hint.innerHTML=b(f,g)+", "+b(d,g);this.hint.style.visibility="visible";if(this.isSource||this.isTarget)null!=this.constraintHandler.currentConstraint&&null!=this.constraintHandler.currentFocus?(f=this.constraintHandler.currentConstraint.point,this.hint.innerHTML="["+Math.round(100*f.x)+"%, "+Math.round(100*f.y)+"%]"):this.marker.hasValidState()&&(this.hint.style.visibility=
+this.graph.view.translate,k=this.graph.view.scale,f=this.roundLength(e.x/k-d.x),d=this.roundLength(e.y/k-d.y),k=this.graph.view.unit;this.hint.innerHTML=b(f,k)+", "+b(d,k);this.hint.style.visibility="visible";if(this.isSource||this.isTarget)null!=this.constraintHandler.currentConstraint&&null!=this.constraintHandler.currentFocus?(f=this.constraintHandler.currentConstraint.point,this.hint.innerHTML="["+Math.round(100*f.x)+"%, "+Math.round(100*f.y)+"%]"):this.marker.hasValidState()&&(this.hint.style.visibility=
"hidden");this.hint.style.left=Math.round(c.getGraphX()-this.hint.clientWidth/2)+"px";this.hint.style.top=Math.max(c.getGraphY(),e.y)+Editor.hintOffset+"px";null!=this.linkHint&&(this.linkHint.style.display="none")};mxEdgeHandler.prototype.removeHint=mxVertexHandler.prototype.removeHint;HoverIcons.prototype.mainHandle=mxClient.IS_SVG?Graph.createSvgImage(18,18,'<circle cx="9" cy="9" r="5" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'" stroke-width="1"/>'):new mxImage(IMAGE_PATH+"/handle-main.png",
17,17);HoverIcons.prototype.secondaryHandle=mxClient.IS_SVG?Graph.createSvgImage(16,16,'<path d="m 8 3 L 13 8 L 8 13 L 3 8 z" stroke="#fff" fill="#fca000"/>'):new mxImage(IMAGE_PATH+"/handle-secondary.png",17,17);HoverIcons.prototype.fixedHandle=mxClient.IS_SVG?Graph.createSvgImage(22,22,'<circle cx="11" cy="11" r="6" stroke="#fff" fill="#01bd22" stroke-width="1"/><path d="m 8 8 L 14 14M 8 14 L 14 8" stroke="#fff"/>'):new mxImage(IMAGE_PATH+"/handle-fixed.png",17,17);HoverIcons.prototype.terminalHandle=
mxClient.IS_SVG?Graph.createSvgImage(22,22,'<circle cx="11" cy="11" r="6" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'" stroke-width="1"/><circle cx="11" cy="11" r="3" stroke="#fff" fill="transparent"/>'):new mxImage(IMAGE_PATH+"/handle-terminal.png",17,17);HoverIcons.prototype.rotationHandle=mxClient.IS_SVG?Graph.createSvgImage(16,16,'<path stroke="'+HoverIcons.prototype.arrowFill+'" fill="'+HoverIcons.prototype.arrowFill+'" d="M15.55 5.55L11 1v3.07C7.06 4.56 4 7.92 4 12s3.05 7.44 7 7.93v-2.02c-2.84-.48-5-2.94-5-5.91s2.16-5.43 5-5.91V10l4.55-4.45zM19.93 11c-.17-1.39-.72-2.73-1.62-3.89l-1.42 1.42c.54.75.88 1.6 1.02 2.47h2.02zM13 17.9v2.02c1.39-.17 2.74-.71 3.9-1.61l-1.44-1.44c-.75.54-1.59.89-2.46 1.03zm3.89-2.42l1.42 1.41c.9-1.16 1.45-2.5 1.62-3.89h-2.02c-.14.87-.48 1.72-1.02 2.48z"/>',
@@ -2625,17 +2626,17 @@ Sidebar.prototype.refreshTarget=HoverIcons.prototype.refreshTarget,Sidebar.proto
function(a){return!mxEvent.isShiftDown(a.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(a){return mxEvent.isMouseEvent(a.getEvent())?4:this.graph.getTolerance()};mxPanningHandler.prototype.isPanningTrigger=
function(a){var c=a.getEvent();return null==a.getState()&&!mxEvent.isMouseEvent(c)||mxEvent.isPopupTrigger(c)&&(null==a.getState()||mxEvent.isControlDown(c)||mxEvent.isShiftDown(c))};var W=mxGraphHandler.prototype.mouseDown;mxGraphHandler.prototype.mouseDown=function(a,c){W.apply(this,arguments);mxEvent.isTouchEvent(c.getEvent())&&this.graph.isCellSelected(c.getCell())&&1<this.graph.getSelectionCount()&&(this.delayedSelection=!1)}}else mxPanningHandler.prototype.isPanningTrigger=function(a){var c=
a.getEvent();return mxEvent.isLeftMouseButton(c)&&(this.useLeftButtonForPanning&&null==a.getState()||mxEvent.isControlDown(c)&&!mxEvent.isShiftDown(c))||this.usePopupTrigger&&mxEvent.isPopupTrigger(c)};mxRubberband.prototype.isSpaceEvent=function(a){return this.graph.isEnabled()&&!this.graph.isCellLocked(this.graph.getDefaultParent())&&mxEvent.isControlDown(a.getEvent())&&mxEvent.isShiftDown(a.getEvent())};mxRubberband.prototype.cancelled=!1;mxRubberband.prototype.cancel=function(){this.isActive()&&
-(this.cancelled=!0,this.reset())};mxRubberband.prototype.mouseUp=function(a,c){if(this.cancelled)this.cancelled=!1,c.consume();else{var e=null!=this.div&&"none"!=this.div.style.display,b=null,d=null,g=null,f=null;null!=this.first&&null!=this.currentX&&null!=this.currentY&&(b=this.first.x,d=this.first.y,g=(this.currentX-b)/this.graph.view.scale,f=(this.currentY-d)/this.graph.view.scale,mxEvent.isAltDown(c.getEvent())||(g=this.graph.snap(g),f=this.graph.snap(f),this.graph.isGridEnabled()||(Math.abs(g)<
-this.graph.tolerance&&(g=0),Math.abs(f)<this.graph.tolerance&&(f=0))));this.reset();if(e){if(mxEvent.isAltDown(c.getEvent())&&this.graph.isToggleEvent(c.getEvent())){var g=new mxRectangle(this.x,this.y,this.width,this.height),k=this.graph.getCells(g.x,g.y,g.width,g.height);this.graph.removeSelectionCells(k)}else if(this.isSpaceEvent(c)){this.graph.model.beginUpdate();try{for(k=this.graph.getCellsBeyond(b,d,this.graph.getDefaultParent(),!0,!0),e=0;e<k.length;e++)if(this.graph.isCellMovable(k[e])){var l=
-this.graph.view.getState(k[e]),n=this.graph.getCellGeometry(k[e]);null!=l&&null!=n&&(n=n.clone(),n.translate(g,f),this.graph.model.setGeometry(k[e],n))}}finally{this.graph.model.endUpdate()}}else g=new mxRectangle(this.x,this.y,this.width,this.height),this.graph.selectRegion(g,c.getEvent());c.consume()}}};mxRubberband.prototype.mouseMove=function(a,c){if(!c.isConsumed()&&null!=this.first){var e=mxUtils.getScrollOrigin(this.graph.container),b=mxUtils.getOffset(this.graph.container);e.x-=b.x;e.y-=b.y;
-var b=c.getX()+e.x,e=c.getY()+e.y,d=this.first.x-b,g=this.first.y-e,f=this.graph.tolerance;if(null!=this.div||Math.abs(d)>f||Math.abs(g)>f)null==this.div&&(this.div=this.createShape()),mxUtils.clearSelection(),this.update(b,e),this.isSpaceEvent(c)?(b=this.x+this.width,e=this.y+this.height,d=this.graph.view.scale,mxEvent.isAltDown(c.getEvent())||(this.width=this.graph.snap(this.width/d)*d,this.height=this.graph.snap(this.height/d)*d,this.graph.isGridEnabled()||(this.width<this.graph.tolerance&&(this.width=
+(this.cancelled=!0,this.reset())};mxRubberband.prototype.mouseUp=function(a,c){if(this.cancelled)this.cancelled=!1,c.consume();else{var e=null!=this.div&&"none"!=this.div.style.display,b=null,d=null,k=null,f=null;null!=this.first&&null!=this.currentX&&null!=this.currentY&&(b=this.first.x,d=this.first.y,k=(this.currentX-b)/this.graph.view.scale,f=(this.currentY-d)/this.graph.view.scale,mxEvent.isAltDown(c.getEvent())||(k=this.graph.snap(k),f=this.graph.snap(f),this.graph.isGridEnabled()||(Math.abs(k)<
+this.graph.tolerance&&(k=0),Math.abs(f)<this.graph.tolerance&&(f=0))));this.reset();if(e){if(mxEvent.isAltDown(c.getEvent())&&this.graph.isToggleEvent(c.getEvent())){var k=new mxRectangle(this.x,this.y,this.width,this.height),g=this.graph.getCells(k.x,k.y,k.width,k.height);this.graph.removeSelectionCells(g)}else if(this.isSpaceEvent(c)){this.graph.model.beginUpdate();try{for(g=this.graph.getCellsBeyond(b,d,this.graph.getDefaultParent(),!0,!0),e=0;e<g.length;e++)if(this.graph.isCellMovable(g[e])){var l=
+this.graph.view.getState(g[e]),n=this.graph.getCellGeometry(g[e]);null!=l&&null!=n&&(n=n.clone(),n.translate(k,f),this.graph.model.setGeometry(g[e],n))}}finally{this.graph.model.endUpdate()}}else k=new mxRectangle(this.x,this.y,this.width,this.height),this.graph.selectRegion(k,c.getEvent());c.consume()}}};mxRubberband.prototype.mouseMove=function(a,c){if(!c.isConsumed()&&null!=this.first){var e=mxUtils.getScrollOrigin(this.graph.container),b=mxUtils.getOffset(this.graph.container);e.x-=b.x;e.y-=b.y;
+var b=c.getX()+e.x,e=c.getY()+e.y,d=this.first.x-b,k=this.first.y-e,f=this.graph.tolerance;if(null!=this.div||Math.abs(d)>f||Math.abs(k)>f)null==this.div&&(this.div=this.createShape()),mxUtils.clearSelection(),this.update(b,e),this.isSpaceEvent(c)?(b=this.x+this.width,e=this.y+this.height,d=this.graph.view.scale,mxEvent.isAltDown(c.getEvent())||(this.width=this.graph.snap(this.width/d)*d,this.height=this.graph.snap(this.height/d)*d,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=b-this.width),this.y<this.first.y&&(this.y=e-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)),c.consume()}};var Q=mxRubberband.prototype.reset;mxRubberband.prototype.reset=function(){null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null);Q.apply(this,arguments)};var aa=(new Date).getTime(),na=0,ga=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=function(a,c,e,b){ga.apply(this,arguments);e!=this.currentTerminalState?(aa=(new Date).getTime(),na=0):na=(new Date).getTime()-aa;this.currentTerminalState=
-e};var ea=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(a){return null!=this.currentTerminalState&&a.getState()==this.currentTerminalState&&2E3<na||(null==this.currentTerminalState||"0"!=mxUtils.getValue(this.currentTerminalState.style,"outlineConnect","1"))&&ea.apply(this,arguments)};mxEdgeHandler.prototype.createHandleShape=function(a,c){var e=null!=a&&0==a,b=this.state.getVisibleTerminalState(e),d=null!=a&&(0==a||a>=this.state.absolutePoints.length-
+this.secondDiv=null)),c.consume()}};var Q=mxRubberband.prototype.reset;mxRubberband.prototype.reset=function(){null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null);Q.apply(this,arguments)};var Z=(new Date).getTime(),na=0,ga=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=function(a,c,e,b){ga.apply(this,arguments);e!=this.currentTerminalState?(Z=(new Date).getTime(),na=0):na=(new Date).getTime()-Z;this.currentTerminalState=
+e};var da=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(a){return null!=this.currentTerminalState&&a.getState()==this.currentTerminalState&&2E3<na||(null==this.currentTerminalState||"0"!=mxUtils.getValue(this.currentTerminalState.style,"outlineConnect","1"))&&da.apply(this,arguments)};mxEdgeHandler.prototype.createHandleShape=function(a,c){var e=null!=a&&0==a,b=this.state.getVisibleTerminalState(e),d=null!=a&&(0==a||a>=this.state.absolutePoints.length-
1||this.constructor==mxElbowEdgeHandler&&2==a)?this.graph.getConnectionConstraint(this.state,b,e):null,e=null!=(null!=d?this.graph.getConnectionPoint(this.state.getVisibleTerminalState(e),d):null)?this.fixedHandleImage:null!=d&&null!=b?this.terminalHandleImage:this.handleImage;if(null!=e)return e=new mxImageShape(new mxRectangle(0,0,e.width,e.height),e.src),e.preserveImageAspect=!1,e;e=mxConstants.HANDLE_SIZE;this.preferHtml&&--e;return new mxRectangleShape(new mxRectangle(0,0,e,e),mxConstants.HANDLE_FILLCOLOR,
mxConstants.HANDLE_STROKECOLOR)};var la=mxVertexHandler.prototype.createSizerShape;mxVertexHandler.prototype.createSizerShape=function(a,c,e){this.handleImage=c==mxEvent.ROTATION_HANDLE?HoverIcons.prototype.rotationHandle:c==mxEvent.LABEL_HANDLE?this.secondaryHandleImage:this.handleImage;return la.apply(this,arguments)};var V=mxGraphHandler.prototype.getBoundingBox;mxGraphHandler.prototype.getBoundingBox=function(a){if(null!=a&&1==a.length){var c=this.graph.getModel(),e=c.getParent(a[0]),b=this.graph.getCellGeometry(a[0]);
-if(c.isEdge(e)&&null!=b&&b.relative&&(c=this.graph.view.getState(a[0]),null!=c&&2>c.width&&2>c.height&&null!=c.text&&null!=c.text.boundingBox))return mxRectangle.fromRectangle(c.text.boundingBox)}return V.apply(this,arguments)};var ca=mxGraphHandler.prototype.getGuideStates;mxGraphHandler.prototype.getGuideStates=function(){for(var a=ca.apply(this,arguments),c=[],e=0;e<a.length;e++)"1"!=mxUtils.getValue(a[e].style,"part","0")&&c.push(a[e]);return c};var ma=mxVertexHandler.prototype.getSelectionBounds;
+if(c.isEdge(e)&&null!=b&&b.relative&&(c=this.graph.view.getState(a[0]),null!=c&&2>c.width&&2>c.height&&null!=c.text&&null!=c.text.boundingBox))return mxRectangle.fromRectangle(c.text.boundingBox)}return V.apply(this,arguments)};var ba=mxGraphHandler.prototype.getGuideStates;mxGraphHandler.prototype.getGuideStates=function(){for(var a=ba.apply(this,arguments),c=[],e=0;e<a.length;e++)"1"!=mxUtils.getValue(a[e].style,"part","0")&&c.push(a[e]);return c};var ma=mxVertexHandler.prototype.getSelectionBounds;
mxVertexHandler.prototype.getSelectionBounds=function(a){var c=this.graph.getModel(),e=c.getParent(a.cell),b=this.graph.getCellGeometry(a.cell);return c.isEdge(e)&&null!=b&&b.relative&&2>a.width&&2>a.height&&null!=a.text&&null!=a.text.boundingBox?(c=a.text.unrotatedBoundingBox||a.text.boundingBox,new mxRectangle(Math.round(c.x),Math.round(c.y),Math.round(c.width),Math.round(c.height))):ma.apply(this,arguments)};var T=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(a,
c){var e=this.graph.getModel(),b=e.getParent(this.state.cell),d=this.graph.getCellGeometry(this.state.cell);(this.getHandleForEvent(c)==mxEvent.ROTATION_HANDLE||!e.isEdge(b)||null==d||!d.relative||null==this.state||2<=this.state.width||2<=this.state.height)&&T.apply(this,arguments)};mxVertexHandler.prototype.rotateClick=function(){var a=mxUtils.getValue(this.state.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),c=mxUtils.getValue(this.state.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);
this.state.view.graph.model.isVertex(this.state.cell)&&a==mxConstants.NONE&&c==mxConstants.NONE?(a=mxUtils.mod(mxUtils.getValue(this.state.style,mxConstants.STYLE_ROTATION,0)+90,360),this.state.view.graph.setCellStyles(mxConstants.STYLE_ROTATION,a,[this.state.cell])):this.state.view.graph.turnShapes([this.state.cell])};var P=mxVertexHandler.prototype.mouseMove;mxVertexHandler.prototype.mouseMove=function(a,c){P.apply(this,arguments);null!=this.graph.graphHandler.first&&(null!=this.rotationShape&&
@@ -2646,7 +2647,7 @@ b()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.changeHandl
function(c,e){try{if(null==c&&(null==e||0==e.length)||1<this.graph.getSelectionCount())null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);else if(null!=c||null!=e&&0<e.length){null==this.linkHint&&(this.linkHint=a(),this.linkHint.style.padding="6px 8px 6px 8px",this.linkHint.style.opacity="1",this.linkHint.style.filter="",this.graph.container.appendChild(this.linkHint),mxEvent.addListener(this.linkHint,"mouseenter",mxUtils.bind(this,function(){this.graph.tooltipHandler.hide()})));
this.linkHint.innerHTML="";if(null!=c&&(this.linkHint.appendChild(this.graph.createLinkForHint(c)),this.graph.isEnabled()&&"function"===typeof this.graph.editLink)){var b=document.createElement("img");b.setAttribute("src",Editor.editImage);b.setAttribute("title",mxResources.get("editLink"));b.setAttribute("width","11");b.setAttribute("height","11");b.style.marginLeft="10px";b.style.marginBottom="-1px";b.style.cursor="pointer";this.linkHint.appendChild(b);mxEvent.addListener(b,"click",mxUtils.bind(this,
function(a){this.graph.setSelectionCell(this.state.cell);this.graph.editLink();mxEvent.consume(a)}));var d=document.createElement("img");d.setAttribute("src",Dialog.prototype.clearImage);d.setAttribute("title",mxResources.get("removeIt",[mxResources.get("link")]));d.setAttribute("width","13");d.setAttribute("height","10");d.style.marginLeft="4px";d.style.marginBottom="-1px";d.style.cursor="pointer";this.linkHint.appendChild(d);mxEvent.addListener(d,"click",mxUtils.bind(this,function(a){this.graph.setLinkForCell(this.state.cell,
-null);mxEvent.consume(a)}))}if(null!=e)for(b=0;b<e.length;b++){var g=document.createElement("div");g.style.marginTop=null!=c||0<b?"6px":"0px";g.appendChild(this.graph.createLinkForHint(e[b].getAttribute("href"),mxUtils.getTextContent(e[b])));this.linkHint.appendChild(g)}}}catch(ya){}};mxEdgeHandler.prototype.updateLinkHint=mxVertexHandler.prototype.updateLinkHint;var da=mxEdgeHandler.prototype.init;mxEdgeHandler.prototype.init=function(){da.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,
+null);mxEvent.consume(a)}))}if(null!=e)for(b=0;b<e.length;b++){var k=document.createElement("div");k.style.marginTop=null!=c||0<b?"6px":"0px";k.appendChild(this.graph.createLinkForHint(e[b].getAttribute("href"),mxUtils.getTextContent(e[b])));this.linkHint.appendChild(k)}}}catch(xa){}};mxEdgeHandler.prototype.updateLinkHint=mxVertexHandler.prototype.updateLinkHint;var ca=mxEdgeHandler.prototype.init;mxEdgeHandler.prototype.init=function(){ca.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,
function(){return this.state.view.graph.connectionHandler.isEnabled()});var a=mxUtils.bind(this,function(){null!=this.linkHint&&(this.linkHint.style.display=1==this.graph.getSelectionCount()?"":"none");null!=this.labelShape&&(this.labelShape.node.style.display=this.graph.isEnabled()&&this.graph.getSelectionCount()<this.graph.graphHandler.maxCells?"":"none")});this.changeHandler=mxUtils.bind(this,function(c,e){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),this.graph.getLinksForState(this.state));
a();this.redrawHandles()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.changeHandler);this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);var c=this.graph.getLinkForCell(this.state.cell),e=this.graph.getLinksForState(this.state);if(null!=c||null!=e&&0<e.length)this.updateLinkHint(c,e),this.redrawHandles()};var ia=mxConnectionHandler.prototype.init;mxConnectionHandler.prototype.init=function(){ia.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,
function(){return this.graph.connectionHandler.isEnabled()})};var pa=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){if(null!=this.moveHandles)for(var a=0;a<this.moveHandles.length;a++)this.moveHandles[a].style.left=this.moveHandles[a].rowState.x+this.moveHandles[a].rowState.width-5+"px",this.moveHandles[a].style.top=this.moveHandles[a].rowState.y+this.moveHandles[a].rowState.height/2-6+"px";if(null!=this.cornerHandles){var a=this.getSelectionBorderInset(),
@@ -2655,35 +2656,35 @@ c=this.cornerHandles,e=c[0].bounds.height/2;c[0].bounds.x=this.state.x-c[0].boun
"0",a),a=null!=e?mxUtils.getBoundingBox(this.state,this.state.style[mxConstants.STYLE_ROTATION]||"0"):this.state,c=null!=this.state.text?this.state.text.boundingBox:null,null==e&&(e=this.state),e=e.y+e.height,null!=c&&(e=Math.max(e,c.y+c.height)),this.linkHint.style.left=Math.max(0,Math.round(a.x+(a.width-this.linkHint.clientWidth)/2))+"px",this.linkHint.style.top=Math.round(e+this.verticalOffset/2+Editor.hintOffset)+"px")};var R=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=
function(){R.apply(this,arguments);if(null!=this.moveHandles){for(var a=0;a<this.moveHandles.length;a++)null!=this.moveHandles[a]&&null!=this.moveHandles[a].parentNode&&this.moveHandles[a].parentNode.removeChild(this.moveHandles[a]);this.moveHandles=null}if(null!=this.cornerHandles){for(a=0;a<this.cornerHandles.length;a++)null!=this.cornerHandles[a]&&null!=this.cornerHandles[a].node&&null!=this.cornerHandles[a].node.parentNode&&this.cornerHandles[a].node.parentNode.removeChild(this.cornerHandles[a].node);
this.cornerHandles=null}null!=this.linkHint&&(null!=this.linkHint.parentNode&&this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.changeHandler&&(this.graph.getSelectionModel().removeListener(this.changeHandler),this.graph.getModel().removeListener(this.changeHandler),this.changeHandler=null);null!=this.editingHandler&&(this.graph.removeListener(this.editingHandler),this.editingHandler=null)};var ka=mxEdgeHandler.prototype.redrawHandles;mxEdgeHandler.prototype.redrawHandles=
-function(){if(null!=this.marker&&(ka.apply(this),null!=this.state&&null!=this.linkHint)){var a=this.state;null!=this.state.text&&null!=this.state.text.bounds&&(a=new mxRectangle(a.x,a.y,a.width,a.height),a.add(this.state.text.bounds));this.linkHint.style.left=Math.max(0,Math.round(a.x+(a.width-this.linkHint.clientWidth)/2))+"px";this.linkHint.style.top=Math.round(a.y+a.height+Editor.hintOffset)+"px"}};var ba=mxEdgeHandler.prototype.reset;mxEdgeHandler.prototype.reset=function(){ba.apply(this,arguments);
-null!=this.linkHint&&(this.linkHint.style.visibility="")};var ja=mxEdgeHandler.prototype.destroy;mxEdgeHandler.prototype.destroy=function(){ja.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 a(){mxSwimlane.call(this)}function b(){mxCylinder.call(this)}function d(){mxCylinder.call(this)}function k(){mxActor.call(this)}function f(){mxCylinder.call(this)}function m(){mxCylinder.call(this)}function p(){mxCylinder.call(this)}function c(){mxCylinder.call(this)}function e(){mxShape.call(this)}function g(){mxShape.call(this)}function n(a,c,e,b){mxShape.call(this);this.bounds=a;this.fill=c;this.stroke=e;this.strokewidth=null!=b?b:1}function l(){mxActor.call(this)}function q(){mxCylinder.call(this)}
+function(){if(null!=this.marker&&(ka.apply(this),null!=this.state&&null!=this.linkHint)){var a=this.state;null!=this.state.text&&null!=this.state.text.bounds&&(a=new mxRectangle(a.x,a.y,a.width,a.height),a.add(this.state.text.bounds));this.linkHint.style.left=Math.max(0,Math.round(a.x+(a.width-this.linkHint.clientWidth)/2))+"px";this.linkHint.style.top=Math.round(a.y+a.height+Editor.hintOffset)+"px"}};var aa=mxEdgeHandler.prototype.reset;mxEdgeHandler.prototype.reset=function(){aa.apply(this,arguments);
+null!=this.linkHint&&(this.linkHint.style.visibility="")};var ja=mxEdgeHandler.prototype.destroy;mxEdgeHandler.prototype.destroy=function(){ja.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 a(){mxSwimlane.call(this)}function b(){mxCylinder.call(this)}function d(){mxCylinder.call(this)}function g(){mxActor.call(this)}function f(){mxCylinder.call(this)}function m(){mxCylinder.call(this)}function p(){mxCylinder.call(this)}function c(){mxCylinder.call(this)}function e(){mxShape.call(this)}function k(){mxShape.call(this)}function n(a,c,e,b){mxShape.call(this);this.bounds=a;this.fill=c;this.stroke=e;this.strokewidth=null!=b?b:1}function l(){mxActor.call(this)}function q(){mxCylinder.call(this)}
function u(){mxCylinder.call(this)}function t(){mxActor.call(this)}function A(){mxActor.call(this)}function x(){mxActor.call(this)}function G(){mxActor.call(this)}function z(){mxActor.call(this)}function E(){mxActor.call(this)}function H(){mxActor.call(this)}function K(a,c){this.canvas=a;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.defaultVariation=c;this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,K.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;
this.canvas.moveTo=mxUtils.bind(this,K.prototype.moveTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,K.prototype.close);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,K.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;this.canvas.curveTo=mxUtils.bind(this,K.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,K.prototype.arcTo)}function F(){mxRectangleShape.call(this)}function I(){mxRectangleShape.call(this)}
-function C(){mxActor.call(this)}function M(){mxActor.call(this)}function U(){mxActor.call(this)}function O(){mxRectangleShape.call(this)}function N(){mxRectangleShape.call(this)}function v(){mxCylinder.call(this)}function D(){mxShape.call(this)}function B(){mxShape.call(this)}function J(){mxEllipse.call(this)}function L(){mxShape.call(this)}function W(){mxShape.call(this)}function Q(){mxRectangleShape.call(this)}function aa(){mxShape.call(this)}function na(){mxShape.call(this)}function ga(){mxShape.call(this)}
-function ea(){mxShape.call(this)}function la(){mxShape.call(this)}function V(){mxCylinder.call(this)}function ca(){mxCylinder.call(this)}function ma(){mxRectangleShape.call(this)}function T(){mxDoubleEllipse.call(this)}function P(){mxDoubleEllipse.call(this)}function ta(){mxArrowConnector.call(this);this.spacing=0}function X(){mxArrowConnector.call(this);this.spacing=0}function da(){mxActor.call(this)}function ia(){mxRectangleShape.call(this)}function pa(){mxActor.call(this)}function R(){mxActor.call(this)}
-function ka(){mxActor.call(this)}function ba(){mxActor.call(this)}function ja(){mxActor.call(this)}function Y(){mxActor.call(this)}function qa(){mxActor.call(this)}function va(){mxActor.call(this)}function ua(){mxActor.call(this)}function ra(){mxActor.call(this)}function ya(){mxEllipse.call(this)}function za(){mxEllipse.call(this)}function S(){mxEllipse.call(this)}function Aa(){mxRhombus.call(this)}function ha(){mxEllipse.call(this)}function Ba(){mxEllipse.call(this)}function wa(){mxEllipse.call(this)}
-function Da(){mxEllipse.call(this)}function Ca(){mxActor.call(this)}function xa(){mxActor.call(this)}function Fa(){mxActor.call(this)}function Z(a,c,e,b){mxShape.call(this);this.bounds=a;this.fill=c;this.stroke=e;this.strokewidth=null!=b?b:1;this.rectStyle="square";this.size=10;this.absoluteCornerSize=!0;this.indent=2;this.rectOutline="single"}function Ha(){mxConnector.call(this)}function Ua(a,c,e,b,d,g,f,k,l,n){f+=l;var y=b.clone();b.x-=d*(2*f+l);b.y-=g*(2*f+l);d*=f+l;g*=f+l;return function(){a.ellipse(y.x-
-d-f,y.y-g-f,2*f,2*f);n?a.fillAndStroke():a.stroke()}}mxUtils.extend(a,mxSwimlane);a.prototype.getLabelBounds=function(a){return 0==this.getTitleSize()?mxShape.prototype.getLabelBounds.apply(this,arguments):mxSwimlane.prototype.getLabelBounds.apply(this,arguments)};a.prototype.paintVertexShape=function(a,c,e,b,d){0==this.getTitleSize()?mxRectangleShape.prototype.paintBackground.apply(this,arguments):(mxSwimlane.prototype.paintVertexShape.apply(this,arguments),a.translate(-c,-e));this.paintForeground(a,
-c,e,b,d)};a.prototype.paintForeground=function(a,c,e,b,d){if(null!=this.state){var y=this.flipH,g=this.flipV;if(this.direction==mxConstants.DIRECTION_NORTH||this.direction==mxConstants.DIRECTION_SOUTH)var f=y,y=g,g=f;a.rotate(-this.getShapeRotation(),y,g,c+b/2,e+d/2);s=this.scale;c=this.bounds.x/s;e=this.bounds.y/s;b=this.bounds.width/s;d=this.bounds.height/s;this.paintTableForeground(a,c,e,b,d)}};a.prototype.paintTableForeground=function(a,c,e,b,d){var y=this.state.view.graph,g=y.getActualStartSize(this.state.cell),
-f=y.model.getChildCells(this.state.cell,!0);if(0<f.length){var k="0"!=mxUtils.getValue(this.state.style,"rowLines","1"),sa="0"!=mxUtils.getValue(this.state.style,"columnLines","1");if(k)for(k=1;k<f.length;k++){var oa=y.getCellGeometry(f[k]);null!=oa&&(a.begin(),a.moveTo(c+g.x,e+oa.y),a.lineTo(c+b-g.width,e+oa.y),a.end(),a.stroke())}if(sa)for(b=y.model.getChildCells(f[0],!0),k=1;k<b.length;k++)oa=y.getCellGeometry(b[k]),null!=oa&&(a.begin(),a.moveTo(c+oa.x+g.x,e+g.y),a.lineTo(c+oa.x+g.x,e+d-g.height),
-a.end(),a.stroke())}};mxCellRenderer.registerShape("table",a);mxUtils.extend(b,mxCylinder);b.prototype.size=20;b.prototype.darkOpacity=0;b.prototype.darkOpacity2=0;b.prototype.paintVertexShape=function(a,c,e,b,d){var y=Math.max(0,Math.min(b,Math.min(d,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),g=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity)))),f=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity2",this.darkOpacity2))));
-a.translate(c,e);a.begin();a.moveTo(0,0);a.lineTo(b-y,0);a.lineTo(b,y);a.lineTo(b,d);a.lineTo(y,d);a.lineTo(0,d-y);a.lineTo(0,0);a.close();a.end();a.fillAndStroke();this.outline||(a.setShadow(!1),0!=g&&(a.setFillAlpha(Math.abs(g)),a.setFillColor(0>g?"#FFFFFF":"#000000"),a.begin(),a.moveTo(0,0),a.lineTo(b-y,0),a.lineTo(b,y),a.lineTo(y,y),a.close(),a.fill()),0!=f&&(a.setFillAlpha(Math.abs(f)),a.setFillColor(0>f?"#FFFFFF":"#000000"),a.begin(),a.moveTo(0,0),a.lineTo(y,y),a.lineTo(y,d),a.lineTo(0,d-y),
-a.close(),a.fill()),a.begin(),a.moveTo(y,d),a.lineTo(y,y),a.lineTo(0,0),a.moveTo(y,y),a.lineTo(b,y),a.end(),a.stroke())};b.prototype.getLabelMargins=function(a){return mxUtils.getValue(this.style,"boundedLbl",!1)?(a=parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale,new mxRectangle(a,a,0,0)):null};mxCellRenderer.registerShape("cube",b);var Ra=Math.tan(mxUtils.toRadians(30)),Ia=(.5-Ra)/2;mxCellRenderer.registerShape("isoRectangle",k);mxUtils.extend(d,mxCylinder);d.prototype.size=
-6;d.prototype.paintVertexShape=function(a,c,e,b,d){a.setFillColor(this.stroke);var y=Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size))-2)+2*this.strokewidth;a.ellipse(c+.5*(b-y),e+.5*(d-y),y,y);a.fill();a.setFillColor(mxConstants.NONE);a.rect(c,e,b,d);a.fill()};mxCellRenderer.registerShape("waypoint",d);mxUtils.extend(k,mxActor);k.prototype.size=20;k.prototype.redrawPath=function(a,c,e,b,d){c=Math.min(b,d/Ra);a.translate((b-c)/2,(d-c)/2+c/4);a.moveTo(0,.25*c);a.lineTo(.5*c,c*Ia);
-a.lineTo(c,.25*c);a.lineTo(.5*c,(.5-Ia)*c);a.lineTo(0,.25*c);a.close();a.end()};mxCellRenderer.registerShape("isoRectangle",k);mxUtils.extend(f,mxCylinder);f.prototype.size=20;f.prototype.redrawPath=function(a,c,e,b,d,g){c=Math.min(b,d/(.5+Ra));g?(a.moveTo(0,.25*c),a.lineTo(.5*c,(.5-Ia)*c),a.lineTo(c,.25*c),a.moveTo(.5*c,(.5-Ia)*c),a.lineTo(.5*c,(1-Ia)*c)):(a.translate((b-c)/2,(d-c)/2),a.moveTo(0,.25*c),a.lineTo(.5*c,c*Ia),a.lineTo(c,.25*c),a.lineTo(c,.75*c),a.lineTo(.5*c,(1-Ia)*c),a.lineTo(0,.75*
-c),a.close());a.end()};mxCellRenderer.registerShape("isoCube",f);mxUtils.extend(m,mxCylinder);m.prototype.redrawPath=function(a,c,e,b,d,g){c=Math.min(d/2,Math.round(d/8)+this.strokewidth-1);if(g&&null!=this.fill||!g&&null==this.fill)a.moveTo(0,c),a.curveTo(0,2*c,b,2*c,b,c),g||(a.stroke(),a.begin()),a.translate(0,c/2),a.moveTo(0,c),a.curveTo(0,2*c,b,2*c,b,c),g||(a.stroke(),a.begin()),a.translate(0,c/2),a.moveTo(0,c),a.curveTo(0,2*c,b,2*c,b,c),g||(a.stroke(),a.begin()),a.translate(0,-c);g||(a.moveTo(0,
-c),a.curveTo(0,-c/3,b,-c/3,b,c),a.lineTo(b,d-c),a.curveTo(b,d+c/3,0,d+c/3,0,d-c),a.close())};m.prototype.getLabelMargins=function(a){return new mxRectangle(0,2.5*Math.min(a.height/2,Math.round(a.height/8)+this.strokewidth-1),0,0)};mxCellRenderer.registerShape("datastore",m);mxUtils.extend(p,mxCylinder);p.prototype.size=30;p.prototype.darkOpacity=0;p.prototype.paintVertexShape=function(a,c,e,b,d){var y=Math.max(0,Math.min(b,Math.min(d,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),g=
-Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity))));a.translate(c,e);a.begin();a.moveTo(0,0);a.lineTo(b-y,0);a.lineTo(b,y);a.lineTo(b,d);a.lineTo(0,d);a.lineTo(0,0);a.close();a.end();a.fillAndStroke();this.outline||(a.setShadow(!1),0!=g&&(a.setFillAlpha(Math.abs(g)),a.setFillColor(0>g?"#FFFFFF":"#000000"),a.begin(),a.moveTo(b-y,0),a.lineTo(b-y,y),a.lineTo(b,y),a.close(),a.fill()),a.begin(),a.moveTo(b-y,0),a.lineTo(b-y,y),a.lineTo(b,y),a.end(),a.stroke())};
+function D(){mxActor.call(this)}function M(){mxActor.call(this)}function U(){mxActor.call(this)}function O(){mxRectangleShape.call(this)}function N(){mxRectangleShape.call(this)}function v(){mxCylinder.call(this)}function C(){mxShape.call(this)}function B(){mxShape.call(this)}function J(){mxEllipse.call(this)}function L(){mxShape.call(this)}function W(){mxShape.call(this)}function Q(){mxRectangleShape.call(this)}function Z(){mxShape.call(this)}function na(){mxShape.call(this)}function ga(){mxShape.call(this)}
+function da(){mxShape.call(this)}function la(){mxShape.call(this)}function V(){mxCylinder.call(this)}function ba(){mxCylinder.call(this)}function ma(){mxRectangleShape.call(this)}function T(){mxDoubleEllipse.call(this)}function P(){mxDoubleEllipse.call(this)}function ta(){mxArrowConnector.call(this);this.spacing=0}function X(){mxArrowConnector.call(this);this.spacing=0}function ca(){mxActor.call(this)}function ia(){mxRectangleShape.call(this)}function pa(){mxActor.call(this)}function R(){mxActor.call(this)}
+function ka(){mxActor.call(this)}function aa(){mxActor.call(this)}function ja(){mxActor.call(this)}function ea(){mxActor.call(this)}function qa(){mxActor.call(this)}function ya(){mxActor.call(this)}function ua(){mxActor.call(this)}function ra(){mxActor.call(this)}function xa(){mxEllipse.call(this)}function za(){mxEllipse.call(this)}function S(){mxEllipse.call(this)}function Aa(){mxRhombus.call(this)}function ha(){mxEllipse.call(this)}function Ba(){mxEllipse.call(this)}function va(){mxEllipse.call(this)}
+function Da(){mxEllipse.call(this)}function Ca(){mxActor.call(this)}function wa(){mxActor.call(this)}function Fa(){mxActor.call(this)}function Y(a,c,e,b){mxShape.call(this);this.bounds=a;this.fill=c;this.stroke=e;this.strokewidth=null!=b?b:1;this.rectStyle="square";this.size=10;this.absoluteCornerSize=!0;this.indent=2;this.rectOutline="single"}function Ha(){mxConnector.call(this)}function Ua(a,c,e,b,d,k,f,g,l,n){f+=l;var y=b.clone();b.x-=d*(2*f+l);b.y-=k*(2*f+l);d*=f+l;k*=f+l;return function(){a.ellipse(y.x-
+d-f,y.y-k-f,2*f,2*f);n?a.fillAndStroke():a.stroke()}}mxUtils.extend(a,mxSwimlane);a.prototype.getLabelBounds=function(a){return 0==this.getTitleSize()?mxShape.prototype.getLabelBounds.apply(this,arguments):mxSwimlane.prototype.getLabelBounds.apply(this,arguments)};a.prototype.paintVertexShape=function(a,c,e,b,d){0==this.getTitleSize()?mxRectangleShape.prototype.paintBackground.apply(this,arguments):(mxSwimlane.prototype.paintVertexShape.apply(this,arguments),a.translate(-c,-e));this.paintForeground(a,
+c,e,b,d)};a.prototype.paintForeground=function(a,c,e,b,d){if(null!=this.state){var y=this.flipH,k=this.flipV;if(this.direction==mxConstants.DIRECTION_NORTH||this.direction==mxConstants.DIRECTION_SOUTH)var f=y,y=k,k=f;a.rotate(-this.getShapeRotation(),y,k,c+b/2,e+d/2);s=this.scale;c=this.bounds.x/s;e=this.bounds.y/s;b=this.bounds.width/s;d=this.bounds.height/s;this.paintTableForeground(a,c,e,b,d)}};a.prototype.paintTableForeground=function(a,c,e,b,d){var y=this.state.view.graph,k=y.getActualStartSize(this.state.cell),
+f=y.model.getChildCells(this.state.cell,!0);if(0<f.length){var g="0"!=mxUtils.getValue(this.state.style,"rowLines","1"),sa="0"!=mxUtils.getValue(this.state.style,"columnLines","1");if(g)for(g=1;g<f.length;g++){var oa=y.getCellGeometry(f[g]);null!=oa&&(a.begin(),a.moveTo(c+k.x,e+oa.y),a.lineTo(c+b-k.width,e+oa.y),a.end(),a.stroke())}if(sa)for(b=y.model.getChildCells(f[0],!0),g=1;g<b.length;g++)oa=y.getCellGeometry(b[g]),null!=oa&&(a.begin(),a.moveTo(c+oa.x+k.x,e+k.y),a.lineTo(c+oa.x+k.x,e+d-k.height),
+a.end(),a.stroke())}};mxCellRenderer.registerShape("table",a);mxUtils.extend(b,mxCylinder);b.prototype.size=20;b.prototype.darkOpacity=0;b.prototype.darkOpacity2=0;b.prototype.paintVertexShape=function(a,c,e,b,d){var y=Math.max(0,Math.min(b,Math.min(d,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),k=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity)))),f=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity2",this.darkOpacity2))));
+a.translate(c,e);a.begin();a.moveTo(0,0);a.lineTo(b-y,0);a.lineTo(b,y);a.lineTo(b,d);a.lineTo(y,d);a.lineTo(0,d-y);a.lineTo(0,0);a.close();a.end();a.fillAndStroke();this.outline||(a.setShadow(!1),0!=k&&(a.setFillAlpha(Math.abs(k)),a.setFillColor(0>k?"#FFFFFF":"#000000"),a.begin(),a.moveTo(0,0),a.lineTo(b-y,0),a.lineTo(b,y),a.lineTo(y,y),a.close(),a.fill()),0!=f&&(a.setFillAlpha(Math.abs(f)),a.setFillColor(0>f?"#FFFFFF":"#000000"),a.begin(),a.moveTo(0,0),a.lineTo(y,y),a.lineTo(y,d),a.lineTo(0,d-y),
+a.close(),a.fill()),a.begin(),a.moveTo(y,d),a.lineTo(y,y),a.lineTo(0,0),a.moveTo(y,y),a.lineTo(b,y),a.end(),a.stroke())};b.prototype.getLabelMargins=function(a){return mxUtils.getValue(this.style,"boundedLbl",!1)?(a=parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale,new mxRectangle(a,a,0,0)):null};mxCellRenderer.registerShape("cube",b);var Ra=Math.tan(mxUtils.toRadians(30)),Ia=(.5-Ra)/2;mxCellRenderer.registerShape("isoRectangle",g);mxUtils.extend(d,mxCylinder);d.prototype.size=
+6;d.prototype.paintVertexShape=function(a,c,e,b,d){a.setFillColor(this.stroke);var y=Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size))-2)+2*this.strokewidth;a.ellipse(c+.5*(b-y),e+.5*(d-y),y,y);a.fill();a.setFillColor(mxConstants.NONE);a.rect(c,e,b,d);a.fill()};mxCellRenderer.registerShape("waypoint",d);mxUtils.extend(g,mxActor);g.prototype.size=20;g.prototype.redrawPath=function(a,c,e,b,d){c=Math.min(b,d/Ra);a.translate((b-c)/2,(d-c)/2+c/4);a.moveTo(0,.25*c);a.lineTo(.5*c,c*Ia);
+a.lineTo(c,.25*c);a.lineTo(.5*c,(.5-Ia)*c);a.lineTo(0,.25*c);a.close();a.end()};mxCellRenderer.registerShape("isoRectangle",g);mxUtils.extend(f,mxCylinder);f.prototype.size=20;f.prototype.redrawPath=function(a,c,e,b,d,k){c=Math.min(b,d/(.5+Ra));k?(a.moveTo(0,.25*c),a.lineTo(.5*c,(.5-Ia)*c),a.lineTo(c,.25*c),a.moveTo(.5*c,(.5-Ia)*c),a.lineTo(.5*c,(1-Ia)*c)):(a.translate((b-c)/2,(d-c)/2),a.moveTo(0,.25*c),a.lineTo(.5*c,c*Ia),a.lineTo(c,.25*c),a.lineTo(c,.75*c),a.lineTo(.5*c,(1-Ia)*c),a.lineTo(0,.75*
+c),a.close());a.end()};mxCellRenderer.registerShape("isoCube",f);mxUtils.extend(m,mxCylinder);m.prototype.redrawPath=function(a,c,e,b,d,k){c=Math.min(d/2,Math.round(d/8)+this.strokewidth-1);if(k&&null!=this.fill||!k&&null==this.fill)a.moveTo(0,c),a.curveTo(0,2*c,b,2*c,b,c),k||(a.stroke(),a.begin()),a.translate(0,c/2),a.moveTo(0,c),a.curveTo(0,2*c,b,2*c,b,c),k||(a.stroke(),a.begin()),a.translate(0,c/2),a.moveTo(0,c),a.curveTo(0,2*c,b,2*c,b,c),k||(a.stroke(),a.begin()),a.translate(0,-c);k||(a.moveTo(0,
+c),a.curveTo(0,-c/3,b,-c/3,b,c),a.lineTo(b,d-c),a.curveTo(b,d+c/3,0,d+c/3,0,d-c),a.close())};m.prototype.getLabelMargins=function(a){return new mxRectangle(0,2.5*Math.min(a.height/2,Math.round(a.height/8)+this.strokewidth-1),0,0)};mxCellRenderer.registerShape("datastore",m);mxUtils.extend(p,mxCylinder);p.prototype.size=30;p.prototype.darkOpacity=0;p.prototype.paintVertexShape=function(a,c,e,b,d){var y=Math.max(0,Math.min(b,Math.min(d,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),k=
+Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity))));a.translate(c,e);a.begin();a.moveTo(0,0);a.lineTo(b-y,0);a.lineTo(b,y);a.lineTo(b,d);a.lineTo(0,d);a.lineTo(0,0);a.close();a.end();a.fillAndStroke();this.outline||(a.setShadow(!1),0!=k&&(a.setFillAlpha(Math.abs(k)),a.setFillColor(0>k?"#FFFFFF":"#000000"),a.begin(),a.moveTo(b-y,0),a.lineTo(b-y,y),a.lineTo(b,y),a.close(),a.fill()),a.begin(),a.moveTo(b-y,0),a.lineTo(b-y,y),a.lineTo(b,y),a.end(),a.stroke())};
mxCellRenderer.registerShape("note",p);mxUtils.extend(c,p);mxCellRenderer.registerShape("note2",c);c.prototype.getLabelMargins=function(a){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var c=mxUtils.getValue(this.style,"size",15);return new mxRectangle(0,Math.min(a.height*this.scale,c*this.scale),0,0)}return null};mxUtils.extend(e,mxShape);e.prototype.isoAngle=15;e.prototype.paintVertexShape=function(a,c,e,b,d){var y=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.style,"isoAngle",this.isoAngle))))*
-Math.PI/200,y=Math.min(b*Math.tan(y),.5*d);a.translate(c,e);a.begin();a.moveTo(.5*b,0);a.lineTo(b,y);a.lineTo(b,d-y);a.lineTo(.5*b,d);a.lineTo(0,d-y);a.lineTo(0,y);a.close();a.fillAndStroke();a.setShadow(!1);a.begin();a.moveTo(0,y);a.lineTo(.5*b,2*y);a.lineTo(b,y);a.moveTo(.5*b,2*y);a.lineTo(.5*b,d);a.stroke()};mxCellRenderer.registerShape("isoCube2",e);mxUtils.extend(g,mxShape);g.prototype.size=15;g.prototype.paintVertexShape=function(a,c,e,b,d){var y=Math.max(0,Math.min(.5*d,parseFloat(mxUtils.getValue(this.style,
-"size",this.size))));a.translate(c,e);0==y?(a.rect(0,0,b,d),a.fillAndStroke()):(a.begin(),a.moveTo(0,y),a.arcTo(.5*b,y,0,0,1,.5*b,0),a.arcTo(.5*b,y,0,0,1,b,y),a.lineTo(b,d-y),a.arcTo(.5*b,y,0,0,1,.5*b,d),a.arcTo(.5*b,y,0,0,1,0,d-y),a.close(),a.fillAndStroke(),a.setShadow(!1),a.begin(),a.moveTo(b,y),a.arcTo(.5*b,y,0,0,1,.5*b,2*y),a.arcTo(.5*b,y,0,0,1,0,y),a.stroke())};mxCellRenderer.registerShape("cylinder2",g);mxUtils.extend(n,mxCylinder);n.prototype.size=15;n.prototype.paintVertexShape=function(a,
-c,e,b,d){var y=Math.max(0,Math.min(.5*d,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),g=mxUtils.getValue(this.style,"lid",!0);a.translate(c,e);0==y?(a.rect(0,0,b,d),a.fillAndStroke()):(a.begin(),g?(a.moveTo(0,y),a.arcTo(.5*b,y,0,0,1,.5*b,0),a.arcTo(.5*b,y,0,0,1,b,y)):(a.moveTo(0,0),a.arcTo(.5*b,y,0,0,0,.5*b,y),a.arcTo(.5*b,y,0,0,0,b,0)),a.lineTo(b,d-y),a.arcTo(.5*b,y,0,0,1,.5*b,d),a.arcTo(.5*b,y,0,0,1,0,d-y),a.close(),a.fillAndStroke(),a.setShadow(!1),g&&(a.begin(),a.moveTo(b,y),a.arcTo(.5*
+Math.PI/200,y=Math.min(b*Math.tan(y),.5*d);a.translate(c,e);a.begin();a.moveTo(.5*b,0);a.lineTo(b,y);a.lineTo(b,d-y);a.lineTo(.5*b,d);a.lineTo(0,d-y);a.lineTo(0,y);a.close();a.fillAndStroke();a.setShadow(!1);a.begin();a.moveTo(0,y);a.lineTo(.5*b,2*y);a.lineTo(b,y);a.moveTo(.5*b,2*y);a.lineTo(.5*b,d);a.stroke()};mxCellRenderer.registerShape("isoCube2",e);mxUtils.extend(k,mxShape);k.prototype.size=15;k.prototype.paintVertexShape=function(a,c,e,b,d){var y=Math.max(0,Math.min(.5*d,parseFloat(mxUtils.getValue(this.style,
+"size",this.size))));a.translate(c,e);0==y?(a.rect(0,0,b,d),a.fillAndStroke()):(a.begin(),a.moveTo(0,y),a.arcTo(.5*b,y,0,0,1,.5*b,0),a.arcTo(.5*b,y,0,0,1,b,y),a.lineTo(b,d-y),a.arcTo(.5*b,y,0,0,1,.5*b,d),a.arcTo(.5*b,y,0,0,1,0,d-y),a.close(),a.fillAndStroke(),a.setShadow(!1),a.begin(),a.moveTo(b,y),a.arcTo(.5*b,y,0,0,1,.5*b,2*y),a.arcTo(.5*b,y,0,0,1,0,y),a.stroke())};mxCellRenderer.registerShape("cylinder2",k);mxUtils.extend(n,mxCylinder);n.prototype.size=15;n.prototype.paintVertexShape=function(a,
+c,e,b,d){var y=Math.max(0,Math.min(.5*d,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),k=mxUtils.getValue(this.style,"lid",!0);a.translate(c,e);0==y?(a.rect(0,0,b,d),a.fillAndStroke()):(a.begin(),k?(a.moveTo(0,y),a.arcTo(.5*b,y,0,0,1,.5*b,0),a.arcTo(.5*b,y,0,0,1,b,y)):(a.moveTo(0,0),a.arcTo(.5*b,y,0,0,0,.5*b,y),a.arcTo(.5*b,y,0,0,0,b,0)),a.lineTo(b,d-y),a.arcTo(.5*b,y,0,0,1,.5*b,d),a.arcTo(.5*b,y,0,0,1,0,d-y),a.close(),a.fillAndStroke(),a.setShadow(!1),k&&(a.begin(),a.moveTo(b,y),a.arcTo(.5*
b,y,0,0,1,.5*b,2*y),a.arcTo(.5*b,y,0,0,1,0,y),a.stroke()))};mxCellRenderer.registerShape("cylinder3",n);mxUtils.extend(l,mxActor);l.prototype.redrawPath=function(a,c,e,b,d){a.moveTo(0,0);a.quadTo(b/2,.5*d,b,0);a.quadTo(.5*b,d/2,b,d);a.quadTo(b/2,.5*d,0,d);a.quadTo(.5*b,d/2,0,0);a.end()};mxCellRenderer.registerShape("switch",l);mxUtils.extend(q,mxCylinder);q.prototype.tabWidth=60;q.prototype.tabHeight=20;q.prototype.tabPosition="right";q.prototype.arcSize=.1;q.prototype.paintVertexShape=function(a,
-c,e,b,d){a.translate(c,e);c=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth))));e=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));var y=mxUtils.getValue(this.style,"tabPosition",this.tabPosition),g=mxUtils.getValue(this.style,"rounded",!1),f=mxUtils.getValue(this.style,"absoluteArcSize",!1),k=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));f||(k*=Math.min(b,d));k=Math.min(k,.5*b,.5*(d-e));c=Math.max(c,
-k);c=Math.min(b-k,c);g||(k=0);a.begin();"left"==y?(a.moveTo(Math.max(k,0),e),a.lineTo(Math.max(k,0),0),a.lineTo(c,0),a.lineTo(c,e)):(a.moveTo(b-c,e),a.lineTo(b-c,0),a.lineTo(b-Math.max(k,0),0),a.lineTo(b-Math.max(k,0),e));g?(a.moveTo(0,k+e),a.arcTo(k,k,0,0,1,k,e),a.lineTo(b-k,e),a.arcTo(k,k,0,0,1,b,k+e),a.lineTo(b,d-k),a.arcTo(k,k,0,0,1,b-k,d),a.lineTo(k,d),a.arcTo(k,k,0,0,1,0,d-k)):(a.moveTo(0,e),a.lineTo(b,e),a.lineTo(b,d),a.lineTo(0,d));a.close();a.fillAndStroke();a.setShadow(!1);"triangle"==mxUtils.getValue(this.style,
+c,e,b,d){a.translate(c,e);c=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth))));e=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));var y=mxUtils.getValue(this.style,"tabPosition",this.tabPosition),k=mxUtils.getValue(this.style,"rounded",!1),f=mxUtils.getValue(this.style,"absoluteArcSize",!1),g=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));f||(g*=Math.min(b,d));g=Math.min(g,.5*b,.5*(d-e));c=Math.max(c,
+g);c=Math.min(b-g,c);k||(g=0);a.begin();"left"==y?(a.moveTo(Math.max(g,0),e),a.lineTo(Math.max(g,0),0),a.lineTo(c,0),a.lineTo(c,e)):(a.moveTo(b-c,e),a.lineTo(b-c,0),a.lineTo(b-Math.max(g,0),0),a.lineTo(b-Math.max(g,0),e));k?(a.moveTo(0,g+e),a.arcTo(g,g,0,0,1,g,e),a.lineTo(b-g,e),a.arcTo(g,g,0,0,1,b,g+e),a.lineTo(b,d-g),a.arcTo(g,g,0,0,1,b-g,d),a.lineTo(g,d),a.arcTo(g,g,0,0,1,0,d-g)):(a.moveTo(0,e),a.lineTo(b,e),a.lineTo(b,d),a.lineTo(0,d));a.close();a.fillAndStroke();a.setShadow(!1);"triangle"==mxUtils.getValue(this.style,
"folderSymbol",null)&&(a.begin(),a.moveTo(b-30,e+20),a.lineTo(b-20,e+10),a.lineTo(b-10,e+20),a.close(),a.stroke())};mxCellRenderer.registerShape("folder",q);q.prototype.getLabelMargins=function(a){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var c=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;if(mxUtils.getValue(this.style,"labelInHeader",!1)){var e=mxUtils.getValue(this.style,"tabWidth",15)*this.scale,c=mxUtils.getValue(this.style,"tabHeight",15)*this.scale,b=mxUtils.getValue(this.style,
"rounded",!1),d=mxUtils.getValue(this.style,"absoluteArcSize",!1),y=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));d||(y*=Math.min(a.width,a.height));y=Math.min(y,.5*a.width,.5*(a.height-c));b||(y=0);return"left"==mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?new mxRectangle(y,0,Math.min(a.width,a.width-e),Math.min(a.height,a.height-c)):new mxRectangle(Math.min(a.width,a.width-e),0,y,Math.min(a.height,a.height-c))}return new mxRectangle(0,Math.min(a.height,c),0,0)}return null};
-mxUtils.extend(u,mxCylinder);u.prototype.arcSize=.1;u.prototype.paintVertexShape=function(a,c,e,b,d){a.translate(c,e);var y=mxUtils.getValue(this.style,"rounded",!1),g=mxUtils.getValue(this.style,"absoluteArcSize",!1);c=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));e=mxUtils.getValue(this.style,"umlStateConnection",null);g||(c*=Math.min(b,d));c=Math.min(c,.5*b,.5*d);y||(c=0);y=0;null!=e&&(y=10);a.begin();a.moveTo(y,c);a.arcTo(c,c,0,0,1,y+c,0);a.lineTo(b-c,0);a.arcTo(c,c,0,0,1,b,
+mxUtils.extend(u,mxCylinder);u.prototype.arcSize=.1;u.prototype.paintVertexShape=function(a,c,e,b,d){a.translate(c,e);var y=mxUtils.getValue(this.style,"rounded",!1),k=mxUtils.getValue(this.style,"absoluteArcSize",!1);c=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));e=mxUtils.getValue(this.style,"umlStateConnection",null);k||(c*=Math.min(b,d));c=Math.min(c,.5*b,.5*d);y||(c=0);y=0;null!=e&&(y=10);a.begin();a.moveTo(y,c);a.arcTo(c,c,0,0,1,y+c,0);a.lineTo(b-c,0);a.arcTo(c,c,0,0,1,b,
c);a.lineTo(b,d-c);a.arcTo(c,c,0,0,1,b-c,d);a.lineTo(y+c,d);a.arcTo(c,c,0,0,1,y,d-c);a.close();a.fillAndStroke();a.setShadow(!1);"collapseState"==mxUtils.getValue(this.style,"umlStateSymbol",null)&&(a.roundrect(b-40,d-20,10,10,3,3),a.stroke(),a.roundrect(b-20,d-20,10,10,3,3),a.stroke(),a.begin(),a.moveTo(b-30,d-15),a.lineTo(b-20,d-15),a.stroke());"connPointRefEntry"==e?(a.ellipse(0,.5*d-10,20,20),a.fillAndStroke()):"connPointRefExit"==e&&(a.ellipse(0,.5*d-10,20,20),a.fillAndStroke(),a.begin(),a.moveTo(5,
.5*d-5),a.lineTo(15,.5*d+5),a.moveTo(15,.5*d-5),a.lineTo(5,.5*d+5),a.stroke())};u.prototype.getLabelMargins=function(a){return mxUtils.getValue(this.style,"boundedLbl",!1)&&null!=mxUtils.getValue(this.style,"umlStateConnection",null)?new mxRectangle(10*this.scale,0,0,0):null};mxCellRenderer.registerShape("umlState",u);mxUtils.extend(t,mxActor);t.prototype.size=30;t.prototype.isRoundable=function(){return!0};t.prototype.redrawPath=function(a,c,e,b,d){c=Math.max(0,Math.min(b,Math.min(d,parseFloat(mxUtils.getValue(this.style,
"size",this.size)))));e=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(c,0),new mxPoint(b,0),new mxPoint(b,d),new mxPoint(0,d),new mxPoint(0,c)],this.isRounded,e,!0);a.end()};mxCellRenderer.registerShape("card",t);mxUtils.extend(A,mxActor);A.prototype.size=.4;A.prototype.redrawPath=function(a,c,e,b,d){c=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));a.moveTo(0,c/2);a.quadTo(b/4,1.4*c,b/2,c/2);a.quadTo(3*
@@ -2698,159 +2699,159 @@ mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPo
this.fixedSize)))):b*Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.style,"size",this.size))));e=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,d),new mxPoint(c,0),new mxPoint(b-c,0),new mxPoint(b,d)],this.isRounded,e,!0)};mxCellRenderer.registerShape("trapezoid",z);mxUtils.extend(E,mxActor);E.prototype.size=.5;E.prototype.redrawPath=function(a,c,e,b,d){a.setFillColor(null);c=b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,
"size",this.size))));e=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(b,0),new mxPoint(c,0),new mxPoint(c,d/2),new mxPoint(0,d/2),new mxPoint(c,d/2),new mxPoint(c,d),new mxPoint(b,d)],this.isRounded,e,!1);a.end()};mxCellRenderer.registerShape("curlyBracket",E);mxUtils.extend(H,mxActor);H.prototype.redrawPath=function(a,c,e,b,d){a.setStrokeWidth(1);a.setFillColor(this.stroke);c=b/5;a.rect(0,0,c,d);a.fillAndStroke();a.rect(2*c,0,c,d);
a.fillAndStroke();a.rect(4*c,0,c,d);a.fillAndStroke()};mxCellRenderer.registerShape("parallelMarker",H);K.prototype.moveTo=function(a,c){this.originalMoveTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=c;this.firstX=a;this.firstY=c};K.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)};K.prototype.quadTo=function(a,c,e,b){this.originalQuadTo.apply(this.canvas,
-arguments);this.lastX=e;this.lastY=b};K.prototype.curveTo=function(a,c,e,b,d,g){this.originalCurveTo.apply(this.canvas,arguments);this.lastX=d;this.lastY=g};K.prototype.arcTo=function(a,c,e,b,d,g,f){this.originalArcTo.apply(this.canvas,arguments);this.lastX=g;this.lastY=f};K.prototype.lineTo=function(a,c){if(null!=this.lastX&&null!=this.lastY){var e=function(a){return"number"===typeof a?a?0>a?-1:1:a===a?0:NaN:NaN},b=Math.abs(a-this.lastX),d=Math.abs(c-this.lastY),y=Math.sqrt(b*b+d*d);if(2>y){this.originalLineTo.apply(this.canvas,
-arguments);this.lastX=a;this.lastY=c;return}var g=Math.round(y/10),f=this.defaultVariation;5>g&&(g=5,f/=3);for(var k=e(a-this.lastX)*b/g,e=e(c-this.lastY)*d/g,b=b/y,d=d/y,y=0;y<g;y++){var l=(Math.random()-.5)*f;this.originalLineTo.call(this.canvas,k*y+this.lastX-l*d,e*y+this.lastY-l*b)}this.originalLineTo.call(this.canvas,a,c)}else this.originalLineTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=c};K.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;this.canvas.moveTo=this.originalMoveTo;
+arguments);this.lastX=e;this.lastY=b};K.prototype.curveTo=function(a,c,e,b,d,k){this.originalCurveTo.apply(this.canvas,arguments);this.lastX=d;this.lastY=k};K.prototype.arcTo=function(a,c,e,b,d,k,f){this.originalArcTo.apply(this.canvas,arguments);this.lastX=k;this.lastY=f};K.prototype.lineTo=function(a,c){if(null!=this.lastX&&null!=this.lastY){var e=function(a){return"number"===typeof a?a?0>a?-1:1:a===a?0:NaN:NaN},b=Math.abs(a-this.lastX),d=Math.abs(c-this.lastY),y=Math.sqrt(b*b+d*d);if(2>y){this.originalLineTo.apply(this.canvas,
+arguments);this.lastX=a;this.lastY=c;return}var k=Math.round(y/10),f=this.defaultVariation;5>k&&(k=5,f/=3);for(var g=e(a-this.lastX)*b/k,e=e(c-this.lastY)*d/k,b=b/y,d=d/y,y=0;y<k;y++){var l=(Math.random()-.5)*f;this.originalLineTo.call(this.canvas,g*y+this.lastX-l*d,e*y+this.lastY-l*b)}this.originalLineTo.call(this.canvas,a,c)}else this.originalLineTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=c};K.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 $a=mxShape.prototype.beforePaint;mxShape.prototype.beforePaint=function(a){$a.apply(this,arguments);null==a.handJiggle&&(a.handJiggle=this.createHandJiggle(a))};var ab=mxShape.prototype.afterPaint;mxShape.prototype.afterPaint=function(a){ab.apply(this,arguments);null!=a.handJiggle&&(a.handJiggle.destroy(),
delete a.handJiggle)};mxShape.prototype.createComicCanvas=function(a){return new K(a,mxUtils.getValue(this.style,"jiggle",this.defaultJiggle))};mxShape.prototype.createHandJiggle=function(a){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"comic","0")?null:this.createComicCanvas(a)};mxRhombus.prototype.defaultJiggle=2;var bb=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"))&&bb.apply(this,arguments)};var eb=mxRectangleShape.prototype.paintBackground;mxRectangleShape.prototype.paintBackground=function(a,c,e,b,d){if(null==a.handJiggle||a.handJiggle.constructor!=K)eb.apply(this,arguments);else{var y=!0;null!=this.style&&(y="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(y||null!=this.fill&&this.fill!=mxConstants.NONE||null!=this.stroke&&this.stroke!=mxConstants.NONE)y||
null!=this.fill&&this.fill!=mxConstants.NONE||(a.pointerEvents=!1),a.begin(),this.isRounded?("1"==mxUtils.getValue(this.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?y=Math.min(b/2,Math.min(d/2,mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2)):(y=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,y=Math.min(b*y,d*y)),a.moveTo(c+y,e),a.lineTo(c+b-y,e),a.quadTo(c+b,e,c+b,e+y),a.lineTo(c+b,e+d-y),a.quadTo(c+b,e+d,c+b-y,
e+d),a.lineTo(c+y,e+d),a.quadTo(c,e+d,c,e+d-y),a.lineTo(c,e+y),a.quadTo(c,e,c+y,e)):(a.moveTo(c,e),a.lineTo(c+b,e),a.lineTo(c+b,e+d),a.lineTo(c,e+d),a.lineTo(c,e)),a.close(),a.end(),a.fillAndStroke()}};mxUtils.extend(F,mxRectangleShape);F.prototype.size=.1;F.prototype.fixedSize=!1;F.prototype.isHtmlAllowed=function(){return!1};F.prototype.getLabelBounds=function(a){if(mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,!0)==(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||
this.direction==mxConstants.DIRECTION_WEST)){var c=a.width,e=a.height;a=new mxRectangle(a.x,a.y,c,e);var b=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded)var d=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,b=Math.max(b,Math.min(c*d,e*d));a.x+=Math.round(b);a.width-=Math.round(2*b)}return a};F.prototype.paintForeground=function(a,c,e,b,d){var y=mxUtils.getValue(this.style,"fixedSize",this.fixedSize),
-g=parseFloat(mxUtils.getValue(this.style,"size",this.size)),g=y?Math.max(0,Math.min(b,g)):b*Math.max(0,Math.min(1,g));this.isRounded&&(y=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,g=Math.max(g,Math.min(b*y,d*y)));g=Math.round(g);a.begin();a.moveTo(c+g,e);a.lineTo(c+g,e+d);a.moveTo(c+b-g,e);a.lineTo(c+b-g,e+d);a.end();a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("process",F);mxCellRenderer.registerShape("process2",
-F);mxUtils.extend(I,mxRectangleShape);I.prototype.paintBackground=function(a,c,e,b,d){a.setFillColor(mxConstants.NONE);a.rect(c,e,b,d);a.fill()};I.prototype.paintForeground=function(a,c,e,b,d){};mxCellRenderer.registerShape("transparent",I);mxUtils.extend(C,mxHexagon);C.prototype.size=30;C.prototype.position=.5;C.prototype.position2=.5;C.prototype.base=20;C.prototype.getLabelMargins=function(){return new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale)};C.prototype.isRoundable=
-function(){return!0};C.prototype.redrawPath=function(a,c,e,b,d){c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;e=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"size",this.size))));var y=b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position",this.position)))),g=b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2)))),f=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"base",this.base))));
-this.addPoints(a,[new mxPoint(0,0),new mxPoint(b,0),new mxPoint(b,d-e),new mxPoint(Math.min(b,y+f),d-e),new mxPoint(g,d),new mxPoint(Math.max(0,y),d-e),new mxPoint(0,d-e)],this.isRounded,c,!0,[4])};mxCellRenderer.registerShape("callout",C);mxUtils.extend(M,mxActor);M.prototype.size=.2;M.prototype.fixedSize=20;M.prototype.isRoundable=function(){return!0};M.prototype.redrawPath=function(a,c,e,b,d){c="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,
+k=parseFloat(mxUtils.getValue(this.style,"size",this.size)),k=y?Math.max(0,Math.min(b,k)):b*Math.max(0,Math.min(1,k));this.isRounded&&(y=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,k=Math.max(k,Math.min(b*y,d*y)));k=Math.round(k);a.begin();a.moveTo(c+k,e);a.lineTo(c+k,e+d);a.moveTo(c+b-k,e);a.lineTo(c+b-k,e+d);a.end();a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("process",F);mxCellRenderer.registerShape("process2",
+F);mxUtils.extend(I,mxRectangleShape);I.prototype.paintBackground=function(a,c,e,b,d){a.setFillColor(mxConstants.NONE);a.rect(c,e,b,d);a.fill()};I.prototype.paintForeground=function(a,c,e,b,d){};mxCellRenderer.registerShape("transparent",I);mxUtils.extend(D,mxHexagon);D.prototype.size=30;D.prototype.position=.5;D.prototype.position2=.5;D.prototype.base=20;D.prototype.getLabelMargins=function(){return new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale)};D.prototype.isRoundable=
+function(){return!0};D.prototype.redrawPath=function(a,c,e,b,d){c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;e=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"size",this.size))));var k=b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position",this.position)))),y=b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2)))),f=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"base",this.base))));
+this.addPoints(a,[new mxPoint(0,0),new mxPoint(b,0),new mxPoint(b,d-e),new mxPoint(Math.min(b,k+f),d-e),new mxPoint(y,d),new mxPoint(Math.max(0,k),d-e),new mxPoint(0,d-e)],this.isRounded,c,!0,[4])};mxCellRenderer.registerShape("callout",D);mxUtils.extend(M,mxActor);M.prototype.size=.2;M.prototype.fixedSize=20;M.prototype.isRoundable=function(){return!0};M.prototype.redrawPath=function(a,c,e,b,d){c="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,
"size",this.fixedSize)))):b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));e=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(b-c,0),new mxPoint(b,d/2),new mxPoint(b-c,d),new mxPoint(0,d),new mxPoint(c,d/2)],this.isRounded,e,!0);a.end()};mxCellRenderer.registerShape("step",M);mxUtils.extend(U,mxHexagon);U.prototype.size=.25;U.prototype.fixedSize=20;U.prototype.isRoundable=function(){return!0};
U.prototype.redrawPath=function(a,c,e,b,d){c="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(.5*b,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));e=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(c,0),new mxPoint(b-c,0),new mxPoint(b,.5*d),new mxPoint(b-c,d),new mxPoint(c,d),new mxPoint(0,.5*d)],this.isRounded,e,
-!0)};mxCellRenderer.registerShape("hexagon",U);mxUtils.extend(O,mxRectangleShape);O.prototype.isHtmlAllowed=function(){return!1};O.prototype.paintForeground=function(a,c,e,b,d){var g=Math.min(b/5,d/5)+1;a.begin();a.moveTo(c+b/2,e+g);a.lineTo(c+b/2,e+d-g);a.moveTo(c+g,e+d/2);a.lineTo(c+b-g,e+d/2);a.end();a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("plus",O);var Xa=mxRhombus.prototype.paintVertexShape;mxRhombus.prototype.getLabelBounds=function(a){if(1==
-this.style["double"]){var c=(2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(a.x+c,a.y+c,a.width-2*c,a.height-2*c)}return a};mxRhombus.prototype.paintVertexShape=function(a,c,e,b,d){Xa.apply(this,arguments);if(!this.outline&&1==this.style["double"]){var g=2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);c+=g;e+=g;b-=2*g;d-=2*g;0<b&&0<d&&(a.setShadow(!1),Xa.apply(this,[a,c,e,b,d]))}};mxUtils.extend(N,
-mxRectangleShape);N.prototype.isHtmlAllowed=function(){return!1};N.prototype.getLabelBounds=function(a){if(1==this.style["double"]){var c=(Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(a.x+c,a.y+c,a.width-2*c,a.height-2*c)}return a};N.prototype.paintForeground=function(a,c,e,b,d){if(null!=this.style){if(!this.outline&&1==this.style["double"]){var g=Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||
-0);c+=g;e+=g;b-=2*g;d-=2*g;0<b&&0<d&&mxRectangleShape.prototype.paintBackground.apply(this,arguments)}a.setDashed(!1);var g=0,y;do{y=mxCellRenderer.defaultShapes[this.style["symbol"+g]];if(null!=y){var f=this.style["symbol"+g+"Align"],k=this.style["symbol"+g+"VerticalAlign"],l=this.style["symbol"+g+"Width"],n=this.style["symbol"+g+"Height"],v=this.style["symbol"+g+"Spacing"]||0,q=this.style["symbol"+g+"VSpacing"]||v,sa=this.style["symbol"+g+"ArcSpacing"];null!=sa&&(sa*=this.getArcSize(b+this.strokewidth,
-d+this.strokewidth),v+=sa,q+=sa);var sa=c,oa=e,sa=f==mxConstants.ALIGN_CENTER?sa+(b-l)/2:f==mxConstants.ALIGN_RIGHT?sa+(b-l-v):sa+v,oa=k==mxConstants.ALIGN_MIDDLE?oa+(d-n)/2:k==mxConstants.ALIGN_BOTTOM?oa+(d-n-q):oa+q;a.save();f=new y;f.style=this.style;y.prototype.paintVertexShape.call(f,a,sa,oa,l,n);a.restore()}g++}while(null!=y)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("ext",N);mxUtils.extend(v,mxCylinder);v.prototype.redrawPath=function(a,
-c,e,b,d,g){g?(a.moveTo(0,0),a.lineTo(b/2,d/2),a.lineTo(b,0),a.end()):(a.moveTo(0,0),a.lineTo(b,0),a.lineTo(b,d),a.lineTo(0,d),a.close())};mxCellRenderer.registerShape("message",v);mxUtils.extend(D,mxShape);D.prototype.paintBackground=function(a,c,e,b,d){a.translate(c,e);a.ellipse(b/4,0,b/2,d/4);a.fillAndStroke();a.begin();a.moveTo(b/2,d/4);a.lineTo(b/2,2*d/3);a.moveTo(b/2,d/3);a.lineTo(0,d/3);a.moveTo(b/2,d/3);a.lineTo(b,d/3);a.moveTo(b/2,2*d/3);a.lineTo(0,d);a.moveTo(b/2,2*d/3);a.lineTo(b,d);a.end();
-a.stroke()};mxCellRenderer.registerShape("umlActor",D);mxUtils.extend(B,mxShape);B.prototype.getLabelMargins=function(a){return new mxRectangle(a.width/6,0,0,0)};B.prototype.paintBackground=function(a,c,e,b,d){a.translate(c,e);a.begin();a.moveTo(0,d/4);a.lineTo(0,3*d/4);a.end();a.stroke();a.begin();a.moveTo(0,d/2);a.lineTo(b/6,d/2);a.end();a.stroke();a.ellipse(b/6,0,5*b/6,d);a.fillAndStroke()};mxCellRenderer.registerShape("umlBoundary",B);mxUtils.extend(J,mxEllipse);J.prototype.paintVertexShape=function(a,
+!0)};mxCellRenderer.registerShape("hexagon",U);mxUtils.extend(O,mxRectangleShape);O.prototype.isHtmlAllowed=function(){return!1};O.prototype.paintForeground=function(a,c,e,b,d){var k=Math.min(b/5,d/5)+1;a.begin();a.moveTo(c+b/2,e+k);a.lineTo(c+b/2,e+d-k);a.moveTo(c+k,e+d/2);a.lineTo(c+b-k,e+d/2);a.end();a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("plus",O);var Xa=mxRhombus.prototype.paintVertexShape;mxRhombus.prototype.getLabelBounds=function(a){if(1==
+this.style["double"]){var c=(2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(a.x+c,a.y+c,a.width-2*c,a.height-2*c)}return a};mxRhombus.prototype.paintVertexShape=function(a,c,e,b,d){Xa.apply(this,arguments);if(!this.outline&&1==this.style["double"]){var k=2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);c+=k;e+=k;b-=2*k;d-=2*k;0<b&&0<d&&(a.setShadow(!1),Xa.apply(this,[a,c,e,b,d]))}};mxUtils.extend(N,
+mxRectangleShape);N.prototype.isHtmlAllowed=function(){return!1};N.prototype.getLabelBounds=function(a){if(1==this.style["double"]){var c=(Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(a.x+c,a.y+c,a.width-2*c,a.height-2*c)}return a};N.prototype.paintForeground=function(a,c,e,b,d){if(null!=this.style){if(!this.outline&&1==this.style["double"]){var k=Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||
+0);c+=k;e+=k;b-=2*k;d-=2*k;0<b&&0<d&&mxRectangleShape.prototype.paintBackground.apply(this,arguments)}a.setDashed(!1);var k=0,y;do{y=mxCellRenderer.defaultShapes[this.style["symbol"+k]];if(null!=y){var f=this.style["symbol"+k+"Align"],g=this.style["symbol"+k+"VerticalAlign"],l=this.style["symbol"+k+"Width"],n=this.style["symbol"+k+"Height"],v=this.style["symbol"+k+"Spacing"]||0,q=this.style["symbol"+k+"VSpacing"]||v,sa=this.style["symbol"+k+"ArcSpacing"];null!=sa&&(sa*=this.getArcSize(b+this.strokewidth,
+d+this.strokewidth),v+=sa,q+=sa);var sa=c,oa=e,sa=f==mxConstants.ALIGN_CENTER?sa+(b-l)/2:f==mxConstants.ALIGN_RIGHT?sa+(b-l-v):sa+v,oa=g==mxConstants.ALIGN_MIDDLE?oa+(d-n)/2:g==mxConstants.ALIGN_BOTTOM?oa+(d-n-q):oa+q;a.save();f=new y;f.style=this.style;y.prototype.paintVertexShape.call(f,a,sa,oa,l,n);a.restore()}k++}while(null!=y)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("ext",N);mxUtils.extend(v,mxCylinder);v.prototype.redrawPath=function(a,
+c,e,b,d,k){k?(a.moveTo(0,0),a.lineTo(b/2,d/2),a.lineTo(b,0),a.end()):(a.moveTo(0,0),a.lineTo(b,0),a.lineTo(b,d),a.lineTo(0,d),a.close())};mxCellRenderer.registerShape("message",v);mxUtils.extend(C,mxShape);C.prototype.paintBackground=function(a,c,e,b,d){a.translate(c,e);a.ellipse(b/4,0,b/2,d/4);a.fillAndStroke();a.begin();a.moveTo(b/2,d/4);a.lineTo(b/2,2*d/3);a.moveTo(b/2,d/3);a.lineTo(0,d/3);a.moveTo(b/2,d/3);a.lineTo(b,d/3);a.moveTo(b/2,2*d/3);a.lineTo(0,d);a.moveTo(b/2,2*d/3);a.lineTo(b,d);a.end();
+a.stroke()};mxCellRenderer.registerShape("umlActor",C);mxUtils.extend(B,mxShape);B.prototype.getLabelMargins=function(a){return new mxRectangle(a.width/6,0,0,0)};B.prototype.paintBackground=function(a,c,e,b,d){a.translate(c,e);a.begin();a.moveTo(0,d/4);a.lineTo(0,3*d/4);a.end();a.stroke();a.begin();a.moveTo(0,d/2);a.lineTo(b/6,d/2);a.end();a.stroke();a.ellipse(b/6,0,5*b/6,d);a.fillAndStroke()};mxCellRenderer.registerShape("umlBoundary",B);mxUtils.extend(J,mxEllipse);J.prototype.paintVertexShape=function(a,
c,e,b,d){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.begin();a.moveTo(c+b/8,e+d);a.lineTo(c+7*b/8,e+d);a.end();a.stroke()};mxCellRenderer.registerShape("umlEntity",J);mxUtils.extend(L,mxShape);L.prototype.paintVertexShape=function(a,c,e,b,d){a.translate(c,e);a.begin();a.moveTo(b,0);a.lineTo(0,d);a.moveTo(0,0);a.lineTo(b,d);a.end();a.stroke()};mxCellRenderer.registerShape("umlDestroy",L);mxUtils.extend(W,mxShape);W.prototype.getLabelBounds=function(a){return new mxRectangle(a.x,a.y+
a.height/8,a.width,7*a.height/8)};W.prototype.paintBackground=function(a,c,e,b,d){a.translate(c,e);a.begin();a.moveTo(3*b/8,d/8*1.1);a.lineTo(5*b/8,0);a.end();a.stroke();a.ellipse(0,d/8,b,7*d/8);a.fillAndStroke()};W.prototype.paintForeground=function(a,c,e,b,d){a.begin();a.moveTo(3*b/8,d/8*1.1);a.lineTo(5*b/8,d/4);a.end();a.stroke()};mxCellRenderer.registerShape("umlControl",W);mxUtils.extend(Q,mxRectangleShape);Q.prototype.size=40;Q.prototype.isHtmlAllowed=function(){return!1};Q.prototype.getLabelBounds=
-function(a){var c=Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale));return new mxRectangle(a.x,a.y,a.width,c)};Q.prototype.paintBackground=function(a,c,e,b,d){var g=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),y=mxUtils.getValue(this.style,"participant");null==y||null==this.state?mxRectangleShape.prototype.paintBackground.call(this,a,c,e,b,g):(y=this.state.view.graph.cellRenderer.getShape(y),null!=y&&y!=Q&&(y=new y,
-y.apply(this.state),a.save(),y.paintVertexShape(a,c,e,b,g),a.restore()));g<d&&(a.setDashed("1"==mxUtils.getValue(this.style,"lifelineDashed","1")),a.begin(),a.moveTo(c+b/2,e+g),a.lineTo(c+b/2,e+d),a.end(),a.stroke())};Q.prototype.paintForeground=function(a,c,e,b,d){var g=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"size",this.size))));mxRectangleShape.prototype.paintForeground.call(this,a,c,e,b,Math.min(d,g))};mxCellRenderer.registerShape("umlLifeline",Q);mxUtils.extend(aa,mxShape);
-aa.prototype.width=60;aa.prototype.height=30;aa.prototype.corner=10;aa.prototype.getLabelMargins=function(a){return new mxRectangle(0,0,a.width-parseFloat(mxUtils.getValue(this.style,"width",this.width)*this.scale),a.height-parseFloat(mxUtils.getValue(this.style,"height",this.height)*this.scale))};aa.prototype.paintBackground=function(a,c,e,b,d){var g=this.corner,y=Math.min(b,Math.max(g,parseFloat(mxUtils.getValue(this.style,"width",this.width)))),f=Math.min(d,Math.max(1.5*g,parseFloat(mxUtils.getValue(this.style,
-"height",this.height)))),k=mxUtils.getValue(this.style,mxConstants.STYLE_SWIMLANE_FILLCOLOR,mxConstants.NONE);k!=mxConstants.NONE&&(a.setFillColor(k),a.rect(c,e,b,d),a.fill());null!=this.fill&&this.fill!=mxConstants.NONE&&this.gradient&&this.gradient!=mxConstants.NONE?(this.getGradientBounds(a,c,e,b,d),a.setGradient(this.fill,this.gradient,c,e,b,d,this.gradientDirection)):a.setFillColor(this.fill);a.begin();a.moveTo(c,e);a.lineTo(c+y,e);a.lineTo(c+y,e+Math.max(0,f-1.5*g));a.lineTo(c+Math.max(0,y-
-g),e+f);a.lineTo(c,e+f);a.close();a.fillAndStroke();a.begin();a.moveTo(c+y,e);a.lineTo(c+b,e);a.lineTo(c+b,e+d);a.lineTo(c,e+d);a.lineTo(c,e+f);a.stroke()};mxCellRenderer.registerShape("umlFrame",aa);mxPerimeter.CenterPerimeter=function(a,c,e,b){return new mxPoint(a.getCenterX(),a.getCenterY())};mxStyleRegistry.putValue("centerPerimeter",mxPerimeter.CenterPerimeter);mxPerimeter.LifelinePerimeter=function(a,c,e,b){b=Q.prototype.size;null!=c&&(b=mxUtils.getValue(c.style,"size",b)*c.view.scale);c=parseFloat(c.style[mxConstants.STYLE_STROKEWIDTH]||
+function(a){var c=Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale));return new mxRectangle(a.x,a.y,a.width,c)};Q.prototype.paintBackground=function(a,c,e,b,d){var k=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),y=mxUtils.getValue(this.style,"participant");null==y||null==this.state?mxRectangleShape.prototype.paintBackground.call(this,a,c,e,b,k):(y=this.state.view.graph.cellRenderer.getShape(y),null!=y&&y!=Q&&(y=new y,
+y.apply(this.state),a.save(),y.paintVertexShape(a,c,e,b,k),a.restore()));k<d&&(a.setDashed("1"==mxUtils.getValue(this.style,"lifelineDashed","1")),a.begin(),a.moveTo(c+b/2,e+k),a.lineTo(c+b/2,e+d),a.end(),a.stroke())};Q.prototype.paintForeground=function(a,c,e,b,d){var k=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"size",this.size))));mxRectangleShape.prototype.paintForeground.call(this,a,c,e,b,Math.min(d,k))};mxCellRenderer.registerShape("umlLifeline",Q);mxUtils.extend(Z,mxShape);
+Z.prototype.width=60;Z.prototype.height=30;Z.prototype.corner=10;Z.prototype.getLabelMargins=function(a){return new mxRectangle(0,0,a.width-parseFloat(mxUtils.getValue(this.style,"width",this.width)*this.scale),a.height-parseFloat(mxUtils.getValue(this.style,"height",this.height)*this.scale))};Z.prototype.paintBackground=function(a,c,e,b,d){var k=this.corner,y=Math.min(b,Math.max(k,parseFloat(mxUtils.getValue(this.style,"width",this.width)))),f=Math.min(d,Math.max(1.5*k,parseFloat(mxUtils.getValue(this.style,
+"height",this.height)))),g=mxUtils.getValue(this.style,mxConstants.STYLE_SWIMLANE_FILLCOLOR,mxConstants.NONE);g!=mxConstants.NONE&&(a.setFillColor(g),a.rect(c,e,b,d),a.fill());null!=this.fill&&this.fill!=mxConstants.NONE&&this.gradient&&this.gradient!=mxConstants.NONE?(this.getGradientBounds(a,c,e,b,d),a.setGradient(this.fill,this.gradient,c,e,b,d,this.gradientDirection)):a.setFillColor(this.fill);a.begin();a.moveTo(c,e);a.lineTo(c+y,e);a.lineTo(c+y,e+Math.max(0,f-1.5*k));a.lineTo(c+Math.max(0,y-
+k),e+f);a.lineTo(c,e+f);a.close();a.fillAndStroke();a.begin();a.moveTo(c+y,e);a.lineTo(c+b,e);a.lineTo(c+b,e+d);a.lineTo(c,e+d);a.lineTo(c,e+f);a.stroke()};mxCellRenderer.registerShape("umlFrame",Z);mxPerimeter.CenterPerimeter=function(a,c,e,b){return new mxPoint(a.getCenterX(),a.getCenterY())};mxStyleRegistry.putValue("centerPerimeter",mxPerimeter.CenterPerimeter);mxPerimeter.LifelinePerimeter=function(a,c,e,b){b=Q.prototype.size;null!=c&&(b=mxUtils.getValue(c.style,"size",b)*c.view.scale);c=parseFloat(c.style[mxConstants.STYLE_STROKEWIDTH]||
1)*c.view.scale/2-1;e.x<a.getCenterX()&&(c=-1*(c+1));return new mxPoint(a.getCenterX()+c,Math.min(a.y+a.height,Math.max(a.y+b,e.y)))};mxStyleRegistry.putValue("lifelinePerimeter",mxPerimeter.LifelinePerimeter);mxPerimeter.OrthogonalPerimeter=function(a,c,e,b){b=!0;return mxPerimeter.RectanglePerimeter.apply(this,arguments)};mxStyleRegistry.putValue("orthogonalPerimeter",mxPerimeter.OrthogonalPerimeter);mxPerimeter.BackbonePerimeter=function(a,c,e,b){b=parseFloat(c.style[mxConstants.STYLE_STROKEWIDTH]||
1)*c.view.scale/2-1;null!=c.style.backboneSize&&(b+=parseFloat(c.style.backboneSize)*c.view.scale/2-1);if("south"==c.style[mxConstants.STYLE_DIRECTION]||"north"==c.style[mxConstants.STYLE_DIRECTION])return e.x<a.getCenterX()&&(b=-1*(b+1)),new mxPoint(a.getCenterX()+b,Math.min(a.y+a.height,Math.max(a.y,e.y)));e.y<a.getCenterY()&&(b=-1*(b+1));return new mxPoint(Math.min(a.x+a.width,Math.max(a.x,e.x)),a.getCenterY()+b)};mxStyleRegistry.putValue("backbonePerimeter",mxPerimeter.BackbonePerimeter);mxPerimeter.CalloutPerimeter=
-function(a,c,e,b){return mxPerimeter.RectanglePerimeter(mxUtils.getDirectedBounds(a,new mxRectangle(0,0,0,Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(c.style,"size",C.prototype.size))*c.view.scale))),c.style),c,e,b)};mxStyleRegistry.putValue("calloutPerimeter",mxPerimeter.CalloutPerimeter);mxPerimeter.ParallelogramPerimeter=function(a,c,e,b){var d="0"!=mxUtils.getValue(c.style,"fixedSize","0"),g=d?G.prototype.fixedSize:G.prototype.size;null!=c&&(g=mxUtils.getValue(c.style,"size",g));
-d&&(g*=c.view.scale);var f=a.x,y=a.y,k=a.width,l=a.height;c=null!=c?mxUtils.getValue(c.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;c==mxConstants.DIRECTION_NORTH||c==mxConstants.DIRECTION_SOUTH?(d=d?Math.max(0,Math.min(l,g)):l*Math.max(0,Math.min(1,g)),y=[new mxPoint(f,y),new mxPoint(f+k,y+d),new mxPoint(f+k,y+l),new mxPoint(f,y+l-d),new mxPoint(f,y)]):(d=d?Math.max(0,Math.min(.5*k,g)):k*Math.max(0,Math.min(1,g)),y=[new mxPoint(f+d,y),new mxPoint(f+k,y),
-new mxPoint(f+k-d,y+l),new mxPoint(f,y+l),new mxPoint(f+d,y)]);l=a.getCenterX();a=a.getCenterY();a=new mxPoint(l,a);b&&(e.x<f||e.x>f+k?a.y=e.y:a.x=e.x);return mxUtils.getPerimeterPoint(y,a,e)};mxStyleRegistry.putValue("parallelogramPerimeter",mxPerimeter.ParallelogramPerimeter);mxPerimeter.TrapezoidPerimeter=function(a,c,e,b){var d="0"!=mxUtils.getValue(c.style,"fixedSize","0"),g=d?z.prototype.fixedSize:z.prototype.size;null!=c&&(g=mxUtils.getValue(c.style,"size",g));d&&(g*=c.view.scale);var f=a.x,
-y=a.y,k=a.width,l=a.height;c=null!=c?mxUtils.getValue(c.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;c==mxConstants.DIRECTION_EAST?(d=d?Math.max(0,Math.min(.5*k,g)):k*Math.max(0,Math.min(1,g)),y=[new mxPoint(f+d,y),new mxPoint(f+k-d,y),new mxPoint(f+k,y+l),new mxPoint(f,y+l),new mxPoint(f+d,y)]):c==mxConstants.DIRECTION_WEST?(d=d?Math.max(0,Math.min(k,g)):k*Math.max(0,Math.min(1,g)),y=[new mxPoint(f,y),new mxPoint(f+k,y),new mxPoint(f+k-d,y+l),new mxPoint(f+
-d,y+l),new mxPoint(f,y)]):c==mxConstants.DIRECTION_NORTH?(d=d?Math.max(0,Math.min(l,g)):l*Math.max(0,Math.min(1,g)),y=[new mxPoint(f,y+d),new mxPoint(f+k,y),new mxPoint(f+k,y+l),new mxPoint(f,y+l-d),new mxPoint(f,y+d)]):(d=d?Math.max(0,Math.min(l,g)):l*Math.max(0,Math.min(1,g)),y=[new mxPoint(f,y),new mxPoint(f+k,y+d),new mxPoint(f+k,y+l-d),new mxPoint(f,y+l),new mxPoint(f,y)]);l=a.getCenterX();a=a.getCenterY();a=new mxPoint(l,a);b&&(e.x<f||e.x>f+k?a.y=e.y:a.x=e.x);return mxUtils.getPerimeterPoint(y,
-a,e)};mxStyleRegistry.putValue("trapezoidPerimeter",mxPerimeter.TrapezoidPerimeter);mxPerimeter.StepPerimeter=function(a,c,e,b){var d="0"!=mxUtils.getValue(c.style,"fixedSize","0"),g=d?M.prototype.fixedSize:M.prototype.size;null!=c&&(g=mxUtils.getValue(c.style,"size",g));d&&(g*=c.view.scale);var f=a.x,y=a.y,k=a.width,l=a.height,n=a.getCenterX();a=a.getCenterY();c=null!=c?mxUtils.getValue(c.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;c==mxConstants.DIRECTION_EAST?
-(d=d?Math.max(0,Math.min(k,g)):k*Math.max(0,Math.min(1,g)),y=[new mxPoint(f,y),new mxPoint(f+k-d,y),new mxPoint(f+k,a),new mxPoint(f+k-d,y+l),new mxPoint(f,y+l),new mxPoint(f+d,a),new mxPoint(f,y)]):c==mxConstants.DIRECTION_WEST?(d=d?Math.max(0,Math.min(k,g)):k*Math.max(0,Math.min(1,g)),y=[new mxPoint(f+d,y),new mxPoint(f+k,y),new mxPoint(f+k-d,a),new mxPoint(f+k,y+l),new mxPoint(f+d,y+l),new mxPoint(f,a),new mxPoint(f+d,y)]):c==mxConstants.DIRECTION_NORTH?(d=d?Math.max(0,Math.min(l,g)):l*Math.max(0,
-Math.min(1,g)),y=[new mxPoint(f,y+d),new mxPoint(n,y),new mxPoint(f+k,y+d),new mxPoint(f+k,y+l),new mxPoint(n,y+l-d),new mxPoint(f,y+l),new mxPoint(f,y+d)]):(d=d?Math.max(0,Math.min(l,g)):l*Math.max(0,Math.min(1,g)),y=[new mxPoint(f,y),new mxPoint(n,y+d),new mxPoint(f+k,y),new mxPoint(f+k,y+l-d),new mxPoint(n,y+l),new mxPoint(f,y+l-d),new mxPoint(f,y)]);n=new mxPoint(n,a);b&&(e.x<f||e.x>f+k?n.y=e.y:n.x=e.x);return mxUtils.getPerimeterPoint(y,n,e)};mxStyleRegistry.putValue("stepPerimeter",mxPerimeter.StepPerimeter);
-mxPerimeter.HexagonPerimeter2=function(a,c,e,b){var d="0"!=mxUtils.getValue(c.style,"fixedSize","0"),g=d?U.prototype.fixedSize:U.prototype.size;null!=c&&(g=mxUtils.getValue(c.style,"size",g));d&&(g*=c.view.scale);var f=a.x,y=a.y,k=a.width,l=a.height,n=a.getCenterX();a=a.getCenterY();c=null!=c?mxUtils.getValue(c.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;c==mxConstants.DIRECTION_NORTH||c==mxConstants.DIRECTION_SOUTH?(d=d?Math.max(0,Math.min(l,g)):l*Math.max(0,
-Math.min(1,g)),y=[new mxPoint(n,y),new mxPoint(f+k,y+d),new mxPoint(f+k,y+l-d),new mxPoint(n,y+l),new mxPoint(f,y+l-d),new mxPoint(f,y+d),new mxPoint(n,y)]):(d=d?Math.max(0,Math.min(k,g)):k*Math.max(0,Math.min(1,g)),y=[new mxPoint(f+d,y),new mxPoint(f+k-d,y),new mxPoint(f+k,a),new mxPoint(f+k-d,y+l),new mxPoint(f+d,y+l),new mxPoint(f,a),new mxPoint(f+d,y)]);n=new mxPoint(n,a);b&&(e.x<f||e.x>f+k?n.y=e.y:n.x=e.x);return mxUtils.getPerimeterPoint(y,n,e)};mxStyleRegistry.putValue("hexagonPerimeter2",
-mxPerimeter.HexagonPerimeter2);mxUtils.extend(na,mxShape);na.prototype.size=10;na.prototype.paintBackground=function(a,c,e,b,d){var g=parseFloat(mxUtils.getValue(this.style,"size",this.size));a.translate(c,e);a.ellipse((b-g)/2,0,g,g);a.fillAndStroke();a.begin();a.moveTo(b/2,g);a.lineTo(b/2,d);a.end();a.stroke()};mxCellRenderer.registerShape("lollipop",na);mxUtils.extend(ga,mxShape);ga.prototype.size=10;ga.prototype.inset=2;ga.prototype.paintBackground=function(a,c,e,b,d){var g=parseFloat(mxUtils.getValue(this.style,
-"size",this.size)),f=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;a.translate(c,e);a.begin();a.moveTo(b/2,g+f);a.lineTo(b/2,d);a.end();a.stroke();a.begin();a.moveTo((b-g)/2-f,g/2);a.quadTo((b-g)/2-f,g+f,b/2,g+f);a.quadTo((b+g)/2+f,g+f,(b+g)/2+f,g/2);a.end();a.stroke()};mxCellRenderer.registerShape("requires",ga);mxUtils.extend(ea,mxShape);ea.prototype.paintBackground=function(a,c,e,b,d){a.translate(c,e);a.begin();a.moveTo(0,0);a.quadTo(b,0,b,d/2);a.quadTo(b,d,0,d);
-a.end();a.stroke()};mxCellRenderer.registerShape("requiredInterface",ea);mxUtils.extend(la,mxShape);la.prototype.inset=2;la.prototype.paintBackground=function(a,c,e,b,d){var g=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;a.translate(c,e);a.ellipse(0,g,b-2*g,d-2*g);a.fillAndStroke();a.begin();a.moveTo(b/2,0);a.quadTo(b,0,b,d/2);a.quadTo(b,d,b/2,d);a.end();a.stroke()};mxCellRenderer.registerShape("providedRequiredInterface",la);mxUtils.extend(V,mxCylinder);V.prototype.jettyWidth=
-20;V.prototype.jettyHeight=10;V.prototype.redrawPath=function(a,c,e,b,d,g){var f=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));c=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));e=f/2;var f=e+f/2,y=Math.min(c,d-c),k=Math.min(y+2*c,d-c);g?(a.moveTo(e,y),a.lineTo(f,y),a.lineTo(f,y+c),a.lineTo(e,y+c),a.moveTo(e,k),a.lineTo(f,k),a.lineTo(f,k+c),a.lineTo(e,k+c)):(a.moveTo(e,0),a.lineTo(b,0),a.lineTo(b,d),a.lineTo(e,d),a.lineTo(e,k+c),a.lineTo(0,k+c),a.lineTo(0,
-k),a.lineTo(e,k),a.lineTo(e,y+c),a.lineTo(0,y+c),a.lineTo(0,y),a.lineTo(e,y),a.close());a.end()};mxCellRenderer.registerShape("module",V);mxUtils.extend(ca,mxCylinder);ca.prototype.jettyWidth=32;ca.prototype.jettyHeight=12;ca.prototype.redrawPath=function(a,c,e,b,d,g){var f=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));c=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));e=f/2;var f=e+f/2,y=.3*d-c/2,k=.7*d-c/2;g?(a.moveTo(e,y),a.lineTo(f,y),a.lineTo(f,
-y+c),a.lineTo(e,y+c),a.moveTo(e,k),a.lineTo(f,k),a.lineTo(f,k+c),a.lineTo(e,k+c)):(a.moveTo(e,0),a.lineTo(b,0),a.lineTo(b,d),a.lineTo(e,d),a.lineTo(e,k+c),a.lineTo(0,k+c),a.lineTo(0,k),a.lineTo(e,k),a.lineTo(e,y+c),a.lineTo(0,y+c),a.lineTo(0,y),a.lineTo(e,y),a.close());a.end()};mxCellRenderer.registerShape("component",ca);mxUtils.extend(ma,mxRectangleShape);ma.prototype.paintForeground=function(a,c,e,b,d){var g=b/2,f=d/2,y=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/
-2;a.begin();this.addPoints(a,[new mxPoint(c+g,e),new mxPoint(c+b,e+f),new mxPoint(c+g,e+d),new mxPoint(c,e+f)],this.isRounded,y,!0);a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("associativeEntity",ma);mxUtils.extend(T,mxDoubleEllipse);T.prototype.outerStroke=!0;T.prototype.paintVertexShape=function(a,c,e,b,d){var g=Math.min(4,Math.min(b/5,d/5));0<b&&0<d&&(a.ellipse(c+g,e+g,b-2*g,d-2*g),a.fillAndStroke());a.setShadow(!1);this.outerStroke&&
+function(a,c,e,b){return mxPerimeter.RectanglePerimeter(mxUtils.getDirectedBounds(a,new mxRectangle(0,0,0,Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(c.style,"size",D.prototype.size))*c.view.scale))),c.style),c,e,b)};mxStyleRegistry.putValue("calloutPerimeter",mxPerimeter.CalloutPerimeter);mxPerimeter.ParallelogramPerimeter=function(a,c,e,b){var d="0"!=mxUtils.getValue(c.style,"fixedSize","0"),k=d?G.prototype.fixedSize:G.prototype.size;null!=c&&(k=mxUtils.getValue(c.style,"size",k));
+d&&(k*=c.view.scale);var f=a.x,y=a.y,g=a.width,l=a.height;c=null!=c?mxUtils.getValue(c.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;c==mxConstants.DIRECTION_NORTH||c==mxConstants.DIRECTION_SOUTH?(d=d?Math.max(0,Math.min(l,k)):l*Math.max(0,Math.min(1,k)),y=[new mxPoint(f,y),new mxPoint(f+g,y+d),new mxPoint(f+g,y+l),new mxPoint(f,y+l-d),new mxPoint(f,y)]):(d=d?Math.max(0,Math.min(.5*g,k)):g*Math.max(0,Math.min(1,k)),y=[new mxPoint(f+d,y),new mxPoint(f+g,y),
+new mxPoint(f+g-d,y+l),new mxPoint(f,y+l),new mxPoint(f+d,y)]);l=a.getCenterX();a=a.getCenterY();a=new mxPoint(l,a);b&&(e.x<f||e.x>f+g?a.y=e.y:a.x=e.x);return mxUtils.getPerimeterPoint(y,a,e)};mxStyleRegistry.putValue("parallelogramPerimeter",mxPerimeter.ParallelogramPerimeter);mxPerimeter.TrapezoidPerimeter=function(a,c,e,b){var d="0"!=mxUtils.getValue(c.style,"fixedSize","0"),k=d?z.prototype.fixedSize:z.prototype.size;null!=c&&(k=mxUtils.getValue(c.style,"size",k));d&&(k*=c.view.scale);var f=a.x,
+y=a.y,g=a.width,l=a.height;c=null!=c?mxUtils.getValue(c.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;c==mxConstants.DIRECTION_EAST?(d=d?Math.max(0,Math.min(.5*g,k)):g*Math.max(0,Math.min(1,k)),y=[new mxPoint(f+d,y),new mxPoint(f+g-d,y),new mxPoint(f+g,y+l),new mxPoint(f,y+l),new mxPoint(f+d,y)]):c==mxConstants.DIRECTION_WEST?(d=d?Math.max(0,Math.min(g,k)):g*Math.max(0,Math.min(1,k)),y=[new mxPoint(f,y),new mxPoint(f+g,y),new mxPoint(f+g-d,y+l),new mxPoint(f+
+d,y+l),new mxPoint(f,y)]):c==mxConstants.DIRECTION_NORTH?(d=d?Math.max(0,Math.min(l,k)):l*Math.max(0,Math.min(1,k)),y=[new mxPoint(f,y+d),new mxPoint(f+g,y),new mxPoint(f+g,y+l),new mxPoint(f,y+l-d),new mxPoint(f,y+d)]):(d=d?Math.max(0,Math.min(l,k)):l*Math.max(0,Math.min(1,k)),y=[new mxPoint(f,y),new mxPoint(f+g,y+d),new mxPoint(f+g,y+l-d),new mxPoint(f,y+l),new mxPoint(f,y)]);l=a.getCenterX();a=a.getCenterY();a=new mxPoint(l,a);b&&(e.x<f||e.x>f+g?a.y=e.y:a.x=e.x);return mxUtils.getPerimeterPoint(y,
+a,e)};mxStyleRegistry.putValue("trapezoidPerimeter",mxPerimeter.TrapezoidPerimeter);mxPerimeter.StepPerimeter=function(a,c,e,b){var d="0"!=mxUtils.getValue(c.style,"fixedSize","0"),k=d?M.prototype.fixedSize:M.prototype.size;null!=c&&(k=mxUtils.getValue(c.style,"size",k));d&&(k*=c.view.scale);var f=a.x,y=a.y,g=a.width,l=a.height,n=a.getCenterX();a=a.getCenterY();c=null!=c?mxUtils.getValue(c.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;c==mxConstants.DIRECTION_EAST?
+(d=d?Math.max(0,Math.min(g,k)):g*Math.max(0,Math.min(1,k)),y=[new mxPoint(f,y),new mxPoint(f+g-d,y),new mxPoint(f+g,a),new mxPoint(f+g-d,y+l),new mxPoint(f,y+l),new mxPoint(f+d,a),new mxPoint(f,y)]):c==mxConstants.DIRECTION_WEST?(d=d?Math.max(0,Math.min(g,k)):g*Math.max(0,Math.min(1,k)),y=[new mxPoint(f+d,y),new mxPoint(f+g,y),new mxPoint(f+g-d,a),new mxPoint(f+g,y+l),new mxPoint(f+d,y+l),new mxPoint(f,a),new mxPoint(f+d,y)]):c==mxConstants.DIRECTION_NORTH?(d=d?Math.max(0,Math.min(l,k)):l*Math.max(0,
+Math.min(1,k)),y=[new mxPoint(f,y+d),new mxPoint(n,y),new mxPoint(f+g,y+d),new mxPoint(f+g,y+l),new mxPoint(n,y+l-d),new mxPoint(f,y+l),new mxPoint(f,y+d)]):(d=d?Math.max(0,Math.min(l,k)):l*Math.max(0,Math.min(1,k)),y=[new mxPoint(f,y),new mxPoint(n,y+d),new mxPoint(f+g,y),new mxPoint(f+g,y+l-d),new mxPoint(n,y+l),new mxPoint(f,y+l-d),new mxPoint(f,y)]);n=new mxPoint(n,a);b&&(e.x<f||e.x>f+g?n.y=e.y:n.x=e.x);return mxUtils.getPerimeterPoint(y,n,e)};mxStyleRegistry.putValue("stepPerimeter",mxPerimeter.StepPerimeter);
+mxPerimeter.HexagonPerimeter2=function(a,c,e,b){var d="0"!=mxUtils.getValue(c.style,"fixedSize","0"),k=d?U.prototype.fixedSize:U.prototype.size;null!=c&&(k=mxUtils.getValue(c.style,"size",k));d&&(k*=c.view.scale);var f=a.x,y=a.y,g=a.width,l=a.height,n=a.getCenterX();a=a.getCenterY();c=null!=c?mxUtils.getValue(c.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;c==mxConstants.DIRECTION_NORTH||c==mxConstants.DIRECTION_SOUTH?(d=d?Math.max(0,Math.min(l,k)):l*Math.max(0,
+Math.min(1,k)),y=[new mxPoint(n,y),new mxPoint(f+g,y+d),new mxPoint(f+g,y+l-d),new mxPoint(n,y+l),new mxPoint(f,y+l-d),new mxPoint(f,y+d),new mxPoint(n,y)]):(d=d?Math.max(0,Math.min(g,k)):g*Math.max(0,Math.min(1,k)),y=[new mxPoint(f+d,y),new mxPoint(f+g-d,y),new mxPoint(f+g,a),new mxPoint(f+g-d,y+l),new mxPoint(f+d,y+l),new mxPoint(f,a),new mxPoint(f+d,y)]);n=new mxPoint(n,a);b&&(e.x<f||e.x>f+g?n.y=e.y:n.x=e.x);return mxUtils.getPerimeterPoint(y,n,e)};mxStyleRegistry.putValue("hexagonPerimeter2",
+mxPerimeter.HexagonPerimeter2);mxUtils.extend(na,mxShape);na.prototype.size=10;na.prototype.paintBackground=function(a,c,e,b,d){var k=parseFloat(mxUtils.getValue(this.style,"size",this.size));a.translate(c,e);a.ellipse((b-k)/2,0,k,k);a.fillAndStroke();a.begin();a.moveTo(b/2,k);a.lineTo(b/2,d);a.end();a.stroke()};mxCellRenderer.registerShape("lollipop",na);mxUtils.extend(ga,mxShape);ga.prototype.size=10;ga.prototype.inset=2;ga.prototype.paintBackground=function(a,c,e,b,d){var k=parseFloat(mxUtils.getValue(this.style,
+"size",this.size)),f=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;a.translate(c,e);a.begin();a.moveTo(b/2,k+f);a.lineTo(b/2,d);a.end();a.stroke();a.begin();a.moveTo((b-k)/2-f,k/2);a.quadTo((b-k)/2-f,k+f,b/2,k+f);a.quadTo((b+k)/2+f,k+f,(b+k)/2+f,k/2);a.end();a.stroke()};mxCellRenderer.registerShape("requires",ga);mxUtils.extend(da,mxShape);da.prototype.paintBackground=function(a,c,e,b,d){a.translate(c,e);a.begin();a.moveTo(0,0);a.quadTo(b,0,b,d/2);a.quadTo(b,d,0,d);
+a.end();a.stroke()};mxCellRenderer.registerShape("requiredInterface",da);mxUtils.extend(la,mxShape);la.prototype.inset=2;la.prototype.paintBackground=function(a,c,e,b,d){var k=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;a.translate(c,e);a.ellipse(0,k,b-2*k,d-2*k);a.fillAndStroke();a.begin();a.moveTo(b/2,0);a.quadTo(b,0,b,d/2);a.quadTo(b,d,b/2,d);a.end();a.stroke()};mxCellRenderer.registerShape("providedRequiredInterface",la);mxUtils.extend(V,mxCylinder);V.prototype.jettyWidth=
+20;V.prototype.jettyHeight=10;V.prototype.redrawPath=function(a,c,e,b,d,k){var f=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));c=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));e=f/2;var f=e+f/2,y=Math.min(c,d-c),g=Math.min(y+2*c,d-c);k?(a.moveTo(e,y),a.lineTo(f,y),a.lineTo(f,y+c),a.lineTo(e,y+c),a.moveTo(e,g),a.lineTo(f,g),a.lineTo(f,g+c),a.lineTo(e,g+c)):(a.moveTo(e,0),a.lineTo(b,0),a.lineTo(b,d),a.lineTo(e,d),a.lineTo(e,g+c),a.lineTo(0,g+c),a.lineTo(0,
+g),a.lineTo(e,g),a.lineTo(e,y+c),a.lineTo(0,y+c),a.lineTo(0,y),a.lineTo(e,y),a.close());a.end()};mxCellRenderer.registerShape("module",V);mxUtils.extend(ba,mxCylinder);ba.prototype.jettyWidth=32;ba.prototype.jettyHeight=12;ba.prototype.redrawPath=function(a,c,e,b,d,k){var f=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));c=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));e=f/2;var f=e+f/2,y=.3*d-c/2,g=.7*d-c/2;k?(a.moveTo(e,y),a.lineTo(f,y),a.lineTo(f,
+y+c),a.lineTo(e,y+c),a.moveTo(e,g),a.lineTo(f,g),a.lineTo(f,g+c),a.lineTo(e,g+c)):(a.moveTo(e,0),a.lineTo(b,0),a.lineTo(b,d),a.lineTo(e,d),a.lineTo(e,g+c),a.lineTo(0,g+c),a.lineTo(0,g),a.lineTo(e,g),a.lineTo(e,y+c),a.lineTo(0,y+c),a.lineTo(0,y),a.lineTo(e,y),a.close());a.end()};mxCellRenderer.registerShape("component",ba);mxUtils.extend(ma,mxRectangleShape);ma.prototype.paintForeground=function(a,c,e,b,d){var k=b/2,f=d/2,y=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/
+2;a.begin();this.addPoints(a,[new mxPoint(c+k,e),new mxPoint(c+b,e+f),new mxPoint(c+k,e+d),new mxPoint(c,e+f)],this.isRounded,y,!0);a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("associativeEntity",ma);mxUtils.extend(T,mxDoubleEllipse);T.prototype.outerStroke=!0;T.prototype.paintVertexShape=function(a,c,e,b,d){var k=Math.min(4,Math.min(b/5,d/5));0<b&&0<d&&(a.ellipse(c+k,e+k,b-2*k,d-2*k),a.fillAndStroke());a.setShadow(!1);this.outerStroke&&
(a.ellipse(c,e,b,d),a.stroke())};mxCellRenderer.registerShape("endState",T);mxUtils.extend(P,T);P.prototype.outerStroke=!1;mxCellRenderer.registerShape("startState",P);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(X,mxArrowConnector);X.prototype.defaultWidth=10;X.prototype.defaultArrowWidth=20;X.prototype.getStartArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"startWidth",this.defaultArrowWidth)};X.prototype.getEndArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"endWidth",this.defaultArrowWidth)};X.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};mxCellRenderer.registerShape("flexArrow",
-X);mxUtils.extend(da,mxActor);da.prototype.size=30;da.prototype.isRoundable=function(){return!0};da.prototype.redrawPath=function(a,c,e,b,d){c=Math.min(d,parseFloat(mxUtils.getValue(this.style,"size",this.size)));e=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,d),new mxPoint(0,c),new mxPoint(b,0),new mxPoint(b,d)],this.isRounded,e,!0);a.end()};mxCellRenderer.registerShape("manualInput",da);mxUtils.extend(ia,mxRectangleShape);ia.prototype.dx=
-20;ia.prototype.dy=20;ia.prototype.isHtmlAllowed=function(){return!1};ia.prototype.paintForeground=function(a,c,e,b,d){mxRectangleShape.prototype.paintForeground.apply(this,arguments);var g=0;if(this.isRounded)var f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,g=Math.max(g,Math.min(b*f,d*f));f=Math.max(g,Math.min(b,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));g=Math.max(g,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));
-a.begin();a.moveTo(c,e+g);a.lineTo(c+b,e+g);a.end();a.stroke();a.begin();a.moveTo(c+f,e);a.lineTo(c+f,e+d);a.end();a.stroke()};mxCellRenderer.registerShape("internalStorage",ia);mxUtils.extend(pa,mxActor);pa.prototype.dx=20;pa.prototype.dy=20;pa.prototype.redrawPath=function(a,c,e,b,d){c=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));e=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));
-var g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(b,0),new mxPoint(b,e),new mxPoint(c,e),new mxPoint(c,d),new mxPoint(0,d)],this.isRounded,g,!0);a.end()};mxCellRenderer.registerShape("corner",pa);mxUtils.extend(R,mxActor);R.prototype.redrawPath=function(a,c,e,b,d){a.moveTo(0,0);a.lineTo(0,d);a.end();a.moveTo(b,0);a.lineTo(b,d);a.end();a.moveTo(0,d/2);a.lineTo(b,d/2);a.end()};mxCellRenderer.registerShape("crossbar",
-R);mxUtils.extend(ka,mxActor);ka.prototype.dx=20;ka.prototype.dy=20;ka.prototype.redrawPath=function(a,c,e,b,d){c=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));e=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(b,0),new mxPoint(b,e),new mxPoint((b+
-c)/2,e),new mxPoint((b+c)/2,d),new mxPoint((b-c)/2,d),new mxPoint((b-c)/2,e),new mxPoint(0,e)],this.isRounded,g,!0);a.end()};mxCellRenderer.registerShape("tee",ka);mxUtils.extend(ba,mxActor);ba.prototype.arrowWidth=.3;ba.prototype.arrowSize=.2;ba.prototype.redrawPath=function(a,c,e,b,d){var g=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth))));c=b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize))));e=(d-g)/2;var g=
-e+g,f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,e),new mxPoint(b-c,e),new mxPoint(b-c,0),new mxPoint(b,d/2),new mxPoint(b-c,d),new mxPoint(b-c,g),new mxPoint(0,g)],this.isRounded,f,!0);a.end()};mxCellRenderer.registerShape("singleArrow",ba);mxUtils.extend(ja,mxActor);ja.prototype.redrawPath=function(a,c,e,b,d){var g=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",ba.prototype.arrowWidth))));c=b*Math.max(0,
-Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",ba.prototype.arrowSize))));e=(d-g)/2;var g=e+g,f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,d/2),new mxPoint(c,0),new mxPoint(c,e),new mxPoint(b-c,e),new mxPoint(b-c,0),new mxPoint(b,d/2),new mxPoint(b-c,d),new mxPoint(b-c,g),new mxPoint(c,g),new mxPoint(c,d)],this.isRounded,f,!0);a.end()};mxCellRenderer.registerShape("doubleArrow",ja);mxUtils.extend(Y,mxActor);Y.prototype.size=
-.1;Y.prototype.fixedSize=20;Y.prototype.redrawPath=function(a,c,e,b,d){c="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));a.moveTo(c,0);a.lineTo(b,0);a.quadTo(b-2*c,d/2,b,d);a.lineTo(c,d);a.quadTo(c-2*c,d/2,c,0);a.close();a.end()};mxCellRenderer.registerShape("dataStorage",Y);mxUtils.extend(qa,mxActor);qa.prototype.redrawPath=function(a,
-c,e,b,d){a.moveTo(0,0);a.quadTo(b,0,b,d/2);a.quadTo(b,d,0,d);a.close();a.end()};mxCellRenderer.registerShape("or",qa);mxUtils.extend(va,mxActor);va.prototype.redrawPath=function(a,c,e,b,d){a.moveTo(0,0);a.quadTo(b,0,b,d/2);a.quadTo(b,d,0,d);a.quadTo(b/2,d/2,0,0);a.close();a.end()};mxCellRenderer.registerShape("xor",va);mxUtils.extend(ua,mxActor);ua.prototype.size=20;ua.prototype.isRoundable=function(){return!0};ua.prototype.redrawPath=function(a,c,e,b,d){c=Math.min(b/2,Math.min(d,parseFloat(mxUtils.getValue(this.style,
+X);mxUtils.extend(ca,mxActor);ca.prototype.size=30;ca.prototype.isRoundable=function(){return!0};ca.prototype.redrawPath=function(a,c,e,b,d){c=Math.min(d,parseFloat(mxUtils.getValue(this.style,"size",this.size)));e=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,d),new mxPoint(0,c),new mxPoint(b,0),new mxPoint(b,d)],this.isRounded,e,!0);a.end()};mxCellRenderer.registerShape("manualInput",ca);mxUtils.extend(ia,mxRectangleShape);ia.prototype.dx=
+20;ia.prototype.dy=20;ia.prototype.isHtmlAllowed=function(){return!1};ia.prototype.paintForeground=function(a,c,e,b,d){mxRectangleShape.prototype.paintForeground.apply(this,arguments);var k=0;if(this.isRounded)var f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,k=Math.max(k,Math.min(b*f,d*f));f=Math.max(k,Math.min(b,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));k=Math.max(k,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));
+a.begin();a.moveTo(c,e+k);a.lineTo(c+b,e+k);a.end();a.stroke();a.begin();a.moveTo(c+f,e);a.lineTo(c+f,e+d);a.end();a.stroke()};mxCellRenderer.registerShape("internalStorage",ia);mxUtils.extend(pa,mxActor);pa.prototype.dx=20;pa.prototype.dy=20;pa.prototype.redrawPath=function(a,c,e,b,d){c=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));e=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));
+var k=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(b,0),new mxPoint(b,e),new mxPoint(c,e),new mxPoint(c,d),new mxPoint(0,d)],this.isRounded,k,!0);a.end()};mxCellRenderer.registerShape("corner",pa);mxUtils.extend(R,mxActor);R.prototype.redrawPath=function(a,c,e,b,d){a.moveTo(0,0);a.lineTo(0,d);a.end();a.moveTo(b,0);a.lineTo(b,d);a.end();a.moveTo(0,d/2);a.lineTo(b,d/2);a.end()};mxCellRenderer.registerShape("crossbar",
+R);mxUtils.extend(ka,mxActor);ka.prototype.dx=20;ka.prototype.dy=20;ka.prototype.redrawPath=function(a,c,e,b,d){c=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));e=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var k=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(b,0),new mxPoint(b,e),new mxPoint((b+
+c)/2,e),new mxPoint((b+c)/2,d),new mxPoint((b-c)/2,d),new mxPoint((b-c)/2,e),new mxPoint(0,e)],this.isRounded,k,!0);a.end()};mxCellRenderer.registerShape("tee",ka);mxUtils.extend(aa,mxActor);aa.prototype.arrowWidth=.3;aa.prototype.arrowSize=.2;aa.prototype.redrawPath=function(a,c,e,b,d){var k=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth))));c=b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize))));e=(d-k)/2;var k=
+e+k,f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,e),new mxPoint(b-c,e),new mxPoint(b-c,0),new mxPoint(b,d/2),new mxPoint(b-c,d),new mxPoint(b-c,k),new mxPoint(0,k)],this.isRounded,f,!0);a.end()};mxCellRenderer.registerShape("singleArrow",aa);mxUtils.extend(ja,mxActor);ja.prototype.redrawPath=function(a,c,e,b,d){var k=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",aa.prototype.arrowWidth))));c=b*Math.max(0,
+Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",aa.prototype.arrowSize))));e=(d-k)/2;var k=e+k,f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,d/2),new mxPoint(c,0),new mxPoint(c,e),new mxPoint(b-c,e),new mxPoint(b-c,0),new mxPoint(b,d/2),new mxPoint(b-c,d),new mxPoint(b-c,k),new mxPoint(c,k),new mxPoint(c,d)],this.isRounded,f,!0);a.end()};mxCellRenderer.registerShape("doubleArrow",ja);mxUtils.extend(ea,mxActor);ea.prototype.size=
+.1;ea.prototype.fixedSize=20;ea.prototype.redrawPath=function(a,c,e,b,d){c="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));a.moveTo(c,0);a.lineTo(b,0);a.quadTo(b-2*c,d/2,b,d);a.lineTo(c,d);a.quadTo(c-2*c,d/2,c,0);a.close();a.end()};mxCellRenderer.registerShape("dataStorage",ea);mxUtils.extend(qa,mxActor);qa.prototype.redrawPath=
+function(a,c,e,b,d){a.moveTo(0,0);a.quadTo(b,0,b,d/2);a.quadTo(b,d,0,d);a.close();a.end()};mxCellRenderer.registerShape("or",qa);mxUtils.extend(ya,mxActor);ya.prototype.redrawPath=function(a,c,e,b,d){a.moveTo(0,0);a.quadTo(b,0,b,d/2);a.quadTo(b,d,0,d);a.quadTo(b/2,d/2,0,0);a.close();a.end()};mxCellRenderer.registerShape("xor",ya);mxUtils.extend(ua,mxActor);ua.prototype.size=20;ua.prototype.isRoundable=function(){return!0};ua.prototype.redrawPath=function(a,c,e,b,d){c=Math.min(b/2,Math.min(d,parseFloat(mxUtils.getValue(this.style,
"size",this.size))));e=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(c,0),new mxPoint(b-c,0),new mxPoint(b,.8*c),new mxPoint(b,d),new mxPoint(0,d),new mxPoint(0,.8*c)],this.isRounded,e,!0);a.end()};mxCellRenderer.registerShape("loopLimit",ua);mxUtils.extend(ra,mxActor);ra.prototype.size=.375;ra.prototype.isRoundable=function(){return!0};ra.prototype.redrawPath=function(a,c,e,b,d){c=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,
-"size",this.size))));e=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(b,0),new mxPoint(b,d-c),new mxPoint(b/2,d),new mxPoint(0,d-c)],this.isRounded,e,!0);a.end()};mxCellRenderer.registerShape("offPageConnector",ra);mxUtils.extend(ya,mxEllipse);ya.prototype.paintVertexShape=function(a,c,e,b,d){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.begin();a.moveTo(c+b/2,e+d);a.lineTo(c+b,e+d);a.end();a.stroke()};
-mxCellRenderer.registerShape("tapeData",ya);mxUtils.extend(za,mxEllipse);za.prototype.paintVertexShape=function(a,c,e,b,d){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(c,e+d/2);a.lineTo(c+b,e+d/2);a.end();a.stroke();a.begin();a.moveTo(c+b/2,e);a.lineTo(c+b/2,e+d);a.end();a.stroke()};mxCellRenderer.registerShape("orEllipse",za);mxUtils.extend(S,mxEllipse);S.prototype.paintVertexShape=function(a,c,e,b,d){mxEllipse.prototype.paintVertexShape.apply(this,
+"size",this.size))));e=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(b,0),new mxPoint(b,d-c),new mxPoint(b/2,d),new mxPoint(0,d-c)],this.isRounded,e,!0);a.end()};mxCellRenderer.registerShape("offPageConnector",ra);mxUtils.extend(xa,mxEllipse);xa.prototype.paintVertexShape=function(a,c,e,b,d){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.begin();a.moveTo(c+b/2,e+d);a.lineTo(c+b,e+d);a.end();a.stroke()};
+mxCellRenderer.registerShape("tapeData",xa);mxUtils.extend(za,mxEllipse);za.prototype.paintVertexShape=function(a,c,e,b,d){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(c,e+d/2);a.lineTo(c+b,e+d/2);a.end();a.stroke();a.begin();a.moveTo(c+b/2,e);a.lineTo(c+b/2,e+d);a.end();a.stroke()};mxCellRenderer.registerShape("orEllipse",za);mxUtils.extend(S,mxEllipse);S.prototype.paintVertexShape=function(a,c,e,b,d){mxEllipse.prototype.paintVertexShape.apply(this,
arguments);a.setShadow(!1);a.begin();a.moveTo(c+.145*b,e+.145*d);a.lineTo(c+.855*b,e+.855*d);a.end();a.stroke();a.begin();a.moveTo(c+.855*b,e+.145*d);a.lineTo(c+.145*b,e+.855*d);a.end();a.stroke()};mxCellRenderer.registerShape("sumEllipse",S);mxUtils.extend(Aa,mxRhombus);Aa.prototype.paintVertexShape=function(a,c,e,b,d){mxRhombus.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(c,e+d/2);a.lineTo(c+b,e+d/2);a.end();a.stroke()};mxCellRenderer.registerShape("sortShape",
-Aa);mxUtils.extend(ha,mxEllipse);ha.prototype.paintVertexShape=function(a,c,e,b,d){a.begin();a.moveTo(c,e);a.lineTo(c+b,e);a.lineTo(c+b/2,e+d/2);a.close();a.fillAndStroke();a.begin();a.moveTo(c,e+d);a.lineTo(c+b,e+d);a.lineTo(c+b/2,e+d/2);a.close();a.fillAndStroke()};mxCellRenderer.registerShape("collate",ha);mxUtils.extend(Ba,mxEllipse);Ba.prototype.paintVertexShape=function(a,c,e,b,d){var g=e+d-5;a.begin();a.moveTo(c,e);a.lineTo(c,e+d);a.moveTo(c,g);a.lineTo(c+10,g-5);a.moveTo(c,g);a.lineTo(c+10,
-g+5);a.moveTo(c,g);a.lineTo(c+b,g);a.moveTo(c+b,e);a.lineTo(c+b,e+d);a.moveTo(c+b,g);a.lineTo(c+b-10,g-5);a.moveTo(c+b,g);a.lineTo(c+b-10,g+5);a.end();a.stroke()};mxCellRenderer.registerShape("dimension",Ba);mxUtils.extend(wa,mxEllipse);wa.prototype.paintVertexShape=function(a,c,e,b,d){this.outline||a.setStrokeColor(null);if(null!=this.style){var g=a.pointerEvents;"1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1")||null!=this.fill&&this.fill!=mxConstants.NONE||(a.pointerEvents=
-!1);a.rect(c,e,b,d);a.fill();a.pointerEvents=g;a.setStrokeColor(this.stroke);a.begin();a.moveTo(c,e);this.outline||"1"==mxUtils.getValue(this.style,"top","1")?a.lineTo(c+b,e):a.moveTo(c+b,e);this.outline||"1"==mxUtils.getValue(this.style,"right","1")?a.lineTo(c+b,e+d):a.moveTo(c+b,e+d);this.outline||"1"==mxUtils.getValue(this.style,"bottom","1")?a.lineTo(c,e+d):a.moveTo(c,e+d);(this.outline||"1"==mxUtils.getValue(this.style,"left","1"))&&a.lineTo(c,e);a.end();a.stroke()}};mxCellRenderer.registerShape("partialRectangle",
-wa);mxUtils.extend(Da,mxEllipse);Da.prototype.paintVertexShape=function(a,c,e,b,d){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();"vertical"==mxUtils.getValue(this.style,"line")?(a.moveTo(c+b/2,e),a.lineTo(c+b/2,e+d)):(a.moveTo(c,e+d/2),a.lineTo(c+b,e+d/2));a.end();a.stroke()};mxCellRenderer.registerShape("lineEllipse",Da);mxUtils.extend(Ca,mxActor);Ca.prototype.redrawPath=function(a,c,e,b,d){c=Math.min(b,d/2);a.moveTo(0,0);a.lineTo(b-c,0);a.quadTo(b,0,b,d/2);
-a.quadTo(b,d,b-c,d);a.lineTo(0,d);a.close();a.end()};mxCellRenderer.registerShape("delay",Ca);mxUtils.extend(xa,mxActor);xa.prototype.size=.2;xa.prototype.redrawPath=function(a,c,e,b,d){c=Math.min(d,b);var g=Math.max(0,Math.min(c,c*parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=(d-g)/2;e=c+g;var f=(b-g)/2,g=f+g;a.moveTo(0,c);a.lineTo(f,c);a.lineTo(f,0);a.lineTo(g,0);a.lineTo(g,c);a.lineTo(b,c);a.lineTo(b,e);a.lineTo(g,e);a.lineTo(g,d);a.lineTo(f,d);a.lineTo(f,e);a.lineTo(0,e);a.close();
-a.end()};mxCellRenderer.registerShape("cross",xa);mxUtils.extend(Fa,mxActor);Fa.prototype.size=.25;Fa.prototype.redrawPath=function(a,c,e,b,d){c=Math.min(b,d/2);e=Math.min(b-c,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*b);a.moveTo(0,d/2);a.lineTo(e,0);a.lineTo(b-c,0);a.quadTo(b,0,b,d/2);a.quadTo(b,d,b-c,d);a.lineTo(e,d);a.close();a.end()};mxCellRenderer.registerShape("display",Fa);mxUtils.extend(Z,mxActor);Z.prototype.cst={RECT2:"mxgraph.basic.rect"};Z.prototype.customProperties=
+Aa);mxUtils.extend(ha,mxEllipse);ha.prototype.paintVertexShape=function(a,c,e,b,d){a.begin();a.moveTo(c,e);a.lineTo(c+b,e);a.lineTo(c+b/2,e+d/2);a.close();a.fillAndStroke();a.begin();a.moveTo(c,e+d);a.lineTo(c+b,e+d);a.lineTo(c+b/2,e+d/2);a.close();a.fillAndStroke()};mxCellRenderer.registerShape("collate",ha);mxUtils.extend(Ba,mxEllipse);Ba.prototype.paintVertexShape=function(a,c,e,b,d){var k=e+d-5;a.begin();a.moveTo(c,e);a.lineTo(c,e+d);a.moveTo(c,k);a.lineTo(c+10,k-5);a.moveTo(c,k);a.lineTo(c+10,
+k+5);a.moveTo(c,k);a.lineTo(c+b,k);a.moveTo(c+b,e);a.lineTo(c+b,e+d);a.moveTo(c+b,k);a.lineTo(c+b-10,k-5);a.moveTo(c+b,k);a.lineTo(c+b-10,k+5);a.end();a.stroke()};mxCellRenderer.registerShape("dimension",Ba);mxUtils.extend(va,mxEllipse);va.prototype.paintVertexShape=function(a,c,e,b,d){this.outline||a.setStrokeColor(null);if(null!=this.style){var k=a.pointerEvents;"1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1")||null!=this.fill&&this.fill!=mxConstants.NONE||(a.pointerEvents=
+!1);a.rect(c,e,b,d);a.fill();a.pointerEvents=k;a.setStrokeColor(this.stroke);a.begin();a.moveTo(c,e);this.outline||"1"==mxUtils.getValue(this.style,"top","1")?a.lineTo(c+b,e):a.moveTo(c+b,e);this.outline||"1"==mxUtils.getValue(this.style,"right","1")?a.lineTo(c+b,e+d):a.moveTo(c+b,e+d);this.outline||"1"==mxUtils.getValue(this.style,"bottom","1")?a.lineTo(c,e+d):a.moveTo(c,e+d);(this.outline||"1"==mxUtils.getValue(this.style,"left","1"))&&a.lineTo(c,e);a.end();a.stroke()}};mxCellRenderer.registerShape("partialRectangle",
+va);mxUtils.extend(Da,mxEllipse);Da.prototype.paintVertexShape=function(a,c,e,b,d){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();"vertical"==mxUtils.getValue(this.style,"line")?(a.moveTo(c+b/2,e),a.lineTo(c+b/2,e+d)):(a.moveTo(c,e+d/2),a.lineTo(c+b,e+d/2));a.end();a.stroke()};mxCellRenderer.registerShape("lineEllipse",Da);mxUtils.extend(Ca,mxActor);Ca.prototype.redrawPath=function(a,c,e,b,d){c=Math.min(b,d/2);a.moveTo(0,0);a.lineTo(b-c,0);a.quadTo(b,0,b,d/2);
+a.quadTo(b,d,b-c,d);a.lineTo(0,d);a.close();a.end()};mxCellRenderer.registerShape("delay",Ca);mxUtils.extend(wa,mxActor);wa.prototype.size=.2;wa.prototype.redrawPath=function(a,c,e,b,d){c=Math.min(d,b);var k=Math.max(0,Math.min(c,c*parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=(d-k)/2;e=c+k;var f=(b-k)/2,k=f+k;a.moveTo(0,c);a.lineTo(f,c);a.lineTo(f,0);a.lineTo(k,0);a.lineTo(k,c);a.lineTo(b,c);a.lineTo(b,e);a.lineTo(k,e);a.lineTo(k,d);a.lineTo(f,d);a.lineTo(f,e);a.lineTo(0,e);a.close();
+a.end()};mxCellRenderer.registerShape("cross",wa);mxUtils.extend(Fa,mxActor);Fa.prototype.size=.25;Fa.prototype.redrawPath=function(a,c,e,b,d){c=Math.min(b,d/2);e=Math.min(b-c,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*b);a.moveTo(0,d/2);a.lineTo(e,0);a.lineTo(b-c,0);a.quadTo(b,0,b,d/2);a.quadTo(b,d,b-c,d);a.lineTo(e,d);a.close();a.end()};mxCellRenderer.registerShape("display",Fa);mxUtils.extend(Y,mxActor);Y.prototype.cst={RECT2:"mxgraph.basic.rect"};Y.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"}]}];Z.prototype.paintVertexShape=function(a,c,e,b,d){a.translate(c,e);this.strictDrawShape(a,0,0,b,d)};Z.prototype.strictDrawShape=function(a,c,e,b,d,g){var f=g&&g.rectStyle?g.rectStyle:
-mxUtils.getValue(this.style,"rectStyle",this.rectStyle),k=g&&g.absoluteCornerSize?g.absoluteCornerSize:mxUtils.getValue(this.style,"absoluteCornerSize",this.absoluteCornerSize),l=g&&g.size?g.size:Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),n=g&&g.rectOutline?g.rectOutline:mxUtils.getValue(this.style,"rectOutline",this.rectOutline),v=g&&g.indent?g.indent:Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"indent",this.indent)))),y=g&&g.dashed?g.dashed:
-mxUtils.getValue(this.style,"dashed",!1),q=g&&g.dashPattern?g.dashPattern:mxUtils.getValue(this.style,"dashPattern",null),t=g&&g.relIndent?g.relIndent:Math.max(0,Math.min(50,v)),u=g&&g.top?g.top:mxUtils.getValue(this.style,"top",!0),m=g&&g.right?g.right:mxUtils.getValue(this.style,"right",!0),D=g&&g.bottom?g.bottom:mxUtils.getValue(this.style,"bottom",!0),B=g&&g.left?g.left:mxUtils.getValue(this.style,"left",!0),x=g&&g.topLeftStyle?g.topLeftStyle:mxUtils.getValue(this.style,"topLeftStyle","default"),
-p=g&&g.topRightStyle?g.topRightStyle:mxUtils.getValue(this.style,"topRightStyle","default"),z=g&&g.bottomRightStyle?g.bottomRightStyle:mxUtils.getValue(this.style,"bottomRightStyle","default"),L=g&&g.bottomLeftStyle?g.bottomLeftStyle:mxUtils.getValue(this.style,"bottomLeftStyle","default"),J=g&&g.fillColor?g.fillColor:mxUtils.getValue(this.style,"fillColor","#ffffff");g&&g.strokeColor||mxUtils.getValue(this.style,"strokeColor","#000000");var A=g&&g.strokeWidth?g.strokeWidth:mxUtils.getValue(this.style,
-"strokeWidth","1"),C=g&&g.fillColor2?g.fillColor2:mxUtils.getValue(this.style,"fillColor2","none"),oa=g&&g.gradientColor2?g.gradientColor2:mxUtils.getValue(this.style,"gradientColor2","none"),N=g&&g.gradientDirection2?g.gradientDirection2:mxUtils.getValue(this.style,"gradientDirection2","south"),sa=g&&g.opacity?g.opacity:mxUtils.getValue(this.style,"opacity","100"),W=Math.max(0,Math.min(50,l));g=Z.prototype;a.setDashed(y);q&&""!=q&&a.setDashPattern(q);a.setStrokeWidth(A);l=Math.min(.5*d,.5*b,l);k||
-(l=W*Math.min(b,d)/100);l=Math.min(l,.5*Math.min(b,d));k||(v=Math.min(t*Math.min(b,d)/100));v=Math.min(v,.5*Math.min(b,d)-l);(u||m||D||B)&&"frame"!=n&&(a.begin(),u?g.moveNW(a,c,e,b,d,f,x,l,B):a.moveTo(0,0),u&&g.paintNW(a,c,e,b,d,f,x,l,B),g.paintTop(a,c,e,b,d,f,p,l,m),m&&g.paintNE(a,c,e,b,d,f,p,l,u),g.paintRight(a,c,e,b,d,f,z,l,D),D&&g.paintSE(a,c,e,b,d,f,z,l,m),g.paintBottom(a,c,e,b,d,f,L,l,B),B&&g.paintSW(a,c,e,b,d,f,L,l,D),g.paintLeft(a,c,e,b,d,f,x,l,u),a.close(),a.fill(),a.setShadow(!1),a.setFillColor(C),
-y=k=sa,"none"==C&&(k=0),"none"==oa&&(y=0),a.setGradient(C,oa,0,0,b,d,N,k,y),a.begin(),u?g.moveNWInner(a,c,e,b,d,f,x,l,v,u,B):a.moveTo(v,0),g.paintLeftInner(a,c,e,b,d,f,L,l,v,D,B),B&&D&&g.paintSWInner(a,c,e,b,d,f,L,l,v,D),g.paintBottomInner(a,c,e,b,d,f,z,l,v,m,D),D&&m&&g.paintSEInner(a,c,e,b,d,f,z,l,v),g.paintRightInner(a,c,e,b,d,f,p,l,v,u,m),m&&u&&g.paintNEInner(a,c,e,b,d,f,p,l,v),g.paintTopInner(a,c,e,b,d,f,x,l,v,B,u),u&&B&&g.paintNWInner(a,c,e,b,d,f,x,l,v),a.fill(),"none"==J&&(a.begin(),g.paintFolds(a,
-c,e,b,d,f,x,p,z,L,l,u,m,D,B),a.stroke()));u||m||D||!B?u||m||!D||B?!u&&!m&&D&&B?"frame"!=n?(a.begin(),g.moveSE(a,c,e,b,d,f,z,l,m),g.paintBottom(a,c,e,b,d,f,L,l,B),g.paintSW(a,c,e,b,d,f,L,l,D),g.paintLeft(a,c,e,b,d,f,x,l,u),"double"==n&&(g.moveNWInner(a,c,e,b,d,f,x,l,v,u,B),g.paintLeftInner(a,c,e,b,d,f,L,l,v,D,B),g.paintSWInner(a,c,e,b,d,f,L,l,v,D),g.paintBottomInner(a,c,e,b,d,f,z,l,v,m,D)),a.stroke()):(a.begin(),g.moveSE(a,c,e,b,d,f,z,l,m),g.paintBottom(a,c,e,b,d,f,L,l,B),g.paintSW(a,c,e,b,d,f,L,l,
-D),g.paintLeft(a,c,e,b,d,f,x,l,u),g.lineNWInner(a,c,e,b,d,f,x,l,v,u,B),g.paintLeftInner(a,c,e,b,d,f,L,l,v,D,B),g.paintSWInner(a,c,e,b,d,f,L,l,v,D),g.paintBottomInner(a,c,e,b,d,f,z,l,v,m,D),a.close(),a.fillAndStroke()):u||!m||D||B?!u&&m&&!D&&B?"frame"!=n?(a.begin(),g.moveSW(a,c,e,b,d,f,x,l,D),g.paintLeft(a,c,e,b,d,f,x,l,u),"double"==n&&(g.moveNWInner(a,c,e,b,d,f,x,l,v,u,B),g.paintLeftInner(a,c,e,b,d,f,L,l,v,D,B)),a.stroke(),a.begin(),g.moveNE(a,c,e,b,d,f,p,l,u),g.paintRight(a,c,e,b,d,f,z,l,D),"double"==
-n&&(g.moveSEInner(a,c,e,b,d,f,z,l,v,D),g.paintRightInner(a,c,e,b,d,f,p,l,v,u,m)),a.stroke()):(a.begin(),g.moveSW(a,c,e,b,d,f,x,l,D),g.paintLeft(a,c,e,b,d,f,x,l,u),g.lineNWInner(a,c,e,b,d,f,x,l,v,u,B),g.paintLeftInner(a,c,e,b,d,f,L,l,v,D,B),a.close(),a.fillAndStroke(),a.begin(),g.moveNE(a,c,e,b,d,f,p,l,u),g.paintRight(a,c,e,b,d,f,z,l,D),g.lineSEInner(a,c,e,b,d,f,z,l,v,D),g.paintRightInner(a,c,e,b,d,f,p,l,v,u,m),a.close(),a.fillAndStroke()):!u&&m&&D&&!B?"frame"!=n?(a.begin(),g.moveNE(a,c,e,b,d,f,p,
-l,u),g.paintRight(a,c,e,b,d,f,z,l,D),g.paintSE(a,c,e,b,d,f,z,l,m),g.paintBottom(a,c,e,b,d,f,L,l,B),"double"==n&&(g.moveSWInner(a,c,e,b,d,f,L,l,v,B),g.paintBottomInner(a,c,e,b,d,f,z,l,v,m,D),g.paintSEInner(a,c,e,b,d,f,z,l,v),g.paintRightInner(a,c,e,b,d,f,p,l,v,u,m)),a.stroke()):(a.begin(),g.moveNE(a,c,e,b,d,f,p,l,u),g.paintRight(a,c,e,b,d,f,z,l,D),g.paintSE(a,c,e,b,d,f,z,l,m),g.paintBottom(a,c,e,b,d,f,L,l,B),g.lineSWInner(a,c,e,b,d,f,L,l,v,B),g.paintBottomInner(a,c,e,b,d,f,z,l,v,m,D),g.paintSEInner(a,
-c,e,b,d,f,z,l,v),g.paintRightInner(a,c,e,b,d,f,p,l,v,u,m),a.close(),a.fillAndStroke()):!u&&m&&D&&B?"frame"!=n?(a.begin(),g.moveNE(a,c,e,b,d,f,p,l,u),g.paintRight(a,c,e,b,d,f,z,l,D),g.paintSE(a,c,e,b,d,f,z,l,m),g.paintBottom(a,c,e,b,d,f,L,l,B),g.paintSW(a,c,e,b,d,f,L,l,D),g.paintLeft(a,c,e,b,d,f,x,l,u),"double"==n&&(g.moveNWInner(a,c,e,b,d,f,x,l,v,u,B),g.paintLeftInner(a,c,e,b,d,f,L,l,v,D,B),g.paintSWInner(a,c,e,b,d,f,L,l,v,D),g.paintBottomInner(a,c,e,b,d,f,z,l,v,m,D),g.paintSEInner(a,c,e,b,d,f,z,
-l,v),g.paintRightInner(a,c,e,b,d,f,p,l,v,u,m)),a.stroke()):(a.begin(),g.moveNE(a,c,e,b,d,f,p,l,u),g.paintRight(a,c,e,b,d,f,z,l,D),g.paintSE(a,c,e,b,d,f,z,l,m),g.paintBottom(a,c,e,b,d,f,L,l,B),g.paintSW(a,c,e,b,d,f,L,l,D),g.paintLeft(a,c,e,b,d,f,x,l,u),g.lineNWInner(a,c,e,b,d,f,x,l,v,u,B),g.paintLeftInner(a,c,e,b,d,f,L,l,v,D,B),g.paintSWInner(a,c,e,b,d,f,L,l,v,D),g.paintBottomInner(a,c,e,b,d,f,z,l,v,m,D),g.paintSEInner(a,c,e,b,d,f,z,l,v),g.paintRightInner(a,c,e,b,d,f,p,l,v,u,m),a.close(),a.fillAndStroke()):
-!u||m||D||B?u&&!m&&!D&&B?"frame"!=n?(a.begin(),g.moveSW(a,c,e,b,d,f,L,l,D),g.paintLeft(a,c,e,b,d,f,x,l,u),g.paintNW(a,c,e,b,d,f,x,l,B),g.paintTop(a,c,e,b,d,f,p,l,m),"double"==n&&(g.moveNEInner(a,c,e,b,d,f,p,l,v,m),g.paintTopInner(a,c,e,b,d,f,x,l,v,B,u),g.paintNWInner(a,c,e,b,d,f,x,l,v),g.paintLeftInner(a,c,e,b,d,f,L,l,v,D,B)),a.stroke()):(a.begin(),g.moveSW(a,c,e,b,d,f,L,l,D),g.paintLeft(a,c,e,b,d,f,x,l,u),g.paintNW(a,c,e,b,d,f,x,l,B),g.paintTop(a,c,e,b,d,f,p,l,m),g.lineNEInner(a,c,e,b,d,f,p,l,v,
-m),g.paintTopInner(a,c,e,b,d,f,x,l,v,B,u),g.paintNWInner(a,c,e,b,d,f,x,l,v),g.paintLeftInner(a,c,e,b,d,f,L,l,v,D,B),a.close(),a.fillAndStroke()):u&&!m&&D&&!B?"frame"!=n?(a.begin(),g.moveNW(a,c,e,b,d,f,x,l,B),g.paintTop(a,c,e,b,d,f,p,l,m),"double"==n&&(g.moveNEInner(a,c,e,b,d,f,p,l,v,m),g.paintTopInner(a,c,e,b,d,f,x,l,v,B,u)),a.stroke(),a.begin(),g.moveSE(a,c,e,b,d,f,z,l,m),g.paintBottom(a,c,e,b,d,f,L,l,B),"double"==n&&(g.moveSWInner(a,c,e,b,d,f,L,l,v,B),g.paintBottomInner(a,c,e,b,d,f,z,l,v,m,D)),
-a.stroke()):(a.begin(),g.moveNW(a,c,e,b,d,f,x,l,B),g.paintTop(a,c,e,b,d,f,p,l,m),g.lineNEInner(a,c,e,b,d,f,p,l,v,m),g.paintTopInner(a,c,e,b,d,f,x,l,v,B,u),a.close(),a.fillAndStroke(),a.begin(),g.moveSE(a,c,e,b,d,f,z,l,m),g.paintBottom(a,c,e,b,d,f,L,l,B),g.lineSWInner(a,c,e,b,d,f,L,l,v,B),g.paintBottomInner(a,c,e,b,d,f,z,l,v,m,D),a.close(),a.fillAndStroke()):u&&!m&&D&&B?"frame"!=n?(a.begin(),g.moveSE(a,c,e,b,d,f,z,l,m),g.paintBottom(a,c,e,b,d,f,L,l,B),g.paintSW(a,c,e,b,d,f,L,l,D),g.paintLeft(a,c,e,
-b,d,f,x,l,u),g.paintNW(a,c,e,b,d,f,x,l,B),g.paintTop(a,c,e,b,d,f,p,l,m),"double"==n&&(g.moveNEInner(a,c,e,b,d,f,p,l,v,m),g.paintTopInner(a,c,e,b,d,f,x,l,v,B,u),g.paintNWInner(a,c,e,b,d,f,x,l,v),g.paintLeftInner(a,c,e,b,d,f,L,l,v,D,B),g.paintSWInner(a,c,e,b,d,f,L,l,v,D),g.paintBottomInner(a,c,e,b,d,f,z,l,v,m,D)),a.stroke()):(a.begin(),g.moveSE(a,c,e,b,d,f,z,l,m),g.paintBottom(a,c,e,b,d,f,L,l,B),g.paintSW(a,c,e,b,d,f,L,l,D),g.paintLeft(a,c,e,b,d,f,x,l,u),g.paintNW(a,c,e,b,d,f,x,l,B),g.paintTop(a,c,
-e,b,d,f,p,l,m),g.lineNEInner(a,c,e,b,d,f,p,l,v,m),g.paintTopInner(a,c,e,b,d,f,x,l,v,B,u),g.paintNWInner(a,c,e,b,d,f,x,l,v),g.paintLeftInner(a,c,e,b,d,f,L,l,v,D,B),g.paintSWInner(a,c,e,b,d,f,L,l,v,D),g.paintBottomInner(a,c,e,b,d,f,z,l,v,m,D),a.close(),a.fillAndStroke()):u&&m&&!D&&!B?"frame"!=n?(a.begin(),g.moveNW(a,c,e,b,d,f,x,l,B),g.paintTop(a,c,e,b,d,f,p,l,m),g.paintNE(a,c,e,b,d,f,p,l,u),g.paintRight(a,c,e,b,d,f,z,l,D),"double"==n&&(g.moveSEInner(a,c,e,b,d,f,z,l,v,D),g.paintRightInner(a,c,e,b,d,
-f,p,l,v,u,m),g.paintNEInner(a,c,e,b,d,f,p,l,v),g.paintTopInner(a,c,e,b,d,f,x,l,v,B,u)),a.stroke()):(a.begin(),g.moveNW(a,c,e,b,d,f,x,l,B),g.paintTop(a,c,e,b,d,f,p,l,m),g.paintNE(a,c,e,b,d,f,p,l,u),g.paintRight(a,c,e,b,d,f,z,l,D),g.lineSEInner(a,c,e,b,d,f,z,l,v,D),g.paintRightInner(a,c,e,b,d,f,p,l,v,u,m),g.paintNEInner(a,c,e,b,d,f,p,l,v),g.paintTopInner(a,c,e,b,d,f,x,l,v,B,u),a.close(),a.fillAndStroke()):u&&m&&!D&&B?"frame"!=n?(a.begin(),g.moveSW(a,c,e,b,d,f,L,l,D),g.paintLeft(a,c,e,b,d,f,x,l,u),g.paintNW(a,
-c,e,b,d,f,x,l,B),g.paintTop(a,c,e,b,d,f,p,l,m),g.paintNE(a,c,e,b,d,f,p,l,u),g.paintRight(a,c,e,b,d,f,z,l,D),"double"==n&&(g.moveSEInner(a,c,e,b,d,f,z,l,v,D),g.paintRightInner(a,c,e,b,d,f,p,l,v,u,m),g.paintNEInner(a,c,e,b,d,f,p,l,v),g.paintTopInner(a,c,e,b,d,f,x,l,v,B,u),g.paintNWInner(a,c,e,b,d,f,x,l,v),g.paintLeftInner(a,c,e,b,d,f,L,l,v,D,B)),a.stroke()):(a.begin(),g.moveSW(a,c,e,b,d,f,L,l,D),g.paintLeft(a,c,e,b,d,f,x,l,u),g.paintNW(a,c,e,b,d,f,x,l,B),g.paintTop(a,c,e,b,d,f,p,l,m),g.paintNE(a,c,
-e,b,d,f,p,l,u),g.paintRight(a,c,e,b,d,f,z,l,D),g.lineSEInner(a,c,e,b,d,f,z,l,v,D),g.paintRightInner(a,c,e,b,d,f,p,l,v,u,m),g.paintNEInner(a,c,e,b,d,f,p,l,v),g.paintTopInner(a,c,e,b,d,f,x,l,v,B,u),g.paintNWInner(a,c,e,b,d,f,x,l,v),g.paintLeftInner(a,c,e,b,d,f,L,l,v,D,B),a.close(),a.fillAndStroke()):u&&m&&D&&!B?"frame"!=n?(a.begin(),g.moveNW(a,c,e,b,d,f,x,l,B),g.paintTop(a,c,e,b,d,f,p,l,m),g.paintNE(a,c,e,b,d,f,p,l,u),g.paintRight(a,c,e,b,d,f,z,l,D),g.paintSE(a,c,e,b,d,f,z,l,m),g.paintBottom(a,c,e,
-b,d,f,L,l,B),"double"==n&&(g.moveSWInner(a,c,e,b,d,f,L,l,v,B),g.paintBottomInner(a,c,e,b,d,f,z,l,v,m,D),g.paintSEInner(a,c,e,b,d,f,z,l,v),g.paintRightInner(a,c,e,b,d,f,p,l,v,u,m),g.paintNEInner(a,c,e,b,d,f,p,l,v),g.paintTopInner(a,c,e,b,d,f,x,l,v,B,u)),a.stroke()):(a.begin(),g.moveNW(a,c,e,b,d,f,x,l,B),g.paintTop(a,c,e,b,d,f,p,l,m),g.paintNE(a,c,e,b,d,f,p,l,u),g.paintRight(a,c,e,b,d,f,z,l,D),g.paintSE(a,c,e,b,d,f,z,l,m),g.paintBottom(a,c,e,b,d,f,L,l,B),g.lineSWInner(a,c,e,b,d,f,L,l,v,B),g.paintBottomInner(a,
-c,e,b,d,f,z,l,v,m,D),g.paintSEInner(a,c,e,b,d,f,z,l,v),g.paintRightInner(a,c,e,b,d,f,p,l,v,u,m),g.paintNEInner(a,c,e,b,d,f,p,l,v),g.paintTopInner(a,c,e,b,d,f,x,l,v,B,u),a.close(),a.fillAndStroke()):u&&m&&D&&B&&("frame"!=n?(a.begin(),g.moveNW(a,c,e,b,d,f,x,l,B),g.paintNW(a,c,e,b,d,f,x,l,B),g.paintTop(a,c,e,b,d,f,p,l,m),g.paintNE(a,c,e,b,d,f,p,l,u),g.paintRight(a,c,e,b,d,f,z,l,D),g.paintSE(a,c,e,b,d,f,z,l,m),g.paintBottom(a,c,e,b,d,f,L,l,B),g.paintSW(a,c,e,b,d,f,L,l,D),g.paintLeft(a,c,e,b,d,f,x,l,u),
-a.close(),"double"==n&&(g.moveSWInner(a,c,e,b,d,f,L,l,v,B),g.paintSWInner(a,c,e,b,d,f,L,l,v,D),g.paintBottomInner(a,c,e,b,d,f,z,l,v,m,D),g.paintSEInner(a,c,e,b,d,f,z,l,v),g.paintRightInner(a,c,e,b,d,f,p,l,v,u,m),g.paintNEInner(a,c,e,b,d,f,p,l,v),g.paintTopInner(a,c,e,b,d,f,x,l,v,B,u),g.paintNWInner(a,c,e,b,d,f,x,l,v),g.paintLeftInner(a,c,e,b,d,f,L,l,v,D,B),a.close()),a.stroke()):(a.begin(),g.moveNW(a,c,e,b,d,f,x,l,B),g.paintNW(a,c,e,b,d,f,x,l,B),g.paintTop(a,c,e,b,d,f,p,l,m),g.paintNE(a,c,e,b,d,f,
-p,l,u),g.paintRight(a,c,e,b,d,f,z,l,D),g.paintSE(a,c,e,b,d,f,z,l,m),g.paintBottom(a,c,e,b,d,f,L,l,B),g.paintSW(a,c,e,b,d,f,L,l,D),g.paintLeft(a,c,e,b,d,f,x,l,u),a.close(),g.moveSWInner(a,c,e,b,d,f,L,l,v,B),g.paintSWInner(a,c,e,b,d,f,L,l,v,D),g.paintBottomInner(a,c,e,b,d,f,z,l,v,m,D),g.paintSEInner(a,c,e,b,d,f,z,l,v),g.paintRightInner(a,c,e,b,d,f,p,l,v,u,m),g.paintNEInner(a,c,e,b,d,f,p,l,v),g.paintTopInner(a,c,e,b,d,f,x,l,v,B,u),g.paintNWInner(a,c,e,b,d,f,x,l,v),g.paintLeftInner(a,c,e,b,d,f,L,l,v,
-D,B),a.close(),a.fillAndStroke())):"frame"!=n?(a.begin(),g.moveNW(a,c,e,b,d,f,x,l,B),g.paintTop(a,c,e,b,d,f,p,l,m),"double"==n&&(g.moveNEInner(a,c,e,b,d,f,p,l,v,m),g.paintTopInner(a,c,e,b,d,f,x,l,v,B,u)),a.stroke()):(a.begin(),g.moveNW(a,c,e,b,d,f,x,l,B),g.paintTop(a,c,e,b,d,f,p,l,m),g.lineNEInner(a,c,e,b,d,f,p,l,v,m),g.paintTopInner(a,c,e,b,d,f,x,l,v,B,u),a.close(),a.fillAndStroke()):"frame"!=n?(a.begin(),g.moveNE(a,c,e,b,d,f,p,l,u),g.paintRight(a,c,e,b,d,f,z,l,D),"double"==n&&(g.moveSEInner(a,c,
-e,b,d,f,z,l,v,D),g.paintRightInner(a,c,e,b,d,f,p,l,v,u,m)),a.stroke()):(a.begin(),g.moveNE(a,c,e,b,d,f,p,l,u),g.paintRight(a,c,e,b,d,f,z,l,D),g.lineSEInner(a,c,e,b,d,f,z,l,v,D),g.paintRightInner(a,c,e,b,d,f,p,l,v,u,m),a.close(),a.fillAndStroke()):"frame"!=n?(a.begin(),g.moveSE(a,c,e,b,d,f,z,l,m),g.paintBottom(a,c,e,b,d,f,L,l,B),"double"==n&&(g.moveSWInner(a,c,e,b,d,f,L,l,v,B),g.paintBottomInner(a,c,e,b,d,f,z,l,v,m,D)),a.stroke()):(a.begin(),g.moveSE(a,c,e,b,d,f,z,l,m),g.paintBottom(a,c,e,b,d,f,L,
-l,B),g.lineSWInner(a,c,e,b,d,f,L,l,v,B),g.paintBottomInner(a,c,e,b,d,f,z,l,v,m,D),a.close(),a.fillAndStroke()):"frame"!=n?(a.begin(),g.moveSW(a,c,e,b,d,f,x,l,D),g.paintLeft(a,c,e,b,d,f,x,l,u),"double"==n&&(g.moveNWInner(a,c,e,b,d,f,x,l,v,u,B),g.paintLeftInner(a,c,e,b,d,f,L,l,v,D,B)),a.stroke()):(a.begin(),g.moveSW(a,c,e,b,d,f,x,l,D),g.paintLeft(a,c,e,b,d,f,x,l,u),g.lineNWInner(a,c,e,b,d,f,x,l,v,u,B),g.paintLeftInner(a,c,e,b,d,f,L,l,v,D,B),a.close(),a.fillAndStroke());a.begin();g.paintFolds(a,c,e,
-b,d,f,x,p,z,L,l,u,m,D,B);a.stroke()};Z.prototype.moveNW=function(a,c,e,b,d,g,f,l,k){"square"==f||"default"==f&&"square"==g||!k?a.moveTo(0,0):a.moveTo(0,l)};Z.prototype.moveNE=function(a,c,e,b,d,g,f,l,k){"square"==f||"default"==f&&"square"==g||!k?a.moveTo(b,0):a.moveTo(b-l,0)};Z.prototype.moveSE=function(a,c,e,b,d,g,f,l,k){"square"==f||"default"==f&&"square"==g||!k?a.moveTo(b,d):a.moveTo(b,d-l)};Z.prototype.moveSW=function(a,c,e,b,d,g,f,l,k){"square"==f||"default"==f&&"square"==g||!k?a.moveTo(0,d):
-a.moveTo(l,d)};Z.prototype.paintNW=function(a,c,e,b,d,g,f,l,k){if(k)if("rounded"==f||"default"==f&&"rounded"==g||"invRound"==f||"default"==f&&"invRound"==g){c=0;if("rounded"==f||"default"==f&&"rounded"==g)c=1;a.arcTo(l,l,0,0,c,l,0)}else("snip"==f||"default"==f&&"snip"==g||"fold"==f||"default"==f&&"fold"==g)&&a.lineTo(l,0);else a.lineTo(0,0)};Z.prototype.paintTop=function(a,c,e,b,d,g,f,l,k){"square"==f||"default"==f&&"square"==g||!k?a.lineTo(b,0):a.lineTo(b-l,0)};Z.prototype.paintNE=function(a,c,e,
-b,d,g,f,l,k){if(k)if("rounded"==f||"default"==f&&"rounded"==g||"invRound"==f||"default"==f&&"invRound"==g){c=0;if("rounded"==f||"default"==f&&"rounded"==g)c=1;a.arcTo(l,l,0,0,c,b,l)}else("snip"==f||"default"==f&&"snip"==g||"fold"==f||"default"==f&&"fold"==g)&&a.lineTo(b,l);else a.lineTo(b,0)};Z.prototype.paintRight=function(a,c,e,b,d,g,f,l,k){"square"==f||"default"==f&&"square"==g||!k?a.lineTo(b,d):a.lineTo(b,d-l)};Z.prototype.paintLeft=function(a,c,e,b,d,g,f,l,k){"square"==f||"default"==f&&"square"==
-g||!k?a.lineTo(0,0):a.lineTo(0,l)};Z.prototype.paintSE=function(a,c,e,b,d,g,f,l,k){if(k)if("rounded"==f||"default"==f&&"rounded"==g||"invRound"==f||"default"==f&&"invRound"==g){c=0;if("rounded"==f||"default"==f&&"rounded"==g)c=1;a.arcTo(l,l,0,0,c,b-l,d)}else("snip"==f||"default"==f&&"snip"==g||"fold"==f||"default"==f&&"fold"==g)&&a.lineTo(b-l,d);else a.lineTo(b,d)};Z.prototype.paintBottom=function(a,c,e,b,d,g,f,l,k){"square"==f||"default"==f&&"square"==g||!k?a.lineTo(0,d):a.lineTo(l,d)};Z.prototype.paintSW=
-function(a,c,e,b,d,g,f,l,k){if(k)if("rounded"==f||"default"==f&&"rounded"==g||"invRound"==f||"default"==f&&"invRound"==g){c=0;if("rounded"==f||"default"==f&&"rounded"==g)c=1;a.arcTo(l,l,0,0,c,0,d-l)}else("snip"==f||"default"==f&&"snip"==g||"fold"==f||"default"==f&&"fold"==g)&&a.lineTo(0,d-l);else a.lineTo(0,d)};Z.prototype.paintNWInner=function(a,c,e,b,d,g,f,l,k){if("rounded"==f||"default"==f&&"rounded"==g)a.arcTo(l-.5*k,l-.5*k,0,0,0,k,.5*k+l);else if("invRound"==f||"default"==f&&"invRound"==g)a.arcTo(l+
-k,l+k,0,0,1,k,k+l);else if("snip"==f||"default"==f&&"snip"==g)a.lineTo(k,.5*k+l);else if("fold"==f||"default"==f&&"fold"==g)a.lineTo(k+l,k+l),a.lineTo(k,k+l)};Z.prototype.paintTopInner=function(a,c,e,b,d,g,f,l,k,v,n){v||n?!v&&n?a.lineTo(0,k):v&&!n?a.lineTo(k,0):v?"square"==f||"default"==f&&"square"==g?a.lineTo(k,k):"rounded"==f||"default"==f&&"rounded"==g||"snip"==f||"default"==f&&"snip"==g?a.lineTo(l+.5*k,k):a.lineTo(l+k,k):a.lineTo(0,k):a.lineTo(0,0)};Z.prototype.paintNEInner=function(a,c,e,b,d,
-g,f,l,k){if("rounded"==f||"default"==f&&"rounded"==g)a.arcTo(l-.5*k,l-.5*k,0,0,0,b-l-.5*k,k);else if("invRound"==f||"default"==f&&"invRound"==g)a.arcTo(l+k,l+k,0,0,1,b-l-k,k);else if("snip"==f||"default"==f&&"snip"==g)a.lineTo(b-l-.5*k,k);else if("fold"==f||"default"==f&&"fold"==g)a.lineTo(b-l-k,l+k),a.lineTo(b-l-k,k)};Z.prototype.paintRightInner=function(a,c,e,b,d,g,f,l,k,v,n){v||n?!v&&n?a.lineTo(b-k,0):v&&!n?a.lineTo(b,k):v?"square"==f||"default"==f&&"square"==g?a.lineTo(b-k,k):"rounded"==f||"default"==
-f&&"rounded"==g||"snip"==f||"default"==f&&"snip"==g?a.lineTo(b-k,l+.5*k):a.lineTo(b-k,l+k):a.lineTo(b-k,0):a.lineTo(b,0)};Z.prototype.paintLeftInner=function(a,c,e,b,d,g,f,l,k,v,n){v||n?!v&&n?a.lineTo(k,d):v&&!n?a.lineTo(0,d-k):v?"square"==f||"default"==f&&"square"==g?a.lineTo(k,d-k):"rounded"==f||"default"==f&&"rounded"==g||"snip"==f||"default"==f&&"snip"==g?a.lineTo(k,d-l-.5*k):a.lineTo(k,d-l-k):a.lineTo(k,d):a.lineTo(0,d)};Z.prototype.paintSEInner=function(a,c,e,b,d,g,f,l,k){if("rounded"==f||"default"==
-f&&"rounded"==g)a.arcTo(l-.5*k,l-.5*k,0,0,0,b-k,d-l-.5*k);else if("invRound"==f||"default"==f&&"invRound"==g)a.arcTo(l+k,l+k,0,0,1,b-k,d-l-k);else if("snip"==f||"default"==f&&"snip"==g)a.lineTo(b-k,d-l-.5*k);else if("fold"==f||"default"==f&&"fold"==g)a.lineTo(b-l-k,d-l-k),a.lineTo(b-k,d-l-k)};Z.prototype.paintBottomInner=function(a,c,e,b,d,g,f,l,k,v,n){v||n?!v&&n?a.lineTo(b,d-k):v&&!n?a.lineTo(b-k,d):"square"==f||"default"==f&&"square"==g||!v?a.lineTo(b-k,d-k):"rounded"==f||"default"==f&&"rounded"==
-g||"snip"==f||"default"==f&&"snip"==g?a.lineTo(b-l-.5*k,d-k):a.lineTo(b-l-k,d-k):a.lineTo(b,d)};Z.prototype.paintSWInner=function(a,c,e,b,d,g,f,l,k,v){if(!v)a.lineTo(k,d);else if("square"==f||"default"==f&&"square"==g)a.lineTo(k,d-k);else if("rounded"==f||"default"==f&&"rounded"==g)a.arcTo(l-.5*k,l-.5*k,0,0,0,l+.5*k,d-k);else if("invRound"==f||"default"==f&&"invRound"==g)a.arcTo(l+k,l+k,0,0,1,l+k,d-k);else if("snip"==f||"default"==f&&"snip"==g)a.lineTo(l+.5*k,d-k);else if("fold"==f||"default"==f&&
-"fold"==g)a.lineTo(k+l,d-l-k),a.lineTo(k+l,d-k)};Z.prototype.moveSWInner=function(a,c,e,b,d,g,f,l,k,v){v?"square"==f||"default"==f&&"square"==g?a.moveTo(k,d-k):"rounded"==f||"default"==f&&"rounded"==g||"snip"==f||"default"==f&&"snip"==g?a.moveTo(k,d-l-.5*k):("invRound"==f||"default"==f&&"invRound"==g||"fold"==f||"default"==f&&"fold"==g)&&a.moveTo(k,d-l-k):a.moveTo(0,d-k)};Z.prototype.lineSWInner=function(a,c,e,b,d,g,f,l,k,v){v?"square"==f||"default"==f&&"square"==g?a.lineTo(k,d-k):"rounded"==f||"default"==
-f&&"rounded"==g||"snip"==f||"default"==f&&"snip"==g?a.lineTo(k,d-l-.5*k):("invRound"==f||"default"==f&&"invRound"==g||"fold"==f||"default"==f&&"fold"==g)&&a.lineTo(k,d-l-k):a.lineTo(0,d-k)};Z.prototype.moveSEInner=function(a,c,e,b,d,g,f,l,k,v){v?"square"==f||"default"==f&&"square"==g?a.moveTo(b-k,d-k):"rounded"==f||"default"==f&&"rounded"==g||"snip"==f||"default"==f&&"snip"==g?a.moveTo(b-k,d-l-.5*k):("invRound"==f||"default"==f&&"invRound"==g||"fold"==f||"default"==f&&"fold"==g)&&a.moveTo(b-k,d-l-
-k):a.moveTo(b-k,d)};Z.prototype.lineSEInner=function(a,c,e,b,d,g,f,l,k,v){v?"square"==f||"default"==f&&"square"==g?a.lineTo(b-k,d-k):"rounded"==f||"default"==f&&"rounded"==g||"snip"==f||"default"==f&&"snip"==g?a.lineTo(b-k,d-l-.5*k):("invRound"==f||"default"==f&&"invRound"==g||"fold"==f||"default"==f&&"fold"==g)&&a.lineTo(b-k,d-l-k):a.lineTo(b-k,d)};Z.prototype.moveNEInner=function(a,c,e,b,d,g,f,l,k,v){v?"square"==f||"default"==f&&"square"==g||v?a.moveTo(b-k,k):"rounded"==f||"default"==f&&"rounded"==
-g||"snip"==f||"default"==f&&"snip"==g?a.moveTo(b-k,l+.5*k):("invRound"==f||"default"==f&&"invRound"==g||"fold"==f||"default"==f&&"fold"==g)&&a.moveTo(b-k,l+k):a.moveTo(b,k)};Z.prototype.lineNEInner=function(a,c,e,b,d,g,f,l,k,v){v?"square"==f||"default"==f&&"square"==g||v?a.lineTo(b-k,k):"rounded"==f||"default"==f&&"rounded"==g||"snip"==f||"default"==f&&"snip"==g?a.lineTo(b-k,l+.5*k):("invRound"==f||"default"==f&&"invRound"==g||"fold"==f||"default"==f&&"fold"==g)&&a.lineTo(b-k,l+k):a.lineTo(b,k)};
-Z.prototype.moveNWInner=function(a,c,e,b,d,g,f,l,k,v,n){v||n?!v&&n?a.moveTo(k,0):v&&!n?a.moveTo(0,k):"square"==f||"default"==f&&"square"==g?a.moveTo(k,k):"rounded"==f||"default"==f&&"rounded"==g||"snip"==f||"default"==f&&"snip"==g?a.moveTo(k,l+.5*k):("invRound"==f||"default"==f&&"invRound"==g||"fold"==f||"default"==f&&"fold"==g)&&a.moveTo(k,l+k):a.moveTo(0,0)};Z.prototype.lineNWInner=function(a,c,e,b,d,g,f,l,k,v,n){v||n?!v&&n?a.lineTo(k,0):v&&!n?a.lineTo(0,k):"square"==f||"default"==f&&"square"==
-g?a.lineTo(k,k):"rounded"==f||"default"==f&&"rounded"==g||"snip"==f||"default"==f&&"snip"==g?a.lineTo(k,l+.5*k):("invRound"==f||"default"==f&&"invRound"==g||"fold"==f||"default"==f&&"fold"==g)&&a.lineTo(k,l+k):a.lineTo(0,0)};Z.prototype.paintFolds=function(a,c,e,b,d,g,f,l,k,v,n,q,u,m,D){if("fold"==g||"fold"==f||"fold"==l||"fold"==k||"fold"==v)("fold"==f||"default"==f&&"fold"==g)&&q&&D&&(a.moveTo(0,n),a.lineTo(n,n),a.lineTo(n,0)),("fold"==l||"default"==l&&"fold"==g)&&q&&u&&(a.moveTo(b-n,0),a.lineTo(b-
-n,n),a.lineTo(b,n)),("fold"==k||"default"==k&&"fold"==g)&&m&&u&&(a.moveTo(b-n,d),a.lineTo(b-n,d-n),a.lineTo(b,d-n)),("fold"==v||"default"==v&&"fold"==g)&&m&&D&&(a.moveTo(0,d-n),a.lineTo(n,d-n),a.lineTo(n,d))};mxCellRenderer.registerShape(Z.prototype.cst.RECT2,Z);Z.prototype.constraints=null;mxUtils.extend(Ha,mxConnector);Ha.prototype.origPaintEdgeShape=Ha.prototype.paintEdgeShape;Ha.prototype.paintEdgeShape=function(a,c,e){for(var b=[],d=0;d<c.length;d++)b.push(mxUtils.clone(c[d]));var d=a.state.dashed,
-g=a.state.fixDash;Ha.prototype.origPaintEdgeShape.apply(this,[a,b,e]);3<=a.state.strokeWidth&&(b=mxUtils.getValue(this.style,"fillColor",null),null!=b&&(a.setStrokeColor(b),a.setStrokeWidth(a.state.strokeWidth-2),a.setDashed(d,g),Ha.prototype.origPaintEdgeShape.apply(this,[a,c,e])))};mxCellRenderer.registerShape("filledEdge",Ha);"undefined"!==typeof StyleFormatPanel&&function(){var a=StyleFormatPanel.prototype.getCustomColors;StyleFormatPanel.prototype.getCustomColors=function(){var c=this.format.getSelectionState(),
-e=a.apply(this,arguments);"umlFrame"==c.style.shape&&e.push({title:mxResources.get("laneColor"),key:"swimlaneFillColor",defaultValue:"#ffffff"});return e}}();mxMarker.addMarker("dash",function(a,c,e,b,d,g,f,l,k,v){var n=d*(f+k+1),q=g*(f+k+1);return function(){a.begin();a.moveTo(b.x-n/2-q/2,b.y-q/2+n/2);a.lineTo(b.x+q/2-3*n/2,b.y-3*q/2-n/2);a.stroke()}});mxMarker.addMarker("box",function(a,c,e,b,d,g,f,l,k,v){var n=d*(f+k+1),q=g*(f+k+1),u=b.x+n/2,y=b.y+q/2;b.x-=n;b.y-=q;return function(){a.begin();
-a.moveTo(u-n/2-q/2,y-q/2+n/2);a.lineTo(u-n/2+q/2,y-q/2-n/2);a.lineTo(u+q/2-3*n/2,y-3*q/2-n/2);a.lineTo(u-q/2-3*n/2,y-3*q/2+n/2);a.close();v?a.fillAndStroke():a.stroke()}});mxMarker.addMarker("cross",function(a,c,e,b,d,g,f,l,k,v){var n=d*(f+k+1),q=g*(f+k+1);return function(){a.begin();a.moveTo(b.x-n/2-q/2,b.y-q/2+n/2);a.lineTo(b.x+q/2-3*n/2,b.y-3*q/2-n/2);a.moveTo(b.x-n/2+q/2,b.y-q/2-n/2);a.lineTo(b.x-q/2-3*n/2,b.y-3*q/2+n/2);a.stroke()}});mxMarker.addMarker("circle",Ua);mxMarker.addMarker("circlePlus",
-function(a,c,e,b,d,g,f,l,k,v){var n=b.clone(),q=Ua.apply(this,arguments),u=d*(f+2*k),m=g*(f+2*k);return function(){q.apply(this,arguments);a.begin();a.moveTo(n.x-d*k,n.y-g*k);a.lineTo(n.x-2*u+d*k,n.y-2*m+g*k);a.moveTo(n.x-u-m+g*k,n.y-m+u-d*k);a.lineTo(n.x+m-u-g*k,n.y-m-u+d*k);a.stroke()}});mxMarker.addMarker("halfCircle",function(a,c,e,b,d,g,f,l,k,v){var n=d*(f+k+1),q=g*(f+k+1),u=b.clone();b.x-=n;b.y-=q;return function(){a.begin();a.moveTo(u.x-q,u.y+n);a.quadTo(b.x-q,b.y+n,b.x,b.y);a.quadTo(b.x+q,
-b.y-n,u.x+q,u.y-n);a.stroke()}});mxMarker.addMarker("async",function(a,c,e,b,d,g,f,l,k,v){c=d*k*1.118;e=g*k*1.118;d*=f+k;g*=f+k;var n=b.clone();n.x-=c;n.y-=e;b.x+=1*-d-c;b.y+=1*-g-e;return function(){a.begin();a.moveTo(n.x,n.y);l?a.lineTo(n.x-d-g/2,n.y-g+d/2):a.lineTo(n.x+g/2-d,n.y-g-d/2);a.lineTo(n.x-d,n.y-g);a.close();v?a.fillAndStroke():a.stroke()}});mxMarker.addMarker("openAsync",function(a){a=null!=a?a:2;return function(c,e,b,d,g,f,l,k,v,n){g*=l+v;f*=l+v;var q=d.clone();return function(){c.begin();
-c.moveTo(q.x,q.y);k?c.lineTo(q.x-g-f/a,q.y-f+g/a):c.lineTo(q.x+f/a-g,q.y-f-g/a);c.stroke()}}}(2));if("undefined"!==typeof mxVertexHandler){var Ya=function(a,c,e){return Ka(a,["width"],c,function(c,b,d,g,f){f=a.shape.getEdgeWidth()*a.view.scale+e;return new mxPoint(g.x+b*c/4+d*f/2,g.y+d*c/4-b*f/2)},function(c,b,d,g,f,l){c=Math.sqrt(mxUtils.ptSegDistSq(g.x,g.y,f.x,f.y,l.x,l.y));a.style.width=Math.round(2*c)/a.view.scale-e})},Ka=function(a,c,e,b,d){return fa(a,c,function(c){var d=a.absolutePoints,g=
-d.length-1;c=a.view.translate;var f=a.view.scale,l=e?d[0]:d[g],d=e?d[1]:d[g-1],g=d.x-l.x,k=d.y-l.y,v=Math.sqrt(g*g+k*k),l=b.call(this,v,g/v,k/v,l,d);return new mxPoint(l.x/f-c.x,l.y/f-c.y)},function(c,b,g){var f=a.absolutePoints,l=f.length-1;c=a.view.translate;var k=a.view.scale,v=e?f[0]:f[l],f=e?f[1]:f[l-1],l=f.x-v.x,n=f.y-v.y,q=Math.sqrt(l*l+n*n);b.x=(b.x+c.x)*k;b.y=(b.y+c.y)*k;d.call(this,q,l/q,n/q,v,f,b,g)})},Ga=function(a){return function(c){return[fa(c,["arrowWidth","arrowSize"],function(c){var e=
-Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"arrowWidth",ba.prototype.arrowWidth))),b=Math.max(0,Math.min(a,mxUtils.getValue(this.state.style,"arrowSize",ba.prototype.arrowSize)));return new mxPoint(c.x+(1-b)*c.width,c.y+(1-e)*c.height/2)},function(c,e){this.state.style.arrowWidth=Math.max(0,Math.min(1,Math.abs(c.y+c.height/2-e.y)/c.height*2));this.state.style.arrowSize=Math.max(0,Math.min(a,(c.x+c.width-e.x)/c.width))})]}},Va=function(a){return function(c){return[fa(c,["size"],function(c){var e=
+{val:"fold",dispName:"Fold"}]},{name:"bottomLeftStyle",dispName:"Bottom Left Style",type:"enum",defVal:"default",enumList:[{val:"default",dispName:"Default"},{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]}];Y.prototype.paintVertexShape=function(a,c,e,b,d){a.translate(c,e);this.strictDrawShape(a,0,0,b,d)};Y.prototype.strictDrawShape=function(a,c,e,b,d,k){var f=k&&k.rectStyle?k.rectStyle:
+mxUtils.getValue(this.style,"rectStyle",this.rectStyle),g=k&&k.absoluteCornerSize?k.absoluteCornerSize:mxUtils.getValue(this.style,"absoluteCornerSize",this.absoluteCornerSize),l=k&&k.size?k.size:Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),n=k&&k.rectOutline?k.rectOutline:mxUtils.getValue(this.style,"rectOutline",this.rectOutline),v=k&&k.indent?k.indent:Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"indent",this.indent)))),q=k&&k.dashed?k.dashed:
+mxUtils.getValue(this.style,"dashed",!1),y=k&&k.dashPattern?k.dashPattern:mxUtils.getValue(this.style,"dashPattern",null),t=k&&k.relIndent?k.relIndent:Math.max(0,Math.min(50,v)),u=k&&k.top?k.top:mxUtils.getValue(this.style,"top",!0),m=k&&k.right?k.right:mxUtils.getValue(this.style,"right",!0),C=k&&k.bottom?k.bottom:mxUtils.getValue(this.style,"bottom",!0),B=k&&k.left?k.left:mxUtils.getValue(this.style,"left",!0),x=k&&k.topLeftStyle?k.topLeftStyle:mxUtils.getValue(this.style,"topLeftStyle","default"),
+p=k&&k.topRightStyle?k.topRightStyle:mxUtils.getValue(this.style,"topRightStyle","default"),z=k&&k.bottomRightStyle?k.bottomRightStyle:mxUtils.getValue(this.style,"bottomRightStyle","default"),L=k&&k.bottomLeftStyle?k.bottomLeftStyle:mxUtils.getValue(this.style,"bottomLeftStyle","default"),J=k&&k.fillColor?k.fillColor:mxUtils.getValue(this.style,"fillColor","#ffffff");k&&k.strokeColor||mxUtils.getValue(this.style,"strokeColor","#000000");var A=k&&k.strokeWidth?k.strokeWidth:mxUtils.getValue(this.style,
+"strokeWidth","1"),D=k&&k.fillColor2?k.fillColor2:mxUtils.getValue(this.style,"fillColor2","none"),oa=k&&k.gradientColor2?k.gradientColor2:mxUtils.getValue(this.style,"gradientColor2","none"),N=k&&k.gradientDirection2?k.gradientDirection2:mxUtils.getValue(this.style,"gradientDirection2","south"),sa=k&&k.opacity?k.opacity:mxUtils.getValue(this.style,"opacity","100"),W=Math.max(0,Math.min(50,l));k=Y.prototype;a.setDashed(q);y&&""!=y&&a.setDashPattern(y);a.setStrokeWidth(A);l=Math.min(.5*d,.5*b,l);g||
+(l=W*Math.min(b,d)/100);l=Math.min(l,.5*Math.min(b,d));g||(v=Math.min(t*Math.min(b,d)/100));v=Math.min(v,.5*Math.min(b,d)-l);(u||m||C||B)&&"frame"!=n&&(a.begin(),u?k.moveNW(a,c,e,b,d,f,x,l,B):a.moveTo(0,0),u&&k.paintNW(a,c,e,b,d,f,x,l,B),k.paintTop(a,c,e,b,d,f,p,l,m),m&&k.paintNE(a,c,e,b,d,f,p,l,u),k.paintRight(a,c,e,b,d,f,z,l,C),C&&k.paintSE(a,c,e,b,d,f,z,l,m),k.paintBottom(a,c,e,b,d,f,L,l,B),B&&k.paintSW(a,c,e,b,d,f,L,l,C),k.paintLeft(a,c,e,b,d,f,x,l,u),a.close(),a.fill(),a.setShadow(!1),a.setFillColor(D),
+q=g=sa,"none"==D&&(g=0),"none"==oa&&(q=0),a.setGradient(D,oa,0,0,b,d,N,g,q),a.begin(),u?k.moveNWInner(a,c,e,b,d,f,x,l,v,u,B):a.moveTo(v,0),k.paintLeftInner(a,c,e,b,d,f,L,l,v,C,B),B&&C&&k.paintSWInner(a,c,e,b,d,f,L,l,v,C),k.paintBottomInner(a,c,e,b,d,f,z,l,v,m,C),C&&m&&k.paintSEInner(a,c,e,b,d,f,z,l,v),k.paintRightInner(a,c,e,b,d,f,p,l,v,u,m),m&&u&&k.paintNEInner(a,c,e,b,d,f,p,l,v),k.paintTopInner(a,c,e,b,d,f,x,l,v,B,u),u&&B&&k.paintNWInner(a,c,e,b,d,f,x,l,v),a.fill(),"none"==J&&(a.begin(),k.paintFolds(a,
+c,e,b,d,f,x,p,z,L,l,u,m,C,B),a.stroke()));u||m||C||!B?u||m||!C||B?!u&&!m&&C&&B?"frame"!=n?(a.begin(),k.moveSE(a,c,e,b,d,f,z,l,m),k.paintBottom(a,c,e,b,d,f,L,l,B),k.paintSW(a,c,e,b,d,f,L,l,C),k.paintLeft(a,c,e,b,d,f,x,l,u),"double"==n&&(k.moveNWInner(a,c,e,b,d,f,x,l,v,u,B),k.paintLeftInner(a,c,e,b,d,f,L,l,v,C,B),k.paintSWInner(a,c,e,b,d,f,L,l,v,C),k.paintBottomInner(a,c,e,b,d,f,z,l,v,m,C)),a.stroke()):(a.begin(),k.moveSE(a,c,e,b,d,f,z,l,m),k.paintBottom(a,c,e,b,d,f,L,l,B),k.paintSW(a,c,e,b,d,f,L,l,
+C),k.paintLeft(a,c,e,b,d,f,x,l,u),k.lineNWInner(a,c,e,b,d,f,x,l,v,u,B),k.paintLeftInner(a,c,e,b,d,f,L,l,v,C,B),k.paintSWInner(a,c,e,b,d,f,L,l,v,C),k.paintBottomInner(a,c,e,b,d,f,z,l,v,m,C),a.close(),a.fillAndStroke()):u||!m||C||B?!u&&m&&!C&&B?"frame"!=n?(a.begin(),k.moveSW(a,c,e,b,d,f,x,l,C),k.paintLeft(a,c,e,b,d,f,x,l,u),"double"==n&&(k.moveNWInner(a,c,e,b,d,f,x,l,v,u,B),k.paintLeftInner(a,c,e,b,d,f,L,l,v,C,B)),a.stroke(),a.begin(),k.moveNE(a,c,e,b,d,f,p,l,u),k.paintRight(a,c,e,b,d,f,z,l,C),"double"==
+n&&(k.moveSEInner(a,c,e,b,d,f,z,l,v,C),k.paintRightInner(a,c,e,b,d,f,p,l,v,u,m)),a.stroke()):(a.begin(),k.moveSW(a,c,e,b,d,f,x,l,C),k.paintLeft(a,c,e,b,d,f,x,l,u),k.lineNWInner(a,c,e,b,d,f,x,l,v,u,B),k.paintLeftInner(a,c,e,b,d,f,L,l,v,C,B),a.close(),a.fillAndStroke(),a.begin(),k.moveNE(a,c,e,b,d,f,p,l,u),k.paintRight(a,c,e,b,d,f,z,l,C),k.lineSEInner(a,c,e,b,d,f,z,l,v,C),k.paintRightInner(a,c,e,b,d,f,p,l,v,u,m),a.close(),a.fillAndStroke()):!u&&m&&C&&!B?"frame"!=n?(a.begin(),k.moveNE(a,c,e,b,d,f,p,
+l,u),k.paintRight(a,c,e,b,d,f,z,l,C),k.paintSE(a,c,e,b,d,f,z,l,m),k.paintBottom(a,c,e,b,d,f,L,l,B),"double"==n&&(k.moveSWInner(a,c,e,b,d,f,L,l,v,B),k.paintBottomInner(a,c,e,b,d,f,z,l,v,m,C),k.paintSEInner(a,c,e,b,d,f,z,l,v),k.paintRightInner(a,c,e,b,d,f,p,l,v,u,m)),a.stroke()):(a.begin(),k.moveNE(a,c,e,b,d,f,p,l,u),k.paintRight(a,c,e,b,d,f,z,l,C),k.paintSE(a,c,e,b,d,f,z,l,m),k.paintBottom(a,c,e,b,d,f,L,l,B),k.lineSWInner(a,c,e,b,d,f,L,l,v,B),k.paintBottomInner(a,c,e,b,d,f,z,l,v,m,C),k.paintSEInner(a,
+c,e,b,d,f,z,l,v),k.paintRightInner(a,c,e,b,d,f,p,l,v,u,m),a.close(),a.fillAndStroke()):!u&&m&&C&&B?"frame"!=n?(a.begin(),k.moveNE(a,c,e,b,d,f,p,l,u),k.paintRight(a,c,e,b,d,f,z,l,C),k.paintSE(a,c,e,b,d,f,z,l,m),k.paintBottom(a,c,e,b,d,f,L,l,B),k.paintSW(a,c,e,b,d,f,L,l,C),k.paintLeft(a,c,e,b,d,f,x,l,u),"double"==n&&(k.moveNWInner(a,c,e,b,d,f,x,l,v,u,B),k.paintLeftInner(a,c,e,b,d,f,L,l,v,C,B),k.paintSWInner(a,c,e,b,d,f,L,l,v,C),k.paintBottomInner(a,c,e,b,d,f,z,l,v,m,C),k.paintSEInner(a,c,e,b,d,f,z,
+l,v),k.paintRightInner(a,c,e,b,d,f,p,l,v,u,m)),a.stroke()):(a.begin(),k.moveNE(a,c,e,b,d,f,p,l,u),k.paintRight(a,c,e,b,d,f,z,l,C),k.paintSE(a,c,e,b,d,f,z,l,m),k.paintBottom(a,c,e,b,d,f,L,l,B),k.paintSW(a,c,e,b,d,f,L,l,C),k.paintLeft(a,c,e,b,d,f,x,l,u),k.lineNWInner(a,c,e,b,d,f,x,l,v,u,B),k.paintLeftInner(a,c,e,b,d,f,L,l,v,C,B),k.paintSWInner(a,c,e,b,d,f,L,l,v,C),k.paintBottomInner(a,c,e,b,d,f,z,l,v,m,C),k.paintSEInner(a,c,e,b,d,f,z,l,v),k.paintRightInner(a,c,e,b,d,f,p,l,v,u,m),a.close(),a.fillAndStroke()):
+!u||m||C||B?u&&!m&&!C&&B?"frame"!=n?(a.begin(),k.moveSW(a,c,e,b,d,f,L,l,C),k.paintLeft(a,c,e,b,d,f,x,l,u),k.paintNW(a,c,e,b,d,f,x,l,B),k.paintTop(a,c,e,b,d,f,p,l,m),"double"==n&&(k.moveNEInner(a,c,e,b,d,f,p,l,v,m),k.paintTopInner(a,c,e,b,d,f,x,l,v,B,u),k.paintNWInner(a,c,e,b,d,f,x,l,v),k.paintLeftInner(a,c,e,b,d,f,L,l,v,C,B)),a.stroke()):(a.begin(),k.moveSW(a,c,e,b,d,f,L,l,C),k.paintLeft(a,c,e,b,d,f,x,l,u),k.paintNW(a,c,e,b,d,f,x,l,B),k.paintTop(a,c,e,b,d,f,p,l,m),k.lineNEInner(a,c,e,b,d,f,p,l,v,
+m),k.paintTopInner(a,c,e,b,d,f,x,l,v,B,u),k.paintNWInner(a,c,e,b,d,f,x,l,v),k.paintLeftInner(a,c,e,b,d,f,L,l,v,C,B),a.close(),a.fillAndStroke()):u&&!m&&C&&!B?"frame"!=n?(a.begin(),k.moveNW(a,c,e,b,d,f,x,l,B),k.paintTop(a,c,e,b,d,f,p,l,m),"double"==n&&(k.moveNEInner(a,c,e,b,d,f,p,l,v,m),k.paintTopInner(a,c,e,b,d,f,x,l,v,B,u)),a.stroke(),a.begin(),k.moveSE(a,c,e,b,d,f,z,l,m),k.paintBottom(a,c,e,b,d,f,L,l,B),"double"==n&&(k.moveSWInner(a,c,e,b,d,f,L,l,v,B),k.paintBottomInner(a,c,e,b,d,f,z,l,v,m,C)),
+a.stroke()):(a.begin(),k.moveNW(a,c,e,b,d,f,x,l,B),k.paintTop(a,c,e,b,d,f,p,l,m),k.lineNEInner(a,c,e,b,d,f,p,l,v,m),k.paintTopInner(a,c,e,b,d,f,x,l,v,B,u),a.close(),a.fillAndStroke(),a.begin(),k.moveSE(a,c,e,b,d,f,z,l,m),k.paintBottom(a,c,e,b,d,f,L,l,B),k.lineSWInner(a,c,e,b,d,f,L,l,v,B),k.paintBottomInner(a,c,e,b,d,f,z,l,v,m,C),a.close(),a.fillAndStroke()):u&&!m&&C&&B?"frame"!=n?(a.begin(),k.moveSE(a,c,e,b,d,f,z,l,m),k.paintBottom(a,c,e,b,d,f,L,l,B),k.paintSW(a,c,e,b,d,f,L,l,C),k.paintLeft(a,c,e,
+b,d,f,x,l,u),k.paintNW(a,c,e,b,d,f,x,l,B),k.paintTop(a,c,e,b,d,f,p,l,m),"double"==n&&(k.moveNEInner(a,c,e,b,d,f,p,l,v,m),k.paintTopInner(a,c,e,b,d,f,x,l,v,B,u),k.paintNWInner(a,c,e,b,d,f,x,l,v),k.paintLeftInner(a,c,e,b,d,f,L,l,v,C,B),k.paintSWInner(a,c,e,b,d,f,L,l,v,C),k.paintBottomInner(a,c,e,b,d,f,z,l,v,m,C)),a.stroke()):(a.begin(),k.moveSE(a,c,e,b,d,f,z,l,m),k.paintBottom(a,c,e,b,d,f,L,l,B),k.paintSW(a,c,e,b,d,f,L,l,C),k.paintLeft(a,c,e,b,d,f,x,l,u),k.paintNW(a,c,e,b,d,f,x,l,B),k.paintTop(a,c,
+e,b,d,f,p,l,m),k.lineNEInner(a,c,e,b,d,f,p,l,v,m),k.paintTopInner(a,c,e,b,d,f,x,l,v,B,u),k.paintNWInner(a,c,e,b,d,f,x,l,v),k.paintLeftInner(a,c,e,b,d,f,L,l,v,C,B),k.paintSWInner(a,c,e,b,d,f,L,l,v,C),k.paintBottomInner(a,c,e,b,d,f,z,l,v,m,C),a.close(),a.fillAndStroke()):u&&m&&!C&&!B?"frame"!=n?(a.begin(),k.moveNW(a,c,e,b,d,f,x,l,B),k.paintTop(a,c,e,b,d,f,p,l,m),k.paintNE(a,c,e,b,d,f,p,l,u),k.paintRight(a,c,e,b,d,f,z,l,C),"double"==n&&(k.moveSEInner(a,c,e,b,d,f,z,l,v,C),k.paintRightInner(a,c,e,b,d,
+f,p,l,v,u,m),k.paintNEInner(a,c,e,b,d,f,p,l,v),k.paintTopInner(a,c,e,b,d,f,x,l,v,B,u)),a.stroke()):(a.begin(),k.moveNW(a,c,e,b,d,f,x,l,B),k.paintTop(a,c,e,b,d,f,p,l,m),k.paintNE(a,c,e,b,d,f,p,l,u),k.paintRight(a,c,e,b,d,f,z,l,C),k.lineSEInner(a,c,e,b,d,f,z,l,v,C),k.paintRightInner(a,c,e,b,d,f,p,l,v,u,m),k.paintNEInner(a,c,e,b,d,f,p,l,v),k.paintTopInner(a,c,e,b,d,f,x,l,v,B,u),a.close(),a.fillAndStroke()):u&&m&&!C&&B?"frame"!=n?(a.begin(),k.moveSW(a,c,e,b,d,f,L,l,C),k.paintLeft(a,c,e,b,d,f,x,l,u),k.paintNW(a,
+c,e,b,d,f,x,l,B),k.paintTop(a,c,e,b,d,f,p,l,m),k.paintNE(a,c,e,b,d,f,p,l,u),k.paintRight(a,c,e,b,d,f,z,l,C),"double"==n&&(k.moveSEInner(a,c,e,b,d,f,z,l,v,C),k.paintRightInner(a,c,e,b,d,f,p,l,v,u,m),k.paintNEInner(a,c,e,b,d,f,p,l,v),k.paintTopInner(a,c,e,b,d,f,x,l,v,B,u),k.paintNWInner(a,c,e,b,d,f,x,l,v),k.paintLeftInner(a,c,e,b,d,f,L,l,v,C,B)),a.stroke()):(a.begin(),k.moveSW(a,c,e,b,d,f,L,l,C),k.paintLeft(a,c,e,b,d,f,x,l,u),k.paintNW(a,c,e,b,d,f,x,l,B),k.paintTop(a,c,e,b,d,f,p,l,m),k.paintNE(a,c,
+e,b,d,f,p,l,u),k.paintRight(a,c,e,b,d,f,z,l,C),k.lineSEInner(a,c,e,b,d,f,z,l,v,C),k.paintRightInner(a,c,e,b,d,f,p,l,v,u,m),k.paintNEInner(a,c,e,b,d,f,p,l,v),k.paintTopInner(a,c,e,b,d,f,x,l,v,B,u),k.paintNWInner(a,c,e,b,d,f,x,l,v),k.paintLeftInner(a,c,e,b,d,f,L,l,v,C,B),a.close(),a.fillAndStroke()):u&&m&&C&&!B?"frame"!=n?(a.begin(),k.moveNW(a,c,e,b,d,f,x,l,B),k.paintTop(a,c,e,b,d,f,p,l,m),k.paintNE(a,c,e,b,d,f,p,l,u),k.paintRight(a,c,e,b,d,f,z,l,C),k.paintSE(a,c,e,b,d,f,z,l,m),k.paintBottom(a,c,e,
+b,d,f,L,l,B),"double"==n&&(k.moveSWInner(a,c,e,b,d,f,L,l,v,B),k.paintBottomInner(a,c,e,b,d,f,z,l,v,m,C),k.paintSEInner(a,c,e,b,d,f,z,l,v),k.paintRightInner(a,c,e,b,d,f,p,l,v,u,m),k.paintNEInner(a,c,e,b,d,f,p,l,v),k.paintTopInner(a,c,e,b,d,f,x,l,v,B,u)),a.stroke()):(a.begin(),k.moveNW(a,c,e,b,d,f,x,l,B),k.paintTop(a,c,e,b,d,f,p,l,m),k.paintNE(a,c,e,b,d,f,p,l,u),k.paintRight(a,c,e,b,d,f,z,l,C),k.paintSE(a,c,e,b,d,f,z,l,m),k.paintBottom(a,c,e,b,d,f,L,l,B),k.lineSWInner(a,c,e,b,d,f,L,l,v,B),k.paintBottomInner(a,
+c,e,b,d,f,z,l,v,m,C),k.paintSEInner(a,c,e,b,d,f,z,l,v),k.paintRightInner(a,c,e,b,d,f,p,l,v,u,m),k.paintNEInner(a,c,e,b,d,f,p,l,v),k.paintTopInner(a,c,e,b,d,f,x,l,v,B,u),a.close(),a.fillAndStroke()):u&&m&&C&&B&&("frame"!=n?(a.begin(),k.moveNW(a,c,e,b,d,f,x,l,B),k.paintNW(a,c,e,b,d,f,x,l,B),k.paintTop(a,c,e,b,d,f,p,l,m),k.paintNE(a,c,e,b,d,f,p,l,u),k.paintRight(a,c,e,b,d,f,z,l,C),k.paintSE(a,c,e,b,d,f,z,l,m),k.paintBottom(a,c,e,b,d,f,L,l,B),k.paintSW(a,c,e,b,d,f,L,l,C),k.paintLeft(a,c,e,b,d,f,x,l,u),
+a.close(),"double"==n&&(k.moveSWInner(a,c,e,b,d,f,L,l,v,B),k.paintSWInner(a,c,e,b,d,f,L,l,v,C),k.paintBottomInner(a,c,e,b,d,f,z,l,v,m,C),k.paintSEInner(a,c,e,b,d,f,z,l,v),k.paintRightInner(a,c,e,b,d,f,p,l,v,u,m),k.paintNEInner(a,c,e,b,d,f,p,l,v),k.paintTopInner(a,c,e,b,d,f,x,l,v,B,u),k.paintNWInner(a,c,e,b,d,f,x,l,v),k.paintLeftInner(a,c,e,b,d,f,L,l,v,C,B),a.close()),a.stroke()):(a.begin(),k.moveNW(a,c,e,b,d,f,x,l,B),k.paintNW(a,c,e,b,d,f,x,l,B),k.paintTop(a,c,e,b,d,f,p,l,m),k.paintNE(a,c,e,b,d,f,
+p,l,u),k.paintRight(a,c,e,b,d,f,z,l,C),k.paintSE(a,c,e,b,d,f,z,l,m),k.paintBottom(a,c,e,b,d,f,L,l,B),k.paintSW(a,c,e,b,d,f,L,l,C),k.paintLeft(a,c,e,b,d,f,x,l,u),a.close(),k.moveSWInner(a,c,e,b,d,f,L,l,v,B),k.paintSWInner(a,c,e,b,d,f,L,l,v,C),k.paintBottomInner(a,c,e,b,d,f,z,l,v,m,C),k.paintSEInner(a,c,e,b,d,f,z,l,v),k.paintRightInner(a,c,e,b,d,f,p,l,v,u,m),k.paintNEInner(a,c,e,b,d,f,p,l,v),k.paintTopInner(a,c,e,b,d,f,x,l,v,B,u),k.paintNWInner(a,c,e,b,d,f,x,l,v),k.paintLeftInner(a,c,e,b,d,f,L,l,v,
+C,B),a.close(),a.fillAndStroke())):"frame"!=n?(a.begin(),k.moveNW(a,c,e,b,d,f,x,l,B),k.paintTop(a,c,e,b,d,f,p,l,m),"double"==n&&(k.moveNEInner(a,c,e,b,d,f,p,l,v,m),k.paintTopInner(a,c,e,b,d,f,x,l,v,B,u)),a.stroke()):(a.begin(),k.moveNW(a,c,e,b,d,f,x,l,B),k.paintTop(a,c,e,b,d,f,p,l,m),k.lineNEInner(a,c,e,b,d,f,p,l,v,m),k.paintTopInner(a,c,e,b,d,f,x,l,v,B,u),a.close(),a.fillAndStroke()):"frame"!=n?(a.begin(),k.moveNE(a,c,e,b,d,f,p,l,u),k.paintRight(a,c,e,b,d,f,z,l,C),"double"==n&&(k.moveSEInner(a,c,
+e,b,d,f,z,l,v,C),k.paintRightInner(a,c,e,b,d,f,p,l,v,u,m)),a.stroke()):(a.begin(),k.moveNE(a,c,e,b,d,f,p,l,u),k.paintRight(a,c,e,b,d,f,z,l,C),k.lineSEInner(a,c,e,b,d,f,z,l,v,C),k.paintRightInner(a,c,e,b,d,f,p,l,v,u,m),a.close(),a.fillAndStroke()):"frame"!=n?(a.begin(),k.moveSE(a,c,e,b,d,f,z,l,m),k.paintBottom(a,c,e,b,d,f,L,l,B),"double"==n&&(k.moveSWInner(a,c,e,b,d,f,L,l,v,B),k.paintBottomInner(a,c,e,b,d,f,z,l,v,m,C)),a.stroke()):(a.begin(),k.moveSE(a,c,e,b,d,f,z,l,m),k.paintBottom(a,c,e,b,d,f,L,
+l,B),k.lineSWInner(a,c,e,b,d,f,L,l,v,B),k.paintBottomInner(a,c,e,b,d,f,z,l,v,m,C),a.close(),a.fillAndStroke()):"frame"!=n?(a.begin(),k.moveSW(a,c,e,b,d,f,x,l,C),k.paintLeft(a,c,e,b,d,f,x,l,u),"double"==n&&(k.moveNWInner(a,c,e,b,d,f,x,l,v,u,B),k.paintLeftInner(a,c,e,b,d,f,L,l,v,C,B)),a.stroke()):(a.begin(),k.moveSW(a,c,e,b,d,f,x,l,C),k.paintLeft(a,c,e,b,d,f,x,l,u),k.lineNWInner(a,c,e,b,d,f,x,l,v,u,B),k.paintLeftInner(a,c,e,b,d,f,L,l,v,C,B),a.close(),a.fillAndStroke());a.begin();k.paintFolds(a,c,e,
+b,d,f,x,p,z,L,l,u,m,C,B);a.stroke()};Y.prototype.moveNW=function(a,c,e,b,d,k,f,l,g){"square"==f||"default"==f&&"square"==k||!g?a.moveTo(0,0):a.moveTo(0,l)};Y.prototype.moveNE=function(a,c,e,b,d,k,f,l,g){"square"==f||"default"==f&&"square"==k||!g?a.moveTo(b,0):a.moveTo(b-l,0)};Y.prototype.moveSE=function(a,c,e,b,d,k,f,l,g){"square"==f||"default"==f&&"square"==k||!g?a.moveTo(b,d):a.moveTo(b,d-l)};Y.prototype.moveSW=function(a,c,e,b,d,k,f,l,g){"square"==f||"default"==f&&"square"==k||!g?a.moveTo(0,d):
+a.moveTo(l,d)};Y.prototype.paintNW=function(a,c,e,b,d,k,f,l,g){if(g)if("rounded"==f||"default"==f&&"rounded"==k||"invRound"==f||"default"==f&&"invRound"==k){c=0;if("rounded"==f||"default"==f&&"rounded"==k)c=1;a.arcTo(l,l,0,0,c,l,0)}else("snip"==f||"default"==f&&"snip"==k||"fold"==f||"default"==f&&"fold"==k)&&a.lineTo(l,0);else a.lineTo(0,0)};Y.prototype.paintTop=function(a,c,e,b,d,k,f,l,g){"square"==f||"default"==f&&"square"==k||!g?a.lineTo(b,0):a.lineTo(b-l,0)};Y.prototype.paintNE=function(a,c,e,
+b,d,k,f,l,g){if(g)if("rounded"==f||"default"==f&&"rounded"==k||"invRound"==f||"default"==f&&"invRound"==k){c=0;if("rounded"==f||"default"==f&&"rounded"==k)c=1;a.arcTo(l,l,0,0,c,b,l)}else("snip"==f||"default"==f&&"snip"==k||"fold"==f||"default"==f&&"fold"==k)&&a.lineTo(b,l);else a.lineTo(b,0)};Y.prototype.paintRight=function(a,c,e,b,d,k,f,l,g){"square"==f||"default"==f&&"square"==k||!g?a.lineTo(b,d):a.lineTo(b,d-l)};Y.prototype.paintLeft=function(a,c,e,b,d,k,f,l,g){"square"==f||"default"==f&&"square"==
+k||!g?a.lineTo(0,0):a.lineTo(0,l)};Y.prototype.paintSE=function(a,c,e,b,d,k,f,l,g){if(g)if("rounded"==f||"default"==f&&"rounded"==k||"invRound"==f||"default"==f&&"invRound"==k){c=0;if("rounded"==f||"default"==f&&"rounded"==k)c=1;a.arcTo(l,l,0,0,c,b-l,d)}else("snip"==f||"default"==f&&"snip"==k||"fold"==f||"default"==f&&"fold"==k)&&a.lineTo(b-l,d);else a.lineTo(b,d)};Y.prototype.paintBottom=function(a,c,e,b,d,k,f,l,g){"square"==f||"default"==f&&"square"==k||!g?a.lineTo(0,d):a.lineTo(l,d)};Y.prototype.paintSW=
+function(a,c,e,b,d,k,f,l,g){if(g)if("rounded"==f||"default"==f&&"rounded"==k||"invRound"==f||"default"==f&&"invRound"==k){c=0;if("rounded"==f||"default"==f&&"rounded"==k)c=1;a.arcTo(l,l,0,0,c,0,d-l)}else("snip"==f||"default"==f&&"snip"==k||"fold"==f||"default"==f&&"fold"==k)&&a.lineTo(0,d-l);else a.lineTo(0,d)};Y.prototype.paintNWInner=function(a,c,e,b,d,k,f,l,g){if("rounded"==f||"default"==f&&"rounded"==k)a.arcTo(l-.5*g,l-.5*g,0,0,0,g,.5*g+l);else if("invRound"==f||"default"==f&&"invRound"==k)a.arcTo(l+
+g,l+g,0,0,1,g,g+l);else if("snip"==f||"default"==f&&"snip"==k)a.lineTo(g,.5*g+l);else if("fold"==f||"default"==f&&"fold"==k)a.lineTo(g+l,g+l),a.lineTo(g,g+l)};Y.prototype.paintTopInner=function(a,c,e,b,d,k,f,l,g,v,n){v||n?!v&&n?a.lineTo(0,g):v&&!n?a.lineTo(g,0):v?"square"==f||"default"==f&&"square"==k?a.lineTo(g,g):"rounded"==f||"default"==f&&"rounded"==k||"snip"==f||"default"==f&&"snip"==k?a.lineTo(l+.5*g,g):a.lineTo(l+g,g):a.lineTo(0,g):a.lineTo(0,0)};Y.prototype.paintNEInner=function(a,c,e,b,d,
+k,f,l,g){if("rounded"==f||"default"==f&&"rounded"==k)a.arcTo(l-.5*g,l-.5*g,0,0,0,b-l-.5*g,g);else if("invRound"==f||"default"==f&&"invRound"==k)a.arcTo(l+g,l+g,0,0,1,b-l-g,g);else if("snip"==f||"default"==f&&"snip"==k)a.lineTo(b-l-.5*g,g);else if("fold"==f||"default"==f&&"fold"==k)a.lineTo(b-l-g,l+g),a.lineTo(b-l-g,g)};Y.prototype.paintRightInner=function(a,c,e,b,d,k,f,l,g,v,n){v||n?!v&&n?a.lineTo(b-g,0):v&&!n?a.lineTo(b,g):v?"square"==f||"default"==f&&"square"==k?a.lineTo(b-g,g):"rounded"==f||"default"==
+f&&"rounded"==k||"snip"==f||"default"==f&&"snip"==k?a.lineTo(b-g,l+.5*g):a.lineTo(b-g,l+g):a.lineTo(b-g,0):a.lineTo(b,0)};Y.prototype.paintLeftInner=function(a,c,e,b,d,k,f,l,g,v,n){v||n?!v&&n?a.lineTo(g,d):v&&!n?a.lineTo(0,d-g):v?"square"==f||"default"==f&&"square"==k?a.lineTo(g,d-g):"rounded"==f||"default"==f&&"rounded"==k||"snip"==f||"default"==f&&"snip"==k?a.lineTo(g,d-l-.5*g):a.lineTo(g,d-l-g):a.lineTo(g,d):a.lineTo(0,d)};Y.prototype.paintSEInner=function(a,c,e,b,d,k,f,l,g){if("rounded"==f||"default"==
+f&&"rounded"==k)a.arcTo(l-.5*g,l-.5*g,0,0,0,b-g,d-l-.5*g);else if("invRound"==f||"default"==f&&"invRound"==k)a.arcTo(l+g,l+g,0,0,1,b-g,d-l-g);else if("snip"==f||"default"==f&&"snip"==k)a.lineTo(b-g,d-l-.5*g);else if("fold"==f||"default"==f&&"fold"==k)a.lineTo(b-l-g,d-l-g),a.lineTo(b-g,d-l-g)};Y.prototype.paintBottomInner=function(a,c,e,b,d,k,f,l,g,v,n){v||n?!v&&n?a.lineTo(b,d-g):v&&!n?a.lineTo(b-g,d):"square"==f||"default"==f&&"square"==k||!v?a.lineTo(b-g,d-g):"rounded"==f||"default"==f&&"rounded"==
+k||"snip"==f||"default"==f&&"snip"==k?a.lineTo(b-l-.5*g,d-g):a.lineTo(b-l-g,d-g):a.lineTo(b,d)};Y.prototype.paintSWInner=function(a,c,e,b,d,k,f,l,g,v){if(!v)a.lineTo(g,d);else if("square"==f||"default"==f&&"square"==k)a.lineTo(g,d-g);else if("rounded"==f||"default"==f&&"rounded"==k)a.arcTo(l-.5*g,l-.5*g,0,0,0,l+.5*g,d-g);else if("invRound"==f||"default"==f&&"invRound"==k)a.arcTo(l+g,l+g,0,0,1,l+g,d-g);else if("snip"==f||"default"==f&&"snip"==k)a.lineTo(l+.5*g,d-g);else if("fold"==f||"default"==f&&
+"fold"==k)a.lineTo(g+l,d-l-g),a.lineTo(g+l,d-g)};Y.prototype.moveSWInner=function(a,c,e,b,d,k,f,l,g,v){v?"square"==f||"default"==f&&"square"==k?a.moveTo(g,d-g):"rounded"==f||"default"==f&&"rounded"==k||"snip"==f||"default"==f&&"snip"==k?a.moveTo(g,d-l-.5*g):("invRound"==f||"default"==f&&"invRound"==k||"fold"==f||"default"==f&&"fold"==k)&&a.moveTo(g,d-l-g):a.moveTo(0,d-g)};Y.prototype.lineSWInner=function(a,c,e,b,d,k,f,l,g,v){v?"square"==f||"default"==f&&"square"==k?a.lineTo(g,d-g):"rounded"==f||"default"==
+f&&"rounded"==k||"snip"==f||"default"==f&&"snip"==k?a.lineTo(g,d-l-.5*g):("invRound"==f||"default"==f&&"invRound"==k||"fold"==f||"default"==f&&"fold"==k)&&a.lineTo(g,d-l-g):a.lineTo(0,d-g)};Y.prototype.moveSEInner=function(a,c,e,b,d,k,f,l,g,v){v?"square"==f||"default"==f&&"square"==k?a.moveTo(b-g,d-g):"rounded"==f||"default"==f&&"rounded"==k||"snip"==f||"default"==f&&"snip"==k?a.moveTo(b-g,d-l-.5*g):("invRound"==f||"default"==f&&"invRound"==k||"fold"==f||"default"==f&&"fold"==k)&&a.moveTo(b-g,d-l-
+g):a.moveTo(b-g,d)};Y.prototype.lineSEInner=function(a,c,e,b,d,k,f,l,g,v){v?"square"==f||"default"==f&&"square"==k?a.lineTo(b-g,d-g):"rounded"==f||"default"==f&&"rounded"==k||"snip"==f||"default"==f&&"snip"==k?a.lineTo(b-g,d-l-.5*g):("invRound"==f||"default"==f&&"invRound"==k||"fold"==f||"default"==f&&"fold"==k)&&a.lineTo(b-g,d-l-g):a.lineTo(b-g,d)};Y.prototype.moveNEInner=function(a,c,e,b,d,k,f,l,g,v){v?"square"==f||"default"==f&&"square"==k||v?a.moveTo(b-g,g):"rounded"==f||"default"==f&&"rounded"==
+k||"snip"==f||"default"==f&&"snip"==k?a.moveTo(b-g,l+.5*g):("invRound"==f||"default"==f&&"invRound"==k||"fold"==f||"default"==f&&"fold"==k)&&a.moveTo(b-g,l+g):a.moveTo(b,g)};Y.prototype.lineNEInner=function(a,c,e,b,d,k,f,l,g,v){v?"square"==f||"default"==f&&"square"==k||v?a.lineTo(b-g,g):"rounded"==f||"default"==f&&"rounded"==k||"snip"==f||"default"==f&&"snip"==k?a.lineTo(b-g,l+.5*g):("invRound"==f||"default"==f&&"invRound"==k||"fold"==f||"default"==f&&"fold"==k)&&a.lineTo(b-g,l+g):a.lineTo(b,g)};
+Y.prototype.moveNWInner=function(a,c,e,b,d,k,f,l,g,v,n){v||n?!v&&n?a.moveTo(g,0):v&&!n?a.moveTo(0,g):"square"==f||"default"==f&&"square"==k?a.moveTo(g,g):"rounded"==f||"default"==f&&"rounded"==k||"snip"==f||"default"==f&&"snip"==k?a.moveTo(g,l+.5*g):("invRound"==f||"default"==f&&"invRound"==k||"fold"==f||"default"==f&&"fold"==k)&&a.moveTo(g,l+g):a.moveTo(0,0)};Y.prototype.lineNWInner=function(a,c,e,b,d,k,f,l,g,v,n){v||n?!v&&n?a.lineTo(g,0):v&&!n?a.lineTo(0,g):"square"==f||"default"==f&&"square"==
+k?a.lineTo(g,g):"rounded"==f||"default"==f&&"rounded"==k||"snip"==f||"default"==f&&"snip"==k?a.lineTo(g,l+.5*g):("invRound"==f||"default"==f&&"invRound"==k||"fold"==f||"default"==f&&"fold"==k)&&a.lineTo(g,l+g):a.lineTo(0,0)};Y.prototype.paintFolds=function(a,c,e,b,d,k,f,l,g,v,n,q,u,t,m){if("fold"==k||"fold"==f||"fold"==l||"fold"==g||"fold"==v)("fold"==f||"default"==f&&"fold"==k)&&q&&m&&(a.moveTo(0,n),a.lineTo(n,n),a.lineTo(n,0)),("fold"==l||"default"==l&&"fold"==k)&&q&&u&&(a.moveTo(b-n,0),a.lineTo(b-
+n,n),a.lineTo(b,n)),("fold"==g||"default"==g&&"fold"==k)&&t&&u&&(a.moveTo(b-n,d),a.lineTo(b-n,d-n),a.lineTo(b,d-n)),("fold"==v||"default"==v&&"fold"==k)&&t&&m&&(a.moveTo(0,d-n),a.lineTo(n,d-n),a.lineTo(n,d))};mxCellRenderer.registerShape(Y.prototype.cst.RECT2,Y);Y.prototype.constraints=null;mxUtils.extend(Ha,mxConnector);Ha.prototype.origPaintEdgeShape=Ha.prototype.paintEdgeShape;Ha.prototype.paintEdgeShape=function(a,c,e){for(var b=[],d=0;d<c.length;d++)b.push(mxUtils.clone(c[d]));var d=a.state.dashed,
+k=a.state.fixDash;Ha.prototype.origPaintEdgeShape.apply(this,[a,b,e]);3<=a.state.strokeWidth&&(b=mxUtils.getValue(this.style,"fillColor",null),null!=b&&(a.setStrokeColor(b),a.setStrokeWidth(a.state.strokeWidth-2),a.setDashed(d,k),Ha.prototype.origPaintEdgeShape.apply(this,[a,c,e])))};mxCellRenderer.registerShape("filledEdge",Ha);"undefined"!==typeof StyleFormatPanel&&function(){var a=StyleFormatPanel.prototype.getCustomColors;StyleFormatPanel.prototype.getCustomColors=function(){var c=this.format.getSelectionState(),
+e=a.apply(this,arguments);"umlFrame"==c.style.shape&&e.push({title:mxResources.get("laneColor"),key:"swimlaneFillColor",defaultValue:"#ffffff"});return e}}();mxMarker.addMarker("dash",function(a,c,e,b,d,k,f,l,g,v){var n=d*(f+g+1),q=k*(f+g+1);return function(){a.begin();a.moveTo(b.x-n/2-q/2,b.y-q/2+n/2);a.lineTo(b.x+q/2-3*n/2,b.y-3*q/2-n/2);a.stroke()}});mxMarker.addMarker("box",function(a,c,e,b,d,k,f,l,g,v){var n=d*(f+g+1),q=k*(f+g+1),u=b.x+n/2,t=b.y+q/2;b.x-=n;b.y-=q;return function(){a.begin();
+a.moveTo(u-n/2-q/2,t-q/2+n/2);a.lineTo(u-n/2+q/2,t-q/2-n/2);a.lineTo(u+q/2-3*n/2,t-3*q/2-n/2);a.lineTo(u-q/2-3*n/2,t-3*q/2+n/2);a.close();v?a.fillAndStroke():a.stroke()}});mxMarker.addMarker("cross",function(a,c,e,b,d,k,f,l,g,v){var n=d*(f+g+1),q=k*(f+g+1);return function(){a.begin();a.moveTo(b.x-n/2-q/2,b.y-q/2+n/2);a.lineTo(b.x+q/2-3*n/2,b.y-3*q/2-n/2);a.moveTo(b.x-n/2+q/2,b.y-q/2-n/2);a.lineTo(b.x-q/2-3*n/2,b.y-3*q/2+n/2);a.stroke()}});mxMarker.addMarker("circle",Ua);mxMarker.addMarker("circlePlus",
+function(a,c,e,b,d,k,f,l,g,v){var n=b.clone(),q=Ua.apply(this,arguments),u=d*(f+2*g),t=k*(f+2*g);return function(){q.apply(this,arguments);a.begin();a.moveTo(n.x-d*g,n.y-k*g);a.lineTo(n.x-2*u+d*g,n.y-2*t+k*g);a.moveTo(n.x-u-t+k*g,n.y-t+u-d*g);a.lineTo(n.x+t-u-k*g,n.y-t-u+d*g);a.stroke()}});mxMarker.addMarker("halfCircle",function(a,c,e,b,d,k,f,l,g,v){var n=d*(f+g+1),q=k*(f+g+1),u=b.clone();b.x-=n;b.y-=q;return function(){a.begin();a.moveTo(u.x-q,u.y+n);a.quadTo(b.x-q,b.y+n,b.x,b.y);a.quadTo(b.x+q,
+b.y-n,u.x+q,u.y-n);a.stroke()}});mxMarker.addMarker("async",function(a,c,e,b,d,k,f,l,g,v){c=d*g*1.118;e=k*g*1.118;d*=f+g;k*=f+g;var n=b.clone();n.x-=c;n.y-=e;b.x+=1*-d-c;b.y+=1*-k-e;return function(){a.begin();a.moveTo(n.x,n.y);l?a.lineTo(n.x-d-k/2,n.y-k+d/2):a.lineTo(n.x+k/2-d,n.y-k-d/2);a.lineTo(n.x-d,n.y-k);a.close();v?a.fillAndStroke():a.stroke()}});mxMarker.addMarker("openAsync",function(a){a=null!=a?a:2;return function(c,e,b,d,k,f,g,l,v,n){k*=g+v;f*=g+v;var q=d.clone();return function(){c.begin();
+c.moveTo(q.x,q.y);l?c.lineTo(q.x-k-f/a,q.y-f+k/a):c.lineTo(q.x+f/a-k,q.y-f-k/a);c.stroke()}}}(2));if("undefined"!==typeof mxVertexHandler){var Ya=function(a,c,e){return Ka(a,["width"],c,function(c,b,d,k,f){f=a.shape.getEdgeWidth()*a.view.scale+e;return new mxPoint(k.x+b*c/4+d*f/2,k.y+d*c/4-b*f/2)},function(c,b,d,k,f,g){c=Math.sqrt(mxUtils.ptSegDistSq(k.x,k.y,f.x,f.y,g.x,g.y));a.style.width=Math.round(2*c)/a.view.scale-e})},Ka=function(a,c,e,b,d){return fa(a,c,function(c){var d=a.absolutePoints,k=
+d.length-1;c=a.view.translate;var f=a.view.scale,g=e?d[0]:d[k],d=e?d[1]:d[k-1],k=d.x-g.x,l=d.y-g.y,v=Math.sqrt(k*k+l*l),g=b.call(this,v,k/v,l/v,g,d);return new mxPoint(g.x/f-c.x,g.y/f-c.y)},function(c,b,k){var f=a.absolutePoints,g=f.length-1;c=a.view.translate;var l=a.view.scale,v=e?f[0]:f[g],f=e?f[1]:f[g-1],g=f.x-v.x,n=f.y-v.y,q=Math.sqrt(g*g+n*n);b.x=(b.x+c.x)*l;b.y=(b.y+c.y)*l;d.call(this,q,g/q,n/q,v,f,b,k)})},Ga=function(a){return function(c){return[fa(c,["arrowWidth","arrowSize"],function(c){var e=
+Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"arrowWidth",aa.prototype.arrowWidth))),b=Math.max(0,Math.min(a,mxUtils.getValue(this.state.style,"arrowSize",aa.prototype.arrowSize)));return new mxPoint(c.x+(1-b)*c.width,c.y+(1-e)*c.height/2)},function(c,e){this.state.style.arrowWidth=Math.max(0,Math.min(1,Math.abs(c.y+c.height/2-e.y)/c.height*2));this.state.style.arrowSize=Math.max(0,Math.min(a,(c.x+c.width-e.x)/c.width))})]}},Va=function(a){return function(c){return[fa(c,["size"],function(c){var e=
Math.max(0,Math.min(.5*c.height,parseFloat(mxUtils.getValue(this.state.style,"size",a))));return new mxPoint(c.x,c.y+e)},function(a,c){this.state.style.size=Math.max(0,c.y-a.y)},!0)]}},Sa=function(a,c,e){return function(b){var d=[fa(b,["size"],function(e){var b=Math.max(0,Math.min(e.width,Math.min(e.height,parseFloat(mxUtils.getValue(this.state.style,"size",c)))))*a;return new mxPoint(e.x+b,e.y+b)},function(c,e){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(c.width,e.x-c.x),Math.min(c.height,
-e.y-c.y)))/a)},!1)];e&&mxUtils.getValue(b.style,mxConstants.STYLE_ROUNDED,!1)&&d.push(Ea(b));return d}},La=function(a,c,e,b,d){e=null!=e?e:.5;return function(g){var f=[fa(g,["size"],function(c){var e=null!=d?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,b=parseFloat(mxUtils.getValue(this.state.style,"size",e?d:a));return new mxPoint(c.x+Math.max(0,Math.min(.5*c.width,b*(e?1:c.width))),c.getCenterY())},function(a,c,b){a=null!=d&&"0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?
-c.x-a.x:Math.max(0,Math.min(e,(c.x-a.x)/a.width));this.state.style.size=a},!1,b)];c&&mxUtils.getValue(g.style,mxConstants.STYLE_ROUNDED,!1)&&f.push(Ea(g));return f}},Wa=function(a,c,e){a=null!=a?a:.5;return function(b){var d=[fa(b,["size"],function(b){var d=null!=e?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,g=Math.max(0,parseFloat(mxUtils.getValue(this.state.style,"size",d?e:c)));return new mxPoint(b.x+Math.min(.75*b.width*a,g*(d?.75:.75*b.width)),b.y+b.height/4)},function(c,b){var d=
+e.y-c.y)))/a)},!1)];e&&mxUtils.getValue(b.style,mxConstants.STYLE_ROUNDED,!1)&&d.push(Ea(b));return d}},La=function(a,c,e,b,d){e=null!=e?e:.5;return function(k){var f=[fa(k,["size"],function(c){var e=null!=d?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,b=parseFloat(mxUtils.getValue(this.state.style,"size",e?d:a));return new mxPoint(c.x+Math.max(0,Math.min(.5*c.width,b*(e?1:c.width))),c.getCenterY())},function(a,c,b){a=null!=d&&"0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?
+c.x-a.x:Math.max(0,Math.min(e,(c.x-a.x)/a.width));this.state.style.size=a},!1,b)];c&&mxUtils.getValue(k.style,mxConstants.STYLE_ROUNDED,!1)&&f.push(Ea(k));return f}},Wa=function(a,c,e){a=null!=a?a:.5;return function(b){var d=[fa(b,["size"],function(b){var d=null!=e?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,k=Math.max(0,parseFloat(mxUtils.getValue(this.state.style,"size",d?e:c)));return new mxPoint(b.x+Math.min(.75*b.width*a,k*(d?.75:.75*b.width)),b.y+b.height/4)},function(c,b){var d=
null!=e&&"0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?b.x-c.x:Math.max(0,Math.min(a,(b.x-c.x)/c.width*.75));this.state.style.size=d},!1,!0)];mxUtils.getValue(b.style,mxConstants.STYLE_ROUNDED,!1)&&d.push(Ea(b));return d}},Ja=function(){return function(a){var c=[];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&c.push(Ea(a));return c}},Ea=function(a,c){return fa(a,[mxConstants.STYLE_ARCSIZE],function(e){var b=null!=c?c:e.height/8;if("1"==mxUtils.getValue(a.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,
0)){var d=mxUtils.getValue(a.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;return new mxPoint(e.x+e.width-Math.min(e.width/2,d),e.y+b)}d=Math.max(0,parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)))/100;return new mxPoint(e.x+e.width-Math.min(Math.max(e.width/2,e.height/2),Math.min(e.width,e.height)*d),e.y+b)},function(c,e,b){"1"==mxUtils.getValue(a.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?this.state.style[mxConstants.STYLE_ARCSIZE]=
-Math.round(Math.max(0,Math.min(c.width,2*(c.x+c.width-e.x)))):this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.min(50,Math.max(0,100*(c.width-e.x+c.x)/Math.min(c.width,c.height))))})},fa=function(a,c,e,b,d,g,f){var l=new mxHandle(a,null,mxVertexHandler.prototype.secondaryHandleImage);l.execute=function(a){for(var e=0;e<c.length;e++)this.copyStyle(c[e]);f&&f(a)};l.getPosition=e;l.setPosition=b;l.ignoreGrid=null!=d?d:!0;if(g){var k=l.positionChanged;l.positionChanged=function(){k.apply(this,
-arguments);a.view.invalidate(this.state.cell);a.view.validate()}}return l},Ma={link:function(a){return[Ya(a,!0,10),Ya(a,!1,10)]},flexArrow:function(a){var c=a.view.graph.gridSize/a.view.scale,e=[];mxUtils.getValue(a.style,mxConstants.STYLE_STARTARROW,mxConstants.NONE)!=mxConstants.NONE&&(e.push(Ka(a,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(c,e,b,d,g){c=(a.shape.getEdgeWidth()-a.shape.strokewidth)*a.view.scale;g=3*mxUtils.getNumber(a.style,mxConstants.STYLE_STARTSIZE,
-mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(d.x+e*(g+a.shape.strokewidth*a.view.scale)+b*c/2,d.y+b*(g+a.shape.strokewidth*a.view.scale)-e*c/2)},function(e,b,d,g,f,l,k){e=Math.sqrt(mxUtils.ptSegDistSq(g.x,g.y,f.x,f.y,l.x,l.y));b=mxUtils.ptLineDist(g.x,g.y,g.x+d,g.y-b,l.x,l.y);a.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(b-a.shape.strokewidth)/3)/100/a.view.scale;a.style.width=Math.round(2*e)/a.view.scale;mxEvent.isControlDown(k.getEvent())&&(a.style[mxConstants.STYLE_ENDSIZE]=
-a.style[mxConstants.STYLE_STARTSIZE]);mxEvent.isAltDown(k.getEvent())||Math.abs(parseFloat(a.style[mxConstants.STYLE_STARTSIZE])-parseFloat(a.style[mxConstants.STYLE_ENDSIZE]))<c/6&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE])})),e.push(Ka(a,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(c,e,b,d,g){c=(a.shape.getStartArrowWidth()-a.shape.strokewidth)*a.view.scale;g=3*mxUtils.getNumber(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/
-5)*a.view.scale;return new mxPoint(d.x+e*(g+a.shape.strokewidth*a.view.scale)+b*c/2,d.y+b*(g+a.shape.strokewidth*a.view.scale)-e*c/2)},function(e,b,d,g,f,l,k){e=Math.sqrt(mxUtils.ptSegDistSq(g.x,g.y,f.x,f.y,l.x,l.y));b=mxUtils.ptLineDist(g.x,g.y,g.x+d,g.y-b,l.x,l.y);a.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(b-a.shape.strokewidth)/3)/100/a.view.scale;a.style.startWidth=Math.max(0,Math.round(2*e)-a.shape.getEdgeWidth())/a.view.scale;mxEvent.isControlDown(k.getEvent())&&(a.style[mxConstants.STYLE_ENDSIZE]=
-a.style[mxConstants.STYLE_STARTSIZE],a.style.endWidth=a.style.startWidth);mxEvent.isAltDown(k.getEvent())||(Math.abs(parseFloat(a.style[mxConstants.STYLE_STARTSIZE])-parseFloat(a.style[mxConstants.STYLE_ENDSIZE]))<c/6&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE]),Math.abs(parseFloat(a.style.startWidth)-parseFloat(a.style.endWidth))<c&&(a.style.startWidth=a.style.endWidth))})));mxUtils.getValue(a.style,mxConstants.STYLE_ENDARROW,mxConstants.NONE)!=mxConstants.NONE&&(e.push(Ka(a,
-["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(c,e,b,d,g){c=(a.shape.getEdgeWidth()-a.shape.strokewidth)*a.view.scale;g=3*mxUtils.getNumber(a.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(d.x+e*(g+a.shape.strokewidth*a.view.scale)-b*c/2,d.y+b*(g+a.shape.strokewidth*a.view.scale)+e*c/2)},function(e,b,d,g,f,l,k){e=Math.sqrt(mxUtils.ptSegDistSq(g.x,g.y,f.x,f.y,l.x,l.y));b=mxUtils.ptLineDist(g.x,g.y,g.x+d,g.y-b,l.x,l.y);a.style[mxConstants.STYLE_ENDSIZE]=
-Math.round(100*(b-a.shape.strokewidth)/3)/100/a.view.scale;a.style.width=Math.round(2*e)/a.view.scale;mxEvent.isControlDown(k.getEvent())&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE]);mxEvent.isAltDown(k.getEvent())||Math.abs(parseFloat(a.style[mxConstants.STYLE_ENDSIZE])-parseFloat(a.style[mxConstants.STYLE_STARTSIZE]))<c/6&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE])})),e.push(Ka(a,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],
-!1,function(c,e,b,d,g){c=(a.shape.getEndArrowWidth()-a.shape.strokewidth)*a.view.scale;g=3*mxUtils.getNumber(a.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(d.x+e*(g+a.shape.strokewidth*a.view.scale)-b*c/2,d.y+b*(g+a.shape.strokewidth*a.view.scale)+e*c/2)},function(e,b,d,g,f,l,k){e=Math.sqrt(mxUtils.ptSegDistSq(g.x,g.y,f.x,f.y,l.x,l.y));b=mxUtils.ptLineDist(g.x,g.y,g.x+d,g.y-b,l.x,l.y);a.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(b-a.shape.strokewidth)/
-3)/100/a.view.scale;a.style.endWidth=Math.max(0,Math.round(2*e)-a.shape.getEdgeWidth())/a.view.scale;mxEvent.isControlDown(k.getEvent())&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE],a.style.startWidth=a.style.endWidth);mxEvent.isAltDown(k.getEvent())||(Math.abs(parseFloat(a.style[mxConstants.STYLE_ENDSIZE])-parseFloat(a.style[mxConstants.STYLE_STARTSIZE]))<c/6&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE]),Math.abs(parseFloat(a.style.endWidth)-
+Math.round(Math.max(0,Math.min(c.width,2*(c.x+c.width-e.x)))):this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.min(50,Math.max(0,100*(c.width-e.x+c.x)/Math.min(c.width,c.height))))})},fa=function(a,c,e,b,d,k,f){var g=new mxHandle(a,null,mxVertexHandler.prototype.secondaryHandleImage);g.execute=function(a){for(var e=0;e<c.length;e++)this.copyStyle(c[e]);f&&f(a)};g.getPosition=e;g.setPosition=b;g.ignoreGrid=null!=d?d:!0;if(k){var l=g.positionChanged;g.positionChanged=function(){l.apply(this,
+arguments);a.view.invalidate(this.state.cell);a.view.validate()}}return g},Ma={link:function(a){return[Ya(a,!0,10),Ya(a,!1,10)]},flexArrow:function(a){var c=a.view.graph.gridSize/a.view.scale,e=[];mxUtils.getValue(a.style,mxConstants.STYLE_STARTARROW,mxConstants.NONE)!=mxConstants.NONE&&(e.push(Ka(a,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(c,e,b,d,k){c=(a.shape.getEdgeWidth()-a.shape.strokewidth)*a.view.scale;k=3*mxUtils.getNumber(a.style,mxConstants.STYLE_STARTSIZE,
+mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(d.x+e*(k+a.shape.strokewidth*a.view.scale)+b*c/2,d.y+b*(k+a.shape.strokewidth*a.view.scale)-e*c/2)},function(e,b,d,k,f,g,l){e=Math.sqrt(mxUtils.ptSegDistSq(k.x,k.y,f.x,f.y,g.x,g.y));b=mxUtils.ptLineDist(k.x,k.y,k.x+d,k.y-b,g.x,g.y);a.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(b-a.shape.strokewidth)/3)/100/a.view.scale;a.style.width=Math.round(2*e)/a.view.scale;mxEvent.isControlDown(l.getEvent())&&(a.style[mxConstants.STYLE_ENDSIZE]=
+a.style[mxConstants.STYLE_STARTSIZE]);mxEvent.isAltDown(l.getEvent())||Math.abs(parseFloat(a.style[mxConstants.STYLE_STARTSIZE])-parseFloat(a.style[mxConstants.STYLE_ENDSIZE]))<c/6&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE])})),e.push(Ka(a,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(c,e,b,d,k){c=(a.shape.getStartArrowWidth()-a.shape.strokewidth)*a.view.scale;k=3*mxUtils.getNumber(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/
+5)*a.view.scale;return new mxPoint(d.x+e*(k+a.shape.strokewidth*a.view.scale)+b*c/2,d.y+b*(k+a.shape.strokewidth*a.view.scale)-e*c/2)},function(e,b,d,k,f,g,l){e=Math.sqrt(mxUtils.ptSegDistSq(k.x,k.y,f.x,f.y,g.x,g.y));b=mxUtils.ptLineDist(k.x,k.y,k.x+d,k.y-b,g.x,g.y);a.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(b-a.shape.strokewidth)/3)/100/a.view.scale;a.style.startWidth=Math.max(0,Math.round(2*e)-a.shape.getEdgeWidth())/a.view.scale;mxEvent.isControlDown(l.getEvent())&&(a.style[mxConstants.STYLE_ENDSIZE]=
+a.style[mxConstants.STYLE_STARTSIZE],a.style.endWidth=a.style.startWidth);mxEvent.isAltDown(l.getEvent())||(Math.abs(parseFloat(a.style[mxConstants.STYLE_STARTSIZE])-parseFloat(a.style[mxConstants.STYLE_ENDSIZE]))<c/6&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE]),Math.abs(parseFloat(a.style.startWidth)-parseFloat(a.style.endWidth))<c&&(a.style.startWidth=a.style.endWidth))})));mxUtils.getValue(a.style,mxConstants.STYLE_ENDARROW,mxConstants.NONE)!=mxConstants.NONE&&(e.push(Ka(a,
+["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(c,e,b,d,k){c=(a.shape.getEdgeWidth()-a.shape.strokewidth)*a.view.scale;k=3*mxUtils.getNumber(a.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(d.x+e*(k+a.shape.strokewidth*a.view.scale)-b*c/2,d.y+b*(k+a.shape.strokewidth*a.view.scale)+e*c/2)},function(e,b,d,k,f,g,l){e=Math.sqrt(mxUtils.ptSegDistSq(k.x,k.y,f.x,f.y,g.x,g.y));b=mxUtils.ptLineDist(k.x,k.y,k.x+d,k.y-b,g.x,g.y);a.style[mxConstants.STYLE_ENDSIZE]=
+Math.round(100*(b-a.shape.strokewidth)/3)/100/a.view.scale;a.style.width=Math.round(2*e)/a.view.scale;mxEvent.isControlDown(l.getEvent())&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE]);mxEvent.isAltDown(l.getEvent())||Math.abs(parseFloat(a.style[mxConstants.STYLE_ENDSIZE])-parseFloat(a.style[mxConstants.STYLE_STARTSIZE]))<c/6&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE])})),e.push(Ka(a,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],
+!1,function(c,e,b,d,k){c=(a.shape.getEndArrowWidth()-a.shape.strokewidth)*a.view.scale;k=3*mxUtils.getNumber(a.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(d.x+e*(k+a.shape.strokewidth*a.view.scale)-b*c/2,d.y+b*(k+a.shape.strokewidth*a.view.scale)+e*c/2)},function(e,b,d,k,f,g,l){e=Math.sqrt(mxUtils.ptSegDistSq(k.x,k.y,f.x,f.y,g.x,g.y));b=mxUtils.ptLineDist(k.x,k.y,k.x+d,k.y-b,g.x,g.y);a.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(b-a.shape.strokewidth)/
+3)/100/a.view.scale;a.style.endWidth=Math.max(0,Math.round(2*e)-a.shape.getEdgeWidth())/a.view.scale;mxEvent.isControlDown(l.getEvent())&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE],a.style.startWidth=a.style.endWidth);mxEvent.isAltDown(l.getEvent())||(Math.abs(parseFloat(a.style[mxConstants.STYLE_ENDSIZE])-parseFloat(a.style[mxConstants.STYLE_STARTSIZE]))<c/6&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE]),Math.abs(parseFloat(a.style.endWidth)-
parseFloat(a.style.startWidth))<c&&(a.style.endWidth=a.style.startWidth))})));return e},swimlane:function(a){var c=[];if(mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED)){var e=parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));c.push(Ea(a,e/2))}c.push(fa(a,[mxConstants.STYLE_STARTSIZE],function(c){var e=parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));return 1==mxUtils.getValue(a.style,mxConstants.STYLE_HORIZONTAL,
1)?new mxPoint(c.getCenterX(),c.y+Math.max(0,Math.min(c.height,e))):new mxPoint(c.x+Math.max(0,Math.min(c.width,e)),c.getCenterY())},function(c,e){a.style[mxConstants.STYLE_STARTSIZE]=1==mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,1)?Math.round(Math.max(0,Math.min(c.height,e.y-c.y))):Math.round(Math.max(0,Math.min(c.width,e.x-c.x)))},!1,null,function(c){if(mxEvent.isControlDown(c.getEvent())&&(c=a.view.graph,c.isTableRow(a.cell)||c.isTableCell(a.cell))){for(var e=c.getSwimlaneDirection(a.style),
-b=c.model.getParent(a.cell),b=c.model.getChildCells(b,!0),d=[],g=0;g<b.length;g++)b[g]!=a.cell&&c.isSwimlane(b[g])&&c.getSwimlaneDirection(c.getCurrentCellStyle(b[g]))==e&&d.push(b[g]);c.setCellStyles(mxConstants.STYLE_STARTSIZE,a.style[mxConstants.STYLE_STARTSIZE],d)}}));return c},label:Ja(),ext:Ja(),rectangle:Ja(),triangle:Ja(),rhombus:Ja(),umlLifeline:function(a){return[fa(a,["size"],function(a){var c=Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(this.state.style,"size",Q.prototype.size))));
-return new mxPoint(a.getCenterX(),a.y+c)},function(a,c){this.state.style.size=Math.round(Math.max(0,Math.min(a.height,c.y-a.y)))},!1)]},umlFrame:function(a){return[fa(a,["width","height"],function(a){var c=Math.max(aa.prototype.corner,Math.min(a.width,mxUtils.getValue(this.state.style,"width",aa.prototype.width))),e=Math.max(1.5*aa.prototype.corner,Math.min(a.height,mxUtils.getValue(this.state.style,"height",aa.prototype.height)));return new mxPoint(a.x+c,a.y+e)},function(a,c){this.state.style.width=
-Math.round(Math.max(aa.prototype.corner,Math.min(a.width,c.x-a.x)));this.state.style.height=Math.round(Math.max(1.5*aa.prototype.corner,Math.min(a.height,c.y-a.y)))},!1)]},process:function(a){var c=[fa(a,["size"],function(a){var c="0"!=mxUtils.getValue(this.state.style,"fixedSize","0"),e=parseFloat(mxUtils.getValue(this.state.style,"size",F.prototype.size));return c?new mxPoint(a.x+e,a.y+a.height/4):new mxPoint(a.x+a.width*e,a.y+a.height/4)},function(a,c){var e="0"!=mxUtils.getValue(this.state.style,
-"fixedSize","0")?Math.max(0,Math.min(.5*a.width,c.x-a.x)):Math.max(0,Math.min(.5,(c.x-a.x)/a.width));this.state.style.size=e},!1)];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&c.push(Ea(a));return c},cross:function(a){return[fa(a,["size"],function(a){var c=Math.min(a.width,a.height),c=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"size",xa.prototype.size)))*c/2;return new mxPoint(a.getCenterX()-c,a.getCenterY()-c)},function(a,c){var e=Math.min(a.width,a.height);this.state.style.size=
+b=c.model.getParent(a.cell),b=c.model.getChildCells(b,!0),d=[],k=0;k<b.length;k++)b[k]!=a.cell&&c.isSwimlane(b[k])&&c.getSwimlaneDirection(c.getCurrentCellStyle(b[k]))==e&&d.push(b[k]);c.setCellStyles(mxConstants.STYLE_STARTSIZE,a.style[mxConstants.STYLE_STARTSIZE],d)}}));return c},label:Ja(),ext:Ja(),rectangle:Ja(),triangle:Ja(),rhombus:Ja(),umlLifeline:function(a){return[fa(a,["size"],function(a){var c=Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(this.state.style,"size",Q.prototype.size))));
+return new mxPoint(a.getCenterX(),a.y+c)},function(a,c){this.state.style.size=Math.round(Math.max(0,Math.min(a.height,c.y-a.y)))},!1)]},umlFrame:function(a){return[fa(a,["width","height"],function(a){var c=Math.max(Z.prototype.corner,Math.min(a.width,mxUtils.getValue(this.state.style,"width",Z.prototype.width))),e=Math.max(1.5*Z.prototype.corner,Math.min(a.height,mxUtils.getValue(this.state.style,"height",Z.prototype.height)));return new mxPoint(a.x+c,a.y+e)},function(a,c){this.state.style.width=
+Math.round(Math.max(Z.prototype.corner,Math.min(a.width,c.x-a.x)));this.state.style.height=Math.round(Math.max(1.5*Z.prototype.corner,Math.min(a.height,c.y-a.y)))},!1)]},process:function(a){var c=[fa(a,["size"],function(a){var c="0"!=mxUtils.getValue(this.state.style,"fixedSize","0"),e=parseFloat(mxUtils.getValue(this.state.style,"size",F.prototype.size));return c?new mxPoint(a.x+e,a.y+a.height/4):new mxPoint(a.x+a.width*e,a.y+a.height/4)},function(a,c){var e="0"!=mxUtils.getValue(this.state.style,
+"fixedSize","0")?Math.max(0,Math.min(.5*a.width,c.x-a.x)):Math.max(0,Math.min(.5,(c.x-a.x)/a.width));this.state.style.size=e},!1)];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&c.push(Ea(a));return c},cross:function(a){return[fa(a,["size"],function(a){var c=Math.min(a.width,a.height),c=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"size",wa.prototype.size)))*c/2;return new mxPoint(a.getCenterX()-c,a.getCenterY()-c)},function(a,c){var e=Math.min(a.width,a.height);this.state.style.size=
Math.max(0,Math.min(1,Math.min(Math.max(0,a.getCenterY()-c.y)/e*2,Math.max(0,a.getCenterX()-c.x)/e*2)))})]},note:function(a){return[fa(a,["size"],function(a){var c=Math.max(0,Math.min(a.width,Math.min(a.height,parseFloat(mxUtils.getValue(this.state.style,"size",p.prototype.size)))));return new mxPoint(a.x+a.width-c,a.y+c)},function(a,c){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(a.width,a.x+a.width-c.x),Math.min(a.height,c.y-a.y))))})]},note2:function(a){return[fa(a,["size"],function(a){var e=
-Math.max(0,Math.min(a.width,Math.min(a.height,parseFloat(mxUtils.getValue(this.state.style,"size",c.prototype.size)))));return new mxPoint(a.x+a.width-e,a.y+e)},function(a,c){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(a.width,a.x+a.width-c.x),Math.min(a.height,c.y-a.y))))})]},manualInput:function(a){var c=[fa(a,["size"],function(a){var c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",da.prototype.size)));return new mxPoint(a.x+a.width/4,a.y+3*c/4)},function(a,
-c){this.state.style.size=Math.round(Math.max(0,Math.min(a.height,4*(c.y-a.y)/3)))},!1)];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&c.push(Ea(a));return c},dataStorage:function(a){return[fa(a,["size"],function(a){var c="0"!=mxUtils.getValue(this.state.style,"fixedSize","0"),e=parseFloat(mxUtils.getValue(this.state.style,"size",c?Y.prototype.fixedSize:Y.prototype.size));return new mxPoint(a.x+a.width-e*(c?1:a.width),a.getCenterY())},function(a,c){var e="0"!=mxUtils.getValue(this.state.style,
-"fixedSize","0")?Math.max(0,Math.min(a.width,a.x+a.width-c.x)):Math.max(0,Math.min(1,(a.x+a.width-c.x)/a.width));this.state.style.size=e},!1)]},callout:function(a){var c=[fa(a,["size","position"],function(a){var c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",C.prototype.size))),e=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",C.prototype.position)));mxUtils.getValue(this.state.style,"base",C.prototype.base);return new mxPoint(a.x+e*a.width,a.y+a.height-
-c)},function(a,c){mxUtils.getValue(this.state.style,"base",C.prototype.base);this.state.style.size=Math.round(Math.max(0,Math.min(a.height,a.y+a.height-c.y)));this.state.style.position=Math.round(100*Math.max(0,Math.min(1,(c.x-a.x)/a.width)))/100},!1),fa(a,["position2"],function(a){var c=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position2",C.prototype.position2)));return new mxPoint(a.x+c*a.width,a.y+a.height)},function(a,c){this.state.style.position2=Math.round(100*Math.max(0,Math.min(1,
-(c.x-a.x)/a.width)))/100},!1),fa(a,["base"],function(a){var c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",C.prototype.size))),e=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",C.prototype.position))),b=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"base",C.prototype.base)));return new mxPoint(a.x+Math.min(a.width,e*a.width+b),a.y+a.height-c)},function(a,c){var e=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",C.prototype.position)));
+Math.max(0,Math.min(a.width,Math.min(a.height,parseFloat(mxUtils.getValue(this.state.style,"size",c.prototype.size)))));return new mxPoint(a.x+a.width-e,a.y+e)},function(a,c){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(a.width,a.x+a.width-c.x),Math.min(a.height,c.y-a.y))))})]},manualInput:function(a){var c=[fa(a,["size"],function(a){var c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",ca.prototype.size)));return new mxPoint(a.x+a.width/4,a.y+3*c/4)},function(a,
+c){this.state.style.size=Math.round(Math.max(0,Math.min(a.height,4*(c.y-a.y)/3)))},!1)];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&c.push(Ea(a));return c},dataStorage:function(a){return[fa(a,["size"],function(a){var c="0"!=mxUtils.getValue(this.state.style,"fixedSize","0"),e=parseFloat(mxUtils.getValue(this.state.style,"size",c?ea.prototype.fixedSize:ea.prototype.size));return new mxPoint(a.x+a.width-e*(c?1:a.width),a.getCenterY())},function(a,c){var e="0"!=mxUtils.getValue(this.state.style,
+"fixedSize","0")?Math.max(0,Math.min(a.width,a.x+a.width-c.x)):Math.max(0,Math.min(1,(a.x+a.width-c.x)/a.width));this.state.style.size=e},!1)]},callout:function(a){var c=[fa(a,["size","position"],function(a){var c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",D.prototype.size))),e=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",D.prototype.position)));mxUtils.getValue(this.state.style,"base",D.prototype.base);return new mxPoint(a.x+e*a.width,a.y+a.height-
+c)},function(a,c){mxUtils.getValue(this.state.style,"base",D.prototype.base);this.state.style.size=Math.round(Math.max(0,Math.min(a.height,a.y+a.height-c.y)));this.state.style.position=Math.round(100*Math.max(0,Math.min(1,(c.x-a.x)/a.width)))/100},!1),fa(a,["position2"],function(a){var c=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position2",D.prototype.position2)));return new mxPoint(a.x+c*a.width,a.y+a.height)},function(a,c){this.state.style.position2=Math.round(100*Math.max(0,Math.min(1,
+(c.x-a.x)/a.width)))/100},!1),fa(a,["base"],function(a){var c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",D.prototype.size))),e=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",D.prototype.position))),b=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"base",D.prototype.base)));return new mxPoint(a.x+Math.min(a.width,e*a.width+b),a.y+a.height-c)},function(a,c){var e=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",D.prototype.position)));
this.state.style.base=Math.round(Math.max(0,Math.min(a.width,c.x-a.x-e*a.width)))},!1)];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&c.push(Ea(a));return c},internalStorage:function(a){var c=[fa(a,["dx","dy"],function(a){var c=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",ia.prototype.dx))),e=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",ia.prototype.dy)));return new mxPoint(a.x+c,a.y+e)},function(a,c){this.state.style.dx=Math.round(Math.max(0,
Math.min(a.width,c.x-a.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(a.height,c.y-a.y)))},!1)];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&c.push(Ea(a));return c},module:function(a){return[fa(a,["jettyWidth","jettyHeight"],function(a){var c=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"jettyWidth",V.prototype.jettyWidth))),e=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"jettyHeight",V.prototype.jettyHeight)));return new mxPoint(a.x+c/2,a.y+
2*e)},function(a,c){this.state.style.jettyWidth=Math.round(2*Math.max(0,Math.min(a.width,c.x-a.x)));this.state.style.jettyHeight=Math.round(Math.max(0,Math.min(a.height,c.y-a.y))/2)})]},corner:function(a){return[fa(a,["dx","dy"],function(a){var c=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",pa.prototype.dx))),e=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",pa.prototype.dy)));return new mxPoint(a.x+c,a.y+e)},function(a,c){this.state.style.dx=Math.round(Math.max(0,
@@ -2858,21 +2859,21 @@ Math.min(a.width,c.x-a.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(a
Math.round(Math.max(0,Math.min(a.height,c.y-a.y)))},!1)]},singleArrow:Ga(1),doubleArrow:Ga(.5),folder:function(a){return[fa(a,["tabWidth","tabHeight"],function(a){var c=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"tabWidth",q.prototype.tabWidth))),e=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"tabHeight",q.prototype.tabHeight)));mxUtils.getValue(this.state.style,"tabPosition",q.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(c=a.width-c);return new mxPoint(a.x+
c,a.y+e)},function(a,c){var e=Math.max(0,Math.min(a.width,c.x-a.x));mxUtils.getValue(this.state.style,"tabPosition",q.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(e=a.width-e);this.state.style.tabWidth=Math.round(e);this.state.style.tabHeight=Math.round(Math.max(0,Math.min(a.height,c.y-a.y)))},!1)]},document:function(a){return[fa(a,["size"],function(a){var c=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",x.prototype.size))));return new mxPoint(a.x+3*a.width/4,a.y+(1-
c)*a.height)},function(a,c){this.state.style.size=Math.max(0,Math.min(1,(a.y+a.height-c.y)/a.height))},!1)]},tape:function(a){return[fa(a,["size"],function(a){var c=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",A.prototype.size))));return new mxPoint(a.getCenterX(),a.y+c*a.height/2)},function(a,c){this.state.style.size=Math.max(0,Math.min(1,(c.y-a.y)/a.height*2))},!1)]},isoCube2:function(a){return[fa(a,["isoAngle"],function(a){var c=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.state.style,
-"isoAngle",e.isoAngle))))*Math.PI/200;return new mxPoint(a.x,a.y+Math.min(a.width*Math.tan(c),.5*a.height))},function(a,c){this.state.style.isoAngle=Math.max(0,50*(c.y-a.y)/a.height)},!0)]},cylinder2:Va(g.prototype.size),cylinder3:Va(n.prototype.size),offPageConnector:function(a){return[fa(a,["size"],function(a){var c=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",ra.prototype.size))));return new mxPoint(a.getCenterX(),a.y+(1-c)*a.height)},function(a,c){this.state.style.size=
+"isoAngle",e.isoAngle))))*Math.PI/200;return new mxPoint(a.x,a.y+Math.min(a.width*Math.tan(c),.5*a.height))},function(a,c){this.state.style.isoAngle=Math.max(0,50*(c.y-a.y)/a.height)},!0)]},cylinder2:Va(k.prototype.size),cylinder3:Va(n.prototype.size),offPageConnector:function(a){return[fa(a,["size"],function(a){var c=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",ra.prototype.size))));return new mxPoint(a.getCenterX(),a.y+(1-c)*a.height)},function(a,c){this.state.style.size=
Math.max(0,Math.min(1,(a.y+a.height-c.y)/a.height))},!1)]},"mxgraph.basic.rect":function(a){var c=[Graph.createHandle(a,["size"],function(a){var c=Math.max(0,Math.min(a.width/2,a.height/2,parseFloat(mxUtils.getValue(this.state.style,"size",this.size))));return new mxPoint(a.x+c,a.y+c)},function(a,c){this.state.style.size=Math.round(100*Math.max(0,Math.min(a.height/2,a.width/2,c.x-a.x)))/100})];a=Graph.createHandle(a,["indent"],function(a){var c=Math.max(0,Math.min(100,parseFloat(mxUtils.getValue(this.state.style,
"indent",this.dx2))));return new mxPoint(a.x+.75*a.width,a.y+c*a.height/200)},function(a,c){this.state.style.indent=Math.round(100*Math.max(0,Math.min(100,200*(c.y-a.y)/a.height)))/100});c.push(a);return c},step:La(M.prototype.size,!0,null,!0,M.prototype.fixedSize),hexagon:La(U.prototype.size,!0,.5,!0,U.prototype.fixedSize),curlyBracket:La(E.prototype.size,!1),display:La(Fa.prototype.size,!1),cube:Sa(1,b.prototype.size,!1),card:Sa(.5,t.prototype.size,!0),loopLimit:Sa(.5,ua.prototype.size,!0),trapezoid:Wa(.5,
z.prototype.size,z.prototype.fixedSize),parallelogram:Wa(1,G.prototype.size,G.prototype.fixedSize)};Graph.createHandle=fa;Graph.handleFactory=Ma;var cb=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){var a=cb.apply(this,arguments);if(this.graph.isCellRotatable(this.state.cell)){var c=this.state.style.shape;null==mxCellRenderer.defaultShapes[c]&&null==mxStencilRegistry.getStencil(c)?c=mxConstants.SHAPE_RECTANGLE:this.state.view.graph.isSwimlane(this.state.cell)&&
(c=mxConstants.SHAPE_SWIMLANE);c=Ma[c];null==c&&null!=this.state.shape&&this.state.shape.isRoundable()&&(c=Ma[mxConstants.SHAPE_RECTANGLE]);null!=c&&(c=c(this.state),null!=c&&(a=null==a?c:a.concat(c)))}return a};mxEdgeHandler.prototype.createCustomHandles=function(){var a=this.state.style.shape;null==mxCellRenderer.defaultShapes[a]&&null==mxStencilRegistry.getStencil(a)&&(a=mxConstants.SHAPE_CONNECTOR);a=Ma[a];return null!=a?a(this.state):null}}else Graph.createHandle=function(){},Graph.handleFactory=
-{};var Na=new mxPoint(1,0),Oa=new mxPoint(1,0),Ga=mxUtils.toRadians(-30),Na=mxUtils.getRotatedPoint(Na,Math.cos(Ga),Math.sin(Ga)),Ga=mxUtils.toRadians(-150),Oa=mxUtils.getRotatedPoint(Oa,Math.cos(Ga),Math.sin(Ga));mxEdgeStyle.IsometricConnector=function(a,c,e,b,d){var g=a.view;b=null!=b&&0<b.length?b[0]:null;var f=a.absolutePoints,l=f[0],f=f[f.length-1];null!=b&&(b=g.transformControlPoint(a,b));null==l&&null!=c&&(l=new mxPoint(c.getCenterX(),c.getCenterY()));null==f&&null!=e&&(f=new mxPoint(e.getCenterX(),
-e.getCenterY()));var k=Na.x,v=Na.y,n=Oa.x,q=Oa.y,u="horizontal"==mxUtils.getValue(a.style,"elbow","horizontal");if(null!=f&&null!=l){a=function(a,c,e){a-=m.x;var b=c-m.y;c=(q*a-n*b)/(k*q-v*n);a=(v*a-k*b)/(v*n-k*q);u?(e&&(m=new mxPoint(m.x+k*c,m.y+v*c),d.push(m)),m=new mxPoint(m.x+n*a,m.y+q*a)):(e&&(m=new mxPoint(m.x+n*a,m.y+q*a),d.push(m)),m=new mxPoint(m.x+k*c,m.y+v*c));d.push(m)};var m=l;null==b&&(b=new mxPoint(l.x+(f.x-l.x)/2,l.y+(f.y-l.y)/2));a(b.x,b.y,!0);a(f.x,f.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",
-mxEdgeStyle.IsometricConnector);var db=Graph.prototype.createEdgeHandler;Graph.prototype.createEdgeHandler=function(a,c){if(c==mxEdgeStyle.IsometricConnector){var e=new mxElbowEdgeHandler(a);e.snapToTerminals=!1;return e}return db.apply(this,arguments)};k.prototype.constraints=[];f.prototype.getConstraints=function(a,c,e){a=[];var b=Math.tan(mxUtils.toRadians(30)),d=(.5-b)/2,b=Math.min(c,e/(.5+b));c=(c-b)/2;e=(e-b)/2;a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,e+.25*b));a.push(new mxConnectionConstraint(new mxPoint(0,
+{};var Na=new mxPoint(1,0),Oa=new mxPoint(1,0),Ga=mxUtils.toRadians(-30),Na=mxUtils.getRotatedPoint(Na,Math.cos(Ga),Math.sin(Ga)),Ga=mxUtils.toRadians(-150),Oa=mxUtils.getRotatedPoint(Oa,Math.cos(Ga),Math.sin(Ga));mxEdgeStyle.IsometricConnector=function(a,c,e,b,d){var k=a.view;b=null!=b&&0<b.length?b[0]:null;var f=a.absolutePoints,g=f[0],f=f[f.length-1];null!=b&&(b=k.transformControlPoint(a,b));null==g&&null!=c&&(g=new mxPoint(c.getCenterX(),c.getCenterY()));null==f&&null!=e&&(f=new mxPoint(e.getCenterX(),
+e.getCenterY()));var l=Na.x,v=Na.y,n=Oa.x,q=Oa.y,u="horizontal"==mxUtils.getValue(a.style,"elbow","horizontal");if(null!=f&&null!=g){a=function(a,c,e){a-=t.x;var b=c-t.y;c=(q*a-n*b)/(l*q-v*n);a=(v*a-l*b)/(v*n-l*q);u?(e&&(t=new mxPoint(t.x+l*c,t.y+v*c),d.push(t)),t=new mxPoint(t.x+n*a,t.y+q*a)):(e&&(t=new mxPoint(t.x+n*a,t.y+q*a),d.push(t)),t=new mxPoint(t.x+l*c,t.y+v*c));d.push(t)};var t=g;null==b&&(b=new mxPoint(g.x+(f.x-g.x)/2,g.y+(f.y-g.y)/2));a(b.x,b.y,!0);a(f.x,f.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",
+mxEdgeStyle.IsometricConnector);var db=Graph.prototype.createEdgeHandler;Graph.prototype.createEdgeHandler=function(a,c){if(c==mxEdgeStyle.IsometricConnector){var e=new mxElbowEdgeHandler(a);e.snapToTerminals=!1;return e}return db.apply(this,arguments)};g.prototype.constraints=[];f.prototype.getConstraints=function(a,c,e){a=[];var b=Math.tan(mxUtils.toRadians(30)),d=(.5-b)/2,b=Math.min(c,e/(.5+b));c=(c-b)/2;e=(e-b)/2;a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,e+.25*b));a.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,c+.5*b,e+b*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c+b,e+.25*b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c+b,e+.75*b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c+.5*b,e+(1-d)*b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,e+.75*b));return a};e.prototype.getConstraints=function(a,c,e){a=[];var b=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.style,"isoAngle",this.isoAngle))))*Math.PI/200,b=Math.min(c*
Math.tan(b),.5*e);a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,b));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,e-b));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,e-b));a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,
-0,b));return a};C.prototype.getConstraints=function(a,c,e){a=[];mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE);var b=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size))));parseFloat(mxUtils.getValue(this.style,"position",this.position));var d=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2))));parseFloat(mxUtils.getValue(this.style,"base",this.base));a.push(new mxConnectionConstraint(new mxPoint(0,
+0,b));return a};D.prototype.getConstraints=function(a,c,e){a=[];mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE);var b=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size))));parseFloat(mxUtils.getValue(this.style,"position",this.position));var d=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2))));parseFloat(mxUtils.getValue(this.style,"base",this.base));a.push(new mxConnectionConstraint(new mxPoint(0,
0),!1));a.push(new mxConnectionConstraint(new mxPoint(.25,0),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));a.push(new mxConnectionConstraint(new mxPoint(.75,0),!1));a.push(new mxConnectionConstraint(new mxPoint(1,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,.5*(e-b)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,e-b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,
e-b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(e-b)));c>=2*b&&a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return a};mxRectangleShape.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!0),new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,
.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(0,1),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0)];mxEllipse.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,
-0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(0,1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(1,.5))];wa.prototype.constraints=mxRectangleShape.prototype.constraints;mxImageShape.prototype.constraints=mxRectangleShape.prototype.constraints;mxSwimlane.prototype.constraints=
+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))];va.prototype.constraints=mxRectangleShape.prototype.constraints;mxImageShape.prototype.constraints=mxRectangleShape.prototype.constraints;mxSwimlane.prototype.constraints=
mxRectangleShape.prototype.constraints;O.prototype.constraints=mxRectangleShape.prototype.constraints;mxLabel.prototype.constraints=mxRectangleShape.prototype.constraints;p.prototype.getConstraints=function(a,c,e){a=[];var b=Math.max(0,Math.min(c,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c-b),0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,
null,c-b,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c-.5*b,.5*b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,.5*(e+b)));a.push(new mxConnectionConstraint(new mxPoint(1,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));c>=2*b&&a.push(new mxConnectionConstraint(new mxPoint(.5,
0),!1));return a};t.prototype.getConstraints=function(a,c,e){a=[];var b=Math.max(0,Math.min(c,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));a.push(new mxConnectionConstraint(new mxPoint(1,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c+b),0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*b,.5*b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,b));a.push(new mxConnectionConstraint(new mxPoint(0,
@@ -2884,14 +2885,14 @@ null,c-b,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c-.5*b,.
"tabWidth",this.tabWidth)))),d=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));"left"==mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?(a.push(new mxConnectionConstraint(new mxPoint(0,0),!1)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*b,0)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,0)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,d)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,
.5*(c+b),d))):(a.push(new mxConnectionConstraint(new mxPoint(1,0),!1)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c-.5*b,0)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c-b,0)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c-b,d)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c-b),d)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,.25*(e-d)+d));a.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,c,.5*(e-d)+d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,.75*(e-d)+d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.25*(e-d)+d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(e-d)+d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.75*(e-d)+d));a.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,0,e));a.push(new mxConnectionConstraint(new mxPoint(.25,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.75,1),!1));return a};ia.prototype.constraints=mxRectangleShape.prototype.constraints;Y.prototype.constraints=mxRectangleShape.prototype.constraints;ya.prototype.constraints=mxEllipse.prototype.constraints;za.prototype.constraints=mxEllipse.prototype.constraints;S.prototype.constraints=mxEllipse.prototype.constraints;Da.prototype.constraints=
-mxEllipse.prototype.constraints;da.prototype.constraints=mxRectangleShape.prototype.constraints;Ca.prototype.constraints=mxRectangleShape.prototype.constraints;Fa.prototype.getConstraints=function(a,c,e){a=[];var b=Math.min(c,e/2),d=Math.min(c-b,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*c);a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,
+0),!1,null,0,e));a.push(new mxConnectionConstraint(new mxPoint(.25,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.75,1),!1));return a};ia.prototype.constraints=mxRectangleShape.prototype.constraints;ea.prototype.constraints=mxRectangleShape.prototype.constraints;xa.prototype.constraints=mxEllipse.prototype.constraints;za.prototype.constraints=mxEllipse.prototype.constraints;S.prototype.constraints=mxEllipse.prototype.constraints;Da.prototype.constraints=
+mxEllipse.prototype.constraints;ca.prototype.constraints=mxRectangleShape.prototype.constraints;Ca.prototype.constraints=mxRectangleShape.prototype.constraints;Fa.prototype.getConstraints=function(a,c,e){a=[];var b=Math.min(c,e/2),d=Math.min(c-b,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*c);a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,
.5*(d+c-b),0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c-b,0));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1,null));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c-b,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d+c-b),e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,e));return a};V.prototype.getConstraints=function(a,c,e){c=parseFloat(mxUtils.getValue(a,"jettyWidth",V.prototype.jettyWidth))/2;a=parseFloat(mxUtils.getValue(a,
"jettyHeight",V.prototype.jettyHeight));var b=[new mxConnectionConstraint(new mxPoint(0,0),!1,null,c),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,c),
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(e-.5*a,1.5*a)),new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,Math.min(e-.5*a,3.5*a))];e>5*a&&b.push(new mxConnectionConstraint(new mxPoint(0,.75),!1,null,c));e>8*a&&b.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null,c));e>15*
a&&b.push(new mxConnectionConstraint(new mxPoint(0,.25),!1,null,c));return b};ua.prototype.constraints=mxRectangleShape.prototype.constraints;ra.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)];D.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)];ca.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0,.7),!0),new mxConnectionConstraint(new mxPoint(1,
+.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)];C.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)];ba.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,.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)];l.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)];A.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,
@@ -2906,27 +2907,27 @@ new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new
0),!1,null,.5*(c+b),.5*(e+d)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c+b),e));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c-b),e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c-b),.5*(e+d)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c-b),d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.25*c-.25*b,d));a.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,0,d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*d));return a};pa.prototype.getConstraints=function(a,c,e){a=[];var b=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),d=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));a.push(new mxConnectionConstraint(new mxPoint(1,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,c,.5*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c+b),d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,.5*(e+d)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*b,e));a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,
-1),!1));return a};R.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)];ba.prototype.getConstraints=
+1),!1));return a};R.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)];aa.prototype.getConstraints=
function(a,c,e){a=[];var b=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth)))),d=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize)))),b=(e-b)/2;a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c-d),b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c-d,0));a.push(new mxConnectionConstraint(new mxPoint(1,
-.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c-d,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c-d),e-b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,e-b));return a};ja.prototype.getConstraints=function(a,c,e){a=[];var b=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",ba.prototype.arrowWidth)))),d=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",ba.prototype.arrowSize)))),b=(e-b)/2;a.push(new mxConnectionConstraint(new mxPoint(0,
-.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*c,b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c-d,0));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c-d,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*c,e-b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,e));return a};xa.prototype.getConstraints=
-function(a,c,e){a=[];var b=Math.min(e,c),d=Math.max(0,Math.min(b,b*parseFloat(mxUtils.getValue(this.style,"size",this.size)))),b=(e-d)/2,g=b+d,f=(c-d)/2,d=f+d;a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,f,.5*b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,f,0));a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,.5*b));a.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,d,b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,f,e-.5*b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,f,e));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,e-.5*b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,g));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c+d),b));a.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,c,b));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,g));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c+d),g));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,f,g));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*f,b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,b));a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,0,g));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*f,g));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,f,b));return a};Q.prototype.constraints=null;qa.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)];va.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.175,.25),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.175,.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7,.9),!1)];ea.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];la.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,
+.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c-d,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c-d),e-b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,e-b));return a};ja.prototype.getConstraints=function(a,c,e){a=[];var b=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",aa.prototype.arrowWidth)))),d=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",aa.prototype.arrowSize)))),b=(e-b)/2;a.push(new mxConnectionConstraint(new mxPoint(0,
+.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*c,b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c-d,0));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c-d,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*c,e-b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,e));return a};wa.prototype.getConstraints=
+function(a,c,e){a=[];var b=Math.min(e,c),d=Math.max(0,Math.min(b,b*parseFloat(mxUtils.getValue(this.style,"size",this.size)))),b=(e-d)/2,k=b+d,f=(c-d)/2,d=f+d;a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,f,.5*b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,f,0));a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,.5*b));a.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,d,b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,f,e-.5*b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,f,e));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,e-.5*b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,k));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c+d),b));a.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,c,b));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,k));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c+d),k));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,f,k));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*f,b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,b));a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,0,k));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*f,k));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,f,b));return a};Q.prototype.constraints=null;qa.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)];ya.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)];da.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];la.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,
.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)]})();function Actions(a){this.editorUi=a;this.actions={};this.init()}
-Actions.prototype.init=function(){function a(a){f.escape();a=f.deleteCells(f.getDeletableCells(f.getSelectionCells()),a);null!=a&&f.setSelectionCells(a)}function b(){if(!f.isSelectionEmpty()){f.getModel().beginUpdate();try{for(var a=f.getSelectionCells(),c=0;c<a.length;c++)f.cellLabelChanged(a[c],"")}finally{f.getModel().endUpdate()}}}var d=this.editorUi,k=d.editor,f=k.graph,m=function(){return Action.prototype.isEnabled.apply(this,arguments)&&f.isEnabled()};this.addAction("new...",function(){f.openLink(d.getUrl())});
+Actions.prototype.init=function(){function a(a){f.escape();a=f.deleteCells(f.getDeletableCells(f.getSelectionCells()),a);null!=a&&f.setSelectionCells(a)}function b(){if(!f.isSelectionEmpty()){f.getModel().beginUpdate();try{for(var a=f.getSelectionCells(),c=0;c<a.length;c++)f.cellLabelChanged(a[c],"")}finally{f.getModel().endUpdate()}}}var d=this.editorUi,g=d.editor,f=g.graph,m=function(){return Action.prototype.isEnabled.apply(this,arguments)&&f.isEnabled()};this.addAction("new...",function(){f.openLink(d.getUrl())});
this.addAction("open...",function(){window.openNew=!0;window.openKey="open";d.openFile()});this.addAction("smartFit",function(){f.popupMenuHandler.hideMenu();var a=f.view.scale,c=f.view.translate.x,b=f.view.translate.y;d.actions.get("resetView").funct();1E-5>Math.abs(a-f.view.scale)&&c==f.view.translate.x&&b==f.view.translate.y&&d.actions.get(f.pageVisible?"fitPage":"fitWindow").funct()});this.addAction("keyPressEnter",function(){f.isEnabled()&&(f.isSelectionEmpty()?d.actions.get("smartFit").funct():
-f.startEditingAtCell())});this.addAction("import...",function(){window.openNew=!1;window.openKey="import";window.openFile=new OpenFile(mxUtils.bind(this,function(){d.hideDialog()}));window.openFile.setConsumer(mxUtils.bind(this,function(a,c){try{var e=mxUtils.parseXml(a);k.graph.setSelectionCells(k.graph.importGraphModel(e.documentElement))}catch(l){mxUtils.alert(mxResources.get("invalidOrMissingFile")+": "+l.message)}}));d.showDialog((new OpenDialog(this)).container,320,220,!0,!0,function(){window.openFile=
+f.startEditingAtCell())});this.addAction("import...",function(){window.openNew=!1;window.openKey="import";window.openFile=new OpenFile(mxUtils.bind(this,function(){d.hideDialog()}));window.openFile.setConsumer(mxUtils.bind(this,function(a,c){try{var e=mxUtils.parseXml(a);g.graph.setSelectionCells(g.graph.importGraphModel(e.documentElement))}catch(l){mxUtils.alert(mxResources.get("invalidOrMissingFile")+": "+l.message)}}));d.showDialog((new OpenDialog(this)).container,320,220,!0,!0,function(){window.openFile=
null})}).isEnabled=m;this.addAction("save",function(){d.saveFile(!1)},null,null,Editor.ctrlKey+"+S").isEnabled=m;this.addAction("saveAs...",function(){d.saveFile(!0)},null,null,Editor.ctrlKey+"+Shift+S").isEnabled=m;this.addAction("export...",function(){d.showDialog((new ExportDialog(d)).container,300,304,!0,!0)});this.addAction("editDiagram...",function(){var a=new EditDiagramDialog(d);d.showDialog(a.container,620,420,!0,!1);a.init()});this.addAction("pageSetup...",function(){d.showDialog((new PageSetupDialog(d)).container,
320,240,!0,!0)}).isEnabled=m;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(f,null,10,10)});this.addAction("undo",function(){d.undo()},null,"sprite-undo",Editor.ctrlKey+"+Z");this.addAction("redo",function(){d.redo()},null,"sprite-redo",mxClient.IS_WIN?Editor.ctrlKey+"+Y":Editor.ctrlKey+"+Shift+Z");this.addAction("cut",function(){var a=null;try{a=d.copyXml(),
-null!=a&&f.removeCells(a,!1)}catch(g){}null==a&&mxClipboard.cut(f)},null,"sprite-cut",Editor.ctrlKey+"+X");this.addAction("copy",function(){try{d.copyXml()}catch(e){}try{mxClipboard.copy(f)}catch(e){d.handleError(e)}},null,"sprite-copy",Editor.ctrlKey+"+C");this.addAction("paste",function(){if(f.isEnabled()&&!f.isCellLocked(f.getDefaultParent())){var a=!1;try{Editor.enableNativeCipboard&&(d.readGraphModelFromClipboard(function(a){if(null!=a){f.getModel().beginUpdate();try{d.pasteXml(a,!0)}finally{f.getModel().endUpdate()}}else mxClipboard.paste(f)}),
-a=!0)}catch(g){}a||mxClipboard.paste(f)}},!1,"sprite-paste",Editor.ctrlKey+"+V");this.addAction("pasteHere",function(a){function c(a){if(null!=a){for(var c=!0,e=0;e<a.length&&c;e++)c=c&&f.model.isEdge(a[e]);var b=f.view.translate,e=f.view.scale,d=b.x,g=b.y,b=null;if(1==a.length&&c){var l=f.getCellGeometry(a[0]);null!=l&&(b=l.getTerminalPoint(!0))}b=null!=b?b:f.getBoundingBoxFromGeometry(a,c);null!=b&&(c=Math.round(f.snap(f.popupMenuHandler.triggerX/e-d)),e=Math.round(f.snap(f.popupMenuHandler.triggerY/
-e-g)),f.cellsMoved(a,c-b.x,e-b.y))}}function e(){f.getModel().beginUpdate();try{c(mxClipboard.paste(f))}finally{f.getModel().endUpdate()}}if(f.isEnabled()&&!f.isCellLocked(f.getDefaultParent())){a=!1;try{Editor.enableNativeCipboard&&(d.readGraphModelFromClipboard(function(a){if(null!=a){f.getModel().beginUpdate();try{c(d.pasteXml(a,!0))}finally{f.getModel().endUpdate()}}else e()}),a=!0)}catch(l){}a||e()}});this.addAction("copySize",function(){var a=f.getSelectionCell();f.isEnabled()&&null!=a&&f.getModel().isVertex(a)&&
+null!=a&&f.removeCells(a,!1)}catch(k){}null==a&&mxClipboard.cut(f)},null,"sprite-cut",Editor.ctrlKey+"+X");this.addAction("copy",function(){try{d.copyXml()}catch(e){}try{mxClipboard.copy(f)}catch(e){d.handleError(e)}},null,"sprite-copy",Editor.ctrlKey+"+C");this.addAction("paste",function(){if(f.isEnabled()&&!f.isCellLocked(f.getDefaultParent())){var a=!1;try{Editor.enableNativeCipboard&&(d.readGraphModelFromClipboard(function(a){if(null!=a){f.getModel().beginUpdate();try{d.pasteXml(a,!0)}finally{f.getModel().endUpdate()}}else mxClipboard.paste(f)}),
+a=!0)}catch(k){}a||mxClipboard.paste(f)}},!1,"sprite-paste",Editor.ctrlKey+"+V");this.addAction("pasteHere",function(a){function c(a){if(null!=a){for(var c=!0,e=0;e<a.length&&c;e++)c=c&&f.model.isEdge(a[e]);var b=f.view.translate,e=f.view.scale,d=b.x,k=b.y,b=null;if(1==a.length&&c){var g=f.getCellGeometry(a[0]);null!=g&&(b=g.getTerminalPoint(!0))}b=null!=b?b:f.getBoundingBoxFromGeometry(a,c);null!=b&&(c=Math.round(f.snap(f.popupMenuHandler.triggerX/e-d)),e=Math.round(f.snap(f.popupMenuHandler.triggerY/
+e-k)),f.cellsMoved(a,c-b.x,e-b.y))}}function e(){f.getModel().beginUpdate();try{c(mxClipboard.paste(f))}finally{f.getModel().endUpdate()}}if(f.isEnabled()&&!f.isCellLocked(f.getDefaultParent())){a=!1;try{Editor.enableNativeCipboard&&(d.readGraphModelFromClipboard(function(a){if(null!=a){f.getModel().beginUpdate();try{c(d.pasteXml(a,!0))}finally{f.getModel().endUpdate()}}else e()}),a=!0)}catch(l){}a||e()}});this.addAction("copySize",function(){var a=f.getSelectionCell();f.isEnabled()&&null!=a&&f.getModel().isVertex(a)&&
(a=f.getCellGeometry(a),null!=a&&(d.copiedSize=new mxRectangle(a.x,a.y,a.width,a.height)))},null,null,"Alt+Shift+X");this.addAction("pasteSize",function(){if(f.isEnabled()&&!f.isSelectionEmpty()&&null!=d.copiedSize){f.getModel().beginUpdate();try{for(var a=f.getResizableCells(f.getSelectionCells()),c=0;c<a.length;c++)if(f.getModel().isVertex(a[c])){var b=f.getCellGeometry(a[c]);null!=b&&(b=b.clone(),b.width=d.copiedSize.width,b.height=d.copiedSize.height,f.getModel().setGeometry(a[c],b))}}finally{f.getModel().endUpdate()}}},
null,null,"Alt+Shift+V");this.addAction("copyData",function(){var a=f.getSelectionCell()||f.getModel().getRoot();f.isEnabled()&&null!=a&&(a=a.cloneValue(),null==a||isNaN(a.nodeType)||(d.copiedValue=a))},null,null,"Alt+Shift+B");this.addAction("pasteData",function(a,c){function b(c,b){var d=e.getValue(c);b=c.cloneValue(b);b.removeAttribute("placeholders");null==d||isNaN(d.nodeType)||b.setAttribute("placeholders",d.getAttribute("placeholders"));null!=a&&mxEvent.isShiftDown(a)||b.setAttribute("label",
-f.convertValueToString(c));e.setValue(c,b)}a=null!=c?c:a;var e=f.getModel();if(f.isEnabled()&&!f.isSelectionEmpty()&&null!=d.copiedValue){e.beginUpdate();try{var g=f.getEditableCells(f.getSelectionCells());if(0==g.length)b(e.getRoot(),d.copiedValue);else for(var k=0;k<g.length;k++)b(g[k],d.copiedValue)}finally{e.endUpdate()}}},null,null,"Alt+Shift+E");this.addAction("delete",function(c,d){c=null!=d?d:c;null!=c&&mxEvent.isShiftDown(c)?b():a(null!=c&&(mxEvent.isControlDown(c)||mxEvent.isMetaDown(c)||
+f.convertValueToString(c));e.setValue(c,b)}a=null!=c?c:a;var e=f.getModel();if(f.isEnabled()&&!f.isSelectionEmpty()&&null!=d.copiedValue){e.beginUpdate();try{var k=f.getEditableCells(f.getSelectionCells());if(0==k.length)b(e.getRoot(),d.copiedValue);else for(var g=0;g<k.length;g++)b(k[g],d.copiedValue)}finally{e.endUpdate()}}},null,null,"Alt+Shift+E");this.addAction("delete",function(c,d){c=null!=d?d:c;null!=c&&mxEvent.isShiftDown(c)?b():a(null!=c&&(mxEvent.isControlDown(c)||mxEvent.isMetaDown(c)||
mxEvent.isAltDown(c)))},null,null,"Delete");this.addAction("deleteAll",function(){a(!0)});this.addAction("deleteLabels",function(){b()},null,null,Editor.ctrlKey+"+Delete");this.addAction("duplicate",function(){try{f.setSelectionCells(f.duplicateCells()),f.scrollCellToVisible(f.getSelectionCell())}catch(e){d.handleError(e)}},null,null,Editor.ctrlKey+"+D");this.put("turn",new Action(mxResources.get("turn")+" / "+mxResources.get("reverse"),function(a,c){a=null!=c?c:a;f.turnShapes(f.getResizableCells(f.getSelectionCells()),
null!=a?mxEvent.isShiftDown(a):!1)},null,null,Editor.ctrlKey+"+R"));this.put("selectConnections",new Action(mxResources.get("selectEdges"),function(a){a=f.getSelectionCell();f.isEnabled()&&null!=a&&f.addSelectionCells(f.getEdges(a))}));this.addAction("selectVertices",function(){f.selectVertices(null,!0)},null,null,Editor.ctrlKey+"+Shift+I");this.addAction("selectEdges",function(){f.selectEdges()},null,null,Editor.ctrlKey+"+Shift+E");this.addAction("selectAll",function(){f.selectAll(null,!0)},null,
null,Editor.ctrlKey+"+A");this.addAction("selectNone",function(){f.clearSelection()},null,null,Editor.ctrlKey+"+Shift+A");this.addAction("lockUnlock",function(){if(!f.isSelectionEmpty()){f.getModel().beginUpdate();try{var a=f.getSelectionCells(),c=f.getCurrentCellStyle(f.getSelectionCell()),b=1==mxUtils.getValue(c,mxConstants.STYLE_EDITABLE,1)?0:1;f.setCellStyles(mxConstants.STYLE_MOVABLE,b,a);f.setCellStyles(mxConstants.STYLE_RESIZABLE,b,a);f.setCellStyles(mxConstants.STYLE_ROTATABLE,b,a);f.setCellStyles(mxConstants.STYLE_DELETABLE,
@@ -2938,11 +2939,11 @@ null,Editor.ctrlKey+"+M");this.addAction("editTooltip...",function(){var a=f.get
c)});d.showDialog(c.container,320,200,!0,!0);c.init()}},null,null,"Alt+Shift+T");this.addAction("openLink",function(){var a=f.getLinkForCell(f.getSelectionCell());null!=a&&f.openLink(a)});this.addAction("editLink...",function(){var a=f.getSelectionCell();if(f.isEnabled()&&null!=a&&f.isCellEditable(a)){var c=f.getLinkForCell(a)||"";d.showLinkDialog(c,mxResources.get("apply"),function(c,b,e){c=mxUtils.trim(c);f.setLinkForCell(a,0<c.length?c:null);f.setAttributeForCell(a,"linkTarget",e)},!0,f.getLinkTargetForCell(a))}},
null,null,"Alt+Shift+L");this.put("insertImage",new Action(mxResources.get("image")+"...",function(){f.isEnabled()&&!f.isCellLocked(f.getDefaultParent())&&(f.clearSelection(),d.actions.get("image").funct())})).isEnabled=m;this.put("insertLink",new Action(mxResources.get("link")+"...",function(){f.isEnabled()&&!f.isCellLocked(f.getDefaultParent())&&d.showLinkDialog("",mxResources.get("insert"),function(a,c,b){a=mxUtils.trim(a);if(0<a.length){var e=null,d=f.getLinkTitle(a);null!=c&&0<c.length&&(e=c[0].iconUrl,
d=c[0].name||c[0].type,d=d.charAt(0).toUpperCase()+d.substring(1),30<d.length&&(d=d.substring(0,30)+"..."));c=new mxCell(d,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;"));c.vertex=!0;e=f.getCenterInsertPoint(f.getBoundingBoxFromGeometry([c],!0));c.geometry.x=e.x;c.geometry.y=e.y;f.setAttributeForCell(c,"linkTarget",b);f.setLinkForCell(c,a);f.cellSizeUpdated(c,
-!0);f.getModel().beginUpdate();try{c=f.addCell(c),f.fireEvent(new mxEventObject("cellsInserted","cells",[c]))}finally{f.getModel().endUpdate()}f.setSelectionCell(c);f.scrollCellToVisible(f.getSelectionCell())}},!0)})).isEnabled=m;this.addAction("link...",mxUtils.bind(this,function(){if(f.isEnabled())if(f.cellEditor.isContentEditing()){var a=f.getSelectedElement(),c=f.getParentByName(a,"A",f.cellEditor.textarea),b="";if(null==c&&null!=a&&null!=a.getElementsByTagName)for(var l=a.getElementsByTagName("a"),
-k=0;k<l.length&&null==c;k++)l[k].textContent==a.textContent&&(c=l[k]);null!=c&&"A"==c.nodeName&&(b=c.getAttribute("href")||"",f.selectNode(c));var u=f.cellEditor.saveSelection();d.showLinkDialog(b,mxResources.get("apply"),mxUtils.bind(this,function(a){f.cellEditor.restoreSelection(u);null!=a&&f.insertLink(a)}))}else f.isSelectionEmpty()?this.get("insertLink").funct():this.get("editLink").funct()})).isEnabled=m;this.addAction("autosize",function(){var a=f.getSelectionCells();if(null!=a){f.getModel().beginUpdate();
-try{for(var c=0;c<a.length;c++){var b=a[c];0<f.getModel().getChildCount(b)?f.updateGroupBounds([b],20):f.updateCellSize(b)}}finally{f.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+Shift+Y");this.addAction("formattedText",function(){f.stopEditing();var a=f.getCommonStyle(f.getSelectionCells()),a="1"==mxUtils.getValue(a,"html","0")?null:"1";f.getModel().beginUpdate();try{for(var c=f.getEditableCells(f.getSelectionCells()),b=0;b<c.length;b++)if(state=f.getView().getState(c[b]),null!=state){var l=
-mxUtils.getValue(state.style,"html","0");if("1"==l&&null==a){var k=f.convertValueToString(state.cell);"0"!=mxUtils.getValue(state.style,"nl2Br","1")&&(k=k.replace(/\n/g,"").replace(/<br\s*.?>/g,"\n"));var u=document.createElement("div");u.innerHTML=f.sanitizeHtml(k);k=mxUtils.extractTextWithWhitespace(u.childNodes);f.cellLabelChanged(state.cell,k);f.setCellStyles("html",a,[c[b]])}else"0"==l&&"1"==a&&(k=mxUtils.htmlEntities(f.convertValueToString(state.cell),!1),"0"!=mxUtils.getValue(state.style,"nl2Br",
-"1")&&(k=k.replace(/\n/g,"<br/>")),f.cellLabelChanged(state.cell,f.sanitizeHtml(k)),f.setCellStyles("html",a,[c[b]]))}d.fireEvent(new mxEventObject("styleChanged","keys",["html"],"values",[null!=a?a:"0"],"cells",c))}finally{f.getModel().endUpdate()}});this.addAction("wordWrap",function(){var a=f.getView().getState(f.getSelectionCell()),c="wrap";f.stopEditing();null!=a&&"wrap"==a.style[mxConstants.STYLE_WHITE_SPACE]&&(c=null);f.setCellStyles(mxConstants.STYLE_WHITE_SPACE,c)});this.addAction("rotation",
+!0);f.getModel().beginUpdate();try{c=f.addCell(c),f.fireEvent(new mxEventObject("cellsInserted","cells",[c]))}finally{f.getModel().endUpdate()}f.setSelectionCell(c);f.scrollCellToVisible(f.getSelectionCell())}},!0)})).isEnabled=m;this.addAction("link...",mxUtils.bind(this,function(){if(f.isEnabled())if(f.cellEditor.isContentEditing()){var a=f.getSelectedElement(),c=f.getParentByName(a,"A",f.cellEditor.textarea),b="";if(null==c&&null!=a&&null!=a.getElementsByTagName)for(var g=a.getElementsByTagName("a"),
+q=0;q<g.length&&null==c;q++)g[q].textContent==a.textContent&&(c=g[q]);null!=c&&"A"==c.nodeName&&(b=c.getAttribute("href")||"",f.selectNode(c));var u=f.cellEditor.saveSelection();d.showLinkDialog(b,mxResources.get("apply"),mxUtils.bind(this,function(a){f.cellEditor.restoreSelection(u);null!=a&&f.insertLink(a)}))}else f.isSelectionEmpty()?this.get("insertLink").funct():this.get("editLink").funct()})).isEnabled=m;this.addAction("autosize",function(){var a=f.getSelectionCells();if(null!=a){f.getModel().beginUpdate();
+try{for(var c=0;c<a.length;c++){var b=a[c];0<f.getModel().getChildCount(b)?f.updateGroupBounds([b],20):f.updateCellSize(b)}}finally{f.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+Shift+Y");this.addAction("formattedText",function(){f.stopEditing();var a=f.getCommonStyle(f.getSelectionCells()),a="1"==mxUtils.getValue(a,"html","0")?null:"1";f.getModel().beginUpdate();try{for(var c=f.getEditableCells(f.getSelectionCells()),b=0;b<c.length;b++)if(state=f.getView().getState(c[b]),null!=state){var g=
+mxUtils.getValue(state.style,"html","0");if("1"==g&&null==a){var q=f.convertValueToString(state.cell);"0"!=mxUtils.getValue(state.style,"nl2Br","1")&&(q=q.replace(/\n/g,"").replace(/<br\s*.?>/g,"\n"));var u=document.createElement("div");u.innerHTML=f.sanitizeHtml(q);q=mxUtils.extractTextWithWhitespace(u.childNodes);f.cellLabelChanged(state.cell,q);f.setCellStyles("html",a,[c[b]])}else"0"==g&&"1"==a&&(q=mxUtils.htmlEntities(f.convertValueToString(state.cell),!1),"0"!=mxUtils.getValue(state.style,"nl2Br",
+"1")&&(q=q.replace(/\n/g,"<br/>")),f.cellLabelChanged(state.cell,f.sanitizeHtml(q)),f.setCellStyles("html",a,[c[b]]))}d.fireEvent(new mxEventObject("styleChanged","keys",["html"],"values",[null!=a?a:"0"],"cells",c))}finally{f.getModel().endUpdate()}});this.addAction("wordWrap",function(){var a=f.getView().getState(f.getSelectionCell()),c="wrap";f.stopEditing();null!=a&&"wrap"==a.style[mxConstants.STYLE_WHITE_SPACE]&&(c=null);f.setCellStyles(mxConstants.STYLE_WHITE_SPACE,c)});this.addAction("rotation",
function(){var a="0",c=f.getView().getState(f.getSelectionCell());null!=c&&(a=c.style[mxConstants.STYLE_ROTATION]||a);a=new FilenameDialog(d,a,mxResources.get("apply"),function(a){null!=a&&0<a.length&&f.setCellStyles(mxConstants.STYLE_ROTATION,a)},mxResources.get("enterValue")+" ("+mxResources.get("rotation")+" 0-360)");d.showDialog(a.container,375,80,!0,!0);a.init()});this.addAction("resetView",function(){f.zoomTo(1);d.resetScrollbars()},null,null,"Enter/Home");this.addAction("zoomIn",function(a){f.isFastZoomEnabled()?
f.lazyZoom(!0,!0,d.buttonZoomDelay):f.zoomIn()},null,null,Editor.ctrlKey+" + (Numpad) / Alt+Mousewheel");this.addAction("zoomOut",function(a){f.isFastZoomEnabled()?f.lazyZoom(!1,!0,d.buttonZoomDelay):f.zoomOut()},null,null,Editor.ctrlKey+" - (Numpad) / Alt+Mousewheel");this.addAction("fitWindow",function(){var a=f.isSelectionEmpty()?f.getGraphBounds():f.getBoundingBox(f.getSelectionCells()),c=f.view.translate,b=f.view.scale;a.x=a.x/b-c.x;a.y=a.y/b-c.y;a.width/=b;a.height/=b;null!=f.backgroundImage&&
a.add(new mxRectangle(0,0,f.backgroundImage.width,f.backgroundImage.height));0==a.width||0==a.height?(f.zoomTo(1),d.resetScrollbars()):(c=Editor.fitWindowBorders,null!=c&&(a.x-=c.x,a.y-=c.y,a.width+=c.width+c.x,a.height+=c.height+c.y),f.fitWindow(a))},null,null,Editor.ctrlKey+"+Shift+H");this.addAction("fitPage",mxUtils.bind(this,function(){f.pageVisible||this.get("pageView").funct();var a=f.pageFormat,c=f.pageScale;f.zoomTo(Math.floor(20*Math.min((f.container.clientWidth-10)/a.width/c,(f.container.clientHeight-
@@ -2966,42 +2967,42 @@ f.getSelectionCells()))}finally{f.getModel().endUpdate()}});this.addAction("shar
b);f.setCellStyles(mxConstants.STYLE_CURVED,null);d.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",[b,"0"],"cells",f.getSelectionCells()))}finally{f.getModel().endUpdate()}}});this.addAction("curved",function(){f.getModel().beginUpdate();try{f.setCellStyles(mxConstants.STYLE_ROUNDED,"0"),f.setCellStyles(mxConstants.STYLE_CURVED,"1"),d.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],
"values",["0","1"],"cells",f.getSelectionCells()))}finally{f.getModel().endUpdate()}});this.addAction("collapsible",function(){var a=f.view.getState(f.getSelectionCell()),c="1";null!=a&&null!=f.getFoldingImage(a)&&(c="0");f.setCellStyles("collapsible",c);d.fireEvent(new mxEventObject("styleChanged","keys",["collapsible"],"values",[c],"cells",f.getSelectionCells()))});this.addAction("editStyle...",mxUtils.bind(this,function(){var a=f.getEditableCells(f.getSelectionCells());if(null!=a&&0<a.length){var c=
f.getModel(),c=new TextareaDialog(this.editorUi,mxResources.get("editStyle")+":",c.getStyle(a[0])||"",function(c){null!=c&&f.setCellStyle(mxUtils.trim(c),a)},null,null,400,220);this.editorUi.showDialog(c.container,420,300,!0,!0);c.init()}}),null,null,Editor.ctrlKey+"+E");this.addAction("setAsDefaultStyle",function(){f.isEnabled()&&!f.isSelectionEmpty()&&d.setDefaultStyle(f.getSelectionCell())},null,null,Editor.ctrlKey+"+Shift+D");this.addAction("clearDefaultStyle",function(){f.isEnabled()&&d.clearDefaultStyle()},
-null,null,Editor.ctrlKey+"+Shift+R");this.addAction("addWaypoint",function(){var a=f.getSelectionCell();if(null!=a&&f.getModel().isEdge(a)){var c=k.graph.selectionCellsHandler.getHandler(a);if(c instanceof mxEdgeHandler){for(var b=f.view.translate,d=f.view.scale,q=b.x,b=b.y,a=f.getModel().getParent(a),u=f.getCellGeometry(a);f.getModel().isVertex(a)&&null!=u;)q+=u.x,b+=u.y,a=f.getModel().getParent(a),u=f.getCellGeometry(a);q=Math.round(f.snap(f.popupMenuHandler.triggerX/d-q));d=Math.round(f.snap(f.popupMenuHandler.triggerY/
-d-b));c.addPointAt(c.state,q,d)}}});this.addAction("removeWaypoint",function(){var a=d.actions.get("removeWaypoint");null!=a.handler&&a.handler.removePoint(a.handler.state,a.index)});this.addAction("clearWaypoints",function(a,c){a=null!=c?c:a;var b=f.getSelectionCells();if(null!=b){b=f.getEditableCells(f.addAllEdges(b));f.getModel().beginUpdate();try{for(var e=0;e<b.length;e++){var d=b[e];if(f.getModel().isEdge(d)){var g=f.getCellGeometry(d);mxEvent.isShiftDown(a)?(f.setCellStyles(mxConstants.STYLE_EXIT_X,
-null,[d]),f.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[d]),f.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[d]),f.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[d])):null!=g&&(g=g.clone(),g.points=null,g.x=0,g.y=0,g.offset=null,f.getModel().setGeometry(d,g))}}}finally{f.getModel().endUpdate()}}},null,null,"Alt+Shift+C");p=this.addAction("subscript",mxUtils.bind(this,function(){f.cellEditor.isContentEditing()&&document.execCommand("subscript",!1,null)}),null,null,Editor.ctrlKey+"+,");p=this.addAction("superscript",
-mxUtils.bind(this,function(){f.cellEditor.isContentEditing()&&document.execCommand("superscript",!1,null)}),null,null,Editor.ctrlKey+"+.");this.addAction("image...",function(){if(f.isEnabled()&&!f.isCellLocked(f.getDefaultParent())){var a=mxResources.get("image")+" ("+mxResources.get("url")+"):",c=f.getView().getState(f.getSelectionCell()),b="";null!=c&&(b=c.style[mxConstants.STYLE_IMAGE]||b);var k=f.cellEditor.saveSelection();d.showImageDialog(a,b,function(a,c,b){if(f.cellEditor.isContentEditing())f.cellEditor.restoreSelection(k),
-f.insertImage(a,c,b);else{var e=f.getSelectionCells();if(null!=a&&(0<a.length||0<e.length)){var d=null;f.getModel().beginUpdate();try{if(0==e.length){var e=[f.insertVertex(f.getDefaultParent(),null,"",0,0,c,b,"shape=image;imageAspect=0;aspect=fixed;verticalLabelPosition=bottom;verticalAlign=top;")],g=f.getCenterInsertPoint(f.getBoundingBoxFromGeometry(e,!0));e[0].geometry.x=g.x;e[0].geometry.y=g.y;d=e;f.fireEvent(new mxEventObject("cellsInserted","cells",d))}f.setCellStyles(mxConstants.STYLE_IMAGE,
+null,null,Editor.ctrlKey+"+Shift+R");this.addAction("addWaypoint",function(){var a=f.getSelectionCell();if(null!=a&&f.getModel().isEdge(a)){var c=g.graph.selectionCellsHandler.getHandler(a);if(c instanceof mxEdgeHandler){for(var b=f.view.translate,d=f.view.scale,q=b.x,b=b.y,a=f.getModel().getParent(a),u=f.getCellGeometry(a);f.getModel().isVertex(a)&&null!=u;)q+=u.x,b+=u.y,a=f.getModel().getParent(a),u=f.getCellGeometry(a);q=Math.round(f.snap(f.popupMenuHandler.triggerX/d-q));d=Math.round(f.snap(f.popupMenuHandler.triggerY/
+d-b));c.addPointAt(c.state,q,d)}}});this.addAction("removeWaypoint",function(){var a=d.actions.get("removeWaypoint");null!=a.handler&&a.handler.removePoint(a.handler.state,a.index)});this.addAction("clearWaypoints",function(a,c){a=null!=c?c:a;var b=f.getSelectionCells();if(null!=b){b=f.getEditableCells(f.addAllEdges(b));f.getModel().beginUpdate();try{for(var e=0;e<b.length;e++){var d=b[e];if(f.getModel().isEdge(d)){var k=f.getCellGeometry(d);mxEvent.isShiftDown(a)?(f.setCellStyles(mxConstants.STYLE_EXIT_X,
+null,[d]),f.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[d]),f.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[d]),f.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[d])):null!=k&&(k=k.clone(),k.points=null,k.x=0,k.y=0,k.offset=null,f.getModel().setGeometry(d,k))}}}finally{f.getModel().endUpdate()}}},null,null,"Alt+Shift+C");p=this.addAction("subscript",mxUtils.bind(this,function(){f.cellEditor.isContentEditing()&&document.execCommand("subscript",!1,null)}),null,null,Editor.ctrlKey+"+,");p=this.addAction("superscript",
+mxUtils.bind(this,function(){f.cellEditor.isContentEditing()&&document.execCommand("superscript",!1,null)}),null,null,Editor.ctrlKey+"+.");this.addAction("image...",function(){if(f.isEnabled()&&!f.isCellLocked(f.getDefaultParent())){var a=mxResources.get("image")+" ("+mxResources.get("url")+"):",c=f.getView().getState(f.getSelectionCell()),b="";null!=c&&(b=c.style[mxConstants.STYLE_IMAGE]||b);var g=f.cellEditor.saveSelection();d.showImageDialog(a,b,function(a,c,b){if(f.cellEditor.isContentEditing())f.cellEditor.restoreSelection(g),
+f.insertImage(a,c,b);else{var e=f.getSelectionCells();if(null!=a&&(0<a.length||0<e.length)){var d=null;f.getModel().beginUpdate();try{if(0==e.length){var e=[f.insertVertex(f.getDefaultParent(),null,"",0,0,c,b,"shape=image;imageAspect=0;aspect=fixed;verticalLabelPosition=bottom;verticalAlign=top;")],k=f.getCenterInsertPoint(f.getBoundingBoxFromGeometry(e,!0));e[0].geometry.x=k.x;e[0].geometry.y=k.y;d=e;f.fireEvent(new mxEventObject("cellsInserted","cells",d))}f.setCellStyles(mxConstants.STYLE_IMAGE,
0<a.length?a:null,e);var l=f.getCurrentCellStyle(e[0]);"image"!=l[mxConstants.STYLE_SHAPE]&&"label"!=l[mxConstants.STYLE_SHAPE]?f.setCellStyles(mxConstants.STYLE_SHAPE,"image",e):0==a.length&&f.setCellStyles(mxConstants.STYLE_SHAPE,null,e);if(1==f.getSelectionCount()&&null!=c&&null!=b){var n=e[0],q=f.getModel().getGeometry(n);null!=q&&(q=q.clone(),q.width=c,q.height=b,f.getModel().setGeometry(n,q))}}finally{f.getModel().endUpdate()}null!=d&&(f.setSelectionCells(d),f.scrollCellToVisible(d[0]))}}},
f.cellEditor.isContentEditing(),!f.cellEditor.isContentEditing())}}).isEnabled=m;p=this.addAction("layers",mxUtils.bind(this,function(){null==this.layersWindow?(this.layersWindow=new LayersWindow(d,document.body.offsetWidth-280,120,220,196),this.layersWindow.window.addListener("show",function(){d.fireEvent(new mxEventObject("layers"))}),this.layersWindow.window.addListener("hide",function(){d.fireEvent(new mxEventObject("layers"))}),this.layersWindow.window.setVisible(!0),d.fireEvent(new mxEventObject("layers")),
this.layersWindow.init()):this.layersWindow.window.setVisible(!this.layersWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+Shift+L");p.setToggleAction(!0);p.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.layersWindow&&this.layersWindow.window.isVisible()}));p=this.addAction("formatPanel",mxUtils.bind(this,function(){d.toggleFormatPanel()}),null,null,Editor.ctrlKey+"+Shift+P");p.setToggleAction(!0);p.setSelectedCallback(mxUtils.bind(this,function(){return 0<d.formatWidth}));
p=this.addAction("outline",mxUtils.bind(this,function(){null==this.outlineWindow?(this.outlineWindow=new OutlineWindow(d,document.body.offsetWidth-260,100,180,180),this.outlineWindow.window.addListener("show",function(){d.fireEvent(new mxEventObject("outline"))}),this.outlineWindow.window.addListener("hide",function(){d.fireEvent(new mxEventObject("outline"))}),this.outlineWindow.window.setVisible(!0),d.fireEvent(new mxEventObject("outline"))):this.outlineWindow.window.setVisible(!this.outlineWindow.window.isVisible())}),
-null,null,Editor.ctrlKey+"+Shift+O");p.setToggleAction(!0);p.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.outlineWindow&&this.outlineWindow.window.isVisible()}))};Actions.prototype.addAction=function(a,b,d,k,f){var m;"..."==a.substring(a.length-3)?(a=a.substring(0,a.length-3),m=mxResources.get(a)+"..."):m=mxResources.get(a);return this.put(a,new Action(m,b,d,k,f))};Actions.prototype.put=function(a,b){return this.actions[a]=b};Actions.prototype.get=function(a){return this.actions[a]};
-function Action(a,b,d,k,f){mxEventSource.call(this);this.label=a;this.funct=this.createFunction(b);this.enabled=null!=d?d:!0;this.iconCls=k;this.shortcut=f;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};
+null,null,Editor.ctrlKey+"+Shift+O");p.setToggleAction(!0);p.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.outlineWindow&&this.outlineWindow.window.isVisible()}))};Actions.prototype.addAction=function(a,b,d,g,f){var m;"..."==a.substring(a.length-3)?(a=a.substring(0,a.length-3),m=mxResources.get(a)+"..."):m=mxResources.get(a);return this.put(a,new Action(m,b,d,g,f))};Actions.prototype.put=function(a,b){return this.actions[a]=b};Actions.prototype.get=function(a){return this.actions[a]};
+function Action(a,b,d,g,f){mxEventSource.call(this);this.label=a;this.funct=this.createFunction(b);this.enabled=null!=d?d:!0;this.iconCls=g;this.shortcut=f;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()};DrawioFile=function(a,b){mxEventSource.call(this);this.ui=a;this.shadowData=this.data=b||"";this.shadowPages=null;this.created=(new Date).getTime();this.stats={opened:0,merged:0,fileMerged:0,fileReloaded:0,conflicts:0,timeouts:0,saved:0,closed:0,destroyed:0,joined:0,checksumErrors:0,bytesSent:0,bytesReceived:0,msgSent:0,msgReceived:0,cacheHits:0,cacheMiss:0,cacheFail:0}};DrawioFile.SYNC=urlParams.sync||"auto";DrawioFile.LAST_WRITE_WINS=!0;mxUtils.extend(DrawioFile,mxEventSource);
DrawioFile.prototype.allChangesSavedKey="allChangesSaved";DrawioFile.prototype.savingSpinnerKey="saving";DrawioFile.prototype.savingStatusKey="saving";DrawioFile.prototype.autosaveDelay=1500;DrawioFile.prototype.maxAutosaveDelay=3E4;DrawioFile.prototype.optimisticSyncDelay=300;DrawioFile.prototype.autosaveThread=null;DrawioFile.prototype.lastAutosave=null;DrawioFile.prototype.lastSaved=null;DrawioFile.prototype.lastChanged=null;DrawioFile.prototype.opened=null;DrawioFile.prototype.modified=!1;
DrawioFile.prototype.shadowModified=!1;DrawioFile.prototype.data=null;DrawioFile.prototype.shadowData=null;DrawioFile.prototype.shadowPages=null;DrawioFile.prototype.changeListenerEnabled=!0;DrawioFile.prototype.lastAutosaveRevision=null;DrawioFile.prototype.maxAutosaveRevisionDelay=3E5;DrawioFile.prototype.inConflictState=!1;DrawioFile.prototype.invalidChecksum=!1;DrawioFile.prototype.errorReportsEnabled=!1;DrawioFile.prototype.ageStart=null;
DrawioFile.prototype.getSize=function(){return null!=this.data?this.data.length:0};DrawioFile.prototype.synchronizeFile=function(a,b){this.savingFile?null!=b&&b({message:mxResources.get("busy")}):null!=this.sync?this.sync.fileChanged(a,b):this.updateFile(a,b)};
-DrawioFile.prototype.updateFile=function(a,b,d,k){null!=d&&d()||(this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=b&&b():this.getLatestVersion(mxUtils.bind(this,function(f){try{null!=d&&d()||(this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=b&&b():null!=f?this.mergeFile(f,a,b,k):this.reloadFile(a,b))}catch(m){null!=b&&b(m)}}),b))};
-DrawioFile.prototype.mergeFile=function(a,b,d,k){var f=!0;try{this.stats.fileMerged++;var m=null!=this.shadowPages?this.shadowPages:this.ui.getPagesForNode(mxUtils.parseXml(this.shadowData).documentElement),p=this.ui.getPagesForNode(mxUtils.parseXml(a.data).documentElement);if(null!=p&&0<p.length){this.shadowPages=p;this.backupPatch=this.isModified()?this.ui.diffPages(m,this.ui.pages):null;var c=[this.ui.diffPages(null!=k?k:m,this.shadowPages)];if(!this.ignorePatches(c)){var e=this.ui.patchPages(m,
-c[0]);k={};var g=this.ui.getHashValueForPages(e,k),m={},n=this.ui.getHashValueForPages(this.shadowPages,m);"1"==urlParams.test&&EditorUi.debug("File.mergeFile",[this],"backup",this.backupPatch,"patches",c,"checksum",n==g,g);if(null!=g&&g!=n){var l=this.compressReportData(this.getAnonymizedXmlForPages(p)),q=this.compressReportData(this.getAnonymizedXmlForPages(e)),u=this.ui.hashValue(a.getCurrentEtag()),t=this.ui.hashValue(this.getCurrentEtag());this.checksumError(d,c,"Shadow Details: "+JSON.stringify(k)+
-"\nChecksum: "+g+"\nCurrent: "+n+"\nCurrent Details: "+JSON.stringify(m)+"\nFrom: "+u+"\nTo: "+t+"\n\nFile Data:\n"+l+"\nPatched Shadow:\n"+q,null,"mergeFile");return}this.patch(c,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null)}}else throw f=!1,Error(mxResources.get("notADiagramFile"));this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(a.getDescriptor());this.descriptorChanged();this.backupPatch=null;null!=b&&b()}catch(G){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();
+DrawioFile.prototype.updateFile=function(a,b,d,g){null!=d&&d()||(this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=b&&b():this.getLatestVersion(mxUtils.bind(this,function(f){try{null!=d&&d()||(this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=b&&b():null!=f?this.mergeFile(f,a,b,g):this.reloadFile(a,b))}catch(m){null!=b&&b(m)}}),b))};
+DrawioFile.prototype.mergeFile=function(a,b,d,g){var f=!0;try{this.stats.fileMerged++;var m=null!=this.shadowPages?this.shadowPages:this.ui.getPagesForNode(mxUtils.parseXml(this.shadowData).documentElement),p=this.ui.getPagesForNode(mxUtils.parseXml(a.data).documentElement);if(null!=p&&0<p.length){this.shadowPages=p;this.backupPatch=this.isModified()?this.ui.diffPages(m,this.ui.pages):null;var c=[this.ui.diffPages(null!=g?g:m,this.shadowPages)];if(!this.ignorePatches(c)){var e=this.ui.patchPages(m,
+c[0]);g={};var k=this.ui.getHashValueForPages(e,g),m={},n=this.ui.getHashValueForPages(this.shadowPages,m);"1"==urlParams.test&&EditorUi.debug("File.mergeFile",[this],"backup",this.backupPatch,"patches",c,"checksum",n==k,k);if(null!=k&&k!=n){var l=this.compressReportData(this.getAnonymizedXmlForPages(p)),q=this.compressReportData(this.getAnonymizedXmlForPages(e)),u=this.ui.hashValue(a.getCurrentEtag()),t=this.ui.hashValue(this.getCurrentEtag());this.checksumError(d,c,"Shadow Details: "+JSON.stringify(g)+
+"\nChecksum: "+k+"\nCurrent: "+n+"\nCurrent Details: "+JSON.stringify(m)+"\nFrom: "+u+"\nTo: "+t+"\n\nFile Data:\n"+l+"\nPatched Shadow:\n"+q,null,"mergeFile");return}this.patch(c,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null)}}else throw f=!1,Error(mxResources.get("notADiagramFile"));this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(a.getDescriptor());this.descriptorChanged();this.backupPatch=null;null!=b&&b()}catch(G){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();
null!=d&&d(G);try{if(f)if(this.errorReportsEnabled)this.sendErrorReport("Error in mergeFile",null,G);else{var A=this.getCurrentUser(),x=null!=A?A.id:"unknown";EditorUi.logError("Error in mergeFile",null,this.getMode()+"."+this.getId(),x,G)}}catch(z){}}};
-DrawioFile.prototype.getAnonymizedXmlForPages=function(a){var b=new mxCodec(mxUtils.createXmlDocument()),d=b.document.createElement("mxfile");if(null!=a)for(var k=0;k<a.length;k++){var f=b.encode(new mxGraphModel(a[k].root));"1"!=urlParams.dev&&(f=this.ui.anonymizeNode(f,!0));f.setAttribute("id",a[k].getId());a[k].viewState&&this.ui.editor.graph.saveViewState(a[k].viewState,f,!0);d.appendChild(f)}return mxUtils.getPrettyXml(d)};
+DrawioFile.prototype.getAnonymizedXmlForPages=function(a){var b=new mxCodec(mxUtils.createXmlDocument()),d=b.document.createElement("mxfile");if(null!=a)for(var g=0;g<a.length;g++){var f=b.encode(new mxGraphModel(a[g].root));"1"!=urlParams.dev&&(f=this.ui.anonymizeNode(f,!0));f.setAttribute("id",a[g].getId());a[g].viewState&&this.ui.editor.graph.saveViewState(a[g].viewState,f,!0);d.appendChild(f)}return mxUtils.getPrettyXml(d)};
DrawioFile.prototype.compressReportData=function(a,b,d){b=null!=b?b:1E4;null!=d&&null!=a&&a.length>d?a=a.substring(0,d)+"[...]":null!=a&&a.length>b&&(a=Graph.compress(a)+"\n");return a};
-DrawioFile.prototype.checksumError=function(a,b,d,k,f){this.stats.checksumErrors++;this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=this.sync&&this.sync.updateOnlineState();null!=a&&a();try{if(this.errorReportsEnabled){if(null!=b)for(a=0;a<b.length;a++)this.ui.anonymizePatch(b[a]);var m=mxUtils.bind(this,function(a){var c=this.compressReportData(JSON.stringify(b,null,2));a=null!=a?this.compressReportData(this.getAnonymizedXmlForPages(this.ui.getPagesForNode(mxUtils.parseXml(a.data).documentElement)),
-25E3):"n/a";this.sendErrorReport("Checksum Error in "+f+" "+this.getHash(),(null!=d?d:"")+"\n\nPatches:\n"+c+(null!=a?"\n\nRemote:\n"+a:""),null,7E4)});null==k?m(null):this.getLatestVersion(mxUtils.bind(this,function(a){null!=a&&a.getCurrentEtag()==k?m(a):m(null)}),function(){})}else{var p=this.getCurrentUser(),c=null!=p?p.id:"unknown";EditorUi.logError("Checksum Error in "+f+" "+this.getId(),null,this.getMode()+"."+this.getId(),"user_"+c+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync"));
+DrawioFile.prototype.checksumError=function(a,b,d,g,f){this.stats.checksumErrors++;this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=this.sync&&this.sync.updateOnlineState();null!=a&&a();try{if(this.errorReportsEnabled){if(null!=b)for(a=0;a<b.length;a++)this.ui.anonymizePatch(b[a]);var m=mxUtils.bind(this,function(a){var c=this.compressReportData(JSON.stringify(b,null,2));a=null!=a?this.compressReportData(this.getAnonymizedXmlForPages(this.ui.getPagesForNode(mxUtils.parseXml(a.data).documentElement)),
+25E3):"n/a";this.sendErrorReport("Checksum Error in "+f+" "+this.getHash(),(null!=d?d:"")+"\n\nPatches:\n"+c+(null!=a?"\n\nRemote:\n"+a:""),null,7E4)});null==g?m(null):this.getLatestVersion(mxUtils.bind(this,function(a){null!=a&&a.getCurrentEtag()==g?m(a):m(null)}),function(){})}else{var p=this.getCurrentUser(),c=null!=p?p.id:"unknown";EditorUi.logError("Checksum Error in "+f+" "+this.getId(),null,this.getMode()+"."+this.getId(),"user_"+c+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync"));
try{EditorUi.logEvent({category:"CHECKSUM-ERROR-SYNC-FILE-"+this.getHash(),action:f,label:"user_"+c+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")})}catch(e){}}}catch(e){}};
-DrawioFile.prototype.sendErrorReport=function(a,b,d,k){try{var f=this.compressReportData(this.getAnonymizedXmlForPages(this.shadowPages),25E3),m=this.compressReportData(this.getAnonymizedXmlForPages(this.ui.pages),25E3),p=this.getCurrentUser(),c=null!=p?this.ui.hashValue(p.id):"unknown",e=null!=this.sync?"-client_"+this.sync.clientId:"-nosync",g=this.getTitle(),n=g.lastIndexOf("."),p="xml";0<n&&(p=g.substring(n));var l=null!=d?d.stack:Error().stack;EditorUi.sendReport(a+" "+(new Date).toISOString()+
+DrawioFile.prototype.sendErrorReport=function(a,b,d,g){try{var f=this.compressReportData(this.getAnonymizedXmlForPages(this.shadowPages),25E3),m=this.compressReportData(this.getAnonymizedXmlForPages(this.ui.pages),25E3),p=this.getCurrentUser(),c=null!=p?this.ui.hashValue(p.id):"unknown",e=null!=this.sync?"-client_"+this.sync.clientId:"-nosync",k=this.getTitle(),n=k.lastIndexOf("."),p="xml";0<n&&(p=k.substring(n));var l=null!=d?d.stack:Error().stack;EditorUi.sendReport(a+" "+(new Date).toISOString()+
":\n\nAppVersion="+navigator.appVersion+"\nFile="+this.ui.hashValue(this.getId())+" ("+this.getMode()+")"+(this.isModified()?" modified":"")+"\nSize/Type="+this.getSize()+" ("+p+")\nUser="+c+e+"\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!=b?"\n\n"+b:
-"")+(null!=d?"\n\nError: "+d.message:"")+"\n\nStack:\n"+l+"\n\nShadow:\n"+f+"\n\nData:\n"+m,k)}catch(q){}};
+"")+(null!=d?"\n\nError: "+d.message:"")+"\n\nStack:\n"+l+"\n\nShadow:\n"+f+"\n\nData:\n"+m,g)}catch(q){}};
DrawioFile.prototype.reloadFile=function(a,b){try{this.ui.spinner.stop();var d=mxUtils.bind(this,function(){this.stats.fileReloaded++;var b=this.ui.editor.graph.getViewState(),d=this.ui.editor.graph.getSelectionCells(),m=this.ui.currentPage;this.ui.loadFile(this.getHash(),!0,null,mxUtils.bind(this,function(){if(null==this.ui.fileLoadedError){this.ui.restoreViewState(m,b,d);null!=this.backupPatch&&this.patch([this.backupPatch]);var f=this.ui.getCurrentFile();null!=f&&(f.stats=this.stats);null!=a&&
-a()}}),!0)});this.isModified()&&null==this.backupPatch?this.ui.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){this.handleFileSuccess("manual"==DrawioFile.SYNC)}),d,mxResources.get("cancel"),mxResources.get("discardChanges")):d()}catch(k){null!=b&&b(k)}};DrawioFile.prototype.copyFile=function(a,b){this.ui.editor.editAsNew(this.ui.getFileData(!0),this.ui.getCopyFilename(this))};
+a()}}),!0)});this.isModified()&&null==this.backupPatch?this.ui.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){this.handleFileSuccess("manual"==DrawioFile.SYNC)}),d,mxResources.get("cancel"),mxResources.get("discardChanges")):d()}catch(g){null!=b&&b(g)}};DrawioFile.prototype.copyFile=function(a,b){this.ui.editor.editAsNew(this.ui.getFileData(!0),this.ui.getCopyFilename(this))};
DrawioFile.prototype.ignorePatches=function(a){for(var b=!0,d=0;d<a.length&&b;d++)b=b&&0==Object.keys(a[d]).length;return b};
-DrawioFile.prototype.patch=function(a,b,d){var k=this.ui.editor.undoManager,f=k.history.slice(),m=k.indexOfNextAdd,p=this.ui.editor.graph;p.container.style.visibility="hidden";var c=this.changeListenerEnabled;this.changeListenerEnabled=d;var e=p.foldingEnabled,g=p.mathEnabled,n=p.cellRenderer.redraw;p.cellRenderer.redraw=function(a){a.view.graph.isEditing(a.cell)&&(a.view.graph.scrollCellToVisible(a.cell),a.view.graph.cellEditor.resize());n.apply(this,arguments)};p.model.beginUpdate();try{for(var l=
-0;l<a.length;l++)this.ui.pages=this.ui.patchPages(this.ui.pages,a[l],!0,b,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{p.container.style.visibility="";p.model.endUpdate();p.cellRenderer.redraw=n;this.changeListenerEnabled=c;d||(k.history=f,k.indexOfNextAdd=m,k.fireEvent(new mxEventObject(mxEvent.CLEAR)));if(null==this.ui.currentPage||this.ui.currentPage.needsUpdate)g!=
+DrawioFile.prototype.patch=function(a,b,d){var g=this.ui.editor.undoManager,f=g.history.slice(),m=g.indexOfNextAdd,p=this.ui.editor.graph;p.container.style.visibility="hidden";var c=this.changeListenerEnabled;this.changeListenerEnabled=d;var e=p.foldingEnabled,k=p.mathEnabled,n=p.cellRenderer.redraw;p.cellRenderer.redraw=function(a){a.view.graph.isEditing(a.cell)&&(a.view.graph.scrollCellToVisible(a.cell),a.view.graph.cellEditor.resize());n.apply(this,arguments)};p.model.beginUpdate();try{for(var l=
+0;l<a.length;l++)this.ui.pages=this.ui.patchPages(this.ui.pages,a[l],!0,b,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{p.container.style.visibility="";p.model.endUpdate();p.cellRenderer.redraw=n;this.changeListenerEnabled=c;d||(g.history=f,g.indexOfNextAdd=m,g.fireEvent(new mxEventObject(mxEvent.CLEAR)));if(null==this.ui.currentPage||this.ui.currentPage.needsUpdate)k!=
p.mathEnabled?(this.ui.editor.updateGraphComponents(),p.refresh()):(e!=p.foldingEnabled?p.view.revalidate():p.view.validate(),p.sizeDidChange());this.ui.updateTabContainer();this.ui.editor.fireEvent(new mxEventObject("pagesPatched","patches",a))}};
-DrawioFile.prototype.save=function(a,b,d,k,f,m){try{if(this.isEditable())if(!f&&this.invalidChecksum)if(null!=d)d({message:mxResources.get("checksum")});else throw Error(mxResources.get("checksum"));else this.updateFileData(),this.clearAutosave(),null!=b&&b();else if(null!=d)d({message:mxResources.get("readOnly")});else throw Error(mxResources.get("readOnly"));}catch(p){if(null!=d)d(p);else throw p;}};
-DrawioFile.prototype.updateFileData=function(){this.setData(this.ui.getFileData(null,null,null,null,null,null,null,null,this,!this.isCompressed()))};DrawioFile.prototype.isCompressedStorage=function(){return!0};DrawioFile.prototype.isCompressed=function(){var a=null!=this.ui.fileNode?this.ui.fileNode.getAttribute("compressed"):null;return null!=a?"false"!=a:this.isCompressedStorage()&&Editor.compressXml};DrawioFile.prototype.saveAs=function(a,b,d){};DrawioFile.prototype.saveFile=function(a,b,d,k){};
+DrawioFile.prototype.save=function(a,b,d,g,f,m){try{if(this.isEditable())if(!f&&this.invalidChecksum)if(null!=d)d({message:mxResources.get("checksum")});else throw Error(mxResources.get("checksum"));else this.updateFileData(),this.clearAutosave(),null!=b&&b();else if(null!=d)d({message:mxResources.get("readOnly")});else throw Error(mxResources.get("readOnly"));}catch(p){if(null!=d)d(p);else throw p;}};
+DrawioFile.prototype.updateFileData=function(){this.setData(this.ui.getFileData(null,null,null,null,null,null,null,null,this,!this.isCompressed()))};DrawioFile.prototype.isCompressedStorage=function(){return!0};DrawioFile.prototype.isCompressed=function(){var a=null!=this.ui.fileNode?this.ui.fileNode.getAttribute("compressed"):null;return null!=a?"false"!=a:this.isCompressedStorage()&&Editor.compressXml};DrawioFile.prototype.saveAs=function(a,b,d){};DrawioFile.prototype.saveFile=function(a,b,d,g){};
DrawioFile.prototype.getPublicUrl=function(a){a(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(a){this.shadowModified=a};DrawioFile.prototype.setModified=function(a){this.shadowModified=this.modified=a};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(a,b,d){};DrawioFile.prototype.isMovable=function(){return!1};DrawioFile.prototype.isTrashed=function(){return!1};DrawioFile.prototype.move=function(a,b,d){};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(a){this.data=a};DrawioFile.prototype.getData=function(){return this.data};
@@ -3026,32 +3027,32 @@ DrawioFile.prototype.showRefreshDialog=function(a,b,d){null==d&&(d=mxResources.g
b)}),null,mxResources.get("synchronize"),mxUtils.bind(this,function(){this.reloadFile(a,b)}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.ui.hideDialog()}),360,150))};
DrawioFile.prototype.showCopyDialog=function(a,b,d){this.invalidChecksum=this.inConflictState=!1;this.addUnsavedStatus();this.ui.showError(mxResources.get("externalChanges"),mxResources.get("fileChangedOverwriteDialog"),mxResources.get("makeCopy"),mxUtils.bind(this,function(){this.copyFile(a,b)}),null,mxResources.get("overwrite"),d,mxResources.get("cancel"),mxUtils.bind(this,function(){this.ui.hideDialog()}),360,150)};
DrawioFile.prototype.showConflictDialog=function(a,b){this.ui.showError(mxResources.get("externalChanges"),mxResources.get("fileChangedSyncDialog"),mxResources.get("overwrite"),a,null,mxResources.get("synchronize"),b,mxResources.get("cancel"),mxUtils.bind(this,function(){this.ui.hideDialog();this.handleFileError(null,!1)}),340,150)};
-DrawioFile.prototype.redirectToNewApp=function(a,b){this.ui.spinner.stop();if(!this.redirectDialogShowing){this.redirectDialogShowing=!0;var d=window.location.protocol+"//"+window.location.host+"/"+this.ui.getSearch("create title mode url drive splash state".split(" "))+"#"+this.getHash(),k=mxResources.get("redirectToNewApp");null!=b&&(k+=" ("+b+")");var f=mxUtils.bind(this,function(){var b=mxUtils.bind(this,function(){this.redirectDialogShowing=!1;window.location.href==d?window.location.reload():
-window.location.href=d});null==a&&this.isModified()?this.ui.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){this.redirectDialogShowing=!1}),b,mxResources.get("cancel"),mxResources.get("discardChanges")):b()});null!=a?this.isModified()?this.ui.confirm(k,mxUtils.bind(this,function(){this.redirectDialogShowing=!1;a()}),f,mxResources.get("cancel"),mxResources.get("discardChanges")):this.ui.confirm(k,f,mxUtils.bind(this,function(){this.redirectDialogShowing=!1;a()})):this.ui.alert(mxResources.get("redirectToNewApp"),
+DrawioFile.prototype.redirectToNewApp=function(a,b){this.ui.spinner.stop();if(!this.redirectDialogShowing){this.redirectDialogShowing=!0;var d=window.location.protocol+"//"+window.location.host+"/"+this.ui.getSearch("create title mode url drive splash state".split(" "))+"#"+this.getHash(),g=mxResources.get("redirectToNewApp");null!=b&&(g+=" ("+b+")");var f=mxUtils.bind(this,function(){var b=mxUtils.bind(this,function(){this.redirectDialogShowing=!1;window.location.href==d?window.location.reload():
+window.location.href=d});null==a&&this.isModified()?this.ui.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){this.redirectDialogShowing=!1}),b,mxResources.get("cancel"),mxResources.get("discardChanges")):b()});null!=a?this.isModified()?this.ui.confirm(g,mxUtils.bind(this,function(){this.redirectDialogShowing=!1;a()}),f,mxResources.get("cancel"),mxResources.get("discardChanges")):this.ui.confirm(g,f,mxUtils.bind(this,function(){this.redirectDialogShowing=!1;a()})):this.ui.alert(mxResources.get("redirectToNewApp"),
f)}};DrawioFile.prototype.handleFileSuccess=function(a){this.ui.spinner.stop();this.ui.getCurrentFile()==this&&(this.isModified()?this.fileChanged():a?(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(a,b){this.ui.spinner.stop();if(this.ui.getCurrentFile()==this)if(this.inConflictState)this.handleConflictError(a,b);else if(this.isModified()&&this.addUnsavedStatus(a),b)this.ui.handleError(a,null!=a?mxResources.get("errorSavingFile"):null);else if(!this.isModified()){var d=this.getErrorMessage(a);null!=d&&60<d.length&&(d=d.substring(0,60)+"...");this.ui.editor.setStatus('<div class="geStatusAlert" style="cursor:pointer;overflow:hidden;">'+mxUtils.htmlEntities(mxResources.get("error"))+
(null!=d?" ("+mxUtils.htmlEntities(d)+")":"")+"</div>")}};
-DrawioFile.prototype.handleConflictError=function(a,b){var d=mxUtils.bind(this,function(){this.handleFileSuccess(!0)}),k=mxUtils.bind(this,function(a){this.handleFileError(a,!0)}),f=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get(this.savingSpinnerKey))&&(this.ui.editor.setStatus(""),this.save(!0,d,k,null,!0,this.constructor!=GitHubFile&&this.constructor!=GitLabFile||null==a?null:a.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,d,k,null,null,this.constructor!=GitHubFile&&this.constructor!=GitLabFile||null==a?null:a.commitMessage)}),k)});"none"==DrawioFile.SYNC?this.showCopyDialog(d,k,f):this.invalidChecksum?this.showRefreshDialog(d,k,this.getErrorMessage(a)):b?this.showConflictDialog(f,m):this.addConflictStatus(mxUtils.bind(this,
-function(){this.ui.editor.setStatus(mxUtils.htmlEntities(mxResources.get("updatingDocument")));this.synchronizeFile(d,k)}),this.getErrorMessage(a))};DrawioFile.prototype.getErrorMessage=function(a){var b=null!=a?null!=a.error?a.error.message:a.message:null;null==b&&null!=a&&a.code==App.ERROR_TIMEOUT&&(b=mxResources.get("timeout"));return b};DrawioFile.prototype.isOverdue=function(){return null!=this.ageStart&&Date.now()-this.ageStart.getTime()>=this.ui.warnInterval};
+DrawioFile.prototype.handleConflictError=function(a,b){var d=mxUtils.bind(this,function(){this.handleFileSuccess(!0)}),g=mxUtils.bind(this,function(a){this.handleFileError(a,!0)}),f=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get(this.savingSpinnerKey))&&(this.ui.editor.setStatus(""),this.save(!0,d,g,null,!0,this.constructor!=GitHubFile&&this.constructor!=GitLabFile||null==a?null:a.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,d,g,null,null,this.constructor!=GitHubFile&&this.constructor!=GitLabFile||null==a?null:a.commitMessage)}),g)});"none"==DrawioFile.SYNC?this.showCopyDialog(d,g,f):this.invalidChecksum?this.showRefreshDialog(d,g,this.getErrorMessage(a)):b?this.showConflictDialog(f,m):this.addConflictStatus(mxUtils.bind(this,
+function(){this.ui.editor.setStatus(mxUtils.htmlEntities(mxResources.get("updatingDocument")));this.synchronizeFile(d,g)}),this.getErrorMessage(a))};DrawioFile.prototype.getErrorMessage=function(a){var b=null!=a?null!=a.error?a.error.message:a.message:null;null==b&&null!=a&&a.code==App.ERROR_TIMEOUT&&(b=mxResources.get("timeout"));return b};DrawioFile.prototype.isOverdue=function(){return null!=this.ageStart&&Date.now()-this.ageStart.getTime()>=this.ui.warnInterval};
DrawioFile.prototype.fileChanged=function(){this.lastChanged=new Date;this.setModified(!0);this.isAutosave()?(null!=this.savingStatusKey&&this.addAllSavedStatus(mxUtils.htmlEntities(mxResources.get(this.savingStatusKey))+"..."),this.ui.scheduleSanityCheck(),null==this.ageStart&&(this.ageStart=new Date),this.sendFileChanges(),this.autosave(this.autosaveDelay,this.maxAutosaveDelay,mxUtils.bind(this,function(a){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(a){this.handleFileError(a)}))):(this.ageStart=null,this.isAutosaveOptional()&&this.ui.editor.autosave||this.inConflictState||this.addUnsavedStatus())};DrawioFile.prototype.isOptimisticSync=function(){return!1};
DrawioFile.prototype.createSecret=function(a){var b=Editor.guid(32);null==this.sync||this.isOptimisticSync()?a(b):this.sync.createToken(b,mxUtils.bind(this,function(d){a(b,d)}),mxUtils.bind(this,function(){a(b)}))};DrawioFile.prototype.fileSaving=function(){null!=this.sync&&this.isOptimisticSync()&&this.sync.fileSaving();"1"==urlParams.test&&EditorUi.debug("DrawioFile.fileSaving",[this])};
DrawioFile.prototype.sendFileChanges=function(){try{null!=this.p2pCollab&&null!=this.sync&&(this.updateFileData(),this.sync.sendFileChanges(this.ui.getPagesForNode(mxUtils.parseXml(this.getData()).documentElement),this.desc),"1"==urlParams.test&&EditorUi.debug("DrawioFile.sendFileChanges",[this]))}catch(a){console.log(a)}};
-DrawioFile.prototype.fileSaved=function(a,b,d,k,f){this.lastSaved=new Date;this.ageStart=null;try{this.stats.saved++,this.invalidChecksum=this.inConflictState=!1,null==this.sync||this.isOptimisticSync()?(this.shadowData=a,this.shadowPages=null,null!=this.sync&&(this.sync.lastModified=this.getLastModifiedDate(),this.sync.resetUpdateStatusThread()),null!=d&&d()):this.sync.fileSaved(this.ui.getPagesForNode(mxUtils.parseXml(a).documentElement),b,d,k,f)}catch(c){this.invalidChecksum=this.inConflictState=
-!0;this.descriptorChanged();null!=k&&k(c);try{if(this.errorReportsEnabled)this.sendErrorReport("Error in fileSaved",null,c);else{var m=this.getCurrentUser(),p=null!=m?m.id:"unknown";EditorUi.logError("Error in fileSaved",null,this.getMode()+"."+this.getId(),p,c)}}catch(e){}}"1"==urlParams.test&&EditorUi.debug("DrawioFile.fileSaved",[this])};
-DrawioFile.prototype.autosave=function(a,b,d,k){null==this.lastAutosave&&(this.lastAutosave=Date.now());a=Date.now()-this.lastAutosave<b?a:0;this.clearAutosave();var f=window.setTimeout(mxUtils.bind(this,function(){this.lastAutosave=null;this.autosaveThread==f&&(this.autosaveThread=null);if(this.isModified()&&this.isAutosaveNow()){var a=this.isAutosaveRevision();a&&(this.lastAutosaveRevision=(new Date).getTime());this.save(a,mxUtils.bind(this,function(a){this.autosaveCompleted();null!=d&&d(a)}),mxUtils.bind(this,
-function(a){null!=k&&k(a)}))}else this.isModified()||this.ui.editor.setStatus(""),null!=d&&d(null)}),a);this.autosaveThread=f};DrawioFile.prototype.isAutosaveNow=function(){return!0};DrawioFile.prototype.autosaveCompleted=function(){};DrawioFile.prototype.clearAutosave=function(){null!=this.autosaveThread&&(window.clearTimeout(this.autosaveThread),this.autosaveThread=null)};
+DrawioFile.prototype.fileSaved=function(a,b,d,g,f){this.lastSaved=new Date;this.ageStart=null;try{this.stats.saved++,this.invalidChecksum=this.inConflictState=!1,null==this.sync||this.isOptimisticSync()?(this.shadowData=a,this.shadowPages=null,null!=this.sync&&(this.sync.lastModified=this.getLastModifiedDate(),this.sync.resetUpdateStatusThread()),null!=d&&d()):this.sync.fileSaved(this.ui.getPagesForNode(mxUtils.parseXml(a).documentElement),b,d,g,f)}catch(c){this.invalidChecksum=this.inConflictState=
+!0;this.descriptorChanged();null!=g&&g(c);try{if(this.errorReportsEnabled)this.sendErrorReport("Error in fileSaved",null,c);else{var m=this.getCurrentUser(),p=null!=m?m.id:"unknown";EditorUi.logError("Error in fileSaved",null,this.getMode()+"."+this.getId(),p,c)}}catch(e){}}"1"==urlParams.test&&EditorUi.debug("DrawioFile.fileSaved",[this])};
+DrawioFile.prototype.autosave=function(a,b,d,g){null==this.lastAutosave&&(this.lastAutosave=Date.now());a=Date.now()-this.lastAutosave<b?a:0;this.clearAutosave();var f=window.setTimeout(mxUtils.bind(this,function(){this.lastAutosave=null;this.autosaveThread==f&&(this.autosaveThread=null);if(this.isModified()&&this.isAutosaveNow()){var a=this.isAutosaveRevision();a&&(this.lastAutosaveRevision=(new Date).getTime());this.save(a,mxUtils.bind(this,function(a){this.autosaveCompleted();null!=d&&d(a)}),mxUtils.bind(this,
+function(a){null!=g&&g(a)}))}else this.isModified()||this.ui.editor.setStatus(""),null!=d&&d(null)}),a);this.autosaveThread=f};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 a=(new Date).getTime();return null==this.lastAutosaveRevision||a-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(a){this.updateFileData();this.stats.closed++;this.isAutosave()&&this.isModified()&&this.save(this.isAutosaveRevision(),null,null,a);this.destroy()};DrawioFile.prototype.hasSameExtension=function(a,b){if(null!=a&&null!=b){var d=a.lastIndexOf("."),k=0<d?a.substring(d):"",d=b.lastIndexOf(".");return k===(0<d?b.substring(d):"")}return a==b};
+DrawioFile.prototype.close=function(a){this.updateFileData();this.stats.closed++;this.isAutosave()&&this.isModified()&&this.save(this.isAutosaveRevision(),null,null,a);this.destroy()};DrawioFile.prototype.hasSameExtension=function(a,b){if(null!=a&&null!=b){var d=a.lastIndexOf("."),g=0<d?a.substring(d):"",d=b.lastIndexOf(".");return g===(0<d?b.substring(d):"")}return a==b};
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(a,b){a([])};DrawioFile.prototype.addComment=function(a,b,d){b(Date.now())};DrawioFile.prototype.canReplyToReplies=function(){return!0};DrawioFile.prototype.canComment=function(){return!0};DrawioFile.prototype.newComment=function(a,b){return new DrawioComment(this,null,a,Date.now(),Date.now(),!1,b)};LocalFile=function(a,b,d,k,f,m){DrawioFile.call(this,a,b);this.title=d;this.mode=k?null:App.MODE_DEVICE;this.fileHandle=f;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};
+DrawioFile.prototype.commentsRefreshNeeded=function(){return!0};DrawioFile.prototype.commentsSaveNeeded=function(){return!1};DrawioFile.prototype.getComments=function(a,b){a([])};DrawioFile.prototype.addComment=function(a,b,d){b(Date.now())};DrawioFile.prototype.canReplyToReplies=function(){return!0};DrawioFile.prototype.canComment=function(){return!0};DrawioFile.prototype.newComment=function(a,b){return new DrawioComment(this,null,a,Date.now(),Date.now(),!1,b)};LocalFile=function(a,b,d,g,f,m){DrawioFile.call(this,a,b);this.title=d;this.mode=g?null:App.MODE_DEVICE;this.fileHandle=f;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(a,b,d){this.saveAs(this.title,b,d)};LocalFile.prototype.saveAs=function(a,b,d){this.saveFile(a,!1,b,d)};LocalFile.prototype.saveAs=function(a,b,d){this.saveFile(a,!1,b,d)};LocalFile.prototype.getDescriptor=function(){return this.desc};LocalFile.prototype.setDescriptor=function(a){this.desc=a};
LocalFile.prototype.getLatestVersion=function(a,b){null==this.fileHandle?a(null):this.ui.loadFileSystemEntry(this.fileHandle,a,b)};
-LocalFile.prototype.saveFile=function(a,b,d,k,f){a!=this.title&&(this.desc=this.fileHandle=null);this.title=a;f||this.updateFileData();var m=this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle());this.setShadowModified(!1);var p=this.getData(),c=mxUtils.bind(this,function(){this.setModified(this.getShadowModified());this.contentChanged();null!=d&&d()}),e=mxUtils.bind(this,function(b){if(null!=this.fileHandle){if(!this.savingFile){this.savingFileTime=new Date;this.savingFile=!0;var e=mxUtils.bind(this,
-function(a){this.savingFile=!1;null!=k&&k({error:a})});this.saveDraft();this.fileHandle.createWritable().then(mxUtils.bind(this,function(a){this.fileHandle.getFile().then(mxUtils.bind(this,function(d){this.invalidFileHandle=null;this.desc.lastModified==d.lastModified?a.write(m?this.ui.base64ToBlob(b,"image/png"):b).then(mxUtils.bind(this,function(){a.close().then(mxUtils.bind(this,function(){this.fileHandle.getFile().then(mxUtils.bind(this,function(a){try{var b=this.desc;this.savingFile=!1;this.desc=
+LocalFile.prototype.saveFile=function(a,b,d,g,f){a!=this.title&&(this.desc=this.fileHandle=null);this.title=a;f||this.updateFileData();var m=this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle());this.setShadowModified(!1);var p=this.getData(),c=mxUtils.bind(this,function(){this.setModified(this.getShadowModified());this.contentChanged();null!=d&&d()}),e=mxUtils.bind(this,function(b){if(null!=this.fileHandle){if(!this.savingFile){this.savingFileTime=new Date;this.savingFile=!0;var e=mxUtils.bind(this,
+function(a){this.savingFile=!1;null!=g&&g({error:a})});this.saveDraft();this.fileHandle.createWritable().then(mxUtils.bind(this,function(a){this.fileHandle.getFile().then(mxUtils.bind(this,function(d){this.invalidFileHandle=null;this.desc.lastModified==d.lastModified?a.write(m?this.ui.base64ToBlob(b,"image/png"):b).then(mxUtils.bind(this,function(){a.close().then(mxUtils.bind(this,function(){this.fileHandle.getFile().then(mxUtils.bind(this,function(a){try{var b=this.desc;this.savingFile=!1;this.desc=
a;this.fileSaved(p,b,c,e);this.removeDraft()}catch(x){e(x)}}),e)}),e)}),e):(this.inConflictState=!0,e())}),mxUtils.bind(this,function(a){this.invalidFileHandle=!0;e(a)}))}),e)}}else{if(this.ui.isOfflineApp()||this.ui.isLocalFileSave())this.ui.doSaveLocalFile(b,a,m?"image/png":"text/xml",m);else if(b.length<MAX_REQUEST_SIZE){var d=a.lastIndexOf("."),d=0<d?a.substring(d+1):"xml";(new mxXmlRequest(SAVE_URL,"format="+d+"&xml="+encodeURIComponent(b)+"&filename="+encodeURIComponent(a)+(m?"&binary=1":""))).simulate(document,
-"_blank")}else this.ui.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(b)}));c()}});m?(b=this.ui.getPngFileProperties(this.ui.fileNode),this.ui.getEmbeddedPng(mxUtils.bind(this,function(a){e(a)}),k,this.ui.getCurrentFile()!=this?p:null,b.scale,b.border)):e(p)};LocalFile.prototype.rename=function(a,b,d){this.title=a;this.descriptorChanged();null!=b&&b()};
+"_blank")}else this.ui.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(b)}));c()}});m?(b=this.ui.getPngFileProperties(this.ui.fileNode),this.ui.getEmbeddedPng(mxUtils.bind(this,function(a){e(a)}),g,this.ui.getCurrentFile()!=this?p:null,b.scale,b.border)):e(p)};LocalFile.prototype.rename=function(a,b,d){this.title=a;this.descriptorChanged();null!=b&&b()};
LocalFile.prototype.open=function(){this.ui.setFileData(this.getData());this.installListeners()};(function(){"undefined"!==typeof html4&&(html4.ATTRIBS["span::data-lucid-content"]=0,html4.ATTRIBS["span::data-lucid-type"]=0,html4.ATTRIBS["font::data-font-src"]=0);Editor.prototype.appName="diagrams.net";Editor.prototype.diagramFileTypes=[{description:"diagramXmlDesc",extension:"drawio",mimeType:"text/xml"},{description:"diagramPngDesc",extension:"png",mimeType:"image/png"},{description:"diagramSvgDesc",extension:"svg",mimeType:"image/svg"},{description:"diagramHtmlDesc",extension:"html",mimeType:"text/html"},
{description:"diagramXmlDesc",extension:"xml",mimeType:"text/xml"}];Editor.prototype.libraryFileTypes=[{description:"Library (.drawiolib, .xml)",extensions:["drawiolib","xml"]}];Editor.prototype.fileExtensions=[{ext:"html",title:"filetypeHtml"},{ext:"png",title:"filetypePng"},{ext:"svg",title:"filetypeSvg"}];Editor.styles=[{},{commonStyle:{fontColor:"#5C5C5C",strokeColor:"#006658",fillColor:"#21C0A5"}},{commonStyle:{fontColor:"#095C86",strokeColor:"#AF45ED",fillColor:"#F694C1"},edgeStyle:{strokeColor:"#60E696"}},
{commonStyle:{fontColor:"#46495D",strokeColor:"#788AA3",fillColor:"#B2C9AB"}},{commonStyle:{fontColor:"#5AA9E6",strokeColor:"#FF6392",fillColor:"#FFE45E"}},{commonStyle:{fontColor:"#1D3557",strokeColor:"#457B9D",fillColor:"#A8DADC"},graph:{background:"#F1FAEE"}},{commonStyle:{fontColor:"#393C56",strokeColor:"#E07A5F",fillColor:"#F2CC8F"},graph:{background:"#F4F1DE",gridColor:"#D4D0C0"}},{commonStyle:{fontColor:"#143642",strokeColor:"#0F8B8D",fillColor:"#FAE5C7"},edgeStyle:{strokeColor:"#A8201A"},
@@ -3072,58 +3073,58 @@ Editor.tweetImage=IMAGE_PATH+"/tweet.png";Editor.facebookImage=IMAGE_PATH+"/face
IMAGE_PATH+"/img-hi-res.png";Editor.loResImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAAA+CAMAAACLMWy1AAAAS1BMVEVAQEAAAAA1NTVBQUFDQ0NDQ0NFRUVERERBQUFBQUFBQUFAQEBBQUFBQUFCQkJCQkJCQkJBQUFCQkJDQ0NDQ0NCQkJCQkJCQkJGRkb5/XqTAAAAGXRSTlP+AAWODlASCsesX+Lc2LyWe3pwa1tCPjohjSJfoAAAAI1JREFUWMPt1MkKhTAMRuG0anvneXr/J71nUypKcdqI/N8yhLMKMZE1CahnClDQzMPB44ED3EgeCubgDWnWQMHpwTtKwTe+UHD4sJ94wbUEHHFGhILlYDeSnsQeabeCgsPBgB0MOZZ9oGA5GJFiJSfUULAfjLjARrhCwX7wh2YCDwVbwZkUBKqFFJRN+wOcwSgR2sREcgAAAABJRU5ErkJggg==":
IMAGE_PATH+"/img-lo-res.png";Editor.cameraLargeImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAAlwSFlzAAALEwAACxMBAJqcGAAAAVlpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IlhNUCBDb3JlIDUuNC4wIj4KICAgPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4KICAgICAgPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIKICAgICAgICAgICAgeG1sbnM6dGlmZj0iaHR0cDovL25zLmFkb2JlLmNvbS90aWZmLzEuMC8iPgogICAgICAgICA8dGlmZjpPcmllbnRhdGlvbj4xPC90aWZmOk9yaWVudGF0aW9uPgogICAgICA8L3JkZjpEZXNjcmlwdGlvbj4KICAgPC9yZGY6UkRGPgo8L3g6eG1wbWV0YT4KTMInWQAAA/BJREFUWAnFl0uIjWEYx885buPSuGwmSYwtwsY1ikKSNYNclmQnadgrZSPlsnBLSlaGBdNYKY0Vdi4L4zYzIqxGxmXG//d+7//0+uY7nWMiT/2/53mf+3v7vnNKpf9M5UbrDw8Pj4m+wzmeT1FBUS6Xf+YNox6reMONukijMXUTM3NmI75PyXcJPwRWg5kS7xysDLNmfEUxpx2rceNE50IlYjyRklcLf0prY+x4BTqfmx3ZUHQaO9ISGngYq38V/1EH+ECPa+QaK1u1kVBQirDMChiS3CTeIkwWvghtwhKBpZ8g1CO2B99FynVU/KowSRgQ3mlrBsVZ1awmQlS0SGbfXglfBPbdRGMm5O8RXg2P835pDCvzWjghTHETcLpZLHwS8kTCtBEK1SN83Egam8YxyVZqc+Do5qkwS+gT9grNwkUBG6cbsG/gs3BTuC/0ChCxq4QtwgzBMdwUZBPyN4Ftfi4sYPZHktbOSRlIuutRP5jYj0ueZp88xyYcS/zZoiLyQT1IA/cTj7eSlwnrhI+JnkQbCwo2Sx/2M7VJt17wdhVtgxvrpoFnAuSAbJQ97biZAlKxBfD9wgOhV+BgIR/AZtJ4kwD5PGSj7OmmekjWEy0oAQHAS3+KpBpzXqYK3UItopHpSRMno2N+cm7gDYnfRCcr3QBqriMHLJDkeyhFfiG5aVbK+8rhtP9M6QcIEJHX5Fp9NMAyQlYiu+OOJNlODCIXyka/P23bncTdiC7OydC1+v1Bsb+5r84DK8S3Rdmf5cRUFW3bXtWUSt1Rdk6G4SyJV2o1YId+vNUxr+x5yCJiapFtcxQzLjrxboGcMxvFJwEOKnLwjIbkx/sdSmeSaUY++SwTAxV+4DJT7RVwkbk46gNCsifIItuy0e9PF33Cb4homhN5YRyzL5q5V2VNkv98kqgoGTo3YF9CnMM5Y5rItFfvBSi9JulVXOgI+VwIntkt+SaZ6weQfcovJf7zpTfl86P/wAF7Fz18NeKwmvAWCaX0Z/uMHQr42ZxvR/Rxcw5xM+9J/CJq8w2gduDhmDgso/QrBH47dEXQ1IqczyHpIOfIRtnTtV7SwO1oKXKkU3fbToFGSDHtMWcaH1WBuVYnDbRFi99iqSMySdzxXckrazUh23KBVYGIcfNBkTxca0e4ATJ0KukGYVBgr/MnlhPOtQq/ksUfCbzh+EFCjtnCUoHfjhA/OsiTv2HcEvJMELp0VakZDliTmriTdPivxU4VmEhtPrGV+KJhO7ZKt0doFZh1fgZSBWIW2AGEHwg3BUWOnKtH+suqdw07tYMfglCrWPD5mw9qVYuniaXkT0OtWaSuo5LJTY1RBf+roF9X5+y/5qU+DAAAAABJRU5ErkJggg==";
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.errorImage="data:image/gif;base64,R0lGODlhEAAQAPcAAADGAIQAAISEhP8AAP///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////yH5BAEAAAAALAAAAAAQABAAAAhoAAEIFBigYMGBCAkGGMCQ4cGECxtKHBAAYUQCEzFSHLiQgMeGHjEGEAAg4oCQJz86LCkxpEqHAkwyRClxpEyXGmGaREmTIsmOL1GO/DkzI0yOE2sKIMlRJsWhCQHENDiUaVSpS5cmDAgAOw==";
-Editor.configurationKey=".configuration";Editor.settingsKey=".drawio-config";Editor.defaultCustomLibraries=[];Editor.enableCustomLibraries=!0;Editor.enableCustomProperties=!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.compressXml=!0;Editor.globalVars=null;Editor.shadowOptionEnabled=!mxClient.IS_SF;Editor.config=null;Editor.configVersion=
-null;Editor.defaultBorder=5;Editor.commonProperties=[{name:"comic",dispName:"Comic",type:"bool",defVal:!1,isVisible:function(a,c){return"1"!=mxUtils.getValue(a.style,"sketch","0")}},{name:"jiggle",dispName:"Jiggle",type:"float",min:0,defVal:1,isVisible:function(a,c){return"1"==mxUtils.getValue(a.style,"comic","0")||"1"==mxUtils.getValue(a.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"fillWeight",dispName:"Fill Weight",type:"int",defVal:-1,isVisible:function(a,c){return"1"==mxUtils.getValue(a.style,
-"sketch","1"==urlParams.rough?"1":"0")}},{name:"hachureGap",dispName:"Hachure Gap",type:"int",defVal:-1,isVisible:function(a,c){return"1"==mxUtils.getValue(a.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"hachureAngle",dispName:"Hachure Angle",type:"int",defVal:-41,isVisible:function(a,c){return"1"==mxUtils.getValue(a.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"curveFitting",dispName:"Curve Fitting",type:"float",defVal:.95,isVisible:function(a,c){return"1"==mxUtils.getValue(a.style,
-"sketch","1"==urlParams.rough?"1":"0")}},{name:"simplification",dispName:"Simplification",type:"float",defVal:0,min:0,max:1,isVisible:function(a,c){return"1"==mxUtils.getValue(a.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"disableMultiStroke",dispName:"Disable Multi Stroke",type:"bool",defVal:!1,isVisible:function(a,c){return"1"==mxUtils.getValue(a.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"disableMultiStrokeFill",dispName:"Disable Multi Stroke Fill",type:"bool",defVal:!1,isVisible:function(a,
-c){return"1"==mxUtils.getValue(a.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"dashOffset",dispName:"Dash Offset",type:"int",defVal:-1,isVisible:function(a,c){return"1"==mxUtils.getValue(a.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"dashGap",dispName:"Dash Gap",type:"int",defVal:-1,isVisible:function(a,c){return"1"==mxUtils.getValue(a.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"zigzagOffset",dispName:"ZigZag Offset",type:"int",defVal:-1,isVisible:function(a,c){return"1"==
-mxUtils.getValue(a.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"jiggle",dispName:"Jiggle",type:"float",min:0,defVal:1,isVisible:function(a,c){return"1"==mxUtils.getValue(a.style,"comic","0")||"1"==mxUtils.getValue(a.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"sketchStyle",dispName:"Sketch Style",type:"enum",defVal:"rough",enumList:[{val:"rough",dispName:"Rough"},{val:"comic",dispName:"Comic"}],isVisible:function(a,c){return"1"==mxUtils.getValue(a.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(a){return"orthogonalEdgeStyle"==mxUtils.getValue(a.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=[{type:"separator"},{name:"resizeLastRow",dispName:"Resize Last Row",type:"bool",getDefaultValue:function(a,c){var b=c.editorUi.editor.graph.getCellStyle(1==a.vertices.length&&0==a.edges.length?a.vertices[0]:null);return"1"==mxUtils.getValue(b,"resizeLastRow","0")},isVisible:function(a,c){var b=c.editorUi.editor.graph;return 1==
-a.vertices.length&&0==a.edges.length&&b.isTable(a.vertices[0])}},{name:"resizeLast",dispName:"Resize Last Column",type:"bool",getDefaultValue:function(a,c){var b=c.editorUi.editor.graph.getCellStyle(1==a.vertices.length&&0==a.edges.length?a.vertices[0]:null);return"1"==mxUtils.getValue(b,"resizeLast","0")},isVisible:function(a,c){var b=c.editorUi.editor.graph;return 1==a.vertices.length&&0==a.edges.length&&b.isTable(a.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(a,c){return c.editorUi.editor.graph.isCellConnectable(1==a.vertices.length&&0==a.edges.length?a.vertices[0]:null)},isVisible:function(a,c){return 1==a.vertices.length&&0==a.edges.length}},{name:"allowArrows",dispName:"Allow Arrows",type:"bool",defVal:!0},{name:"snapToPoint",dispName:"Snap to Point",type:"bool",defVal:!1},{name:"perimeter",dispName:"Perimeter",defVal:"none",type:"enum",enumList:[{val:"none",dispName:"None"},{val:"rectanglePerimeter",dispName:"Rectangle"},
-{val:"ellipsePerimeter",dispName:"Ellipse"},{val:"rhombusPerimeter",dispName:"Rhombus"},{val:"trianglePerimeter",dispName:"Triangle"},{val:"hexagonPerimeter2",dispName:"Hexagon"},{val:"lifelinePerimeter",dispName:"Lifeline"},{val:"orthogonalPerimeter",dispName:"Orthogonal"},{val:"backbonePerimeter",dispName:"Backbone"},{val:"calloutPerimeter",dispName:"Callout"},{val:"parallelogramPerimeter",dispName:"Parallelogram"},{val:"trapezoidPerimeter",dispName:"Trapezoid"},{val:"stepPerimeter",dispName:"Step"},
-{val:"centerPerimeter",dispName:"Center"}]},{name:"fixDash",dispName:"Fixed Dash",type:"bool",defVal:!1},{name:"autosize",dispName:"Autosize",type:"bool",defVal:!1},{name:"container",dispName:"Container",type:"bool",defVal:!1,isVisible:function(a,c){return 1==a.vertices.length&&0==a.edges.length}},{name:"dropTarget",dispName:"Drop Target",type:"bool",getDefaultValue:function(a,c){var b=1==a.vertices.length&&0==a.edges.length?a.vertices[0]:null,e=c.editorUi.editor.graph;return null!=b&&(e.isSwimlane(b)||
-0<e.model.getChildCount(b))},isVisible:function(a,c){return 1==a.vertices.length&&0==a.edges.length}},{name:"collapsible",dispName:"Collapsible",type:"bool",getDefaultValue:function(a,c){var b=1==a.vertices.length&&0==a.edges.length?a.vertices[0]:null,e=c.editorUi.editor.graph;return null!=b&&(e.isContainer(b)&&"0"!=a.style.collapsible||!e.isContainer(b)&&"1"==a.style.collapsible)},isVisible:function(a,c){return 1==a.vertices.length&&0==a.edges.length}},{name:"recursiveResize",dispName:"Resize Children",
-type:"bool",defVal:!0,isVisible:function(a,c){return 1==a.vertices.length&&0==a.edges.length&&!c.editorUi.editor.graph.isSwimlane(a.vertices[0])&&null==mxUtils.getValue(a.style,"childLayout",null)}},{name:"expand",dispName:"Expand",type:"bool",defVal:!0},{name:"part",dispName:"Part",type:"bool",defVal:!1,isVisible:function(a,c){var b=c.editorUi.editor.graph.model;return 0<a.vertices.length?b.isVertex(b.getParent(a.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(a,c){var b=0<a.vertices.length?c.editorUi.editor.graph.getCellGeometry(a.vertices[0]):null;return null!=b&&!b.relative}},{name:"resizable",dispName:"Resizable",type:"bool",defVal:!0},{name:"resizeWidth",dispName:"Resize Width",type:"bool",
-defVal:!1},{name:"resizeHeight",dispName:"Resize Height",type:"bool",defVal:!1},{name:"rotatable",dispName:"Rotatable",type:"bool",defVal:!0},{name:"cloneable",dispName:"Cloneable",type:"bool",defVal:!0},{name:"deletable",dispName:"Deletable",type:"bool",defVal:!0},{name:"treeFolding",dispName:"Tree Folding",type:"bool",defVal:!1},{name:"treeMoving",dispName:"Tree Moving",type:"bool",defVal:!1},{name:"pointerEvents",dispName:"Pointer Events",type:"bool",defVal:!0,isVisible:function(a,c){var b=mxUtils.getValue(a.style,
-mxConstants.STYLE_FILLCOLOR,null);return c.editorUi.editor.graph.isSwimlane(a.vertices[0])||null==b||b==mxConstants.NONE}},{name:"moveCells",dispName:"Move Cells on Fold",type:"bool",defVal:!1,isVisible:function(a,c){return 0<a.vertices.length&&c.editorUi.editor.graph.isContainer(a.vertices[0])}}].concat(Editor.commonProperties);Editor.defaultCsvValue='##\n## Example CSV import. Use ## for comments and # for configuration. Paste CSV below.\n## The following names are reserved and should not be used (or ignored):\n## id, tooltip, placeholder(s), link and label (see below)\n##\n#\n## Node label with placeholders and HTML.\n## Default is \'%name_of_first_column%\'.\n#\n# label: %name%<br><i style="color:gray;">%position%</i><br><a href="mailto:%email%">Email</a>\n#\n## Node style (placeholders are replaced once).\n## Default is the current style for nodes.\n#\n# style: label;image=%image%;whiteSpace=wrap;html=1;rounded=1;fillColor=%fill%;strokeColor=%stroke%;\n#\n## Parent style for nodes with child nodes (placeholders are replaced once).\n#\n# parentstyle: swimlane;whiteSpace=wrap;html=1;childLayout=stackLayout;horizontal=1;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;\n#\n## Optional column name that contains a reference to a named style in styles.\n## Default is the current style for nodes.\n#\n# stylename: -\n#\n## JSON for named styles of the form {"name": "style", "name": "style"} where style is a cell style with\n## placeholders that are replaced once.\n#\n# styles: -\n#\n## JSON for variables in styles of the form {"name": "value", "name": "value"} where name is a string\n## that will replace a placeholder in a style.\n#\n# vars: -\n#\n## Optional column name that contains a reference to a named label in labels.\n## Default is the current label.\n#\n# labelname: -\n#\n## JSON for named labels of the form {"name": "label", "name": "label"} where label is a cell label with\n## placeholders.\n#\n# labels: -\n#\n## Uses the given column name as the identity for cells (updates existing cells).\n## Default is no identity (empty value or -).\n#\n# identity: -\n#\n## Uses the given column name as the parent reference for cells. Default is no parent (empty or -).\n## The identity above is used for resolving the reference so it must be specified.\n#\n# parent: -\n#\n## Adds a prefix to the identity of cells to make sure they do not collide with existing cells (whose\n## IDs are numbers from 0..n, sometimes with a GUID prefix in the context of realtime collaboration).\n## Default is csvimport-.\n#\n# namespace: csvimport-\n#\n## Connections between rows ("from": source colum, "to": target column).\n## Label, style and invert are optional. Defaults are \'\', current style and false.\n## If placeholders are used in the style, they are replaced with data from the source.\n## An optional placeholders can be set to target to use data from the target instead.\n## In addition to label, an optional fromlabel and tolabel can be used to name the column\n## that contains the text for the label in the edges source or target (invert ignored).\n## In addition to those, an optional source and targetlabel can be used to specify a label\n## that contains placeholders referencing the respective columns in the source or target row.\n## The label is created in the form fromlabel + sourcelabel + label + tolabel + targetlabel.\n## Additional labels can be added by using an optional labels array with entries of the\n## form {"label": string, "x": number, "y": number, "dx": number, "dy": number} where\n## x is from -1 to 1 along the edge, y is orthogonal, and dx/dy are offsets in pixels.\n## An optional placeholders with the string value "source" or "target" can be specified\n## to replace placeholders in the additional label with data from the source or target.\n## The target column may contain a comma-separated list of values.\n## Multiple connect entries are allowed.\n#\n# connect: {"from": "manager", "to": "name", "invert": true, "label": "manages", \\\n# "style": "curved=1;endArrow=blockThin;endFill=1;fontSize=11;"}\n# connect: {"from": "refs", "to": "id", "style": "curved=1;fontSize=11;"}\n#\n## Node x-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# left: \n#\n## Node y-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# top: \n#\n## Node width. Possible value is a number (in px), auto or an @ sign followed by a column\n## name that contains the value for the width. Default is auto.\n#\n# width: auto\n#\n## Node height. Possible value is a number (in px), auto or an @ sign followed by a column\n## name that contains the value for the height. Default is auto.\n#\n# height: auto\n#\n## Padding for autosize. Default is 0.\n#\n# padding: -12\n#\n## Comma-separated list of ignored columns for metadata. (These can be\n## used for connections and styles but will not be added as metadata.)\n#\n# ignore: id,image,fill,stroke,refs,manager\n#\n## Column to be renamed to link attribute (used as link).\n#\n# link: url\n#\n## Spacing between nodes. Default is 40.\n#\n# nodespacing: 40\n#\n## Spacing between levels of hierarchical layouts. Default is 100.\n#\n# levelspacing: 100\n#\n## Spacing between parallel edges. Default is 40. Use 0 to disable.\n#\n# edgespacing: 40\n#\n## Name or JSON of layout. Possible values are auto, none, verticaltree, horizontaltree,\n## verticalflow, horizontalflow, organic, circle or a JSON string as used in Layout, Apply.\n## Default is auto.\n#\n# layout: auto\n#\n## ---- CSV below this line. First line are column names. ----\nname,position,id,location,manager,email,fill,stroke,refs,url,image\nTessa Miller,CFO,emi,Office 1,,me@example.com,#dae8fc,#6c8ebf,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-3-128.png\nEdward Morrison,Brand Manager,emo,Office 2,Tessa Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-10-3-128.png\nAlison Donovan,System Admin,rdo,Office 3,Tessa Miller,me@example.com,#d5e8d4,#82b366,"emo,tva",https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-2-128.png\nEvan Valet,HR Director,tva,Office 4,Tessa Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-9-2-128.png\n';
-Editor.createRoughCanvas=function(a){var c=rough.canvas({getContext:function(){return a}});c.draw=function(c){var b=c.sets||[];c=c.options||this.getDefaultOptions();for(var e=0;e<b.length;e++){var d=b[e];switch(d.type){case "path":null!=c.stroke&&this._drawToContext(a,d,c);break;case "fillPath":this._drawToContext(a,d,c);break;case "fillSketch":this.fillSketch(a,d,c)}}};c.fillSketch=function(c,b,e){var d=a.state.strokeColor,g=a.state.strokeWidth,f=a.state.strokeAlpha,k=a.state.dashed,l=e.fillWeight;
-0>l&&(l=e.strokeWidth/2);a.setStrokeAlpha(a.state.fillAlpha);a.setStrokeColor(e.fill||"");a.setStrokeWidth(l);a.setDashed(!1);this._drawToContext(c,b,e);a.setDashed(k);a.setStrokeWidth(g);a.setStrokeColor(d);a.setStrokeAlpha(f)};c._drawToContext=function(a,c,b){a.begin();for(var e=0;e<c.ops.length;e++){var d=c.ops[e],g=d.data;switch(d.op){case "move":a.moveTo(g[0],g[1]);break;case "bcurveTo":a.curveTo(g[0],g[1],g[2],g[3],g[4],g[5]);break;case "lineTo":a.lineTo(g[0],g[1])}}a.end();"fillPath"===c.type&&
+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.compressXml=!0;Editor.globalVars=null;Editor.shadowOptionEnabled=!mxClient.IS_SF;Editor.config=
+null;Editor.configVersion=null;Editor.defaultBorder=5;Editor.commonProperties=[{name:"comic",dispName:"Comic",type:"bool",defVal:!1,isVisible:function(a,c){return"1"!=mxUtils.getValue(a.style,"sketch","0")}},{name:"jiggle",dispName:"Jiggle",type:"float",min:0,defVal:1,isVisible:function(a,c){return"1"==mxUtils.getValue(a.style,"comic","0")||"1"==mxUtils.getValue(a.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"fillWeight",dispName:"Fill Weight",type:"int",defVal:-1,isVisible:function(a,c){return"1"==
+mxUtils.getValue(a.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"hachureGap",dispName:"Hachure Gap",type:"int",defVal:-1,isVisible:function(a,c){return"1"==mxUtils.getValue(a.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"hachureAngle",dispName:"Hachure Angle",type:"int",defVal:-41,isVisible:function(a,c){return"1"==mxUtils.getValue(a.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"curveFitting",dispName:"Curve Fitting",type:"float",defVal:.95,isVisible:function(a,c){return"1"==
+mxUtils.getValue(a.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"simplification",dispName:"Simplification",type:"float",defVal:0,min:0,max:1,isVisible:function(a,c){return"1"==mxUtils.getValue(a.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"disableMultiStroke",dispName:"Disable Multi Stroke",type:"bool",defVal:!1,isVisible:function(a,c){return"1"==mxUtils.getValue(a.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"disableMultiStrokeFill",dispName:"Disable Multi Stroke Fill",type:"bool",
+defVal:!1,isVisible:function(a,c){return"1"==mxUtils.getValue(a.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"dashOffset",dispName:"Dash Offset",type:"int",defVal:-1,isVisible:function(a,c){return"1"==mxUtils.getValue(a.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"dashGap",dispName:"Dash Gap",type:"int",defVal:-1,isVisible:function(a,c){return"1"==mxUtils.getValue(a.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"zigzagOffset",dispName:"ZigZag Offset",type:"int",defVal:-1,isVisible:function(a,
+c){return"1"==mxUtils.getValue(a.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"jiggle",dispName:"Jiggle",type:"float",min:0,defVal:1,isVisible:function(a,c){return"1"==mxUtils.getValue(a.style,"comic","0")||"1"==mxUtils.getValue(a.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"sketchStyle",dispName:"Sketch Style",type:"enum",defVal:"rough",enumList:[{val:"rough",dispName:"Rough"},{val:"comic",dispName:"Comic"}],isVisible:function(a,c){return"1"==mxUtils.getValue(a.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(a){return"orthogonalEdgeStyle"==mxUtils.getValue(a.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=[{type:"separator"},{name:"resizeLastRow",dispName:"Resize Last Row",type:"bool",getDefaultValue:function(a,c){var b=c.editorUi.editor.graph.getCellStyle(1==a.vertices.length&&0==a.edges.length?a.vertices[0]:null);return"1"==mxUtils.getValue(b,"resizeLastRow","0")},isVisible:function(a,
+c){var b=c.editorUi.editor.graph;return 1==a.vertices.length&&0==a.edges.length&&b.isTable(a.vertices[0])}},{name:"resizeLast",dispName:"Resize Last Column",type:"bool",getDefaultValue:function(a,c){var b=c.editorUi.editor.graph.getCellStyle(1==a.vertices.length&&0==a.edges.length?a.vertices[0]:null);return"1"==mxUtils.getValue(b,"resizeLast","0")},isVisible:function(a,c){var b=c.editorUi.editor.graph;return 1==a.vertices.length&&0==a.edges.length&&b.isTable(a.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(a,c){return c.editorUi.editor.graph.isCellConnectable(1==a.vertices.length&&0==a.edges.length?a.vertices[0]:null)},isVisible:function(a,c){return 1==a.vertices.length&&0==a.edges.length}},{name:"allowArrows",dispName:"Allow Arrows",type:"bool",defVal:!0},{name:"snapToPoint",dispName:"Snap to Point",type:"bool",defVal:!1},{name:"perimeter",dispName:"Perimeter",defVal:"none",type:"enum",enumList:[{val:"none",dispName:"None"},{val:"rectanglePerimeter",
+dispName:"Rectangle"},{val:"ellipsePerimeter",dispName:"Ellipse"},{val:"rhombusPerimeter",dispName:"Rhombus"},{val:"trianglePerimeter",dispName:"Triangle"},{val:"hexagonPerimeter2",dispName:"Hexagon"},{val:"lifelinePerimeter",dispName:"Lifeline"},{val:"orthogonalPerimeter",dispName:"Orthogonal"},{val:"backbonePerimeter",dispName:"Backbone"},{val:"calloutPerimeter",dispName:"Callout"},{val:"parallelogramPerimeter",dispName:"Parallelogram"},{val:"trapezoidPerimeter",dispName:"Trapezoid"},{val:"stepPerimeter",
+dispName:"Step"},{val:"centerPerimeter",dispName:"Center"}]},{name:"fixDash",dispName:"Fixed Dash",type:"bool",defVal:!1},{name:"autosize",dispName:"Autosize",type:"bool",defVal:!1},{name:"container",dispName:"Container",type:"bool",defVal:!1,isVisible:function(a,c){return 1==a.vertices.length&&0==a.edges.length}},{name:"dropTarget",dispName:"Drop Target",type:"bool",getDefaultValue:function(a,c){var b=1==a.vertices.length&&0==a.edges.length?a.vertices[0]:null,e=c.editorUi.editor.graph;return null!=
+b&&(e.isSwimlane(b)||0<e.model.getChildCount(b))},isVisible:function(a,c){return 1==a.vertices.length&&0==a.edges.length}},{name:"collapsible",dispName:"Collapsible",type:"bool",getDefaultValue:function(a,c){var b=1==a.vertices.length&&0==a.edges.length?a.vertices[0]:null,e=c.editorUi.editor.graph;return null!=b&&(e.isContainer(b)&&"0"!=a.style.collapsible||!e.isContainer(b)&&"1"==a.style.collapsible)},isVisible:function(a,c){return 1==a.vertices.length&&0==a.edges.length}},{name:"recursiveResize",
+dispName:"Resize Children",type:"bool",defVal:!0,isVisible:function(a,c){return 1==a.vertices.length&&0==a.edges.length&&!c.editorUi.editor.graph.isSwimlane(a.vertices[0])&&null==mxUtils.getValue(a.style,"childLayout",null)}},{name:"expand",dispName:"Expand",type:"bool",defVal:!0},{name:"part",dispName:"Part",type:"bool",defVal:!1,isVisible:function(a,c){var b=c.editorUi.editor.graph.model;return 0<a.vertices.length?b.isVertex(b.getParent(a.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(a,c){var b=0<a.vertices.length?c.editorUi.editor.graph.getCellGeometry(a.vertices[0]):null;return null!=b&&!b.relative}},{name:"resizable",dispName:"Resizable",type:"bool",defVal:!0},{name:"resizeWidth",
+dispName:"Resize Width",type:"bool",defVal:!1},{name:"resizeHeight",dispName:"Resize Height",type:"bool",defVal:!1},{name:"rotatable",dispName:"Rotatable",type:"bool",defVal:!0},{name:"cloneable",dispName:"Cloneable",type:"bool",defVal:!0},{name:"deletable",dispName:"Deletable",type:"bool",defVal:!0},{name:"treeFolding",dispName:"Tree Folding",type:"bool",defVal:!1},{name:"treeMoving",dispName:"Tree Moving",type:"bool",defVal:!1},{name:"pointerEvents",dispName:"Pointer Events",type:"bool",defVal:!0,
+isVisible:function(a,c){var b=mxUtils.getValue(a.style,mxConstants.STYLE_FILLCOLOR,null);return c.editorUi.editor.graph.isSwimlane(a.vertices[0])||null==b||b==mxConstants.NONE}},{name:"moveCells",dispName:"Move Cells on Fold",type:"bool",defVal:!1,isVisible:function(a,c){return 0<a.vertices.length&&c.editorUi.editor.graph.isContainer(a.vertices[0])}}].concat(Editor.commonProperties);Editor.defaultCsvValue='##\n## Example CSV import. Use ## for comments and # for configuration. Paste CSV below.\n## The following names are reserved and should not be used (or ignored):\n## id, tooltip, placeholder(s), link and label (see below)\n##\n#\n## Node label with placeholders and HTML.\n## Default is \'%name_of_first_column%\'.\n#\n# label: %name%<br><i style="color:gray;">%position%</i><br><a href="mailto:%email%">Email</a>\n#\n## Node style (placeholders are replaced once).\n## Default is the current style for nodes.\n#\n# style: label;image=%image%;whiteSpace=wrap;html=1;rounded=1;fillColor=%fill%;strokeColor=%stroke%;\n#\n## Parent style for nodes with child nodes (placeholders are replaced once).\n#\n# parentstyle: swimlane;whiteSpace=wrap;html=1;childLayout=stackLayout;horizontal=1;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;\n#\n## Optional column name that contains a reference to a named style in styles.\n## Default is the current style for nodes.\n#\n# stylename: -\n#\n## JSON for named styles of the form {"name": "style", "name": "style"} where style is a cell style with\n## placeholders that are replaced once.\n#\n# styles: -\n#\n## JSON for variables in styles of the form {"name": "value", "name": "value"} where name is a string\n## that will replace a placeholder in a style.\n#\n# vars: -\n#\n## Optional column name that contains a reference to a named label in labels.\n## Default is the current label.\n#\n# labelname: -\n#\n## JSON for named labels of the form {"name": "label", "name": "label"} where label is a cell label with\n## placeholders.\n#\n# labels: -\n#\n## Uses the given column name as the identity for cells (updates existing cells).\n## Default is no identity (empty value or -).\n#\n# identity: -\n#\n## Uses the given column name as the parent reference for cells. Default is no parent (empty or -).\n## The identity above is used for resolving the reference so it must be specified.\n#\n# parent: -\n#\n## Adds a prefix to the identity of cells to make sure they do not collide with existing cells (whose\n## IDs are numbers from 0..n, sometimes with a GUID prefix in the context of realtime collaboration).\n## Default is csvimport-.\n#\n# namespace: csvimport-\n#\n## Connections between rows ("from": source colum, "to": target column).\n## Label, style and invert are optional. Defaults are \'\', current style and false.\n## If placeholders are used in the style, they are replaced with data from the source.\n## An optional placeholders can be set to target to use data from the target instead.\n## In addition to label, an optional fromlabel and tolabel can be used to name the column\n## that contains the text for the label in the edges source or target (invert ignored).\n## In addition to those, an optional source and targetlabel can be used to specify a label\n## that contains placeholders referencing the respective columns in the source or target row.\n## The label is created in the form fromlabel + sourcelabel + label + tolabel + targetlabel.\n## Additional labels can be added by using an optional labels array with entries of the\n## form {"label": string, "x": number, "y": number, "dx": number, "dy": number} where\n## x is from -1 to 1 along the edge, y is orthogonal, and dx/dy are offsets in pixels.\n## An optional placeholders with the string value "source" or "target" can be specified\n## to replace placeholders in the additional label with data from the source or target.\n## The target column may contain a comma-separated list of values.\n## Multiple connect entries are allowed.\n#\n# connect: {"from": "manager", "to": "name", "invert": true, "label": "manages", \\\n# "style": "curved=1;endArrow=blockThin;endFill=1;fontSize=11;"}\n# connect: {"from": "refs", "to": "id", "style": "curved=1;fontSize=11;"}\n#\n## Node x-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# left: \n#\n## Node y-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# top: \n#\n## Node width. Possible value is a number (in px), auto or an @ sign followed by a column\n## name that contains the value for the width. Default is auto.\n#\n# width: auto\n#\n## Node height. Possible value is a number (in px), auto or an @ sign followed by a column\n## name that contains the value for the height. Default is auto.\n#\n# height: auto\n#\n## Padding for autosize. Default is 0.\n#\n# padding: -12\n#\n## Comma-separated list of ignored columns for metadata. (These can be\n## used for connections and styles but will not be added as metadata.)\n#\n# ignore: id,image,fill,stroke,refs,manager\n#\n## Column to be renamed to link attribute (used as link).\n#\n# link: url\n#\n## Spacing between nodes. Default is 40.\n#\n# nodespacing: 40\n#\n## Spacing between levels of hierarchical layouts. Default is 100.\n#\n# levelspacing: 100\n#\n## Spacing between parallel edges. Default is 40. Use 0 to disable.\n#\n# edgespacing: 40\n#\n## Name or JSON of layout. Possible values are auto, none, verticaltree, horizontaltree,\n## verticalflow, horizontalflow, organic, circle or a JSON string as used in Layout, Apply.\n## Default is auto.\n#\n# layout: auto\n#\n## ---- CSV below this line. First line are column names. ----\nname,position,id,location,manager,email,fill,stroke,refs,url,image\nTessa Miller,CFO,emi,Office 1,,me@example.com,#dae8fc,#6c8ebf,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-3-128.png\nEdward Morrison,Brand Manager,emo,Office 2,Tessa Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-10-3-128.png\nAlison Donovan,System Admin,rdo,Office 3,Tessa Miller,me@example.com,#d5e8d4,#82b366,"emo,tva",https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-2-128.png\nEvan Valet,HR Director,tva,Office 4,Tessa Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-9-2-128.png\n';
+Editor.createRoughCanvas=function(a){var c=rough.canvas({getContext:function(){return a}});c.draw=function(c){var b=c.sets||[];c=c.options||this.getDefaultOptions();for(var e=0;e<b.length;e++){var d=b[e];switch(d.type){case "path":null!=c.stroke&&this._drawToContext(a,d,c);break;case "fillPath":this._drawToContext(a,d,c);break;case "fillSketch":this.fillSketch(a,d,c)}}};c.fillSketch=function(c,b,e){var d=a.state.strokeColor,k=a.state.strokeWidth,f=a.state.strokeAlpha,g=a.state.dashed,l=e.fillWeight;
+0>l&&(l=e.strokeWidth/2);a.setStrokeAlpha(a.state.fillAlpha);a.setStrokeColor(e.fill||"");a.setStrokeWidth(l);a.setDashed(!1);this._drawToContext(c,b,e);a.setDashed(g);a.setStrokeWidth(k);a.setStrokeColor(d);a.setStrokeAlpha(f)};c._drawToContext=function(a,c,b){a.begin();for(var e=0;e<c.ops.length;e++){var d=c.ops[e],k=d.data;switch(d.op){case "move":a.moveTo(k[0],k[1]);break;case "bcurveTo":a.curveTo(k[0],k[1],k[2],k[3],k[4],k[5]);break;case "lineTo":a.lineTo(k[0],k[1])}}a.end();"fillPath"===c.type&&
b.filled?a.fill():a.stroke()};return c};(function(){function a(c,b,e){this.canvas=c;this.rc=b;this.shape=e;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.originalBegin=this.canvas.begin;this.canvas.begin=mxUtils.bind(this,a.prototype.begin);this.originalEnd=this.canvas.end;this.canvas.end=mxUtils.bind(this,a.prototype.end);this.originalRect=this.canvas.rect;this.canvas.rect=mxUtils.bind(this,a.prototype.rect);this.originalRoundrect=this.canvas.roundrect;this.canvas.roundrect=
mxUtils.bind(this,a.prototype.roundrect);this.originalEllipse=this.canvas.ellipse;this.canvas.ellipse=mxUtils.bind(this,a.prototype.ellipse);this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,a.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,a.prototype.moveTo);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,a.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;this.canvas.curveTo=mxUtils.bind(this,
a.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,a.prototype.arcTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,a.prototype.close);this.originalFill=this.canvas.fill;this.canvas.fill=mxUtils.bind(this,a.prototype.fill);this.originalStroke=this.canvas.stroke;this.canvas.stroke=mxUtils.bind(this,a.prototype.stroke);this.originalFillAndStroke=this.canvas.fillAndStroke;this.canvas.fillAndStroke=mxUtils.bind(this,a.prototype.fillAndStroke);
this.path=[];this.passThrough=!1}a.prototype.moveOp="M";a.prototype.lineOp="L";a.prototype.quadOp="Q";a.prototype.curveOp="C";a.prototype.closeOp="Z";a.prototype.getStyle=function(a,c){var b=1;if(null!=this.shape.state){var e=this.shape.state.cell.id;if(null!=e)for(var d=0;d<e.length;d++)b=(b<<5)-b+e.charCodeAt(d)<<0}b={strokeWidth:this.canvas.state.strokeWidth,seed:b,preserveVertices:!0};e=this.rc.getDefaultOptions();a?b.stroke="none"===this.canvas.state.strokeColor?"transparent":this.canvas.state.strokeColor:
delete b.stroke;d=null;(b.filled=c)?(b.fill="none"===this.canvas.state.fillColor?"":this.canvas.state.fillColor,d="none"===this.canvas.state.gradientColor?null:this.canvas.state.gradientColor):b.fill="";b.bowing=mxUtils.getValue(this.shape.style,"bowing",e.bowing);b.hachureAngle=mxUtils.getValue(this.shape.style,"hachureAngle",e.hachureAngle);b.curveFitting=mxUtils.getValue(this.shape.style,"curveFitting",e.curveFitting);b.roughness=mxUtils.getValue(this.shape.style,"jiggle",e.roughness);b.simplification=
-mxUtils.getValue(this.shape.style,"simplification",e.simplification);b.disableMultiStroke=mxUtils.getValue(this.shape.style,"disableMultiStroke",e.disableMultiStroke);b.disableMultiStrokeFill=mxUtils.getValue(this.shape.style,"disableMultiStrokeFill",e.disableMultiStrokeFill);var g=mxUtils.getValue(this.shape.style,"hachureGap",-1);b.hachureGap="auto"==g?-1:g;b.dashGap=mxUtils.getValue(this.shape.style,"dashGap",g);b.dashOffset=mxUtils.getValue(this.shape.style,"dashOffset",g);b.zigzagOffset=mxUtils.getValue(this.shape.style,
-"zigzagOffset",g);g=mxUtils.getValue(this.shape.style,"fillWeight",-1);b.fillWeight="auto"==g?-1:g;g=mxUtils.getValue(this.shape.style,"fillStyle","auto");"auto"==g&&(g=null!=this.shape.state?this.shape.state.view.graph.defaultPageBackgroundColor:"#ffffff",g=null!=b.fill&&(null!=d||null!=g&&b.fill.toLowerCase()==g.toLowerCase())?"solid":e.fillStyle);b.fillStyle=g;return b};a.prototype.begin=function(){this.passThrough?this.originalBegin.apply(this.canvas,arguments):this.path=[]};a.prototype.end=function(){this.passThrough&&
+mxUtils.getValue(this.shape.style,"simplification",e.simplification);b.disableMultiStroke=mxUtils.getValue(this.shape.style,"disableMultiStroke",e.disableMultiStroke);b.disableMultiStrokeFill=mxUtils.getValue(this.shape.style,"disableMultiStrokeFill",e.disableMultiStrokeFill);var k=mxUtils.getValue(this.shape.style,"hachureGap",-1);b.hachureGap="auto"==k?-1:k;b.dashGap=mxUtils.getValue(this.shape.style,"dashGap",k);b.dashOffset=mxUtils.getValue(this.shape.style,"dashOffset",k);b.zigzagOffset=mxUtils.getValue(this.shape.style,
+"zigzagOffset",k);k=mxUtils.getValue(this.shape.style,"fillWeight",-1);b.fillWeight="auto"==k?-1:k;k=mxUtils.getValue(this.shape.style,"fillStyle","auto");"auto"==k&&(k=null!=this.shape.state?this.shape.state.view.graph.defaultPageBackgroundColor:"#ffffff",k=null!=b.fill&&(null!=d||null!=k&&b.fill.toLowerCase()==k.toLowerCase())?"solid":e.fillStyle);b.fillStyle=k;return b};a.prototype.begin=function(){this.passThrough?this.originalBegin.apply(this.canvas,arguments):this.path=[]};a.prototype.end=function(){this.passThrough&&
this.originalEnd.apply(this.canvas,arguments)};a.prototype.addOp=function(){if(null!=this.path&&(this.path.push(arguments[0]),2<arguments.length))for(var a=2;a<arguments.length;a+=2)this.lastX=arguments[a-1],this.lastY=arguments[a],this.path.push(this.canvas.format(this.lastX)),this.path.push(this.canvas.format(this.lastY))};a.prototype.lineTo=function(a,c){this.passThrough?this.originalLineTo.apply(this.canvas,arguments):(this.addOp(this.lineOp,a,c),this.lastX=a,this.lastY=c)};a.prototype.moveTo=
-function(a,c){this.passThrough?this.originalMoveTo.apply(this.canvas,arguments):(this.addOp(this.moveOp,a,c),this.lastX=a,this.lastY=c,this.firstX=a,this.firstY=c)};a.prototype.close=function(){this.passThrough?this.originalClose.apply(this.canvas,arguments):this.addOp(this.closeOp)};a.prototype.quadTo=function(a,c,b,e){this.passThrough?this.originalQuadTo.apply(this.canvas,arguments):(this.addOp(this.quadOp,a,c,b,e),this.lastX=b,this.lastY=e)};a.prototype.curveTo=function(a,c,b,e,d,g){this.passThrough?
-this.originalCurveTo.apply(this.canvas,arguments):(this.addOp(this.curveOp,a,c,b,e,d,g),this.lastX=d,this.lastY=g)};a.prototype.arcTo=function(a,c,b,e,d,g,f){if(this.passThrough)this.originalArcTo.apply(this.canvas,arguments);else{var k=mxUtils.arcToCurves(this.lastX,this.lastY,a,c,b,e,d,g,f);if(null!=k)for(var l=0;l<k.length;l+=6)this.curveTo(k[l],k[l+1],k[l+2],k[l+3],k[l+4],k[l+5]);this.lastX=g;this.lastY=f}};a.prototype.rect=function(a,c,b,e){this.passThrough?this.originalRect.apply(this.canvas,
-arguments):(this.path=[],this.nextShape=this.rc.generator.rectangle(a,c,b,e,this.getStyle(!0,!0)))};a.prototype.ellipse=function(a,c,b,e){this.passThrough?this.originalEllipse.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.ellipse(a+b/2,c+e/2,b,e,this.getStyle(!0,!0)))};a.prototype.roundrect=function(a,c,b,e,d,g){this.passThrough?this.originalRoundrect.apply(this.canvas,arguments):(this.begin(),this.moveTo(a+d,c),this.lineTo(a+b-d,c),this.quadTo(a+b,c,a+b,c+g),this.lineTo(a+
-b,c+e-g),this.quadTo(a+b,c+e,a+b-d,c+e),this.lineTo(a+d,c+e),this.quadTo(a,c+e,a,c+e-g),this.lineTo(a,c+g),this.quadTo(a,c,a+d,c))};a.prototype.drawPath=function(a){if(0<this.path.length){this.passThrough=!0;try{this.rc.path(this.path.join(" "),a)}catch(Q){}this.passThrough=!1}else if(null!=this.nextShape){for(var c in a)this.nextShape.options[c]=a[c];null==a.stroke&&delete this.nextShape.options.stroke;a.filled||delete this.nextShape.options.fill;this.passThrough=!0;this.rc.draw(this.nextShape);
+function(a,c){this.passThrough?this.originalMoveTo.apply(this.canvas,arguments):(this.addOp(this.moveOp,a,c),this.lastX=a,this.lastY=c,this.firstX=a,this.firstY=c)};a.prototype.close=function(){this.passThrough?this.originalClose.apply(this.canvas,arguments):this.addOp(this.closeOp)};a.prototype.quadTo=function(a,c,b,e){this.passThrough?this.originalQuadTo.apply(this.canvas,arguments):(this.addOp(this.quadOp,a,c,b,e),this.lastX=b,this.lastY=e)};a.prototype.curveTo=function(a,c,b,e,d,k){this.passThrough?
+this.originalCurveTo.apply(this.canvas,arguments):(this.addOp(this.curveOp,a,c,b,e,d,k),this.lastX=d,this.lastY=k)};a.prototype.arcTo=function(a,c,b,e,d,k,f){if(this.passThrough)this.originalArcTo.apply(this.canvas,arguments);else{var g=mxUtils.arcToCurves(this.lastX,this.lastY,a,c,b,e,d,k,f);if(null!=g)for(var l=0;l<g.length;l+=6)this.curveTo(g[l],g[l+1],g[l+2],g[l+3],g[l+4],g[l+5]);this.lastX=k;this.lastY=f}};a.prototype.rect=function(a,c,b,e){this.passThrough?this.originalRect.apply(this.canvas,
+arguments):(this.path=[],this.nextShape=this.rc.generator.rectangle(a,c,b,e,this.getStyle(!0,!0)))};a.prototype.ellipse=function(a,c,b,e){this.passThrough?this.originalEllipse.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.ellipse(a+b/2,c+e/2,b,e,this.getStyle(!0,!0)))};a.prototype.roundrect=function(a,c,b,e,d,k){this.passThrough?this.originalRoundrect.apply(this.canvas,arguments):(this.begin(),this.moveTo(a+d,c),this.lineTo(a+b-d,c),this.quadTo(a+b,c,a+b,c+k),this.lineTo(a+
+b,c+e-k),this.quadTo(a+b,c+e,a+b-d,c+e),this.lineTo(a+d,c+e),this.quadTo(a,c+e,a,c+e-k),this.lineTo(a,c+k),this.quadTo(a,c,a+d,c))};a.prototype.drawPath=function(a){if(0<this.path.length){this.passThrough=!0;try{this.rc.path(this.path.join(" "),a)}catch(Q){}this.passThrough=!1}else if(null!=this.nextShape){for(var c in a)this.nextShape.options[c]=a[c];null==a.stroke&&delete this.nextShape.options.stroke;a.filled||delete this.nextShape.options.fill;this.passThrough=!0;this.rc.draw(this.nextShape);
this.passThrough=!1}};a.prototype.stroke=function(){this.passThrough?this.originalStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,!1))};a.prototype.fill=function(){this.passThrough?this.originalFill.apply(this.canvas,arguments):this.drawPath(this.getStyle(!1,!0))};a.prototype.fillAndStroke=function(){this.passThrough?this.originalFillAndStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,!0))};a.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;
this.canvas.moveTo=this.originalMoveTo;this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo;this.canvas.curveTo=this.originalCurveTo;this.canvas.arcTo=this.originalArcTo;this.canvas.close=this.originalClose;this.canvas.fill=this.originalFill;this.canvas.stroke=this.originalStroke;this.canvas.fillAndStroke=this.originalFillAndStroke;this.canvas.begin=this.originalBegin;this.canvas.end=this.originalEnd;this.canvas.rect=this.originalRect;this.canvas.ellipse=this.originalEllipse;
this.canvas.roundrect=this.originalRoundrect};mxShape.prototype.createRoughCanvas=function(c){return new a(c,Editor.createRoughCanvas(c),this)};var c=mxShape.prototype.createHandJiggle;mxShape.prototype.createHandJiggle=function(a){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"sketch","1"==urlParams.rough?"1":"0")?c.apply(this,arguments):"comic"==mxUtils.getValue(this.style,"sketchStyle","rough")?this.createComicCanvas(a):this.createRoughCanvas(a)};var b=mxShape.prototype.paint;
-mxShape.prototype.paint=function(c){var e=c.addTolerance,d=!0;null!=this.style&&(d="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(null!=c.handJiggle&&c.handJiggle.constructor==a&&!this.outline){c.save();var g=this.fill,f=this.stroke;this.stroke=this.fill=null;var k=this.configurePointerEvents,l=c.setStrokeColor;c.setStrokeColor=function(){};var n=c.setFillColor;c.setFillColor=function(){};d||null==g||(this.configurePointerEvents=function(){});c.handJiggle.passThrough=!0;
-b.apply(this,arguments);c.handJiggle.passThrough=!1;c.setFillColor=n;c.setStrokeColor=l;this.configurePointerEvents=k;this.stroke=f;this.fill=g;c.restore();d&&null!=g&&(c.addTolerance=function(){})}b.apply(this,arguments);c.addTolerance=e};var e=mxShape.prototype.paintGlassEffect;mxShape.prototype.paintGlassEffect=function(c,b,d,g,f,k){null!=c.handJiggle&&c.handJiggle.constructor==a?(c.handJiggle.passThrough=!0,e.apply(this,arguments),c.handJiggle.passThrough=!1):e.apply(this,arguments)}})();Editor.fastCompress=
-function(a){return null==a||0==a.length||"undefined"===typeof pako?a:Graph.arrayBufferToString(pako.deflateRaw(a))};Editor.fastDecompress=function(a){return null==a||0==a.length||"undefined"===typeof pako?a:pako.inflateRaw(Graph.stringToArrayBuffer(atob(a)),{to:"string"})};Editor.extractGraphModel=function(a,c,b){if(null!=a&&"undefined"!==typeof pako){var e=a.ownerDocument.getElementsByTagName("div"),d=[];if(null!=e&&0<e.length)for(var g=0;g<e.length;g++)if("mxgraph"==e[g].getAttribute("class")){d.push(e[g]);
+mxShape.prototype.paint=function(c){var e=c.addTolerance,d=!0;null!=this.style&&(d="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(null!=c.handJiggle&&c.handJiggle.constructor==a&&!this.outline){c.save();var k=this.fill,f=this.stroke;this.stroke=this.fill=null;var g=this.configurePointerEvents,l=c.setStrokeColor;c.setStrokeColor=function(){};var n=c.setFillColor;c.setFillColor=function(){};d||null==k||(this.configurePointerEvents=function(){});c.handJiggle.passThrough=!0;
+b.apply(this,arguments);c.handJiggle.passThrough=!1;c.setFillColor=n;c.setStrokeColor=l;this.configurePointerEvents=g;this.stroke=f;this.fill=k;c.restore();d&&null!=k&&(c.addTolerance=function(){})}b.apply(this,arguments);c.addTolerance=e};var e=mxShape.prototype.paintGlassEffect;mxShape.prototype.paintGlassEffect=function(c,b,d,k,f,g){null!=c.handJiggle&&c.handJiggle.constructor==a?(c.handJiggle.passThrough=!0,e.apply(this,arguments),c.handJiggle.passThrough=!1):e.apply(this,arguments)}})();Editor.fastCompress=
+function(a){return null==a||0==a.length||"undefined"===typeof pako?a:Graph.arrayBufferToString(pako.deflateRaw(a))};Editor.fastDecompress=function(a){return null==a||0==a.length||"undefined"===typeof pako?a:pako.inflateRaw(Graph.stringToArrayBuffer(atob(a)),{to:"string"})};Editor.extractGraphModel=function(a,c,b){if(null!=a&&"undefined"!==typeof pako){var e=a.ownerDocument.getElementsByTagName("div"),d=[];if(null!=e&&0<e.length)for(var k=0;k<e.length;k++)if("mxgraph"==e[k].getAttribute("class")){d.push(e[k]);
break}0<d.length&&(e=d[0].getAttribute("data-mxgraph"),null!=e?(d=JSON.parse(e),null!=d&&null!=d.xml&&(a=mxUtils.parseXml(d.xml),a=a.documentElement)):(d=d[0].getElementsByTagName("div"),0<d.length&&(e=mxUtils.getTextContent(d[0]),e=Graph.decompress(e,null,b),0<e.length&&(a=mxUtils.parseXml(e),a=a.documentElement))))}if(null!=a&&"svg"==a.nodeName)if(e=a.getAttribute("content"),null!=e&&"<"!=e.charAt(0)&&"%"!=e.charAt(0)&&(e=unescape(window.atob?atob(e):Base64.decode(cont,e))),null!=e&&"%"==e.charAt(0)&&
(e=decodeURIComponent(e)),null!=e&&0<e.length)a=mxUtils.parseXml(e).documentElement;else throw{message:mxResources.get("notADiagramFile")};null==a||c||(d=null,"diagram"==a.nodeName?d=a:"mxfile"==a.nodeName&&(e=a.getElementsByTagName("diagram"),0<e.length&&(d=e[Math.max(0,Math.min(e.length-1,urlParams.page||0))])),null!=d&&(a=Editor.parseDiagramNode(d,b)));null==a||"mxGraphModel"==a.nodeName||c&&"mxfile"==a.nodeName||(a=null);return a};Editor.parseDiagramNode=function(a,c){var b=mxUtils.trim(mxUtils.getTextContent(a)),
e=null;0<b.length?(b=Graph.decompress(b,null,c),null!=b&&0<b.length&&(e=mxUtils.parseXml(b).documentElement)):(b=mxUtils.getChildNodes(a),0<b.length&&(e=mxUtils.createXmlDocument(),e.appendChild(e.importNode(b[0],!0)),e=e.documentElement));return e};Editor.getDiagramNodeXml=function(a){var c=mxUtils.getTextContent(a),b=null;0<c.length?b=Graph.decompress(c):null!=a.firstChild&&(b=mxUtils.getXml(a.firstChild));return b};Editor.extractGraphModelFromPdf=function(a){a=a.substring(a.indexOf(",")+1);a=window.atob&&
-!mxClient.IS_SF?atob(a):Base64.decode(a,!0);if("%PDF-1.7"==a.substring(0,8)){var c=a.indexOf("EmbeddedFile");if(-1<c){var b=a.indexOf("stream",c)+9;if(0<a.substring(c,b).indexOf("application#2Fvnd.jgraph.mxfile"))return c=a.indexOf("endstream",b-1),pako.inflateRaw(Graph.stringToArrayBuffer(a.substring(b,c)),{to:"string"})}return null}for(var b=null,c="",e=0,d=0,g=[],f=null;d<a.length;){var k=a.charCodeAt(d),d=d+1;10!=k&&(c+=String.fromCharCode(k));k=="/Subject (%3Cmxfile".charCodeAt(e)?e++:e=0;if(19==
-e){var l=a.indexOf("%3C%2Fmxfile%3E)",d)+15,d=d-9;if(l>d){b=a.substring(d,l);break}}10==k&&("endobj"==c?f=null:"obj"==c.substring(c.length-3,c.length)||"xref"==c||"trailer"==c?(f=[],g[c.split(" ")[0]]=f):null!=f&&f.push(c),c="")}null==b&&(b=Editor.extractGraphModelFromXref(g));null!=b&&(b=decodeURIComponent(b.replace(/\\\(/g,"(").replace(/\\\)/g,")")));return b};Editor.extractGraphModelFromXref=function(a){var c=a.trailer,b=null;null!=c&&(c=/.* \/Info (\d+) (\d+) R/g.exec(c.join("\n")),null!=c&&0<
+!mxClient.IS_SF?atob(a):Base64.decode(a,!0);if("%PDF-1.7"==a.substring(0,8)){var c=a.indexOf("EmbeddedFile");if(-1<c){var b=a.indexOf("stream",c)+9;if(0<a.substring(c,b).indexOf("application#2Fvnd.jgraph.mxfile"))return c=a.indexOf("endstream",b-1),pako.inflateRaw(Graph.stringToArrayBuffer(a.substring(b,c)),{to:"string"})}return null}for(var b=null,c="",e=0,d=0,k=[],f=null;d<a.length;){var g=a.charCodeAt(d),d=d+1;10!=g&&(c+=String.fromCharCode(g));g=="/Subject (%3Cmxfile".charCodeAt(e)?e++:e=0;if(19==
+e){var l=a.indexOf("%3C%2Fmxfile%3E)",d)+15,d=d-9;if(l>d){b=a.substring(d,l);break}}10==g&&("endobj"==c?f=null:"obj"==c.substring(c.length-3,c.length)||"xref"==c||"trailer"==c?(f=[],k[c.split(" ")[0]]=f):null!=f&&f.push(c),c="")}null==b&&(b=Editor.extractGraphModelFromXref(k));null!=b&&(b=decodeURIComponent(b.replace(/\\\(/g,"(").replace(/\\\)/g,")")));return b};Editor.extractGraphModelFromXref=function(a){var c=a.trailer,b=null;null!=c&&(c=/.* \/Info (\d+) (\d+) R/g.exec(c.join("\n")),null!=c&&0<
c.length&&(c=a[c[1]],null!=c&&(c=/.* \/Subject (\d+) (\d+) R/g.exec(c.join("\n")),null!=c&&0<c.length&&(a=a[c[1]],null!=a&&(a=a.join("\n"),b=a.substring(1,a.length-1))))));return b};Editor.extractGraphModelFromPng=function(a){var c=null;try{var b=a.substring(a.indexOf(",")+1),e=window.atob&&!mxClient.IS_SF?atob(b):Base64.decode(b,!0);EditorUi.parsePng(e,mxUtils.bind(this,function(a,b,d){a=e.substring(a+8,a+8+d);"zTXt"==b?(d=a.indexOf(String.fromCharCode(0)),"mxGraphModel"==a.substring(0,d)&&(a=pako.inflateRaw(Graph.stringToArrayBuffer(a.substring(d+
2)),{to:"string"}).replace(/\+/g," "),null!=a&&0<a.length&&(c=a))):"tEXt"==b&&(a=a.split(String.fromCharCode(0)),1<a.length&&("mxGraphModel"==a[0]||"mxfile"==a[0])&&(c=a[1]));if(null!=c||"IDAT"==b)return!0}))}catch(L){}null!=c&&"%"==c.charAt(0)&&(c=decodeURIComponent(c));null!=c&&"%"==c.charAt(0)&&(c=decodeURIComponent(c));return c};Editor.extractParserError=function(a,c){var b=null,e=null!=a?a.getElementsByTagName("parsererror"):null;null!=e&&0<e.length&&(b=c||mxResources.get("invalidChars"),e=e[0].getElementsByTagName("div"),
0<e.length&&(b=mxUtils.getTextContent(e[0])));return null!=b?mxUtils.trim(b):b};Editor.addRetryToError=function(a,c){if(null!=a){var b=null!=a.error?a.error:a;null==b.retry&&(b.retry=c)}};Editor.configure=function(a,c){if(null!=a){Editor.config=a;Editor.configVersion=a.version;Menus.prototype.defaultFonts=a.defaultFonts||Menus.prototype.defaultFonts;ColorDialog.prototype.presetColors=a.presetColors||ColorDialog.prototype.presetColors;ColorDialog.prototype.defaultColors=a.defaultColors||ColorDialog.prototype.defaultColors;
ColorDialog.prototype.colorNames=a.colorNames||ColorDialog.prototype.colorNames;StyleFormatPanel.prototype.defaultColorSchemes=a.defaultColorSchemes||StyleFormatPanel.prototype.defaultColorSchemes;Graph.prototype.defaultEdgeLength=a.defaultEdgeLength||Graph.prototype.defaultEdgeLength;DrawioFile.prototype.autosaveDelay=a.autosaveDelay||DrawioFile.prototype.autosaveDelay;null!=a.templateFile&&(EditorUi.templateFile=a.templateFile);null!=a.styles&&(Editor.styles=a.styles);null!=a.globalVars&&(Editor.globalVars=
-a.globalVars);null!=a.compressXml&&(Editor.compressXml=a.compressXml);null!=a.simpleLabels&&(Editor.simpleLabels=a.simpleLabels);a.customFonts&&(Menus.prototype.defaultFonts=a.customFonts.concat(Menus.prototype.defaultFonts));a.customPresetColors&&(ColorDialog.prototype.presetColors=a.customPresetColors.concat(ColorDialog.prototype.presetColors));null!=a.customColorSchemes&&(StyleFormatPanel.prototype.defaultColorSchemes=a.customColorSchemes.concat(StyleFormatPanel.prototype.defaultColorSchemes));
+a.globalVars);null!=a.compressXml&&(Editor.compressXml=a.compressXml);null!=a.includeDiagram&&(Editor.defaultIncludeDiagram=a.includeDiagram);null!=a.simpleLabels&&(Editor.simpleLabels=a.simpleLabels);a.customFonts&&(Menus.prototype.defaultFonts=a.customFonts.concat(Menus.prototype.defaultFonts));a.customPresetColors&&(ColorDialog.prototype.presetColors=a.customPresetColors.concat(ColorDialog.prototype.presetColors));null!=a.customColorSchemes&&(StyleFormatPanel.prototype.defaultColorSchemes=a.customColorSchemes.concat(StyleFormatPanel.prototype.defaultColorSchemes));
if(null!=a.css){var b=document.createElement("style");b.setAttribute("type","text/css");b.appendChild(document.createTextNode(a.css));var e=document.getElementsByTagName("script")[0];e.parentNode.insertBefore(b,e)}null!=a.libraries&&(Sidebar.prototype.customEntries=a.libraries);null!=a.enabledLibraries&&(Sidebar.prototype.enabledLibraries=a.enabledLibraries);null!=a.defaultLibraries&&(Sidebar.prototype.defaultEntries=a.defaultLibraries);null!=a.defaultCustomLibraries&&(Editor.defaultCustomLibraries=
a.defaultCustomLibraries);null!=a.enableCustomLibraries&&(Editor.enableCustomLibraries=a.enableCustomLibraries);null!=a.defaultVertexStyle&&(Graph.prototype.defaultVertexStyle=a.defaultVertexStyle);null!=a.defaultEdgeStyle&&(Graph.prototype.defaultEdgeStyle=a.defaultEdgeStyle);null!=a.zoomFactor&&(b=parseFloat(a.zoomFactor),!isNaN(b)&&1<b&&(Graph.prototype.zoomFactor=b));null!=a.gridSteps&&(b=parseInt(a.gridSteps),!isNaN(b)&&0<b&&(mxGraphView.prototype.gridSteps=b));null!=a.pageFormat&&(b=parseInt(a.pageFormat.width),
e=parseInt(a.pageFormat.height),!isNaN(b)&&0<b&&!isNaN(e)&&0<e&&(mxGraph.prototype.defaultPageFormat=new mxRectangle(0,0,b,e),mxGraph.prototype.pageFormat=mxGraph.prototype.defaultPageFormat));a.thumbWidth&&(Sidebar.prototype.thumbWidth=a.thumbWidth);a.thumbHeight&&(Sidebar.prototype.thumbHeight=a.thumbHeight);a.emptyLibraryXml&&(EditorUi.prototype.emptyLibraryXml=a.emptyLibraryXml);a.sidebarWidth&&(EditorUi.prototype.hsplitPosition=a.sidebarWidth);a.fontCss&&Editor.configureFontCss(a.fontCss);null!=
@@ -3134,44 +3135,44 @@ null!=urlParams.edit?decodeURIComponent(urlParams.edit):null;Editor.prototype.cr
"default-style2";if("1"==urlParams.embed||null!=b&&""!=b)b!=this.graph.currentStyle&&(e=null!=this.graph.themes?this.graph.themes[b]:mxUtils.load(STYLE_PATH+"/"+b+".xml").getDocumentElement(),null!=e&&(d=new mxCodec(e.ownerDocument),d.decode(e,this.graph.getStylesheet())));else if(e=null!=this.graph.themes?this.graph.themes["default-old"]:mxUtils.load(STYLE_PATH+"/default-old.xml").getDocumentElement(),null!=e){var d=new mxCodec(e.ownerDocument);d.decode(e,this.graph.getStylesheet())}this.graph.currentStyle=
b;this.graph.mathEnabled="1"==urlParams.math||"1"==c.getAttribute("math");b=c.getAttribute("backgroundImage");null!=b?this.graph.setBackgroundImage(this.graph.parseBackgroundImage(b)):this.graph.setBackgroundImage(null);mxClient.NO_FO=this.graph.mathEnabled&&!this.useForeignObjectForMath?!0:this.originalNoForeignObject;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();this.graph.setShadowVisible("1"==c.getAttribute("shadow"),
!1);if(b=c.getAttribute("extFonts"))try{for(b=b.split("|").map(function(a){a=a.split("^");return{name:a[0],url:a[1]}}),e=0;e<b.length;e++)this.graph.addExtFont(b[e].name,b[e].url)}catch(L){console.log("ExtFonts format error: "+L.message)}else null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(this.graph.extFonts=[])}a.apply(this,arguments)}else throw{message:mxResources.get("notADiagramFile")||"Invalid data",toString:function(){return this.message}};};var b=Editor.prototype.getGraphXml;Editor.prototype.getGraphXml=
-function(a){a=null!=a?a:!0;var c=b.apply(this,arguments);null!=this.graph.currentStyle&&"default-style2"!=this.graph.currentStyle&&c.setAttribute("style",this.graph.currentStyle);var e=this.graph.getBackgroundImageObject(this.graph.backgroundImage);null!=e&&c.setAttribute("backgroundImage",JSON.stringify(e));c.setAttribute("math",this.graph.mathEnabled?"1":"0");c.setAttribute("shadow",this.graph.shadowVisible?"1":"0");null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(e=this.graph.extFonts.map(function(a){return a.name+
-"^"+a.url}),c.setAttribute("extFonts",e.join("|")));return c};Editor.prototype.isDataSvg=function(a){try{var c=mxUtils.parseXml(a).documentElement.getAttribute("content");if(null!=c&&(null!=c&&"<"!=c.charAt(0)&&"%"!=c.charAt(0)&&(c=unescape(window.atob?atob(c):Base64.decode(cont,c))),null!=c&&"%"==c.charAt(0)&&(c=decodeURIComponent(c)),null!=c&&0<c.length)){var b=mxUtils.parseXml(c).documentElement;return"mxfile"==b.nodeName||"mxGraphModel"==b.nodeName}}catch(J){}return!1};Editor.prototype.extractGraphModel=
+function(a,c){a=null!=a?a:!0;var e=b.apply(this,arguments);null!=this.graph.currentStyle&&"default-style2"!=this.graph.currentStyle&&e.setAttribute("style",this.graph.currentStyle);var d=this.graph.getBackgroundImageObject(this.graph.backgroundImage,c);null!=d&&e.setAttribute("backgroundImage",JSON.stringify(d));e.setAttribute("math",this.graph.mathEnabled?"1":"0");e.setAttribute("shadow",this.graph.shadowVisible?"1":"0");null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(d=this.graph.extFonts.map(function(a){return a.name+
+"^"+a.url}),e.setAttribute("extFonts",d.join("|")));return e};Editor.prototype.isDataSvg=function(a){try{var c=mxUtils.parseXml(a).documentElement.getAttribute("content");if(null!=c&&(null!=c&&"<"!=c.charAt(0)&&"%"!=c.charAt(0)&&(c=unescape(window.atob?atob(c):Base64.decode(cont,c))),null!=c&&"%"==c.charAt(0)&&(c=decodeURIComponent(c)),null!=c&&0<c.length)){var b=mxUtils.parseXml(c).documentElement;return"mxfile"==b.nodeName||"mxGraphModel"==b.nodeName}}catch(J){}return!1};Editor.prototype.extractGraphModel=
function(a,c,b){return Editor.extractGraphModel.apply(this,arguments)};var d=Editor.prototype.resetGraph;Editor.prototype.resetGraph=function(){this.graph.mathEnabled="1"==urlParams.math;this.graph.view.x0=null;this.graph.view.y0=null;mxClient.NO_FO=this.graph.mathEnabled&&!this.useForeignObjectForMath?!0:this.originalNoForeignObject;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();d.apply(this,arguments)};
-var k=Editor.prototype.updateGraphComponents;Editor.prototype.updateGraphComponents=function(){k.apply(this,arguments);mxClient.NO_FO=this.graph.mathEnabled&&!this.useForeignObjectForMath&&null!=Editor.MathJaxRender?!0:this.originalNoForeignObject;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform()};Editor.mathJaxWebkitCss="div.MathJax_SVG_Display { position: static; }\nspan.MathJax_SVG { position: static !important; }";
+var g=Editor.prototype.updateGraphComponents;Editor.prototype.updateGraphComponents=function(){g.apply(this,arguments);mxClient.NO_FO=this.graph.mathEnabled&&!this.useForeignObjectForMath&&null!=Editor.MathJaxRender?!0:this.originalNoForeignObject;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform()};Editor.mathJaxWebkitCss="div.MathJax_SVG_Display { position: static; }\nspan.MathJax_SVG { position: static !important; }";
Editor.initMath=function(a,c){if("undefined"===typeof window.MathJax){a=(null!=a?a:DRAW_MATH_URL+"/MathJax.js")+"?config=TeX-MML-AM_"+("html"==urlParams["math-output"]?"HTMLorMML":"SVG")+"-full";Editor.mathJaxQueue=[];Editor.doMathJaxRender=function(a){window.setTimeout(function(){"hidden"!=a.style.visibility&&MathJax.Hub.Queue(["Typeset",MathJax.Hub,a])},0)};var b=null!=urlParams["math-font"]?decodeURIComponent(urlParams["math-font"]):"TeX";c=null!=c?c:{"HTML-CSS":{availableFonts:[b],imageFont:null},
SVG:{font:b,useFontCache:!1},tex2jax:{ignoreClass:"mxCellEditor"},asciimath2jax:{ignoreClass:"mxCellEditor"}};window.MathJax={skipStartupTypeset:!0,showMathMenu:!1,messageStyle:"none",AuthorInit:function(){MathJax.Hub.Config(c);MathJax.Hub.Register.StartupHook("Begin",function(){for(var a=0;a<Editor.mathJaxQueue.length;a++)Editor.doMathJaxRender(Editor.mathJaxQueue[a])})}};Editor.MathJaxRender=function(a){"undefined"!==typeof MathJax&&"undefined"!==typeof MathJax.Hub?Editor.doMathJaxRender(a):Editor.mathJaxQueue.push(a)};
Editor.MathJaxClear=function(){Editor.mathJaxQueue=[]};var e=Editor.prototype.init;Editor.prototype.init=function(){e.apply(this,arguments);this.graph.addListener(mxEvent.SIZE,mxUtils.bind(this,function(a,c){null!=this.graph.container&&this.graph.mathEnabled&&!this.graph.blockMathRender&&Editor.MathJaxRender(this.graph.container)}))};b=document.getElementsByTagName("script");if(null!=b&&0<b.length){var d=document.createElement("script");d.setAttribute("type","text/javascript");d.setAttribute("src",
-a);b[0].parentNode.appendChild(d)}try{if(mxClient.IS_GC||mxClient.IS_SF){var g=document.createElement("style");g.type="text/css";g.innerHTML=Editor.mathJaxWebkitCss;document.getElementsByTagName("head")[0].appendChild(g)}}catch(Q){}}};Editor.prototype.csvToArray=function(a){if(!/^\s*(?:'[^'\\]*(?:\\[\S\s][^'\\]*)*'|"[^"\\]*(?:\\[\S\s][^"\\]*)*"|[^,'"\s\\]*(?:\s+[^,'"\s\\]+)*)\s*(?:,\s*(?:'[^'\\]*(?:\\[\S\s][^'\\]*)*'|"[^"\\]*(?:\\[\S\s][^"\\]*)*"|[^,'"\s\\]*(?:\s+[^,'"\s\\]+)*)\s*)*$/.test(a))return null;
+a);b[0].parentNode.appendChild(d)}try{if(mxClient.IS_GC||mxClient.IS_SF){var k=document.createElement("style");k.type="text/css";k.innerHTML=Editor.mathJaxWebkitCss;document.getElementsByTagName("head")[0].appendChild(k)}}catch(Q){}}};Editor.prototype.csvToArray=function(a){if(!/^\s*(?:'[^'\\]*(?:\\[\S\s][^'\\]*)*'|"[^"\\]*(?:\\[\S\s][^"\\]*)*"|[^,'"\s\\]*(?:\s+[^,'"\s\\]+)*)\s*(?:,\s*(?:'[^'\\]*(?:\\[\S\s][^'\\]*)*'|"[^"\\]*(?:\\[\S\s][^"\\]*)*"|[^,'"\s\\]*(?:\s+[^,'"\s\\]+)*)\s*)*$/.test(a))return null;
var c=[];a.replace(/(?!\s*$)\s*(?:'([^'\\]*(?:\\[\S\s][^'\\]*)*)'|"([^"\\]*(?:\\[\S\s][^"\\]*)*)"|([^,'"\s\\]*(?:\s+[^,'"\s\\]+)*))\s*(?:,|$)/g,function(a,b,e,d){void 0!==b?c.push(b.replace(/\\'/g,"'")):void 0!==e?c.push(e.replace(/\\"/g,'"')):void 0!==d&&c.push(d);return""});/,\s*$/.test(a)&&c.push("");return c};Editor.prototype.isCorsEnabledForUrl=function(a){if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)return!0;null!=urlParams.cors&&null==this.corsRegExp&&(this.corsRegExp=new RegExp(decodeURIComponent(urlParams.cors)));
return null!=this.corsRegExp&&this.corsRegExp.test(a)||"https://raw.githubusercontent.com/"===a.substring(0,34)};Editor.prototype.createImageUrlConverter=function(){var a=new mxUrlConverter;a.updateBaseUrl();var c=a.convert,b=this;a.convert=function(e){if(null!=e){var d="http://"==e.substring(0,7)||"https://"==e.substring(0,8);d&&!navigator.onLine?e=Editor.svgBrokenImage.src:!d||e.substring(0,a.baseUrl.length)==a.baseUrl||b.crossOriginImages&&b.isCorsEnabledForUrl(e)?"chrome-extension://"==e.substring(0,
19)||mxClient.IS_CHROMEAPP||(e=c.apply(this,arguments)):e=PROXY_URL+"?url="+encodeURIComponent(e)}return e};return a};Editor.createSvgDataUri=function(a){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(a)))};Editor.prototype.convertImageToDataUri=function(a,c){try{var b=!0,e=window.setTimeout(mxUtils.bind(this,function(){b=!1;c(Editor.svgBrokenImage.src)}),this.timeout);if(/(\.svg)$/i.test(a))mxUtils.get(a,mxUtils.bind(this,function(a){window.clearTimeout(e);b&&c(Editor.createSvgDataUri(a.getText()))}),
-function(){window.clearTimeout(e);b&&c(Editor.svgBrokenImage.src)});else{var d=new Image;this.crossOriginImages&&(d.crossOrigin="anonymous");d.onload=function(){window.clearTimeout(e);if(b)try{var a=document.createElement("canvas"),g=a.getContext("2d");a.height=d.height;a.width=d.width;g.drawImage(d,0,0);c(a.toDataURL())}catch(aa){c(Editor.svgBrokenImage.src)}};d.onerror=function(){window.clearTimeout(e);b&&c(Editor.svgBrokenImage.src)};d.src=a}}catch(W){c(Editor.svgBrokenImage.src)}};Editor.prototype.convertImages=
-function(a,c,b,e){null==e&&(e=this.createImageUrlConverter());var d=0,g=b||{};b=mxUtils.bind(this,function(b,f){for(var k=a.getElementsByTagName(b),l=0;l<k.length;l++)mxUtils.bind(this,function(b){try{if(null!=b){var k=e.convert(b.getAttribute(f));if(null!=k&&"data:"!=k.substring(0,5)){var l=g[k];null==l?(d++,this.convertImageToDataUri(k,function(e){null!=e&&(g[k]=e,b.setAttribute(f,e));d--;0==d&&c(a)})):b.setAttribute(f,l)}else null!=k&&b.setAttribute(f,k)}}catch(ca){}})(k[l])});b("image","xlink:href");
-b("img","src");0==d&&c(a)};Editor.base64Encode=function(a){for(var c="",b=0,e=a.length,d,g,f;b<e;){d=a.charCodeAt(b++)&255;if(b==e){c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(d>>2);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((d&3)<<4);c+="==";break}g=a.charCodeAt(b++);if(b==e){c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(d>>2);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((d&
-3)<<4|(g&240)>>4);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((g&15)<<2);c+="=";break}f=a.charCodeAt(b++);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(d>>2);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((d&3)<<4|(g&240)>>4);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((g&15)<<2|(f&192)>>6);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(f&63)}return c};
-Editor.prototype.loadUrl=function(a,c,b,e,d,g,f,k){try{var l=!f&&(e||/(\.png)($|\?)/i.test(a)||/(\.jpe?g)($|\?)/i.test(a)||/(\.gif)($|\?)/i.test(a)||/(\.pdf)($|\?)/i.test(a));d=null!=d?d:!0;var n=mxUtils.bind(this,function(){mxUtils.get(a,mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus()){if(null!=c){var e=a.getText();if(l){if((9==document.documentMode||10==document.documentMode)&&"undefined"!==typeof window.mxUtilsBinaryToArray){a=mxUtilsBinaryToArray(a.request.responseBody).toArray();
-for(var e=Array(a.length),d=0;d<a.length;d++)e[d]=String.fromCharCode(a[d]);e=e.join("")}g=null!=g?g:"data:image/png;base64,";e=g+Editor.base64Encode(e)}c(e)}}else null!=b&&(0==a.getStatus()?b({message:mxResources.get("accessDenied")},a):b({message:mxResources.get("error")+" "+a.getStatus()},a))}),function(a){null!=b&&b({message:mxResources.get("error")+" "+a.getStatus()})},l,this.timeout,function(){d&&null!=b&&b({code:App.ERROR_TIMEOUT,retry:n})},k)});n()}catch(ea){null!=b&&b(ea)}};Editor.prototype.absoluteCssFonts=
-function(a){var c=null;if(null!=a){var b=a.split("url(");if(0<b.length){c=[b[0]];a=window.location.pathname;var e=null!=a?a.lastIndexOf("/"):-1;0<=e&&(a=a.substring(0,e+1));var e=document.getElementsByTagName("base"),d=null;null!=e&&0<e.length&&(d=e[0].getAttribute("href"));for(var g=1;g<b.length;g++)if(e=b[g].indexOf(")"),0<e){var f=Editor.trimCssUrl(b[g].substring(0,e));this.graph.isRelativeUrl(f)&&(f=null!=d?d+f:window.location.protocol+"//"+window.location.hostname+("/"==f.charAt(0)?"":a)+f);
-c.push('url("'+f+'"'+b[g].substring(e))}else c.push(b[g])}else c=[a]}return null!=c?c.join(""):null};Editor.prototype.embedCssFonts=function(a,c){var b=a.split("url("),e=0;null==this.cachedFonts&&(this.cachedFonts={});var d=mxUtils.bind(this,function(){if(0==e){for(var a=[b[0]],d=1;d<b.length;d++){var g=b[d].indexOf(")");a.push('url("');a.push(this.cachedFonts[Editor.trimCssUrl(b[d].substring(0,g))]);a.push('"'+b[d].substring(g))}c(a.join(""))}});if(0<b.length){for(var g=1;g<b.length;g++){var f=b[g].indexOf(")"),
-k=null,l=b[g].indexOf("format(",f);0<l&&(k=Editor.trimCssUrl(b[g].substring(l+7,b[g].indexOf(")",l))));mxUtils.bind(this,function(a){if(null==this.cachedFonts[a]){this.cachedFonts[a]=a;e++;var c="application/x-font-ttf";if("svg"==k||/(\.svg)($|\?)/i.test(a))c="image/svg+xml";else if("otf"==k||"embedded-opentype"==k||/(\.otf)($|\?)/i.test(a))c="application/x-font-opentype";else if("woff"==k||/(\.woff)($|\?)/i.test(a))c="application/font-woff";else if("woff2"==k||/(\.woff2)($|\?)/i.test(a))c="application/font-woff2";
-else if("eot"==k||/(\.eot)($|\?)/i.test(a))c="application/vnd.ms-fontobject";else if("sfnt"==k||/(\.sfnt)($|\?)/i.test(a))c="application/font-sfnt";var b=a;/^https?:\/\//.test(b)&&!this.isCorsEnabledForUrl(b)&&(b=PROXY_URL+"?url="+encodeURIComponent(a));this.loadUrl(b,mxUtils.bind(this,function(c){this.cachedFonts[a]=c;e--;d()}),mxUtils.bind(this,function(a){e--;d()}),!0,null,"data:"+c+";charset=utf-8;base64,")}})(Editor.trimCssUrl(b[g].substring(0,f)),k)}d()}else c(a)};Editor.prototype.loadFonts=
-function(a){null!=this.fontCss&&null==this.resolvedFontCss?this.embedCssFonts(this.fontCss,mxUtils.bind(this,function(c){this.resolvedFontCss=c;a()})):a()};Editor.prototype.embedExtFonts=function(a){var c=this.graph.getCustomFonts();if(0<c.length){var b="",e=0;null==this.cachedGoogleFonts&&(this.cachedGoogleFonts={});for(var d=mxUtils.bind(this,function(){0==e&&this.embedCssFonts(b,a)}),g=0;g<c.length;g++)mxUtils.bind(this,function(a,c){Graph.isCssFontUrl(c)?null==this.cachedGoogleFonts[c]?(e++,this.loadUrl(c,
-mxUtils.bind(this,function(a){this.cachedGoogleFonts[c]=a;b+=a;e--;d()}),mxUtils.bind(this,function(a){e--;b+="@import url("+c+");";d()}))):b+=this.cachedGoogleFonts[c]:b+='@font-face {font-family: "'+a+'";src: url("'+c+'")}'})(c[g].name,c[g].url);d()}else a()};Editor.prototype.addMathCss=function(a){a=a.getElementsByTagName("defs");if(null!=a&&0<a.length)for(var c=document.getElementsByTagName("style"),b=0;b<c.length;b++)0<mxUtils.getTextContent(c[b]).indexOf("MathJax")&&a[0].appendChild(c[b].cloneNode(!0))};
+function(){window.clearTimeout(e);b&&c(Editor.svgBrokenImage.src)});else{var d=new Image;this.crossOriginImages&&(d.crossOrigin="anonymous");d.onload=function(){window.clearTimeout(e);if(b)try{var a=document.createElement("canvas"),k=a.getContext("2d");a.height=d.height;a.width=d.width;k.drawImage(d,0,0);c(a.toDataURL())}catch(Z){c(Editor.svgBrokenImage.src)}};d.onerror=function(){window.clearTimeout(e);b&&c(Editor.svgBrokenImage.src)};d.src=a}}catch(W){c(Editor.svgBrokenImage.src)}};Editor.prototype.convertImages=
+function(a,c,b,e){null==e&&(e=this.createImageUrlConverter());var d=0,k=b||{};b=mxUtils.bind(this,function(b,f){for(var g=a.getElementsByTagName(b),l=0;l<g.length;l++)mxUtils.bind(this,function(b){try{if(null!=b){var g=e.convert(b.getAttribute(f));if(null!=g&&"data:"!=g.substring(0,5)){var l=k[g];null==l?(d++,this.convertImageToDataUri(g,function(e){null!=e&&(k[g]=e,b.setAttribute(f,e));d--;0==d&&c(a)})):b.setAttribute(f,l)}else null!=g&&b.setAttribute(f,g)}}catch(ba){}})(g[l])});b("image","xlink:href");
+b("img","src");0==d&&c(a)};Editor.base64Encode=function(a){for(var c="",b=0,e=a.length,d,k,f;b<e;){d=a.charCodeAt(b++)&255;if(b==e){c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(d>>2);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((d&3)<<4);c+="==";break}k=a.charCodeAt(b++);if(b==e){c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(d>>2);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((d&
+3)<<4|(k&240)>>4);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((k&15)<<2);c+="=";break}f=a.charCodeAt(b++);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(d>>2);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((d&3)<<4|(k&240)>>4);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((k&15)<<2|(f&192)>>6);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(f&63)}return c};
+Editor.prototype.loadUrl=function(a,c,b,e,d,k,f,g){try{var l=!f&&(e||/(\.png)($|\?)/i.test(a)||/(\.jpe?g)($|\?)/i.test(a)||/(\.gif)($|\?)/i.test(a)||/(\.pdf)($|\?)/i.test(a));d=null!=d?d:!0;var n=mxUtils.bind(this,function(){mxUtils.get(a,mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus()){if(null!=c){var e=a.getText();if(l){if((9==document.documentMode||10==document.documentMode)&&"undefined"!==typeof window.mxUtilsBinaryToArray){a=mxUtilsBinaryToArray(a.request.responseBody).toArray();
+for(var e=Array(a.length),d=0;d<a.length;d++)e[d]=String.fromCharCode(a[d]);e=e.join("")}k=null!=k?k:"data:image/png;base64,";e=k+Editor.base64Encode(e)}c(e)}}else null!=b&&(0==a.getStatus()?b({message:mxResources.get("accessDenied")},a):b({message:mxResources.get("error")+" "+a.getStatus()},a))}),function(a){null!=b&&b({message:mxResources.get("error")+" "+a.getStatus()})},l,this.timeout,function(){d&&null!=b&&b({code:App.ERROR_TIMEOUT,retry:n})},g)});n()}catch(da){null!=b&&b(da)}};Editor.prototype.absoluteCssFonts=
+function(a){var c=null;if(null!=a){var b=a.split("url(");if(0<b.length){c=[b[0]];a=window.location.pathname;var e=null!=a?a.lastIndexOf("/"):-1;0<=e&&(a=a.substring(0,e+1));var e=document.getElementsByTagName("base"),d=null;null!=e&&0<e.length&&(d=e[0].getAttribute("href"));for(var k=1;k<b.length;k++)if(e=b[k].indexOf(")"),0<e){var f=Editor.trimCssUrl(b[k].substring(0,e));this.graph.isRelativeUrl(f)&&(f=null!=d?d+f:window.location.protocol+"//"+window.location.hostname+("/"==f.charAt(0)?"":a)+f);
+c.push('url("'+f+'"'+b[k].substring(e))}else c.push(b[k])}else c=[a]}return null!=c?c.join(""):null};Editor.prototype.embedCssFonts=function(a,c){var b=a.split("url("),e=0;null==this.cachedFonts&&(this.cachedFonts={});var d=mxUtils.bind(this,function(){if(0==e){for(var a=[b[0]],d=1;d<b.length;d++){var k=b[d].indexOf(")");a.push('url("');a.push(this.cachedFonts[Editor.trimCssUrl(b[d].substring(0,k))]);a.push('"'+b[d].substring(k))}c(a.join(""))}});if(0<b.length){for(var k=1;k<b.length;k++){var f=b[k].indexOf(")"),
+g=null,l=b[k].indexOf("format(",f);0<l&&(g=Editor.trimCssUrl(b[k].substring(l+7,b[k].indexOf(")",l))));mxUtils.bind(this,function(a){if(null==this.cachedFonts[a]){this.cachedFonts[a]=a;e++;var c="application/x-font-ttf";if("svg"==g||/(\.svg)($|\?)/i.test(a))c="image/svg+xml";else if("otf"==g||"embedded-opentype"==g||/(\.otf)($|\?)/i.test(a))c="application/x-font-opentype";else if("woff"==g||/(\.woff)($|\?)/i.test(a))c="application/font-woff";else if("woff2"==g||/(\.woff2)($|\?)/i.test(a))c="application/font-woff2";
+else if("eot"==g||/(\.eot)($|\?)/i.test(a))c="application/vnd.ms-fontobject";else if("sfnt"==g||/(\.sfnt)($|\?)/i.test(a))c="application/font-sfnt";var b=a;/^https?:\/\//.test(b)&&!this.isCorsEnabledForUrl(b)&&(b=PROXY_URL+"?url="+encodeURIComponent(a));this.loadUrl(b,mxUtils.bind(this,function(c){this.cachedFonts[a]=c;e--;d()}),mxUtils.bind(this,function(a){e--;d()}),!0,null,"data:"+c+";charset=utf-8;base64,")}})(Editor.trimCssUrl(b[k].substring(0,f)),g)}d()}else c(a)};Editor.prototype.loadFonts=
+function(a){null!=this.fontCss&&null==this.resolvedFontCss?this.embedCssFonts(this.fontCss,mxUtils.bind(this,function(c){this.resolvedFontCss=c;a()})):a()};Editor.prototype.embedExtFonts=function(a){var c=this.graph.getCustomFonts();if(0<c.length){var b="",e=0;null==this.cachedGoogleFonts&&(this.cachedGoogleFonts={});for(var d=mxUtils.bind(this,function(){0==e&&this.embedCssFonts(b,a)}),k=0;k<c.length;k++)mxUtils.bind(this,function(a,c){Graph.isCssFontUrl(c)?null==this.cachedGoogleFonts[c]?(e++,this.loadUrl(c,
+mxUtils.bind(this,function(a){this.cachedGoogleFonts[c]=a;b+=a;e--;d()}),mxUtils.bind(this,function(a){e--;b+="@import url("+c+");";d()}))):b+=this.cachedGoogleFonts[c]:b+='@font-face {font-family: "'+a+'";src: url("'+c+'")}'})(c[k].name,c[k].url);d()}else a()};Editor.prototype.addMathCss=function(a){a=a.getElementsByTagName("defs");if(null!=a&&0<a.length)for(var c=document.getElementsByTagName("style"),b=0;b<c.length;b++)0<mxUtils.getTextContent(c[b]).indexOf("MathJax")&&a[0].appendChild(c[b].cloneNode(!0))};
Editor.prototype.addFontCss=function(a,c){c=null!=c?c:this.absoluteCssFonts(this.fontCss);if(null!=c){var b=a.getElementsByTagName("defs"),e=a.ownerDocument;0==b.length?(b=null!=e.createElementNS?e.createElementNS(mxConstants.NS_SVG,"defs"):e.createElement("defs"),null!=a.firstChild?a.insertBefore(b,a.firstChild):a.appendChild(b)):b=b[0];e=null!=e.createElementNS?e.createElementNS(mxConstants.NS_SVG,"style"):e.createElement("style");e.setAttribute("type","text/css");mxUtils.setTextContent(e,c);b.appendChild(e)}};
-Editor.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||this.useCanvasForExport};Editor.prototype.getMaxCanvasScale=function(a,c,b){var e=mxClient.IS_FF?8192:16384;return Math.min(b,Math.min(e/a,e/c))};Editor.prototype.exportToCanvas=function(a,c,b,e,d,g,f,k,l,n,q,m,u,t,x,p,z,A){try{g=null!=g?g:!0;f=null!=f?f:!0;m=null!=m?m:this.graph;u=null!=u?u:0;var v=l?null:m.background;v==mxConstants.NONE&&(v=null);null==v&&(v=e);null==v&&0==l&&(v=p?this.graph.defaultPageBackgroundColor:"#ffffff");
-this.convertImages(m.getSvg(null,null,u,t,null,f,null,null,null,n,null,p,z,A),mxUtils.bind(this,function(b){try{var e=new Image;e.onload=mxUtils.bind(this,function(){try{var f=function(){mxClient.IS_SF?window.setTimeout(function(){t.drawImage(e,0,0);a(l,b)},0):(t.drawImage(e,0,0),a(l,b))},l=document.createElement("canvas"),n=parseInt(b.getAttribute("width")),q=parseInt(b.getAttribute("height"));k=null!=k?k:1;null!=c&&(k=g?Math.min(1,Math.min(3*c/(4*q),c/n)):c/n);k=this.getMaxCanvasScale(n,q,k);n=
-Math.ceil(k*n);q=Math.ceil(k*q);l.setAttribute("width",n);l.setAttribute("height",q);var t=l.getContext("2d");null!=v&&(t.beginPath(),t.rect(0,0,n,q),t.fillStyle=v,t.fill());1!=k&&t.scale(k,k);if(x){var p=m.view,z=p.scale;p.scale=1;var D=btoa(unescape(encodeURIComponent(p.createSvgGrid(p.gridColor))));p.scale=z;var D="data:image/svg+xml;base64,"+D,B=m.gridSize*p.gridSteps*k,A=m.getGraphBounds(),C=p.translate.x*z,N=p.translate.y*z,L=C+(A.x-C)/z-u,E=N+(A.y-N)/z-u,J=new Image;J.onload=function(){try{for(var a=
--Math.round(B-mxUtils.mod((C-L)*k,B)),c=-Math.round(B-mxUtils.mod((N-E)*k,B));a<n;a+=B)for(var b=c;b<q;b+=B)t.drawImage(J,a/k,b/k);f()}catch(xa){null!=d&&d(xa)}};J.onerror=function(a){null!=d&&d(a)};J.src=D}else f()}catch(wa){null!=d&&d(wa)}});e.onerror=function(a){null!=d&&d(a)};n&&this.graph.addSvgShadow(b);this.graph.mathEnabled&&this.addMathCss(b);var f=mxUtils.bind(this,function(){try{null!=this.resolvedFontCss&&this.addFontCss(b,this.resolvedFontCss),e.src=Editor.createSvgDataUri(mxUtils.getXml(b))}catch(R){null!=
-d&&d(R)}});this.embedExtFonts(mxUtils.bind(this,function(a){try{null!=a&&this.addFontCss(b,a),this.loadFonts(f)}catch(ka){null!=d&&d(ka)}}))}catch(R){null!=d&&d(R)}}),b,q)}catch(da){null!=d&&d(da)}};Editor.crcTable=[];for(var f=0;256>f;f++)for(var m=f,p=0;8>p;p++)m=1==(m&1)?3988292384^m>>>1:m>>>1,Editor.crcTable[f]=m;Editor.updateCRC=function(a,c,b,e){for(var d=0;d<e;d++)a=Editor.crcTable[(a^c.charCodeAt(b+d))&255]^a>>>8;return a};Editor.crc32=function(a){for(var c=-1,b=0;b<a.length;b++)c=c>>>8^Editor.crcTable[(c^
-a.charCodeAt(b))&255];return(c^-1)>>>0};Editor.writeGraphModelToPng=function(a,c,b,e,d){function g(a,c){var b=l;l+=c;return a.substring(b,l)}function f(a){a=g(a,4);return a.charCodeAt(3)+(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}function k(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)}a=a.substring(a.indexOf(",")+1);a=window.atob?atob(a):Base64.decode(a,!0);var l=0;if(g(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=d&&d();else if(g(a,
-4),"IHDR"!=g(a,4))null!=d&&d();else{g(a,17);d=a.substring(0,l);do{var n=f(a);if("IDAT"==g(a,4)){d=a.substring(0,l-8);"pHYs"==c&&"dpi"==b?(b=Math.round(e/.0254),b=k(b)+k(b)+String.fromCharCode(1)):b=b+String.fromCharCode(0)+("zTXt"==c?String.fromCharCode(0):"")+e;e=4294967295;e=Editor.updateCRC(e,c,0,4);e=Editor.updateCRC(e,b,0,b.length);d+=k(b.length)+c+b+k(e^4294967295);d+=a.substring(l-8,a.length);break}d+=a.substring(l-8,l-4+n);g(a,n);g(a,4)}while(n);return"data:image/png;base64,"+(window.btoa?
+Editor.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||this.useCanvasForExport};Editor.prototype.getMaxCanvasScale=function(a,c,b){var e=mxClient.IS_FF?8192:16384;return Math.min(b,Math.min(e/a,e/c))};Editor.prototype.exportToCanvas=function(a,c,b,e,d,k,f,g,l,n,q,u,t,m,x,p,z,A){try{k=null!=k?k:!0;f=null!=f?f:!0;u=null!=u?u:this.graph;t=null!=t?t:0;var v=l?null:u.background;v==mxConstants.NONE&&(v=null);null==v&&(v=e);null==v&&0==l&&(v=p?this.graph.defaultPageBackgroundColor:"#ffffff");
+this.convertImages(u.getSvg(null,null,t,m,null,f,null,null,null,n,null,p,z,A),mxUtils.bind(this,function(b){try{var e=new Image;e.onload=mxUtils.bind(this,function(){try{var f=function(){mxClient.IS_SF?window.setTimeout(function(){m.drawImage(e,0,0);a(l,b)},0):(m.drawImage(e,0,0),a(l,b))},l=document.createElement("canvas"),n=parseInt(b.getAttribute("width")),q=parseInt(b.getAttribute("height"));g=null!=g?g:1;null!=c&&(g=k?Math.min(1,Math.min(3*c/(4*q),c/n)):c/n);g=this.getMaxCanvasScale(n,q,g);n=
+Math.ceil(g*n);q=Math.ceil(g*q);l.setAttribute("width",n);l.setAttribute("height",q);var m=l.getContext("2d");null!=v&&(m.beginPath(),m.rect(0,0,n,q),m.fillStyle=v,m.fill());1!=g&&m.scale(g,g);if(x){var p=u.view,z=p.scale;p.scale=1;var B=btoa(unescape(encodeURIComponent(p.createSvgGrid(p.gridColor))));p.scale=z;var B="data:image/svg+xml;base64,"+B,C=u.gridSize*p.gridSteps*g,A=u.getGraphBounds(),D=p.translate.x*z,N=p.translate.y*z,L=D+(A.x-D)/z-t,E=N+(A.y-N)/z-t,J=new Image;J.onload=function(){try{for(var a=
+-Math.round(C-mxUtils.mod((D-L)*g,C)),c=-Math.round(C-mxUtils.mod((N-E)*g,C));a<n;a+=C)for(var b=c;b<q;b+=C)m.drawImage(J,a/g,b/g);f()}catch(wa){null!=d&&d(wa)}};J.onerror=function(a){null!=d&&d(a)};J.src=B}else f()}catch(va){null!=d&&d(va)}});e.onerror=function(a){null!=d&&d(a)};n&&this.graph.addSvgShadow(b);this.graph.mathEnabled&&this.addMathCss(b);var f=mxUtils.bind(this,function(){try{null!=this.resolvedFontCss&&this.addFontCss(b,this.resolvedFontCss),e.src=Editor.createSvgDataUri(mxUtils.getXml(b))}catch(R){null!=
+d&&d(R)}});this.embedExtFonts(mxUtils.bind(this,function(a){try{null!=a&&this.addFontCss(b,a),this.loadFonts(f)}catch(ka){null!=d&&d(ka)}}))}catch(R){null!=d&&d(R)}}),b,q)}catch(ca){null!=d&&d(ca)}};Editor.crcTable=[];for(var f=0;256>f;f++)for(var m=f,p=0;8>p;p++)m=1==(m&1)?3988292384^m>>>1:m>>>1,Editor.crcTable[f]=m;Editor.updateCRC=function(a,c,b,e){for(var d=0;d<e;d++)a=Editor.crcTable[(a^c.charCodeAt(b+d))&255]^a>>>8;return a};Editor.crc32=function(a){for(var c=-1,b=0;b<a.length;b++)c=c>>>8^Editor.crcTable[(c^
+a.charCodeAt(b))&255];return(c^-1)>>>0};Editor.writeGraphModelToPng=function(a,c,b,e,d){function k(a,c){var b=l;l+=c;return a.substring(b,l)}function f(a){a=k(a,4);return a.charCodeAt(3)+(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}function g(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)}a=a.substring(a.indexOf(",")+1);a=window.atob?atob(a):Base64.decode(a,!0);var l=0;if(k(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=d&&d();else if(k(a,
+4),"IHDR"!=k(a,4))null!=d&&d();else{k(a,17);d=a.substring(0,l);do{var n=f(a);if("IDAT"==k(a,4)){d=a.substring(0,l-8);"pHYs"==c&&"dpi"==b?(b=Math.round(e/.0254),b=g(b)+g(b)+String.fromCharCode(1)):b=b+String.fromCharCode(0)+("zTXt"==c?String.fromCharCode(0):"")+e;e=4294967295;e=Editor.updateCRC(e,c,0,4);e=Editor.updateCRC(e,b,0,b.length);d+=g(b.length)+c+b+g(e^4294967295);d+=a.substring(l-8,a.length);break}d+=a.substring(l-8,l-4+n);k(a,n);k(a,4)}while(n);return"data:image/png;base64,"+(window.btoa?
btoa(d):Base64.encode(d,!0))}};if(window.ColorDialog){FilenameDialog.filenameHelpLink="https://www.diagrams.net/doc/faq/save-file-formats";var c=ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(a,b){c.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()};var e=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=function(){e.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()}}window.EditDataDialog&&
-(EditDataDialog.getDisplayIdForCell=function(a,c){var b=null;null!=a.editor.graph.getModel().getParent(c)?b=c.getId():null!=a.currentPage&&(b=a.currentPage.getId());return b});if(null!=window.StyleFormatPanel){var g=Format.prototype.init;Format.prototype.init=function(){g.apply(this,arguments);this.editorUi.editor.addListener("fileLoaded",this.update)};var n=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed||this.editorUi.editor.chromeless?
+(EditDataDialog.getDisplayIdForCell=function(a,c){var b=null;null!=a.editor.graph.getModel().getParent(c)?b=c.getId():null!=a.currentPage&&(b=a.currentPage.getId());return b});if(null!=window.StyleFormatPanel){var k=Format.prototype.init;Format.prototype.init=function(){k.apply(this,arguments);this.editorUi.editor.addListener("fileLoaded",this.update)};var n=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed||this.editorUi.editor.chromeless?
n.apply(this,arguments):this.clear()};DiagramFormatPanel.prototype.isShadowOptionVisible=function(){var a=this.editorUi.getCurrentFile();return"1"==urlParams.embed||null!=a&&a.isEditable()};DiagramFormatPanel.prototype.isMathOptionVisible=function(a){return!1};var l=DiagramFormatPanel.prototype.addView;DiagramFormatPanel.prototype.addView=function(a){a=l.apply(this,arguments);this.editorUi.getCurrentFile();if(mxClient.IS_SVG&&this.isShadowOptionVisible()){var c=this.editorUi,b=c.editor.graph,e=this.createOption(mxResources.get("shadow"),
function(){return b.shadowVisible},function(a){var e=new ChangePageSetup(c);e.ignoreColor=!0;e.ignoreImage=!0;e.shadowVisible=a;b.model.execute(e)},{install:function(a){this.listener=function(){a(b.shadowVisible)};c.addListener("shadowVisibleChanged",this.listener)},destroy:function(){c.removeListener(this.listener)}});Editor.shadowOptionEnabled||(e.getElementsByTagName("input")[0].setAttribute("disabled","disabled"),mxUtils.setOpacity(e,60));a.appendChild(e)}return a};var q=DiagramFormatPanel.prototype.addOptions;
DiagramFormatPanel.prototype.addOptions=function(a){a=q.apply(this,arguments);var c=this.editorUi,b=c.editor.graph;if(b.isEnabled()){var e=c.getCurrentFile();if(null!=e&&e.isAutosaveOptional()){var d=this.createOption(mxResources.get("autosave"),function(){return c.editor.autosave},function(a){c.editor.setAutosave(a);c.editor.autosave&&e.isModified()&&e.fileChanged()},{install:function(a){this.listener=function(){a(c.editor.autosave)};c.editor.addListener("autosaveChanged",this.listener)},destroy:function(){c.editor.removeListener(this.listener)}});
-a.appendChild(d)}}if(this.isMathOptionVisible()&&b.isEnabled()&&"undefined"!==typeof MathJax){d=this.createOption(mxResources.get("mathematicalTypesetting"),function(){return b.mathEnabled},function(a){c.actions.get("mathematicalTypesetting").funct()},{install:function(a){this.listener=function(){a(b.mathEnabled)};c.addListener("mathEnabledChanged",this.listener)},destroy:function(){c.removeListener(this.listener)}});d.style.paddingTop="5px";a.appendChild(d);var g=c.menus.createHelpLink("https://www.diagrams.net/doc/faq/math-typesetting");
-g.style.position="relative";g.style.marginLeft="6px";g.style.top="2px";d.appendChild(g)}return a};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=
+a.appendChild(d)}}if(this.isMathOptionVisible()&&b.isEnabled()&&"undefined"!==typeof MathJax){d=this.createOption(mxResources.get("mathematicalTypesetting"),function(){return b.mathEnabled},function(a){c.actions.get("mathematicalTypesetting").funct()},{install:function(a){this.listener=function(){a(b.mathEnabled)};c.addListener("mathEnabledChanged",this.listener)},destroy:function(){c.removeListener(this.listener)}});d.style.paddingTop="5px";a.appendChild(d);var k=c.menus.createHelpLink("https://www.diagrams.net/doc/faq/math-typesetting");
+k.style.position="relative";k.style.marginLeft="6px";k.style.top="2px";d.appendChild(k)}return a};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=
@@ -3193,38 +3194,38 @@ stroke:"#6c8ebf"},{fill:"#d5e8d4",stroke:"#82b366"},{fill:"#ffe6cc",stroke:"#d79
{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(a,c,b){if(null!=c){var e=function(a){if(null!=a)if(b)for(var e=
-0;e<a.length;e++)c[a[e].name]=a[e];else for(var d in c){for(var g=!1,e=0;e<a.length;e++)if(a[e].name==d&&a[e].type==c[d].type){g=!0;break}g||delete c[d]}},d=this.editorUi.editor.graph.view.getState(a);null!=d&&null!=d.shape&&(d.shape.commonCustomPropAdded||(d.shape.commonCustomPropAdded=!0,d.shape.customProperties=d.shape.customProperties||[],d.cell.vertex?Array.prototype.push.apply(d.shape.customProperties,Editor.commonVertexProperties):Array.prototype.push.apply(d.shape.customProperties,Editor.commonEdgeProperties)),
+0;e<a.length;e++)c[a[e].name]=a[e];else for(var d in c){for(var k=!1,e=0;e<a.length;e++)if(a[e].name==d&&a[e].type==c[d].type){k=!0;break}k||delete c[d]}},d=this.editorUi.editor.graph.view.getState(a);null!=d&&null!=d.shape&&(d.shape.commonCustomPropAdded||(d.shape.commonCustomPropAdded=!0,d.shape.customProperties=d.shape.customProperties||[],d.cell.vertex?Array.prototype.push.apply(d.shape.customProperties,Editor.commonVertexProperties):Array.prototype.push.apply(d.shape.customProperties,Editor.commonEdgeProperties)),
e(d.shape.customProperties));a=a.getAttribute("customProperties");if(null!=a)try{e(JSON.parse(a))}catch(W){}}};var u=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){var a=this.format.getSelectionState();"image"!=a.style.shape&&!a.containsLabel&&0<a.cells.length&&this.container.appendChild(this.addStyles(this.createPanel()));u.apply(this,arguments);if(Editor.enableCustomProperties){for(var c={},b=a.vertices,e=a.edges,d=0;d<b.length;d++)this.findCommonProperties(b[d],c,0==
d);for(d=0;d<e.length;d++)this.findCommonProperties(e[d],c,0==b.length&&0==d);null!=Object.getOwnPropertyNames&&0<Object.getOwnPropertyNames(c).length&&this.container.appendChild(this.addProperties(this.createPanel(),c,a))}};var t=StyleFormatPanel.prototype.addStyleOps;StyleFormatPanel.prototype.addStyleOps=function(a){var c=this.format.getSelectionState(),b=mxUtils.button(mxResources.get("copyStyle"),mxUtils.bind(this,function(a){this.editorUi.actions.get("copyStyle").funct()}));b.setAttribute("title",
mxResources.get("copyStyle")+" ("+this.editorUi.actions.get("copyStyle").shortcut+")");b.style.marginBottom="2px";b.style.width="100px";b.style.marginRight="2px";a.appendChild(b);0<c.cells.length?(b=mxUtils.button(mxResources.get("pasteStyle"),mxUtils.bind(this,function(a){this.editorUi.actions.get("pasteStyle").funct()})),b.setAttribute("title",mxResources.get("pasteStyle")+" ("+this.editorUi.actions.get("pasteStyle").shortcut+")"),b.style.marginBottom="2px",b.style.width="100px",a.appendChild(b)):
-b.style.width="202px";mxUtils.br(a);return t.apply(this,arguments)};EditorUi.prototype.propertiesCollapsed=!0;StyleFormatPanel.prototype.addProperties=function(a,c,b){function e(a,c,b,e){m.getModel().beginUpdate();try{var d=[],g=[];if(null!=b.index){for(var f=[],k=b.parentRow.nextSibling;k&&k.getAttribute("data-pName")==a;)f.push(k.getAttribute("data-pValue")),k=k.nextSibling;b.index<f.length?null!=e?f.splice(e,1):f[b.index]=c:f.push(c);null!=b.size&&f.length>b.size&&(f=f.slice(0,b.size));c=f.join(",");
-null!=b.countProperty&&(m.setCellStyles(b.countProperty,f.length,m.getSelectionCells()),d.push(b.countProperty),g.push(f.length))}m.setCellStyles(a,c,m.getSelectionCells());d.push(a);g.push(c);if(null!=b.dependentProps)for(a=0;a<b.dependentProps.length;a++){var l=b.dependentPropsDefVal[a],n=b.dependentPropsVals[a];if(n.length>c)n=n.slice(0,c);else for(var u=n.length;u<c;u++)n.push(l);n=n.join(",");m.setCellStyles(b.dependentProps[a],n,m.getSelectionCells());d.push(b.dependentProps[a]);g.push(n)}if("function"==
-typeof b.onChange)b.onChange(m,c);q.editorUi.fireEvent(new mxEventObject("styleChanged","keys",d,"values",g,"cells",m.getSelectionCells()))}finally{m.getModel().endUpdate()}}function d(c,b,e){var d=mxUtils.getOffset(a,!0),g=mxUtils.getOffset(c,!0);b.style.position="absolute";b.style.left=g.x-d.x+"px";b.style.top=g.y-d.y+"px";b.style.width=c.offsetWidth+"px";b.style.height=c.offsetHeight-(e?4:0)+"px";b.style.zIndex=5}function g(a,c,b){var d=document.createElement("div");d.style.width="32px";d.style.height=
-"4px";d.style.margin="2px";d.style.border="1px solid black";d.style.background=c&&"none"!=c?c:"url('"+Dialog.prototype.noColorImage+"')";btn=mxUtils.button("",mxUtils.bind(q,function(g){this.editorUi.pickColor(c,function(c){d.style.background="none"==c?"url('"+Dialog.prototype.noColorImage+"')":c;e(a,c,b)});mxEvent.consume(g)}));btn.style.height="12px";btn.style.width="40px";btn.className="geColorBtn";btn.appendChild(d);return btn}function f(a,c,b,d,g,f,k){null!=c&&(c=c.split(","),u.push({name:a,
-values:c,type:b,defVal:d,countProperty:g,parentRow:f,isDeletable:!0,flipBkg:k}));btn=mxUtils.button("+",mxUtils.bind(q,function(c){for(var l=f,q=0;null!=l.nextSibling;)if(l.nextSibling.getAttribute("data-pName")==a)l=l.nextSibling,q++;else break;var m={type:b,parentRow:f,index:q,isDeletable:!0,defVal:d,countProperty:g},q=n(a,"",m,0==q%2,k);e(a,d,m);l.parentNode.insertBefore(q,l.nextSibling);mxEvent.consume(c)}));btn.style.height="16px";btn.style.width="25px";btn.className="geColorBtn";return btn}
-function k(a,c,b,e,d,g,f){if(0<d){var k=Array(d);c=null!=c?c.split(","):[];for(var l=0;l<d;l++)k[l]=null!=c[l]?c[l]:null!=e?e:"";u.push({name:a,values:k,type:b,defVal:e,parentRow:g,flipBkg:f,size:d})}return document.createElement("div")}function l(a,c,b){var d=document.createElement("input");d.type="checkbox";d.checked="1"==c;mxEvent.addListener(d,"change",function(){e(a,d.checked?"1":"0",b)});return d}function n(c,b,n,m,u){var v=n.dispName,t=n.type,x=document.createElement("tr");x.className="gePropRow"+
-(u?"Dark":"")+(m?"Alt":"")+" gePropNonHeaderRow";x.setAttribute("data-pName",c);x.setAttribute("data-pValue",b);m=!1;null!=n.index&&(x.setAttribute("data-index",n.index),v=(null!=v?v:"")+"["+n.index+"]",m=!0);var p=document.createElement("td");p.className="gePropRowCell";p.innerHTML=mxUtils.htmlEntities(mxResources.get(v,null,v));m&&(p.style.textAlign="right");x.appendChild(p);p=document.createElement("td");p.className="gePropRowCell";if("color"==t)p.appendChild(g(c,b,n));else if("bool"==t||"boolean"==
-t)p.appendChild(l(c,b,n));else if("enum"==t){var z=n.enumList;for(u=0;u<z.length;u++)if(v=z[u],v.val==b){p.innerHTML=mxUtils.htmlEntities(mxResources.get(v.dispName,null,v.dispName));break}mxEvent.addListener(p,"click",mxUtils.bind(q,function(){var g=document.createElement("select");d(p,g);for(var f=0;f<z.length;f++){var k=z[f],l=document.createElement("option");l.value=mxUtils.htmlEntities(k.val);l.innerHTML=mxUtils.htmlEntities(mxResources.get(k.dispName,null,k.dispName));g.appendChild(l)}g.value=
-b;a.appendChild(g);mxEvent.addListener(g,"change",function(){var a=mxUtils.htmlEntities(g.value);e(c,a,n)});g.focus();mxEvent.addListener(g,"blur",function(){a.removeChild(g)})}))}else"dynamicArr"==t?p.appendChild(f(c,b,n.subType,n.subDefVal,n.countProperty,x,u)):"staticArr"==t?p.appendChild(k(c,b,n.subType,n.subDefVal,n.size,x,u)):"readOnly"==t?(u=document.createElement("input"),u.setAttribute("readonly",""),u.value=b,u.style.width="96px",u.style.borderWidth="0px",p.appendChild(u)):(p.innerHTML=
-b,mxEvent.addListener(p,"click",mxUtils.bind(q,function(){function g(){var a=f.value,a=0==a.length&&"string"!=t?0:a;n.allowAuto&&(null!=a.trim&&"auto"==a.trim().toLowerCase()?(a="auto",t="string"):(a=parseFloat(a),a=isNaN(a)?0:a));null!=n.min&&a<n.min?a=n.min:null!=n.max&&a>n.max&&(a=n.max);a=mxUtils.htmlEntities(("int"==t?parseInt(a):a)+"");e(c,a,n)}var f=document.createElement("input");d(p,f,!0);f.value=b;f.className="gePropEditor";"int"!=t&&"float"!=t||n.allowAuto||(f.type="number",f.step="int"==
-t?"1":"any",null!=n.min&&(f.min=parseFloat(n.min)),null!=n.max&&(f.max=parseFloat(n.max)));a.appendChild(f);mxEvent.addListener(f,"keypress",function(a){13==a.keyCode&&g()});f.focus();mxEvent.addListener(f,"blur",function(){g()})})));n.isDeletable&&(u=mxUtils.button("-",mxUtils.bind(q,function(a){e(c,"",n,n.index);mxEvent.consume(a)})),u.style.height="16px",u.style.width="25px",u.style["float"]="right",u.className="geColorBtn",p.appendChild(u));x.appendChild(p);return x}var q=this,m=this.editorUi.editor.graph,
-u=[];a.style.position="relative";a.style.padding="0";var v=document.createElement("table");v.className="geProperties";v.style.whiteSpace="nowrap";v.style.width="100%";var t=document.createElement("tr");t.className="gePropHeader";var x=document.createElement("th");x.className="gePropHeaderCell";var p=document.createElement("img");p.src=Sidebar.prototype.expandedImage;x.appendChild(p);mxUtils.write(x,mxResources.get("property"));t.style.cursor="pointer";var z=function(){var c=v.querySelectorAll(".gePropNonHeaderRow"),
-b;if(q.editorUi.propertiesCollapsed){p.src=Sidebar.prototype.collapsedImage;b="none";for(var e=a.childNodes.length-1;0<=e;e--)try{var d=a.childNodes[e],g=d.nodeName.toUpperCase();"INPUT"!=g&&"SELECT"!=g||a.removeChild(d)}catch(ya){}}else p.src=Sidebar.prototype.expandedImage,b="";for(e=0;e<c.length;e++)c[e].style.display=b};mxEvent.addListener(t,"click",function(){q.editorUi.propertiesCollapsed=!q.editorUi.propertiesCollapsed;z()});t.appendChild(x);x=document.createElement("th");x.className="gePropHeaderCell";
-x.innerHTML=mxResources.get("value");t.appendChild(x);v.appendChild(t);var D=!1,B=!1,t=null;1==b.vertices.length&&0==b.edges.length?t=b.vertices[0].id:0==b.vertices.length&&1==b.edges.length&&(t=b.edges[0].id);null!=t&&v.appendChild(n("id",mxUtils.htmlEntities(t),{dispName:"ID",type:"readOnly"},!0,!1));for(var A in c)if(t=c[A],"function"!=typeof t.isVisible||t.isVisible(b,this)){var C=null!=b.style[A]?mxUtils.htmlEntities(b.style[A]+""):null!=t.getDefaultValue?t.getDefaultValue(b,this):t.defVal;if("separator"==
-t.type)B=!B;else{if("staticArr"==t.type)t.size=parseInt(b.style[t.sizeProperty]||c[t.sizeProperty].defVal)||0;else if(null!=t.dependentProps){for(var N=t.dependentProps,E=[],G=[],x=0;x<N.length;x++){var H=b.style[N[x]];G.push(c[N[x]].subDefVal);E.push(null!=H?H.split(","):[])}t.dependentPropsDefVal=G;t.dependentPropsVals=E}v.appendChild(n(A,C,t,D,B));D=!D}}for(x=0;x<u.length;x++)for(t=u[x],c=t.parentRow,b=0;b<t.values.length;b++)A=n(t.name,t.values[b],{type:t.type,parentRow:t.parentRow,isDeletable:t.isDeletable,
-index:b,defVal:t.defVal,countProperty:t.countProperty,size:t.size},0==b%2,t.flipBkg),c.parentNode.insertBefore(A,c.nextSibling),c=A;a.appendChild(v);z();return a};StyleFormatPanel.prototype.addStyles=function(a){function c(a){mxEvent.addListener(a,"mouseenter",function(){a.style.opacity="1"});mxEvent.addListener(a,"mouseleave",function(){a.style.opacity="0.5"})}var b=this.editorUi,e=b.editor.graph,d=document.createElement("div");d.style.whiteSpace="nowrap";d.style.paddingLeft="24px";d.style.paddingRight=
-"20px";a.style.paddingLeft="16px";a.style.paddingBottom="6px";a.style.position="relative";a.appendChild(d);var g="plain-gray plain-blue plain-green plain-turquoise plain-orange plain-yellow plain-red plain-pink plain-purple gray blue green turquoise orange yellow red pink purple".split(" "),f=document.createElement("div");f.style.whiteSpace="nowrap";f.style.position="relative";f.style.textAlign="center";for(var k=[],l=0;l<this.defaultColorSchemes.length;l++){var n=document.createElement("div");n.style.display=
-"inline-block";n.style.width="6px";n.style.height="6px";n.style.marginLeft="4px";n.style.marginRight="3px";n.style.borderRadius="3px";n.style.cursor="pointer";n.style.background="transparent";n.style.border="1px solid #b5b6b7";mxUtils.bind(this,function(a){mxEvent.addListener(n,"click",mxUtils.bind(this,function(){q(a)}))})(l);k.push(n);f.appendChild(n)}var q=mxUtils.bind(this,function(a){null!=this.format.currentScheme&&(k[this.format.currentScheme].style.background="transparent");this.format.currentScheme=
-a;u(this.defaultColorSchemes[this.format.currentScheme]);k[this.format.currentScheme].style.background="#84d7ff"}),u=mxUtils.bind(this,function(a){var c=mxUtils.bind(this,function(a){var c=mxUtils.button("",mxUtils.bind(this,function(c){e.getModel().beginUpdate();try{for(var d=this.format.getSelectionState().cells,f=0;f<d.length;f++){for(var k=e.getModel().getStyle(d[f]),l=0;l<g.length;l++)k=mxUtils.removeStylename(k,g[l]);var n=e.getModel().isVertex(d[f])?b.initialDefaultVertexStyle:b.initialdefaultEdgeStyle;
-null!=a?(k=mxUtils.setStyle(k,mxConstants.STYLE_GRADIENTCOLOR,a.gradient||mxUtils.getValue(n,mxConstants.STYLE_GRADIENTCOLOR,null)),mxEvent.isAltDown(c)||(k=""==a.fill?mxUtils.setStyle(k,mxConstants.STYLE_FILLCOLOR,null):mxUtils.setStyle(k,mxConstants.STYLE_FILLCOLOR,a.fill||mxUtils.getValue(n,mxConstants.STYLE_FILLCOLOR,null))),mxEvent.isShiftDown(c)||(k=""==a.stroke?mxUtils.setStyle(k,mxConstants.STYLE_STROKECOLOR,null):mxUtils.setStyle(k,mxConstants.STYLE_STROKECOLOR,a.stroke||mxUtils.getValue(n,
-mxConstants.STYLE_STROKECOLOR,null))),mxEvent.isControlDown(c)||mxClient.IS_MAC&&mxEvent.isMetaDown(c)||!e.getModel().isVertex(d[f])||(k=mxUtils.setStyle(k,mxConstants.STYLE_FONTCOLOR,a.font||mxUtils.getValue(n,mxConstants.STYLE_FONTCOLOR,null)))):(k=mxUtils.setStyle(k,mxConstants.STYLE_FILLCOLOR,mxUtils.getValue(n,mxConstants.STYLE_FILLCOLOR,"#ffffff")),k=mxUtils.setStyle(k,mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(n,mxConstants.STYLE_STROKECOLOR,"#000000")),k=mxUtils.setStyle(k,mxConstants.STYLE_GRADIENTCOLOR,
-mxUtils.getValue(n,mxConstants.STYLE_GRADIENTCOLOR,null)),e.getModel().isVertex(d[f])&&(k=mxUtils.setStyle(k,mxConstants.STYLE_FONTCOLOR,mxUtils.getValue(n,mxConstants.STYLE_FONTCOLOR,null))));e.getModel().setStyle(d[f],k)}}finally{e.getModel().endUpdate()}}));c.className="geStyleButton";c.style.width="36px";c.style.height=10>=this.defaultColorSchemes.length?"24px":"30px";c.style.margin="0px 6px 6px 0px";if(null!=a){var f="1"==urlParams.sketch?"2px solid":"1px solid";null!=a.gradient?mxClient.IS_IE&&
+b.style.width="202px";mxUtils.br(a);return t.apply(this,arguments)};EditorUi.prototype.propertiesCollapsed=!0;StyleFormatPanel.prototype.addProperties=function(a,c,b){function e(a,c,b,e){u.getModel().beginUpdate();try{var d=[],k=[];if(null!=b.index){for(var f=[],g=b.parentRow.nextSibling;g&&g.getAttribute("data-pName")==a;)f.push(g.getAttribute("data-pValue")),g=g.nextSibling;b.index<f.length?null!=e?f.splice(e,1):f[b.index]=c:f.push(c);null!=b.size&&f.length>b.size&&(f=f.slice(0,b.size));c=f.join(",");
+null!=b.countProperty&&(u.setCellStyles(b.countProperty,f.length,u.getSelectionCells()),d.push(b.countProperty),k.push(f.length))}u.setCellStyles(a,c,u.getSelectionCells());d.push(a);k.push(c);if(null!=b.dependentProps)for(a=0;a<b.dependentProps.length;a++){var l=b.dependentPropsDefVal[a],n=b.dependentPropsVals[a];if(n.length>c)n=n.slice(0,c);else for(var m=n.length;m<c;m++)n.push(l);n=n.join(",");u.setCellStyles(b.dependentProps[a],n,u.getSelectionCells());d.push(b.dependentProps[a]);k.push(n)}if("function"==
+typeof b.onChange)b.onChange(u,c);q.editorUi.fireEvent(new mxEventObject("styleChanged","keys",d,"values",k,"cells",u.getSelectionCells()))}finally{u.getModel().endUpdate()}}function d(c,b,e){var d=mxUtils.getOffset(a,!0),k=mxUtils.getOffset(c,!0);b.style.position="absolute";b.style.left=k.x-d.x+"px";b.style.top=k.y-d.y+"px";b.style.width=c.offsetWidth+"px";b.style.height=c.offsetHeight-(e?4:0)+"px";b.style.zIndex=5}function k(a,c,b){var d=document.createElement("div");d.style.width="32px";d.style.height=
+"4px";d.style.margin="2px";d.style.border="1px solid black";d.style.background=c&&"none"!=c?c:"url('"+Dialog.prototype.noColorImage+"')";btn=mxUtils.button("",mxUtils.bind(q,function(k){this.editorUi.pickColor(c,function(c){d.style.background="none"==c?"url('"+Dialog.prototype.noColorImage+"')":c;e(a,c,b)});mxEvent.consume(k)}));btn.style.height="12px";btn.style.width="40px";btn.className="geColorBtn";btn.appendChild(d);return btn}function f(a,c,b,d,k,f,g){null!=c&&(c=c.split(","),v.push({name:a,
+values:c,type:b,defVal:d,countProperty:k,parentRow:f,isDeletable:!0,flipBkg:g}));btn=mxUtils.button("+",mxUtils.bind(q,function(c){for(var l=f,q=0;null!=l.nextSibling;)if(l.nextSibling.getAttribute("data-pName")==a)l=l.nextSibling,q++;else break;var m={type:b,parentRow:f,index:q,isDeletable:!0,defVal:d,countProperty:k},q=n(a,"",m,0==q%2,g);e(a,d,m);l.parentNode.insertBefore(q,l.nextSibling);mxEvent.consume(c)}));btn.style.height="16px";btn.style.width="25px";btn.className="geColorBtn";return btn}
+function g(a,c,b,e,d,k,f){if(0<d){var g=Array(d);c=null!=c?c.split(","):[];for(var l=0;l<d;l++)g[l]=null!=c[l]?c[l]:null!=e?e:"";v.push({name:a,values:g,type:b,defVal:e,parentRow:k,flipBkg:f,size:d})}return document.createElement("div")}function l(a,c,b){var d=document.createElement("input");d.type="checkbox";d.checked="1"==c;mxEvent.addListener(d,"change",function(){e(a,d.checked?"1":"0",b)});return d}function n(c,b,n,m,u){var v=n.dispName,t=n.type,x=document.createElement("tr");x.className="gePropRow"+
+(u?"Dark":"")+(m?"Alt":"")+" gePropNonHeaderRow";x.setAttribute("data-pName",c);x.setAttribute("data-pValue",b);m=!1;null!=n.index&&(x.setAttribute("data-index",n.index),v=(null!=v?v:"")+"["+n.index+"]",m=!0);var p=document.createElement("td");p.className="gePropRowCell";p.innerHTML=mxUtils.htmlEntities(mxResources.get(v,null,v));m&&(p.style.textAlign="right");x.appendChild(p);p=document.createElement("td");p.className="gePropRowCell";if("color"==t)p.appendChild(k(c,b,n));else if("bool"==t||"boolean"==
+t)p.appendChild(l(c,b,n));else if("enum"==t){var z=n.enumList;for(u=0;u<z.length;u++)if(v=z[u],v.val==b){p.innerHTML=mxUtils.htmlEntities(mxResources.get(v.dispName,null,v.dispName));break}mxEvent.addListener(p,"click",mxUtils.bind(q,function(){var k=document.createElement("select");d(p,k);for(var f=0;f<z.length;f++){var g=z[f],l=document.createElement("option");l.value=mxUtils.htmlEntities(g.val);l.innerHTML=mxUtils.htmlEntities(mxResources.get(g.dispName,null,g.dispName));k.appendChild(l)}k.value=
+b;a.appendChild(k);mxEvent.addListener(k,"change",function(){var a=mxUtils.htmlEntities(k.value);e(c,a,n)});k.focus();mxEvent.addListener(k,"blur",function(){a.removeChild(k)})}))}else"dynamicArr"==t?p.appendChild(f(c,b,n.subType,n.subDefVal,n.countProperty,x,u)):"staticArr"==t?p.appendChild(g(c,b,n.subType,n.subDefVal,n.size,x,u)):"readOnly"==t?(u=document.createElement("input"),u.setAttribute("readonly",""),u.value=b,u.style.width="96px",u.style.borderWidth="0px",p.appendChild(u)):(p.innerHTML=
+b,mxEvent.addListener(p,"click",mxUtils.bind(q,function(){function k(){var a=f.value,a=0==a.length&&"string"!=t?0:a;n.allowAuto&&(null!=a.trim&&"auto"==a.trim().toLowerCase()?(a="auto",t="string"):(a=parseFloat(a),a=isNaN(a)?0:a));null!=n.min&&a<n.min?a=n.min:null!=n.max&&a>n.max&&(a=n.max);a=mxUtils.htmlEntities(("int"==t?parseInt(a):a)+"");e(c,a,n)}var f=document.createElement("input");d(p,f,!0);f.value=b;f.className="gePropEditor";"int"!=t&&"float"!=t||n.allowAuto||(f.type="number",f.step="int"==
+t?"1":"any",null!=n.min&&(f.min=parseFloat(n.min)),null!=n.max&&(f.max=parseFloat(n.max)));a.appendChild(f);mxEvent.addListener(f,"keypress",function(a){13==a.keyCode&&k()});f.focus();mxEvent.addListener(f,"blur",function(){k()})})));n.isDeletable&&(u=mxUtils.button("-",mxUtils.bind(q,function(a){e(c,"",n,n.index);mxEvent.consume(a)})),u.style.height="16px",u.style.width="25px",u.style["float"]="right",u.className="geColorBtn",p.appendChild(u));x.appendChild(p);return x}var q=this,u=this.editorUi.editor.graph,
+v=[];a.style.position="relative";a.style.padding="0";var t=document.createElement("table");t.className="geProperties";t.style.whiteSpace="nowrap";t.style.width="100%";var m=document.createElement("tr");m.className="gePropHeader";var x=document.createElement("th");x.className="gePropHeaderCell";var p=document.createElement("img");p.src=Sidebar.prototype.expandedImage;x.appendChild(p);mxUtils.write(x,mxResources.get("property"));m.style.cursor="pointer";var z=function(){var c=t.querySelectorAll(".gePropNonHeaderRow"),
+b;if(q.editorUi.propertiesCollapsed){p.src=Sidebar.prototype.collapsedImage;b="none";for(var e=a.childNodes.length-1;0<=e;e--)try{var d=a.childNodes[e],k=d.nodeName.toUpperCase();"INPUT"!=k&&"SELECT"!=k||a.removeChild(d)}catch(xa){}}else p.src=Sidebar.prototype.expandedImage,b="";for(e=0;e<c.length;e++)c[e].style.display=b};mxEvent.addListener(m,"click",function(){q.editorUi.propertiesCollapsed=!q.editorUi.propertiesCollapsed;z()});m.appendChild(x);x=document.createElement("th");x.className="gePropHeaderCell";
+x.innerHTML=mxResources.get("value");m.appendChild(x);t.appendChild(m);var C=!1,A=!1,m=null;1==b.vertices.length&&0==b.edges.length?m=b.vertices[0].id:0==b.vertices.length&&1==b.edges.length&&(m=b.edges[0].id);null!=m&&t.appendChild(n("id",mxUtils.htmlEntities(m),{dispName:"ID",type:"readOnly"},!0,!1));for(var B in c)if(m=c[B],"function"!=typeof m.isVisible||m.isVisible(b,this)){var D=null!=b.style[B]?mxUtils.htmlEntities(b.style[B]+""):null!=m.getDefaultValue?m.getDefaultValue(b,this):m.defVal;if("separator"==
+m.type)A=!A;else{if("staticArr"==m.type)m.size=parseInt(b.style[m.sizeProperty]||c[m.sizeProperty].defVal)||0;else if(null!=m.dependentProps){for(var N=m.dependentProps,E=[],G=[],x=0;x<N.length;x++){var H=b.style[N[x]];G.push(c[N[x]].subDefVal);E.push(null!=H?H.split(","):[])}m.dependentPropsDefVal=G;m.dependentPropsVals=E}t.appendChild(n(B,D,m,C,A));C=!C}}for(x=0;x<v.length;x++)for(m=v[x],c=m.parentRow,b=0;b<m.values.length;b++)B=n(m.name,m.values[b],{type:m.type,parentRow:m.parentRow,isDeletable:m.isDeletable,
+index:b,defVal:m.defVal,countProperty:m.countProperty,size:m.size},0==b%2,m.flipBkg),c.parentNode.insertBefore(B,c.nextSibling),c=B;a.appendChild(t);z();return a};StyleFormatPanel.prototype.addStyles=function(a){function c(a){mxEvent.addListener(a,"mouseenter",function(){a.style.opacity="1"});mxEvent.addListener(a,"mouseleave",function(){a.style.opacity="0.5"})}var b=this.editorUi,e=b.editor.graph,d=document.createElement("div");d.style.whiteSpace="nowrap";d.style.paddingLeft="24px";d.style.paddingRight=
+"20px";a.style.paddingLeft="16px";a.style.paddingBottom="6px";a.style.position="relative";a.appendChild(d);var k="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(" "),f=document.createElement("div");f.style.whiteSpace="nowrap";f.style.position="relative";f.style.textAlign="center";for(var g=[],l=0;l<this.defaultColorSchemes.length;l++){var n=document.createElement("div");n.style.display=
+"inline-block";n.style.width="6px";n.style.height="6px";n.style.marginLeft="4px";n.style.marginRight="3px";n.style.borderRadius="3px";n.style.cursor="pointer";n.style.background="transparent";n.style.border="1px solid #b5b6b7";mxUtils.bind(this,function(a){mxEvent.addListener(n,"click",mxUtils.bind(this,function(){q(a)}))})(l);g.push(n);f.appendChild(n)}var q=mxUtils.bind(this,function(a){null!=this.format.currentScheme&&(g[this.format.currentScheme].style.background="transparent");this.format.currentScheme=
+a;u(this.defaultColorSchemes[this.format.currentScheme]);g[this.format.currentScheme].style.background="#84d7ff"}),u=mxUtils.bind(this,function(a){var c=mxUtils.bind(this,function(a){var c=mxUtils.button("",mxUtils.bind(this,function(c){e.getModel().beginUpdate();try{for(var d=this.format.getSelectionState().cells,f=0;f<d.length;f++){for(var g=e.getModel().getStyle(d[f]),l=0;l<k.length;l++)g=mxUtils.removeStylename(g,k[l]);var n=e.getModel().isVertex(d[f])?b.initialDefaultVertexStyle:b.initialdefaultEdgeStyle;
+null!=a?(g=mxUtils.setStyle(g,mxConstants.STYLE_GRADIENTCOLOR,a.gradient||mxUtils.getValue(n,mxConstants.STYLE_GRADIENTCOLOR,null)),mxEvent.isAltDown(c)||(g=""==a.fill?mxUtils.setStyle(g,mxConstants.STYLE_FILLCOLOR,null):mxUtils.setStyle(g,mxConstants.STYLE_FILLCOLOR,a.fill||mxUtils.getValue(n,mxConstants.STYLE_FILLCOLOR,null))),mxEvent.isShiftDown(c)||(g=""==a.stroke?mxUtils.setStyle(g,mxConstants.STYLE_STROKECOLOR,null):mxUtils.setStyle(g,mxConstants.STYLE_STROKECOLOR,a.stroke||mxUtils.getValue(n,
+mxConstants.STYLE_STROKECOLOR,null))),mxEvent.isControlDown(c)||mxClient.IS_MAC&&mxEvent.isMetaDown(c)||!e.getModel().isVertex(d[f])||(g=mxUtils.setStyle(g,mxConstants.STYLE_FONTCOLOR,a.font||mxUtils.getValue(n,mxConstants.STYLE_FONTCOLOR,null)))):(g=mxUtils.setStyle(g,mxConstants.STYLE_FILLCOLOR,mxUtils.getValue(n,mxConstants.STYLE_FILLCOLOR,"#ffffff")),g=mxUtils.setStyle(g,mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(n,mxConstants.STYLE_STROKECOLOR,"#000000")),g=mxUtils.setStyle(g,mxConstants.STYLE_GRADIENTCOLOR,
+mxUtils.getValue(n,mxConstants.STYLE_GRADIENTCOLOR,null)),e.getModel().isVertex(d[f])&&(g=mxUtils.setStyle(g,mxConstants.STYLE_FONTCOLOR,mxUtils.getValue(n,mxConstants.STYLE_FONTCOLOR,null))));e.getModel().setStyle(d[f],g)}}finally{e.getModel().endUpdate()}}));c.className="geStyleButton";c.style.width="36px";c.style.height=10>=this.defaultColorSchemes.length?"24px":"30px";c.style.margin="0px 6px 6px 0px";if(null!=a){var f="1"==urlParams.sketch?"2px solid":"1px solid";null!=a.gradient?mxClient.IS_IE&&
10>document.documentMode?c.style.filter="progid:DXImageTransform.Microsoft.Gradient(StartColorStr='"+a.fill+"', EndColorStr='"+a.gradient+"', GradientType=0)":c.style.backgroundImage="linear-gradient("+a.fill+" 0px,"+a.gradient+" 100%)":a.fill==mxConstants.NONE?c.style.background="url('"+Dialog.prototype.noColorImage+"')":c.style.backgroundColor=""==a.fill?mxUtils.getValue(b.initialDefaultVertexStyle,mxConstants.STYLE_FILLCOLOR,Editor.isDarkMode()?"#2a2a2a":"#ffffff"):a.fill||mxUtils.getValue(b.initialDefaultVertexStyle,
mxConstants.STYLE_FILLCOLOR,Editor.isDarkMode()?"#2a2a2a":"#ffffff");c.style.border=a.stroke==mxConstants.NONE?f+" transparent":""==a.stroke?f+" "+mxUtils.getValue(b.initialDefaultVertexStyle,mxConstants.STYLE_STROKECOLOR,Editor.isDarkMode()?"#ffffff":"#2a2a2a"):f+" "+(a.stroke||mxUtils.getValue(b.initialDefaultVertexStyle,mxConstants.STYLE_STROKECOLOR,Editor.isDarkMode()?"#ffffff":"#2a2a2a"));null!=a.title&&c.setAttribute("title",a.title)}else{var f=mxUtils.getValue(e.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,
-"#ffffff"),k=mxUtils.getValue(e.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,"#000000");c.style.backgroundColor=f;c.style.border="1px solid "+k}c.style.borderRadius="0";d.appendChild(c)});d.innerHTML="";for(var f=0;f<a.length;f++)0<f&&0==mxUtils.mod(f,4)&&mxUtils.br(d),c(a[f])});null==this.format.currentScheme?q(Editor.isDarkMode()?1:"1"==urlParams.sketch?5:0):q(this.format.currentScheme);var l=10>=this.defaultColorSchemes.length?28:8,m=document.createElement("div");m.style.cssText="position:absolute;left:10px;top:8px;bottom:"+
+"#ffffff"),g=mxUtils.getValue(e.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,"#000000");c.style.backgroundColor=f;c.style.border="1px solid "+g}c.style.borderRadius="0";d.appendChild(c)});d.innerHTML="";for(var f=0;f<a.length;f++)0<f&&0==mxUtils.mod(f,4)&&mxUtils.br(d),c(a[f])});null==this.format.currentScheme?q(Editor.isDarkMode()?1:"1"==urlParams.sketch?5:0):q(this.format.currentScheme);var l=10>=this.defaultColorSchemes.length?28:8,m=document.createElement("div");m.style.cssText="position:absolute;left:10px;top:8px;bottom:"+
l+"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(m,"click",mxUtils.bind(this,function(){q(mxUtils.mod(this.format.currentScheme-1,this.defaultColorSchemes.length))}));
-var v=document.createElement("div");v.style.cssText="position:absolute;left:202px;top:8px;bottom:"+l+"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&&
-(a.appendChild(m),a.appendChild(v));mxEvent.addListener(v,"click",mxUtils.bind(this,function(){q(mxUtils.mod(this.format.currentScheme+1,this.defaultColorSchemes.length))}));c(m);c(v);u(this.defaultColorSchemes[this.format.currentScheme]);10>=this.defaultColorSchemes.length&&a.appendChild(f);return a};StyleFormatPanel.prototype.addEditOps=function(a){var c=this.format.getSelectionState(),b=null;1==c.cells.length&&(b=mxUtils.button(mxResources.get("editStyle"),mxUtils.bind(this,function(a){this.editorUi.actions.get("editStyle").funct()})),
+var t=document.createElement("div");t.style.cssText="position:absolute;left:202px;top:8px;bottom:"+l+"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&&
+(a.appendChild(m),a.appendChild(t));mxEvent.addListener(t,"click",mxUtils.bind(this,function(){q(mxUtils.mod(this.format.currentScheme+1,this.defaultColorSchemes.length))}));c(m);c(t);u(this.defaultColorSchemes[this.format.currentScheme]);10>=this.defaultColorSchemes.length&&a.appendChild(f);return a};StyleFormatPanel.prototype.addEditOps=function(a){var c=this.format.getSelectionState(),b=null;1==c.cells.length&&(b=mxUtils.button(mxResources.get("editStyle"),mxUtils.bind(this,function(a){this.editorUi.actions.get("editStyle").funct()})),
b.setAttribute("title",mxResources.get("editStyle")+" ("+this.editorUi.actions.get("editStyle").shortcut+")"),b.style.width="202px",b.style.marginBottom="2px",a.appendChild(b));var e=this.editorUi.editor.graph,e=1==c.cells.length?e.view.getState(c.cells[0]):null;null!=e&&null!=e.shape&&null!=e.shape.stencil?(c=mxUtils.button(mxResources.get("editShape"),mxUtils.bind(this,function(a){this.editorUi.actions.get("editShape").funct()})),c.setAttribute("title",mxResources.get("editShape")),c.style.marginBottom=
"2px",null==b?c.style.width="202px":(b.style.width="100px",c.style.width="100px",c.style.marginLeft="2px"),a.appendChild(c)):c.image&&0<c.cells.length&&(c=mxUtils.button(mxResources.get("editImage"),mxUtils.bind(this,function(a){this.editorUi.actions.get("image").funct()})),c.setAttribute("title",mxResources.get("editImage")),c.style.marginBottom="2px",null==b?c.style.width="202px":(b.style.width="100px",c.style.width="100px",c.style.marginLeft="2px"),a.appendChild(c));return a}}Graph.customFontElements=
{};Graph.recentCustomFonts={};Graph.isGoogleFontUrl=function(a){return a.substring(0,Editor.GOOGLE_FONTS.length)==Editor.GOOGLE_FONTS};Graph.isCssFontUrl=function(a){return Graph.isGoogleFontUrl(a)};Graph.createFontElement=function(a,c){var b;Graph.isCssFontUrl(c)?(b=document.createElement("link"),b.setAttribute("rel","stylesheet"),b.setAttribute("type","text/css"),b.setAttribute("charset","UTF-8"),b.setAttribute("href",c)):(b=document.createElement("style"),mxUtils.write(b,'@font-face {\nfont-family: "'+
@@ -3235,32 +3236,32 @@ Graph.prototype.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity="0.4";
"mouseleave",function(a){c=null});this.isMouseInsertPoint=function(){return null!=c};var b=this.getInsertPoint;this.getInsertPoint=function(){return null!=c?this.getPointForEvent(c):b.apply(this,arguments)};var e=this.layoutManager.getLayout;this.layoutManager.getLayout=function(a){var c=this.graph.getCellStyle(a);if(null!=c){if("rack"==c.childLayout){var b=new mxStackLayout(this.graph,!1);b.gridSize=null!=c.rackUnitSize?parseFloat(c.rackUnitSize):"undefined"!==typeof mxRackContainer?mxRackContainer.unitSize:
20;b.marginLeft=c.marginLeft||0;b.marginRight=c.marginRight||0;b.marginTop=c.marginTop||0;b.marginBottom=c.marginBottom||0;b.allowGaps=c.allowGaps||0;b.horizontal="1"==mxUtils.getValue(c,"horizontalRack","0");b.resizeParent=!1;b.fill=!0;return b}if("undefined"!==typeof mxTableLayout&&"tableLayout"==c.childLayout)return b=new mxTableLayout(this.graph),b.rows=c.tableRows||2,b.columns=c.tableColumns||2,b.colPercentages=c.colPercentages,b.rowPercentages=c.rowPercentages,b.equalColumns="1"==mxUtils.getValue(c,
"equalColumns",b.colPercentages?"0":"1"),b.equalRows="1"==mxUtils.getValue(c,"equalRows",b.rowPercentages?"0":"1"),b.resizeParent="1"==mxUtils.getValue(c,"resizeParent","1"),b.border=c.tableBorder||b.border,b.marginLeft=c.marginLeft||0,b.marginRight=c.marginRight||0,b.marginTop=c.marginTop||0,b.marginBottom=c.marginBottom||0,b.autoAddCol="1"==mxUtils.getValue(c,"autoAddCol","0"),b.autoAddRow="1"==mxUtils.getValue(c,"autoAddRow",b.autoAddCol?"0":"1"),b.colWidths=c.colWidths||"100",b.rowHeights=c.rowHeights||
-"50",b}return e.apply(this,arguments)};this.updateGlobalUrlVariables()};var x=Graph.prototype.postProcessCellStyle;Graph.prototype.postProcessCellStyle=function(a){return Graph.processFontStyle(x.apply(this,arguments))};var G=mxSvgCanvas2D.prototype.updateTextNodes;mxSvgCanvas2D.prototype.updateTextNodes=function(a,c,b,e,d,g,f,k,l,n,q){G.apply(this,arguments);Graph.processFontAttributes(q)};var z=mxText.prototype.redraw;mxText.prototype.redraw=function(){z.apply(this,arguments);null!=this.node&&"DIV"==
+"50",b}return e.apply(this,arguments)};this.updateGlobalUrlVariables()};var x=Graph.prototype.postProcessCellStyle;Graph.prototype.postProcessCellStyle=function(a){return Graph.processFontStyle(x.apply(this,arguments))};var G=mxSvgCanvas2D.prototype.updateTextNodes;mxSvgCanvas2D.prototype.updateTextNodes=function(a,c,b,e,d,k,f,g,l,n,q){G.apply(this,arguments);Graph.processFontAttributes(q)};var z=mxText.prototype.redraw;mxText.prototype.redraw=function(){z.apply(this,arguments);null!=this.node&&"DIV"==
this.node.nodeName&&Graph.processFontAttributes(this.node)};Graph.prototype.getCustomFonts=function(){var a=this.extFonts,a=null!=a?a.slice():[],c;for(c in Graph.customFontElements){var b=Graph.customFontElements[c];a.push({name:b.name,url:b.url})}return a};Graph.prototype.setFont=function(a,c){Graph.addFont(a,c);document.execCommand("fontname",!1,a);if(null!=c){var b=this.cellEditor.textarea.getElementsByTagName("font");c=Graph.getFontUrl(a,c);for(var e=0;e<b.length;e++)b[e].getAttribute("face")==
a&&b[e].getAttribute("data-font-src")!=c&&b[e].setAttribute("data-font-src",c)}};var E=Graph.prototype.isFastZoomEnabled;Graph.prototype.isFastZoomEnabled=function(){return E.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 a=JSON.parse(decodeURIComponent(urlParams.vars));if(null!=a)for(var c in a)this.globalVars[c]=
a[c]}catch(B){null!=window.console&&console.log("Error in vars URL parameter: "+B)}};Graph.prototype.getExportVariables=function(){return null!=this.globalVars?mxUtils.clone(this.globalVars):{}};var H=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=function(a){var c=H.apply(this,arguments);null==c&&null!=this.globalVars&&(c=this.globalVars[a]);return c};Graph.prototype.getDefaultStylesheet=function(){if(null==this.defaultStylesheet){var a=this.themes["default-style2"];this.defaultStylesheet=
-(new mxCodec(a.ownerDocument)).decode(a)}return this.defaultStylesheet};Graph.prototype.isViewer=function(){return urlParams.viewer};var K=Graph.prototype.getSvg;Graph.prototype.getSvg=function(a,c,b,e,d,g,f,k,l,n,q,u,m,t){var v=null,x=null;u||null==this.themes||"darkTheme"!=this.defaultThemeName||(v=this.stylesheet,x=this.defaultPageBackgroundColor,this.defaultPageBackgroundColor="darkTheme"==this.defaultThemeName?"#ffffff":"#2a2a2a",this.stylesheet=this.getDefaultStylesheet(),this.refresh());var p=
-K.apply(this,arguments),z=this.getCustomFonts();if(q&&0<z.length){var A=p.ownerDocument,C=null!=A.createElementNS?A.createElementNS(mxConstants.NS_SVG,"style"):A.createElement("style");null!=A.setAttributeNS?C.setAttributeNS("type","text/css"):C.setAttribute("type","text/css");for(var N="",B="",D=0;D<z.length;D++){var E=z[D].name,G=z[D].url;Graph.isCssFontUrl(G)?N+="@import url("+G+");\n":B+='@font-face {\nfont-family: "'+E+'";\nsrc: url("'+G+'");\n}\n'}C.appendChild(A.createTextNode(N+B));p.getElementsByTagName("defs")[0].appendChild(C)}null!=
+(new mxCodec(a.ownerDocument)).decode(a)}return this.defaultStylesheet};Graph.prototype.isViewer=function(){return urlParams.viewer};var K=Graph.prototype.getSvg;Graph.prototype.getSvg=function(a,c,b,e,d,k,f,g,l,n,q,u,m,t){var v=null,x=null;u||null==this.themes||"darkTheme"!=this.defaultThemeName||(v=this.stylesheet,x=this.defaultPageBackgroundColor,this.defaultPageBackgroundColor="darkTheme"==this.defaultThemeName?"#ffffff":"#2a2a2a",this.stylesheet=this.getDefaultStylesheet(),this.refresh());var p=
+K.apply(this,arguments),z=this.getCustomFonts();if(q&&0<z.length){var A=p.ownerDocument,D=null!=A.createElementNS?A.createElementNS(mxConstants.NS_SVG,"style"):A.createElement("style");null!=A.setAttributeNS?D.setAttributeNS("type","text/css"):D.setAttribute("type","text/css");for(var N="",B="",C=0;C<z.length;C++){var E=z[C].name,G=z[C].url;Graph.isCssFontUrl(G)?N+="@import url("+G+");\n":B+='@font-face {\nfont-family: "'+E+'";\nsrc: url("'+G+'");\n}\n'}D.appendChild(A.createTextNode(N+B));p.getElementsByTagName("defs")[0].appendChild(D)}null!=
v&&(this.defaultPageBackgroundColor=x,this.stylesheet=v,this.refresh());return p};var F=Graph.prototype.createSvgImageExport;Graph.prototype.createSvgImageExport=function(){var a=F.apply(this,arguments);if(this.mathEnabled){var c=a.drawText;a.drawText=function(a,b){if(null!=a.text&&null!=a.text.value&&a.text.checkBounds()&&(mxUtils.isNode(a.text.value)||a.text.dialect==mxConstants.DIALECT_STRICTHTML)){var e=a.text.getContentNode();if(null!=e){e=e.cloneNode(!0);if(e.getElementsByTagNameNS)for(var d=
e.getElementsByTagNameNS("http://www.w3.org/1998/Math/MathML","math");0<d.length;)d[0].parentNode.removeChild(d[0]);null!=e.innerHTML&&(d=a.text.value,a.text.value=e.innerHTML,c.apply(this,arguments),a.text.value=d)}}else c.apply(this,arguments)}}return a};var I=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){I.apply(this,arguments);if(mxClient.IS_GC&&null!=this.getDrawPane()){var a=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;",a.ownerSVGElement.parentNode.insertBefore(this.webKitForceRepaintNode,a.ownerSVGElement))}};Graph.prototype.refreshBackgroundImage=function(){null!=this.backgroundImage&&null!=this.backgroundImage.originalSrc&&this.setBackgroundImage(this.backgroundImage)};var C=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){C.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.handleCustomLink=function(a){"data:action/json,"==
-a.substring(0,17)&&(a=JSON.parse(a.substring(17)),null!=a.actions&&this.executeCustomActions(a.actions))};Graph.prototype.executeCustomActions=function(a,c){if(this.executingCustomActions)this.stoppingCustomActions=!0,null!=this.pendingWaitThread&&window.clearTimeout(this.pendingWaitThread),null!=this.pendingExecuteNextAction&&this.pendingExecuteNextAction(),this.fireEvent(new mxEventObject("stopExecutingCustomActions"));else{this.executingCustomActions=!0;var b=!1,e=0,d=0,g=mxUtils.bind(this,function(){b||
-(b=!0,this.model.beginUpdate())}),f=mxUtils.bind(this,function(){b&&(b=!1,this.model.endUpdate())}),k=mxUtils.bind(this,function(){0<e&&e--;0==e&&l()}),l=mxUtils.bind(this,function(){if(d<a.length){var b=this.stoppingCustomActions,n=a[d++],q=[];if(null!=n.open)if(f(),this.isCustomLink(n.open)){if(!this.customLinkClicked(n.open))return}else this.openLink(n.open);null==n.wait||b||(this.pendingExecuteNextAction=mxUtils.bind(this,function(){this.pendingWaitThread=this.pendingExecuteNextAction=null;k()}),
-e++,this.pendingWaitThread=window.setTimeout(this.pendingExecuteNextAction,""!=n.wait?parseInt(n.wait):1E3),f());null!=n.opacity&&null!=n.opacity.value&&Graph.setOpacityForNodes(this.getNodesForCells(this.getCellsForAction(n.opacity,!0)),n.opacity.value);null!=n.fadeIn&&(e++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(n.fadeIn,!0)),0,1,k,b?0:n.fadeIn.delay));null!=n.fadeOut&&(e++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(n.fadeOut,!0)),1,0,k,b?0:n.fadeOut.delay));
-null!=n.wipeIn&&(q=q.concat(this.createWipeAnimations(this.getCellsForAction(n.wipeIn,!0),!0)));null!=n.wipeOut&&(q=q.concat(this.createWipeAnimations(this.getCellsForAction(n.wipeOut,!0),!1)));null!=n.toggle&&(g(),this.toggleCells(this.getCellsForAction(n.toggle,!0)));if(null!=n.show){g();var u=this.getCellsForAction(n.show,!0);Graph.setOpacityForNodes(this.getNodesForCells(u),1);this.setCellsVisible(u,!0)}null!=n.hide&&(g(),u=this.getCellsForAction(n.hide,!0),Graph.setOpacityForNodes(this.getNodesForCells(u),
-0),this.setCellsVisible(u,!1));null!=n.toggleStyle&&null!=n.toggleStyle.key&&(g(),this.toggleCellStyles(n.toggleStyle.key,null!=n.toggleStyle.defaultValue?n.toggleStyle.defaultValue:"0",this.getCellsForAction(n.toggleStyle,!0)));null!=n.style&&null!=n.style.key&&(g(),this.setCellStyles(n.style.key,n.style.value,this.getCellsForAction(n.style,!0)));u=[];null!=n.select&&this.isEnabled()&&(u=this.getCellsForAction(n.select),this.setSelectionCells(u));null!=n.highlight&&(u=this.getCellsForAction(n.highlight),
-this.highlightCells(u,n.highlight.color,n.highlight.duration,n.highlight.opacity));null!=n.scroll&&(u=this.getCellsForAction(n.scroll));null!=n.viewbox&&this.fitWindow(n.viewbox,n.viewbox.border);0<u.length&&this.scrollCellToVisible(u[0]);0<q.length&&(e++,this.executeAnimations(q,k,b?1:n.steps,b?0:n.delay));0==e?l():f()}else this.stoppingCustomActions=this.executingCustomActions=!1,f(),null!=c&&c()});l()}};Graph.prototype.doUpdateCustomLinksForCell=function(a,c){var b=this.getLinkForCell(c);null!=
-b&&"data:action/json,"==b.substring(0,17)&&this.setLinkForCell(c,this.updateCustomLink(a,b));if(this.isHtmlLabel(c)){var e=document.createElement("div");e.innerHTML=this.sanitizeHtml(this.getLabel(c));for(var d=e.getElementsByTagName("a"),g=!1,f=0;f<d.length;f++)b=d[f].getAttribute("href"),null!=b&&"data:action/json,"==b.substring(0,17)&&(d[f].setAttribute("href",this.updateCustomLink(a,b)),g=!0);g&&this.labelChanged(c,e.innerHTML)}};Graph.prototype.updateCustomLink=function(a,c){if("data:action/json,"==
+this.webKitForceRepaintNode.style.cssText="position:absolute;",a.ownerSVGElement.parentNode.insertBefore(this.webKitForceRepaintNode,a.ownerSVGElement))}};Graph.prototype.refreshBackgroundImage=function(){null!=this.backgroundImage&&null!=this.backgroundImage.originalSrc&&this.setBackgroundImage(this.backgroundImage)};var D=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){D.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.handleCustomLink=function(a){"data:action/json,"==
+a.substring(0,17)&&(a=JSON.parse(a.substring(17)),null!=a.actions&&this.executeCustomActions(a.actions))};Graph.prototype.executeCustomActions=function(a,c){if(this.executingCustomActions)this.stoppingCustomActions=!0,null!=this.pendingWaitThread&&window.clearTimeout(this.pendingWaitThread),null!=this.pendingExecuteNextAction&&this.pendingExecuteNextAction(),this.fireEvent(new mxEventObject("stopExecutingCustomActions"));else{this.executingCustomActions=!0;var b=!1,e=0,d=0,k=mxUtils.bind(this,function(){b||
+(b=!0,this.model.beginUpdate())}),f=mxUtils.bind(this,function(){b&&(b=!1,this.model.endUpdate())}),g=mxUtils.bind(this,function(){0<e&&e--;0==e&&l()}),l=mxUtils.bind(this,function(){if(d<a.length){var b=this.stoppingCustomActions,n=a[d++],q=[];if(null!=n.open)if(f(),this.isCustomLink(n.open)){if(!this.customLinkClicked(n.open))return}else this.openLink(n.open);null==n.wait||b||(this.pendingExecuteNextAction=mxUtils.bind(this,function(){this.pendingWaitThread=this.pendingExecuteNextAction=null;g()}),
+e++,this.pendingWaitThread=window.setTimeout(this.pendingExecuteNextAction,""!=n.wait?parseInt(n.wait):1E3),f());null!=n.opacity&&null!=n.opacity.value&&Graph.setOpacityForNodes(this.getNodesForCells(this.getCellsForAction(n.opacity,!0)),n.opacity.value);null!=n.fadeIn&&(e++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(n.fadeIn,!0)),0,1,g,b?0:n.fadeIn.delay));null!=n.fadeOut&&(e++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(n.fadeOut,!0)),1,0,g,b?0:n.fadeOut.delay));
+null!=n.wipeIn&&(q=q.concat(this.createWipeAnimations(this.getCellsForAction(n.wipeIn,!0),!0)));null!=n.wipeOut&&(q=q.concat(this.createWipeAnimations(this.getCellsForAction(n.wipeOut,!0),!1)));null!=n.toggle&&(k(),this.toggleCells(this.getCellsForAction(n.toggle,!0)));if(null!=n.show){k();var u=this.getCellsForAction(n.show,!0);Graph.setOpacityForNodes(this.getNodesForCells(u),1);this.setCellsVisible(u,!0)}null!=n.hide&&(k(),u=this.getCellsForAction(n.hide,!0),Graph.setOpacityForNodes(this.getNodesForCells(u),
+0),this.setCellsVisible(u,!1));null!=n.toggleStyle&&null!=n.toggleStyle.key&&(k(),this.toggleCellStyles(n.toggleStyle.key,null!=n.toggleStyle.defaultValue?n.toggleStyle.defaultValue:"0",this.getCellsForAction(n.toggleStyle,!0)));null!=n.style&&null!=n.style.key&&(k(),this.setCellStyles(n.style.key,n.style.value,this.getCellsForAction(n.style,!0)));u=[];null!=n.select&&this.isEnabled()&&(u=this.getCellsForAction(n.select),this.setSelectionCells(u));null!=n.highlight&&(u=this.getCellsForAction(n.highlight),
+this.highlightCells(u,n.highlight.color,n.highlight.duration,n.highlight.opacity));null!=n.scroll&&(u=this.getCellsForAction(n.scroll));null!=n.viewbox&&this.fitWindow(n.viewbox,n.viewbox.border);0<u.length&&this.scrollCellToVisible(u[0]);0<q.length&&(e++,this.executeAnimations(q,g,b?1:n.steps,b?0:n.delay));0==e?l():f()}else this.stoppingCustomActions=this.executingCustomActions=!1,f(),null!=c&&c()});l()}};Graph.prototype.doUpdateCustomLinksForCell=function(a,c){var b=this.getLinkForCell(c);null!=
+b&&"data:action/json,"==b.substring(0,17)&&this.setLinkForCell(c,this.updateCustomLink(a,b));if(this.isHtmlLabel(c)){var e=document.createElement("div");e.innerHTML=this.sanitizeHtml(this.getLabel(c));for(var d=e.getElementsByTagName("a"),k=!1,f=0;f<d.length;f++)b=d[f].getAttribute("href"),null!=b&&"data:action/json,"==b.substring(0,17)&&(d[f].setAttribute("href",this.updateCustomLink(a,b)),k=!0);k&&this.labelChanged(c,e.innerHTML)}};Graph.prototype.updateCustomLink=function(a,c){if("data:action/json,"==
c.substring(0,17))try{var b=JSON.parse(c.substring(17));null!=b.actions&&(this.updateCustomLinkActions(a,b.actions),c="data:action/json,"+JSON.stringify(b))}catch(J){}return c};Graph.prototype.updateCustomLinkActions=function(a,c){for(var b=0;b<c.length;b++){var e=c[b],d;for(d in e)this.updateCustomLinkAction(a,e[d],"cells"),this.updateCustomLinkAction(a,e[d],"excludeCells")}};Graph.prototype.updateCustomLinkAction=function(a,c,b){if(null!=c&&null!=c[b]){for(var e=[],d=0;d<c[b].length;d++)if("*"==
-c[b][d])e.push(c[b][d]);else{var g=a[c[b][d]];null!=g?""!=g&&e.push(g):e.push(c[b][d])}c[b]=e}};Graph.prototype.getCellsForAction=function(a,c){var b=this.getCellsById(a.cells).concat(this.getCellsForTags(a.tags,null,null,c));if(null!=a.excludeCells){for(var e=[],d=0;d<b.length;d++)0>a.excludeCells.indexOf(b[d].id)&&e.push(b[d]);b=e}return b};Graph.prototype.getCellsById=function(a){var c=[];if(null!=a)for(var b=0;b<a.length;b++)if("*"==a[b])var e=this.model.getRoot(),c=c.concat(this.model.filterDescendants(function(a){return a!=
-e},e));else{var d=this.model.getCell(a[b]);null!=d&&c.push(d)}return c};Graph.prototype.getCellsForTags=function(a,c,b,e){var d=[];if(null!=a){c=null!=c?c:this.model.getDescendants(this.model.getRoot());b=null!=b?b:"tags";for(var g=0,f={},k=0;k<a.length;k++)0<a[k].length&&(f[a[k].toLowerCase()]=!0,g++);for(k=0;k<c.length;k++)if(e&&this.model.getParent(c[k])==this.model.root||this.model.isVertex(c[k])||this.model.isEdge(c[k])){var l=null!=c[k].value&&"object"==typeof c[k].value?mxUtils.trim(c[k].value.getAttribute(b)||
-""):"",n=!1;if(0<l.length){if(l=l.toLowerCase().split(" "),l.length>=a.length){for(var q=n=0;q<l.length&&n<g;q++)null!=f[l[q]]&&n++;n=n==g}}else n=0==a.length;n&&d.push(c[k])}}return d};Graph.prototype.toggleCells=function(a){this.model.beginUpdate();try{for(var c=0;c<a.length;c++)this.model.setVisible(a[c],!this.model.isVisible(a[c]))}finally{this.model.endUpdate()}};Graph.prototype.setCellsVisible=function(a,c){this.model.beginUpdate();try{for(var b=0;b<a.length;b++)this.model.setVisible(a[b],c)}finally{this.model.endUpdate()}};
-Graph.prototype.highlightCells=function(a,c,b,e){for(var d=0;d<a.length;d++)this.highlightCell(a[d],c,b,e)};Graph.prototype.highlightCell=function(a,c,b,e){c=null!=c?c:mxConstants.DEFAULT_VALID_COLOR;b=null!=b?b:1E3;a=this.view.getState(a);if(null!=a){var d=Math.max(5,mxUtils.getValue(a.style,mxConstants.STYLE_STROKEWIDTH,1)+4),g=new mxCellHighlight(this,c,d,!1);null!=e&&(g.opacity=e);g.highlight(a);window.setTimeout(function(){null!=g.shape&&(mxUtils.setPrefixedStyle(g.shape.node.style,"transition",
-"all 1200ms ease-in-out"),g.shape.node.style.opacity=0);window.setTimeout(function(){g.destroy()},1200)},b)}};Graph.prototype.addSvgShadow=function(a,c,b){b=null!=b?b:!1;var e=a.ownerDocument,d=null!=e.createElementNS?e.createElementNS(mxConstants.NS_SVG,"filter"):e.createElement("filter");d.setAttribute("id",this.shadowId);var g=null!=e.createElementNS?e.createElementNS(mxConstants.NS_SVG,"feGaussianBlur"):e.createElement("feGaussianBlur");g.setAttribute("in","SourceAlpha");g.setAttribute("stdDeviation",
-this.svgShadowBlur);g.setAttribute("result","blur");d.appendChild(g);g=null!=e.createElementNS?e.createElementNS(mxConstants.NS_SVG,"feOffset"):e.createElement("feOffset");g.setAttribute("in","blur");g.setAttribute("dx",this.svgShadowSize);g.setAttribute("dy",this.svgShadowSize);g.setAttribute("result","offsetBlur");d.appendChild(g);g=null!=e.createElementNS?e.createElementNS(mxConstants.NS_SVG,"feFlood"):e.createElement("feFlood");g.setAttribute("flood-color",this.svgShadowColor);g.setAttribute("flood-opacity",
-this.svgShadowOpacity);g.setAttribute("result","offsetColor");d.appendChild(g);g=null!=e.createElementNS?e.createElementNS(mxConstants.NS_SVG,"feComposite"):e.createElement("feComposite");g.setAttribute("in","offsetColor");g.setAttribute("in2","offsetBlur");g.setAttribute("operator","in");g.setAttribute("result","offsetBlur");d.appendChild(g);g=null!=e.createElementNS?e.createElementNS(mxConstants.NS_SVG,"feBlend"):e.createElement("feBlend");g.setAttribute("in","SourceGraphic");g.setAttribute("in2",
-"offsetBlur");d.appendChild(g);g=a.getElementsByTagName("defs");0==g.length?(e=null!=e.createElementNS?e.createElementNS(mxConstants.NS_SVG,"defs"):e.createElement("defs"),null!=a.firstChild?a.insertBefore(e,a.firstChild):a.appendChild(e)):e=g[0];e.appendChild(d);b||(c=null!=c?c:a.getElementsByTagName("g")[0],null!=c&&(c.setAttribute("filter","url(#"+this.shadowId+")"),isNaN(parseInt(a.getAttribute("width")))||(a.setAttribute("width",parseInt(a.getAttribute("width"))+6),a.setAttribute("height",parseInt(a.getAttribute("height"))+
+c[b][d])e.push(c[b][d]);else{var k=a[c[b][d]];null!=k?""!=k&&e.push(k):e.push(c[b][d])}c[b]=e}};Graph.prototype.getCellsForAction=function(a,c){var b=this.getCellsById(a.cells).concat(this.getCellsForTags(a.tags,null,null,c));if(null!=a.excludeCells){for(var e=[],d=0;d<b.length;d++)0>a.excludeCells.indexOf(b[d].id)&&e.push(b[d]);b=e}return b};Graph.prototype.getCellsById=function(a){var c=[];if(null!=a)for(var b=0;b<a.length;b++)if("*"==a[b])var e=this.model.getRoot(),c=c.concat(this.model.filterDescendants(function(a){return a!=
+e},e));else{var d=this.model.getCell(a[b]);null!=d&&c.push(d)}return c};Graph.prototype.getCellsForTags=function(a,c,b,e){var d=[];if(null!=a){c=null!=c?c:this.model.getDescendants(this.model.getRoot());b=null!=b?b:"tags";for(var k=0,f={},g=0;g<a.length;g++)0<a[g].length&&(f[a[g].toLowerCase()]=!0,k++);for(g=0;g<c.length;g++)if(e&&this.model.getParent(c[g])==this.model.root||this.model.isVertex(c[g])||this.model.isEdge(c[g])){var l=null!=c[g].value&&"object"==typeof c[g].value?mxUtils.trim(c[g].value.getAttribute(b)||
+""):"",n=!1;if(0<l.length){if(l=l.toLowerCase().split(" "),l.length>=a.length){for(var q=n=0;q<l.length&&n<k;q++)null!=f[l[q]]&&n++;n=n==k}}else n=0==a.length;n&&d.push(c[g])}}return d};Graph.prototype.toggleCells=function(a){this.model.beginUpdate();try{for(var c=0;c<a.length;c++)this.model.setVisible(a[c],!this.model.isVisible(a[c]))}finally{this.model.endUpdate()}};Graph.prototype.setCellsVisible=function(a,c){this.model.beginUpdate();try{for(var b=0;b<a.length;b++)this.model.setVisible(a[b],c)}finally{this.model.endUpdate()}};
+Graph.prototype.highlightCells=function(a,c,b,e){for(var d=0;d<a.length;d++)this.highlightCell(a[d],c,b,e)};Graph.prototype.highlightCell=function(a,c,b,e){c=null!=c?c:mxConstants.DEFAULT_VALID_COLOR;b=null!=b?b:1E3;a=this.view.getState(a);if(null!=a){var d=Math.max(5,mxUtils.getValue(a.style,mxConstants.STYLE_STROKEWIDTH,1)+4),k=new mxCellHighlight(this,c,d,!1);null!=e&&(k.opacity=e);k.highlight(a);window.setTimeout(function(){null!=k.shape&&(mxUtils.setPrefixedStyle(k.shape.node.style,"transition",
+"all 1200ms ease-in-out"),k.shape.node.style.opacity=0);window.setTimeout(function(){k.destroy()},1200)},b)}};Graph.prototype.addSvgShadow=function(a,c,b){b=null!=b?b:!1;var e=a.ownerDocument,d=null!=e.createElementNS?e.createElementNS(mxConstants.NS_SVG,"filter"):e.createElement("filter");d.setAttribute("id",this.shadowId);var k=null!=e.createElementNS?e.createElementNS(mxConstants.NS_SVG,"feGaussianBlur"):e.createElement("feGaussianBlur");k.setAttribute("in","SourceAlpha");k.setAttribute("stdDeviation",
+this.svgShadowBlur);k.setAttribute("result","blur");d.appendChild(k);k=null!=e.createElementNS?e.createElementNS(mxConstants.NS_SVG,"feOffset"):e.createElement("feOffset");k.setAttribute("in","blur");k.setAttribute("dx",this.svgShadowSize);k.setAttribute("dy",this.svgShadowSize);k.setAttribute("result","offsetBlur");d.appendChild(k);k=null!=e.createElementNS?e.createElementNS(mxConstants.NS_SVG,"feFlood"):e.createElement("feFlood");k.setAttribute("flood-color",this.svgShadowColor);k.setAttribute("flood-opacity",
+this.svgShadowOpacity);k.setAttribute("result","offsetColor");d.appendChild(k);k=null!=e.createElementNS?e.createElementNS(mxConstants.NS_SVG,"feComposite"):e.createElement("feComposite");k.setAttribute("in","offsetColor");k.setAttribute("in2","offsetBlur");k.setAttribute("operator","in");k.setAttribute("result","offsetBlur");d.appendChild(k);k=null!=e.createElementNS?e.createElementNS(mxConstants.NS_SVG,"feBlend"):e.createElement("feBlend");k.setAttribute("in","SourceGraphic");k.setAttribute("in2",
+"offsetBlur");d.appendChild(k);k=a.getElementsByTagName("defs");0==k.length?(e=null!=e.createElementNS?e.createElementNS(mxConstants.NS_SVG,"defs"):e.createElement("defs"),null!=a.firstChild?a.insertBefore(e,a.firstChild):a.appendChild(e)):e=k[0];e.appendChild(d);b||(c=null!=c?c:a.getElementsByTagName("g")[0],null!=c&&(c.setAttribute("filter","url(#"+this.shadowId+")"),isNaN(parseInt(a.getAttribute("width")))||(a.setAttribute("width",parseInt(a.getAttribute("width"))+6),a.setAttribute("height",parseInt(a.getAttribute("height"))+
6),c=a.getAttribute("viewBox"),null!=c&&0<c.length&&(c=c.split(" "),3<c.length&&(w=parseFloat(c[2])+6,h=parseFloat(c[3])+6,a.setAttribute("viewBox",c[0]+" "+c[1]+" "+w+" "+h))))));return d};Graph.prototype.setShadowVisible=function(a,c){mxClient.IS_SVG&&!mxClient.IS_SF&&(c=null!=c?c:!0,(this.shadowVisible=a)?this.view.getDrawPane().setAttribute("filter","url(#"+this.shadowId+")"):this.view.getDrawPane().removeAttribute("filter"),c&&this.fireEvent(new mxEventObject("shadowVisibleChanged")))};Graph.prototype.selectUnlockedLayer=
function(){if(null==this.defaultParent){var a=this.model.getChildCount(this.model.root),c,b=0;do c=this.model.getChildAt(this.model.root,b);while(b++<a&&"1"==mxUtils.getValue(this.getCellStyle(c),"locked","0"));null!=c&&this.setDefaultParent(c)}};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",
@@ -3273,293 +3274,295 @@ mxStencilRegistry.libraries["mockup/misc"]=[SHAPES_PATH+"/mockup/mxMockupMisc.js
"/mxBasic.js",STENCIL_PATH+"/bootstrap.xml"];mxStencilRegistry.libraries.gmdl=[SHAPES_PATH+"/mxGmdl.js",STENCIL_PATH+"/gmdl.xml"];mxStencilRegistry.libraries.gcp2=[SHAPES_PATH+"/mxGCP2.js",STENCIL_PATH+"/gcp2.xml"];mxStencilRegistry.libraries.ibm=[SHAPES_PATH+"/mxIBM.js",STENCIL_PATH+"/ibm.xml"];mxStencilRegistry.libraries.cabinets=[SHAPES_PATH+"/mxCabinets.js",STENCIL_PATH+"/cabinets.xml"];mxStencilRegistry.libraries.archimate=[SHAPES_PATH+"/mxArchiMate.js"];mxStencilRegistry.libraries.archimate3=
[SHAPES_PATH+"/mxArchiMate3.js"];mxStencilRegistry.libraries.sysml=[SHAPES_PATH+"/mxSysML.js"];mxStencilRegistry.libraries.eip=[SHAPES_PATH+"/mxEip.js",STENCIL_PATH+"/eip.xml"];mxStencilRegistry.libraries.networks=[SHAPES_PATH+"/mxNetworks.js",STENCIL_PATH+"/networks.xml"];mxStencilRegistry.libraries.aws3d=[SHAPES_PATH+"/mxAWS3D.js",STENCIL_PATH+"/aws3d.xml"];mxStencilRegistry.libraries.aws4=[SHAPES_PATH+"/mxAWS4.js",STENCIL_PATH+"/aws4.xml"];mxStencilRegistry.libraries.aws4b=[SHAPES_PATH+"/mxAWS4.js",
STENCIL_PATH+"/aws4.xml"];mxStencilRegistry.libraries.uml25=[SHAPES_PATH+"/mxUML25.js"];mxStencilRegistry.libraries.veeam=[STENCIL_PATH+"/veeam/2d.xml",STENCIL_PATH+"/veeam/3d.xml",STENCIL_PATH+"/veeam/veeam.xml"];mxStencilRegistry.libraries.veeam2=[STENCIL_PATH+"/veeam/2d.xml",STENCIL_PATH+"/veeam/3d.xml",STENCIL_PATH+"/veeam/veeam2.xml"];mxStencilRegistry.libraries.pid2inst=[SHAPES_PATH+"/pid2/mxPidInstruments.js"];mxStencilRegistry.libraries.pid2misc=[SHAPES_PATH+"/pid2/mxPidMisc.js",STENCIL_PATH+
-"/pid/misc.xml"];mxStencilRegistry.libraries.pid2valves=[SHAPES_PATH+"/pid2/mxPidValves.js"];mxStencilRegistry.libraries.pidFlowSensors=[STENCIL_PATH+"/pid/flow_sensors.xml"];mxMarker.getPackageForType=function(a){var c=null;null!=a&&0<a.length&&("ER"==a.substring(0,2)?c="mxgraph.er":"sysML"==a.substring(0,5)&&(c="mxgraph.sysml"));return c};var M=mxMarker.createMarker;mxMarker.createMarker=function(a,c,b,e,d,g,f,k,l,n){if(null!=b&&null==mxMarker.markers[b]){var q=this.getPackageForType(b);null!=q&&
-mxStencilRegistry.getStencil(q)}return M.apply(this,arguments)};PrintDialog.prototype.create=function(a,c){function b(){t.value=Math.max(1,Math.min(k,Math.max(parseInt(t.value),parseInt(m.value))));m.value=Math.max(1,Math.min(k,Math.min(parseInt(t.value),parseInt(m.value))))}function e(c){function b(c,b,g){var f=c.useCssTransforms,k=c.currentTranslate,l=c.currentScale,n=c.view.translate,q=c.view.scale;c.useCssTransforms&&(c.useCssTransforms=!1,c.currentTranslate=new mxPoint(0,0),c.currentScale=1,
-c.view.translate=new mxPoint(0,0),c.view.scale=1);var u=c.getGraphBounds(),m=0,t=0,x=F.get(),p=1/c.pageScale,A=z.checked;if(A)var p=parseInt(O.value),C=parseInt(I.value),p=Math.min(x.height*C/(u.height/c.view.scale),x.width*p/(u.width/c.view.scale));else p=parseInt(v.value)/(100*c.pageScale),isNaN(p)&&(e=1/c.pageScale,v.value="100 %");x=mxRectangle.fromRectangle(x);x.width=Math.ceil(x.width*e);x.height=Math.ceil(x.height*e);p*=e;!A&&c.pageVisible?(u=c.getPageLayout(),m-=u.x*x.width,t-=u.y*x.height):
+"/pid/misc.xml"];mxStencilRegistry.libraries.pid2valves=[SHAPES_PATH+"/pid2/mxPidValves.js"];mxStencilRegistry.libraries.pidFlowSensors=[STENCIL_PATH+"/pid/flow_sensors.xml"];mxMarker.getPackageForType=function(a){var c=null;null!=a&&0<a.length&&("ER"==a.substring(0,2)?c="mxgraph.er":"sysML"==a.substring(0,5)&&(c="mxgraph.sysml"));return c};var M=mxMarker.createMarker;mxMarker.createMarker=function(a,c,b,e,d,k,f,g,l,n){if(null!=b&&null==mxMarker.markers[b]){var q=this.getPackageForType(b);null!=q&&
+mxStencilRegistry.getStencil(q)}return M.apply(this,arguments)};PrintDialog.prototype.create=function(a,c){function b(){t.value=Math.max(1,Math.min(g,Math.max(parseInt(t.value),parseInt(m.value))));m.value=Math.max(1,Math.min(g,Math.min(parseInt(t.value),parseInt(m.value))))}function e(c){function b(c,b,k){var f=c.useCssTransforms,g=c.currentTranslate,l=c.currentScale,n=c.view.translate,q=c.view.scale;c.useCssTransforms&&(c.useCssTransforms=!1,c.currentTranslate=new mxPoint(0,0),c.currentScale=1,
+c.view.translate=new mxPoint(0,0),c.view.scale=1);var u=c.getGraphBounds(),m=0,t=0,x=F.get(),p=1/c.pageScale,A=z.checked;if(A)var p=parseInt(O.value),D=parseInt(I.value),p=Math.min(x.height*D/(u.height/c.view.scale),x.width*p/(u.width/c.view.scale));else p=parseInt(v.value)/(100*c.pageScale),isNaN(p)&&(e=1/c.pageScale,v.value="100 %");x=mxRectangle.fromRectangle(x);x.width=Math.ceil(x.width*e);x.height=Math.ceil(x.height*e);p*=e;!A&&c.pageVisible?(u=c.getPageLayout(),m-=u.x*x.width,t-=u.y*x.height):
A=!0;if(null==b){b=PrintDialog.createPrintPreview(c,p,x,0,m,t,A);b.pageSelector=!1;b.mathEnabled=!1;m=a.getCurrentFile();null!=m&&(b.title=m.getTitle());var N=b.writeHead;b.writeHead=function(b){N.apply(this,arguments);if(mxClient.IS_GC||mxClient.IS_SF)b.writeln('<style type="text/css">'),b.writeln(Editor.mathJaxWebkitCss),b.writeln("</style>");mxClient.IS_GC&&(b.writeln('<style type="text/css">'),b.writeln("@media print {"),b.writeln("span.MathJax_SVG svg { shape-rendering: crispEdges; }"),b.writeln("}"),
-b.writeln("</style>"));null!=a.editor.fontCss&&(b.writeln('<style type="text/css">'),b.writeln(a.editor.fontCss),b.writeln("</style>"));for(var e=c.getCustomFonts(),d=0;d<e.length;d++){var g=e[d].name,f=e[d].url;Graph.isCssFontUrl(f)?b.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(f)+'" charset="UTF-8" type="text/css">'):(b.writeln('<style type="text/css">'),b.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(g)+'";\nsrc: url("'+mxUtils.htmlEntities(f)+'");\n}'),b.writeln("</style>"))}};
-if("undefined"!==typeof MathJax){var E=b.renderPage;b.renderPage=function(c,b,e,d,g,f){var k=mxClient.NO_FO;mxClient.NO_FO=this.graph.mathEnabled&&!a.editor.useForeignObjectForMath?!0:a.editor.originalNoForeignObject;var l=E.apply(this,arguments);mxClient.NO_FO=k;this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:l.className="geDisableMathJax";return l}}m=null;t=d.enableFlowAnimation;d.enableFlowAnimation=!1;null!=d.themes&&"darkTheme"==d.defaultThemeName&&(m=d.stylesheet,d.stylesheet=d.getDefaultStylesheet(),
-d.refresh());b.open(null,null,g,!0);d.enableFlowAnimation=t;null!=m&&(d.stylesheet=m,d.refresh())}else{x=c.background;if(null==x||""==x||x==mxConstants.NONE)x="#ffffff";b.backgroundColor=x;b.autoOrigin=A;b.appendGraph(c,p,m,t,g,!0);g=c.getCustomFonts();if(null!=b.wnd)for(m=0;m<g.length;m++)t=g[m].name,A=g[m].url,Graph.isCssFontUrl(A)?b.wnd.document.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(A)+'" charset="UTF-8" type="text/css">'):(b.wnd.document.writeln('<style type="text/css">'),
-b.wnd.document.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(t)+'";\nsrc: url("'+mxUtils.htmlEntities(A)+'");\n}'),b.wnd.document.writeln("</style>"))}f&&(c.useCssTransforms=f,c.currentTranslate=k,c.currentScale=l,c.view.translate=n,c.view.scale=q);return b}var e=parseInt(K.value)/100;isNaN(e)&&(e=1,K.value="100 %");var e=.75*e,g=null;null!=d.themes&&"darkTheme"==d.defaultThemeName&&(g=d.stylesheet,d.stylesheet=d.getDefaultStylesheet(),d.refresh());var f=m.value,k=t.value,n=!q.checked,
-u=null;if(EditorUi.isElectronApp)PrintDialog.electronPrint(a,q.checked,f,k,z.checked,O.value,I.value,parseInt(v.value)/100,parseInt(K.value)/100,F.get());else{n&&(n=f==l&&k==l);if(!n&&null!=a.pages&&a.pages.length){var x=0,n=a.pages.length-1;q.checked||(x=parseInt(f)-1,n=parseInt(k)-1);for(var p=x;p<=n;p++){var A=a.pages[p],f=A==a.currentPage?d:null;if(null==f){var f=a.createTemporaryGraph(d.stylesheet),k=!0,x=!1,C=null,N=null;null==A.viewState&&null==A.root&&a.updatePageRoot(A);null!=A.viewState&&
-(k=A.viewState.pageVisible,x=A.viewState.mathEnabled,C=A.viewState.background,N=A.viewState.backgroundImage,f.extFonts=A.viewState.extFonts);f.background=C;f.backgroundImage=null!=N?new mxImage(N.src,N.width,N.height):null;f.pageVisible=k;f.mathEnabled=x;var E=f.getGlobalVariable;f.getGlobalVariable=function(c){return"page"==c?A.getName():"pagenumber"==c?p+1:"pagecount"==c?null!=a.pages?a.pages.length:1:E.apply(this,arguments)};document.body.appendChild(f.container);a.updatePageRoot(A);f.model.setRoot(A.root)}u=
-b(f,u,p!=n);f!=d&&f.container.parentNode.removeChild(f.container)}}else u=b(d);null==u?a.handleError({message:mxResources.get("errorUpdatingPreview")}):(u.mathEnabled&&(n=u.wnd.document,c&&(u.wnd.IMMEDIATE_PRINT=!0),n.writeln('<script type="text/javascript" src="'+DRAWIO_BASE_URL+'/js/math-print.js">\x3c/script>')),u.closeDocument(),!u.mathEnabled&&c&&PrintDialog.printPreview(u));null!=g&&(d.stylesheet=g,d.refresh())}}var d=a.editor.graph,g=document.createElement("div"),f=document.createElement("h3");
-f.style.width="100%";f.style.textAlign="center";f.style.marginTop="0px";mxUtils.write(f,c||mxResources.get("print"));g.appendChild(f);var k=1,l=1,n=document.createElement("div");n.style.cssText="border-bottom:1px solid lightGray;padding-bottom:12px;margin-bottom:12px;";var q=document.createElement("input");q.style.cssText="margin-right:8px;margin-bottom:8px;";q.setAttribute("value","all");q.setAttribute("type","radio");q.setAttribute("name","pages-printdialog");n.appendChild(q);f=document.createElement("span");
+b.writeln("</style>"));null!=a.editor.fontCss&&(b.writeln('<style type="text/css">'),b.writeln(a.editor.fontCss),b.writeln("</style>"));for(var e=c.getCustomFonts(),d=0;d<e.length;d++){var k=e[d].name,f=e[d].url;Graph.isCssFontUrl(f)?b.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(f)+'" charset="UTF-8" type="text/css">'):(b.writeln('<style type="text/css">'),b.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(k)+'";\nsrc: url("'+mxUtils.htmlEntities(f)+'");\n}'),b.writeln("</style>"))}};
+if("undefined"!==typeof MathJax){var E=b.renderPage;b.renderPage=function(c,b,e,d,k,f){var g=mxClient.NO_FO;mxClient.NO_FO=this.graph.mathEnabled&&!a.editor.useForeignObjectForMath?!0:a.editor.originalNoForeignObject;var l=E.apply(this,arguments);mxClient.NO_FO=g;this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:l.className="geDisableMathJax";return l}}m=null;t=d.enableFlowAnimation;d.enableFlowAnimation=!1;null!=d.themes&&"darkTheme"==d.defaultThemeName&&(m=d.stylesheet,d.stylesheet=d.getDefaultStylesheet(),
+d.refresh());b.open(null,null,k,!0);d.enableFlowAnimation=t;null!=m&&(d.stylesheet=m,d.refresh())}else{x=c.background;if(null==x||""==x||x==mxConstants.NONE)x="#ffffff";b.backgroundColor=x;b.autoOrigin=A;b.appendGraph(c,p,m,t,k,!0);k=c.getCustomFonts();if(null!=b.wnd)for(m=0;m<k.length;m++)t=k[m].name,A=k[m].url,Graph.isCssFontUrl(A)?b.wnd.document.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(A)+'" charset="UTF-8" type="text/css">'):(b.wnd.document.writeln('<style type="text/css">'),
+b.wnd.document.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(t)+'";\nsrc: url("'+mxUtils.htmlEntities(A)+'");\n}'),b.wnd.document.writeln("</style>"))}f&&(c.useCssTransforms=f,c.currentTranslate=g,c.currentScale=l,c.view.translate=n,c.view.scale=q);return b}var e=parseInt(K.value)/100;isNaN(e)&&(e=1,K.value="100 %");var e=.75*e,k=null;null!=d.themes&&"darkTheme"==d.defaultThemeName&&(k=d.stylesheet,d.stylesheet=d.getDefaultStylesheet(),d.refresh());var f=m.value,g=t.value,n=!q.checked,
+u=null;if(EditorUi.isElectronApp)PrintDialog.electronPrint(a,q.checked,f,g,z.checked,O.value,I.value,parseInt(v.value)/100,parseInt(K.value)/100,F.get());else{n&&(n=f==l&&g==l);if(!n&&null!=a.pages&&a.pages.length){var x=0,n=a.pages.length-1;q.checked||(x=parseInt(f)-1,n=parseInt(g)-1);for(var p=x;p<=n;p++){var A=a.pages[p],f=A==a.currentPage?d:null;if(null==f){var f=a.createTemporaryGraph(d.stylesheet),g=!0,x=!1,D=null,N=null;null==A.viewState&&null==A.root&&a.updatePageRoot(A);null!=A.viewState&&
+(g=A.viewState.pageVisible,x=A.viewState.mathEnabled,D=A.viewState.background,N=A.viewState.backgroundImage,f.extFonts=A.viewState.extFonts);f.background=D;f.backgroundImage=null!=N?new mxImage(N.src,N.width,N.height):null;f.pageVisible=g;f.mathEnabled=x;var E=f.getGlobalVariable;f.getGlobalVariable=function(c){return"page"==c?A.getName():"pagenumber"==c?p+1:"pagecount"==c?null!=a.pages?a.pages.length:1:E.apply(this,arguments)};document.body.appendChild(f.container);a.updatePageRoot(A);f.model.setRoot(A.root)}u=
+b(f,u,p!=n);f!=d&&f.container.parentNode.removeChild(f.container)}}else u=b(d);null==u?a.handleError({message:mxResources.get("errorUpdatingPreview")}):(u.mathEnabled&&(n=u.wnd.document,c&&(u.wnd.IMMEDIATE_PRINT=!0),n.writeln('<script type="text/javascript" src="'+DRAWIO_BASE_URL+'/js/math-print.js">\x3c/script>')),u.closeDocument(),!u.mathEnabled&&c&&PrintDialog.printPreview(u));null!=k&&(d.stylesheet=k,d.refresh())}}var d=a.editor.graph,k=document.createElement("div"),f=document.createElement("h3");
+f.style.width="100%";f.style.textAlign="center";f.style.marginTop="0px";mxUtils.write(f,c||mxResources.get("print"));k.appendChild(f);var g=1,l=1,n=document.createElement("div");n.style.cssText="border-bottom:1px solid lightGray;padding-bottom:12px;margin-bottom:12px;";var q=document.createElement("input");q.style.cssText="margin-right:8px;margin-bottom:8px;";q.setAttribute("value","all");q.setAttribute("type","radio");q.setAttribute("name","pages-printdialog");n.appendChild(q);f=document.createElement("span");
mxUtils.write(f,mxResources.get("printAllPages"));n.appendChild(f);mxUtils.br(n);var u=q.cloneNode(!0);q.setAttribute("checked","checked");u.setAttribute("value","range");n.appendChild(u);f=document.createElement("span");mxUtils.write(f,mxResources.get("pages")+":");n.appendChild(f);var m=document.createElement("input");m.style.cssText="margin:0 8px 0 8px;";m.setAttribute("value","1");m.setAttribute("type","number");m.setAttribute("min","1");m.style.width="50px";n.appendChild(m);f=document.createElement("span");
-mxUtils.write(f,mxResources.get("to"));n.appendChild(f);var t=m.cloneNode(!0);n.appendChild(t);mxEvent.addListener(m,"focus",function(){u.checked=!0});mxEvent.addListener(t,"focus",function(){u.checked=!0});mxEvent.addListener(m,"change",b);mxEvent.addListener(t,"change",b);if(null!=a.pages&&(k=a.pages.length,null!=a.currentPage))for(f=0;f<a.pages.length;f++)if(a.currentPage==a.pages[f]){l=f+1;m.value=l;t.value=l;break}m.setAttribute("max",k);t.setAttribute("max",k);a.isPagesEnabled()?1<k&&(g.appendChild(n),
+mxUtils.write(f,mxResources.get("to"));n.appendChild(f);var t=m.cloneNode(!0);n.appendChild(t);mxEvent.addListener(m,"focus",function(){u.checked=!0});mxEvent.addListener(t,"focus",function(){u.checked=!0});mxEvent.addListener(m,"change",b);mxEvent.addListener(t,"change",b);if(null!=a.pages&&(g=a.pages.length,null!=a.currentPage))for(f=0;f<a.pages.length;f++)if(a.currentPage==a.pages[f]){l=f+1;m.value=l;t.value=l;break}m.setAttribute("max",g);t.setAttribute("max",g);a.isPagesEnabled()?1<g&&(k.appendChild(n),
u.checked=!0):u.checked=!0;var x=document.createElement("div");x.style.marginBottom="10px";var p=document.createElement("input");p.style.marginRight="8px";p.setAttribute("value","adjust");p.setAttribute("type","radio");p.setAttribute("name","printZoom");x.appendChild(p);f=document.createElement("span");mxUtils.write(f,mxResources.get("adjustTo"));x.appendChild(f);var v=document.createElement("input");v.style.cssText="margin:0 8px 0 8px;";v.setAttribute("value","100 %");v.style.width="50px";x.appendChild(v);
-mxEvent.addListener(v,"focus",function(){p.checked=!0});g.appendChild(x);var n=n.cloneNode(!1),z=p.cloneNode(!0);z.setAttribute("value","fit");p.setAttribute("checked","checked");f=document.createElement("div");f.style.cssText="display:inline-block;height:100%;vertical-align:top;padding-top:2px;";f.appendChild(z);n.appendChild(f);x=document.createElement("table");x.style.display="inline-block";var A=document.createElement("tbody"),C=document.createElement("tr"),N=C.cloneNode(!0),E=document.createElement("td"),
-G=E.cloneNode(!0),H=E.cloneNode(!0),D=E.cloneNode(!0),U=E.cloneNode(!0),M=E.cloneNode(!0);E.style.textAlign="right";D.style.textAlign="right";mxUtils.write(E,mxResources.get("fitTo"));var O=document.createElement("input");O.style.cssText="margin:0 8px 0 8px;";O.setAttribute("value","1");O.setAttribute("min","1");O.setAttribute("type","number");O.style.width="40px";G.appendChild(O);f=document.createElement("span");mxUtils.write(f,mxResources.get("fitToSheetsAcross"));H.appendChild(f);mxUtils.write(D,
-mxResources.get("fitToBy"));var I=O.cloneNode(!0);U.appendChild(I);mxEvent.addListener(O,"focus",function(){z.checked=!0});mxEvent.addListener(I,"focus",function(){z.checked=!0});f=document.createElement("span");mxUtils.write(f,mxResources.get("fitToSheetsDown"));M.appendChild(f);C.appendChild(E);C.appendChild(G);C.appendChild(H);N.appendChild(D);N.appendChild(U);N.appendChild(M);A.appendChild(C);A.appendChild(N);x.appendChild(A);n.appendChild(x);g.appendChild(n);n=document.createElement("div");f=
+mxEvent.addListener(v,"focus",function(){p.checked=!0});k.appendChild(x);var n=n.cloneNode(!1),z=p.cloneNode(!0);z.setAttribute("value","fit");p.setAttribute("checked","checked");f=document.createElement("div");f.style.cssText="display:inline-block;height:100%;vertical-align:top;padding-top:2px;";f.appendChild(z);n.appendChild(f);x=document.createElement("table");x.style.display="inline-block";var A=document.createElement("tbody"),D=document.createElement("tr"),N=D.cloneNode(!0),E=document.createElement("td"),
+G=E.cloneNode(!0),H=E.cloneNode(!0),C=E.cloneNode(!0),U=E.cloneNode(!0),M=E.cloneNode(!0);E.style.textAlign="right";C.style.textAlign="right";mxUtils.write(E,mxResources.get("fitTo"));var O=document.createElement("input");O.style.cssText="margin:0 8px 0 8px;";O.setAttribute("value","1");O.setAttribute("min","1");O.setAttribute("type","number");O.style.width="40px";G.appendChild(O);f=document.createElement("span");mxUtils.write(f,mxResources.get("fitToSheetsAcross"));H.appendChild(f);mxUtils.write(C,
+mxResources.get("fitToBy"));var I=O.cloneNode(!0);U.appendChild(I);mxEvent.addListener(O,"focus",function(){z.checked=!0});mxEvent.addListener(I,"focus",function(){z.checked=!0});f=document.createElement("span");mxUtils.write(f,mxResources.get("fitToSheetsDown"));M.appendChild(f);D.appendChild(E);D.appendChild(G);D.appendChild(H);N.appendChild(C);N.appendChild(U);N.appendChild(M);A.appendChild(D);A.appendChild(N);x.appendChild(A);n.appendChild(x);k.appendChild(n);n=document.createElement("div");f=
document.createElement("div");f.style.fontWeight="bold";f.style.marginBottom="12px";mxUtils.write(f,mxResources.get("paperSize"));n.appendChild(f);f=document.createElement("div");f.style.marginBottom="12px";var F=PageSetupDialog.addPageFormatPanel(f,"printdialog",a.editor.graph.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT);n.appendChild(f);f=document.createElement("span");mxUtils.write(f,mxResources.get("pageScale"));n.appendChild(f);var K=document.createElement("input");K.style.cssText="margin:0 8px 0 8px;";
-K.setAttribute("value","100 %");K.style.width="60px";n.appendChild(K);g.appendChild(n);f=document.createElement("div");f.style.cssText="text-align:right;margin:48px 0 0 0;";n=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});n.className="geBtn";a.editor.cancelFirst&&f.appendChild(n);a.isOffline()||(x=mxUtils.button(mxResources.get("help"),function(){d.openLink("https://www.diagrams.net/doc/faq/print-diagram")}),x.className="geBtn",f.appendChild(x));PrintDialog.previewEnabled&&(x=
-mxUtils.button(mxResources.get("preview"),function(){a.hideDialog();e(!1)}),x.className="geBtn",f.appendChild(x));x=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){a.hideDialog();e(!0)});x.className="geBtn gePrimaryBtn";f.appendChild(x);a.editor.cancelFirst||f.appendChild(n);g.appendChild(f);this.container=g};var U=ChangePageSetup.prototype.execute;ChangePageSetup.prototype.execute=function(){null==this.page&&(this.page=this.ui.currentPage);if(this.page!=this.ui.currentPage){if(null!=
+K.setAttribute("value","100 %");K.style.width="60px";n.appendChild(K);k.appendChild(n);f=document.createElement("div");f.style.cssText="text-align:right;margin:48px 0 0 0;";n=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});n.className="geBtn";a.editor.cancelFirst&&f.appendChild(n);a.isOffline()||(x=mxUtils.button(mxResources.get("help"),function(){d.openLink("https://www.diagrams.net/doc/faq/print-diagram")}),x.className="geBtn",f.appendChild(x));PrintDialog.previewEnabled&&(x=
+mxUtils.button(mxResources.get("preview"),function(){a.hideDialog();e(!1)}),x.className="geBtn",f.appendChild(x));x=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){a.hideDialog();e(!0)});x.className="geBtn gePrimaryBtn";f.appendChild(x);a.editor.cancelFirst||f.appendChild(n);k.appendChild(f);this.container=k};var U=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 a=this.image;null!=a&&null!=a.src&&Graph.isPageLink(a.src)&&(a={originalSrc:a.src});this.page.viewState.backgroundImage=a}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 U.apply(this,arguments),null!=this.mathEnabled&&
this.mathEnabled!=this.ui.isMathEnabled()&&(this.ui.setMathEnabled(this.mathEnabled),this.mathEnabled=!this.mathEnabled),null!=this.shadowVisible&&this.shadowVisible!=this.ui.editor.graph.shadowVisible&&(this.ui.editor.graph.setShadowVisible(this.shadowVisible),this.shadowVisible=!this.shadowVisible)};Editor.prototype.useCanvasForExport=!1;try{var O=document.createElement("canvas"),N=new Image;N.onload=function(){try{O.getContext("2d").drawImage(N,0,0);var a=O.toDataURL("image/png");Editor.prototype.useCanvasForExport=
-null!=a&&6<a.length}catch(D){}};N.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){}})();
-(function(){var a=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);a.beforeDecode=function(a,d,k){k.ui=a.ui;return d};a.afterDecode=function(a,d,k){k.previousColor=k.color;k.previousImage=k.image;k.previousFormat=k.format;null!=k.foldingEnabled&&(k.foldingEnabled=!k.foldingEnabled);null!=k.mathEnabled&&(k.mathEnabled=!k.mathEnabled);null!=k.shadowVisible&&(k.shadowVisible=!k.shadowVisible);return k};mxCodecRegistry.register(a)})();
-(function(){var a=new mxObjectCodec(new ChangeGridColor,["ui"]);a.beforeDecode=function(a,d,k){k.ui=a.ui;return d};mxCodecRegistry.register(a)})();(function(){EditorUi.VERSION="15.0.3";EditorUi.compactUi="atlas"!=uiTheme;Editor.isDarkMode()&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&(/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname))&&"support.draw.io"!=window.location.hostname;EditorUi.drawHost=window.DRAWIO_BASE_URL;EditorUi.lightboxHost=window.DRAWIO_LIGHTBOX_URL;EditorUi.lastErrorMessage=
+null!=a&&6<a.length}catch(C){}};N.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){}})();
+(function(){var a=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);a.beforeDecode=function(a,d,g){g.ui=a.ui;return d};a.afterDecode=function(a,d,g){g.previousColor=g.color;g.previousImage=g.image;g.previousFormat=g.format;null!=g.foldingEnabled&&(g.foldingEnabled=!g.foldingEnabled);null!=g.mathEnabled&&(g.mathEnabled=!g.mathEnabled);null!=g.shadowVisible&&(g.shadowVisible=!g.shadowVisible);return g};mxCodecRegistry.register(a)})();
+(function(){var a=new mxObjectCodec(new ChangeGridColor,["ui"]);a.beforeDecode=function(a,d,g){g.ui=a.ui;return d};mxCodecRegistry.register(a)})();(function(){EditorUi.VERSION="15.0.4";EditorUi.compactUi="atlas"!=uiTheme;Editor.isDarkMode()&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&(/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname))&&"support.draw.io"!=window.location.hostname;EditorUi.drawHost=window.DRAWIO_BASE_URL;EditorUi.lightboxHost=window.DRAWIO_LIGHTBOX_URL;EditorUi.lastErrorMessage=
null;EditorUi.ignoredAnonymizedChars="\n\t`~!@#$%^&*()_+{}|:\"<>?-=[];'./,\n\t";EditorUi.templateFile=TEMPLATE_PATH+"/index.xml";EditorUi.cacheUrl="1"==urlParams.dev?"/cache":window.REALTIME_URL;null==EditorUi.cacheUrl&&"undefined"!==typeof DrawioFile&&(DrawioFile.SYNC="none");Editor.cacheTimeout=1E4;EditorUi.enablePlantUml=EditorUi.enableLogging;EditorUi.isElectronApp=null!=window&&null!=window.process&&null!=window.process.versions&&null!=window.process.versions.electron;EditorUi.nativeFileSupport=
!mxClient.IS_OP&&!EditorUi.isElectronApp&&"1"!=urlParams.extAuth&&"showSaveFilePicker"in window&&"showOpenFilePicker"in window;EditorUi.enableDrafts=!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&isLocalStorage&&"0"!=urlParams.drafts;EditorUi.scratchpadHelpLink="https://www.diagrams.net/doc/faq/scratchpad";EditorUi.defaultMermaidConfig={theme:"neutral",arrowMarkerAbsolute:!1,flowchart:{htmlLabels:!1},sequence:{diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,
-noteMargin:10,messageMargin:35,mirrorActors:!0,bottomMarginAdj:1,useMaxWidth:!0,rightAngles:!1,showSequenceNumbers:!1},gantt:{titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,leftPadding:75,gridLineStartPadding:35,fontSize:11,fontFamily:'"Open-Sans", "sans-serif"',numberSectionStyles:4,axisFormat:"%Y-%m-%d"}};EditorUi.logError=function(a,b,d,f,k,q,u){q=null!=q?q:0<=a.indexOf("NetworkError")||0<=a.indexOf("SecurityError")||0<=a.indexOf("NS_ERROR_FAILURE")||0<=a.indexOf("out of memory")?"CONFIG":
-"SEVERE";if(EditorUi.enableLogging&&"1"!=urlParams.dev)try{if(a!=EditorUi.lastErrorMessage&&(null==a||null==b||-1==a.indexOf("Script error")&&-1==a.indexOf("extension"))&&null!=a&&0>a.indexOf("DocumentClosedError")){EditorUi.lastErrorMessage=a;var c=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";k=null!=k?k:Error(a);(new Image).src=c+"/log?severity="+q+"&v="+encodeURIComponent(EditorUi.VERSION)+"&msg=clientError:"+encodeURIComponent(a)+":url:"+encodeURIComponent(window.location.href)+":lnum:"+
-encodeURIComponent(d)+(null!=f?":colno:"+encodeURIComponent(f):"")+(null!=k&&null!=k.stack?"&stack="+encodeURIComponent(k.stack):"")}}catch(A){}try{u||null==window.console||console.error(q,a,b,d,f,k)}catch(A){}};EditorUi.logEvent=function(a){if("1"==urlParams.dev)EditorUi.debug("logEvent",a);else if(EditorUi.enableLogging)try{var c=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";(new Image).src=c+"/images/1x1.png?v="+encodeURIComponent(EditorUi.VERSION)+(null!=a?"&data="+encodeURIComponent(JSON.stringify(a)):
-"")}catch(g){}};EditorUi.sendReport=function(a,b){if("1"==urlParams.dev)EditorUi.debug("sendReport",a);else if(EditorUi.enableLogging)try{b=null!=b?b:5E4,a.length>b&&(a=a.substring(0,b)+"\n...[SHORTENED]"),mxUtils.post("/email","version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&data="+encodeURIComponent(a))}catch(g){}};EditorUi.debug=function(){try{if(null!=window.console&&"1"==urlParams.test){for(var a=[(new Date).toISOString()],b=0;b<arguments.length;b++)null!=
-arguments[b]&&a.push(arguments[b]);console.log.apply(console,a)}}catch(g){}};EditorUi.parsePng=function(a,b,d){function c(a,c){var b=g;g+=c;return a.substring(b,g)}function e(a){a=c(a,4);return a.charCodeAt(3)+(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}var g=0;if(c(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=d&&d();else if(c(a,4),"IHDR"!=c(a,4))null!=d&&d();else{c(a,17);do{d=e(a);var f=c(a,4);if(null!=b&&b(g-8,f,d))break;value=c(a,d);c(a,4);if("IEND"==
+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(a,b,d,f,g,q,u){q=null!=q?q:0<=a.indexOf("NetworkError")||0<=a.indexOf("SecurityError")||0<=a.indexOf("NS_ERROR_FAILURE")||0<=a.indexOf("out of memory")?"CONFIG":
+"SEVERE";if(EditorUi.enableLogging&&"1"!=urlParams.dev)try{if(a!=EditorUi.lastErrorMessage&&(null==a||null==b||-1==a.indexOf("Script error")&&-1==a.indexOf("extension"))&&null!=a&&0>a.indexOf("DocumentClosedError")){EditorUi.lastErrorMessage=a;var c=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";g=null!=g?g:Error(a);(new Image).src=c+"/log?severity="+q+"&v="+encodeURIComponent(EditorUi.VERSION)+"&msg=clientError:"+encodeURIComponent(a)+":url:"+encodeURIComponent(window.location.href)+":lnum:"+
+encodeURIComponent(d)+(null!=f?":colno:"+encodeURIComponent(f):"")+(null!=g&&null!=g.stack?"&stack="+encodeURIComponent(g.stack):"")}}catch(A){}try{u||null==window.console||console.error(q,a,b,d,f,g)}catch(A){}};EditorUi.logEvent=function(a){if("1"==urlParams.dev)EditorUi.debug("logEvent",a);else if(EditorUi.enableLogging)try{var c=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";(new Image).src=c+"/images/1x1.png?v="+encodeURIComponent(EditorUi.VERSION)+(null!=a?"&data="+encodeURIComponent(JSON.stringify(a)):
+"")}catch(k){}};EditorUi.sendReport=function(a,b){if("1"==urlParams.dev)EditorUi.debug("sendReport",a);else if(EditorUi.enableLogging)try{b=null!=b?b:5E4,a.length>b&&(a=a.substring(0,b)+"\n...[SHORTENED]"),mxUtils.post("/email","version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&data="+encodeURIComponent(a))}catch(k){}};EditorUi.debug=function(){try{if(null!=window.console&&"1"==urlParams.test){for(var a=[(new Date).toISOString()],b=0;b<arguments.length;b++)null!=
+arguments[b]&&a.push(arguments[b]);console.log.apply(console,a)}}catch(k){}};EditorUi.parsePng=function(a,b,d){function c(a,c){var b=k;k+=c;return a.substring(b,k)}function e(a){a=c(a,4);return a.charCodeAt(3)+(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}var k=0;if(c(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=d&&d();else if(c(a,4),"IHDR"!=c(a,4))null!=d&&d();else{c(a,17);do{d=e(a);var f=c(a,4);if(null!=b&&b(k-8,f,d))break;value=c(a,d);c(a,4);if("IEND"==
f)break}while(d)}};EditorUi.removeChildNodes=function(a){for(;null!=a.firstChild;)a.removeChild(a.firstChild)};EditorUi.prototype.emptyDiagramXml='<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/></root></mxGraphModel>';EditorUi.prototype.emptyLibraryXml="<mxlibrary>[]</mxlibrary>";EditorUi.prototype.mode=null;EditorUi.prototype.timeout=Editor.prototype.timeout;EditorUi.prototype.sidebarFooterHeight=38;EditorUi.prototype.defaultCustomShapeStyle="shape=stencil(tZRtTsQgEEBPw1+DJR7AoN6DbWftpAgE0Ortd/jYRGq72R+YNE2YgTePloEJGWblgA18ZuKFDcMj5/Sm8boZq+BgjCX4pTyqk6ZlKROitwusOMXKQDODx5iy4pXxZ5qTHiFHawxB0JrQZH7lCabQ0Fr+XWC1/E8zcsT/gAi+Subo2/3Mh6d/oJb5nU1b5tW7r2knautaa3T+U32o7f7vZwpJkaNDLORJjcu7t59m2jXxqX9un+tt022acsfmoKaQZ+vhhswZtS6Ne/ThQGt0IV0N3Yyv6P3CeT9/tHO0XFI5cAE=);whiteSpace=wrap;html=1;";
EditorUi.prototype.maxBackgroundSize=1600;EditorUi.prototype.maxImageSize=520;EditorUi.prototype.maxTextWidth=520;EditorUi.prototype.resampleThreshold=1E5;EditorUi.prototype.maxImageBytes=1E6;EditorUi.prototype.maxBackgroundBytes=25E5;EditorUi.prototype.maxTextBytes=5E5;EditorUi.prototype.currentFile=null;EditorUi.prototype.printPdfExport=!1;EditorUi.prototype.pdfPageExport=!0;EditorUi.prototype.formatEnabled="0"!=urlParams.format;EditorUi.prototype.insertTemplateEnabled=!0;EditorUi.prototype.closableScratchpad=
!0;(function(){EditorUi.prototype.useCanvasForExport=!1;EditorUi.prototype.jpgSupported=!1;try{var a=document.createElement("canvas");EditorUi.prototype.canvasSupported=!(!a.getContext||!a.getContext("2d"))}catch(l){}try{var b=document.createElement("canvas"),d=new Image;d.onload=function(){try{b.getContext("2d").drawImage(d,0,0);var a=b.toDataURL("image/png");EditorUi.prototype.useCanvasForExport=null!=a&&6<a.length}catch(q){}};d.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(l){}try{b=
document.createElement("canvas");b.width=b.height=1;var f=b.toDataURL("image/jpeg");EditorUi.prototype.jpgSupported=null!==f.match("image/jpeg")}catch(l){}})();EditorUi.prototype.openLink=function(a,b,d){return this.editor.graph.openLink(a,b,d)};EditorUi.prototype.showSplash=function(a){};EditorUi.prototype.getLocalData=function(a,b){b(localStorage.getItem(a))};EditorUi.prototype.setLocalData=function(a,b,d){localStorage.setItem(a,b);null!=d&&d()};EditorUi.prototype.removeLocalData=function(a,b){localStorage.removeItem(a);
b()};EditorUi.prototype.setMathEnabled=function(a){this.editor.graph.mathEnabled=a;this.editor.updateGraphComponents();this.editor.graph.refresh();this.fireEvent(new mxEventObject("mathEnabledChanged"))};EditorUi.prototype.isMathEnabled=function(a){return this.editor.graph.mathEnabled};EditorUi.prototype.isOfflineApp=function(){return"1"==urlParams.offline};EditorUi.prototype.isOffline=function(a){return this.isOfflineApp()||!navigator.onLine||!a&&("1"==urlParams.stealth||"1"==urlParams.lockdown)};
-EditorUi.prototype.createSpinner=function(a,b,d){var c=null==a||null==b;d=null!=d?d:24;var e=new Spinner({lines:12,length:d,width:Math.round(d/3),radius:Math.round(d/2),rotate:0,color:Editor.isDarkMode()?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),g=e.spin;e.spin=function(d,f){var k=!1;this.active||(g.call(this,d),this.active=!0,null!=f&&(c&&(b=Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,a=document.body.clientWidth/2-2),k=document.createElement("div"),
-k.style.position="absolute",k.style.whiteSpace="nowrap",k.style.background="#4B4243",k.style.color="white",k.style.fontFamily="Helvetica, Arial",k.style.fontSize="9pt",k.style.padding="6px",k.style.paddingLeft="10px",k.style.paddingRight="10px",k.style.zIndex=2E9,k.style.left=Math.max(0,a)+"px",k.style.top=Math.max(0,b+70)+"px",mxUtils.setPrefixedStyle(k.style,"borderRadius","6px"),mxUtils.setPrefixedStyle(k.style,"transform","translate(-50%,-50%)"),Editor.isDarkMode()||mxUtils.setPrefixedStyle(k.style,
-"boxShadow","2px 2px 3px 0px #ddd"),"..."!=f.substring(f.length-3,f.length)&&"!"!=f.charAt(f.length-1)&&(f+="..."),k.innerHTML=f,d.appendChild(k),e.status=k),this.pause=mxUtils.bind(this,function(){var a=function(){};this.active&&(a=mxUtils.bind(this,function(){this.spin(d,f)}));this.stop();return a}),k=!0);return k};var f=e.stop;e.stop=function(){f.call(this);this.active=!1;null!=e.status&&null!=e.status.parentNode&&e.status.parentNode.removeChild(e.status);e.status=null};e.pause=function(){return function(){}};
+EditorUi.prototype.createSpinner=function(a,b,d){var c=null==a||null==b;d=null!=d?d:24;var e=new Spinner({lines:12,length:d,width:Math.round(d/3),radius:Math.round(d/2),rotate:0,color:Editor.isDarkMode()?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),k=e.spin;e.spin=function(d,f){var g=!1;this.active||(k.call(this,d),this.active=!0,null!=f&&(c&&(b=Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,a=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="Helvetica, Arial",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,a)+"px",g.style.top=Math.max(0,b+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"),"..."!=f.substring(f.length-3,f.length)&&"!"!=f.charAt(f.length-1)&&(f+="..."),g.innerHTML=f,d.appendChild(g),e.status=g),this.pause=mxUtils.bind(this,function(){var a=function(){};this.active&&(a=mxUtils.bind(this,function(){this.spin(d,f)}));this.stop();return a}),g=!0);return g};var f=e.stop;e.stop=function(){f.call(this);this.active=!1;null!=e.status&&null!=e.status.parentNode&&e.status.parentNode.removeChild(e.status);e.status=null};e.pause=function(){return function(){}};
return e};EditorUi.prototype.isCompatibleString=function(a){try{var c=mxUtils.parseXml(a),b=this.editor.extractGraphModel(c.documentElement,!0);return null!=b&&0==b.getElementsByTagName("parsererror").length}catch(n){}return!1};EditorUi.prototype.isVisioData=function(a){return 8<a.length&&(208==a.charCodeAt(0)&&207==a.charCodeAt(1)&&17==a.charCodeAt(2)&&224==a.charCodeAt(3)&&161==a.charCodeAt(4)&&177==a.charCodeAt(5)&&26==a.charCodeAt(6)&&225==a.charCodeAt(7)||80==a.charCodeAt(0)&&75==a.charCodeAt(1)&&
3==a.charCodeAt(2)&&4==a.charCodeAt(3)||80==a.charCodeAt(0)&&75==a.charCodeAt(1)&&3==a.charCodeAt(2)&&6==a.charCodeAt(3))};EditorUi.prototype.isRemoteVisioData=function(a){return 8<a.length&&(208==a.charCodeAt(0)&&207==a.charCodeAt(1)&&17==a.charCodeAt(2)&&224==a.charCodeAt(3)&&161==a.charCodeAt(4)&&177==a.charCodeAt(5)&&26==a.charCodeAt(6)&&225==a.charCodeAt(7)||60==a.charCodeAt(0)&&63==a.charCodeAt(1)&&120==a.charCodeAt(2)&&109==a.charCodeAt(3)&&108==a.charCodeAt(3))};EditorUi.prototype.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)};var a=EditorUi.prototype.createKeyHandler;EditorUi.prototype.createKeyHandler=function(c){var b=a.apply(this,arguments);if(!this.editor.chromeless||this.editor.editable){var d=b.getFunction,f=this.editor.graph,k=this;b.getFunction=function(a){if(f.isSelectionEmpty()&&null!=k.pages&&0<k.pages.length){var c=
-k.getSelectedPageIndex();if(mxEvent.isShiftDown(a)){if(37==a.keyCode)return function(){0<c&&k.movePage(c,c-1)};if(38==a.keyCode)return function(){0<c&&k.movePage(c,0)};if(39==a.keyCode)return function(){c<k.pages.length-1&&k.movePage(c,c+1)};if(40==a.keyCode)return function(){c<k.pages.length-1&&k.movePage(c,k.pages.length-1)}}else if(mxEvent.isControlDown(a)||mxClient.IS_MAC&&mxEvent.isMetaDown(a)){if(37==a.keyCode)return function(){0<c&&k.selectNextPage(!1)};if(38==a.keyCode)return function(){0<
-c&&k.selectPage(k.pages[0])};if(39==a.keyCode)return function(){c<k.pages.length-1&&k.selectNextPage(!0)};if(40==a.keyCode)return function(){c<k.pages.length-1&&k.selectPage(k.pages[k.pages.length-1])}}}return d.apply(this,arguments)}}return b};var b=EditorUi.prototype.extractGraphModelFromHtml;EditorUi.prototype.extractGraphModelFromHtml=function(a){var c=b.apply(this,arguments);if(null==c)try{var d=a.indexOf("&lt;mxfile ");if(0<=d){var f=a.lastIndexOf("&lt;/mxfile&gt;");f>d&&(c=a.substring(d,f+
-15).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}else var k=mxUtils.parseXml(a),q=this.editor.extractGraphModel(k.documentElement,null!=this.pages||"hidden"==this.diagramContainer.style.visibility),c=null!=q?mxUtils.getXml(q):""}catch(u){}return c};EditorUi.prototype.validateFileData=function(a){if(null!=a&&0<a.length){var c=a.indexOf('<meta charset="utf-8">');0<=c&&(a=a.slice(0,c)+'<meta charset="utf-8"/>'+a.slice(c+23-1,a.length));a=Graph.zapGremlins(a)}return a};
+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)};var a=EditorUi.prototype.createKeyHandler;EditorUi.prototype.createKeyHandler=function(c){var b=a.apply(this,arguments);if(!this.editor.chromeless||this.editor.editable){var d=b.getFunction,f=this.editor.graph,g=this;b.getFunction=function(a){if(f.isSelectionEmpty()&&null!=g.pages&&0<g.pages.length){var c=
+g.getSelectedPageIndex();if(mxEvent.isShiftDown(a)){if(37==a.keyCode)return function(){0<c&&g.movePage(c,c-1)};if(38==a.keyCode)return function(){0<c&&g.movePage(c,0)};if(39==a.keyCode)return function(){c<g.pages.length-1&&g.movePage(c,c+1)};if(40==a.keyCode)return function(){c<g.pages.length-1&&g.movePage(c,g.pages.length-1)}}else if(mxEvent.isControlDown(a)||mxClient.IS_MAC&&mxEvent.isMetaDown(a)){if(37==a.keyCode)return function(){0<c&&g.selectNextPage(!1)};if(38==a.keyCode)return function(){0<
+c&&g.selectPage(g.pages[0])};if(39==a.keyCode)return function(){c<g.pages.length-1&&g.selectNextPage(!0)};if(40==a.keyCode)return function(){c<g.pages.length-1&&g.selectPage(g.pages[g.pages.length-1])}}}return d.apply(this,arguments)}}return b};var b=EditorUi.prototype.extractGraphModelFromHtml;EditorUi.prototype.extractGraphModelFromHtml=function(a){var c=b.apply(this,arguments);if(null==c)try{var d=a.indexOf("&lt;mxfile ");if(0<=d){var f=a.lastIndexOf("&lt;/mxfile&gt;");f>d&&(c=a.substring(d,f+
+15).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}else var g=mxUtils.parseXml(a),q=this.editor.extractGraphModel(g.documentElement,null!=this.pages||"hidden"==this.diagramContainer.style.visibility),c=null!=q?mxUtils.getXml(q):""}catch(u){}return c};EditorUi.prototype.validateFileData=function(a){if(null!=a&&0<a.length){var c=a.indexOf('<meta charset="utf-8">');0<=c&&(a=a.slice(0,c)+'<meta charset="utf-8"/>'+a.slice(c+23-1,a.length));a=Graph.zapGremlins(a)}return a};
EditorUi.prototype.replaceFileData=function(a){a=this.validateFileData(a);a=null!=a&&0<a.length?mxUtils.parseXml(a).documentElement:null;var c=null!=a?this.editor.extractGraphModel(a,!0):null;null!=c&&(a=c);if(null!=a){c=this.editor.graph;c.model.beginUpdate();try{var b=null!=this.pages?this.pages.slice():null,d=a.getElementsByTagName("diagram");if("0"!=urlParams.pages||1<d.length||1==d.length&&d[0].hasAttribute("name")){this.fileNode=a;this.pages=null!=this.pages?this.pages:[];for(var f=d.length-
-1;0<=f;f--){var k=this.updatePageRoot(new DiagramPage(d[f]));null==k.getName()&&k.setName(mxResources.get("pageWithNumber",[f+1]));c.model.execute(new ChangePage(this,k,0==f?k:null,0))}}else"0"!=urlParams.pages&&null==this.fileNode&&(this.fileNode=a.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(a.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),c.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0))),
-this.editor.setGraphXml(a),null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=b)for(f=0;f<b.length;f++)c.model.execute(new ChangePage(this,b[f],null))}finally{c.model.endUpdate()}}};EditorUi.prototype.createFileData=function(a,b,d,f,k,q,m,t,p,x,G){b=null!=b?b:this.editor.graph;k=null!=k?k:!1;p=null!=p?p:!0;var c,e=null;null==d||d.getMode()==App.MODE_DEVICE||d.getMode()==App.MODE_BROWSER?c="_blank":e=c=f;if(null==a)return"";var g=a;if("mxfile"!=g.nodeName.toLowerCase()){if(G){var l=
-a.ownerDocument.createElement("diagram");l.setAttribute("id",Editor.guid());l.appendChild(a)}else{l=Graph.zapGremlins(mxUtils.getXml(a));g=Graph.compress(l);if(Graph.decompress(g)!=l)return l;l=a.ownerDocument.createElement("diagram");l.setAttribute("id",Editor.guid());mxUtils.setTextContent(l,g)}g=a.ownerDocument.createElement("mxfile");g.appendChild(l)}x?(g=g.cloneNode(!0),g.removeAttribute("modified"),g.removeAttribute("host"),g.removeAttribute("agent"),g.removeAttribute("etag"),g.removeAttribute("userAgent"),
-g.removeAttribute("version"),g.removeAttribute("editor"),g.removeAttribute("type")):(g.removeAttribute("userAgent"),g.removeAttribute("version"),g.removeAttribute("editor"),g.removeAttribute("pages"),g.removeAttribute("type"),mxClient.IS_CHROMEAPP?g.setAttribute("host","Chrome"):EditorUi.isElectronApp?g.setAttribute("host","Electron"):g.setAttribute("host",window.location.hostname),g.setAttribute("modified",(new Date).toISOString()),g.setAttribute("agent",navigator.appVersion),g.setAttribute("version",
-EditorUi.VERSION),g.setAttribute("etag",Editor.guid()),a=null!=d?d.getMode():this.mode,null!=a&&g.setAttribute("type",a),1<g.getElementsByTagName("diagram").length&&null!=this.pages&&g.setAttribute("pages",this.pages.length));G=G?mxUtils.getPrettyXml(g):mxUtils.getXml(g);if(!q&&!k&&(m||null!=d&&/(\.html)$/i.test(d.getTitle())))G=this.getHtml2(mxUtils.getXml(g),b,null!=d?d.getTitle():null,c,e);else if(q||!k&&null!=d&&/(\.svg)$/i.test(d.getTitle()))null==d||d.getMode()!=App.MODE_DEVICE&&d.getMode()!=
-App.MODE_BROWSER||(f=null),G=this.getEmbeddedSvg(G,b,f,null,t,p,e);return G};EditorUi.prototype.getXmlFileData=function(a,b,d){a=null!=a?a:!0;b=null!=b?b:!1;d=null!=d?d:!Editor.compressXml;var c=this.editor.getGraphXml(a);if(a&&null!=this.fileNode&&null!=this.currentPage)if(a=function(a){var b=a.getElementsByTagName("mxGraphModel"),b=0<b.length?b[0]:null;null==b&&d?(b=mxUtils.trim(mxUtils.getTextContent(a)),a=a.cloneNode(!1),0<b.length&&(b=Graph.decompress(b),null!=b&&0<b.length&&a.appendChild(mxUtils.parseXml(b).documentElement))):
-null==b||d?a=a.cloneNode(!0):(a=a.cloneNode(!1),mxUtils.setTextContent(a,Graph.compressNode(b)));c.appendChild(a)},EditorUi.removeChildNodes(this.currentPage.node),mxUtils.setTextContent(this.currentPage.node,Graph.compressNode(c)),c=this.fileNode.cloneNode(!1),b)a(this.currentPage.node);else for(b=0;b<this.pages.length;b++){if(this.currentPage!=this.pages[b]&&this.pages[b].needsUpdate){var e=(new mxCodec(mxUtils.createXmlDocument())).encode(new mxGraphModel(this.pages[b].root));this.editor.graph.saveViewState(this.pages[b].viewState,
-e);EditorUi.removeChildNodes(this.pages[b].node);mxUtils.setTextContent(this.pages[b].node,Graph.compressNode(e));delete this.pages[b].needsUpdate}a(this.pages[b].node)}return c};EditorUi.prototype.anonymizeString=function(a,b){for(var c=[],e=0;e<a.length;e++){var d=a.charAt(e);0<=EditorUi.ignoredAnonymizedChars.indexOf(d)?c.push(d):isNaN(parseInt(d))?d.toLowerCase()!=d?c.push(String.fromCharCode(65+Math.round(25*Math.random()))):d.toUpperCase()!=d?c.push(String.fromCharCode(97+Math.round(25*Math.random()))):
-/\s/.test(d)?c.push(" "):c.push("?"):c.push(b?"0":Math.round(9*Math.random()))}return c.join("")};EditorUi.prototype.anonymizePatch=function(a){if(null!=a[EditorUi.DIFF_INSERT])for(var c=0;c<a[EditorUi.DIFF_INSERT].length;c++)try{var b=mxUtils.parseXml(a[EditorUi.DIFF_INSERT][c].data).documentElement.cloneNode(!1);null!=b.getAttribute("name")&&b.setAttribute("name",this.anonymizeString(b.getAttribute("name")));a[EditorUi.DIFF_INSERT][c].data=mxUtils.getXml(b)}catch(q){a[EditorUi.DIFF_INSERT][c].data=
-q.message}if(null!=a[EditorUi.DIFF_UPDATE]){for(var d in a[EditorUi.DIFF_UPDATE]){var f=a[EditorUi.DIFF_UPDATE][d];null!=f.name&&(f.name=this.anonymizeString(f.name));null!=f.cells&&(c=mxUtils.bind(this,function(a){var c=f.cells[a];if(null!=c){for(var b in c)null!=c[b].value&&(c[b].value="["+c[b].value.length+"]"),null!=c[b].xmlValue&&(c[b].xmlValue="["+c[b].xmlValue.length+"]"),null!=c[b].style&&(c[b].style="["+c[b].style.length+"]"),0==Object.keys(c[b]).length&&delete c[b];0==Object.keys(c).length&&
-delete f.cells[a]}}),c(EditorUi.DIFF_INSERT),c(EditorUi.DIFF_UPDATE),0==Object.keys(f.cells).length&&delete f.cells);0==Object.keys(f).length&&delete a[EditorUi.DIFF_UPDATE][d]}0==Object.keys(a[EditorUi.DIFF_UPDATE]).length&&delete a[EditorUi.DIFF_UPDATE]}return a};EditorUi.prototype.anonymizeAttributes=function(a,b){if(null!=a.attributes)for(var c=0;c<a.attributes.length;c++)"as"!=a.attributes[c].name&&a.setAttribute(a.attributes[c].name,this.anonymizeString(a.attributes[c].value,b));if(null!=a.childNodes)for(c=
-0;c<a.childNodes.length;c++)this.anonymizeAttributes(a.childNodes[c],b)};EditorUi.prototype.anonymizeNode=function(a,b){for(var c=a.getElementsByTagName("mxCell"),e=0;e<c.length;e++)null!=c[e].getAttribute("value")&&c[e].setAttribute("value","["+c[e].getAttribute("value").length+"]"),null!=c[e].getAttribute("xmlValue")&&c[e].setAttribute("xmlValue","["+c[e].getAttribute("xmlValue").length+"]"),null!=c[e].getAttribute("style")&&c[e].setAttribute("style","["+c[e].getAttribute("style").length+"]"),null!=
-c[e].parentNode&&"root"!=c[e].parentNode.nodeName&&null!=c[e].parentNode.parentNode&&(c[e].setAttribute("id",c[e].parentNode.getAttribute("id")),c[e].parentNode.parentNode.replaceChild(c[e],c[e].parentNode));return a};EditorUi.prototype.synchronizeCurrentFile=function(a){var c=this.getCurrentFile();null!=c&&(c.savingFile?this.handleError({message:mxResources.get("busy")}):!a&&c.invalidChecksum?c.handleFileError(null,!0):this.spinner.spin(document.body,mxResources.get("updatingDocument"))&&(c.clearAutosave(),
-this.editor.setStatus(""),a?c.reloadFile(mxUtils.bind(this,function(){c.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(a){c.handleFileError(a,!0)})):c.synchronizeFile(mxUtils.bind(this,function(){c.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(a){c.handleFileError(a,!0)}))))};EditorUi.prototype.getFileData=function(a,b,d,f,k,q,m,t,p,x){k=null!=k?k:!0;q=null!=q?q:!1;var c=this.editor.graph;if(b||!a&&null!=p&&/(\.svg)$/i.test(p.getTitle()))if(x=
-!1,null!=c.themes&&"darkTheme"==c.defaultThemeName||null!=this.pages&&this.currentPage!=this.pages[0]){var e=c.getGlobalVariable,c=this.createTemporaryGraph(c.getStylesheet()),g=this.pages[0];c.getGlobalVariable=function(a){return"page"==a?g.getName():"pagenumber"==a?1:e.apply(this,arguments)};document.body.appendChild(c.container);c.model.setRoot(g.root)}m=null!=m?m:this.getXmlFileData(k,q,x);p=null!=p?p:this.getCurrentFile();a=this.createFileData(m,c,p,window.location.href,a,b,d,f,k,t,x);c!=this.editor.graph&&
-c.container.parentNode.removeChild(c.container);return a};EditorUi.prototype.getHtml=function(a,b,d,f,k,q){q=null!=q?q:!0;var c=null,e=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=b){var c=q?b.getGraphBounds():b.getBoundingBox(b.getSelectionCells()),g=b.view.scale;q=Math.floor(c.x/g-b.view.translate.x);g=Math.floor(c.y/g-b.view.translate.y);c=b.background;null==k&&(b=this.getBasenames().join(";"),0<b.length&&(e=EditorUi.drawHost+"/embed.js?s="+b));a.setAttribute("x0",q);a.setAttribute("y0",
-g)}null!=a&&(a.setAttribute("pan","1"),a.setAttribute("zoom","1"),a.setAttribute("resize","0"),a.setAttribute("fit","0"),a.setAttribute("border","20"),a.setAttribute("links","1"),null!=f&&a.setAttribute("edit",f));null!=k&&(k=k.replace(/&/g,"&amp;"));a=null!=a?Graph.zapGremlins(mxUtils.getXml(a)):"";f=Graph.compress(a);Graph.decompress(f)!=a&&(f=encodeURIComponent(a));return(null==k?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+
-(null!=k?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==k?null!=d?"<title>"+mxUtils.htmlEntities(d)+"</title>\n":"":"<title>diagrams.net</title>\n")+(null!=k?'<meta http-equiv="refresh" content="0;URL=\''+k+"'\"/>\n":"")+"</head>\n<body"+(null==k&&null!=c&&c!=mxConstants.NONE?' style="background-color:'+c+';">':">")+'\n<div class="mxgraph" style="position:relative;overflow:auto;width:100%;">\n<div style="width:1px;height:1px;overflow:hidden;">'+f+"</div>\n</div>\n"+(null==k?'<script type="text/javascript" src="'+
-e+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+k+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.getHtml2=function(a,b,d,f,k){b=window.DRAWIO_VIEWER_URL||EditorUi.drawHost+"/js/viewer-static.min.js";null!=k&&(k=k.replace(/&/g,"&amp;"));a={highlight:"#0000ff",nav:this.editor.graph.foldingEnabled,resize:!0,xml:Graph.zapGremlins(a),toolbar:"pages zoom layers lightbox"};
-null!=this.pages&&null!=this.currentPage&&(a.page=mxUtils.indexOf(this.pages,this.currentPage));return(null==k?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=k?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==k?null!=d?"<title>"+mxUtils.htmlEntities(d)+"</title>\n":"":"<title>diagrams.net</title>\n")+(null!=k?'<meta http-equiv="refresh" content="0;URL=\''+k+"'\"/>\n":"")+'<meta charset="utf-8"/>\n</head>\n<body>\n<div class="mxgraph" style="max-width:100%;border:1px solid transparent;" data-mxgraph="'+
-mxUtils.htmlEntities(JSON.stringify(a))+'"></div>\n'+(null==k?'<script type="text/javascript" src="'+b+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+k+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.setFileData=function(a){a=this.validateFileData(a);this.pages=this.fileNode=this.currentPage=null;a=null!=a&&0<a.length?mxUtils.parseXml(a).documentElement:
-null;var c=Editor.extractParserError(a,mxResources.get("invalidOrMissingFile"));if(c)throw Error(mxResources.get("notADiagramFile")+" ("+c+")");c=null!=a?this.editor.extractGraphModel(a,!0):null;null!=c&&(a=c);if(null!=a&&"mxfile"==a.nodeName&&(c=a.getElementsByTagName("diagram"),"0"!=urlParams.pages||1<c.length||1==c.length&&c[0].hasAttribute("name"))){var b=null;this.fileNode=a;this.pages=[];for(var d=0;d<c.length;d++)null==c[d].getAttribute("id")&&c[d].setAttribute("id",d),a=new DiagramPage(c[d]),
-null==a.getName()&&a.setName(mxResources.get("pageWithNumber",[d+1])),this.pages.push(a),null!=urlParams["page-id"]&&a.getId()==urlParams["page-id"]&&(b=a);this.currentPage=null!=b?b:this.pages[Math.max(0,Math.min(this.pages.length-1,urlParams.page||0))];a=this.currentPage.node}"0"!=urlParams.pages&&null==this.fileNode&&null!=a&&(this.fileNode=a.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(a.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",
-[1])),this.pages=[this.currentPage]);this.editor.setGraphXml(a);null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=urlParams["layer-ids"])try{var f=urlParams["layer-ids"].split(" ");a={};for(d=0;d<f.length;d++)a[f[d]]=!0;for(var k=this.editor.graph.getModel(),m=k.getChildren(k.root),d=0;d<m.length;d++){var t=m[d];k.setVisible(t,a[t.id]||!1)}}catch(A){}};EditorUi.prototype.getBaseFilename=function(a){var c=this.getCurrentFile(),c=null!=c&&null!=c.getTitle()?c.getTitle():
-this.defaultFilename;if(/(\.xml)$/i.test(c)||/(\.html)$/i.test(c)||/(\.svg)$/i.test(c)||/(\.png)$/i.test(c)||/(\.drawio)$/i.test(c))c=c.substring(0,c.lastIndexOf("."));!a&&null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&null!=this.currentPage.node.getAttribute("name")&&0<this.currentPage.getName().length&&(c=c+"-"+this.currentPage.getName());return c};EditorUi.prototype.downloadFile=function(a,b,d,f,k,q,m,t,p,x,G){try{f=null!=f?f:this.editor.graph.isSelectionEmpty();var c=this.getBaseFilename(!k),
-e=c+"."+a;if("xml"==a){var g='<?xml version="1.0" encoding="UTF-8"?>\n'+this.getFileData(!0,null,null,null,f,k,null,null,null,b);this.saveData(e,a,g,"text/xml")}else if("html"==a)g=this.getHtml2(this.getFileData(!0),this.editor.graph,c),this.saveData(e,a,g,"text/html");else if("svg"!=a&&"xmlsvg"!=a||!this.spinner.spin(document.body,mxResources.get("export")))"xmlpng"==a?e=c+".png":"jpeg"==a&&(e=c+".jpg"),this.saveRequest(e,a,mxUtils.bind(this,function(c,b){try{var e=this.editor.graph.pageVisible;
-null!=q&&(this.editor.graph.pageVisible=q);var d=this.createDownloadRequest(c,a,f,b,m,k,t,p,x,G);this.editor.graph.pageVisible=e;return d}catch(v){this.handleError(v)}}));else{var l=null,n=mxUtils.bind(this,function(a){a.length<=MAX_REQUEST_SIZE?this.saveData(e,"svg",a,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(l)}))});if("svg"==a){var u=this.editor.graph.background;if(m||u==mxConstants.NONE)u=
-null;var C=this.editor.graph.getSvg(u,null,null,null,null,f);d&&this.editor.graph.addSvgShadow(C);this.editor.convertImages(C,mxUtils.bind(this,mxUtils.bind(this,function(a){this.spinner.stop();n('<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n'+mxUtils.getXml(a))})))}else e=c+".svg",l=this.getFileData(!1,!0,null,mxUtils.bind(this,function(a){this.spinner.stop();n(a)}),f)}}catch(M){this.handleError(M)}};EditorUi.prototype.createDownloadRequest=
-function(a,b,d,f,k,q,m,t,p,x){var c=this.editor.graph,e=c.getGraphBounds();d=this.getFileData(!0,null,null,null,d,0==q?!1:"xmlpng"!=b);var g="",l="";if(e.width*e.height>MAX_AREA||d.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};x=x?"1":"0";"pdf"==b&&0==q&&(l="&allPages=1");if("xmlpng"==b&&(x="1",b="png",null!=this.pages&&null!=this.currentPage))for(q=0;q<this.pages.length;q++)if(this.pages[q]==this.currentPage){g="&from="+q;break}q=c.background;"png"!=b&&"pdf"!=b||!k?k||
-null!=q&&q!=mxConstants.NONE||(q="#ffffff"):q=mxConstants.NONE;k={globalVars:c.getExportVariables()};p&&(k.grid={size:c.gridSize,steps:c.view.gridSteps,color:c.view.gridColor});Graph.translateDiagram&&(k.diagramLanguage=Graph.diagramLanguage);return new mxXmlRequest(EXPORT_URL,"format="+b+g+l+"&bg="+(null!=q?q:mxConstants.NONE)+"&base64="+f+"&embedXml="+x+"&xml="+encodeURIComponent(d)+(null!=a?"&filename="+encodeURIComponent(a):"")+"&extras="+encodeURIComponent(JSON.stringify(k))+(null!=m?"&scale="+
-m:"")+(null!=t?"&border="+t:""))};EditorUi.prototype.setMode=function(a,b){this.mode=a};EditorUi.prototype.loadDescriptor=function(a,b,d){var c=window.location.hash,e=mxUtils.bind(this,function(d){var e=null!=a.data?a.data:"";null!=d&&0<d.length&&(0<e.length&&(e+="\n"),e+=d);d=new LocalFile(this,"csv"!=a.format&&0<e.length?e:this.emptyDiagramXml,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0);d.getHash=function(){return c};this.fileLoaded(d);"csv"==a.format&&this.importCsv(e,
-mxUtils.bind(this,function(a){this.editor.undoManager.clear();this.editor.setModified(!1);this.editor.setStatus("")}));if(null!=a.update){var f=null!=a.interval?parseInt(a.interval):6E4,g=null,k=mxUtils.bind(this,function(){var c=this.currentPage;mxUtils.post(a.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,function(a){c===this.currentPage&&(200<=a.getStatus()&&300>=a.getStatus()?(this.updateDiagram(a.getText()),l()):this.handleError({message:mxResources.get("error")+
-" "+a.getStatus()}))}),mxUtils.bind(this,function(a){this.handleError(a)}))}),l=mxUtils.bind(this,function(){window.clearTimeout(g);g=window.setTimeout(k,f)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){l();k()}));l();k()}null!=b&&b()});null!=a.url&&0<a.url.length?this.editor.loadUrl(a.url,mxUtils.bind(this,function(a){e(a)}),mxUtils.bind(this,function(a){null!=d&&d(a)})):e("")};EditorUi.prototype.updateDiagram=function(a){function c(a){var c=new mxCellOverlay(a.image||f.warningImage,
-a.tooltip,a.align,a.valign,a.offset);c.addListener(mxEvent.CLICK,function(c,b){d.alert(a.tooltip)});return c}var b=null,d=this;if(null!=a&&0<a.length&&(b=mxUtils.parseXml(a),a=null!=b?b.documentElement:null,null!=a&&"updates"==a.nodeName)){var f=this.editor.graph,k=f.getModel();k.beginUpdate();var m=null;try{for(a=a.firstChild;null!=a;){if("update"==a.nodeName){var t=k.getCell(a.getAttribute("id"));if(null!=t){try{var p=a.getAttribute("value");if(null!=p){var x=mxUtils.parseXml(p).documentElement;
-if(null!=x)if("1"==x.getAttribute("replace-value"))k.setValue(t,x);else for(var G=x.attributes,z=0;z<G.length;z++)f.setAttributeForCell(t,G[z].nodeName,0<G[z].nodeValue.length?G[z].nodeValue:null)}}catch(U){null!=window.console&&console.log("Error in value for "+t.id+": "+U)}try{var E=a.getAttribute("style");null!=E&&f.model.setStyle(t,E)}catch(U){null!=window.console&&console.log("Error in style for "+t.id+": "+U)}try{var H=a.getAttribute("icon");if(null!=H){var K=0<H.length?JSON.parse(H):null;null!=
-K&&K.append||f.removeCellOverlays(t);null!=K&&f.addCellOverlay(t,c(K))}}catch(U){null!=window.console&&console.log("Error in icon for "+t.id+": "+U)}try{var F=a.getAttribute("geometry");if(null!=F){var F=JSON.parse(F),I=f.getCellGeometry(t);if(null!=I){I=I.clone();for(key in F){var C=parseFloat(F[key]);"dx"==key?I.x+=C:"dy"==key?I.y+=C:"dw"==key?I.width+=C:"dh"==key?I.height+=C:I[key]=parseFloat(F[key])}f.model.setGeometry(t,I)}}}catch(U){null!=window.console&&console.log("Error in icon for "+t.id+
-": "+U)}}}else if("model"==a.nodeName){for(var M=a.firstChild;null!=M&&M.nodeType!=mxConstants.NODETYPE_ELEMENT;)M=M.nextSibling;null!=M&&(new mxCodec(a.firstChild)).decode(M,k)}else if("view"==a.nodeName){if(a.hasAttribute("scale")&&(f.view.scale=parseFloat(a.getAttribute("scale"))),a.hasAttribute("dx")||a.hasAttribute("dy"))f.view.translate=new mxPoint(parseFloat(a.getAttribute("dx")||0),parseFloat(a.getAttribute("dy")||0))}else"fit"==a.nodeName&&(m=a.hasAttribute("max-scale")?parseFloat(a.getAttribute("max-scale")):
-1);a=a.nextSibling}}finally{k.endUpdate()}null!=m&&this.chromelessResize&&this.chromelessResize(!0,m)}return b};EditorUi.prototype.getCopyFilename=function(a,b){var c=null!=a&&null!=a.getTitle()?a.getTitle():this.defaultFilename,d="",e=c.lastIndexOf(".");0<=e&&(d=c.substring(e),c=c.substring(0,e));if(b)var f=new Date,e=f.getFullYear(),k=f.getMonth()+1,m=f.getDate(),p=f.getHours(),x=f.getMinutes(),f=f.getSeconds(),c=c+(" "+(e+"-"+k+"-"+m+"-"+p+"-"+x+"-"+f));return c=mxResources.get("copyOf",[c])+d};
-EditorUi.prototype.fileLoaded=function(a,b){var c=this.getCurrentFile();this.fileEditable=this.fileLoadedError=null;this.setCurrentFile(null);var d=!1;this.hideDialog();null!=c&&(EditorUi.debug("File.closed",[c]),c.removeListener(this.descriptorChangedListener),c.close());this.editor.graph.model.clear();this.editor.undoManager.clear();var e=mxUtils.bind(this,function(){this.setGraphEnabled(!1);this.setCurrentFile(null);null!=c&&this.updateDocumentTitle();this.editor.graph.model.clear();this.editor.undoManager.clear();
-this.setBackgroundImage(null);!b&&null!=window.location.hash&&0<window.location.hash.length&&(window.location.hash="");null!=this.fname&&(this.fnameWrapper.style.display="none",this.fname.innerHTML="",this.fname.setAttribute("title",mxResources.get("rename")));this.editor.setStatus("");this.updateUi();b||this.showSplash()});if(null!=a)try{mxClient.IS_SF&&"min"==uiTheme&&(this.diagramContainer.style.visibility="");this.openingFile=!0;this.setCurrentFile(a);a.addListener("descriptorChanged",this.descriptorChangedListener);
-a.addListener("contentChanged",this.descriptorChangedListener);a.open();delete this.openingFile;this.setGraphEnabled(!0);this.setMode(a.getMode());this.editor.graph.model.prefix=Editor.guid()+"-";this.editor.undoManager.clear();this.descriptorChanged();this.updateUi();a.isEditable()?a.isModified()?(a.addUnsavedStatus(),null!=a.backupPatch&&a.patch([a.backupPatch])):this.editor.setStatus(""):this.editor.setStatus('<span class="geStatusAlert" style="margin-left:8px;">'+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"));d=!0;this.isOffline()||null==a.getMode()||EditorUi.logEvent({category:a.getMode().toUpperCase()+"-OPEN-FILE-"+a.getHash(),action:"size_"+a.getSize(),
-label:"autosave_"+(this.editor.autosave?"on":"off")});EditorUi.debug("File.opened",[a]);if(this.editor.editable&&this.mode==a.getMode()&&a.getMode()!=App.MODE_DEVICE&&null!=a.getMode())try{this.addRecent({id:a.getHash(),title:a.getTitle(),mode:a.getMode()})}catch(u){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+1),mxSettings.save()}catch(u){}}catch(u){this.fileLoadedError=u;if(EditorUi.enableLogging&&!this.isOffline())try{EditorUi.logEvent({category:"ERROR-LOAD-FILE-"+(null!=a?a.getHash():
-"none"),action:"message_"+u.message,label:"stack_"+u.stack})}catch(t){}var f=mxUtils.bind(this,function(){null!=urlParams.url&&this.spinner.spin(document.body,mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=c?this.fileLoaded(c):e()});b?f():this.handleError(u,mxResources.get("errorLoadingFile"),f,!0,null,null,!0)}else e();return d};EditorUi.prototype.getHashValueForPages=function(a,b){var c=0,d=new mxGraphModel,e=new mxCodec;null!=b&&(b.byteCount=0,b.attrCount=
-0,b.eltCount=0,b.nodeCount=0);for(var f=0;f<a.length;f++){this.updatePageRoot(a[f]);var k=a[f].node.cloneNode(!1);k.removeAttribute("name");d.root=a[f].root;var m=e.encode(d);this.editor.graph.saveViewState(a[f].viewState,m,!0);m.removeAttribute("pageWidth");m.removeAttribute("pageHeight");k.appendChild(m);null!=b&&(b.eltCount+=k.getElementsByTagName("*").length,b.nodeCount+=k.getElementsByTagName("mxCell").length);c=(c<<5)-c+this.hashValue(k,function(a,c,b,d){return!d||"mxGeometry"!=a.nodeName&&
-"mxPoint"!=a.nodeName||"x"!=c&&"y"!=c&&"width"!=c&&"height"!=c?d&&"mxCell"==a.nodeName&&"previous"==c?null:b:Math.round(b)},b)<<0}return c};EditorUi.prototype.hashValue=function(a,b,d){var c=0;if(null!=a&&"object"===typeof a&&"number"===typeof a.nodeType&&"string"===typeof a.nodeName&&"function"===typeof a.getAttribute){null!=a.nodeName&&(c^=this.hashValue(a.nodeName,b,d));if(null!=a.attributes){null!=d&&(d.attrCount+=a.attributes.length);for(var e=0;e<a.attributes.length;e++){var f=a.attributes[e].name,
-g=null!=b?b(a,f,a.attributes[e].value,!0):a.attributes[e].value;null!=g&&(c^=this.hashValue(f,b,d)+this.hashValue(g,b,d))}}if(null!=a.childNodes)for(e=0;e<a.childNodes.length;e++)c=(c<<5)-c+this.hashValue(a.childNodes[e],b,d)<<0}else if(null!=a&&"function"!==typeof a){a=String(a);b=0;null!=d&&(d.byteCount+=a.length);for(e=0;e<a.length;e++)b=(b<<5)-b+a.charCodeAt(e)<<0;c^=b}return c};EditorUi.prototype.descriptorChanged=function(){};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=
-function(a,b,d,f,k,q,m){};EditorUi.prototype.isScratchpadEnabled=function(){return isLocalStorage||mxClient.IS_CHROMEAPP};EditorUi.prototype.toggleScratchpad=function(){this.isScratchpadEnabled()&&(null==this.scratchpad?StorageFile.getFileContent(this,".scratchpad",mxUtils.bind(this,function(a){null==a&&(a=this.emptyLibraryXml);this.loadLibrary(new StorageLibrary(this,a,".scratchpad"))})):this.closeLibrary(this.scratchpad))};EditorUi.prototype.createLibraryDataFromImages=function(a){var c=mxUtils.createXmlDocument(),
-b=c.createElement("mxlibrary");mxUtils.setTextContent(b,JSON.stringify(a));c.appendChild(b);return mxUtils.getXml(c)};EditorUi.prototype.closeLibrary=function(a){null!=a&&(this.removeLibrarySidebar(a.getHash()),a.constructor!=LocalLibrary&&mxSettings.removeCustomLibrary(a.getHash()),".scratchpad"==a.title&&(this.scratchpad=null))};EditorUi.prototype.removeLibrarySidebar=function(a){var c=this.sidebar.palettes[a];if(null!=c){for(var b=0;b<c.length;b++)c[b].parentNode.removeChild(c[b]);delete this.sidebar.palettes[a]}};
-EditorUi.prototype.repositionLibrary=function(a){var c=this.sidebar.container;if(null==a){var b=this.sidebar.palettes["L.scratchpad"];null==b&&(b=this.sidebar.palettes.search);null!=b&&(a=b[b.length-1].nextSibling)}a=null!=a?a:c.firstChild.nextSibling.nextSibling;var b=c.lastChild,d=b.previousSibling;c.insertBefore(b,a);c.insertBefore(d,b)};EditorUi.prototype.loadLibrary=function(a,b){var c=mxUtils.parseXml(a.getData());if("mxlibrary"==c.documentElement.nodeName){var d=JSON.parse(mxUtils.getTextContent(c.documentElement));
-this.libraryLoaded(a,d,c.documentElement.getAttribute("title"),b)}else throw{message:mxResources.get("notALibraryFile")};};EditorUi.prototype.getLibraryStorageHint=function(a){return""};EditorUi.prototype.libraryLoaded=function(a,b,d,f){if(null!=this.sidebar){a.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(a.getHash());".scratchpad"==a.title&&(this.scratchpad=a);var c=this.sidebar.palettes[a.getHash()],c=null!=c?c[c.length-1].nextSibling:null;this.removeLibrarySidebar(a.getHash());var e=
-null,g=mxUtils.bind(this,function(c,b){0==c.length&&a.isEditable()?(null==e&&(e=document.createElement("div"),e.className="geDropTarget",mxUtils.write(e,mxResources.get("dragElementsHere"))),b.appendChild(e)):this.addLibraryEntries(c,b)});null!=this.sidebar&&null!=b&&this.sidebar.addEntries(b);d=null!=d&&0<d.length?d:a.getTitle();var k=this.sidebar.addPalette(a.getHash(),d,null!=f?f:!0,mxUtils.bind(this,function(a){g(b,a)}));this.repositionLibrary(c);var n=k.parentNode.previousSibling;f=n.getAttribute("title");
-null!=f&&0<f.length&&".scratchpad"!=a.title&&n.setAttribute("title",this.getLibraryStorageHint(a)+"\n"+f);var m=document.createElement("div");m.style.position="absolute";m.style.right="0px";m.style.top="0px";m.style.padding="8px";m.style.backgroundColor="inherit";n.style.position="relative";var p=document.createElement("img");p.setAttribute("src",Dialog.prototype.closeImage);p.setAttribute("title",mxResources.get("close"));p.setAttribute("valign","absmiddle");p.setAttribute("border","0");p.style.cursor=
-"pointer";p.style.margin="0 3px";var z=null;if(".scratchpad"!=a.title||this.closableScratchpad)m.appendChild(p),mxEvent.addListener(p,"click",mxUtils.bind(this,function(c){if(!mxEvent.isConsumed(c)){var b=mxUtils.bind(this,function(){this.closeLibrary(a)});null!=z?this.confirm(mxResources.get("allChangesLost"),null,b,mxResources.get("cancel"),mxResources.get("discardChanges")):b();mxEvent.consume(c)}}));if(a.isEditable()){var E=this.editor.graph,H=null,K=mxUtils.bind(this,function(c){this.showLibraryDialog(a.getTitle(),
-k,b,a,a.getMode());mxEvent.consume(c)}),F=mxUtils.bind(this,function(c){a.setModified(!0);a.isAutosave()?(null!=H&&null!=H.parentNode&&H.parentNode.removeChild(H),H=p.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",m.insertBefore(H,m.firstChild),n.style.paddingRight=18*m.childNodes.length+"px",this.saveLibrary(a.getTitle(),b,a,a.getMode(),!0,!0,function(){null!=H&&null!=
-H.parentNode&&(H.parentNode.removeChild(H),n.style.paddingRight=18*m.childNodes.length+"px")})):null==z&&(z=p.cloneNode(!1),z.setAttribute("src",IMAGE_PATH+"/download.png"),z.setAttribute("title",mxResources.get("save")),m.insertBefore(z,m.firstChild),mxEvent.addListener(z,"click",mxUtils.bind(this,function(c){this.saveLibrary(a.getTitle(),b,a,a.getMode(),a.constructor==LocalLibrary,!0,function(){null==z||a.isModified()||(n.style.paddingRight=18*m.childNodes.length+"px",z.parentNode.removeChild(z),
-z=null)});mxEvent.consume(c)})),n.style.paddingRight=18*m.childNodes.length+"px")}),I=mxUtils.bind(this,function(a,c,d,f){a=E.cloneCells(mxUtils.sortCells(E.model.getTopmostCells(a)));for(var g=0;g<a.length;g++){var l=E.getCellGeometry(a[g]);null!=l&&l.translate(-c.x,-c.y)}k.appendChild(this.sidebar.createVertexTemplateFromCells(a,c.width,c.height,f||"",!0,!1,!1));a={xml:Graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(a))),w:c.width,h:c.height};null!=f&&(a.title=f);b.push(a);F(d);null!=
-e&&null!=e.parentNode&&0<b.length&&(e.parentNode.removeChild(e),e=null)}),C=mxUtils.bind(this,function(a){if(E.isSelectionEmpty())E.getRubberband().isActive()?(E.getRubberband().execute(a),E.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var c=E.getSelectionCells(),b=E.view.getBounds(c),d=E.view.scale;b.x/=d;b.y/=d;b.width/=d;b.height/=d;b.x-=E.view.translate.x;b.y-=E.view.translate.y;I(c,b)}mxEvent.consume(a)});mxEvent.addGestureListeners(k,
-function(){},mxUtils.bind(this,function(a){E.isMouseDown&&null!=E.panningManager&&null!=E.graphHandler.first&&(E.graphHandler.suspend(),null!=E.graphHandler.hint&&(E.graphHandler.hint.style.visibility="hidden"),k.style.backgroundColor="#f1f3f4",k.style.cursor="copy",E.panningManager.stop(),E.autoScroll=!1,mxEvent.consume(a))}),mxUtils.bind(this,function(a){E.isMouseDown&&null!=E.panningManager&&null!=E.graphHandler&&(k.style.backgroundColor="",k.style.cursor="default",this.sidebar.showTooltips=!0,
-E.panningManager.stop(),E.graphHandler.reset(),E.isMouseDown=!1,E.autoScroll=!0,C(a),mxEvent.consume(a))}));mxEvent.addListener(k,"mouseleave",mxUtils.bind(this,function(a){E.isMouseDown&&null!=E.graphHandler.first&&(E.graphHandler.resume(),null!=E.graphHandler.hint&&(E.graphHandler.hint.style.visibility="visible"),k.style.backgroundColor="",k.style.cursor="",E.autoScroll=!0)}));Graph.fileSupport&&(mxEvent.addListener(k,"dragover",mxUtils.bind(this,function(a){k.style.backgroundColor="#f1f3f4";a.dataTransfer.dropEffect=
-"copy";k.style.cursor="copy";this.sidebar.hideTooltip();a.stopPropagation();a.preventDefault()})),mxEvent.addListener(k,"drop",mxUtils.bind(this,function(a){k.style.cursor="";k.style.backgroundColor="";0<a.dataTransfer.files.length&&this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(c,d,f,l,n,m,q,u,t){if(null!=c&&"image/"==d.substring(0,6))c="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image="+this.convertDataUri(c),c=[new mxCell("",
-new mxGeometry(0,0,n,m),c)],c[0].vertex=!0,I(c,new mxRectangle(0,0,n,m),a,mxEvent.isAltDown(a)?null:q.substring(0,q.lastIndexOf(".")).replace(/_/g," ")),null!=e&&null!=e.parentNode&&0<b.length&&(e.parentNode.removeChild(e),e=null);else{var p=!1,x=mxUtils.bind(this,function(c,d){if(null!=c&&"application/pdf"==d){var f=Editor.extractGraphModelFromPdf(c);null!=f&&0<f.length&&(c=f)}if(null!=c)if(f=mxUtils.parseXml(c),"mxlibrary"==f.documentElement.nodeName)try{var l=JSON.parse(mxUtils.getTextContent(f.documentElement));
-g(l,k);b=b.concat(l);F(a);this.spinner.stop();p=!0}catch(T){}else if("mxfile"==f.documentElement.nodeName)try{for(var n=f.documentElement.getElementsByTagName("diagram"),l=0;l<n.length;l++){var q=this.stringToCells(Editor.getDiagramNodeXml(n[l])),m=this.editor.graph.getBoundingBoxFromGeometry(q);I(q,new mxRectangle(0,0,m.width,m.height),a)}p=!0}catch(T){null!=window.console&&console.log("error in drop handler:",T)}p||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));
-null!=e&&null!=e.parentNode&&0<b.length&&(e.parentNode.removeChild(e),e=null)});null!=t&&null!=q&&(/(\.v(dx|sdx?))($|\?)/i.test(q)||/(\.vs(x|sx?))($|\?)/i.test(q))?this.importVisio(t,function(a){x(a,"text/xml")},null,q):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,q)&&null!=t?this.parseFile(t,mxUtils.bind(this,function(a){4==a.readyState&&(this.spinner.stop(),200<=a.status&&299>=a.status?x(a.responseText,"text/xml"):this.handleError({message:mxResources.get(413==a.status?
-"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):x(c,d)}}));a.stopPropagation();a.preventDefault()})),mxEvent.addListener(k,"dragleave",function(a){k.style.cursor="";k.style.backgroundColor="";a.stopPropagation();a.preventDefault()}));p=p.cloneNode(!1);p.setAttribute("src",Editor.editImage);p.setAttribute("title",mxResources.get("edit"));m.insertBefore(p,m.firstChild);mxEvent.addListener(p,"click",K);mxEvent.addListener(k,"dblclick",function(a){mxEvent.getSource(a)==
-k&&K(a)});f=p.cloneNode(!1);f.setAttribute("src",Editor.plusImage);f.setAttribute("title",mxResources.get("add"));m.insertBefore(f,m.firstChild);mxEvent.addListener(f,"click",C);this.isOffline()||".scratchpad"!=a.title||null==EditorUi.scratchpadHelpLink||(f=document.createElement("span"),f.setAttribute("title",mxResources.get("help")),f.style.cssText="color:#a3a3a3;text-decoration:none;margin-right:2px;",mxUtils.write(f,"?"),mxEvent.addGestureListeners(f,mxUtils.bind(this,function(a){this.openLink(EditorUi.scratchpadHelpLink);
-mxEvent.consume(a)})),m.insertBefore(f,m.firstChild))}n.appendChild(m);n.style.paddingRight=18*m.childNodes.length+"px"}};EditorUi.prototype.addLibraryEntries=function(a,b){for(var c=0;c<a.length;c++){var d=a[c],e=d.data;if(null!=e){var e=this.convertDataUri(e),f="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==d.aspect&&(f+="aspect=fixed;");b.appendChild(this.sidebar.createVertexTemplate(f+"image="+e,d.w,d.h,"",d.title||"",!1,!1,!0))}else null!=d.xml&&(e=this.stringToCells(Graph.decompress(d.xml)),
-0<e.length&&b.appendChild(this.sidebar.createVertexTemplateFromCells(e,d.w,d.h,d.title||"",!0,!1,!0)))}};EditorUi.prototype.getResource=function(a){return null!=a?a[mxLanguage]||a.main:null};EditorUi.prototype.footerHeight=0;"1"==urlParams.savesidebar&&(Sidebar.prototype.thumbWidth=64,Sidebar.prototype.thumbHeight=64);EditorUi.initTheme=function(){"atlas"==uiTheme?(mxClient.link("stylesheet",STYLE_PATH+"/atlas.css"),"undefined"!==typeof Toolbar&&(Toolbar.prototype.unselectedBackground="linear-gradient(rgb(255, 255, 255) 0px, rgb(242, 242, 242) 100%)",
-Toolbar.prototype.selectedBackground="rgb(242, 242, 242)"),Editor.prototype.initialTopSpacing=3,EditorUi.prototype.menubarHeight=41,EditorUi.prototype.toolbarHeight=38):Editor.isDarkMode()&&(mxClient.link("stylesheet",STYLE_PATH+"/dark.css"),Dialog.backdropColor="#2a2a2a",Format.inactiveTabBackgroundColor="black",Graph.prototype.defaultThemeName="darkTheme",Graph.prototype.defaultPageBackgroundColor="#2a2a2a",Graph.prototype.defaultPageBorderColor="#505759",BaseFormatPanel.prototype.buttonBackgroundColor=
-"#2a2a2a",mxGraphHandler.prototype.previewColor="#cccccc",StyleFormatPanel.prototype.defaultStrokeColor="#cccccc",mxConstants.DROP_TARGET_COLOR="#00ff00");Editor.sketchFontFamily="Architects Daughter";Editor.sketchFontSource="https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter";"1"==urlParams.sketch&&(Graph.prototype.defaultVertexStyle={pointerEvents:"0",hachureGap:"4"},Graph.prototype.defaultEdgeStyle={edgeStyle:"none",rounded:"0",curved:"1",jettySize:"auto",orthogonalLoop:"1",
-endArrow:"open",startSize:"14",endSize:"14",sourcePerimeterSpacing:"8",targetPerimeterSpacing:"8"},"0"!=urlParams.rough&&(Graph.prototype.defaultVertexStyle.fontFamily=Editor.sketchFontFamily,Graph.prototype.defaultVertexStyle.fontSource=Editor.sketchFontSource,Graph.prototype.defaultVertexStyle.fontSize="20",Graph.prototype.defaultVertexStyle.sketch="1",Graph.prototype.defaultEdgeStyle.fontFamily=Editor.sketchFontFamily,Graph.prototype.defaultEdgeStyle.fontSource=Editor.sketchFontSource,Graph.prototype.defaultEdgeStyle.fontSize=
-"20",Graph.prototype.defaultEdgeStyle.sketch="1",Menus.prototype.defaultFonts=[{fontFamily:Editor.sketchFontFamily,fontUrl:decodeURIComponent(Editor.sketchFontSource)},{fontFamily:"Rock Salt",fontUrl:"https://fonts.googleapis.com/css?family=Rock+Salt"},{fontFamily:"Permanent Marker",fontUrl:"https://fonts.googleapis.com/css?family=Permanent+Marker"}].concat(Menus.prototype.defaultFonts)),Editor.configurationKey=".sketch-configuration",Editor.settingsKey=".sketch-config",Graph.prototype.defaultGridEnabled=
-!1,Graph.prototype.defaultPageVisible=!1,Graph.prototype.defaultEdgeLength=120,Editor.fitWindowBorders=new mxRectangle(60,30,30,30))};EditorUi.initTheme();EditorUi.prototype.showImageDialog=function(a,b,d,f,k){a=new ImageDialog(this,a,b,d,f,k);this.showDialog(a.container,Graph.fileSupport?480:360,Graph.fileSupport?200:90,!0,!0);a.init()};EditorUi.prototype.showBackgroundImageDialog=function(a,b){a=null!=a?a:mxUtils.bind(this,function(a,c){if(!c){var b=new ChangePageSetup(this,null,a);b.ignoreColor=
-!0;this.editor.graph.model.execute(b)}});var c=new BackgroundImageDialog(this,a,b);this.showDialog(c.container,360,200,!0,!0);c.init()};EditorUi.prototype.showLibraryDialog=function(a,b,d,f,k){a=new LibraryDialog(this,a,b,d,f,k);this.showDialog(a.container,640,440,!0,!1,mxUtils.bind(this,function(a){a&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()}));a.init()};var d=EditorUi.prototype.createFormat;EditorUi.prototype.createFormat=function(a){var c=d.apply(this,arguments);this.editor.graph.addListener("viewStateChanged",
-mxUtils.bind(this,function(a){this.editor.graph.isSelectionEmpty()&&c.refresh()}));return c};EditorUi.prototype.createSidebarFooterContainer=function(){var a=this.createDiv("geSidebarContainer geSidebarFooter");a.style.position="absolute";a.style.overflow="hidden";var b=document.createElement("a");b.className="geTitle";b.style.color="#DF6C0C";b.style.fontWeight="bold";b.style.height="100%";b.style.paddingTop="9px";b.innerHTML='<span style="font-size:18px;margin-right:5px;">+</span>';mxUtils.write(b,
-mxResources.get("moreShapes")+"...");mxEvent.addListener(b,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(a){a.preventDefault()}));mxEvent.addListener(b,"click",mxUtils.bind(this,function(a){this.actions.get("shapes").funct();mxEvent.consume(a)}));a.appendChild(b);return a};EditorUi.prototype.handleError=function(a,b,d,f,k,m,u){var c=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},e=null!=a&&null!=a.error?a.error:a;if(null!=a&&null!=a.stack&&
-null!=a.message)try{u?null!=window.console&&console.error("EditorUi.handleError:",a):EditorUi.logError("Caught: "+(""==a.message&&null!=a.name)?a.name:a.message,a.filename,a.lineNumber,a.columnNumber,a,"INFO")}catch(H){}if(null!=e||null!=b){u=mxUtils.htmlEntities(mxResources.get("unknownError"));var g=mxResources.get("ok"),l=null;b=null!=b?b:mxResources.get("error");if(null!=e){null!=e.retry&&(g=mxResources.get("cancel"),l=function(){c();e.retry()});if(404==e.code||404==e.status||403==e.code){u=403==
-e.code?null!=e.message?mxUtils.htmlEntities(e.message):mxUtils.htmlEntities(mxResources.get("accessDenied")):null!=k?k:mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied")+(null!=this.drive&&null!=this.drive.user?" ("+this.drive.user.displayName+", "+this.drive.user.email+")":""));var n=null!=k?null:null!=m?m:window.location.hash;if(null!=n&&("#G"==n.substring(0,2)||"#Uhttps%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D"==n.substring(0,45))&&(null!=a&&null!=a.error&&(null!=a.error.errors&&0<a.error.errors.length&&
-"fileAccess"==a.error.errors[0].reason||null!=a.error.data&&0<a.error.data.length&&"fileAccess"==a.error.data[0].reason)||404==e.code||404==e.status)){n="#U"==n.substring(0,2)?n.substring(45,n.lastIndexOf("%26ex")):n.substring(2);this.showError(b,u,mxResources.get("openInNewWindow"),mxUtils.bind(this,function(){this.editor.graph.openLink("https://drive.google.com/open?id="+n);this.handleError(a,b,d,f,k)}),l,mxResources.get("changeUser"),mxUtils.bind(this,function(){function a(){e.innerHTML="";for(var a=
-0;a<c.length;a++){var b=document.createElement("option");mxUtils.write(b,c[a].displayName);b.value=a;e.appendChild(b);b=document.createElement("option");b.innerHTML="&nbsp;&nbsp;&nbsp;";mxUtils.write(b,"<"+c[a].email+">");b.setAttribute("disabled","disabled");e.appendChild(b)}b=document.createElement("option");mxUtils.write(b,mxResources.get("addAccount"));b.value=c.length;e.appendChild(b)}var c=this.drive.getUsersList(),b=document.createElement("div"),d=document.createElement("span");d.style.marginTop=
-"6px";mxUtils.write(d,mxResources.get("changeUser")+": ");b.appendChild(d);var e=document.createElement("select");e.style.width="200px";a();mxEvent.addListener(e,"change",mxUtils.bind(this,function(){var b=e.value,d=c.length!=b;d&&this.drive.setUser(c[b]);this.drive.authorize(d,mxUtils.bind(this,function(){d||(c=this.drive.getUsersList(),a())}),mxUtils.bind(this,function(a){this.handleError(a)}),!0)}));b.appendChild(e);b=new CustomDialog(this,b,mxUtils.bind(this,function(){this.loadFile(window.location.hash.substr(1),
-!0)}));this.showDialog(b.container,300,75,!0,!0)}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.hideDialog();null!=d&&d()}),480,150);return}}null!=e.message?u=""==e.message&&null!=e.name?mxUtils.htmlEntities(e.name):mxUtils.htmlEntities(e.message):null!=e.response&&null!=e.response.error?u=mxUtils.htmlEntities(e.response.error):"undefined"!==typeof window.App&&(e.code==App.ERROR_TIMEOUT?u=mxUtils.htmlEntities(mxResources.get("timeout")):e.code==App.ERROR_BUSY?u=mxUtils.htmlEntities(mxResources.get("busy")):
-"string"===typeof e&&0<e.length&&(u=mxUtils.htmlEntities(e)))}var q=m=null;null!=e&&null!=e.helpLink&&(m=mxResources.get("help"),q=mxUtils.bind(this,function(){return this.editor.graph.openLink(e.helpLink)}));this.showError(b,u,g,d,l,null,null,m,q,null,null,null,f?d:null)}else null!=d&&d()};EditorUi.prototype.alert=function(a,b,d){a=new ErrorDialog(this,null,a,mxResources.get("ok"),b);this.showDialog(a.container,d||340,100,!0,!1);a.init()};EditorUi.prototype.confirm=function(a,b,d,f,k,m){var c=null!=
-this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},e=Math.min(200,28*Math.ceil(a.length/50));a=new ConfirmDialog(this,a,function(){c();null!=b&&b()},function(){c();null!=d&&d()},f,k,null,null,null,null,e);this.showDialog(a.container,340,46+e,!0,m);a.init()};EditorUi.prototype.showBanner=function(a,b,d,f){var c=!1;if(!(this.bannerShowing||this["hideBanner"+a]||isLocalStorage&&null!=mxSettings.settings&&null!=mxSettings.settings["close"+a])){var e=document.createElement("div");
-e.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(e.style,"box-shadow","1px 1px 2px 0px #ddd");mxUtils.setPrefixedStyle(e.style,"transform","translate(-50%,120%)");mxUtils.setPrefixedStyle(e.style,"transition","all 1s ease");e.className="geBtn gePrimaryBtn";c=document.createElement("img");c.setAttribute("src",IMAGE_PATH+
-"/logo.png");c.setAttribute("border","0");c.setAttribute("align","absmiddle");c.style.cssText="margin-top:-4px;margin-left:8px;margin-right:12px;width:26px;height:26px;";e.appendChild(c);c=document.createElement("img");c.setAttribute("src",Dialog.prototype.closeImage);c.setAttribute("title",mxResources.get(f?"doNotShowAgain":"close"));c.setAttribute("border","0");c.style.cssText="position:absolute;right:10px;top:12px;filter:invert(1);padding:6px;margin:-6px;cursor:default;";e.appendChild(c);mxUtils.write(e,
-b);document.body.appendChild(e);this.bannerShowing=!0;b=document.createElement("div");b.style.cssText="font-size:11px;text-align:center;font-weight:normal;";var g=document.createElement("input");g.setAttribute("type","checkbox");g.setAttribute("id","geDoNotShowAgainCheckbox");g.style.marginRight="6px";if(!f){b.appendChild(g);var k=document.createElement("label");k.setAttribute("for","geDoNotShowAgainCheckbox");mxUtils.write(k,mxResources.get("doNotShowAgain"));b.appendChild(k);e.style.paddingBottom=
-"30px";e.appendChild(b)}var n=mxUtils.bind(this,function(){null!=e.parentNode&&(e.parentNode.removeChild(e),this.bannerShowing=!1,g.checked||f)&&(this["hideBanner"+a]=!0,isLocalStorage&&null!=mxSettings.settings&&(mxSettings.settings["close"+a]=Date.now(),mxSettings.save()))});mxEvent.addListener(c,"click",mxUtils.bind(this,function(a){mxEvent.consume(a);n()}));var m=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(e.style,"transform","translate(-50%,120%)");window.setTimeout(mxUtils.bind(this,
-function(){n()}),1E3)});mxEvent.addListener(e,"click",mxUtils.bind(this,function(a){var c=mxEvent.getSource(a);c!=g&&c!=k?(null!=d&&d(),n(),mxEvent.consume(a)):m()}));window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(e.style,"transform","translate(-50%,0%)")}),500);window.setTimeout(m,3E4);c=!0}return c};EditorUi.prototype.setCurrentFile=function(a){null!=a&&(a.opened=new Date);this.currentFile=a};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};EditorUi.prototype.isExportToCanvas=
-function(){return this.editor.isExportToCanvas()};EditorUi.prototype.createImageDataUri=function(a,b,d,f){a=a.toDataURL("image/"+d);if(null!=a&&6<a.length)null!=b&&(a=Editor.writeGraphModelToPng(a,"tEXt","mxfile",encodeURIComponent(b))),0<f&&(a=Editor.writeGraphModelToPng(a,"pHYs","dpi",f));else throw{message:mxResources.get("unknownError")};return a};EditorUi.prototype.saveCanvas=function(a,b,d,f,k){var c="jpeg"==d?"jpg":d;f=this.getBaseFilename(f)+"."+c;a=this.createImageDataUri(a,b,d,k);this.saveData(f,
-c,a.substring(a.lastIndexOf(",")+1),"image/"+d,!0)};EditorUi.prototype.isLocalFileSave=function(){return"remote"!=urlParams.save&&(mxClient.IS_IE||"undefined"!==typeof window.Blob&&"undefined"!==typeof window.URL)&&9!=document.documentMode&&8!=document.documentMode&&7!=document.documentMode||this.isOfflineApp()||mxClient.IS_IOS};EditorUi.prototype.showTextDialog=function(a,b){var c=new TextareaDialog(this,a,b,null,null,mxResources.get("close"));c.textarea.style.width="600px";c.textarea.style.height=
-"380px";this.showDialog(c.container,620,460,!0,!0,null,null,null,null,!0);c.init();document.execCommand("selectall",!1,null)};EditorUi.prototype.doSaveLocalFile=function(a,b,d,f,k,m){"text/xml"!=d||/(\.drawio)$/i.test(b)||/(\.xml)$/i.test(b)||/(\.svg)$/i.test(b)||/(\.html)$/i.test(b)||(b=b+"."+(null!=m?m:"drawio"));if(window.Blob&&navigator.msSaveOrOpenBlob)a=f?this.base64ToBlob(a,d):new Blob([a],{type:d}),navigator.msSaveOrOpenBlob(a,b);else if(mxClient.IS_IE)d=window.open("about:blank","_blank"),
-null==d?mxUtils.popup(a,!0):(d.document.write(a),d.document.close(),d.document.execCommand("SaveAs",!0,b),d.close());else if(mxClient.IS_IOS&&this.isOffline())navigator.standalone||null==d||"image/"!=d.substring(0,6)?this.showTextDialog(b+":",a):this.openInNewWindow(a,d,f);else{var c=document.createElement("a");m=(null==navigator.userAgent||0>navigator.userAgent.indexOf("PaleMoon/"))&&"undefined"!==typeof c.download;if(mxClient.IS_GC&&null!=navigator.userAgent){var e=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);
-m=65==(e?parseInt(e[2],10):!1)?!1:m}if(m||this.isOffline()){c.href=URL.createObjectURL(f?this.base64ToBlob(a,d):new Blob([a],{type:d}));m?c.download=b:c.setAttribute("target","_blank");document.body.appendChild(c);try{window.setTimeout(function(){URL.revokeObjectURL(c.href)},2E4),c.click(),c.parentNode.removeChild(c)}catch(A){}}else this.createEchoRequest(a,b,d,f,k).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(a,b,d,f,k,m){a="xml="+encodeURIComponent(a);return new mxXmlRequest(SAVE_URL,
-a+(null!=d?"&mime="+d:"")+(null!=k?"&format="+k:"")+(null!=m?"&base64="+m:"")+(null!=b?"&filename="+encodeURIComponent(b):"")+(f?"&binary=1":""))};EditorUi.prototype.base64ToBlob=function(a,b){b=b||"";for(var c=atob(a),d=c.length,e=Math.ceil(d/1024),f=Array(e),k=0;k<e;++k){for(var m=1024*k,p=Math.min(m+1024,d),x=Array(p-m),G=0;m<p;++G,++m)x[G]=c[m].charCodeAt(0);f[k]=new Uint8Array(x)}return new Blob(f,{type:b})};EditorUi.prototype.saveLocalFile=function(a,b,d,f,k,m,u,p){m=null!=m?m:!1;u=null!=u?
-u:"vsdx"!=k&&(!mxClient.IS_IOS||!navigator.standalone);k=this.getServiceCount(m);isLocalStorage&&k++;var c=4>=k?2:6<k?4:3;b=new CreateDialog(this,b,mxUtils.bind(this,function(c,b){try{if("_blank"==b)if(null!=d&&"image/"==d.substring(0,6))this.openInNewWindow(a,d,f);else if(null!=d&&"text/html"==d.substring(0,9)){var e=new EmbedDialog(this,a);this.showDialog(e.container,440,240,!0,!0);e.init()}else{var g=window.open("about:blank");null==g?mxUtils.popup(a,!0):(g.document.write("<pre>"+mxUtils.htmlEntities(a,
-!1)+"</pre>"),g.document.close())}else b==App.MODE_DEVICE||"download"==b?this.doSaveLocalFile(a,c,d,f,null,p):null!=c&&0<c.length&&this.pickFolder(b,mxUtils.bind(this,function(e){try{this.exportFile(a,c,d,f,b,e)}catch(K){this.handleError(K)}}))}catch(H){this.handleError(H)}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,m,u,null,1<k,c,a,d,f);m=this.isServices(k)?k>c?390:270:160;this.showDialog(b.container,400,m,!0,!0);b.init()};EditorUi.prototype.openInNewWindow=
-function(a,b,d){var c=window.open("about:blank");null==c||null==c.document?mxUtils.popup(a,!0):("image/svg+xml"!=b||mxClient.IS_SVG?"image/svg+xml"==b?c.document.write("<html>"+a+"</html>"):(a=d?a:btoa(unescape(encodeURIComponent(a))),c.document.write('<html><img style="max-width:100%;" src="data:'+b+";base64,"+a+'"/></html>')):c.document.write("<html><pre>"+mxUtils.htmlEntities(a,!1)+"</pre></html>"),c.document.close())};var k=EditorUi.prototype.addChromelessToolbarItems;EditorUi.prototype.isChromelessImageExportEnabled=
-function(){return"draw.io"!=this.getServiceName()||/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname)};EditorUi.prototype.addChromelessToolbarItems=function(a){if(this.isExportToCanvas()&&this.isChromelessImageExportEnabled()){this.exportDialog=null;var c=a(mxUtils.bind(this,function(a){var b=mxUtils.bind(this,function(){mxEvent.removeListener(this.editor.graph.container,"click",b);null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),
-this.exportDialog=null)});if(null!=this.exportDialog)b.apply(this);else{this.exportDialog=document.createElement("div");var d=c.getBoundingClientRect();mxUtils.setPrefixedStyle(this.exportDialog.style,"borderRadius","5px");this.exportDialog.style.position="fixed";this.exportDialog.style.textAlign="center";this.exportDialog.style.fontFamily="Helvetica,Arial";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=d.left+"px";this.exportDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";d=mxUtils.getCurrentStyle(this.editor.graph.container);this.exportDialog.style.zIndex=d.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(a){e.stop();this.exportDialog.style.width="auto";this.exportDialog.style.height="auto";this.exportDialog.style.padding="10px";var c=this.createImageDataUri(a,null,"png");a=document.createElement("img");a.style.maxWidth="140px";a.style.maxHeight="140px";a.style.cursor="pointer";a.style.backgroundColor="white";a.setAttribute("title",mxResources.get("openInNewWindow"));a.setAttribute("border","0");a.setAttribute("src",c);this.exportDialog.appendChild(a);
-mxEvent.addListener(a,"click",mxUtils.bind(this,function(){this.openInNewWindow(c.substring(c.indexOf(",")+1),"image/png",!0);b.apply(this,arguments)}))}),null,this.thumbImageCache,null,mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),null,null,null,null,null,null,null,Editor.defaultBorder);mxEvent.addListener(this.editor.graph.container,"click",b);document.body.appendChild(this.exportDialog)}mxEvent.consume(a)}),Editor.cameraLargeImage,mxResources.get("export"))}k.apply(this,
-arguments)};EditorUi.prototype.saveData=function(a,b,d,f,k){this.isLocalFileSave()?this.saveLocalFile(d,a,f,k,b):this.saveRequest(a,b,mxUtils.bind(this,function(a,c){return this.createEchoRequest(d,a,f,k,b,c)}),d,k,f)};EditorUi.prototype.saveRequest=function(a,b,d,f,k,m,u){u=null!=u?u:!mxClient.IS_IOS||!navigator.standalone;var c=this.getServiceCount(!1);isLocalStorage&&c++;var e=4>=c?2:6<c?4:3;a=new CreateDialog(this,a,mxUtils.bind(this,function(a,c){if("_blank"==c||null!=a&&0<a.length){var e=d("_blank"==
-c?null:a,c==App.MODE_DEVICE||"download"==c||null==c||"_blank"==c?"0":"1");null!=e&&(c==App.MODE_DEVICE||"download"==c||"_blank"==c?e.simulate(document,"_blank"):this.pickFolder(c,mxUtils.bind(this,function(d){m=null!=m?m:"pdf"==b?"application/pdf":"image/"+b;if(null!=f)try{this.exportFile(f,a,m,!0,c,d)}catch(H){this.handleError(H)}else this.spinner.spin(document.body,mxResources.get("saving"))&&e.send(mxUtils.bind(this,function(){this.spinner.stop();if(200<=e.getStatus()&&299>=e.getStatus())try{this.exportFile(e.getText(),
-a,m,!0,c,d)}catch(H){this.handleError(H)}else this.handleError({message:mxResources.get("errorSavingFile")})}),function(a){this.spinner.stop();this.handleError(a)})})))}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,!1,u,null,1<c,e,f,m,k);c=this.isServices(c)?4<c?390:270:160;this.showDialog(a.container,380,c,!0,!0);a.init()};EditorUi.prototype.isServices=function(a){return 1!=a};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};
-EditorUi.prototype.exportFile=function(a,b,d,f,k,m){};EditorUi.prototype.pickFolder=function(a,b,d){b(null)};EditorUi.prototype.exportSvg=function(a,b,d,f,k,m,u,p,A,x,G,z){if(this.spinner.spin(document.body,mxResources.get("export")))try{var c=this.editor.graph.isSelectionEmpty();d=null!=d?d:c;var e=b?null:this.editor.graph.background;e==mxConstants.NONE&&(e=null);null==e&&0==b&&(e=G?this.editor.graph.defaultPageBackgroundColor:"#ffffff");var g=this.editor.graph.getSvg(e,a,u,p,null,d,null,null,"blank"==
-x?"_blank":"self"==x?"_top":null,null,!0,G,z);f&&this.editor.graph.addSvgShadow(g);var l=this.getBaseFilename()+".svg",n=mxUtils.bind(this,function(a){this.spinner.stop();k&&a.setAttribute("content",this.getFileData(!0,null,null,null,d,A,null,null,null,!1));var c='<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n'+mxUtils.getXml(a);this.isLocalFileSave()||c.length<=MAX_REQUEST_SIZE?this.saveData(l,"svg",c,"image/svg+xml"):
-this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(c)}))});this.editor.addFontCss(g);this.editor.graph.mathEnabled&&this.editor.addMathCss(g);m?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.editor.convertImages(g,n,this.thumbImageCache)):n(g)}catch(C){this.handleError(C)}};EditorUi.prototype.addRadiobox=function(a,b,d,f,k,m,u){return this.addCheckbox(a,d,f,k,m,u,!0,b)};EditorUi.prototype.addCheckbox=function(a,
-b,d,f,k,m,u,p){m=null!=m?m:!0;var c=document.createElement("input");c.style.marginRight="8px";c.style.marginTop="16px";c.setAttribute("type",u?"radio":"checkbox");u="geCheckbox-"+Editor.guid();c.id=u;null!=p&&c.setAttribute("name",p);d&&(c.setAttribute("checked","checked"),c.defaultChecked=!0);f&&c.setAttribute("disabled","disabled");m&&(a.appendChild(c),d=document.createElement("label"),mxUtils.write(d,b),d.setAttribute("for",u),a.appendChild(d),k||mxUtils.br(a));return c};EditorUi.prototype.addEditButton=
-function(a,b){var c=this.addCheckbox(a,mxResources.get("edit")+":",!0,null,!0);c.style.marginLeft="24px";var d=this.getCurrentFile(),e="";null!=d&&d.getMode()!=App.MODE_DEVICE&&d.getMode()!=App.MODE_BROWSER&&(e=window.location.href);var f=document.createElement("select");f.style.width="120px";f.style.marginLeft="8px";f.style.marginRight="10px";f.className="geBtn";d=document.createElement("option");d.setAttribute("value","blank");mxUtils.write(d,mxResources.get("makeCopy"));f.appendChild(d);d=document.createElement("option");
-d.setAttribute("value","custom");mxUtils.write(d,mxResources.get("custom")+"...");f.appendChild(d);a.appendChild(f);mxEvent.addListener(f,"change",mxUtils.bind(this,function(){if("custom"==f.value){var a=new FilenameDialog(this,e,mxResources.get("ok"),function(a){null!=a?e=a:f.value="blank"},mxResources.get("url"),null,null,null,null,function(){f.value="blank"});this.showDialog(a.container,300,80,!0,!1);a.init()}}));mxEvent.addListener(c,"change",mxUtils.bind(this,function(){c.checked&&(null==b||
-b.checked)?f.removeAttribute("disabled"):f.setAttribute("disabled","disabled")}));mxUtils.br(a);return{getLink:function(){return c.checked?"blank"===f.value?"_blank":e:null},getEditInput:function(){return c},getEditSelect:function(){return f}}};EditorUi.prototype.addLinkSection=function(a,b){function c(){k.innerHTML='<div style="width:100%;height:100%;box-sizing:border-box;'+(null!=f&&f!=mxConstants.NONE?"border:1px solid black;background-color:"+f:"background-position:center center;background-repeat:no-repeat;background-image:url('"+
-Dialog.prototype.closeImage+"')")+';"></div>'}mxUtils.write(a,mxResources.get("links")+":");var d=document.createElement("select");d.style.width="100px";d.style.marginLeft="8px";d.style.marginRight="10px";d.className="geBtn";var e=document.createElement("option");e.setAttribute("value","auto");mxUtils.write(e,mxResources.get("automatic"));d.appendChild(e);e=document.createElement("option");e.setAttribute("value","blank");mxUtils.write(e,mxResources.get("openInNewWindow"));d.appendChild(e);e=document.createElement("option");
-e.setAttribute("value","self");mxUtils.write(e,mxResources.get("openInThisWindow"));d.appendChild(e);b&&(e=document.createElement("option"),e.setAttribute("value","frame"),mxUtils.write(e,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),d.appendChild(e));a.appendChild(d);mxUtils.write(a,mxResources.get("borderColor")+":");var f="#0000ff",k=null,k=mxUtils.button("",mxUtils.bind(this,function(a){this.pickColor(f||"none",function(a){f=a;c()});mxEvent.consume(a)}));c();k.style.padding=
-mxClient.IS_FF?"4px 2px 4px 2px":"4px";k.style.marginLeft="4px";k.style.height="22px";k.style.width="22px";k.style.position="relative";k.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";k.className="geColorBtn";a.appendChild(k);mxUtils.br(a);return{getColor:function(){return f},getTarget:function(){return d.value},focus:function(){d.focus()}}};EditorUi.prototype.createUrlParameters=function(a,b,d,f,k,m,p){p=null!=p?p:[];f&&("https://viewer.diagrams.net"==EditorUi.lightboxHost&&
-"1"!=urlParams.dev||p.push("lightbox=1"),"auto"!=a&&p.push("target="+a),null!=b&&b!=mxConstants.NONE&&p.push("highlight="+("#"==b.charAt(0)?b.substring(1):b)),null!=k&&0<k.length&&p.push("edit="+encodeURIComponent(k)),m&&p.push("layers=1"),this.editor.graph.foldingEnabled&&p.push("nav=1"));d&&null!=this.currentPage&&null!=this.pages&&this.currentPage!=this.pages[0]&&p.push("page-id="+this.currentPage.getId());return p};EditorUi.prototype.createLink=function(a,b,d,f,k,m,p,t,A,x){A=this.createUrlParameters(a,
-b,d,f,k,m,A);a=this.getCurrentFile();b=!0;null!=p?d="#U"+encodeURIComponent(p):(a=this.getCurrentFile(),t||null==a||a.constructor!=window.DriveFile?d="#R"+encodeURIComponent(d?this.getFileData(!0,null,null,null,null,null,null,!0,null,!1):Graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(d="#"+a.getHash(),b=!1));b&&null!=a&&null!=a.getTitle()&&a.getTitle()!=this.defaultFilename&&A.push("title="+encodeURIComponent(a.getTitle()));x&&1<d.length&&(A.push("open="+d.substring(1)),d="");return(f&&
-"1"!=urlParams.dev?EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?EditorUi.drawHost:"https://"+window.location.host)+"/"+(0<A.length?"?"+A.join("&"):"")+d};EditorUi.prototype.createHtml=function(a,b,d,f,k,m,p,t,A,x,G){this.getBasenames();var c={};""!=k&&k!=mxConstants.NONE&&(c.highlight=k);"auto"!==f&&(c.target=f);A||(c.lightbox=!1);c.nav=this.editor.graph.foldingEnabled;d=parseInt(d);isNaN(d)||100==d||(c.zoom=d/100);d=[];p&&(d.push("pages"),
+1;0<=f;f--){var g=this.updatePageRoot(new DiagramPage(d[f]));null==g.getName()&&g.setName(mxResources.get("pageWithNumber",[f+1]));c.model.execute(new ChangePage(this,g,0==f?g:null,0))}}else"0"!=urlParams.pages&&null==this.fileNode&&(this.fileNode=a.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(a.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),c.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0))),
+this.editor.setGraphXml(a),null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=b)for(f=0;f<b.length;f++)c.model.execute(new ChangePage(this,b[f],null))}finally{c.model.endUpdate()}}};EditorUi.prototype.createFileData=function(a,b,d,f,g,q,m,t,p,x,G){b=null!=b?b:this.editor.graph;g=null!=g?g:!1;p=null!=p?p:!0;var c,e=null;null==d||d.getMode()==App.MODE_DEVICE||d.getMode()==App.MODE_BROWSER?c="_blank":e=c=f;if(null==a)return"";var k=a;if("mxfile"!=k.nodeName.toLowerCase()){if(G){var l=
+a.ownerDocument.createElement("diagram");l.setAttribute("id",Editor.guid());l.appendChild(a)}else{l=Graph.zapGremlins(mxUtils.getXml(a));k=Graph.compress(l);if(Graph.decompress(k)!=l)return l;l=a.ownerDocument.createElement("diagram");l.setAttribute("id",Editor.guid());mxUtils.setTextContent(l,k)}k=a.ownerDocument.createElement("mxfile");k.appendChild(l)}x?(k=k.cloneNode(!0),k.removeAttribute("modified"),k.removeAttribute("host"),k.removeAttribute("agent"),k.removeAttribute("etag"),k.removeAttribute("userAgent"),
+k.removeAttribute("version"),k.removeAttribute("editor"),k.removeAttribute("type")):(k.removeAttribute("userAgent"),k.removeAttribute("version"),k.removeAttribute("editor"),k.removeAttribute("pages"),k.removeAttribute("type"),mxClient.IS_CHROMEAPP?k.setAttribute("host","Chrome"):EditorUi.isElectronApp?k.setAttribute("host","Electron"):k.setAttribute("host",window.location.hostname),k.setAttribute("modified",(new Date).toISOString()),k.setAttribute("agent",navigator.appVersion),k.setAttribute("version",
+EditorUi.VERSION),k.setAttribute("etag",Editor.guid()),a=null!=d?d.getMode():this.mode,null!=a&&k.setAttribute("type",a),1<k.getElementsByTagName("diagram").length&&null!=this.pages&&k.setAttribute("pages",this.pages.length));G=G?mxUtils.getPrettyXml(k):mxUtils.getXml(k);if(!q&&!g&&(m||null!=d&&/(\.html)$/i.test(d.getTitle())))G=this.getHtml2(mxUtils.getXml(k),b,null!=d?d.getTitle():null,c,e);else if(q||!g&&null!=d&&/(\.svg)$/i.test(d.getTitle()))null==d||d.getMode()!=App.MODE_DEVICE&&d.getMode()!=
+App.MODE_BROWSER||(f=null),G=this.getEmbeddedSvg(G,b,f,null,t,p,e);return G};EditorUi.prototype.getXmlFileData=function(a,b,d,f){a=null!=a?a:!0;b=null!=b?b:!1;d=null!=d?d:!Editor.compressXml;var c=this.editor.getGraphXml(a,f);if(a&&null!=this.fileNode&&null!=this.currentPage)if(a=function(a){var b=a.getElementsByTagName("mxGraphModel"),b=0<b.length?b[0]:null;null==b&&d?(b=mxUtils.trim(mxUtils.getTextContent(a)),a=a.cloneNode(!1),0<b.length&&(b=Graph.decompress(b),null!=b&&0<b.length&&a.appendChild(mxUtils.parseXml(b).documentElement))):
+null==b||d?a=a.cloneNode(!0):(a=a.cloneNode(!1),mxUtils.setTextContent(a,Graph.compressNode(b)));c.appendChild(a)},EditorUi.removeChildNodes(this.currentPage.node),mxUtils.setTextContent(this.currentPage.node,Graph.compressNode(c)),c=this.fileNode.cloneNode(!1),b)a(this.currentPage.node);else for(b=0;b<this.pages.length;b++){var e=this.pages[b],k=e.node;if(e!=this.currentPage)if(e.needsUpdate){var g=new mxCodec(mxUtils.createXmlDocument()),g=g.encode(new mxGraphModel(e.root));this.editor.graph.saveViewState(e.viewState,
+g,null,f);EditorUi.removeChildNodes(e.node);mxUtils.setTextContent(e.node,Graph.compressNode(g));delete e.needsUpdate}else f&&(null==e.viewState&&(g=this.editor.extractGraphModel(e.node),e.viewState=this.editor.graph.createViewState(g)),null!=e.viewState.backgroundImage&&Graph.isPageLink(e.viewState.backgroundImage.originalSrc)&&null==e.viewState.backgroundImage.src&&(e.viewState.backgroundImage=this.createImageForPageLink(e.viewState.backgroundImage.originalSrc)),null!=e.viewState.backgroundImage&&
+null!=e.viewState.backgroundImage.originalSrc&&(g=new mxCodec(mxUtils.createXmlDocument()),g=g.encode(new mxGraphModel(e.root)),this.editor.graph.saveViewState(e.viewState,g,null,f),k=k.cloneNode(!1),mxUtils.setTextContent(c,Graph.compressNode(g))));a(k)}return c};EditorUi.prototype.anonymizeString=function(a,b){for(var c=[],e=0;e<a.length;e++){var d=a.charAt(e);0<=EditorUi.ignoredAnonymizedChars.indexOf(d)?c.push(d):isNaN(parseInt(d))?d.toLowerCase()!=d?c.push(String.fromCharCode(65+Math.round(25*
+Math.random()))):d.toUpperCase()!=d?c.push(String.fromCharCode(97+Math.round(25*Math.random()))):/\s/.test(d)?c.push(" "):c.push("?"):c.push(b?"0":Math.round(9*Math.random()))}return c.join("")};EditorUi.prototype.anonymizePatch=function(a){if(null!=a[EditorUi.DIFF_INSERT])for(var c=0;c<a[EditorUi.DIFF_INSERT].length;c++)try{var b=mxUtils.parseXml(a[EditorUi.DIFF_INSERT][c].data).documentElement.cloneNode(!1);null!=b.getAttribute("name")&&b.setAttribute("name",this.anonymizeString(b.getAttribute("name")));
+a[EditorUi.DIFF_INSERT][c].data=mxUtils.getXml(b)}catch(q){a[EditorUi.DIFF_INSERT][c].data=q.message}if(null!=a[EditorUi.DIFF_UPDATE]){for(var d in a[EditorUi.DIFF_UPDATE]){var f=a[EditorUi.DIFF_UPDATE][d];null!=f.name&&(f.name=this.anonymizeString(f.name));null!=f.cells&&(c=mxUtils.bind(this,function(a){var c=f.cells[a];if(null!=c){for(var b in c)null!=c[b].value&&(c[b].value="["+c[b].value.length+"]"),null!=c[b].xmlValue&&(c[b].xmlValue="["+c[b].xmlValue.length+"]"),null!=c[b].style&&(c[b].style=
+"["+c[b].style.length+"]"),0==Object.keys(c[b]).length&&delete c[b];0==Object.keys(c).length&&delete f.cells[a]}}),c(EditorUi.DIFF_INSERT),c(EditorUi.DIFF_UPDATE),0==Object.keys(f.cells).length&&delete f.cells);0==Object.keys(f).length&&delete a[EditorUi.DIFF_UPDATE][d]}0==Object.keys(a[EditorUi.DIFF_UPDATE]).length&&delete a[EditorUi.DIFF_UPDATE]}return a};EditorUi.prototype.anonymizeAttributes=function(a,b){if(null!=a.attributes)for(var c=0;c<a.attributes.length;c++)"as"!=a.attributes[c].name&&
+a.setAttribute(a.attributes[c].name,this.anonymizeString(a.attributes[c].value,b));if(null!=a.childNodes)for(c=0;c<a.childNodes.length;c++)this.anonymizeAttributes(a.childNodes[c],b)};EditorUi.prototype.anonymizeNode=function(a,b){for(var c=a.getElementsByTagName("mxCell"),e=0;e<c.length;e++)null!=c[e].getAttribute("value")&&c[e].setAttribute("value","["+c[e].getAttribute("value").length+"]"),null!=c[e].getAttribute("xmlValue")&&c[e].setAttribute("xmlValue","["+c[e].getAttribute("xmlValue").length+
+"]"),null!=c[e].getAttribute("style")&&c[e].setAttribute("style","["+c[e].getAttribute("style").length+"]"),null!=c[e].parentNode&&"root"!=c[e].parentNode.nodeName&&null!=c[e].parentNode.parentNode&&(c[e].setAttribute("id",c[e].parentNode.getAttribute("id")),c[e].parentNode.parentNode.replaceChild(c[e],c[e].parentNode));return a};EditorUi.prototype.synchronizeCurrentFile=function(a){var c=this.getCurrentFile();null!=c&&(c.savingFile?this.handleError({message:mxResources.get("busy")}):!a&&c.invalidChecksum?
+c.handleFileError(null,!0):this.spinner.spin(document.body,mxResources.get("updatingDocument"))&&(c.clearAutosave(),this.editor.setStatus(""),a?c.reloadFile(mxUtils.bind(this,function(){c.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(a){c.handleFileError(a,!0)})):c.synchronizeFile(mxUtils.bind(this,function(){c.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(a){c.handleFileError(a,!0)}))))};EditorUi.prototype.getFileData=function(a,b,d,f,g,q,m,
+t,p,x,G){g=null!=g?g:!0;q=null!=q?q:!1;var c=this.editor.graph;if(b||!a&&null!=p&&/(\.svg)$/i.test(p.getTitle()))if(x=!1,null!=c.themes&&"darkTheme"==c.defaultThemeName||null!=this.pages&&this.currentPage!=this.pages[0]){var e=c.getGlobalVariable,c=this.createTemporaryGraph(c.getStylesheet()),k=this.pages[0];c.getGlobalVariable=function(a){return"page"==a?k.getName():"pagenumber"==a?1:e.apply(this,arguments)};document.body.appendChild(c.container);c.model.setRoot(k.root)}m=null!=m?m:this.getXmlFileData(g,
+q,x,G);p=null!=p?p:this.getCurrentFile();a=this.createFileData(m,c,p,window.location.href,a,b,d,f,g,t,x);c!=this.editor.graph&&c.container.parentNode.removeChild(c.container);return a};EditorUi.prototype.getHtml=function(a,b,d,f,g,q){q=null!=q?q:!0;var c=null,e=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=b){var c=q?b.getGraphBounds():b.getBoundingBox(b.getSelectionCells()),k=b.view.scale;q=Math.floor(c.x/k-b.view.translate.x);k=Math.floor(c.y/k-b.view.translate.y);c=b.background;null==g&&
+(b=this.getBasenames().join(";"),0<b.length&&(e=EditorUi.drawHost+"/embed.js?s="+b));a.setAttribute("x0",q);a.setAttribute("y0",k)}null!=a&&(a.setAttribute("pan","1"),a.setAttribute("zoom","1"),a.setAttribute("resize","0"),a.setAttribute("fit","0"),a.setAttribute("border","20"),a.setAttribute("links","1"),null!=f&&a.setAttribute("edit",f));null!=g&&(g=g.replace(/&/g,"&amp;"));a=null!=a?Graph.zapGremlins(mxUtils.getXml(a)):"";f=Graph.compress(a);Graph.decompress(f)!=a&&(f=encodeURIComponent(a));return(null==
+g?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=g?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==g?null!=d?"<title>"+mxUtils.htmlEntities(d)+"</title>\n":"":"<title>diagrams.net</title>\n")+(null!=g?'<meta http-equiv="refresh" content="0;URL=\''+g+"'\"/>\n":"")+"</head>\n<body"+(null==g&&null!=c&&c!=mxConstants.NONE?' style="background-color:'+c+';">':">")+'\n<div class="mxgraph" style="position:relative;overflow:auto;width:100%;">\n<div style="width:1px;height:1px;overflow:hidden;">'+
+f+"</div>\n</div>\n"+(null==g?'<script type="text/javascript" src="'+e+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+g+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.getHtml2=function(a,b,d,f,g){b=window.DRAWIO_VIEWER_URL||EditorUi.drawHost+"/js/viewer-static.min.js";null!=g&&(g=g.replace(/&/g,"&amp;"));a={highlight:"#0000ff",nav:this.editor.graph.foldingEnabled,
+resize:!0,xml:Graph.zapGremlins(a),toolbar:"pages zoom layers lightbox"};null!=this.pages&&null!=this.currentPage&&(a.page=mxUtils.indexOf(this.pages,this.currentPage));return(null==g?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=g?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==g?null!=d?"<title>"+mxUtils.htmlEntities(d)+"</title>\n":"":"<title>diagrams.net</title>\n")+(null!=g?'<meta http-equiv="refresh" content="0;URL=\''+
+g+"'\"/>\n":"")+'<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(a))+'"></div>\n'+(null==g?'<script type="text/javascript" src="'+b+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+g+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.setFileData=
+function(a){a=this.validateFileData(a);this.pages=this.fileNode=this.currentPage=null;a=null!=a&&0<a.length?mxUtils.parseXml(a).documentElement:null;var c=Editor.extractParserError(a,mxResources.get("invalidOrMissingFile"));if(c)throw Error(mxResources.get("notADiagramFile")+" ("+c+")");c=null!=a?this.editor.extractGraphModel(a,!0):null;null!=c&&(a=c);if(null!=a&&"mxfile"==a.nodeName&&(c=a.getElementsByTagName("diagram"),"0"!=urlParams.pages||1<c.length||1==c.length&&c[0].hasAttribute("name"))){var b=
+null;this.fileNode=a;this.pages=[];for(var d=0;d<c.length;d++)null==c[d].getAttribute("id")&&c[d].setAttribute("id",d),a=new DiagramPage(c[d]),null==a.getName()&&a.setName(mxResources.get("pageWithNumber",[d+1])),this.pages.push(a),null!=urlParams["page-id"]&&a.getId()==urlParams["page-id"]&&(b=a);this.currentPage=null!=b?b:this.pages[Math.max(0,Math.min(this.pages.length-1,urlParams.page||0))];a=this.currentPage.node}"0"!=urlParams.pages&&null==this.fileNode&&null!=a&&(this.fileNode=a.ownerDocument.createElement("mxfile"),
+this.currentPage=new DiagramPage(a.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),this.pages=[this.currentPage]);this.editor.setGraphXml(a);null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=urlParams["layer-ids"])try{var f=urlParams["layer-ids"].split(" ");a={};for(d=0;d<f.length;d++)a[f[d]]=!0;for(var g=this.editor.graph.getModel(),m=g.getChildren(g.root),d=0;d<m.length;d++){var t=m[d];g.setVisible(t,a[t.id]||
+!1)}}catch(A){}};EditorUi.prototype.getBaseFilename=function(a){var c=this.getCurrentFile(),c=null!=c&&null!=c.getTitle()?c.getTitle():this.defaultFilename;if(/(\.xml)$/i.test(c)||/(\.html)$/i.test(c)||/(\.svg)$/i.test(c)||/(\.png)$/i.test(c))c=c.substring(0,c.lastIndexOf("."));/(\.drawio)$/i.test(c)&&(c=c.substring(0,c.lastIndexOf(".")));!a&&null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&null!=this.currentPage.node.getAttribute("name")&&0<this.currentPage.getName().length&&(c=c+"-"+
+this.currentPage.getName());return c};EditorUi.prototype.downloadFile=function(a,b,d,f,g,q,m,t,p,x,G){try{f=null!=f?f:this.editor.graph.isSelectionEmpty();var c=this.getBaseFilename(!g),e=c+("xml"==a||"pdf"==a&&G?".drawio":"")+"."+a;if("xml"==a){var k='<?xml version="1.0" encoding="UTF-8"?>\n'+this.getFileData(!0,null,null,null,f,g,null,null,null,b);this.saveData(e,a,k,"text/xml")}else if("html"==a)k=this.getHtml2(this.getFileData(!0),this.editor.graph,c),this.saveData(e,a,k,"text/html");else if("svg"!=
+a&&"xmlsvg"!=a||!this.spinner.spin(document.body,mxResources.get("export")))"xmlpng"==a?e=c+".png":"jpeg"==a&&(e=c+".jpg"),this.saveRequest(e,a,mxUtils.bind(this,function(c,b){try{var e=this.editor.graph.pageVisible;null!=q&&(this.editor.graph.pageVisible=q);var d=this.createDownloadRequest(c,a,f,b,m,g,t,p,x,G);this.editor.graph.pageVisible=e;return d}catch(v){this.handleError(v)}}));else{var l=null,n=mxUtils.bind(this,function(a){a.length<=MAX_REQUEST_SIZE?this.saveData(e,"svg",a,"image/svg+xml"):
+this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(l)}))});if("svg"==a){var u=this.editor.graph.background;if(m||u==mxConstants.NONE)u=null;var A=this.editor.graph.getSvg(u,null,null,null,null,f);d&&this.editor.graph.addSvgShadow(A);this.editor.convertImages(A,mxUtils.bind(this,mxUtils.bind(this,function(a){this.spinner.stop();n('<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n'+
+mxUtils.getXml(a))})))}else e=c+".svg",l=this.getFileData(!1,!0,null,mxUtils.bind(this,function(a){this.spinner.stop();n(a)}),f)}}catch(M){this.handleError(M)}};EditorUi.prototype.createDownloadRequest=function(a,b,d,f,g,q,m,t,p,x){var c=this.editor.graph,e=c.getGraphBounds();d=this.getFileData(!0,null,null,null,d,0==q?!1:"xmlpng"!=b,null,null,null,null,"pdf"==b);var k="",l="";if(e.width*e.height>MAX_AREA||d.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};x=x?"1":"0";"pdf"==
+b&&0==q&&(l="&allPages=1");if("xmlpng"==b&&(x="1",b="png",null!=this.pages&&null!=this.currentPage))for(q=0;q<this.pages.length;q++)if(this.pages[q]==this.currentPage){k="&from="+q;break}q=c.background;"png"!=b&&"pdf"!=b||!g?g||null!=q&&q!=mxConstants.NONE||(q="#ffffff"):q=mxConstants.NONE;g={globalVars:c.getExportVariables()};p&&(g.grid={size:c.gridSize,steps:c.view.gridSteps,color:c.view.gridColor});Graph.translateDiagram&&(g.diagramLanguage=Graph.diagramLanguage);return new mxXmlRequest(EXPORT_URL,
+"format="+b+k+l+"&bg="+(null!=q?q:mxConstants.NONE)+"&base64="+f+"&embedXml="+x+"&xml="+encodeURIComponent(d)+(null!=a?"&filename="+encodeURIComponent(a):"")+"&extras="+encodeURIComponent(JSON.stringify(g))+(null!=m?"&scale="+m:"")+(null!=t?"&border="+t:""))};EditorUi.prototype.setMode=function(a,b){this.mode=a};EditorUi.prototype.loadDescriptor=function(a,b,d){var c=window.location.hash,e=mxUtils.bind(this,function(e){var d=null!=a.data?a.data:"";null!=e&&0<e.length&&(0<d.length&&(d+="\n"),d+=e);
+e=new LocalFile(this,"csv"!=a.format&&0<d.length?d:this.emptyDiagramXml,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0);e.getHash=function(){return c};this.fileLoaded(e);"csv"==a.format&&this.importCsv(d,mxUtils.bind(this,function(a){this.editor.undoManager.clear();this.editor.setModified(!1);this.editor.setStatus("")}));if(null!=a.update){var f=null!=a.interval?parseInt(a.interval):6E4,k=null,g=mxUtils.bind(this,function(){var c=this.currentPage;mxUtils.post(a.update,
+"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,function(a){c===this.currentPage&&(200<=a.getStatus()&&300>=a.getStatus()?(this.updateDiagram(a.getText()),l()):this.handleError({message:mxResources.get("error")+" "+a.getStatus()}))}),mxUtils.bind(this,function(a){this.handleError(a)}))}),l=mxUtils.bind(this,function(){window.clearTimeout(k);k=window.setTimeout(g,f)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){l();g()}));l();g()}null!=
+b&&b()});null!=a.url&&0<a.url.length?this.editor.loadUrl(a.url,mxUtils.bind(this,function(a){e(a)}),mxUtils.bind(this,function(a){null!=d&&d(a)})):e("")};EditorUi.prototype.updateDiagram=function(a){function c(a){var c=new mxCellOverlay(a.image||f.warningImage,a.tooltip,a.align,a.valign,a.offset);c.addListener(mxEvent.CLICK,function(c,b){d.alert(a.tooltip)});return c}var b=null,d=this;if(null!=a&&0<a.length&&(b=mxUtils.parseXml(a),a=null!=b?b.documentElement:null,null!=a&&"updates"==a.nodeName)){var f=
+this.editor.graph,g=f.getModel();g.beginUpdate();var m=null;try{for(a=a.firstChild;null!=a;){if("update"==a.nodeName){var t=g.getCell(a.getAttribute("id"));if(null!=t){try{var p=a.getAttribute("value");if(null!=p){var x=mxUtils.parseXml(p).documentElement;if(null!=x)if("1"==x.getAttribute("replace-value"))g.setValue(t,x);else for(var G=x.attributes,z=0;z<G.length;z++)f.setAttributeForCell(t,G[z].nodeName,0<G[z].nodeValue.length?G[z].nodeValue:null)}}catch(U){null!=window.console&&console.log("Error in value for "+
+t.id+": "+U)}try{var E=a.getAttribute("style");null!=E&&f.model.setStyle(t,E)}catch(U){null!=window.console&&console.log("Error in style for "+t.id+": "+U)}try{var H=a.getAttribute("icon");if(null!=H){var K=0<H.length?JSON.parse(H):null;null!=K&&K.append||f.removeCellOverlays(t);null!=K&&f.addCellOverlay(t,c(K))}}catch(U){null!=window.console&&console.log("Error in icon for "+t.id+": "+U)}try{var F=a.getAttribute("geometry");if(null!=F){var F=JSON.parse(F),I=f.getCellGeometry(t);if(null!=I){I=I.clone();
+for(key in F){var D=parseFloat(F[key]);"dx"==key?I.x+=D:"dy"==key?I.y+=D:"dw"==key?I.width+=D:"dh"==key?I.height+=D:I[key]=parseFloat(F[key])}f.model.setGeometry(t,I)}}}catch(U){null!=window.console&&console.log("Error in icon for "+t.id+": "+U)}}}else if("model"==a.nodeName){for(var M=a.firstChild;null!=M&&M.nodeType!=mxConstants.NODETYPE_ELEMENT;)M=M.nextSibling;null!=M&&(new mxCodec(a.firstChild)).decode(M,g)}else if("view"==a.nodeName){if(a.hasAttribute("scale")&&(f.view.scale=parseFloat(a.getAttribute("scale"))),
+a.hasAttribute("dx")||a.hasAttribute("dy"))f.view.translate=new mxPoint(parseFloat(a.getAttribute("dx")||0),parseFloat(a.getAttribute("dy")||0))}else"fit"==a.nodeName&&(m=a.hasAttribute("max-scale")?parseFloat(a.getAttribute("max-scale")):1);a=a.nextSibling}}finally{g.endUpdate()}null!=m&&this.chromelessResize&&this.chromelessResize(!0,m)}return b};EditorUi.prototype.getCopyFilename=function(a,b){var c=null!=a&&null!=a.getTitle()?a.getTitle():this.defaultFilename,e="",d=c.lastIndexOf(".");0<=d&&(e=
+c.substring(d),c=c.substring(0,d));if(b)var f=new Date,d=f.getFullYear(),g=f.getMonth()+1,m=f.getDate(),p=f.getHours(),x=f.getMinutes(),f=f.getSeconds(),c=c+(" "+(d+"-"+g+"-"+m+"-"+p+"-"+x+"-"+f));return c=mxResources.get("copyOf",[c])+e};EditorUi.prototype.fileLoaded=function(a,b){var c=this.getCurrentFile();this.fileEditable=this.fileLoadedError=null;this.setCurrentFile(null);var e=!1;this.hideDialog();null!=c&&(EditorUi.debug("File.closed",[c]),c.removeListener(this.descriptorChangedListener),
+c.close());this.editor.graph.model.clear();this.editor.undoManager.clear();var d=mxUtils.bind(this,function(){this.setGraphEnabled(!1);this.setCurrentFile(null);null!=c&&this.updateDocumentTitle();this.editor.graph.model.clear();this.editor.undoManager.clear();this.setBackgroundImage(null);!b&&null!=window.location.hash&&0<window.location.hash.length&&(window.location.hash="");null!=this.fname&&(this.fnameWrapper.style.display="none",this.fname.innerHTML="",this.fname.setAttribute("title",mxResources.get("rename")));
+this.editor.setStatus("");this.updateUi();b||this.showSplash()});if(null!=a)try{mxClient.IS_SF&&"min"==uiTheme&&(this.diagramContainer.style.visibility="");this.openingFile=!0;this.setCurrentFile(a);a.addListener("descriptorChanged",this.descriptorChangedListener);a.addListener("contentChanged",this.descriptorChangedListener);a.open();delete this.openingFile;this.setGraphEnabled(!0);this.setMode(a.getMode());this.editor.graph.model.prefix=Editor.guid()+"-";this.editor.undoManager.clear();this.descriptorChanged();
+this.updateUi();a.isEditable()?a.isModified()?(a.addUnsavedStatus(),null!=a.backupPatch&&a.patch([a.backupPatch])):this.editor.setStatus(""):this.editor.setStatus('<span class="geStatusAlert" style="margin-left:8px;">'+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"));e=!0;this.isOffline()||null==a.getMode()||EditorUi.logEvent({category:a.getMode().toUpperCase()+"-OPEN-FILE-"+a.getHash(),action:"size_"+a.getSize(),label:"autosave_"+(this.editor.autosave?"on":"off")});EditorUi.debug("File.opened",[a]);if(this.editor.editable&&this.mode==a.getMode()&&a.getMode()!=App.MODE_DEVICE&&null!=a.getMode())try{this.addRecent({id:a.getHash(),title:a.getTitle(),
+mode:a.getMode()})}catch(u){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+1),mxSettings.save()}catch(u){}}catch(u){this.fileLoadedError=u;if(EditorUi.enableLogging&&!this.isOffline())try{EditorUi.logEvent({category:"ERROR-LOAD-FILE-"+(null!=a?a.getHash():"none"),action:"message_"+u.message,label:"stack_"+u.stack})}catch(t){}var f=mxUtils.bind(this,function(){null!=urlParams.url&&this.spinner.spin(document.body,mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):
+null!=c?this.fileLoaded(c):d()});b?f():this.handleError(u,mxResources.get("errorLoadingFile"),f,!0,null,null,!0)}else d();return e};EditorUi.prototype.getHashValueForPages=function(a,b){var c=0,d=new mxGraphModel,e=new mxCodec;null!=b&&(b.byteCount=0,b.attrCount=0,b.eltCount=0,b.nodeCount=0);for(var f=0;f<a.length;f++){this.updatePageRoot(a[f]);var g=a[f].node.cloneNode(!1);g.removeAttribute("name");d.root=a[f].root;var m=e.encode(d);this.editor.graph.saveViewState(a[f].viewState,m,!0);m.removeAttribute("pageWidth");
+m.removeAttribute("pageHeight");g.appendChild(m);null!=b&&(b.eltCount+=g.getElementsByTagName("*").length,b.nodeCount+=g.getElementsByTagName("mxCell").length);c=(c<<5)-c+this.hashValue(g,function(a,c,b,d){return!d||"mxGeometry"!=a.nodeName&&"mxPoint"!=a.nodeName||"x"!=c&&"y"!=c&&"width"!=c&&"height"!=c?d&&"mxCell"==a.nodeName&&"previous"==c?null:b:Math.round(b)},b)<<0}return c};EditorUi.prototype.hashValue=function(a,b,d){var c=0;if(null!=a&&"object"===typeof a&&"number"===typeof a.nodeType&&"string"===
+typeof a.nodeName&&"function"===typeof a.getAttribute){null!=a.nodeName&&(c^=this.hashValue(a.nodeName,b,d));if(null!=a.attributes){null!=d&&(d.attrCount+=a.attributes.length);for(var e=0;e<a.attributes.length;e++){var f=a.attributes[e].name,k=null!=b?b(a,f,a.attributes[e].value,!0):a.attributes[e].value;null!=k&&(c^=this.hashValue(f,b,d)+this.hashValue(k,b,d))}}if(null!=a.childNodes)for(e=0;e<a.childNodes.length;e++)c=(c<<5)-c+this.hashValue(a.childNodes[e],b,d)<<0}else if(null!=a&&"function"!==
+typeof a){a=String(a);b=0;null!=d&&(d.byteCount+=a.length);for(e=0;e<a.length;e++)b=(b<<5)-b+a.charCodeAt(e)<<0;c^=b}return c};EditorUi.prototype.descriptorChanged=function(){};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(a,b,d,f,g,q,m){};EditorUi.prototype.isScratchpadEnabled=function(){return isLocalStorage||mxClient.IS_CHROMEAPP};EditorUi.prototype.toggleScratchpad=function(){this.isScratchpadEnabled()&&(null==this.scratchpad?StorageFile.getFileContent(this,
+".scratchpad",mxUtils.bind(this,function(a){null==a&&(a=this.emptyLibraryXml);this.loadLibrary(new StorageLibrary(this,a,".scratchpad"))})):this.closeLibrary(this.scratchpad))};EditorUi.prototype.createLibraryDataFromImages=function(a){var c=mxUtils.createXmlDocument(),b=c.createElement("mxlibrary");mxUtils.setTextContent(b,JSON.stringify(a));c.appendChild(b);return mxUtils.getXml(c)};EditorUi.prototype.closeLibrary=function(a){null!=a&&(this.removeLibrarySidebar(a.getHash()),a.constructor!=LocalLibrary&&
+mxSettings.removeCustomLibrary(a.getHash()),".scratchpad"==a.title&&(this.scratchpad=null))};EditorUi.prototype.removeLibrarySidebar=function(a){var c=this.sidebar.palettes[a];if(null!=c){for(var b=0;b<c.length;b++)c[b].parentNode.removeChild(c[b]);delete this.sidebar.palettes[a]}};EditorUi.prototype.repositionLibrary=function(a){var c=this.sidebar.container;if(null==a){var b=this.sidebar.palettes["L.scratchpad"];null==b&&(b=this.sidebar.palettes.search);null!=b&&(a=b[b.length-1].nextSibling)}a=null!=
+a?a:c.firstChild.nextSibling.nextSibling;var b=c.lastChild,d=b.previousSibling;c.insertBefore(b,a);c.insertBefore(d,b)};EditorUi.prototype.loadLibrary=function(a,b){var c=mxUtils.parseXml(a.getData());if("mxlibrary"==c.documentElement.nodeName){var d=JSON.parse(mxUtils.getTextContent(c.documentElement));this.libraryLoaded(a,d,c.documentElement.getAttribute("title"),b)}else throw{message:mxResources.get("notALibraryFile")};};EditorUi.prototype.getLibraryStorageHint=function(a){return""};EditorUi.prototype.libraryLoaded=
+function(a,b,d,f){if(null!=this.sidebar){a.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(a.getHash());".scratchpad"==a.title&&(this.scratchpad=a);var c=this.sidebar.palettes[a.getHash()],c=null!=c?c[c.length-1].nextSibling:null;this.removeLibrarySidebar(a.getHash());var e=null,k=mxUtils.bind(this,function(c,b){0==c.length&&a.isEditable()?(null==e&&(e=document.createElement("div"),e.className="geDropTarget",mxUtils.write(e,mxResources.get("dragElementsHere"))),b.appendChild(e)):this.addLibraryEntries(c,
+b)});null!=this.sidebar&&null!=b&&this.sidebar.addEntries(b);d=null!=d&&0<d.length?d:a.getTitle();var g=this.sidebar.addPalette(a.getHash(),d,null!=f?f:!0,mxUtils.bind(this,function(a){k(b,a)}));this.repositionLibrary(c);var n=g.parentNode.previousSibling;f=n.getAttribute("title");null!=f&&0<f.length&&".scratchpad"!=a.title&&n.setAttribute("title",this.getLibraryStorageHint(a)+"\n"+f);var m=document.createElement("div");m.style.position="absolute";m.style.right="0px";m.style.top="0px";m.style.padding=
+"8px";m.style.backgroundColor="inherit";n.style.position="relative";var p=document.createElement("img");p.setAttribute("src",Dialog.prototype.closeImage);p.setAttribute("title",mxResources.get("close"));p.setAttribute("valign","absmiddle");p.setAttribute("border","0");p.style.cursor="pointer";p.style.margin="0 3px";var z=null;if(".scratchpad"!=a.title||this.closableScratchpad)m.appendChild(p),mxEvent.addListener(p,"click",mxUtils.bind(this,function(c){if(!mxEvent.isConsumed(c)){var b=mxUtils.bind(this,
+function(){this.closeLibrary(a)});null!=z?this.confirm(mxResources.get("allChangesLost"),null,b,mxResources.get("cancel"),mxResources.get("discardChanges")):b();mxEvent.consume(c)}}));if(a.isEditable()){var E=this.editor.graph,H=null,K=mxUtils.bind(this,function(c){this.showLibraryDialog(a.getTitle(),g,b,a,a.getMode());mxEvent.consume(c)}),F=mxUtils.bind(this,function(c){a.setModified(!0);a.isAutosave()?(null!=H&&null!=H.parentNode&&H.parentNode.removeChild(H),H=p.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",m.insertBefore(H,m.firstChild),n.style.paddingRight=18*m.childNodes.length+"px",this.saveLibrary(a.getTitle(),b,a,a.getMode(),!0,!0,function(){null!=H&&null!=H.parentNode&&(H.parentNode.removeChild(H),n.style.paddingRight=18*m.childNodes.length+"px")})):null==z&&(z=p.cloneNode(!1),z.setAttribute("src",IMAGE_PATH+"/download.png"),z.setAttribute("title",mxResources.get("save")),
+m.insertBefore(z,m.firstChild),mxEvent.addListener(z,"click",mxUtils.bind(this,function(c){this.saveLibrary(a.getTitle(),b,a,a.getMode(),a.constructor==LocalLibrary,!0,function(){null==z||a.isModified()||(n.style.paddingRight=18*m.childNodes.length+"px",z.parentNode.removeChild(z),z=null)});mxEvent.consume(c)})),n.style.paddingRight=18*m.childNodes.length+"px")}),I=mxUtils.bind(this,function(a,c,d,f){a=E.cloneCells(mxUtils.sortCells(E.model.getTopmostCells(a)));for(var k=0;k<a.length;k++){var l=E.getCellGeometry(a[k]);
+null!=l&&l.translate(-c.x,-c.y)}g.appendChild(this.sidebar.createVertexTemplateFromCells(a,c.width,c.height,f||"",!0,!1,!1));a={xml:Graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(a))),w:c.width,h:c.height};null!=f&&(a.title=f);b.push(a);F(d);null!=e&&null!=e.parentNode&&0<b.length&&(e.parentNode.removeChild(e),e=null)}),D=mxUtils.bind(this,function(a){if(E.isSelectionEmpty())E.getRubberband().isActive()?(E.getRubberband().execute(a),E.getRubberband().reset()):this.showError(mxResources.get("error"),
+mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var c=E.getSelectionCells(),b=E.view.getBounds(c),d=E.view.scale;b.x/=d;b.y/=d;b.width/=d;b.height/=d;b.x-=E.view.translate.x;b.y-=E.view.translate.y;I(c,b)}mxEvent.consume(a)});mxEvent.addGestureListeners(g,function(){},mxUtils.bind(this,function(a){E.isMouseDown&&null!=E.panningManager&&null!=E.graphHandler.first&&(E.graphHandler.suspend(),null!=E.graphHandler.hint&&(E.graphHandler.hint.style.visibility="hidden"),g.style.backgroundColor=
+"#f1f3f4",g.style.cursor="copy",E.panningManager.stop(),E.autoScroll=!1,mxEvent.consume(a))}),mxUtils.bind(this,function(a){E.isMouseDown&&null!=E.panningManager&&null!=E.graphHandler&&(g.style.backgroundColor="",g.style.cursor="default",this.sidebar.showTooltips=!0,E.panningManager.stop(),E.graphHandler.reset(),E.isMouseDown=!1,E.autoScroll=!0,D(a),mxEvent.consume(a))}));mxEvent.addListener(g,"mouseleave",mxUtils.bind(this,function(a){E.isMouseDown&&null!=E.graphHandler.first&&(E.graphHandler.resume(),
+null!=E.graphHandler.hint&&(E.graphHandler.hint.style.visibility="visible"),g.style.backgroundColor="",g.style.cursor="",E.autoScroll=!0)}));Graph.fileSupport&&(mxEvent.addListener(g,"dragover",mxUtils.bind(this,function(a){g.style.backgroundColor="#f1f3f4";a.dataTransfer.dropEffect="copy";g.style.cursor="copy";this.sidebar.hideTooltip();a.stopPropagation();a.preventDefault()})),mxEvent.addListener(g,"drop",mxUtils.bind(this,function(a){g.style.cursor="";g.style.backgroundColor="";0<a.dataTransfer.files.length&&
+this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(c,d,f,l,n,q,m,u,t){if(null!=c&&"image/"==d.substring(0,6))c="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image="+this.convertDataUri(c),c=[new mxCell("",new mxGeometry(0,0,n,q),c)],c[0].vertex=!0,I(c,new mxRectangle(0,0,n,q),a,mxEvent.isAltDown(a)?null:m.substring(0,m.lastIndexOf(".")).replace(/_/g," ")),null!=e&&null!=e.parentNode&&0<b.length&&(e.parentNode.removeChild(e),
+e=null);else{var p=!1,x=mxUtils.bind(this,function(c,d){if(null!=c&&"application/pdf"==d){var f=Editor.extractGraphModelFromPdf(c);null!=f&&0<f.length&&(c=f)}if(null!=c)if(f=mxUtils.parseXml(c),"mxlibrary"==f.documentElement.nodeName)try{var l=JSON.parse(mxUtils.getTextContent(f.documentElement));k(l,g);b=b.concat(l);F(a);this.spinner.stop();p=!0}catch(T){}else if("mxfile"==f.documentElement.nodeName)try{for(var n=f.documentElement.getElementsByTagName("diagram"),l=0;l<n.length;l++){var q=this.stringToCells(Editor.getDiagramNodeXml(n[l])),
+m=this.editor.graph.getBoundingBoxFromGeometry(q);I(q,new mxRectangle(0,0,m.width,m.height),a)}p=!0}catch(T){null!=window.console&&console.log("error in drop handler:",T)}p||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));null!=e&&null!=e.parentNode&&0<b.length&&(e.parentNode.removeChild(e),e=null)});null!=t&&null!=m&&(/(\.v(dx|sdx?))($|\?)/i.test(m)||/(\.vs(x|sx?))($|\?)/i.test(m))?this.importVisio(t,function(a){x(a,"text/xml")},null,m):!this.isOffline()&&(new XMLHttpRequest).upload&&
+this.isRemoteFileFormat(c,m)&&null!=t?this.parseFile(t,mxUtils.bind(this,function(a){4==a.readyState&&(this.spinner.stop(),200<=a.status&&299>=a.status?x(a.responseText,"text/xml"):this.handleError({message:mxResources.get(413==a.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):x(c,d)}}));a.stopPropagation();a.preventDefault()})),mxEvent.addListener(g,"dragleave",function(a){g.style.cursor="";g.style.backgroundColor="";a.stopPropagation();a.preventDefault()}));
+p=p.cloneNode(!1);p.setAttribute("src",Editor.editImage);p.setAttribute("title",mxResources.get("edit"));m.insertBefore(p,m.firstChild);mxEvent.addListener(p,"click",K);mxEvent.addListener(g,"dblclick",function(a){mxEvent.getSource(a)==g&&K(a)});f=p.cloneNode(!1);f.setAttribute("src",Editor.plusImage);f.setAttribute("title",mxResources.get("add"));m.insertBefore(f,m.firstChild);mxEvent.addListener(f,"click",D);this.isOffline()||".scratchpad"!=a.title||null==EditorUi.scratchpadHelpLink||(f=document.createElement("span"),
+f.setAttribute("title",mxResources.get("help")),f.style.cssText="color:#a3a3a3;text-decoration:none;margin-right:2px;",mxUtils.write(f,"?"),mxEvent.addGestureListeners(f,mxUtils.bind(this,function(a){this.openLink(EditorUi.scratchpadHelpLink);mxEvent.consume(a)})),m.insertBefore(f,m.firstChild))}n.appendChild(m);n.style.paddingRight=18*m.childNodes.length+"px"}};EditorUi.prototype.addLibraryEntries=function(a,b){for(var c=0;c<a.length;c++){var d=a[c],e=d.data;if(null!=e){var e=this.convertDataUri(e),
+f="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==d.aspect&&(f+="aspect=fixed;");b.appendChild(this.sidebar.createVertexTemplate(f+"image="+e,d.w,d.h,"",d.title||"",!1,!1,!0))}else null!=d.xml&&(e=this.stringToCells(Graph.decompress(d.xml)),0<e.length&&b.appendChild(this.sidebar.createVertexTemplateFromCells(e,d.w,d.h,d.title||"",!0,!1,!0)))}};EditorUi.prototype.getResource=function(a){return null!=a?a[mxLanguage]||a.main:null};EditorUi.prototype.footerHeight=
+0;"1"==urlParams.savesidebar&&(Sidebar.prototype.thumbWidth=64,Sidebar.prototype.thumbHeight=64);EditorUi.initTheme=function(){"atlas"==uiTheme?(mxClient.link("stylesheet",STYLE_PATH+"/atlas.css"),"undefined"!==typeof Toolbar&&(Toolbar.prototype.unselectedBackground="linear-gradient(rgb(255, 255, 255) 0px, rgb(242, 242, 242) 100%)",Toolbar.prototype.selectedBackground="rgb(242, 242, 242)"),Editor.prototype.initialTopSpacing=3,EditorUi.prototype.menubarHeight=41,EditorUi.prototype.toolbarHeight=38):
+Editor.isDarkMode()&&(mxClient.link("stylesheet",STYLE_PATH+"/dark.css"),Dialog.backdropColor="#2a2a2a",Format.inactiveTabBackgroundColor="black",Graph.prototype.defaultThemeName="darkTheme",Graph.prototype.defaultPageBackgroundColor="#2a2a2a",Graph.prototype.defaultPageBorderColor="#505759",BaseFormatPanel.prototype.buttonBackgroundColor="#2a2a2a",mxGraphHandler.prototype.previewColor="#cccccc",StyleFormatPanel.prototype.defaultStrokeColor="#cccccc",mxConstants.DROP_TARGET_COLOR="#00ff00");Editor.sketchFontFamily=
+"Architects Daughter";Editor.sketchFontSource="https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter";"1"==urlParams.sketch&&(Graph.prototype.defaultVertexStyle={pointerEvents:"0",hachureGap:"4"},Graph.prototype.defaultEdgeStyle={edgeStyle:"none",rounded:"0",curved:"1",jettySize:"auto",orthogonalLoop:"1",endArrow:"open",startSize:"14",endSize:"14",sourcePerimeterSpacing:"8",targetPerimeterSpacing:"8"},"0"!=urlParams.rough&&(Graph.prototype.defaultVertexStyle.fontFamily=Editor.sketchFontFamily,
+Graph.prototype.defaultVertexStyle.fontSource=Editor.sketchFontSource,Graph.prototype.defaultVertexStyle.fontSize="20",Graph.prototype.defaultVertexStyle.sketch="1",Graph.prototype.defaultEdgeStyle.fontFamily=Editor.sketchFontFamily,Graph.prototype.defaultEdgeStyle.fontSource=Editor.sketchFontSource,Graph.prototype.defaultEdgeStyle.fontSize="20",Graph.prototype.defaultEdgeStyle.sketch="1",Menus.prototype.defaultFonts=[{fontFamily:Editor.sketchFontFamily,fontUrl:decodeURIComponent(Editor.sketchFontSource)},
+{fontFamily:"Rock Salt",fontUrl:"https://fonts.googleapis.com/css?family=Rock+Salt"},{fontFamily:"Permanent Marker",fontUrl:"https://fonts.googleapis.com/css?family=Permanent+Marker"}].concat(Menus.prototype.defaultFonts)),Editor.configurationKey=".sketch-configuration",Editor.settingsKey=".sketch-config",Graph.prototype.defaultGridEnabled=!1,Graph.prototype.defaultPageVisible=!1,Graph.prototype.defaultEdgeLength=120,Editor.fitWindowBorders=new mxRectangle(60,30,30,30))};EditorUi.initTheme();EditorUi.prototype.showImageDialog=
+function(a,b,d,f,g){a=new ImageDialog(this,a,b,d,f,g);this.showDialog(a.container,Graph.fileSupport?480:360,Graph.fileSupport?200:90,!0,!0);a.init()};EditorUi.prototype.showBackgroundImageDialog=function(a,b){a=null!=a?a:mxUtils.bind(this,function(a,c){if(!c){var b=new ChangePageSetup(this,null,a);b.ignoreColor=!0;this.editor.graph.model.execute(b)}});var c=new BackgroundImageDialog(this,a,b);this.showDialog(c.container,360,200,!0,!0);c.init()};EditorUi.prototype.showLibraryDialog=function(a,b,d,
+f,g){a=new LibraryDialog(this,a,b,d,f,g);this.showDialog(a.container,640,440,!0,!1,mxUtils.bind(this,function(a){a&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()}));a.init()};var d=EditorUi.prototype.createFormat;EditorUi.prototype.createFormat=function(a){var c=d.apply(this,arguments);this.editor.graph.addListener("viewStateChanged",mxUtils.bind(this,function(a){this.editor.graph.isSelectionEmpty()&&c.refresh()}));return c};EditorUi.prototype.createSidebarFooterContainer=function(){var a=
+this.createDiv("geSidebarContainer geSidebarFooter");a.style.position="absolute";a.style.overflow="hidden";var b=document.createElement("a");b.className="geTitle";b.style.color="#DF6C0C";b.style.fontWeight="bold";b.style.height="100%";b.style.paddingTop="9px";b.innerHTML='<span style="font-size:18px;margin-right:5px;">+</span>';mxUtils.write(b,mxResources.get("moreShapes")+"...");mxEvent.addListener(b,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(a){a.preventDefault()}));
+mxEvent.addListener(b,"click",mxUtils.bind(this,function(a){this.actions.get("shapes").funct();mxEvent.consume(a)}));a.appendChild(b);return a};EditorUi.prototype.handleError=function(a,b,d,f,g,m,u){var c=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},e=null!=a&&null!=a.error?a.error:a;if(null!=a&&null!=a.stack&&null!=a.message)try{u?null!=window.console&&console.error("EditorUi.handleError:",a):EditorUi.logError("Caught: "+(""==a.message&&null!=a.name)?a.name:a.message,
+a.filename,a.lineNumber,a.columnNumber,a,"INFO")}catch(H){}if(null!=e||null!=b){u=mxUtils.htmlEntities(mxResources.get("unknownError"));var k=mxResources.get("ok"),l=null;b=null!=b?b:mxResources.get("error");if(null!=e){null!=e.retry&&(k=mxResources.get("cancel"),l=function(){c();e.retry()});if(404==e.code||404==e.status||403==e.code){u=403==e.code?null!=e.message?mxUtils.htmlEntities(e.message):mxUtils.htmlEntities(mxResources.get("accessDenied")):null!=g?g:mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied")+
+(null!=this.drive&&null!=this.drive.user?" ("+this.drive.user.displayName+", "+this.drive.user.email+")":""));var n=null!=g?null:null!=m?m:window.location.hash;if(null!=n&&("#G"==n.substring(0,2)||"#Uhttps%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D"==n.substring(0,45))&&(null!=a&&null!=a.error&&(null!=a.error.errors&&0<a.error.errors.length&&"fileAccess"==a.error.errors[0].reason||null!=a.error.data&&0<a.error.data.length&&"fileAccess"==a.error.data[0].reason)||404==e.code||404==e.status)){n="#U"==n.substring(0,
+2)?n.substring(45,n.lastIndexOf("%26ex")):n.substring(2);this.showError(b,u,mxResources.get("openInNewWindow"),mxUtils.bind(this,function(){this.editor.graph.openLink("https://drive.google.com/open?id="+n);this.handleError(a,b,d,f,g)}),l,mxResources.get("changeUser"),mxUtils.bind(this,function(){function a(){e.innerHTML="";for(var a=0;a<c.length;a++){var b=document.createElement("option");mxUtils.write(b,c[a].displayName);b.value=a;e.appendChild(b);b=document.createElement("option");b.innerHTML="&nbsp;&nbsp;&nbsp;";
+mxUtils.write(b,"<"+c[a].email+">");b.setAttribute("disabled","disabled");e.appendChild(b)}b=document.createElement("option");mxUtils.write(b,mxResources.get("addAccount"));b.value=c.length;e.appendChild(b)}var c=this.drive.getUsersList(),b=document.createElement("div"),d=document.createElement("span");d.style.marginTop="6px";mxUtils.write(d,mxResources.get("changeUser")+": ");b.appendChild(d);var e=document.createElement("select");e.style.width="200px";a();mxEvent.addListener(e,"change",mxUtils.bind(this,
+function(){var b=e.value,d=c.length!=b;d&&this.drive.setUser(c[b]);this.drive.authorize(d,mxUtils.bind(this,function(){d||(c=this.drive.getUsersList(),a())}),mxUtils.bind(this,function(a){this.handleError(a)}),!0)}));b.appendChild(e);b=new CustomDialog(this,b,mxUtils.bind(this,function(){this.loadFile(window.location.hash.substr(1),!0)}));this.showDialog(b.container,300,75,!0,!0)}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.hideDialog();null!=d&&d()}),480,150);return}}null!=e.message?
+u=""==e.message&&null!=e.name?mxUtils.htmlEntities(e.name):mxUtils.htmlEntities(e.message):null!=e.response&&null!=e.response.error?u=mxUtils.htmlEntities(e.response.error):"undefined"!==typeof window.App&&(e.code==App.ERROR_TIMEOUT?u=mxUtils.htmlEntities(mxResources.get("timeout")):e.code==App.ERROR_BUSY?u=mxUtils.htmlEntities(mxResources.get("busy")):"string"===typeof e&&0<e.length&&(u=mxUtils.htmlEntities(e)))}var q=m=null;null!=e&&null!=e.helpLink&&(m=mxResources.get("help"),q=mxUtils.bind(this,
+function(){return this.editor.graph.openLink(e.helpLink)}));this.showError(b,u,k,d,l,null,null,m,q,null,null,null,f?d:null)}else null!=d&&d()};EditorUi.prototype.alert=function(a,b,d){a=new ErrorDialog(this,null,a,mxResources.get("ok"),b);this.showDialog(a.container,d||340,100,!0,!1);a.init()};EditorUi.prototype.confirm=function(a,b,d,f,g,m){var c=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},e=Math.min(200,28*Math.ceil(a.length/50));a=new ConfirmDialog(this,a,function(){c();
+null!=b&&b()},function(){c();null!=d&&d()},f,g,null,null,null,null,e);this.showDialog(a.container,340,46+e,!0,m);a.init()};EditorUi.prototype.showBanner=function(a,b,d,f){var c=!1;if(!(this.bannerShowing||this["hideBanner"+a]||isLocalStorage&&null!=mxSettings.settings&&null!=mxSettings.settings["close"+a])){var e=document.createElement("div");e.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(e.style,"box-shadow","1px 1px 2px 0px #ddd");mxUtils.setPrefixedStyle(e.style,"transform","translate(-50%,120%)");mxUtils.setPrefixedStyle(e.style,"transition","all 1s ease");e.className="geBtn gePrimaryBtn";c=document.createElement("img");c.setAttribute("src",IMAGE_PATH+"/logo.png");c.setAttribute("border","0");c.setAttribute("align","absmiddle");c.style.cssText="margin-top:-4px;margin-left:8px;margin-right:12px;width:26px;height:26px;";e.appendChild(c);
+c=document.createElement("img");c.setAttribute("src",Dialog.prototype.closeImage);c.setAttribute("title",mxResources.get(f?"doNotShowAgain":"close"));c.setAttribute("border","0");c.style.cssText="position:absolute;right:10px;top:12px;filter:invert(1);padding:6px;margin:-6px;cursor:default;";e.appendChild(c);mxUtils.write(e,b);document.body.appendChild(e);this.bannerShowing=!0;b=document.createElement("div");b.style.cssText="font-size:11px;text-align:center;font-weight:normal;";var k=document.createElement("input");
+k.setAttribute("type","checkbox");k.setAttribute("id","geDoNotShowAgainCheckbox");k.style.marginRight="6px";if(!f){b.appendChild(k);var g=document.createElement("label");g.setAttribute("for","geDoNotShowAgainCheckbox");mxUtils.write(g,mxResources.get("doNotShowAgain"));b.appendChild(g);e.style.paddingBottom="30px";e.appendChild(b)}var n=mxUtils.bind(this,function(){null!=e.parentNode&&(e.parentNode.removeChild(e),this.bannerShowing=!1,k.checked||f)&&(this["hideBanner"+a]=!0,isLocalStorage&&null!=
+mxSettings.settings&&(mxSettings.settings["close"+a]=Date.now(),mxSettings.save()))});mxEvent.addListener(c,"click",mxUtils.bind(this,function(a){mxEvent.consume(a);n()}));var m=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(e.style,"transform","translate(-50%,120%)");window.setTimeout(mxUtils.bind(this,function(){n()}),1E3)});mxEvent.addListener(e,"click",mxUtils.bind(this,function(a){var c=mxEvent.getSource(a);c!=k&&c!=g?(null!=d&&d(),n(),mxEvent.consume(a)):m()}));window.setTimeout(mxUtils.bind(this,
+function(){mxUtils.setPrefixedStyle(e.style,"transform","translate(-50%,0%)")}),500);window.setTimeout(m,3E4);c=!0}return c};EditorUi.prototype.setCurrentFile=function(a){null!=a&&(a.opened=new Date);this.currentFile=a};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};EditorUi.prototype.isExportToCanvas=function(){return this.editor.isExportToCanvas()};EditorUi.prototype.createImageDataUri=function(a,b,d,f){a=a.toDataURL("image/"+d);if(null!=a&&6<a.length)null!=b&&(a=Editor.writeGraphModelToPng(a,
+"tEXt","mxfile",encodeURIComponent(b))),0<f&&(a=Editor.writeGraphModelToPng(a,"pHYs","dpi",f));else throw{message:mxResources.get("unknownError")};return a};EditorUi.prototype.saveCanvas=function(a,b,d,f,g){var c="jpeg"==d?"jpg":d;f=this.getBaseFilename(f)+(null!=b?".drawio":"")+"."+c;a=this.createImageDataUri(a,b,d,g);this.saveData(f,c,a.substring(a.lastIndexOf(",")+1),"image/"+d,!0)};EditorUi.prototype.isLocalFileSave=function(){return"remote"!=urlParams.save&&(mxClient.IS_IE||"undefined"!==typeof window.Blob&&
+"undefined"!==typeof window.URL)&&9!=document.documentMode&&8!=document.documentMode&&7!=document.documentMode||this.isOfflineApp()||mxClient.IS_IOS};EditorUi.prototype.showTextDialog=function(a,b){var c=new TextareaDialog(this,a,b,null,null,mxResources.get("close"));c.textarea.style.width="600px";c.textarea.style.height="380px";this.showDialog(c.container,620,460,!0,!0,null,null,null,null,!0);c.init();document.execCommand("selectall",!1,null)};EditorUi.prototype.doSaveLocalFile=function(a,b,d,f,
+g,m){"text/xml"!=d||/(\.drawio)$/i.test(b)||/(\.xml)$/i.test(b)||/(\.svg)$/i.test(b)||/(\.html)$/i.test(b)||(b=b+"."+(null!=m?m:"drawio"));if(window.Blob&&navigator.msSaveOrOpenBlob)a=f?this.base64ToBlob(a,d):new Blob([a],{type:d}),navigator.msSaveOrOpenBlob(a,b);else if(mxClient.IS_IE)d=window.open("about:blank","_blank"),null==d?mxUtils.popup(a,!0):(d.document.write(a),d.document.close(),d.document.execCommand("SaveAs",!0,b),d.close());else if(mxClient.IS_IOS&&this.isOffline())navigator.standalone||
+null==d||"image/"!=d.substring(0,6)?this.showTextDialog(b+":",a):this.openInNewWindow(a,d,f);else{var c=document.createElement("a");m=(null==navigator.userAgent||0>navigator.userAgent.indexOf("PaleMoon/"))&&"undefined"!==typeof c.download;if(mxClient.IS_GC&&null!=navigator.userAgent){var e=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);m=65==(e?parseInt(e[2],10):!1)?!1:m}if(m||this.isOffline()){c.href=URL.createObjectURL(f?this.base64ToBlob(a,d):new Blob([a],{type:d}));m?c.download=b:c.setAttribute("target",
+"_blank");document.body.appendChild(c);try{window.setTimeout(function(){URL.revokeObjectURL(c.href)},2E4),c.click(),c.parentNode.removeChild(c)}catch(A){}}else this.createEchoRequest(a,b,d,f,g).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(a,b,d,f,g,m){a="xml="+encodeURIComponent(a);return new mxXmlRequest(SAVE_URL,a+(null!=d?"&mime="+d:"")+(null!=g?"&format="+g:"")+(null!=m?"&base64="+m:"")+(null!=b?"&filename="+encodeURIComponent(b):"")+(f?"&binary=1":""))};EditorUi.prototype.base64ToBlob=
+function(a,b){b=b||"";for(var c=atob(a),d=c.length,e=Math.ceil(d/1024),f=Array(e),g=0;g<e;++g){for(var m=1024*g,p=Math.min(m+1024,d),x=Array(p-m),G=0;m<p;++G,++m)x[G]=c[m].charCodeAt(0);f[g]=new Uint8Array(x)}return new Blob(f,{type:b})};EditorUi.prototype.saveLocalFile=function(a,b,d,f,g,m,u,t){m=null!=m?m:!1;u=null!=u?u:"vsdx"!=g&&(!mxClient.IS_IOS||!navigator.standalone);g=this.getServiceCount(m);isLocalStorage&&g++;var c=4>=g?2:6<g?4:3;b=new CreateDialog(this,b,mxUtils.bind(this,function(c,b){try{if("_blank"==
+b)if(null!=d&&"image/"==d.substring(0,6))this.openInNewWindow(a,d,f);else if(null!=d&&"text/html"==d.substring(0,9)){var e=new EmbedDialog(this,a);this.showDialog(e.container,440,240,!0,!0);e.init()}else{var k=window.open("about:blank");null==k?mxUtils.popup(a,!0):(k.document.write("<pre>"+mxUtils.htmlEntities(a,!1)+"</pre>"),k.document.close())}else b==App.MODE_DEVICE||"download"==b?this.doSaveLocalFile(a,c,d,f,null,t):null!=c&&0<c.length&&this.pickFolder(b,mxUtils.bind(this,function(e){try{this.exportFile(a,
+c,d,f,b,e)}catch(K){this.handleError(K)}}))}catch(H){this.handleError(H)}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,m,u,null,1<g,c,a,d,f);m=this.isServices(g)?g>c?390:270:160;this.showDialog(b.container,400,m,!0,!0);b.init()};EditorUi.prototype.openInNewWindow=function(a,b,d){var c=window.open("about:blank");null==c||null==c.document?mxUtils.popup(a,!0):("image/svg+xml"!=b||mxClient.IS_SVG?"image/svg+xml"==b?c.document.write("<html>"+
+a+"</html>"):(a=d?a:btoa(unescape(encodeURIComponent(a))),c.document.write('<html><img style="max-width:100%;" src="data:'+b+";base64,"+a+'"/></html>')):c.document.write("<html><pre>"+mxUtils.htmlEntities(a,!1)+"</pre></html>"),c.document.close())};var g=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(a){if(this.isExportToCanvas()&&this.isChromelessImageExportEnabled()){this.exportDialog=null;var c=a(mxUtils.bind(this,function(a){var b=mxUtils.bind(this,function(){mxEvent.removeListener(this.editor.graph.container,"click",b);null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null)});if(null!=this.exportDialog)b.apply(this);else{this.exportDialog=document.createElement("div");var d=c.getBoundingClientRect();
+mxUtils.setPrefixedStyle(this.exportDialog.style,"borderRadius","5px");this.exportDialog.style.position="fixed";this.exportDialog.style.textAlign="center";this.exportDialog.style.fontFamily="Helvetica,Arial";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=d.left+"px";
+this.exportDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";d=mxUtils.getCurrentStyle(this.editor.graph.container);this.exportDialog.style.zIndex=d.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(a){e.stop();this.exportDialog.style.width="auto";this.exportDialog.style.height=
+"auto";this.exportDialog.style.padding="10px";var c=this.createImageDataUri(a,null,"png");a=document.createElement("img");a.style.maxWidth="140px";a.style.maxHeight="140px";a.style.cursor="pointer";a.style.backgroundColor="white";a.setAttribute("title",mxResources.get("openInNewWindow"));a.setAttribute("border","0");a.setAttribute("src",c);this.exportDialog.appendChild(a);mxEvent.addListener(a,"click",mxUtils.bind(this,function(){this.openInNewWindow(c.substring(c.indexOf(",")+1),"image/png",!0);
+b.apply(this,arguments)}))}),null,this.thumbImageCache,null,mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),null,null,null,null,null,null,null,Editor.defaultBorder);mxEvent.addListener(this.editor.graph.container,"click",b);document.body.appendChild(this.exportDialog)}mxEvent.consume(a)}),Editor.cameraLargeImage,mxResources.get("export"))}g.apply(this,arguments)};EditorUi.prototype.saveData=function(a,b,d,f,g){this.isLocalFileSave()?this.saveLocalFile(d,a,f,g,b):this.saveRequest(a,
+b,mxUtils.bind(this,function(a,c){return this.createEchoRequest(d,a,f,g,b,c)}),d,g,f)};EditorUi.prototype.saveRequest=function(a,b,d,f,g,m,u){u=null!=u?u:!mxClient.IS_IOS||!navigator.standalone;var c=this.getServiceCount(!1);isLocalStorage&&c++;var e=4>=c?2:6<c?4:3;a=new CreateDialog(this,a,mxUtils.bind(this,function(a,c){if("_blank"==c||null!=a&&0<a.length){var e=d("_blank"==c?null:a,c==App.MODE_DEVICE||"download"==c||null==c||"_blank"==c?"0":"1");null!=e&&(c==App.MODE_DEVICE||"download"==c||"_blank"==
+c?e.simulate(document,"_blank"):this.pickFolder(c,mxUtils.bind(this,function(d){m=null!=m?m:"pdf"==b?"application/pdf":"image/"+b;if(null!=f)try{this.exportFile(f,a,m,!0,c,d)}catch(H){this.handleError(H)}else this.spinner.spin(document.body,mxResources.get("saving"))&&e.send(mxUtils.bind(this,function(){this.spinner.stop();if(200<=e.getStatus()&&299>=e.getStatus())try{this.exportFile(e.getText(),a,m,!0,c,d)}catch(H){this.handleError(H)}else this.handleError({message:mxResources.get("errorSavingFile")})}),
+function(a){this.spinner.stop();this.handleError(a)})})))}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,!1,u,null,1<c,e,f,m,g);c=this.isServices(c)?4<c?390:270:160;this.showDialog(a.container,380,c,!0,!0);a.init()};EditorUi.prototype.isServices=function(a){return 1!=a};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(a,b,d,f,g,m){};EditorUi.prototype.pickFolder=function(a,
+b,d){b(null)};EditorUi.prototype.exportSvg=function(a,b,d,f,g,m,u,p,A,x,G,z){if(this.spinner.spin(document.body,mxResources.get("export")))try{var c=this.editor.graph.isSelectionEmpty();d=null!=d?d:c;var e=b?null:this.editor.graph.background;e==mxConstants.NONE&&(e=null);null==e&&0==b&&(e=G?this.editor.graph.defaultPageBackgroundColor:"#ffffff");var k=this.editor.graph.getSvg(e,a,u,p,null,d,null,null,"blank"==x?"_blank":"self"==x?"_top":null,null,!0,G,z);f&&this.editor.graph.addSvgShadow(k);var l=
+this.getBaseFilename()+(g?".drawio":"")+".svg",n=mxUtils.bind(this,function(a){this.spinner.stop();g&&a.setAttribute("content",this.getFileData(!0,null,null,null,d,A,null,null,null,!1));var c='<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n'+mxUtils.getXml(a);this.isLocalFileSave()||c.length<=MAX_REQUEST_SIZE?this.saveData(l,"svg",c,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},
+mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(c)}))});this.editor.addFontCss(k);this.editor.graph.mathEnabled&&this.editor.addMathCss(k);m?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.editor.convertImages(k,n,this.thumbImageCache)):n(k)}catch(D){this.handleError(D)}};EditorUi.prototype.addRadiobox=function(a,b,d,f,g,m,u){return this.addCheckbox(a,d,f,g,m,u,!0,b)};EditorUi.prototype.addCheckbox=function(a,b,d,f,g,m,u,p){m=null!=m?m:!0;var c=document.createElement("input");
+c.style.marginRight="8px";c.style.marginTop="16px";c.setAttribute("type",u?"radio":"checkbox");u="geCheckbox-"+Editor.guid();c.id=u;null!=p&&c.setAttribute("name",p);d&&(c.setAttribute("checked","checked"),c.defaultChecked=!0);f&&c.setAttribute("disabled","disabled");m&&(a.appendChild(c),d=document.createElement("label"),mxUtils.write(d,b),d.setAttribute("for",u),a.appendChild(d),g||mxUtils.br(a));return c};EditorUi.prototype.addEditButton=function(a,b){var c=this.addCheckbox(a,mxResources.get("edit")+
+":",!0,null,!0);c.style.marginLeft="24px";var d=this.getCurrentFile(),e="";null!=d&&d.getMode()!=App.MODE_DEVICE&&d.getMode()!=App.MODE_BROWSER&&(e=window.location.href);var f=document.createElement("select");f.style.width="120px";f.style.marginLeft="8px";f.style.marginRight="10px";f.className="geBtn";d=document.createElement("option");d.setAttribute("value","blank");mxUtils.write(d,mxResources.get("makeCopy"));f.appendChild(d);d=document.createElement("option");d.setAttribute("value","custom");mxUtils.write(d,
+mxResources.get("custom")+"...");f.appendChild(d);a.appendChild(f);mxEvent.addListener(f,"change",mxUtils.bind(this,function(){if("custom"==f.value){var a=new FilenameDialog(this,e,mxResources.get("ok"),function(a){null!=a?e=a:f.value="blank"},mxResources.get("url"),null,null,null,null,function(){f.value="blank"});this.showDialog(a.container,300,80,!0,!1);a.init()}}));mxEvent.addListener(c,"change",mxUtils.bind(this,function(){c.checked&&(null==b||b.checked)?f.removeAttribute("disabled"):f.setAttribute("disabled",
+"disabled")}));mxUtils.br(a);return{getLink:function(){return c.checked?"blank"===f.value?"_blank":e:null},getEditInput:function(){return c},getEditSelect:function(){return f}}};EditorUi.prototype.addLinkSection=function(a,b){function c(){g.innerHTML='<div style="width:100%;height:100%;box-sizing:border-box;'+(null!=f&&f!=mxConstants.NONE?"border:1px solid black;background-color:"+f:"background-position:center center;background-repeat:no-repeat;background-image:url('"+Dialog.prototype.closeImage+
+"')")+';"></div>'}mxUtils.write(a,mxResources.get("links")+":");var d=document.createElement("select");d.style.width="100px";d.style.marginLeft="8px";d.style.marginRight="10px";d.className="geBtn";var e=document.createElement("option");e.setAttribute("value","auto");mxUtils.write(e,mxResources.get("automatic"));d.appendChild(e);e=document.createElement("option");e.setAttribute("value","blank");mxUtils.write(e,mxResources.get("openInNewWindow"));d.appendChild(e);e=document.createElement("option");
+e.setAttribute("value","self");mxUtils.write(e,mxResources.get("openInThisWindow"));d.appendChild(e);b&&(e=document.createElement("option"),e.setAttribute("value","frame"),mxUtils.write(e,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),d.appendChild(e));a.appendChild(d);mxUtils.write(a,mxResources.get("borderColor")+":");var f="#0000ff",g=null,g=mxUtils.button("",mxUtils.bind(this,function(a){this.pickColor(f||"none",function(a){f=a;c()});mxEvent.consume(a)}));c();g.style.padding=
+mxClient.IS_FF?"4px 2px 4px 2px":"4px";g.style.marginLeft="4px";g.style.height="22px";g.style.width="22px";g.style.position="relative";g.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";g.className="geColorBtn";a.appendChild(g);mxUtils.br(a);return{getColor:function(){return f},getTarget:function(){return d.value},focus:function(){d.focus()}}};EditorUi.prototype.createUrlParameters=function(a,b,d,f,g,m,p){p=null!=p?p:[];f&&("https://viewer.diagrams.net"==EditorUi.lightboxHost&&
+"1"!=urlParams.dev||p.push("lightbox=1"),"auto"!=a&&p.push("target="+a),null!=b&&b!=mxConstants.NONE&&p.push("highlight="+("#"==b.charAt(0)?b.substring(1):b)),null!=g&&0<g.length&&p.push("edit="+encodeURIComponent(g)),m&&p.push("layers=1"),this.editor.graph.foldingEnabled&&p.push("nav=1"));d&&null!=this.currentPage&&null!=this.pages&&this.currentPage!=this.pages[0]&&p.push("page-id="+this.currentPage.getId());return p};EditorUi.prototype.createLink=function(a,b,d,f,g,m,p,t,A,x){A=this.createUrlParameters(a,
+b,d,f,g,m,A);a=this.getCurrentFile();b=!0;null!=p?d="#U"+encodeURIComponent(p):(a=this.getCurrentFile(),t||null==a||a.constructor!=window.DriveFile?d="#R"+encodeURIComponent(d?this.getFileData(!0,null,null,null,null,null,null,!0,null,!1):Graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(d="#"+a.getHash(),b=!1));b&&null!=a&&null!=a.getTitle()&&a.getTitle()!=this.defaultFilename&&A.push("title="+encodeURIComponent(a.getTitle()));x&&1<d.length&&(A.push("open="+d.substring(1)),d="");return(f&&
+"1"!=urlParams.dev?EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?EditorUi.drawHost:"https://"+window.location.host)+"/"+(0<A.length?"?"+A.join("&"):"")+d};EditorUi.prototype.createHtml=function(a,b,d,f,g,m,p,t,A,x,G){this.getBasenames();var c={};""!=g&&g!=mxConstants.NONE&&(c.highlight=g);"auto"!==f&&(c.target=f);A||(c.lightbox=!1);c.nav=this.editor.graph.foldingEnabled;d=parseInt(d);isNaN(d)||100==d||(c.zoom=d/100);d=[];p&&(d.push("pages"),
c.resize=!0,null!=this.pages&&null!=this.currentPage&&(c.page=mxUtils.indexOf(this.pages,this.currentPage)));b&&(d.push("zoom"),c.resize=!0);t&&d.push("layers");0<d.length&&(A&&d.push("lightbox"),c.toolbar=d.join(" "));null!=x&&0<x.length&&(c.edit=x);null!=a?c.url=a:c.xml=this.getFileData(!0,null,null,null,null,!p);b='<div class="mxgraph" style="'+(m?"max-width:100%;":"")+(""!=d?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(c))+'"></div>';a=null!=a?"&fetch="+
encodeURIComponent(a):"";G(b,'<script type="text/javascript" src="'+(0<a.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":EditorUi.lightboxHost+"/embed2.js?")+a:"1"==urlParams.dev?"https://test.draw.io/js/viewer-static.min.js":window.VIEWER_URL?window.VIEWER_URL:EditorUi.lightboxHost+"/js/viewer-static.min.js")+'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=function(a,b,d,f){var c=document.createElement("div");c.style.whiteSpace="nowrap";var e=document.createElement("h3");mxUtils.write(e,
-mxResources.get("html"));e.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";c.appendChild(e);var g=document.createElement("div");g.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var k=document.createElement("input");k.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";k.setAttribute("value","url");k.setAttribute("type","radio");k.setAttribute("name","type-embedhtmldialog");e=k.cloneNode(!0);e.setAttribute("value",
-"copy");g.appendChild(e);var n=document.createElement("span");mxUtils.write(n,mxResources.get("includeCopyOfMyDiagram"));g.appendChild(n);mxUtils.br(g);g.appendChild(k);n=document.createElement("span");mxUtils.write(n,mxResources.get("publicDiagramUrl"));g.appendChild(n);var m=this.getCurrentFile();null==d&&null!=m&&m.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")),g.appendChild(n),
-mxEvent.addListener(n,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(m.getId())})));e.setAttribute("checked","checked");null==d&&k.setAttribute("disabled","disabled");c.appendChild(g);var p=this.addLinkSection(c),z=this.addCheckbox(c,mxResources.get("zoom"),!0,null,!0);mxUtils.write(c,":");var E=document.createElement("input");E.setAttribute("type","text");E.style.marginRight="16px";E.style.width="60px";E.style.marginLeft="4px";E.style.marginRight="12px";E.value=
-"100%";c.appendChild(E);var H=this.addCheckbox(c,mxResources.get("fit"),!0),g=null!=this.pages&&1<this.pages.length,K=K=this.addCheckbox(c,mxResources.get("allPages"),g,!g),F=this.addCheckbox(c,mxResources.get("layers"),!0),I=this.addCheckbox(c,mxResources.get("lightbox"),!0),C=this.addEditButton(c,I),M=C.getEditInput();M.style.marginBottom="16px";mxEvent.addListener(I,"change",function(){I.checked?M.removeAttribute("disabled"):M.setAttribute("disabled","disabled");M.checked&&I.checked?C.getEditSelect().removeAttribute("disabled"):
-C.getEditSelect().setAttribute("disabled","disabled")});a=new CustomDialog(this,c,mxUtils.bind(this,function(){f(k.checked?d:null,z.checked,E.value,p.getTarget(),p.getColor(),H.checked,K.checked,F.checked,I.checked,C.getLink())}),null,a,b);this.showDialog(a.container,340,384,!0,!0);e.focus()};EditorUi.prototype.showPublishLinkDialog=function(a,b,d,f,k,m){var c=document.createElement("div");c.style.whiteSpace="nowrap";var e=document.createElement("h3");mxUtils.write(e,a||mxResources.get("link"));e.style.cssText=
-"width:100%;text-align:center;margin-top:0px;margin-bottom:12px";c.appendChild(e);var g=this.getCurrentFile(),e="https://www.diagrams.net/doc/faq/publish-diagram-as-link";a=0;if(null!=g&&g.constructor==window.DriveFile&&!b){a=80;var e="https://www.diagrams.net/doc/faq/google-drive-publicly-publish-diagram",l=document.createElement("div");l.style.cssText="border-bottom:1px solid lightGray;padding-bottom:14px;padding-top:6px;margin-bottom:14px;text-align:center;";var n=document.createElement("div");
-n.style.whiteSpace="normal";mxUtils.write(n,mxResources.get("linkAccountRequired"));l.appendChild(n);n=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(g.getId())}));n.style.marginTop="12px";n.className="geBtn";l.appendChild(n);c.appendChild(l);n=document.createElement("a");n.style.paddingLeft="12px";n.style.color="gray";n.style.fontSize="11px";n.style.cursor="pointer";mxUtils.write(n,mxResources.get("check"));l.appendChild(n);mxEvent.addListener(n,"click",
+mxResources.get("html"));e.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";c.appendChild(e);var k=document.createElement("div");k.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var g=document.createElement("input");g.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";g.setAttribute("value","url");g.setAttribute("type","radio");g.setAttribute("name","type-embedhtmldialog");e=g.cloneNode(!0);e.setAttribute("value",
+"copy");k.appendChild(e);var n=document.createElement("span");mxUtils.write(n,mxResources.get("includeCopyOfMyDiagram"));k.appendChild(n);mxUtils.br(k);k.appendChild(g);n=document.createElement("span");mxUtils.write(n,mxResources.get("publicDiagramUrl"));k.appendChild(n);var m=this.getCurrentFile();null==d&&null!=m&&m.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")),k.appendChild(n),
+mxEvent.addListener(n,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(m.getId())})));e.setAttribute("checked","checked");null==d&&g.setAttribute("disabled","disabled");c.appendChild(k);var p=this.addLinkSection(c),z=this.addCheckbox(c,mxResources.get("zoom"),!0,null,!0);mxUtils.write(c,":");var E=document.createElement("input");E.setAttribute("type","text");E.style.marginRight="16px";E.style.width="60px";E.style.marginLeft="4px";E.style.marginRight="12px";E.value=
+"100%";c.appendChild(E);var H=this.addCheckbox(c,mxResources.get("fit"),!0),k=null!=this.pages&&1<this.pages.length,K=K=this.addCheckbox(c,mxResources.get("allPages"),k,!k),F=this.addCheckbox(c,mxResources.get("layers"),!0),I=this.addCheckbox(c,mxResources.get("lightbox"),!0),D=this.addEditButton(c,I),M=D.getEditInput();M.style.marginBottom="16px";mxEvent.addListener(I,"change",function(){I.checked?M.removeAttribute("disabled"):M.setAttribute("disabled","disabled");M.checked&&I.checked?D.getEditSelect().removeAttribute("disabled"):
+D.getEditSelect().setAttribute("disabled","disabled")});a=new CustomDialog(this,c,mxUtils.bind(this,function(){f(g.checked?d:null,z.checked,E.value,p.getTarget(),p.getColor(),H.checked,K.checked,F.checked,I.checked,D.getLink())}),null,a,b);this.showDialog(a.container,340,384,!0,!0);e.focus()};EditorUi.prototype.showPublishLinkDialog=function(a,b,d,f,g,m){var c=document.createElement("div");c.style.whiteSpace="nowrap";var e=document.createElement("h3");mxUtils.write(e,a||mxResources.get("link"));e.style.cssText=
+"width:100%;text-align:center;margin-top:0px;margin-bottom:12px";c.appendChild(e);var k=this.getCurrentFile(),e="https://www.diagrams.net/doc/faq/publish-diagram-as-link";a=0;if(null!=k&&k.constructor==window.DriveFile&&!b){a=80;var e="https://www.diagrams.net/doc/faq/google-drive-publicly-publish-diagram",l=document.createElement("div");l.style.cssText="border-bottom:1px solid lightGray;padding-bottom:14px;padding-top:6px;margin-bottom:14px;text-align:center;";var n=document.createElement("div");
+n.style.whiteSpace="normal";mxUtils.write(n,mxResources.get("linkAccountRequired"));l.appendChild(n);n=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(k.getId())}));n.style.marginTop="12px";n.className="geBtn";l.appendChild(n);c.appendChild(l);n=document.createElement("a");n.style.paddingLeft="12px";n.style.color="gray";n.style.fontSize="11px";n.style.cursor="pointer";mxUtils.write(n,mxResources.get("check"));l.appendChild(n);mxEvent.addListener(n,"click",
mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"))&&this.getPublicUrl(this.getCurrentFile(),mxUtils.bind(this,function(a){this.spinner.stop();a=new ErrorDialog(this,null,mxResources.get(null!=a?"diagramIsPublic":"diagramIsNotPublic"),mxResources.get("ok"));this.showDialog(a.container,300,80,!0,!1);a.init()}))}))}var q=null,p=null;if(null!=d||null!=f)a+=30,mxUtils.write(c,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%",c.appendChild(q),mxUtils.write(c,mxResources.get("height")+":"),p=document.createElement("input"),p.setAttribute("type","text"),p.style.width="50px",p.style.marginLeft="6px",p.style.marginBottom="10px",p.value=f+"px",c.appendChild(p),mxUtils.br(c);var H=this.addLinkSection(c,m);d=null!=this.pages&&1<this.pages.length;var K=null;if(null==g||g.constructor!=window.DriveFile||
-b)K=this.addCheckbox(c,mxResources.get("allPages"),d,!d);var F=this.addCheckbox(c,mxResources.get("lightbox"),!0,null,null,!m),I=this.addEditButton(c,F),C=I.getEditInput();m&&(C.style.marginLeft=F.style.marginLeft,F.style.display="none",a-=30);var M=this.addCheckbox(c,mxResources.get("layers"),!0);M.style.marginLeft=C.style.marginLeft;M.style.marginBottom="16px";M.style.marginTop="8px";mxEvent.addListener(F,"change",function(){F.checked?(M.removeAttribute("disabled"),C.removeAttribute("disabled")):
-(M.setAttribute("disabled","disabled"),C.setAttribute("disabled","disabled"));C.checked&&F.checked?I.getEditSelect().removeAttribute("disabled"):I.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,c,mxUtils.bind(this,function(){k(H.getTarget(),H.getColor(),null==K?!0:K.checked,F.checked,I.getLink(),M.checked,null!=q?q.value:null,null!=p?p.value:null)}),null,mxResources.get("create"),e);this.showDialog(b.container,340,254+a,!0,!0);null!=q?(q.focus(),mxClient.IS_GC||mxClient.IS_FF||
-5<=document.documentMode?q.select():document.execCommand("selectAll",!1,null)):H.focus()};EditorUi.prototype.showRemoteExportDialog=function(a,b,d,f,k){var c=document.createElement("div");c.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:"+(k?"10":"4")+"px";c.appendChild(e);if(k){mxUtils.write(c,mxResources.get("zoom")+":");var g=document.createElement("input");g.setAttribute("type",
-"text");g.style.marginRight="16px";g.style.width="60px";g.style.marginLeft="4px";g.style.marginRight="12px";g.value=this.lastExportZoom||"100%";c.appendChild(g);mxUtils.write(c,mxResources.get("borderWidth")+":");var l=document.createElement("input");l.setAttribute("type","text");l.style.marginRight="16px";l.style.width="60px";l.style.marginLeft="4px";l.value=this.lastExportBorder||"0";c.appendChild(l);mxUtils.br(c)}var n=this.addCheckbox(c,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),
-m=f?null:this.addCheckbox(c,mxResources.get("includeCopyOfMyDiagram"),!0),e=this.editor.graph,p=f?null:this.addCheckbox(c,mxResources.get("transparentBackground"),e.background==mxConstants.NONE||null==e.background);null!=p&&(p.style.marginBottom="16px");a=new CustomDialog(this,c,mxUtils.bind(this,function(){var a=parseInt(g.value)/100||1,c=parseInt(l.value)||0;d(!n.checked,null!=m?m.checked:!1,null!=p?p.checked:!1,a,c)}),null,a,b);this.showDialog(a.container,300,(k?25:0)+(f?125:210),!0,!0)};EditorUi.prototype.showExportDialog=
-function(a,b,d,f,k,m,p,t,A){p=null!=p?p:!0;var c=document.createElement("div");c.style.whiteSpace="nowrap";var e=this.editor.graph,g="jpeg"==t?196:300,l=document.createElement("h3");mxUtils.write(l,a);l.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";c.appendChild(l);mxUtils.write(c,mxResources.get("zoom")+":");var n=document.createElement("input");n.setAttribute("type","text");n.style.marginRight="16px";n.style.width="60px";n.style.marginLeft="4px";n.style.marginRight=
-"12px";n.value=this.lastExportZoom||"100%";c.appendChild(n);mxUtils.write(c,mxResources.get("borderWidth")+":");var q=document.createElement("input");q.setAttribute("type","text");q.style.marginRight="16px";q.style.width="60px";q.style.marginLeft="4px";q.value=this.lastExportBorder||"0";c.appendChild(q);mxUtils.br(c);var u=this.addCheckbox(c,mxResources.get("selectionOnly"),!1,e.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 C=document.createElement("select");C.style.marginTop="16px";C.style.marginLeft="8px";a=["selectionOnly","diagram","page"];for(l=0;l<a.length;l++)if(!e.isSelectionEmpty()||"selectionOnly"!=a[l]){var M=document.createElement("option");mxUtils.write(M,mxResources.get(a[l]));M.setAttribute("value",a[l]);C.appendChild(M)}A?(mxUtils.write(c,mxResources.get("size")+":"),c.appendChild(C),mxUtils.br(c),g+=26,mxEvent.addListener(C,
-"change",function(){"selectionOnly"==C.value&&(u.checked=!0)})):m&&(c.appendChild(I),mxUtils.write(c,mxResources.get("crop")),mxUtils.br(c),g+=26,mxEvent.addListener(u,"change",function(){u.checked?I.removeAttribute("disabled"):I.setAttribute("disabled","disabled")}));e.isSelectionEmpty()?A&&(u.style.display="none",u.nextSibling.style.display="none",u.nextSibling.nextSibling.style.display="none",g-=26):(C.value="diagram",I.setAttribute("checked","checked"),I.defaultChecked=!0,mxEvent.addListener(u,
-"change",function(){C.value=u.checked?"selectionOnly":"diagram"}));var U=this.addCheckbox(c,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=t),O=null;Editor.isDarkMode()&&(O=this.addCheckbox(c,mxResources.get("dark"),!0),g+=26);var N=this.addCheckbox(c,mxResources.get("shadow"),e.shadowVisible),v=document.createElement("input");v.style.marginTop="16px";v.style.marginRight="8px";v.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||v.setAttribute("disabled","disabled");
-b&&(c.appendChild(v),mxUtils.write(c,mxResources.get("embedImages")),mxUtils.br(c),g+=26);var D=null;if("png"==t||"jpeg"==t)D=this.addCheckbox(c,mxResources.get("grid"),!1,this.isOffline()||!this.canvasSupported,!1,!0),g+=26;var B=this.addCheckbox(c,mxResources.get("includeCopyOfMyDiagram"),p,null,null,"jpeg"!=t);B.style.marginBottom="16px";var J=document.createElement("select");J.style.maxWidth="260px";J.style.marginLeft="8px";J.style.marginRight="10px";J.className="geBtn";b=document.createElement("option");
-b.setAttribute("value","auto");mxUtils.write(b,mxResources.get("automatic"));J.appendChild(b);b=document.createElement("option");b.setAttribute("value","blank");mxUtils.write(b,mxResources.get("openInNewWindow"));J.appendChild(b);b=document.createElement("option");b.setAttribute("value","self");mxUtils.write(b,mxResources.get("openInThisWindow"));J.appendChild(b);"svg"==t&&(mxUtils.write(c,mxResources.get("links")+":"),c.appendChild(J),mxUtils.br(c),mxUtils.br(c),g+=26);d=new CustomDialog(this,c,
-mxUtils.bind(this,function(){this.lastExportBorder=q.value;this.lastExportZoom=n.value;k(n.value,U.checked,!u.checked,N.checked,B.checked,v.checked,q.value,I.checked,!1,J.value,null!=D?D.checked:null,null!=O?O.checked:null,C.value)}),null,d,f);this.showDialog(d.container,340,g,!0,!0,null,null,null,null,!0);n.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?n.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(a,b,d,f,k){var c=document.createElement("div");
-c.style.whiteSpace="nowrap";var e=this.editor.graph;if(null!=b){var g=document.createElement("h3");mxUtils.write(g,b);g.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";c.appendChild(g)}var l=this.addCheckbox(c,mxResources.get("fit"),!0),n=this.addCheckbox(c,mxResources.get("shadow"),e.shadowVisible&&f,!f),m=this.addCheckbox(c,d),p=this.addCheckbox(c,mxResources.get("lightbox"),!0),E=this.addEditButton(c,p),H=E.getEditInput(),K=1<e.model.getChildCount(e.model.getRoot()),
-F=this.addCheckbox(c,mxResources.get("layers"),K,!K);F.style.marginLeft=H.style.marginLeft;F.style.marginBottom="12px";F.style.marginTop="8px";mxEvent.addListener(p,"change",function(){p.checked?(K&&F.removeAttribute("disabled"),H.removeAttribute("disabled")):(F.setAttribute("disabled","disabled"),H.setAttribute("disabled","disabled"));H.checked&&p.checked?E.getEditSelect().removeAttribute("disabled"):E.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,c,mxUtils.bind(this,
-function(){a(l.checked,n.checked,m.checked,p.checked,E.getLink(),F.checked)}),null,mxResources.get("embed"),k);this.showDialog(b.container,280,280,!0,!0)};EditorUi.prototype.createEmbedImage=function(a,b,d,f,k,m,p,t){function c(c){var b=" ",l="";f&&(b=" 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!=g?"&page="+g:"")+(k?"&edit=_blank":"")+(m?"&layers=1":"")+"');}})(this);\"",l+="cursor:pointer;");a&&(l+="max-width:100%;");var n="";d&&(n=' width="'+Math.round(e.width)+'" height="'+Math.round(e.height)+'"');p('<img src="'+c+'"'+n+(""!=l?' style="'+l+'"':"")+b+"/>")}var e=this.editor.graph.getGraphBounds(),g=this.getSelectedPageIndex();if(this.isExportToCanvas())this.editor.exportToCanvas(mxUtils.bind(this,function(a){var b=f?this.getFileData(!0):null;a=
+q.style.marginRight="16px",q.style.width="50px",q.style.marginLeft="6px",q.style.marginRight="16px",q.style.marginBottom="10px",q.value="100%",c.appendChild(q),mxUtils.write(c,mxResources.get("height")+":"),p=document.createElement("input"),p.setAttribute("type","text"),p.style.width="50px",p.style.marginLeft="6px",p.style.marginBottom="10px",p.value=f+"px",c.appendChild(p),mxUtils.br(c);var H=this.addLinkSection(c,m);d=null!=this.pages&&1<this.pages.length;var K=null;if(null==k||k.constructor!=window.DriveFile||
+b)K=this.addCheckbox(c,mxResources.get("allPages"),d,!d);var F=this.addCheckbox(c,mxResources.get("lightbox"),!0,null,null,!m),I=this.addEditButton(c,F),D=I.getEditInput();m&&(D.style.marginLeft=F.style.marginLeft,F.style.display="none",a-=30);var M=this.addCheckbox(c,mxResources.get("layers"),!0);M.style.marginLeft=D.style.marginLeft;M.style.marginBottom="16px";M.style.marginTop="8px";mxEvent.addListener(F,"change",function(){F.checked?(M.removeAttribute("disabled"),D.removeAttribute("disabled")):
+(M.setAttribute("disabled","disabled"),D.setAttribute("disabled","disabled"));D.checked&&F.checked?I.getEditSelect().removeAttribute("disabled"):I.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,c,mxUtils.bind(this,function(){g(H.getTarget(),H.getColor(),null==K?!0:K.checked,F.checked,I.getLink(),M.checked,null!=q?q.value:null,null!=p?p.value:null)}),null,mxResources.get("create"),e);this.showDialog(b.container,340,254+a,!0,!0);null!=q?(q.focus(),mxClient.IS_GC||mxClient.IS_FF||
+5<=document.documentMode?q.select():document.execCommand("selectAll",!1,null)):H.focus()};EditorUi.prototype.showRemoteExportDialog=function(a,b,d,f,g){var c=document.createElement("div");c.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:"+(g?"10":"4")+"px";c.appendChild(e);if(g){mxUtils.write(c,mxResources.get("zoom")+":");var k=document.createElement("input");k.setAttribute("type",
+"text");k.style.marginRight="16px";k.style.width="60px";k.style.marginLeft="4px";k.style.marginRight="12px";k.value=this.lastExportZoom||"100%";c.appendChild(k);mxUtils.write(c,mxResources.get("borderWidth")+":");var l=document.createElement("input");l.setAttribute("type","text");l.style.marginRight="16px";l.style.width="60px";l.style.marginLeft="4px";l.value=this.lastExportBorder||"0";c.appendChild(l);mxUtils.br(c)}var n=this.addCheckbox(c,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),
+m=f?null:this.addCheckbox(c,mxResources.get("includeCopyOfMyDiagram"),Editor.defaultIncludeDiagram),e=this.editor.graph,p=f?null:this.addCheckbox(c,mxResources.get("transparentBackground"),e.background==mxConstants.NONE||null==e.background);null!=p&&(p.style.marginBottom="16px");a=new CustomDialog(this,c,mxUtils.bind(this,function(){var a=parseInt(k.value)/100||1,c=parseInt(l.value)||0;d(!n.checked,null!=m?m.checked:!1,null!=p?p.checked:!1,a,c)}),null,a,b);this.showDialog(a.container,300,(g?25:0)+
+(f?125:210),!0,!0)};EditorUi.prototype.showExportDialog=function(a,b,d,f,g,m,p,t,A){p=null!=p?p:Editor.defaultIncludeDiagram;var c=document.createElement("div");c.style.whiteSpace="nowrap";var e=this.editor.graph,k="jpeg"==t?196:300,l=document.createElement("h3");mxUtils.write(l,a);l.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";c.appendChild(l);mxUtils.write(c,mxResources.get("zoom")+":");var n=document.createElement("input");n.setAttribute("type","text");n.style.marginRight=
+"16px";n.style.width="60px";n.style.marginLeft="4px";n.style.marginRight="12px";n.value=this.lastExportZoom||"100%";c.appendChild(n);mxUtils.write(c,mxResources.get("borderWidth")+":");var q=document.createElement("input");q.setAttribute("type","text");q.style.marginRight="16px";q.style.width="60px";q.style.marginLeft="4px";q.value=this.lastExportBorder||"0";c.appendChild(q);mxUtils.br(c);var u=this.addCheckbox(c,mxResources.get("selectionOnly"),!1,e.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 D=document.createElement("select");D.style.marginTop="16px";D.style.marginLeft="8px";a=["selectionOnly","diagram","page"];for(l=0;l<a.length;l++)if(!e.isSelectionEmpty()||"selectionOnly"!=a[l]){var M=document.createElement("option");mxUtils.write(M,mxResources.get(a[l]));M.setAttribute("value",a[l]);D.appendChild(M)}A?(mxUtils.write(c,mxResources.get("size")+
+":"),c.appendChild(D),mxUtils.br(c),k+=26,mxEvent.addListener(D,"change",function(){"selectionOnly"==D.value&&(u.checked=!0)})):m&&(c.appendChild(I),mxUtils.write(c,mxResources.get("crop")),mxUtils.br(c),k+=26,mxEvent.addListener(u,"change",function(){u.checked?I.removeAttribute("disabled"):I.setAttribute("disabled","disabled")}));e.isSelectionEmpty()?A&&(u.style.display="none",u.nextSibling.style.display="none",u.nextSibling.nextSibling.style.display="none",k-=26):(D.value="diagram",I.setAttribute("checked",
+"checked"),I.defaultChecked=!0,mxEvent.addListener(u,"change",function(){D.value=u.checked?"selectionOnly":"diagram"}));var U=this.addCheckbox(c,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=t),O=null;Editor.isDarkMode()&&(O=this.addCheckbox(c,mxResources.get("dark"),!0),k+=26);var N=this.addCheckbox(c,mxResources.get("shadow"),e.shadowVisible),v=document.createElement("input");v.style.marginTop="16px";v.style.marginRight="8px";v.setAttribute("type","checkbox");!this.isOffline()&&
+this.canvasSupported||v.setAttribute("disabled","disabled");b&&(c.appendChild(v),mxUtils.write(c,mxResources.get("embedImages")),mxUtils.br(c),k+=26);var C=null;if("png"==t||"jpeg"==t)C=this.addCheckbox(c,mxResources.get("grid"),!1,this.isOffline()||!this.canvasSupported,!1,!0),k+=26;var B=this.addCheckbox(c,mxResources.get("includeCopyOfMyDiagram"),p,null,null,"jpeg"!=t);B.style.marginBottom="16px";var J=document.createElement("select");J.style.maxWidth="260px";J.style.marginLeft="8px";J.style.marginRight=
+"10px";J.className="geBtn";b=document.createElement("option");b.setAttribute("value","auto");mxUtils.write(b,mxResources.get("automatic"));J.appendChild(b);b=document.createElement("option");b.setAttribute("value","blank");mxUtils.write(b,mxResources.get("openInNewWindow"));J.appendChild(b);b=document.createElement("option");b.setAttribute("value","self");mxUtils.write(b,mxResources.get("openInThisWindow"));J.appendChild(b);"svg"==t&&(mxUtils.write(c,mxResources.get("links")+":"),c.appendChild(J),
+mxUtils.br(c),mxUtils.br(c),k+=26);d=new CustomDialog(this,c,mxUtils.bind(this,function(){this.lastExportBorder=q.value;this.lastExportZoom=n.value;g(n.value,U.checked,!u.checked,N.checked,B.checked,v.checked,q.value,I.checked,!1,J.value,null!=C?C.checked:null,null!=O?O.checked:null,D.value)}),null,d,f);this.showDialog(d.container,340,k,!0,!0,null,null,null,null,!0);n.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?n.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=
+function(a,b,d,f,g){var c=document.createElement("div");c.style.whiteSpace="nowrap";var e=this.editor.graph;if(null!=b){var k=document.createElement("h3");mxUtils.write(k,b);k.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";c.appendChild(k)}var l=this.addCheckbox(c,mxResources.get("fit"),!0),n=this.addCheckbox(c,mxResources.get("shadow"),e.shadowVisible&&f,!f),m=this.addCheckbox(c,d),p=this.addCheckbox(c,mxResources.get("lightbox"),!0),E=this.addEditButton(c,p),H=E.getEditInput(),
+K=1<e.model.getChildCount(e.model.getRoot()),F=this.addCheckbox(c,mxResources.get("layers"),K,!K);F.style.marginLeft=H.style.marginLeft;F.style.marginBottom="12px";F.style.marginTop="8px";mxEvent.addListener(p,"change",function(){p.checked?(K&&F.removeAttribute("disabled"),H.removeAttribute("disabled")):(F.setAttribute("disabled","disabled"),H.setAttribute("disabled","disabled"));H.checked&&p.checked?E.getEditSelect().removeAttribute("disabled"):E.getEditSelect().setAttribute("disabled","disabled")});
+b=new CustomDialog(this,c,mxUtils.bind(this,function(){a(l.checked,n.checked,m.checked,p.checked,E.getLink(),F.checked)}),null,mxResources.get("embed"),g);this.showDialog(b.container,280,280,!0,!0)};EditorUi.prototype.createEmbedImage=function(a,b,d,f,g,m,p,t){function c(c){var b=" ",l="";f&&(b=" onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+
+EditorUi.lightboxHost+"/?client=1"+(null!=k?"&page="+k:"")+(g?"&edit=_blank":"")+(m?"&layers=1":"")+"');}})(this);\"",l+="cursor:pointer;");a&&(l+="max-width:100%;");var n="";d&&(n=' width="'+Math.round(e.width)+'" height="'+Math.round(e.height)+'"');p('<img src="'+c+'"'+n+(""!=l?' style="'+l+'"':"")+b+"/>")}var e=this.editor.graph.getGraphBounds(),k=this.getSelectedPageIndex();if(this.isExportToCanvas())this.editor.exportToCanvas(mxUtils.bind(this,function(a){var b=f?this.getFileData(!0):null;a=
this.createImageDataUri(a,b,"png");c(a)}),null,null,null,mxUtils.bind(this,function(a){t({message:mxResources.get("unknownError")})}),null,!0,d?2:1,null,b,null,null,Editor.defaultBorder);else if(b=this.getFileData(!0),e.width*e.height<=MAX_AREA&&b.length<=MAX_REQUEST_SIZE){var l="";d&&(l="&w="+Math.round(2*e.width)+"&h="+Math.round(2*e.height));var n=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(f?"1":"0")+l+"&xml="+encodeURIComponent(b));n.send(mxUtils.bind(this,function(){200<=n.getStatus()&&
-299>=n.getStatus()?c("data:image/png;base64,"+n.getText()):t({message:mxResources.get("unknownError")})}))}else t({message:mxResources.get("drawingTooLarge")})};EditorUi.prototype.createEmbedSvg=function(a,b,d,f,k,m,p){var c=this.editor.graph.getSvg(null,null,null,null,null,null,null,null,null,null,!d),e=c.getElementsByTagName("a");if(null!=e)for(var g=0;g<e.length;g++){var l=e[g].getAttribute("href");null!=l&&"#"==l.charAt(0)&&"_blank"==e[g].getAttribute("target")&&e[g].removeAttribute("target")}f&&
-c.setAttribute("content",this.getFileData(!0));b&&this.editor.graph.addSvgShadow(c);if(d){var n=" ",q="";f&&(n="onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+EditorUi.lightboxHost+"/?client=1"+(k?"&edit=_blank":"")+(m?"&layers=1":
+299>=n.getStatus()?c("data:image/png;base64,"+n.getText()):t({message:mxResources.get("unknownError")})}))}else t({message:mxResources.get("drawingTooLarge")})};EditorUi.prototype.createEmbedSvg=function(a,b,d,f,g,m,p){var c=this.editor.graph.getSvg(null,null,null,null,null,null,null,null,null,null,!d),e=c.getElementsByTagName("a");if(null!=e)for(var k=0;k<e.length;k++){var l=e[k].getAttribute("href");null!=l&&"#"==l.charAt(0)&&"_blank"==e[k].getAttribute("target")&&e[k].removeAttribute("target")}f&&
+c.setAttribute("content",this.getFileData(!0));b&&this.editor.graph.addSvgShadow(c);if(d){var n=" ",q="";f&&(n="onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+EditorUi.lightboxHost+"/?client=1"+(g?"&edit=_blank":"")+(m?"&layers=1":
"")+"');}})(this);\"",q+="cursor:pointer;");a&&(q+="max-width:100%;");this.editor.convertImages(c,mxUtils.bind(this,function(a){p('<img src="'+Editor.createSvgDataUri(mxUtils.getXml(a))+'"'+(""!=q?' style="'+q+'"':"")+n+"/>")}))}else q="",f&&(b=this.getSelectedPageIndex(),c.setAttribute("onclick","(function(svg){var src=window.event.target||window.event.srcElement;while (src!=null&&src.nodeName.toLowerCase()!='a'){src=src.parentNode;}if(src==null){if(svg.wnd!=null&&!svg.wnd.closed){svg.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==svg.wnd){svg.wnd.postMessage(decodeURIComponent(svg.getAttribute('content')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);svg.wnd=window.open('"+
-EditorUi.lightboxHost+"/?client=1"+(null!=b?"&page="+b:"")+(k?"&edit=_blank":"")+(m?"&layers=1":"")+"');}}})(this);"),q+="cursor:pointer;"),a&&(a=parseInt(c.getAttribute("width")),k=parseInt(c.getAttribute("height")),c.setAttribute("viewBox","-0.5 -0.5 "+a+" "+k),q+="max-width:100%;max-height:"+k+"px;",c.removeAttribute("height")),""!=q&&c.setAttribute("style",q),this.editor.addFontCss(c),this.editor.graph.mathEnabled&&this.editor.addMathCss(c),p(mxUtils.getXml(c))};EditorUi.prototype.timeSince=function(a){a=
+EditorUi.lightboxHost+"/?client=1"+(null!=b?"&page="+b:"")+(g?"&edit=_blank":"")+(m?"&layers=1":"")+"');}}})(this);"),q+="cursor:pointer;"),a&&(a=parseInt(c.getAttribute("width")),g=parseInt(c.getAttribute("height")),c.setAttribute("viewBox","-0.5 -0.5 "+a+" "+g),q+="max-width:100%;max-height:"+g+"px;",c.removeAttribute("height")),""!=q&&c.setAttribute("style",q),this.editor.addFontCss(c),this.editor.graph.mathEnabled&&this.editor.addMathCss(c),p(mxUtils.getXml(c))};EditorUi.prototype.timeSince=function(a){a=
Math.floor((new Date-a)/1E3);var c=Math.floor(a/31536E3);if(1<c)return c+" "+mxResources.get("years");c=Math.floor(a/2592E3);if(1<c)return c+" "+mxResources.get("months");c=Math.floor(a/86400);if(1<c)return c+" "+mxResources.get("days");c=Math.floor(a/3600);if(1<c)return c+" "+mxResources.get("hours");c=Math.floor(a/60);return 1<c?c+" "+mxResources.get("minutes"):1==c?c+" "+mxResources.get("minute"):null};EditorUi.prototype.decodeNodeIntoGraph=function(a,b){if(null!=a){var c=null;if("diagram"==a.nodeName)c=
a;else if("mxfile"==a.nodeName){var d=a.getElementsByTagName("diagram");if(0<d.length){var c=d[0],e=b.getGlobalVariable;b.getGlobalVariable=function(a){return"page"==a?c.getAttribute("name")||mxResources.get("pageWithNumber",[1]):"pagenumber"==a?1:e.apply(this,arguments)}}}null!=c&&(a=Editor.parseDiagramNode(c))}d=this.editor.graph;try{this.editor.graph=b,this.editor.setGraphXml(a)}catch(q){}finally{this.editor.graph=d}return a};EditorUi.prototype.getPngFileProperties=function(a){var c=1,b=0;if(null!=
-a){if(a.hasAttribute("scale")){var d=parseFloat(a.getAttribute("scale"));!isNaN(d)&&0<d&&(c=d)}a.hasAttribute("border")&&(d=parseInt(a.getAttribute("border")),!isNaN(d)&&0<d&&(b=d))}return{scale:c,border:b}};EditorUi.prototype.getEmbeddedPng=function(a,b,d,f,k){try{var c=this.editor.graph,e=null!=c.themes&&"darkTheme"==c.defaultThemeName,g=null;if(null!=d&&0<d.length)c=this.createTemporaryGraph(this.editor.graph.getStylesheet()),document.body.appendChild(c.container),this.decodeNodeIntoGraph(this.editor.extractGraphModel(mxUtils.parseXml(d).documentElement,
-!0),c),g=d;else if(e||null!=this.pages&&this.currentPage!=this.pages[0]){var c=this.createTemporaryGraph(c.getStylesheet()),l=c.getGlobalVariable,n=this.pages[0];c.getGlobalVariable=function(a){return"page"==a?n.getName():"pagenumber"==a?1:l.apply(this,arguments)};document.body.appendChild(c.container);c.model.setRoot(n.root)}this.editor.exportToCanvas(mxUtils.bind(this,function(d){try{null==g&&(g=this.getFileData(!0,null,null,null,null,null,null,null,null,!1));var e=d.toDataURL("image/png"),e=Editor.writeGraphModelToPng(e,
-"tEXt","mxfile",encodeURIComponent(g));a(e.substring(e.lastIndexOf(",")+1));c!=this.editor.graph&&c.container.parentNode.removeChild(c.container)}catch(E){null!=b&&b(E)}}),null,null,null,mxUtils.bind(this,function(a){null!=b&&b(a)}),null,null,f,null,c.shadowVisible,null,c,k)}catch(G){null!=b&&b(G)}};EditorUi.prototype.getEmbeddedSvg=function(a,b,d,f,k,m,p,t,A,x,G,z,E){t=null!=t?t:!0;p=null!=A?A:b.background;p==mxConstants.NONE&&(p=null);m=b.getSvg(p,x,G,null,null,m,null,null,null,b.shadowVisible||
-z,null,E);(b.shadowVisible||z)&&b.addSvgShadow(m);null!=a&&m.setAttribute("content",a);null!=d&&m.setAttribute("resource",d);if(null!=k)this.embedFonts(m,mxUtils.bind(this,function(a){t?this.editor.convertImages(a,mxUtils.bind(this,function(a){k((f?"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+mxUtils.getXml(a))})):k((f?"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+
-mxUtils.getXml(a))}));else return(f?"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+mxUtils.getXml(m)};EditorUi.prototype.embedFonts=function(a,b){this.editor.loadFonts(mxUtils.bind(this,function(){try{null!=this.editor.resolvedFontCss&&this.editor.addFontCss(a,this.editor.resolvedFontCss),this.editor.embedExtFonts(mxUtils.bind(this,function(c){try{null!=c&&this.editor.addFontCss(a,c),b(a)}catch(n){b(a)}}))}catch(g){b(a)}}))};
-EditorUi.prototype.exportImage=function(a,b,d,f,k,m,p,t,A,x,G,z,E){A=null!=A?A:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var c=this.editor.graph.isSelectionEmpty();d=null!=d?d:c;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.editor.exportToCanvas(mxUtils.bind(this,function(a){this.spinner.stop();try{this.saveCanvas(a,k?this.getFileData(!0,null,null,null,d,t):null,A,null==this.pages||0==this.pages.length,G)}catch(F){this.handleError(F)}}),null,this.thumbImageCache,
-null,mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),null,d,a||1,b,f,null,null,m,p,x,z,E)}catch(K){this.spinner.stop(),this.handleError(K)}}};EditorUi.prototype.isCorsEnabledForUrl=function(a){return this.editor.isCorsEnabledForUrl(a)};EditorUi.prototype.importXml=function(a,b,d,f,k,m,p){b=null!=b?b:0;d=null!=d?d:0;var c=[];try{var e=this.editor.graph;if(null!=a&&0<a.length){e.model.beginUpdate();try{var g=mxUtils.parseXml(a);a={};var l=this.editor.extractGraphModel(g.documentElement,
+a){if(a.hasAttribute("scale")){var d=parseFloat(a.getAttribute("scale"));!isNaN(d)&&0<d&&(c=d)}a.hasAttribute("border")&&(d=parseInt(a.getAttribute("border")),!isNaN(d)&&0<d&&(b=d))}return{scale:c,border:b}};EditorUi.prototype.getEmbeddedPng=function(a,b,d,f,g){try{var c=this.editor.graph,e=null!=c.themes&&"darkTheme"==c.defaultThemeName,k=null;if(null!=d&&0<d.length)c=this.createTemporaryGraph(this.editor.graph.getStylesheet()),document.body.appendChild(c.container),this.decodeNodeIntoGraph(this.editor.extractGraphModel(mxUtils.parseXml(d).documentElement,
+!0),c),k=d;else if(e||null!=this.pages&&this.currentPage!=this.pages[0]){var c=this.createTemporaryGraph(c.getStylesheet()),l=c.getGlobalVariable,n=this.pages[0];c.getGlobalVariable=function(a){return"page"==a?n.getName():"pagenumber"==a?1:l.apply(this,arguments)};document.body.appendChild(c.container);c.model.setRoot(n.root)}this.editor.exportToCanvas(mxUtils.bind(this,function(d){try{null==k&&(k=this.getFileData(!0,null,null,null,null,null,null,null,null,!1));var e=d.toDataURL("image/png"),e=Editor.writeGraphModelToPng(e,
+"tEXt","mxfile",encodeURIComponent(k));a(e.substring(e.lastIndexOf(",")+1));c!=this.editor.graph&&c.container.parentNode.removeChild(c.container)}catch(E){null!=b&&b(E)}}),null,null,null,mxUtils.bind(this,function(a){null!=b&&b(a)}),null,null,f,null,c.shadowVisible,null,c,g)}catch(G){null!=b&&b(G)}};EditorUi.prototype.getEmbeddedSvg=function(a,b,d,f,g,m,p,t,A,x,G,z,E){t=null!=t?t:!0;p=null!=A?A:b.background;p==mxConstants.NONE&&(p=null);m=b.getSvg(p,x,G,null,null,m,null,null,null,b.shadowVisible||
+z,null,E);(b.shadowVisible||z)&&b.addSvgShadow(m);null!=a&&m.setAttribute("content",a);null!=d&&m.setAttribute("resource",d);if(null!=g)this.embedFonts(m,mxUtils.bind(this,function(a){t?this.editor.convertImages(a,mxUtils.bind(this,function(a){g((f?"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+mxUtils.getXml(a))})):g((f?"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+
+mxUtils.getXml(a))}));else return(f?"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+mxUtils.getXml(m)};EditorUi.prototype.embedFonts=function(a,b){this.editor.loadFonts(mxUtils.bind(this,function(){try{null!=this.editor.resolvedFontCss&&this.editor.addFontCss(a,this.editor.resolvedFontCss),this.editor.embedExtFonts(mxUtils.bind(this,function(c){try{null!=c&&this.editor.addFontCss(a,c),b(a)}catch(n){b(a)}}))}catch(k){b(a)}}))};
+EditorUi.prototype.exportImage=function(a,b,d,f,g,m,p,t,A,x,G,z,E){A=null!=A?A:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var c=this.editor.graph.isSelectionEmpty();d=null!=d?d:c;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.editor.exportToCanvas(mxUtils.bind(this,function(a){this.spinner.stop();try{this.saveCanvas(a,g?this.getFileData(!0,null,null,null,d,t):null,A,null==this.pages||0==this.pages.length,G)}catch(F){this.handleError(F)}}),null,this.thumbImageCache,
+null,mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),null,d,a||1,b,f,null,null,m,p,x,z,E)}catch(K){this.spinner.stop(),this.handleError(K)}}};EditorUi.prototype.isCorsEnabledForUrl=function(a){return this.editor.isCorsEnabledForUrl(a)};EditorUi.prototype.importXml=function(a,b,d,f,g,m,p){b=null!=b?b:0;d=null!=d?d:0;var c=[];try{var e=this.editor.graph;if(null!=a&&0<a.length){e.model.beginUpdate();try{var k=mxUtils.parseXml(a);a={};var l=this.editor.extractGraphModel(k.documentElement,
null!=this.pages);if(null!=l&&"mxfile"==l.nodeName&&null!=this.pages){var n=l.getElementsByTagName("diagram");if(1==n.length&&!m){if(l=Editor.parseDiagramNode(n[0]),null!=this.currentPage&&(a[n[0].getAttribute("id")]=this.currentPage.getId(),null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&this.currentPage.getName()==mxResources.get("pageWithNumber",[1]))){var q=n[0].getAttribute("name");null!=q&&""!=q&&this.editor.graph.model.execute(new RenamePage(this,this.currentPage,q))}}else if(0<
n.length){m=[];var u=0;null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&(a[n[0].getAttribute("id")]=this.pages[0].getId(),l=Editor.parseDiagramNode(n[0]),f=!1,u=1);for(;u<n.length;u++){var K=n[u].getAttribute("id");n[u].removeAttribute("id");var F=this.updatePageRoot(new DiagramPage(n[u]));a[K]=n[u].getAttribute("id");var I=this.pages.length;null==F.getName()&&F.setName(mxResources.get("pageWithNumber",[I+1]));e.model.execute(new ChangePage(this,F,F,I,!0));m.push(F)}this.updatePageLinks(a,
-m)}}if(null!=l&&"mxGraphModel"===l.nodeName&&(c=e.importGraphModel(l,b,d,f),null!=c))for(u=0;u<c.length;u++)this.updatePageLinksForCell(a,c[u]);p&&this.insertHandler(c,null,null,Graph.prototype.defaultVertexStyle,Graph.prototype.defaultEdgeStyle,!0,!0)}finally{e.model.endUpdate()}}}catch(C){if(k)throw C;this.handleError(C)}return c};EditorUi.prototype.updatePageLinks=function(a,b){for(var c=0;c<b.length;c++)this.updatePageLinksForCell(a,b[c].root)};EditorUi.prototype.updatePageLinksForCell=function(a,
-b){var c=document.createElement("div"),d=this.editor.graph,e=d.getLinkForCell(b);null!=e&&d.setLinkForCell(b,this.updatePageLink(a,e));if(d.isHtmlLabel(b)){c.innerHTML=d.sanitizeHtml(d.getLabel(b));for(var f=c.getElementsByTagName("a"),k=!1,m=0;m<f.length;m++)e=f[m].getAttribute("href"),null!=e&&(f[m].setAttribute("href",this.updatePageLink(a,e)),k=!0);k&&d.labelChanged(b,c.innerHTML)}for(m=0;m<d.model.getChildCount(b);m++)this.updatePageLinksForCell(a,d.model.getChildAt(b,m))};EditorUi.prototype.updatePageLink=
-function(a,b){if(Graph.isPageLink(b)){var c=a[b.substring(b.indexOf(",")+1)];b=null!=c?"data:page/id,"+c:null}else if("data:action/json,"==b.substring(0,17))try{var d=JSON.parse(b.substring(17));if(null!=d.actions){for(var e=0;e<d.actions.length;e++){var f=d.actions[e];if(null!=f.open&&Graph.isPageLink(f.open)){var k=f.open.substring(f.open.indexOf(",")+1),c=a[k];null!=c?f.open="data:page/id,"+c:null==this.getPageById(k)&&delete f.open}}b="data:action/json,"+JSON.stringify(d)}}catch(t){}return b};
-EditorUi.prototype.isRemoteVisioFormat=function(a){return/(\.v(sd|dx))($|\?)/i.test(a)||/(\.vs(s|x))($|\?)/i.test(a)};EditorUi.prototype.importVisio=function(a,b,d,f,k){f=null!=f?f:a.name;d=null!=d?d:mxUtils.bind(this,function(a){this.handleError(a)});var c=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio){var c=this.isRemoteVisioFormat(f);try{var e="UNKNOWN-VISIO",g=f.lastIndexOf(".");if(0<=g&&g<f.length)e=f.substring(g+1).toUpperCase();else{var l=f.lastIndexOf("/");0<=
+m)}}if(null!=l&&"mxGraphModel"===l.nodeName&&(c=e.importGraphModel(l,b,d,f),null!=c))for(u=0;u<c.length;u++)this.updatePageLinksForCell(a,c[u]);p&&this.insertHandler(c,null,null,Graph.prototype.defaultVertexStyle,Graph.prototype.defaultEdgeStyle,!0,!0)}finally{e.model.endUpdate()}}}catch(D){if(g)throw D;this.handleError(D)}return c};EditorUi.prototype.updatePageLinks=function(a,b){for(var c=0;c<b.length;c++)this.updatePageLinksForCell(a,b[c].root)};EditorUi.prototype.updatePageLinksForCell=function(a,
+b){var c=document.createElement("div"),d=this.editor.graph,e=d.getLinkForCell(b);null!=e&&d.setLinkForCell(b,this.updatePageLink(a,e));if(d.isHtmlLabel(b)){c.innerHTML=d.sanitizeHtml(d.getLabel(b));for(var f=c.getElementsByTagName("a"),g=!1,m=0;m<f.length;m++)e=f[m].getAttribute("href"),null!=e&&(f[m].setAttribute("href",this.updatePageLink(a,e)),g=!0);g&&d.labelChanged(b,c.innerHTML)}for(m=0;m<d.model.getChildCount(b);m++)this.updatePageLinksForCell(a,d.model.getChildAt(b,m))};EditorUi.prototype.updatePageLink=
+function(a,b){if(Graph.isPageLink(b)){var c=a[b.substring(b.indexOf(",")+1)];b=null!=c?"data:page/id,"+c:null}else if("data:action/json,"==b.substring(0,17))try{var d=JSON.parse(b.substring(17));if(null!=d.actions){for(var e=0;e<d.actions.length;e++){var f=d.actions[e];if(null!=f.open&&Graph.isPageLink(f.open)){var g=f.open.substring(f.open.indexOf(",")+1),c=a[g];null!=c?f.open="data:page/id,"+c:null==this.getPageById(g)&&delete f.open}}b="data:action/json,"+JSON.stringify(d)}}catch(t){}return b};
+EditorUi.prototype.isRemoteVisioFormat=function(a){return/(\.v(sd|dx))($|\?)/i.test(a)||/(\.vs(s|x))($|\?)/i.test(a)};EditorUi.prototype.importVisio=function(a,b,d,f,g){f=null!=f?f:a.name;d=null!=d?d:mxUtils.bind(this,function(a){this.handleError(a)});var c=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio){var c=this.isRemoteVisioFormat(f);try{var e="UNKNOWN-VISIO",k=f.lastIndexOf(".");if(0<=k&&k<f.length)e=f.substring(k+1).toUpperCase();else{var l=f.lastIndexOf("/");0<=
l&&l<f.length&&(f=f.substring(l+1))}EditorUi.logEvent({category:e+"-MS-IMPORT-FILE",action:"filename_"+f,label:c?"remote":"local"})}catch(z){}if(c)if(null==VSD_CONVERT_URL||this.isOffline())d({message:"conf"==this.getServiceName()?mxResources.get("vsdNoConfig"):mxResources.get("serviceUnavailableOrBlocked")});else{c=new FormData;c.append("file1",a,f);var n=new XMLHttpRequest;n.open("POST",VSD_CONVERT_URL+(/(\.vss|\.vsx)$/.test(f)?"?stencil=1":""));n.responseType="blob";this.addRemoteServiceSecurityCheck(n);
-null!=k&&n.setRequestHeader("x-convert-custom",k);n.onreadystatechange=mxUtils.bind(this,function(){if(4==n.readyState)if(200<=n.status&&299>=n.status)try{var a=n.response;if("text/xml"==a.type){var c=new FileReader;c.onload=mxUtils.bind(this,function(a){try{b(a.target.result)}catch(K){d({message:mxResources.get("errorLoadingFile")})}});c.readAsText(a)}else this.doImportVisio(a,b,d,f)}catch(H){d(H)}else try{""==n.responseType||"text"==n.responseType?d({message:n.responseText}):(c=new FileReader,c.onload=
+null!=g&&n.setRequestHeader("x-convert-custom",g);n.onreadystatechange=mxUtils.bind(this,function(){if(4==n.readyState)if(200<=n.status&&299>=n.status)try{var a=n.response;if("text/xml"==a.type){var c=new FileReader;c.onload=mxUtils.bind(this,function(a){try{b(a.target.result)}catch(K){d({message:mxResources.get("errorLoadingFile")})}});c.readAsText(a)}else this.doImportVisio(a,b,d,f)}catch(H){d(H)}else try{""==n.responseType||"text"==n.responseType?d({message:n.responseText}):(c=new FileReader,c.onload=
function(){d({message:JSON.parse(c.result).Message})},c.readAsText(n.response))}catch(H){d({})}});n.send(c)}else try{this.doImportVisio(a,b,d,f)}catch(z){d(z)}}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(a,b,d){d=null!=d?d:mxUtils.bind(this,function(a){this.handleError(a)});
var c=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportGraphML)try{this.doImportGraphML(a,b,d)}catch(l){d(l)}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportGraphML||this.loadingExtensions||this.isOffline(!0)?c():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",c))};EditorUi.prototype.exportVisio=function(a){var c=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof VsdxExport)try{(new VsdxExport(this)).exportCurrentDiagrams(a)||
-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)?c():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",c))};EditorUi.prototype.convertLucidChart=function(a,b,d){var c=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof window.LucidImporter){try{EditorUi.logEvent({category:"LUCIDCHART-IMPORT-FILE",
+this.handleError({message:mxResources.get("unknownError")})}catch(k){this.handleError(k)}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof VsdxExport||this.loadingExtensions||this.isOffline(!0)?c():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",c))};EditorUi.prototype.convertLucidChart=function(a,b,d){var c=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof window.LucidImporter){try{EditorUi.logEvent({category:"LUCIDCHART-IMPORT-FILE",
action:"size_"+a.length}),EditorUi.debug("convertLucidChart",a)}catch(l){}try{b(LucidImporter.importState(JSON.parse(a)))}catch(l){null!=window.console&&console.error(l),d(l)}}else d({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof window.LucidImporter||this.loadingExtensions||this.isOffline(!0)?window.setTimeout(c,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",c)})})})}):mxscript("js/extensions.min.js",c))};EditorUi.prototype.generateMermaidImage=function(a,b,d,f){var c=this,e=function(){try{this.loadingMermaid=!1,b=null!=b?b:EditorUi.defaultMermaidConfig,b.securityLevel="strict",b.startOnLoad=!1,mermaid.mermaidAPI.initialize(b),mermaid.mermaidAPI.render("geMermaidOutput-"+(new Date).getTime(),a,function(a){try{if(mxClient.IS_IE||mxClient.IS_IE11)a=
-a.replace(/ xmlns:\S*="http:\/\/www.w3.org\/XML\/1998\/namespace"/g,"").replace(/ (NS xml|\S*):space="preserve"/g,' xml:space="preserve"');var b=mxUtils.parseXml(a).getElementsByTagName("svg");if(0<b.length){var e=parseFloat(b[0].getAttribute("width")),g=parseFloat(b[0].getAttribute("height"));if(isNaN(e)||isNaN(g))try{var k=b[0].getAttribute("viewBox").split(/\s+/),e=parseFloat(k[2]),g=parseFloat(k[3])}catch(z){e=e||100,g=g||100}d(c.convertDataUri(Editor.createSvgDataUri(a)),e,g)}else f({message:mxResources.get("invalidInput")})}catch(z){f(z)}})}catch(u){f(u)}};
+a.replace(/ xmlns:\S*="http:\/\/www.w3.org\/XML\/1998\/namespace"/g,"").replace(/ (NS xml|\S*):space="preserve"/g,' xml:space="preserve"');var b=mxUtils.parseXml(a).getElementsByTagName("svg");if(0<b.length){var e=parseFloat(b[0].getAttribute("width")),k=parseFloat(b[0].getAttribute("height"));if(isNaN(e)||isNaN(k))try{var g=b[0].getAttribute("viewBox").split(/\s+/),e=parseFloat(g[2]),k=parseFloat(g[3])}catch(z){e=e||100,k=k||100}d(c.convertDataUri(Editor.createSvgDataUri(a)),e,k)}else f({message:mxResources.get("invalidInput")})}catch(z){f(z)}})}catch(u){f(u)}};
"undefined"!==typeof mermaid||this.loadingMermaid||this.isOffline(!0)?e():(this.loadingMermaid=!0,"1"==urlParams.dev?mxscript("js/mermaid/mermaid.min.js",e):mxscript("js/extensions.min.js",e))};EditorUi.prototype.generatePlantUmlImage=function(a,b,d,f){function c(a,c,b){c1=a>>2;c2=(a&3)<<4|c>>4;c3=(c&15)<<2|b>>6;c4=b&63;r="";r+=e(c1&63);r+=e(c2&63);r+=e(c3&63);return r+=e(c4&63)}function e(a){if(10>a)return String.fromCharCode(48+a);a-=10;if(26>a)return String.fromCharCode(65+a);a-=26;if(26>a)return String.fromCharCode(97+
-a);a-=26;return 0==a?"-":1==a?"_":"?"}var g=new XMLHttpRequest;g.open("GET",("txt"==b?PLANT_URL+"/txt/":"png"==b?PLANT_URL+"/png/":PLANT_URL+"/svg/")+function(a){r="";for(i=0;i<a.length;i+=3)r=i+2==a.length?r+c(a.charCodeAt(i),a.charCodeAt(i+1),0):i+1==a.length?r+c(a.charCodeAt(i),0,0):r+c(a.charCodeAt(i),a.charCodeAt(i+1),a.charCodeAt(i+2));return r}(Graph.arrayBufferToString(pako.deflateRaw(a))),!0);"txt"!=b&&(g.responseType="blob");g.onload=function(a){if(200<=this.status&&300>this.status)if("txt"==
-b)d(this.response);else{var c=new FileReader;c.readAsDataURL(this.response);c.onloadend=function(a){var b=new Image;b.onload=function(){try{var a=b.width,e=b.height;if(0==a&&0==e){var g=c.result,k=g.indexOf(","),l=decodeURIComponent(escape(atob(g.substring(k+1)))),n=mxUtils.parseXml(l).getElementsByTagName("svg");0<n.length&&(a=parseFloat(n[0].getAttribute("width")),e=parseFloat(n[0].getAttribute("height")))}d(c.result,a,e)}catch(C){f(C)}};b.src=c.result};c.onerror=function(a){f(a)}}else f(a)};g.onerror=
-function(a){f(a)};g.send()};EditorUi.prototype.insertAsPreText=function(a,b,d){var c=this.editor.graph,e=null;c.getModel().beginUpdate();try{e=c.insertVertex(null,null,"<pre>"+a+"</pre>",b,d,1,1,"text;html=1;align=left;verticalAlign=top;"),c.updateCellSize(e,!0)}finally{c.getModel().endUpdate()}return e};EditorUi.prototype.insertTextAt=function(a,b,d,f,k,m,p,t){m=null!=m?m:!0;p=null!=p?p:!0;if(null!=a)if(Graph.fileSupport&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a))this.parseFile(new Blob([a.replace(/\s+/g,
-" ")],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&200<=a.status&&299>=a.status&&this.editor.graph.setSelectionCells(this.insertTextAt(a.responseText,b,d,!0))}));else if("data:"==a.substring(0,5)||!this.isOffline()&&(k||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(a))){var c=this.editor.graph;if("data:application/pdf;base64,"==a.substring(0,28)){var e=Editor.extractGraphModelFromPdf(a);if(null!=e&&0<e.length)return this.importXml(e,b,d,m,!0,t)}if("data:image/png;base64,"==
-a.substring(0,22)&&(e=this.extractGraphModelFromPng(a),null!=e&&0<e.length))return this.importXml(e,b,d,m,!0,t);if("data:image/svg+xml;"==a.substring(0,19))try{e=null;"data:image/svg+xml;base64,"==a.substring(0,26)?(e=a.substring(a.indexOf(",")+1),e=window.atob&&!mxClient.IS_SF?atob(e):Base64.decode(e,!0)):e=decodeURIComponent(a.substring(a.indexOf(",")+1));var g=this.importXml(e,b,d,m,!0,t);if(0<g.length)return g}catch(E){}this.loadImage(a,mxUtils.bind(this,function(e){if("data:"==a.substring(0,
-5))this.resizeImage(e,a,mxUtils.bind(this,function(a,e,f){c.setSelectionCell(c.insertVertex(null,null,"",c.snap(b),c.snap(d),e,f,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(a)+";"))}),p,this.maxImageSize);else{var f=Math.min(1,Math.min(this.maxImageSize/e.width,this.maxImageSize/e.height)),g=Math.round(e.width*f);e=Math.round(e.height*f);c.setSelectionCell(c.insertVertex(null,null,"",c.snap(b),c.snap(d),
-g,e,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+a+";"))}}),mxUtils.bind(this,function(){var e=null;c.getModel().beginUpdate();try{e=c.insertVertex(c.getDefaultParent(),null,a,c.snap(b),c.snap(d),1,1,"text;"+(f?"html=1;":"")),c.updateCellSize(e),c.fireEvent(new mxEventObject("textInserted","cells",[e]))}finally{c.getModel().endUpdate()}c.setSelectionCell(e)}))}else{a=Graph.zapGremlins(mxUtils.trim(a));if(this.isCompatibleString(a))return this.importXml(a,
-b,d,m,null,t);if(0<a.length)if(this.isLucidChartData(a))this.convertLucidChart(a,mxUtils.bind(this,function(a){this.editor.graph.setSelectionCells(this.importXml(a,b,d,m,null,t))}),mxUtils.bind(this,function(a){this.handleError(a)}));else{c=this.editor.graph;k=null;c.getModel().beginUpdate();try{k=c.insertVertex(c.getDefaultParent(),null,"",c.snap(b),c.snap(d),1,1,"text;whiteSpace=wrap;"+(f?"html=1;":""));c.fireEvent(new mxEventObject("textInserted","cells",[k]));"<"==a.charAt(0)&&a.indexOf(">")==
-a.length-1&&(a=mxUtils.htmlEntities(a));a.length>this.maxTextBytes&&(a=a.substring(0,this.maxTextBytes)+"...");k.value=a;c.updateCellSize(k);if(0<this.maxTextWidth&&k.geometry.width>this.maxTextWidth){var l=c.getPreferredSizeForCell(k,this.maxTextWidth);k.geometry.width=l.width;k.geometry.height=l.height}Graph.isLink(k.value)&&c.setLinkForCell(k,k.value);k.geometry.width+=c.gridSize;k.geometry.height+=c.gridSize}finally{c.getModel().endUpdate()}return[k]}}return[]};EditorUi.prototype.formatFileSize=
+a);a-=26;return 0==a?"-":1==a?"_":"?"}var k=new XMLHttpRequest;k.open("GET",("txt"==b?PLANT_URL+"/txt/":"png"==b?PLANT_URL+"/png/":PLANT_URL+"/svg/")+function(a){r="";for(i=0;i<a.length;i+=3)r=i+2==a.length?r+c(a.charCodeAt(i),a.charCodeAt(i+1),0):i+1==a.length?r+c(a.charCodeAt(i),0,0):r+c(a.charCodeAt(i),a.charCodeAt(i+1),a.charCodeAt(i+2));return r}(Graph.arrayBufferToString(pako.deflateRaw(a))),!0);"txt"!=b&&(k.responseType="blob");k.onload=function(a){if(200<=this.status&&300>this.status)if("txt"==
+b)d(this.response);else{var c=new FileReader;c.readAsDataURL(this.response);c.onloadend=function(a){var b=new Image;b.onload=function(){try{var a=b.width,e=b.height;if(0==a&&0==e){var k=c.result,g=k.indexOf(","),l=decodeURIComponent(escape(atob(k.substring(g+1)))),n=mxUtils.parseXml(l).getElementsByTagName("svg");0<n.length&&(a=parseFloat(n[0].getAttribute("width")),e=parseFloat(n[0].getAttribute("height")))}d(c.result,a,e)}catch(D){f(D)}};b.src=c.result};c.onerror=function(a){f(a)}}else f(a)};k.onerror=
+function(a){f(a)};k.send()};EditorUi.prototype.insertAsPreText=function(a,b,d){var c=this.editor.graph,e=null;c.getModel().beginUpdate();try{e=c.insertVertex(null,null,"<pre>"+a+"</pre>",b,d,1,1,"text;html=1;align=left;verticalAlign=top;"),c.updateCellSize(e,!0)}finally{c.getModel().endUpdate()}return e};EditorUi.prototype.insertTextAt=function(a,b,d,f,g,m,p,t){m=null!=m?m:!0;p=null!=p?p:!0;if(null!=a)if(Graph.fileSupport&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a))this.parseFile(new Blob([a.replace(/\s+/g,
+" ")],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&200<=a.status&&299>=a.status&&this.editor.graph.setSelectionCells(this.insertTextAt(a.responseText,b,d,!0))}));else if("data:"==a.substring(0,5)||!this.isOffline()&&(g||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(a))){var c=this.editor.graph;if("data:application/pdf;base64,"==a.substring(0,28)){var e=Editor.extractGraphModelFromPdf(a);if(null!=e&&0<e.length)return this.importXml(e,b,d,m,!0,t)}if("data:image/png;base64,"==
+a.substring(0,22)&&(e=this.extractGraphModelFromPng(a),null!=e&&0<e.length))return this.importXml(e,b,d,m,!0,t);if("data:image/svg+xml;"==a.substring(0,19))try{e=null;"data:image/svg+xml;base64,"==a.substring(0,26)?(e=a.substring(a.indexOf(",")+1),e=window.atob&&!mxClient.IS_SF?atob(e):Base64.decode(e,!0)):e=decodeURIComponent(a.substring(a.indexOf(",")+1));var k=this.importXml(e,b,d,m,!0,t);if(0<k.length)return k}catch(E){}this.loadImage(a,mxUtils.bind(this,function(e){if("data:"==a.substring(0,
+5))this.resizeImage(e,a,mxUtils.bind(this,function(a,e,f){c.setSelectionCell(c.insertVertex(null,null,"",c.snap(b),c.snap(d),e,f,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(a)+";"))}),p,this.maxImageSize);else{var f=Math.min(1,Math.min(this.maxImageSize/e.width,this.maxImageSize/e.height)),k=Math.round(e.width*f);e=Math.round(e.height*f);c.setSelectionCell(c.insertVertex(null,null,"",c.snap(b),c.snap(d),
+k,e,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+a+";"))}}),mxUtils.bind(this,function(){var e=null;c.getModel().beginUpdate();try{e=c.insertVertex(c.getDefaultParent(),null,a,c.snap(b),c.snap(d),1,1,"text;"+(f?"html=1;":"")),c.updateCellSize(e),c.fireEvent(new mxEventObject("textInserted","cells",[e]))}finally{c.getModel().endUpdate()}c.setSelectionCell(e)}))}else{a=Graph.zapGremlins(mxUtils.trim(a));if(this.isCompatibleString(a))return this.importXml(a,
+b,d,m,null,t);if(0<a.length)if(this.isLucidChartData(a))this.convertLucidChart(a,mxUtils.bind(this,function(a){this.editor.graph.setSelectionCells(this.importXml(a,b,d,m,null,t))}),mxUtils.bind(this,function(a){this.handleError(a)}));else{c=this.editor.graph;g=null;c.getModel().beginUpdate();try{g=c.insertVertex(c.getDefaultParent(),null,"",c.snap(b),c.snap(d),1,1,"text;whiteSpace=wrap;"+(f?"html=1;":""));c.fireEvent(new mxEventObject("textInserted","cells",[g]));"<"==a.charAt(0)&&a.indexOf(">")==
+a.length-1&&(a=mxUtils.htmlEntities(a));a.length>this.maxTextBytes&&(a=a.substring(0,this.maxTextBytes)+"...");g.value=a;c.updateCellSize(g);if(0<this.maxTextWidth&&g.geometry.width>this.maxTextWidth){var l=c.getPreferredSizeForCell(g,this.maxTextWidth);g.geometry.width=l.width;g.geometry.height=l.height}Graph.isLink(g.value)&&c.setLinkForCell(g,g.value);g.geometry.width+=c.gridSize;g.geometry.height+=c.gridSize}finally{c.getModel().endUpdate()}return[g]}}return[]};EditorUi.prototype.formatFileSize=
function(a){var c=-1;do a/=1024,c++;while(1024<a);return Math.max(a,.1).toFixed(1)+" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[c]};EditorUi.prototype.convertDataUri=function(a){if("data:"==a.substring(0,5)){var c=a.indexOf(";");0<c&&(a=a.substring(0,c)+a.substring(a.indexOf(",",c+1)))}return a};EditorUi.prototype.isRemoteFileFormat=function(a,b){return/(\"contentType\":\s*\"application\/gliffy\+json\")/.test(a)};EditorUi.prototype.isLucidChartData=function(a){return null!=a&&('{"state":"{\\"Properties\\":'==
a.substring(0,26)||'{"Properties":'==a.substring(0,14))};EditorUi.prototype.importLocalFile=function(a,b){if(a&&Graph.fileSupport){if(null==this.importFileInputElt){var c=document.createElement("input");c.setAttribute("type","file");mxEvent.addListener(c,"change",mxUtils.bind(this,function(){null!=c.files&&(this.importFiles(c.files,null,null,this.maxImageSize),c.type="",c.type="file",c.value="")}));c.style.display="none";document.body.appendChild(c);this.importFileInputElt=c}this.importFileInputElt.click()}else{window.openNew=
!1;window.openKey="import";window.listBrowserFiles=mxUtils.bind(this,function(a,c){StorageFile.listFiles(this,"F",a,c)});window.openBrowserFile=mxUtils.bind(this,function(a,c,b){StorageFile.getFileContent(this,a,c,b)});window.deleteBrowserFile=mxUtils.bind(this,function(a,c,b){StorageFile.deleteFile(this,a,c,b)});if(!b){var d=Editor.useLocalStorage;Editor.useLocalStorage=!a}window.openFile=new OpenFile(mxUtils.bind(this,function(a){this.hideDialog(a)}));window.openFile.setConsumer(mxUtils.bind(this,
function(a,c){if(null!=c&&Graph.fileSupport&&/(\.v(dx|sdx?))($|\?)/i.test(c)){var b=new Blob([a],{type:"application/octet-stream"});this.importVisio(b,mxUtils.bind(this,function(a){this.importXml(a,0,0,!0)}),null,c)}else this.editor.graph.setSelectionCells(this.importXml(a,0,0,!0))}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:360,Editor.useLocalStorage?480:220,!0,!0,function(){window.openFile=null});if(!b){var e=this.dialog,f=e.close;this.dialog.close=mxUtils.bind(this,
-function(a){Editor.useLocalStorage=d;f.apply(e,arguments);a&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}};EditorUi.prototype.importZipFile=function(a,b,d){var c=this,e=mxUtils.bind(this,function(){this.loadingExtensions=!1;"undefined"!==typeof JSZip?JSZip.loadAsync(a).then(function(e){if(0==Object.keys(e.files).length)d();else{var f=0,g,k=!1;e.forEach(function(a,c){var e=c.name.toLowerCase();"diagram/diagram.xml"==e?(k=!0,c.async("string").then(function(a){0==a.indexOf("<mxfile ")?
-b(a):d()})):0==e.indexOf("versions/")&&(e=parseInt(e.substr(9)),e>f&&(f=e,g=c))});0<f?g.async("string").then(function(e){!c.isOffline()&&(new XMLHttpRequest).upload&&c.isRemoteFileFormat(e,a.name)?c.parseFile(new Blob([e],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&(200<=a.status&&299>=a.status?b(a.responseText):d())}),a.name):d()}):k||d()}},function(a){d(a)}):d()});"undefined"!==typeof JSZip||this.loadingExtensions||this.isOffline(!0)?e():(this.loadingExtensions=
-!0,mxscript("js/extensions.min.js",e))};EditorUi.prototype.importFile=function(a,b,d,f,k,m,p,t,A,x,G,z){x=null!=x?x:!0;var c=!1,e=null,g=mxUtils.bind(this,function(a){var c=null;null!=a&&"<mxlibrary"==a.substring(0,10)?this.loadLibrary(new LocalLibrary(this,a,p)):c=this.importXml(a,d,f,x,null,null!=z?mxEvent.isControlDown(z):null);null!=t&&t(c)});"image"==b.substring(0,5)?(A=!1,"image/png"==b.substring(0,9)&&(b=G?null:this.extractGraphModelFromPng(a),null!=b&&0<b.length&&(e=this.importXml(b,d,f,x,
-null,null!=z?mxEvent.isControlDown(z):null),A=!0)),A||(b=this.editor.graph,G=a.indexOf(";"),0<G&&(a=a.substring(0,G)+a.substring(a.indexOf(",",G+1))),x&&b.isGridEnabled()&&(d=b.snap(d),f=b.snap(f)),e=[b.insertVertex(null,null,"",d,f,k,m,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+a+";")])):/(\.*<graphml )/.test(a)?(c=!0,this.importGraphML(a,g)):null!=A&&null!=p&&(/(\.v(dx|sdx?))($|\?)/i.test(p)||/(\.vs(x|sx?))($|\?)/i.test(p))?
-(c=!0,this.importVisio(A,g)):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a,p)?(c=!0,this.parseFile(null!=A?A:new Blob([a],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&(200<=a.status&&299>=a.status?g(a.responseText):null!=t&&t(null))}),p)):0==a.indexOf("PK")&&null!=A?(c=!0,this.importZipFile(A,g,mxUtils.bind(this,function(){e=this.insertTextAt(this.validateFileData(a),d,f,!0,null,x);t(e)}))):/(\.v(sd|dx))($|\?)/i.test(p)||/(\.vs(s|x))($|\?)/i.test(p)||
-(e=this.insertTextAt(this.validateFileData(a),d,f,!0,null,x,null,null!=z?mxEvent.isControlDown(z):null));c||null==t||t(e);return e};EditorUi.prototype.importFiles=function(a,b,d,f,k,m,p,t,A,x,G,z,E){f=null!=f?f:this.maxImageSize;x=null!=x?x:this.maxImageBytes;var c=null!=b&&null!=d,e=!0;b=null!=b?b:0;d=null!=d?d:0;var g=!1;if(!mxClient.IS_CHROMEAPP&&null!=a)for(var l=G||this.resampleThreshold,n=0;n<a.length;n++)if("image/"==a[n].type.substring(0,6)&&a[n].size>l){g=!0;break}var q=mxUtils.bind(this,
-function(){var g=this.editor.graph,l=g.gridSize;k=null!=k?k:mxUtils.bind(this,function(a,b,d,e,f,g,k,l,n){try{return null!=a&&"<mxlibrary"==a.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,a,k)),null):this.importFile(a,b,d,e,f,g,k,l,n,c,z,E)}catch(ca){return this.handleError(ca),null}});m=null!=m?m:mxUtils.bind(this,function(a){g.setSelectionCells(a)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var n=a.length,q=n,u=[],C=mxUtils.bind(this,function(a,
-c){u[a]=c;if(0==--q){this.spinner.stop();if(null!=t)t(u);else{var b=[];g.getModel().beginUpdate();try{for(var d=0;d<u.length;d++){var e=u[d]();null!=e&&(b=b.concat(e))}}finally{g.getModel().endUpdate()}}m(b)}}),A=0;A<n;A++)mxUtils.bind(this,function(c){var n=a[c];if(null!=n){var m=new FileReader;m.onload=mxUtils.bind(this,function(a){if(null==p||p(n))if("image/"==n.type.substring(0,6))if("image/svg"==n.type.substring(0,9)){var m=Graph.clipSvgDataUri(a.target.result),q=m.indexOf(","),v=decodeURIComponent(escape(atob(m.substring(q+
-1)))),u=mxUtils.parseXml(v),v=u.getElementsByTagName("svg");if(0<v.length){var v=v[0],t=z?null:v.getAttribute("content");null!=t&&"<"!=t.charAt(0)&&"%"!=t.charAt(0)&&(t=unescape(window.atob?atob(t):Base64.decode(t,!0)));null!=t&&"%"==t.charAt(0)&&(t=decodeURIComponent(t));null==t||"<mxfile "!==t.substring(0,8)&&"<mxGraphModel "!==t.substring(0,14)?C(c,mxUtils.bind(this,function(){try{if(m.substring(0,q+1),null!=u){var a=u.getElementsByTagName("svg");if(0<a.length){var e=a[0],p=e.getAttribute("width"),
-v=e.getAttribute("height"),p=null!=p&&"%"!=p.charAt(p.length-1)?parseFloat(p):NaN,v=null!=v&&"%"!=v.charAt(v.length-1)?parseFloat(v):NaN,t=e.getAttribute("viewBox");if(null==t||0==t.length)e.setAttribute("viewBox","0 0 "+p+" "+v);else if(isNaN(p)||isNaN(v)){var x=t.split(" ");3<x.length&&(p=parseFloat(x[2]),v=parseFloat(x[3]))}m=Editor.createSvgDataUri(mxUtils.getXml(e));var z=Math.min(1,Math.min(f/Math.max(1,p)),f/Math.max(1,v)),C=k(m,n.type,b+c*l,d+c*l,Math.max(1,Math.round(p*z)),Math.max(1,Math.round(v*
-z)),n.name);if(isNaN(p)||isNaN(v)){var N=new Image;N.onload=mxUtils.bind(this,function(){p=Math.max(1,N.width);v=Math.max(1,N.height);C[0].geometry.width=p;C[0].geometry.height=v;e.setAttribute("viewBox","0 0 "+p+" "+v);m=Editor.createSvgDataUri(mxUtils.getXml(e));var a=m.indexOf(";");0<a&&(m=m.substring(0,a)+m.substring(m.indexOf(",",a+1)));g.setCellStyles("image",m,[C[0]])});N.src=Editor.createSvgDataUri(mxUtils.getXml(e))}return C}}}catch(ba){}return null})):C(c,mxUtils.bind(this,function(){return k(t,
-"text/xml",b+c*l,d+c*l,0,0,n.name)}))}else C(c,mxUtils.bind(this,function(){return null}))}else{v=!1;if("image/png"==n.type){var N=z?null:this.extractGraphModelFromPng(a.target.result);if(null!=N&&0<N.length){var B=new Image;B.src=a.target.result;C(c,mxUtils.bind(this,function(){return k(N,"text/xml",b+c*l,d+c*l,B.width,B.height,n.name)}));v=!0}}v||(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(a.target.result,mxUtils.bind(this,function(g){this.resizeImage(g,a.target.result,mxUtils.bind(this,function(a,g,m){C(c,mxUtils.bind(this,function(){if(null!=a&&a.length<x){var p=e&&this.isResampleImageSize(n.size,G)?Math.min(1,Math.min(f/g,f/m)):1;return k(a,n.type,b+c*l,d+c*l,Math.round(g*p),Math.round(m*p),n.name)}this.handleError({message:mxResources.get("imageTooBig")});
-return null}))}),e,f,G,n.size)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else m=a.target.result,k(m,n.type,b+c*l,d+c*l,240,160,n.name,function(a){C(c,function(){return a})},n)});/(\.v(dx|sdx?))($|\?)/i.test(n.name)||/(\.vs(x|sx?))($|\?)/i.test(n.name)?k(null,n.type,b+c*l,d+c*l,240,160,n.name,function(a){C(c,function(){return a})},n):"image"==n.type.substring(0,5)||"application/pdf"==n.type?m.readAsDataURL(n):m.readAsText(n)}})(A)});if(g){g=
-[];for(n=0;n<a.length;n++)g.push(a[n]);a=g;this.confirmImageResize(function(a){e=a;q()},A)}else q()};EditorUi.prototype.confirmImageResize=function(a,b){b=null!=b?b:!1;var c=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},d=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():null,e=function(d,e){if(d||b)mxSettings.setResizeImages(d?e:null),mxSettings.save();c();a(e)};null==d||b?this.showDialog((new ConfirmDialog(this,mxResources.get("resizeLargeImages"),
+function(a){Editor.useLocalStorage=d;f.apply(e,arguments);a&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}};EditorUi.prototype.importZipFile=function(a,b,d){var c=this,e=mxUtils.bind(this,function(){this.loadingExtensions=!1;"undefined"!==typeof JSZip?JSZip.loadAsync(a).then(function(e){if(0==Object.keys(e.files).length)d();else{var f=0,k,g=!1;e.forEach(function(a,c){var e=c.name.toLowerCase();"diagram/diagram.xml"==e?(g=!0,c.async("string").then(function(a){0==a.indexOf("<mxfile ")?
+b(a):d()})):0==e.indexOf("versions/")&&(e=parseInt(e.substr(9)),e>f&&(f=e,k=c))});0<f?k.async("string").then(function(e){!c.isOffline()&&(new XMLHttpRequest).upload&&c.isRemoteFileFormat(e,a.name)?c.parseFile(new Blob([e],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&(200<=a.status&&299>=a.status?b(a.responseText):d())}),a.name):d()}):g||d()}},function(a){d(a)}):d()});"undefined"!==typeof JSZip||this.loadingExtensions||this.isOffline(!0)?e():(this.loadingExtensions=
+!0,mxscript("js/extensions.min.js",e))};EditorUi.prototype.importFile=function(a,b,d,f,g,m,p,t,A,x,G,z){x=null!=x?x:!0;var c=!1,e=null,k=mxUtils.bind(this,function(a){var c=null;null!=a&&"<mxlibrary"==a.substring(0,10)?this.loadLibrary(new LocalLibrary(this,a,p)):c=this.importXml(a,d,f,x,null,null!=z?mxEvent.isControlDown(z):null);null!=t&&t(c)});"image"==b.substring(0,5)?(A=!1,"image/png"==b.substring(0,9)&&(b=G?null:this.extractGraphModelFromPng(a),null!=b&&0<b.length&&(e=this.importXml(b,d,f,x,
+null,null!=z?mxEvent.isControlDown(z):null),A=!0)),A||(b=this.editor.graph,G=a.indexOf(";"),0<G&&(a=a.substring(0,G)+a.substring(a.indexOf(",",G+1))),x&&b.isGridEnabled()&&(d=b.snap(d),f=b.snap(f)),e=[b.insertVertex(null,null,"",d,f,g,m,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+a+";")])):/(\.*<graphml )/.test(a)?(c=!0,this.importGraphML(a,k)):null!=A&&null!=p&&(/(\.v(dx|sdx?))($|\?)/i.test(p)||/(\.vs(x|sx?))($|\?)/i.test(p))?
+(c=!0,this.importVisio(A,k)):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a,p)?(c=!0,this.parseFile(null!=A?A:new Blob([a],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&(200<=a.status&&299>=a.status?k(a.responseText):null!=t&&t(null))}),p)):0==a.indexOf("PK")&&null!=A?(c=!0,this.importZipFile(A,k,mxUtils.bind(this,function(){e=this.insertTextAt(this.validateFileData(a),d,f,!0,null,x);t(e)}))):/(\.v(sd|dx))($|\?)/i.test(p)||/(\.vs(s|x))($|\?)/i.test(p)||
+(e=this.insertTextAt(this.validateFileData(a),d,f,!0,null,x,null,null!=z?mxEvent.isControlDown(z):null));c||null==t||t(e);return e};EditorUi.prototype.importFiles=function(a,b,d,f,g,m,p,t,A,x,G,z,E){f=null!=f?f:this.maxImageSize;x=null!=x?x:this.maxImageBytes;var c=null!=b&&null!=d,e=!0;b=null!=b?b:0;d=null!=d?d:0;var k=!1;if(!mxClient.IS_CHROMEAPP&&null!=a)for(var l=G||this.resampleThreshold,n=0;n<a.length;n++)if("image/"==a[n].type.substring(0,6)&&a[n].size>l){k=!0;break}var q=mxUtils.bind(this,
+function(){var k=this.editor.graph,l=k.gridSize;g=null!=g?g:mxUtils.bind(this,function(a,b,d,e,f,k,g,l,n){try{return null!=a&&"<mxlibrary"==a.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,a,g)),null):this.importFile(a,b,d,e,f,k,g,l,n,c,z,E)}catch(ba){return this.handleError(ba),null}});m=null!=m?m:mxUtils.bind(this,function(a){k.setSelectionCells(a)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var n=a.length,q=n,u=[],D=mxUtils.bind(this,function(a,
+c){u[a]=c;if(0==--q){this.spinner.stop();if(null!=t)t(u);else{var b=[];k.getModel().beginUpdate();try{for(var d=0;d<u.length;d++){var e=u[d]();null!=e&&(b=b.concat(e))}}finally{k.getModel().endUpdate()}}m(b)}}),A=0;A<n;A++)mxUtils.bind(this,function(c){var n=a[c];if(null!=n){var m=new FileReader;m.onload=mxUtils.bind(this,function(a){if(null==p||p(n))if("image/"==n.type.substring(0,6))if("image/svg"==n.type.substring(0,9)){var m=Graph.clipSvgDataUri(a.target.result),q=m.indexOf(","),u=decodeURIComponent(escape(atob(m.substring(q+
+1)))),v=mxUtils.parseXml(u),u=v.getElementsByTagName("svg");if(0<u.length){var u=u[0],t=z?null:u.getAttribute("content");null!=t&&"<"!=t.charAt(0)&&"%"!=t.charAt(0)&&(t=unescape(window.atob?atob(t):Base64.decode(t,!0)));null!=t&&"%"==t.charAt(0)&&(t=decodeURIComponent(t));null==t||"<mxfile "!==t.substring(0,8)&&"<mxGraphModel "!==t.substring(0,14)?D(c,mxUtils.bind(this,function(){try{if(m.substring(0,q+1),null!=v){var a=v.getElementsByTagName("svg");if(0<a.length){var e=a[0],p=e.getAttribute("width"),
+u=e.getAttribute("height"),p=null!=p&&"%"!=p.charAt(p.length-1)?parseFloat(p):NaN,u=null!=u&&"%"!=u.charAt(u.length-1)?parseFloat(u):NaN,t=e.getAttribute("viewBox");if(null==t||0==t.length)e.setAttribute("viewBox","0 0 "+p+" "+u);else if(isNaN(p)||isNaN(u)){var x=t.split(" ");3<x.length&&(p=parseFloat(x[2]),u=parseFloat(x[3]))}m=Editor.createSvgDataUri(mxUtils.getXml(e));var z=Math.min(1,Math.min(f/Math.max(1,p)),f/Math.max(1,u)),D=g(m,n.type,b+c*l,d+c*l,Math.max(1,Math.round(p*z)),Math.max(1,Math.round(u*
+z)),n.name);if(isNaN(p)||isNaN(u)){var N=new Image;N.onload=mxUtils.bind(this,function(){p=Math.max(1,N.width);u=Math.max(1,N.height);D[0].geometry.width=p;D[0].geometry.height=u;e.setAttribute("viewBox","0 0 "+p+" "+u);m=Editor.createSvgDataUri(mxUtils.getXml(e));var a=m.indexOf(";");0<a&&(m=m.substring(0,a)+m.substring(m.indexOf(",",a+1)));k.setCellStyles("image",m,[D[0]])});N.src=Editor.createSvgDataUri(mxUtils.getXml(e))}return D}}}catch(aa){}return null})):D(c,mxUtils.bind(this,function(){return g(t,
+"text/xml",b+c*l,d+c*l,0,0,n.name)}))}else D(c,mxUtils.bind(this,function(){return null}))}else{u=!1;if("image/png"==n.type){var N=z?null:this.extractGraphModelFromPng(a.target.result);if(null!=N&&0<N.length){var B=new Image;B.src=a.target.result;D(c,mxUtils.bind(this,function(){return g(N,"text/xml",b+c*l,d+c*l,B.width,B.height,n.name)}));u=!0}}u||(mxClient.IS_CHROMEAPP?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("dragAndDropNotSupported"),mxResources.get("cancel"),
+mxUtils.bind(this,function(){}),null,mxResources.get("ok"),mxUtils.bind(this,function(){this.actions.get("import").funct()}))):this.loadImage(a.target.result,mxUtils.bind(this,function(k){this.resizeImage(k,a.target.result,mxUtils.bind(this,function(a,k,m){D(c,mxUtils.bind(this,function(){if(null!=a&&a.length<x){var p=e&&this.isResampleImageSize(n.size,G)?Math.min(1,Math.min(f/k,f/m)):1;return g(a,n.type,b+c*l,d+c*l,Math.round(k*p),Math.round(m*p),n.name)}this.handleError({message:mxResources.get("imageTooBig")});
+return null}))}),e,f,G,n.size)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else m=a.target.result,g(m,n.type,b+c*l,d+c*l,240,160,n.name,function(a){D(c,function(){return a})},n)});/(\.v(dx|sdx?))($|\?)/i.test(n.name)||/(\.vs(x|sx?))($|\?)/i.test(n.name)?g(null,n.type,b+c*l,d+c*l,240,160,n.name,function(a){D(c,function(){return a})},n):"image"==n.type.substring(0,5)||"application/pdf"==n.type?m.readAsDataURL(n):m.readAsText(n)}})(A)});if(k){k=
+[];for(n=0;n<a.length;n++)k.push(a[n]);a=k;this.confirmImageResize(function(a){e=a;q()},A)}else q()};EditorUi.prototype.confirmImageResize=function(a,b){b=null!=b?b:!1;var c=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},d=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():null,e=function(d,e){if(d||b)mxSettings.setResizeImages(d?e:null),mxSettings.save();c();a(e)};null==d||b?this.showDialog((new ConfirmDialog(this,mxResources.get("resizeLargeImages"),
function(a){e(a,!0)},function(a){e(a,!1)},mxResources.get("resize"),mxResources.get("actualSize"),'<img style="margin-top:8px;" src="'+Editor.loResImage+'"/>','<img style="margin-top:8px;" src="'+Editor.hiResImage+'"/>',isLocalStorage||mxClient.IS_CHROMEAPP)).container,340,isLocalStorage||mxClient.IS_CHROMEAPP?220:200,!0,!0):e(!1,d)};EditorUi.prototype.parseFile=function(a,b,d){d=null!=d?d:a.name;var c=new FormData;c.append("format","xml");c.append("upfile",a,d);var e=new XMLHttpRequest;e.open("POST",
-OPEN_URL);e.onreadystatechange=function(){b(e)};e.send(c);try{EditorUi.logEvent({category:"GLIFFY-IMPORT-FILE",action:"size_"+a.size})}catch(q){}};EditorUi.prototype.isResampleImageSize=function(a,b){b=null!=b?b:this.resampleThreshold;return a>b};EditorUi.prototype.resizeImage=function(a,b,d,f,k,m,p){k=null!=k?k:this.maxImageSize;var c=Math.max(1,a.width),e=Math.max(1,a.height);if(f&&this.isResampleImageSize(null!=p?p:b.length,m))try{var g=Math.max(c/k,e/k);if(1<g){var l=Math.round(c/g),n=Math.round(e/
-g),q=document.createElement("canvas");q.width=l;q.height=n;q.getContext("2d").drawImage(a,0,0,l,n);var u=q.toDataURL();if(u.length<b.length){var K=document.createElement("canvas");K.width=l;K.height=n;var F=K.toDataURL();u!==F&&(b=u,c=l,e=n)}}}catch(I){}d(b,c,e)};EditorUi.prototype.extractGraphModelFromPng=function(a){return Editor.extractGraphModelFromPng(a)};EditorUi.prototype.loadImage=function(a,b,d){try{var c=new Image;c.onload=function(){c.width=0<c.width?c.width:120;c.height=0<c.height?c.height:
+OPEN_URL);e.onreadystatechange=function(){b(e)};e.send(c);try{EditorUi.logEvent({category:"GLIFFY-IMPORT-FILE",action:"size_"+a.size})}catch(q){}};EditorUi.prototype.isResampleImageSize=function(a,b){b=null!=b?b:this.resampleThreshold;return a>b};EditorUi.prototype.resizeImage=function(a,b,d,f,g,m,p){g=null!=g?g:this.maxImageSize;var c=Math.max(1,a.width),e=Math.max(1,a.height);if(f&&this.isResampleImageSize(null!=p?p:b.length,m))try{var k=Math.max(c/g,e/g);if(1<k){var l=Math.round(c/k),n=Math.round(e/
+k),q=document.createElement("canvas");q.width=l;q.height=n;q.getContext("2d").drawImage(a,0,0,l,n);var u=q.toDataURL();if(u.length<b.length){var K=document.createElement("canvas");K.width=l;K.height=n;var F=K.toDataURL();u!==F&&(b=u,c=l,e=n)}}}catch(I){}d(b,c,e)};EditorUi.prototype.extractGraphModelFromPng=function(a){return Editor.extractGraphModelFromPng(a)};EditorUi.prototype.loadImage=function(a,b,d){try{var c=new Image;c.onload=function(){c.width=0<c.width?c.width:120;c.height=0<c.height?c.height:
120;b(c)};null!=d&&(c.onerror=d);c.src=a}catch(l){if(null!=d)d(l);else throw l;}};var f=EditorUi.prototype.init;EditorUi.prototype.init=function(){mxStencilRegistry.allowEval=mxStencilRegistry.allowEval&&!this.isOfflineApp();"undefined"!==typeof window.mxSettings&&(this.formatWidth=mxSettings.getFormatWidth());var a=this,b=this.editor.graph;Editor.isDarkMode()&&(b.view.defaultGridColor=mxGraphView.prototype.defaultDarkGridColor);b.cellEditor.editPlantUmlData=function(c,d,e){var f=JSON.parse(e);d=
-new TextareaDialog(a,mxResources.get("plantUml")+":",f.data,function(d){null!=d&&a.spinner.spin(document.body,mxResources.get("inserting"))&&a.generatePlantUmlImage(d,f.format,function(e,g,k){a.spinner.stop();b.getModel().beginUpdate();try{if("txt"==f.format)b.labelChanged(c,"<pre>"+e+"</pre>"),b.updateCellSize(c,!0);else{b.setCellStyles("image",a.convertDataUri(e),[c]);var l=b.model.getGeometry(c);null!=l&&(l=l.clone(),l.width=g,l.height=k,b.cellsResized([c],[l],!1))}b.setAttributeForCell(c,"plantUmlData",
-JSON.stringify({data:d,format:f.format}))}finally{b.getModel().endUpdate()}},function(c){a.handleError(c)})},null,null,400,220);a.showDialog(d.container,420,300,!0,!0);d.init()};b.cellEditor.editMermaidData=function(c,d,e){var f=JSON.parse(e);d=new TextareaDialog(a,mxResources.get("mermaid")+":",f.data,function(d){null!=d&&a.spinner.spin(document.body,mxResources.get("inserting"))&&a.generateMermaidImage(d,f.config,function(e,g,k){a.spinner.stop();b.getModel().beginUpdate();try{b.setCellStyles("image",
-e,[c]);var l=b.model.getGeometry(c);null!=l&&(l=l.clone(),l.width=Math.max(l.width,g),l.height=Math.max(l.height,k),b.cellsResized([c],[l],!1));b.setAttributeForCell(c,"mermaidData",JSON.stringify({data:d,config:f.config},null,2))}finally{b.getModel().endUpdate()}},function(c){a.handleError(c)})},null,null,400,220);a.showDialog(d.container,420,300,!0,!0);d.init()};var d=b.cellEditor.startEditing;b.cellEditor.startEditing=function(c,e){try{var f=this.graph.getAttributeForCell(c,"plantUmlData");if(null!=
-f)this.editPlantUmlData(c,e,f);else if(f=this.graph.getAttributeForCell(c,"mermaidData"),null!=f)this.editMermaidData(c,e,f);else{var g=b.getCellStyle(c);"1"==mxUtils.getValue(g,"metaEdit","0")?a.showDataDialog(c):d.apply(this,arguments)}}catch(O){a.handleError(O)}};b.getLinkTitle=function(c){return a.getLinkTitle(c)};b.customLinkClicked=function(c){var b=!1;try{a.handleCustomLink(c),b=!0}catch(M){a.handleError(M)}return b};var k=b.parseBackgroundImage;b.parseBackgroundImage=function(a){var c=k.apply(this,
+new TextareaDialog(a,mxResources.get("plantUml")+":",f.data,function(d){null!=d&&a.spinner.spin(document.body,mxResources.get("inserting"))&&a.generatePlantUmlImage(d,f.format,function(e,k,g){a.spinner.stop();b.getModel().beginUpdate();try{if("txt"==f.format)b.labelChanged(c,"<pre>"+e+"</pre>"),b.updateCellSize(c,!0);else{b.setCellStyles("image",a.convertDataUri(e),[c]);var l=b.model.getGeometry(c);null!=l&&(l=l.clone(),l.width=k,l.height=g,b.cellsResized([c],[l],!1))}b.setAttributeForCell(c,"plantUmlData",
+JSON.stringify({data:d,format:f.format}))}finally{b.getModel().endUpdate()}},function(c){a.handleError(c)})},null,null,400,220);a.showDialog(d.container,420,300,!0,!0);d.init()};b.cellEditor.editMermaidData=function(c,d,e){var f=JSON.parse(e);d=new TextareaDialog(a,mxResources.get("mermaid")+":",f.data,function(d){null!=d&&a.spinner.spin(document.body,mxResources.get("inserting"))&&a.generateMermaidImage(d,f.config,function(e,k,g){a.spinner.stop();b.getModel().beginUpdate();try{b.setCellStyles("image",
+e,[c]);var l=b.model.getGeometry(c);null!=l&&(l=l.clone(),l.width=Math.max(l.width,k),l.height=Math.max(l.height,g),b.cellsResized([c],[l],!1));b.setAttributeForCell(c,"mermaidData",JSON.stringify({data:d,config:f.config},null,2))}finally{b.getModel().endUpdate()}},function(c){a.handleError(c)})},null,null,400,220);a.showDialog(d.container,420,300,!0,!0);d.init()};var d=b.cellEditor.startEditing;b.cellEditor.startEditing=function(c,e){try{var f=this.graph.getAttributeForCell(c,"plantUmlData");if(null!=
+f)this.editPlantUmlData(c,e,f);else if(f=this.graph.getAttributeForCell(c,"mermaidData"),null!=f)this.editMermaidData(c,e,f);else{var k=b.getCellStyle(c);"1"==mxUtils.getValue(k,"metaEdit","0")?a.showDataDialog(c):d.apply(this,arguments)}}catch(O){a.handleError(O)}};b.getLinkTitle=function(c){return a.getLinkTitle(c)};b.customLinkClicked=function(c){var b=!1;try{a.handleCustomLink(c),b=!0}catch(M){a.handleError(M)}return b};var g=b.parseBackgroundImage;b.parseBackgroundImage=function(a){var c=g.apply(this,
arguments);null!=c&&null!=c.src&&Graph.isPageLink(c.src)&&(c={originalSrc:c.src});return c};var l=b.setBackgroundImage;b.setBackgroundImage=function(c){null!=c&&null!=c.originalSrc&&(c=a.createImageForPageLink(c.originalSrc));l.apply(this,arguments)};this.editor.addListener("pageRenamed",mxUtils.bind(this,function(){b.refreshBackgroundImage()}));this.editor.addListener("pageMoved",mxUtils.bind(this,function(){b.refreshBackgroundImage()}));this.editor.addListener("pagesPatched",mxUtils.bind(this,function(a,
-c){var d=null!=b.backgroundImage?b.backgroundImage.originalSrc:null;if(null!=d){var e=d.indexOf(",");if(0<e)for(var d=d.substring(e+1),e=c.getProperty("patches"),f=0;f<e.length;f++)if(null!=e[f][EditorUi.DIFF_UPDATE][d]){b.refreshBackgroundImage();b.view.validateBackgroundImage();break}}}));var m=b.getBackgroundImageObject;b.getBackgroundImageObject=function(a){var c=m.apply(this,arguments);null!=c&&null!=c.originalSrc&&(c={src:c.originalSrc,width:c.width,height:c.height});return c};var p=this.clearDefaultStyle;
-this.clearDefaultStyle=function(){p.apply(this,arguments)};this.isOffline()||"undefined"===typeof window.EditDataDialog||(EditDataDialog.placeholderHelpLink="https://www.diagrams.net/doc/faq/predefined-placeholders");if(/viewer\.diagrams\.net$/.test(window.location.hostname)||/embed\.diagrams\.net$/.test(window.location.hostname))this.editor.editBlankUrl="https://app.diagrams.net/";var t=a.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(a){a=null!=a?a:"";"1"==urlParams.dev&&(a+=(0<a.length?
-"&":"?")+"dev=1");return t.apply(this,arguments)};var A=b.addClickHandler;b.addClickHandler=function(a,c,d){var e=c;c=function(a,c){if(null==c){var d=mxEvent.getSource(a);"a"==d.nodeName.toLowerCase()&&(c=d.getAttribute("href"))}null!=c&&b.isCustomLink(c)&&(mxEvent.isTouchEvent(a)||!mxEvent.isPopupTrigger(a))&&b.customLinkClicked(c)&&mxEvent.consume(a);null!=e&&e(a,c)};A.call(this,a,c,d)};f.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(b.view.canvas.ownerSVGElement,null,!0);
-if(null!=this.menus){var x=Menus.prototype.addPopupMenuEditItems;this.menus.addPopupMenuEditItems=function(c,b,d){a.editor.graph.isSelectionEmpty()?x.apply(this,arguments):a.menus.addMenuItems(c,"delete - cut copy copyAsImage - duplicate".split(" "),null,d)}}a.actions.get("print").funct=function(){a.showDialog((new PrintDialog(a)).container,360,null!=a.pages&&1<a.pages.length?450:370,!0,!0)};this.defaultFilename=mxResources.get("untitledDiagram");var G=b.getExportVariables;b.getExportVariables=function(){var c=
-G.apply(this,arguments),b=a.getCurrentFile();null!=b&&(c.filename=b.getTitle());c.pagecount=null!=a.pages?a.pages.length:1;c.page=null!=a.currentPage?a.currentPage.getName():"";c.pagenumber=null!=a.pages&&null!=a.currentPage?mxUtils.indexOf(a.pages,a.currentPage)+1:1;return c};var z=b.getGlobalVariable;b.getGlobalVariable=function(c){var b=a.getCurrentFile();return"filename"==c&&null!=b?b.getTitle():"page"==c&&null!=a.currentPage?a.currentPage.getName():"pagenumber"==c?null!=a.currentPage&&null!=
-a.pages?mxUtils.indexOf(a.pages,a.currentPage)+1:1:"pagecount"==c?null!=a.pages?a.pages.length:1:z.apply(this,arguments)};var E=b.labelLinkClicked;b.labelLinkClicked=function(a,c,d){var e=c.getAttribute("href");if(null==e||!b.isCustomLink(e)||!mxEvent.isTouchEvent(d)&&mxEvent.isPopupTrigger(d))E.apply(this,arguments);else{if(!b.isEnabled()||null!=a&&b.isCellLocked(a.cell))b.customLinkClicked(e),b.getRubberband().reset();mxEvent.consume(d)}};this.editor.getOrCreateFilename=function(){var c=a.defaultFilename,
-b=a.getCurrentFile();null!=b&&(c=null!=b.getTitle()?b.getTitle():c);return c};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,"insertRectangle"),this.keyHandler.bindAction(75,!0,"insertEllipse",!0),this.altShiftActions[83]="synchronize",this.installImagePasteHandler(),this.installNativeClipboardHandler();this.spinner=this.createSpinner(null,null,24);Graph.fileSupport&&b.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(a){var c=b.cellEditor.text2,d=null;null!=c&&(mxEvent.addListener(c,"dragleave",function(a){null!=d&&(d.parentNode.removeChild(d),d=null);a.stopPropagation();a.preventDefault()}),mxEvent.addListener(c,
-"dragover",mxUtils.bind(this,function(a){null==d&&(!mxClient.IS_IE||10<document.documentMode)&&(d=this.highlightElement(c));a.stopPropagation();a.preventDefault()})),mxEvent.addListener(c,"drop",mxUtils.bind(this,function(a){null!=d&&(d.parentNode.removeChild(d),d=null);if(0<a.dataTransfer.files.length)this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,function(a,c,d,e,f,g){b.insertImage(a,f,g)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var c=0;c<a.length;c++)a[c]()},
+c){var d=null!=b.backgroundImage?b.backgroundImage.originalSrc:null;if(null!=d){var e=d.indexOf(",");if(0<e)for(var d=d.substring(e+1),e=c.getProperty("patches"),f=0;f<e.length;f++)if(null!=e[f][EditorUi.DIFF_UPDATE][d]){b.refreshBackgroundImage();b.view.validateBackgroundImage();break}}}));var m=b.getBackgroundImageObject;b.getBackgroundImageObject=function(a,c){var b=m.apply(this,arguments);null==b||null==b.originalSrc||c||(b={src:b.originalSrc});return b};var p=this.clearDefaultStyle;this.clearDefaultStyle=
+function(){p.apply(this,arguments)};this.isOffline()||"undefined"===typeof window.EditDataDialog||(EditDataDialog.placeholderHelpLink="https://www.diagrams.net/doc/faq/predefined-placeholders");if(/viewer\.diagrams\.net$/.test(window.location.hostname)||/embed\.diagrams\.net$/.test(window.location.hostname))this.editor.editBlankUrl="https://app.diagrams.net/";var t=a.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(a){a=null!=a?a:"";"1"==urlParams.dev&&(a+=(0<a.length?"&":"?")+"dev=1");
+return t.apply(this,arguments)};var A=b.addClickHandler;b.addClickHandler=function(a,c,d){var e=c;c=function(a,c){if(null==c){var d=mxEvent.getSource(a);"a"==d.nodeName.toLowerCase()&&(c=d.getAttribute("href"))}null!=c&&b.isCustomLink(c)&&(mxEvent.isTouchEvent(a)||!mxEvent.isPopupTrigger(a))&&b.customLinkClicked(c)&&mxEvent.consume(a);null!=e&&e(a,c)};A.call(this,a,c,d)};f.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(b.view.canvas.ownerSVGElement,null,!0);if(null!=this.menus){var x=
+Menus.prototype.addPopupMenuEditItems;this.menus.addPopupMenuEditItems=function(c,b,d){a.editor.graph.isSelectionEmpty()?x.apply(this,arguments):a.menus.addMenuItems(c,"delete - cut copy copyAsImage - duplicate".split(" "),null,d)}}a.actions.get("print").funct=function(){a.showDialog((new PrintDialog(a)).container,360,null!=a.pages&&1<a.pages.length?450:370,!0,!0)};this.defaultFilename=mxResources.get("untitledDiagram");var G=b.getExportVariables;b.getExportVariables=function(){var c=G.apply(this,
+arguments),b=a.getCurrentFile();null!=b&&(c.filename=b.getTitle());c.pagecount=null!=a.pages?a.pages.length:1;c.page=null!=a.currentPage?a.currentPage.getName():"";c.pagenumber=null!=a.pages&&null!=a.currentPage?mxUtils.indexOf(a.pages,a.currentPage)+1:1;return c};var z=b.getGlobalVariable;b.getGlobalVariable=function(c){var b=a.getCurrentFile();return"filename"==c&&null!=b?b.getTitle():"page"==c&&null!=a.currentPage?a.currentPage.getName():"pagenumber"==c?null!=a.currentPage&&null!=a.pages?mxUtils.indexOf(a.pages,
+a.currentPage)+1:1:"pagecount"==c?null!=a.pages?a.pages.length:1:z.apply(this,arguments)};var E=b.labelLinkClicked;b.labelLinkClicked=function(a,c,d){var e=c.getAttribute("href");if(null==e||!b.isCustomLink(e)||!mxEvent.isTouchEvent(d)&&mxEvent.isPopupTrigger(d))E.apply(this,arguments);else{if(!b.isEnabled()||null!=a&&b.isCellLocked(a.cell))b.customLinkClicked(e),b.getRubberband().reset();mxEvent.consume(d)}};this.editor.getOrCreateFilename=function(){var c=a.defaultFilename,b=a.getCurrentFile();
+null!=b&&(c=null!=b.getTitle()?b.getTitle():c);return c};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,"insertRectangle"),
+this.keyHandler.bindAction(75,!0,"insertEllipse",!0),this.altShiftActions[83]="synchronize",this.installImagePasteHandler(),this.installNativeClipboardHandler();this.spinner=this.createSpinner(null,null,24);Graph.fileSupport&&b.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(a){var c=b.cellEditor.text2,d=null;null!=c&&(mxEvent.addListener(c,"dragleave",function(a){null!=d&&(d.parentNode.removeChild(d),d=null);a.stopPropagation();a.preventDefault()}),mxEvent.addListener(c,"dragover",
+mxUtils.bind(this,function(a){null==d&&(!mxClient.IS_IE||10<document.documentMode)&&(d=this.highlightElement(c));a.stopPropagation();a.preventDefault()})),mxEvent.addListener(c,"drop",mxUtils.bind(this,function(a){null!=d&&(d.parentNode.removeChild(d),d=null);if(0<a.dataTransfer.files.length)this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,function(a,c,d,e,f,k){b.insertImage(a,f,k)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var c=0;c<a.length;c++)a[c]()},
mxEvent.isControlDown(a));else if(0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")){var c=a.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(c)?this.loadImage(decodeURIComponent(c),mxUtils.bind(this,function(a){var d=Math.max(1,a.width);a=Math.max(1,a.height);var e=this.maxImageSize,e=Math.min(1,Math.min(e/Math.max(1,d)),e/Math.max(1,a));b.insertImage(decodeURIComponent(c),d*e,a*e)})):document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/plain"))}else 0<=
mxUtils.indexOf(a.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(a.dataTransfer.types,"text/plain")&&document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/plain"));a.stopPropagation();a.preventDefault()})))}));"undefined"!==typeof window.mxSettings&&(H=this.editor.graph.view,H.setUnit(mxSettings.getUnit()),H.addListener("unitChanged",function(a,c){mxSettings.setUnit(c.getProperty("unit"));mxSettings.save()}),
this.ruler=!this.canvasSupported||9==document.documentMode||"1"!=urlParams.ruler&&!mxSettings.isRulerOn()||this.editor.isChromelessView()&&!this.editor.editable?null:new mxDualRuler(this,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(a,c){if(0<this.editor.graph.getSelectionCount()){var b=this.editor.graph.getSelectionCell(),b=this.editor.graph.getModel().getStyle(b);
this.styleInput.value=b||"";this.styleInput.style.visibility="visible"}else this.styleInput.style.visibility="hidden"})));var K=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==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 F=null;mxEvent.addListener(b.container,"dragleave",function(a){b.isEnabled()&&(null!=F&&(F.parentNode.removeChild(F),
F=null),a.stopPropagation(),a.preventDefault())});mxEvent.addListener(b.container,"dragover",mxUtils.bind(this,function(a){null==F&&(!mxClient.IS_IE||10<document.documentMode)&&(F=this.highlightElement(b.container));null!=this.sidebar&&this.sidebar.hideTooltip();a.stopPropagation();a.preventDefault()}));mxEvent.addListener(b.container,"drop",mxUtils.bind(this,function(a){null!=F&&(F.parentNode.removeChild(F),F=null);if(b.isEnabled()){var c=mxUtils.convertPoint(b.container,mxEvent.getClientX(a),mxEvent.getClientY(a)),
-d=b.view.translate,e=b.view.scale,f=c.x/e-d.x,g=c.y/e-d.y;if(0<a.dataTransfer.files.length)mxEvent.isShiftDown(a)?this.openFiles(a.dataTransfer.files,!0):(mxEvent.isAltDown(a)&&(g=f=null),this.importFiles(a.dataTransfer.files,f,g,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(a),null,null,mxEvent.isShiftDown(a),a));else{mxEvent.isAltDown(a)&&(g=f=0);var k=0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")?a.dataTransfer.getData("text/uri-list"):null,c=this.extractGraphModelFromEvent(a,
-null!=this.pages);if(null!=c)b.setSelectionCells(this.importXml(c,f,g,!0));else if(0<=mxUtils.indexOf(a.dataTransfer.types,"text/html")){var l=a.dataTransfer.getData("text/html"),c=document.createElement("div");c.innerHTML=b.sanitizeHtml(l);var n=null,d=c.getElementsByTagName("img");null!=d&&1==d.length?(l=d[0].getAttribute("src"),null==l&&(l=d[0].getAttribute("srcset")),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(l)||(n=!0)):(d=c.getElementsByTagName("a"),null!=d&&1==d.length?l=d[0].getAttribute("href"):
-(c=c.getElementsByTagName("pre"),null!=c&&1==c.length&&(l=mxUtils.getTextContent(c[0]))));var m=!0,p=mxUtils.bind(this,function(){b.setSelectionCells(this.insertTextAt(l,f,g,!0,n,null,m,mxEvent.isControlDown(a)))});n&&null!=l&&l.length>this.resampleThreshold?this.confirmImageResize(function(a){m=a;p()},mxEvent.isControlDown(a)):p()}else null!=k&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(k)?this.loadImage(decodeURIComponent(k),mxUtils.bind(this,function(a){var c=Math.max(1,a.width);a=Math.max(1,a.height);
-var d=this.maxImageSize,d=Math.min(1,Math.min(d/Math.max(1,c)),d/Math.max(1,a));b.setSelectionCell(b.insertVertex(null,null,"",f,g,c*d,a*d,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+k+";"))}),mxUtils.bind(this,function(a){b.setSelectionCells(this.insertTextAt(k,f,g,!0))})):0<=mxUtils.indexOf(a.dataTransfer.types,"text/plain")&&b.setSelectionCells(this.insertTextAt(a.dataTransfer.getData("text/plain"),f,g,!0))}}a.stopPropagation();
-a.preventDefault()}),!1)}b.enableFlowAnimation=!0;this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();this.installSettings()};EditorUi.prototype.installImagePasteHandler=function(){if(!mxClient.IS_IE){var a=this.editor.graph;a.container.addEventListener("paste",mxUtils.bind(this,function(c){if(!mxEvent.isConsumed(c))try{for(var b=c.clipboardData||c.originalEvent.clipboardData,d=!1,e=0;e<b.types.length;e++)if("text/"===b.types[e].substring(0,5)){d=!0;break}if(!d){var f=b.items;for(index in f){var k=
-f[index];if("file"===k.kind){if(a.isEditing())this.importFiles([k.getAsFile()],0,0,this.maxImageSize,function(c,b,d,e,f,g){a.insertImage(c,f,g)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var c=0;c<a.length;c++)a[c]()});else{var m=this.editor.graph.getInsertPoint();this.importFiles([k.getAsFile()],m.x,m.y,this.maxImageSize);mxEvent.consume(c)}break}}}}catch(A){}}),!1)}};EditorUi.prototype.installNativeClipboardHandler=function(){function a(){window.setTimeout(function(){d.innerHTML=
+d=b.view.translate,e=b.view.scale,f=c.x/e-d.x,k=c.y/e-d.y;if(0<a.dataTransfer.files.length)mxEvent.isShiftDown(a)?this.openFiles(a.dataTransfer.files,!0):(mxEvent.isAltDown(a)&&(k=f=null),this.importFiles(a.dataTransfer.files,f,k,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(a),null,null,mxEvent.isShiftDown(a),a));else{mxEvent.isAltDown(a)&&(k=f=0);var g=0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")?a.dataTransfer.getData("text/uri-list"):null,c=this.extractGraphModelFromEvent(a,
+null!=this.pages);if(null!=c)b.setSelectionCells(this.importXml(c,f,k,!0));else if(0<=mxUtils.indexOf(a.dataTransfer.types,"text/html")){var l=a.dataTransfer.getData("text/html"),c=document.createElement("div");c.innerHTML=b.sanitizeHtml(l);var n=null,d=c.getElementsByTagName("img");null!=d&&1==d.length?(l=d[0].getAttribute("src"),null==l&&(l=d[0].getAttribute("srcset")),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(l)||(n=!0)):(d=c.getElementsByTagName("a"),null!=d&&1==d.length?l=d[0].getAttribute("href"):
+(c=c.getElementsByTagName("pre"),null!=c&&1==c.length&&(l=mxUtils.getTextContent(c[0]))));var m=!0,p=mxUtils.bind(this,function(){b.setSelectionCells(this.insertTextAt(l,f,k,!0,n,null,m,mxEvent.isControlDown(a)))});n&&null!=l&&l.length>this.resampleThreshold?this.confirmImageResize(function(a){m=a;p()},mxEvent.isControlDown(a)):p()}else null!=g&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(g)?this.loadImage(decodeURIComponent(g),mxUtils.bind(this,function(a){var c=Math.max(1,a.width);a=Math.max(1,a.height);
+var d=this.maxImageSize,d=Math.min(1,Math.min(d/Math.max(1,c)),d/Math.max(1,a));b.setSelectionCell(b.insertVertex(null,null,"",f,k,c*d,a*d,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+g+";"))}),mxUtils.bind(this,function(a){b.setSelectionCells(this.insertTextAt(g,f,k,!0))})):0<=mxUtils.indexOf(a.dataTransfer.types,"text/plain")&&b.setSelectionCells(this.insertTextAt(a.dataTransfer.getData("text/plain"),f,k,!0))}}a.stopPropagation();
+a.preventDefault()}),!1)}b.enableFlowAnimation=!0;this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();this.installSettings()};EditorUi.prototype.installImagePasteHandler=function(){if(!mxClient.IS_IE){var a=this.editor.graph;a.container.addEventListener("paste",mxUtils.bind(this,function(c){if(!mxEvent.isConsumed(c))try{for(var b=c.clipboardData||c.originalEvent.clipboardData,d=!1,e=0;e<b.types.length;e++)if("text/"===b.types[e].substring(0,5)){d=!0;break}if(!d){var f=b.items;for(index in f){var g=
+f[index];if("file"===g.kind){if(a.isEditing())this.importFiles([g.getAsFile()],0,0,this.maxImageSize,function(c,b,d,e,f,k){a.insertImage(c,f,k)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var c=0;c<a.length;c++)a[c]()});else{var m=this.editor.graph.getInsertPoint();this.importFiles([g.getAsFile()],m.x,m.y,this.maxImageSize);mxEvent.consume(c)}break}}}}catch(A){}}),!1)}};EditorUi.prototype.installNativeClipboardHandler=function(){function a(){window.setTimeout(function(){d.innerHTML=
"&nbsp;";d.focus();document.execCommand("selectAll",!1,null)},0)}var b=this.editor.graph,d=document.createElement("div");d.setAttribute("autocomplete","off");d.setAttribute("autocorrect","off");d.setAttribute("autocapitalize","off");d.setAttribute("spellcheck","false");d.style.textRendering="optimizeSpeed";d.style.fontFamily="monospace";d.style.wordBreak="break-all";d.style.background="transparent";d.style.color="transparent";d.style.position="absolute";d.style.whiteSpace="nowrap";d.style.overflow=
"hidden";d.style.display="block";d.style.fontSize="1";d.style.zIndex="-1";d.style.resize="none";d.style.outline="none";d.style.width="1px";d.style.height="1px";mxUtils.setOpacity(d,0);d.contentEditable=!0;d.innerHTML="&nbsp;";var f=!1;this.keyHandler.bindControlKey(88,null);this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86,null);mxEvent.addListener(document,"keydown",mxUtils.bind(this,function(a){var c=mxEvent.getSource(a);null==b.container||!b.isEnabled()||b.isMouseDown||
b.isEditing()||null!=this.dialog||"INPUT"==c.nodeName||"TEXTAREA"==c.nodeName||224!=a.keyCode&&(mxClient.IS_MAC||17!=a.keyCode)&&(!mxClient.IS_MAC||91!=a.keyCode&&93!=a.keyCode)||f||(d.style.left=b.container.scrollLeft+10+"px",d.style.top=b.container.scrollTop+10+"px",b.container.appendChild(d),f=!0,d.focus(),document.execCommand("selectAll",!1,null))}));mxEvent.addListener(document,"keyup",mxUtils.bind(this,function(a){var c=a.keyCode;window.setTimeout(mxUtils.bind(this,function(){!f||224!=c&&17!=
c&&91!=c&&93!=c||(f=!1,b.isEditing()||null!=this.dialog||null==b.container||b.container.focus(),d.parentNode.removeChild(d),null==this.dialog&&mxUtils.clearSelection())}),0)}));mxEvent.addListener(d,"copy",mxUtils.bind(this,function(c){if(b.isEnabled())try{mxClipboard.copy(b),this.copyCells(d),a()}catch(u){this.handleError(u)}}));mxEvent.addListener(d,"cut",mxUtils.bind(this,function(c){if(b.isEnabled())try{mxClipboard.copy(b),this.copyCells(d,!0),a()}catch(u){this.handleError(u)}}));mxEvent.addListener(d,
-"paste",mxUtils.bind(this,function(a){b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())&&(d.innerHTML="&nbsp;",d.focus(),null!=a.clipboardData&&this.pasteCells(a,d,!0,!0),mxEvent.isConsumed(a)||window.setTimeout(mxUtils.bind(this,function(){this.pasteCells(a,d,!1,!0)}),0))}),!0);var k=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==d?!0:k.apply(this,arguments)}};EditorUi.prototype.getLinkTitle=function(a){var c=Graph.prototype.getLinkTitle.apply(this,arguments);
+"paste",mxUtils.bind(this,function(a){b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())&&(d.innerHTML="&nbsp;",d.focus(),null!=a.clipboardData&&this.pasteCells(a,d,!0,!0),mxEvent.isConsumed(a)||window.setTimeout(mxUtils.bind(this,function(){this.pasteCells(a,d,!1,!0)}),0))}),!0);var g=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==d?!0:g.apply(this,arguments)}};EditorUi.prototype.getLinkTitle=function(a){var c=Graph.prototype.getLinkTitle.apply(this,arguments);
if(Graph.isPageLink(a)){var b=a.indexOf(",");0<b&&(c=this.getPageById(a.substring(b+1)),c=null!=c?c.getName():mxResources.get("pageNotFound"))}else"data:"==a.substring(0,5)&&(c=mxResources.get("action"));return c};EditorUi.prototype.handleCustomLink=function(a){if(Graph.isPageLink(a)){var c=a.indexOf(",");if(a=this.getPageById(a.substring(c+1)))this.selectPage(a);else throw Error(mxResources.get("pageNotFound")||"Page not found");}else this.editor.graph.handleCustomLink(a)};EditorUi.prototype.isSettingsEnabled=
function(){return"undefined"!==typeof window.mxSettings&&(isLocalStorage||mxClient.IS_CHROMEAPP)};EditorUi.prototype.installSettings=function(){if(this.isSettingsEnabled()){ColorDialog.recentColors=mxSettings.getRecentColors();if(isLocalStorage)try{window.addEventListener("storage",mxUtils.bind(this,function(a){a.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(a,b){if("1"!=urlParams["ext-fonts"])mxSettings.setCustomFonts(this.menus.customFonts);else{var c=b.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",
@@ -3569,79 +3572,79 @@ this.sidebar.showEntries("search")):(this.sidebar.showPalette("search",mxSetting
this.editor.exportToCanvas(mxUtils.bind(this,function(a,c){try{this.spinner.stop();var d=this.createImageDataUri(a,b,"png"),e=parseInt(c.getAttribute("width")),f=parseInt(c.getAttribute("height"));this.writeImageToClipboard(d,e,f,mxUtils.bind(this,function(a){this.handleError(a)}))}catch(A){this.handleError(A)}}),null,null,null,mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),null,null,null!=d?d:4,null==this.editor.graph.background||this.editor.graph.background==mxConstants.NONE,
null,null,null,10,null,null,!0,null,0<a.length?a:null)}catch(n){this.handleError(n)}};EditorUi.prototype.writeImageToClipboard=function(a,b,d,f){var c=this.base64ToBlob(a.substring(a.indexOf(",")+1),"image/png");a=new ClipboardItem({"image/png":c,"text/html":new Blob(['<img src="'+a+'" width="'+b+'" height="'+d+'">'],{type:"text/html"})});navigator.clipboard.write([a])["catch"](f)};EditorUi.prototype.copyCells=function(a,b){var c=this.editor.graph;if(c.isSelectionEmpty())a.innerHTML="";else{var d=
mxUtils.sortCells(c.model.getTopmostCells(c.getSelectionCells())),e=mxUtils.getXml(c.encodeCells(d));mxUtils.setTextContent(a,encodeURIComponent(e));b?(c.removeCells(d,!1),c.lastPasteXml=null):(c.lastPasteXml=e,c.pasteCounter=0);a.focus();document.execCommand("selectAll",!1,null)}};EditorUi.prototype.copyXml=function(){var a=null;if(Editor.enableNativeCipboard){var b=this.editor.graph;b.isSelectionEmpty()||(a=mxUtils.sortCells(b.getExportableCells(b.model.getTopmostCells(b.getSelectionCells()))),
-b=mxUtils.getXml(b.encodeCells(a)),navigator.clipboard.writeText(b))}return a};EditorUi.prototype.pasteXml=function(a,b,d,f){var c=this.editor.graph,e=null;c.lastPasteXml==a?c.pasteCounter++:(c.lastPasteXml=a,c.pasteCounter=0);var g=c.pasteCounter*c.gridSize;if(d||this.isCompatibleString(a))e=this.importXml(a,g,g),c.setSelectionCells(e);else if(b&&1==c.getSelectionCount()){g=c.getStartEditingCell(c.getSelectionCell(),f);if(/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(a)&&"image"==c.getCurrentCellStyle(g)[mxConstants.STYLE_SHAPE])c.setCellStyles(mxConstants.STYLE_IMAGE,
-a,[g]);else{c.model.beginUpdate();try{c.labelChanged(g,a),Graph.isLink(a)&&c.setLinkForCell(g,a)}finally{c.model.endUpdate()}}c.setSelectionCell(g)}else e=c.getInsertPoint(),c.isMouseInsertPoint()&&(g=0,c.lastPasteXml==a&&0<c.pasteCounter&&c.pasteCounter--),e=this.insertTextAt(a,e.x+g,e.y+g,!0),c.setSelectionCells(e);c.isSelectionEmpty()||(c.scrollCellToVisible(c.getSelectionCell()),null!=this.hoverIcons&&this.hoverIcons.update(c.view.getState(c.getSelectionCell())));return e};EditorUi.prototype.pasteCells=
-function(a,b,d,f){if(!mxEvent.isConsumed(a)){var c=b,e=!1;if(d&&null!=a.clipboardData&&a.clipboardData.getData){var g=a.clipboardData.getData("text/plain"),k=!1;if(null!=g&&0<g.length&&"%3CmxGraphModel%3E"==g.substring(0,18)){var n=decodeURIComponent(g);this.isCompatibleString(n)&&(k=!0,g=n)}k=k?null:a.clipboardData.getData("text/html");null!=k&&0<k.length?(c=this.parseHtmlData(k),e="text/plain"!=c.getAttribute("data-type")):null!=g&&0<g.length&&(c=document.createElement("div"),mxUtils.setTextContent(c,
-k))}g=c.getElementsByTagName("span");if(null!=g&&0<g.length&&"application/vnd.lucid.chart.objects"===g[0].getAttribute("data-lucid-type"))d=g[0].getAttribute("data-lucid-content"),null!=d&&0<d.length&&(this.convertLucidChart(d,mxUtils.bind(this,function(a){var c=this.editor.graph;c.lastPasteXml==a?c.pasteCounter++:(c.lastPasteXml=a,c.pasteCounter=0);var b=c.pasteCounter*c.gridSize;c.setSelectionCells(this.importXml(a,b,b));c.scrollCellToVisible(c.getSelectionCell())}),mxUtils.bind(this,function(a){this.handleError(a)})),
-mxEvent.consume(a));else{e=e?c.innerHTML:mxUtils.trim(null==c.innerText?mxUtils.getTextContent(c):c.innerText);k=!1;try{var m=e.lastIndexOf("%3E");0<=m&&m<e.length-3&&(e=e.substring(0,m+3))}catch(z){}try{g=c.getElementsByTagName("span"),n=null!=g&&0<g.length?mxUtils.trim(decodeURIComponent(g[0].textContent)):decodeURIComponent(e),this.isCompatibleString(n)&&(k=!0,e=n)}catch(z){}try{if(null!=e&&0<e.length){this.pasteXml(e,f,k,a);try{mxEvent.consume(a)}catch(z){}}else if(!d){var p=this.editor.graph;
+b=mxUtils.getXml(b.encodeCells(a)),navigator.clipboard.writeText(b))}return a};EditorUi.prototype.pasteXml=function(a,b,d,f){var c=this.editor.graph,e=null;c.lastPasteXml==a?c.pasteCounter++:(c.lastPasteXml=a,c.pasteCounter=0);var k=c.pasteCounter*c.gridSize;if(d||this.isCompatibleString(a))e=this.importXml(a,k,k),c.setSelectionCells(e);else if(b&&1==c.getSelectionCount()){k=c.getStartEditingCell(c.getSelectionCell(),f);if(/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(a)&&"image"==c.getCurrentCellStyle(k)[mxConstants.STYLE_SHAPE])c.setCellStyles(mxConstants.STYLE_IMAGE,
+a,[k]);else{c.model.beginUpdate();try{c.labelChanged(k,a),Graph.isLink(a)&&c.setLinkForCell(k,a)}finally{c.model.endUpdate()}}c.setSelectionCell(k)}else e=c.getInsertPoint(),c.isMouseInsertPoint()&&(k=0,c.lastPasteXml==a&&0<c.pasteCounter&&c.pasteCounter--),e=this.insertTextAt(a,e.x+k,e.y+k,!0),c.setSelectionCells(e);c.isSelectionEmpty()||(c.scrollCellToVisible(c.getSelectionCell()),null!=this.hoverIcons&&this.hoverIcons.update(c.view.getState(c.getSelectionCell())));return e};EditorUi.prototype.pasteCells=
+function(a,b,d,f){if(!mxEvent.isConsumed(a)){var c=b,e=!1;if(d&&null!=a.clipboardData&&a.clipboardData.getData){var k=a.clipboardData.getData("text/plain"),g=!1;if(null!=k&&0<k.length&&"%3CmxGraphModel%3E"==k.substring(0,18)){var n=decodeURIComponent(k);this.isCompatibleString(n)&&(g=!0,k=n)}g=g?null:a.clipboardData.getData("text/html");null!=g&&0<g.length?(c=this.parseHtmlData(g),e="text/plain"!=c.getAttribute("data-type")):null!=k&&0<k.length&&(c=document.createElement("div"),mxUtils.setTextContent(c,
+g))}k=c.getElementsByTagName("span");if(null!=k&&0<k.length&&"application/vnd.lucid.chart.objects"===k[0].getAttribute("data-lucid-type"))d=k[0].getAttribute("data-lucid-content"),null!=d&&0<d.length&&(this.convertLucidChart(d,mxUtils.bind(this,function(a){var c=this.editor.graph;c.lastPasteXml==a?c.pasteCounter++:(c.lastPasteXml=a,c.pasteCounter=0);var b=c.pasteCounter*c.gridSize;c.setSelectionCells(this.importXml(a,b,b));c.scrollCellToVisible(c.getSelectionCell())}),mxUtils.bind(this,function(a){this.handleError(a)})),
+mxEvent.consume(a));else{e=e?c.innerHTML:mxUtils.trim(null==c.innerText?mxUtils.getTextContent(c):c.innerText);g=!1;try{var m=e.lastIndexOf("%3E");0<=m&&m<e.length-3&&(e=e.substring(0,m+3))}catch(z){}try{k=c.getElementsByTagName("span"),n=null!=k&&0<k.length?mxUtils.trim(decodeURIComponent(k[0].textContent)):decodeURIComponent(e),this.isCompatibleString(n)&&(g=!0,e=n)}catch(z){}try{if(null!=e&&0<e.length){this.pasteXml(e,f,g,a);try{mxEvent.consume(a)}catch(z){}}else if(!d){var p=this.editor.graph;
p.lastPasteXml=null;p.pasteCounter=0}}catch(z){this.handleError(z)}}}b.innerHTML="&nbsp;"};EditorUi.prototype.addFileDropHandler=function(a){if(Graph.fileSupport)for(var c=null,b=0;b<a.length;b++)mxEvent.addListener(a[b],"dragleave",function(a){null!=c&&(c.parentNode.removeChild(c),c=null);a.stopPropagation();a.preventDefault()}),mxEvent.addListener(a[b],"dragover",mxUtils.bind(this,function(a){(this.editor.graph.isEnabled()||"1"!=urlParams.embed)&&null==c&&(!mxClient.IS_IE||10<document.documentMode&&
12>document.documentMode)&&(c=this.highlightElement());a.stopPropagation();a.preventDefault()})),mxEvent.addListener(a[b],"drop",mxUtils.bind(this,function(a){null!=c&&(c.parentNode.removeChild(c),c=null);if(this.editor.graph.isEnabled()||"1"!=urlParams.embed)if(0<a.dataTransfer.files.length)this.hideDialog(),"1"==urlParams.embed?this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,null,null,null,null,!mxEvent.isControlDown(a)&&!mxEvent.isShiftDown(a)):this.openFiles(a.dataTransfer.files,!0);
else{var b=this.extractGraphModelFromEvent(a);if(null==b){var d=null!=a.dataTransfer?a.dataTransfer:a.clipboardData;null!=d&&(10==document.documentMode||11==document.documentMode?b=d.getData("Text"):(b=null,b=0<=mxUtils.indexOf(d.types,"text/uri-list")?a.dataTransfer.getData("text/uri-list"):0<=mxUtils.indexOf(d.types,"text/html")?d.getData("text/html"):null,null!=b&&0<b.length?(d=document.createElement("div"),d.innerHTML=this.editor.graph.sanitizeHtml(b),d=d.getElementsByTagName("img"),0<d.length&&
(b=d[0].getAttribute("src"))):0<=mxUtils.indexOf(d.types,"text/plain")&&(b=d.getData("text/plain"))),null!=b&&("data:image/png;base64,"==b.substring(0,22)?(b=this.extractGraphModelFromPng(b),null!=b&&0<b.length&&this.openLocalFile(b,null,!0)):!this.isOffline()&&this.isRemoteFileFormat(b)?(new mxXmlRequest(OPEN_URL,"format=xml&data="+encodeURIComponent(b))).send(mxUtils.bind(this,function(a){200<=a.getStatus()&&299>=a.getStatus()&&this.openLocalFile(a.getText(),null,!0)})):/^https?:\/\//.test(b)&&
-(null==this.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(b):window.openWindow((mxClient.IS_CHROMEAPP?EditorUi.drawHost+"/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(b)))))}else this.openLocalFile(b,null,!0)}a.stopPropagation();a.preventDefault()}))};EditorUi.prototype.highlightElement=function(a){var c=0,b=0,d,f;if(null==a){f=document.body;var k=document.documentElement;d=(f.clientWidth||k.clientWidth)-3;f=Math.max(f.clientHeight||0,k.clientHeight)-
-3}else c=a.offsetTop,b=a.offsetLeft,d=a.clientWidth,f=a.clientHeight;k=document.createElement("div");k.style.zIndex=mxPopupMenu.prototype.zIndex+2;k.style.border="3px dotted rgb(254, 137, 12)";k.style.pointerEvents="none";k.style.position="absolute";k.style.top=c+"px";k.style.left=b+"px";k.style.width=Math.max(0,d-3)+"px";k.style.height=Math.max(0,f-3)+"px";null!=a&&a.parentNode==this.editor.graph.container?this.editor.graph.container.appendChild(k):document.body.appendChild(k);return k};EditorUi.prototype.stringToCells=
-function(a){a=mxUtils.parseXml(a);var c=this.editor.extractGraphModel(a.documentElement);a=[];if(null!=c){var b=new mxCodec(c.ownerDocument),d=new mxGraphModel;b.decode(c,d);c=d.getChildAt(d.getRoot(),0);for(b=0;b<d.getChildCount(c);b++)a.push(d.getChildAt(c,b))}return a};EditorUi.prototype.openFileHandle=function(a,b,d,f,k){if(null!=b&&0<b.length){!this.useCanvasForExport&&/(\.png)$/i.test(b)?b=b.substring(0,b.length-4)+".drawio":/(\.pdf)$/i.test(b)&&(b=b.substring(0,b.length-4)+".drawio");var c=
+(null==this.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(b):window.openWindow((mxClient.IS_CHROMEAPP?EditorUi.drawHost+"/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(b)))))}else this.openLocalFile(b,null,!0)}a.stopPropagation();a.preventDefault()}))};EditorUi.prototype.highlightElement=function(a){var c=0,b=0,d,f;if(null==a){f=document.body;var g=document.documentElement;d=(f.clientWidth||g.clientWidth)-3;f=Math.max(f.clientHeight||0,g.clientHeight)-
+3}else c=a.offsetTop,b=a.offsetLeft,d=a.clientWidth,f=a.clientHeight;g=document.createElement("div");g.style.zIndex=mxPopupMenu.prototype.zIndex+2;g.style.border="3px dotted rgb(254, 137, 12)";g.style.pointerEvents="none";g.style.position="absolute";g.style.top=c+"px";g.style.left=b+"px";g.style.width=Math.max(0,d-3)+"px";g.style.height=Math.max(0,f-3)+"px";null!=a&&a.parentNode==this.editor.graph.container?this.editor.graph.container.appendChild(g):document.body.appendChild(g);return g};EditorUi.prototype.stringToCells=
+function(a){a=mxUtils.parseXml(a);var c=this.editor.extractGraphModel(a.documentElement);a=[];if(null!=c){var b=new mxCodec(c.ownerDocument),d=new mxGraphModel;b.decode(c,d);c=d.getChildAt(d.getRoot(),0);for(b=0;b<d.getChildCount(c);b++)a.push(d.getChildAt(c,b))}return a};EditorUi.prototype.openFileHandle=function(a,b,d,f,g){if(null!=b&&0<b.length){!this.useCanvasForExport&&/(\.png)$/i.test(b)?b=b.substring(0,b.length-4)+".drawio":/(\.pdf)$/i.test(b)&&(b=b.substring(0,b.length-4)+".drawio");var c=
mxUtils.bind(this,function(a){b=0<=b.lastIndexOf(".")?b.substring(0,b.lastIndexOf("."))+".drawio":b+".drawio";if("<mxlibrary"==a.substring(0,10)){null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,f);try{this.loadLibrary(new LocalLibrary(this,a,b))}catch(A){this.handleError(A,mxResources.get("errorLoadingFile"))}}else this.openLocalFile(a,b,f)});if(/(\.v(dx|sdx?))($|\?)/i.test(b)||/(\.vs(x|sx?))($|\?)/i.test(b))this.importVisio(d,mxUtils.bind(this,
function(a){this.spinner.stop();c(a)}));else if(/(\.*<graphml )/.test(a))this.importGraphML(a,mxUtils.bind(this,function(a){this.spinner.stop();c(a)}));else if(Graph.fileSupport&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a,b))this.parseFile(d,mxUtils.bind(this,function(a){4==a.readyState&&(this.spinner.stop(),200<=a.status&&299>=a.status?c(a.responseText):this.handleError({message:mxResources.get(413==a.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))}));
else if(this.isLucidChartData(a))/(\.json)$/i.test(b)&&(b=b.substring(0,b.length-5)+".drawio"),this.convertLucidChart(a,mxUtils.bind(this,function(a){this.spinner.stop();this.openLocalFile(a,b,f)}),mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}));else if("<mxlibrary"==a.substring(0,10)){this.spinner.stop();null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,f);try{this.loadLibrary(new LocalLibrary(this,a,d.name))}catch(t){this.handleError(t,
-mxResources.get("errorLoadingFile"))}}else if(0==a.indexOf("PK"))this.importZipFile(d,mxUtils.bind(this,function(a){this.spinner.stop();c(a)}),mxUtils.bind(this,function(){this.spinner.stop();this.openLocalFile(a,b,f)}));else{if("image/png"==d.type.substring(0,9))a=this.extractGraphModelFromPng(a);else if("application/pdf"==d.type){var e=Editor.extractGraphModelFromPdf(a);null!=e&&(k=null,f=!0,a=e)}this.spinner.stop();this.openLocalFile(a,b,f,k,null!=k?d:null)}}};EditorUi.prototype.openFiles=function(a,
+mxResources.get("errorLoadingFile"))}}else if(0==a.indexOf("PK"))this.importZipFile(d,mxUtils.bind(this,function(a){this.spinner.stop();c(a)}),mxUtils.bind(this,function(){this.spinner.stop();this.openLocalFile(a,b,f)}));else{if("image/png"==d.type.substring(0,9))a=this.extractGraphModelFromPng(a);else if("application/pdf"==d.type){var e=Editor.extractGraphModelFromPdf(a);null!=e&&(g=null,f=!0,a=e)}this.spinner.stop();this.openLocalFile(a,b,f,g,null!=g?d:null)}}};EditorUi.prototype.openFiles=function(a,
b){if(this.spinner.spin(document.body,mxResources.get("loading")))for(var c=0;c<a.length;c++)mxUtils.bind(this,function(a){var c=new FileReader;c.onload=mxUtils.bind(this,function(c){try{this.openFileHandle(c.target.result,a.name,a,b)}catch(u){this.handleError(u)}});c.onerror=mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a);window.openFile=null});"image"!==a.type.substring(0,5)&&"application/pdf"!==a.type||"image/svg"===a.type.substring(0,9)?c.readAsText(a):c.readAsDataURL(a)})(a[c])};
-EditorUi.prototype.openLocalFile=function(a,b,d,f,k){var c=this.getCurrentFile(),e=mxUtils.bind(this,function(){window.openFile=null;if(null==b&&null!=this.getCurrentFile()&&this.isDiagramEmpty()){var c=mxUtils.parseXml(a);null!=c&&(this.editor.setGraphXml(c.documentElement),this.editor.graph.selectAll())}else this.fileLoaded(new LocalFile(this,a,b||this.defaultFilename,d,f,k))});if(null!=a&&0<a.length)null==c||!c.isModified()&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=f)?e():(mxClient.IS_CHROMEAPP||
+EditorUi.prototype.openLocalFile=function(a,b,d,f,g){var c=this.getCurrentFile(),e=mxUtils.bind(this,function(){window.openFile=null;if(null==b&&null!=this.getCurrentFile()&&this.isDiagramEmpty()){var c=mxUtils.parseXml(a);null!=c&&(this.editor.setGraphXml(c.documentElement),this.editor.graph.selectAll())}else this.fileLoaded(new LocalFile(this,a,b||this.defaultFilename,d,f,g))});if(null!=a&&0<a.length)null==c||!c.isModified()&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=f)?e():(mxClient.IS_CHROMEAPP||
EditorUi.isElectronApp||null!=f)&&null!=c&&c.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(a,b),window.openWindow(this.getUrl(),null,mxUtils.bind(this,function(){null!=c&&c.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 a={};if(null!=this.pages)for(var b=0;b<this.pages.length;b++)this.updatePageRoot(this.pages[b]),this.addBasenamesForCell(this.pages[b].root,a);else this.addBasenamesForCell(this.editor.graph.model.getRoot(),a);var b=[],d;for(d in a)b.push(d);return b};EditorUi.prototype.addBasenamesForCell=function(a,b){function c(a){if(null!=a){var c=a.lastIndexOf(".");0<c&&(a=a.substring(c+1,a.length));null==b[a]&&(b[a]=!0)}}var d=this.editor.graph,e=d.getCellStyle(a);
c(mxStencilRegistry.getBasenameForStencil(e[mxConstants.STYLE_SHAPE]));d.model.isEdge(a)&&(c(mxMarker.getPackageForType(e[mxConstants.STYLE_STARTARROW])),c(mxMarker.getPackageForType(e[mxConstants.STYLE_ENDARROW])));for(var e=d.model.getChildCount(a),f=0;f<e;f++)this.addBasenamesForCell(d.model.getChildAt(a,f),b)};EditorUi.prototype.setGraphEnabled=function(a){this.diagramContainer.style.visibility=a?"":"hidden";this.formatContainer.style.visibility=a?"":"hidden";this.sidebarFooterContainer.style.display=
a?"":"none";this.sidebarContainer.style.display=a?"":"none";this.hsplit.style.display=a?"":"none";this.editor.graph.setEnabled(a);null!=this.ruler&&(this.ruler.hRuler.container.style.visibility=a?"":"hidden",this.ruler.vRuler.container.style.visibility=a?"":"hidden");null!=this.tabContainer&&(this.tabContainer.style.visibility=a?"":"hidden");a||(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);(window.opener||window.parent)!=window&&("1"!=urlParams.spin||this.spinner.spin(document.body,mxResources.get("loading")))&&this.installMessageHandler(mxUtils.bind(this,function(a,b,d,f){this.spinner.stop();
-this.addEmbedButtons();this.setGraphEnabled(!0);if(null==a||0==a.length)a=this.emptyDiagramXml;this.setCurrentFile(new EmbedFile(this,a,{}));this.mode=App.MODE_EMBED;this.setFileData(a);if(f)try{var c=this.editor.graph;c.setGridEnabled(!1);c.pageVisible=!1;var e=c.model.cells,g;for(g in e){var k=e[g];null!=k&&null!=k.style&&(k.style+=";sketch=1;"+(-1==k.style.indexOf("fontFamily=")||-1<k.style.indexOf("fontFamily=Helvetica;")?"fontFamily=Architects Daughter;fontSource=https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter;":
+this.addEmbedButtons();this.setGraphEnabled(!0);if(null==a||0==a.length)a=this.emptyDiagramXml;this.setCurrentFile(new EmbedFile(this,a,{}));this.mode=App.MODE_EMBED;this.setFileData(a);if(f)try{var c=this.editor.graph;c.setGridEnabled(!1);c.pageVisible=!1;var e=c.model.cells,k;for(k in e){var g=e[k];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(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!=d?d:!1;this.updateUi();window.self!==window.top&&window.focus();null!=this.format&&this.format.refresh()}))};EditorUi.prototype.showLayersDialog=function(){1<this.editor.graph.getModel().getChildCount(this.editor.graph.getModel().getRoot())&&(null==this.actions.layersWindow?
this.actions.get("layers").funct():this.actions.layersWindow.window.setVisible(!0))};EditorUi.prototype.getPublicUrl=function(a,b){null!=a?a.getPublicUrl(b):b(null)};EditorUi.prototype.createLoadMessage=function(a){var c=this.editor.graph;return{event:a,pageVisible:c.pageVisible,translate:c.view.translate,bounds:c.getGraphBounds(),currentPage:this.getSelectedPageIndex(),scale:c.view.scale,page:c.view.getBackgroundPageBounds()}};EditorUi.prototype.installMessageHandler=function(a){var c=null,b=!1,
-d=!1,f=null,k=mxUtils.bind(this,function(a,c){this.editor.modified&&"0"!=urlParams.modified?null!=urlParams.modified&&this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(urlParams.modified))):this.editor.setStatus("")});this.editor.graph.model.addListener(mxEvent.CHANGE,k);mxEvent.addListener(window,"message",mxUtils.bind(this,function(e){if(e.source==(window.opener||window.parent)){var g=e.data,k=mxUtils.bind(this,function(a){if(null!=a&&"function"===typeof a.charAt&&"<"!=a.charAt(0))try{"data:image/png;base64,"==
+d=!1,f=null,g=mxUtils.bind(this,function(a,c){this.editor.modified&&"0"!=urlParams.modified?null!=urlParams.modified&&this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(urlParams.modified))):this.editor.setStatus("")});this.editor.graph.model.addListener(mxEvent.CHANGE,g);mxEvent.addListener(window,"message",mxUtils.bind(this,function(e){if(e.source==(window.opener||window.parent)){var g=e.data,k=mxUtils.bind(this,function(a){if(null!=a&&"function"===typeof a.charAt&&"<"!=a.charAt(0))try{"data:image/png;base64,"==
a.substring(0,22)?a=this.extractGraphModelFromPng(a):"data:image/svg+xml;base64,"==a.substring(0,26)?a=atob(a.substring(26)):"data:image/svg+xml;utf8,"==a.substring(0,24)&&(a=a.substring(24)),null!=a&&("%"==a.charAt(0)?a=decodeURIComponent(a):"<"!=a.charAt(0)&&(a=Graph.decompress(a)))}catch(ta){}return a});if("json"==urlParams.proto){var l=!1;try{g=JSON.parse(g)}catch(P){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.executeLayoutList(g.layouts);return}if("prompt"==g.action){this.spinner.stop();var n=new FilenameDialog(this,g.defaultValue||"",null!=g.okKey?mxResources.get(g.okKey):g.ok,function(a){null!=a?m.postMessage(JSON.stringify({event:"prompt",value:a,message:g}),"*"):m.postMessage(JSON.stringify({event:"prompt-cancel",message:g}),
"*")},null!=g.titleKey?mxResources.get(g.titleKey):g.title);this.showDialog(n.container,300,80,!0,!1);n.init();return}if("draft"==g.action){var p=k(g.xml);this.spinner.stop();n=new DraftDialog(this,mxResources.get("draftFound",[g.name||this.defaultFilename]),p,mxUtils.bind(this,function(){this.hideDialog();m.postMessage(JSON.stringify({event:"draft",result:"edit",message:g}),"*")}),mxUtils.bind(this,function(){this.hideDialog();m.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();m.postMessage(JSON.stringify({event:"draft",result:"ignore",message:g}),"*")}):null);this.showDialog(n.container,640,480,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));try{n.init()}catch(P){m.postMessage(JSON.stringify({event:"draft",error:P.toString(),message:g}),"*")}return}if("template"==g.action){this.spinner.stop();
-var q=1==g.enableRecent,t=1==g.enableSearch,u=1==g.enableCustomTemp;if("1"==urlParams.newTempDlg&&!g.templatesOnly&&null!=g.callback){var C=this.getCurrentUser(),A=new TemplatesDialog(this,function(a,c,b){a=a||this.emptyDiagramXml;m.postMessage(JSON.stringify({event:"template",xml:a,blank:a==this.emptyDiagramXml,name:c,tempUrl:b.url,libs:b.libs,builtIn:null!=b.info&&null!=b.info.custContentId,message:g}),"*")},mxUtils.bind(this,function(){this.actions.get("exit").funct()}),null,null,null!=C?C.id:
+var q=1==g.enableRecent,t=1==g.enableSearch,u=1==g.enableCustomTemp;if("1"==urlParams.newTempDlg&&!g.templatesOnly&&null!=g.callback){var D=this.getCurrentUser(),A=new TemplatesDialog(this,function(a,c,b){a=a||this.emptyDiagramXml;m.postMessage(JSON.stringify({event:"template",xml:a,blank:a==this.emptyDiagramXml,name:c,tempUrl:b.url,libs:b.libs,builtIn:null!=b.info&&null!=b.info.custContentId,message:g}),"*")},mxUtils.bind(this,function(){this.actions.get("exit").funct()}),null,null,null!=D?D.id:
null,q?mxUtils.bind(this,function(a,c,b){this.remoteInvoke("getRecentDiagrams",[b],null,a,c)}):null,t?mxUtils.bind(this,function(a,c,b,d){this.remoteInvoke("searchDiagrams",[a,d],null,c,b)}):null,mxUtils.bind(this,function(a,c,b){this.remoteInvoke("getFileContent",[a.url],null,c,b)}),null,u?mxUtils.bind(this,function(a){this.remoteInvoke("getCustomTemplates",null,null,a,function(){a({},0)})}):null,!1,!1,!0,!0);this.showDialog(A.container,window.innerWidth,window.innerHeight,!0,!1,null,!1,!0);return}n=
new NewDialog(this,!1,g.templatesOnly?!1:null!=g.callback,mxUtils.bind(this,function(c,b,d,f){c=c||this.emptyDiagramXml;null!=g.callback?m.postMessage(JSON.stringify({event:"template",xml:c,blank:c==this.emptyDiagramXml,name:b,tempUrl:d,libs:f,builtIn:!0,message:g}),"*"):(a(c,e,c!=this.emptyDiagramXml,g.toSketch),this.editor.modified||this.editor.setStatus(""))}),null,null,null,null,null,null,null,q?mxUtils.bind(this,function(a){this.remoteInvoke("getRecentDiagrams",[null],null,a,function(){a(null,
"Network Error!")})}):null,t?mxUtils.bind(this,function(a,c){this.remoteInvoke("searchDiagrams",[a,null],null,c,function(){c(null,"Network Error!")})}):null,mxUtils.bind(this,function(a,c,b){m.postMessage(JSON.stringify({event:"template",docUrl:a,info:c,name:b}),"*")}),null,null,u?mxUtils.bind(this,function(a){this.remoteInvoke("getCustomTemplates",null,null,a,function(){a({},0)})}):null,1==g.withoutType);this.showDialog(n.container,620,460,!0,!1,mxUtils.bind(this,function(a){this.sidebar.hideTooltip();
a&&this.actions.get("exit").funct()}));n.init();return}if("textContent"==g.action){var U=this.getDiagramTextContent();m.postMessage(JSON.stringify({event:"textContent",data:U,message:g}),"*");return}if("status"==g.action){null!=g.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(g.messageKey))):null!=g.message&&this.editor.setStatus(mxUtils.htmlEntities(g.message));null!=g.modified&&(this.editor.modified=g.modified);return}if("spinner"==g.action){var O=null!=g.messageKey?mxResources.get(g.messageKey):
-g.message;null==g.show||g.show?this.spinner.spin(document.body,O):this.spinner.stop();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 N=null!=g.xml?g.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var v=this.editor.graph,D=mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();var c=this.createLoadMessage("export");c.format=
-g.format;c.message=g;c.data=a;c.xml=N;m.postMessage(JSON.stringify(c),"*")}),B=mxUtils.bind(this,function(a){null==a&&(a=Editor.blankImage);"xmlpng"==g.format&&(a=Editor.writeGraphModelToPng(a,"tEXt","mxfile",encodeURIComponent(N)));v!=this.editor.graph&&v.container.parentNode.removeChild(v.container);D(a)}),J=g.pageId||(null!=this.pages?g.currentPage?this.currentPage.getId():this.pages[0].getId():null);if(this.isExportToCanvas()){null!=g.xml&&0<g.xml.length&&(b=!0,this.setFileData(N),b=!1);if(null!=
-this.pages&&this.currentPage.getId()!=J){for(var L=v.getGlobalVariable,v=this.createTemporaryGraph(v.getStylesheet()),W,Q=0;Q<this.pages.length;Q++)if(this.pages[Q].getId()==J){W=this.updatePageRoot(this.pages[Q]);break}null==W&&(W=this.currentPage);v.getGlobalVariable=function(a){return"page"==a?W.getName():"pagenumber"==a?1:L.apply(this,arguments)};document.body.appendChild(v.container);v.model.setRoot(W.root)}if(null!=g.layerIds){for(var aa=v.model,na=aa.getChildCells(aa.getRoot()),n={},Q=0;Q<
-g.layerIds.length;Q++)n[g.layerIds[Q]]=!0;for(Q=0;Q<na.length;Q++)aa.setVisible(na[Q],n[na[Q].id]||!1)}this.editor.exportToCanvas(mxUtils.bind(this,function(a){B(a.toDataURL("image/png"))}),g.width,null,g.background,mxUtils.bind(this,function(){B(null)}),null,null,g.scale,g.transparent,g.shadow,null,v,g.border,null,g.grid,g.keepTheme)}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==g.format?"1":"0")+(null!=J?"&pageId="+J:"")+(null!=g.layerIds&&0<g.layerIds.length?"&extras="+encodeURIComponent(JSON.stringify({layerIds:g.layerIds})):
-"")+(null!=g.scale?"&scale="+g.scale:"")+"&base64=1&xml="+encodeURIComponent(N))).send(mxUtils.bind(this,function(a){200<=a.getStatus()&&299>=a.getStatus()?D("data:image/png;base64,"+a.getText()):B(null)}),mxUtils.bind(this,function(){B(null)}))}}else{null!=g.xml&&0<g.xml.length&&(b=!0,this.setFileData(g.xml),b=!1);O=this.createLoadMessage("export");O.message=g;if("html2"==g.format||"html"==g.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length)){var ga=this.getXmlFileData();O.xml=
-mxUtils.getXml(ga);O.data=this.getFileData(null,null,!0,null,null,null,ga);O.format=g.format}else if("html"==g.format)N=this.editor.getGraphXml(),O.data=this.getHtml(N,this.editor.graph),O.xml=mxUtils.getXml(N),O.format=g.format;else{mxSvgCanvas2D.prototype.foAltText=null;var ea=null!=g.background?g.background:this.editor.graph.background;ea==mxConstants.NONE&&(ea=null);O.xml=this.getFileData(!0,null,null,null,null,null,null,null,null,!1);O.format="svg";var la=mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);
-this.spinner.stop();O.data=Editor.createSvgDataUri(a);m.postMessage(JSON.stringify(O),"*")});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(O.xml,this.editor.graph,null,!0,la,null,null,g.embedImages,ea,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);
-var V=this.editor.graph.getSvg(ea,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(V);this.embedFonts(V,mxUtils.bind(this,function(a){g.embedImages||null==g.embedImages?this.editor.convertImages(a,mxUtils.bind(this,function(a){la(mxUtils.getXml(a))})):la(mxUtils.getXml(a))}))}return}m.postMessage(JSON.stringify(O),"*")}return}if("load"==g.action){l=g.toSketch;d=1==
+g.message;null==g.show||g.show?this.spinner.spin(document.body,O):this.spinner.stop();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 N=null!=g.xml?g.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var v=this.editor.graph,C=mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();var c=this.createLoadMessage("export");c.format=
+g.format;c.message=g;c.data=a;c.xml=N;m.postMessage(JSON.stringify(c),"*")}),B=mxUtils.bind(this,function(a){null==a&&(a=Editor.blankImage);"xmlpng"==g.format&&(a=Editor.writeGraphModelToPng(a,"tEXt","mxfile",encodeURIComponent(N)));v!=this.editor.graph&&v.container.parentNode.removeChild(v.container);C(a)}),J=g.pageId||(null!=this.pages?g.currentPage?this.currentPage.getId():this.pages[0].getId():null);if(this.isExportToCanvas()){null!=g.xml&&0<g.xml.length&&(b=!0,this.setFileData(N),b=!1);if(null!=
+this.pages&&this.currentPage.getId()!=J){for(var L=v.getGlobalVariable,v=this.createTemporaryGraph(v.getStylesheet()),W,Q=0;Q<this.pages.length;Q++)if(this.pages[Q].getId()==J){W=this.updatePageRoot(this.pages[Q]);break}null==W&&(W=this.currentPage);v.getGlobalVariable=function(a){return"page"==a?W.getName():"pagenumber"==a?1:L.apply(this,arguments)};document.body.appendChild(v.container);v.model.setRoot(W.root)}if(null!=g.layerIds){for(var Z=v.model,na=Z.getChildCells(Z.getRoot()),n={},Q=0;Q<g.layerIds.length;Q++)n[g.layerIds[Q]]=
+!0;for(Q=0;Q<na.length;Q++)Z.setVisible(na[Q],n[na[Q].id]||!1)}this.editor.exportToCanvas(mxUtils.bind(this,function(a){B(a.toDataURL("image/png"))}),g.width,null,g.background,mxUtils.bind(this,function(){B(null)}),null,null,g.scale,g.transparent,g.shadow,null,v,g.border,null,g.grid,g.keepTheme)}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==g.format?"1":"0")+(null!=J?"&pageId="+J:"")+(null!=g.layerIds&&0<g.layerIds.length?"&extras="+encodeURIComponent(JSON.stringify({layerIds:g.layerIds})):
+"")+(null!=g.scale?"&scale="+g.scale:"")+"&base64=1&xml="+encodeURIComponent(N))).send(mxUtils.bind(this,function(a){200<=a.getStatus()&&299>=a.getStatus()?C("data:image/png;base64,"+a.getText()):B(null)}),mxUtils.bind(this,function(){B(null)}))}}else{null!=g.xml&&0<g.xml.length&&(b=!0,this.setFileData(g.xml),b=!1);O=this.createLoadMessage("export");O.message=g;if("html2"==g.format||"html"==g.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length)){var ga=this.getXmlFileData();O.xml=
+mxUtils.getXml(ga);O.data=this.getFileData(null,null,!0,null,null,null,ga);O.format=g.format}else if("html"==g.format)N=this.editor.getGraphXml(),O.data=this.getHtml(N,this.editor.graph),O.xml=mxUtils.getXml(N),O.format=g.format;else{mxSvgCanvas2D.prototype.foAltText=null;var da=null!=g.background?g.background:this.editor.graph.background;da==mxConstants.NONE&&(da=null);O.xml=this.getFileData(!0,null,null,null,null,null,null,null,null,!1);O.format="svg";var la=mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);
+this.spinner.stop();O.data=Editor.createSvgDataUri(a);m.postMessage(JSON.stringify(O),"*")});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(O.xml,this.editor.graph,null,!0,la,null,null,g.embedImages,da,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);
+var V=this.editor.graph.getSvg(da,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(V);this.embedFonts(V,mxUtils.bind(this,function(a){g.embedImages||null==g.embedImages?this.editor.convertImages(a,mxUtils.bind(this,function(a){la(mxUtils.getXml(a))})):la(mxUtils.getXml(a))}))}return}m.postMessage(JSON.stringify(O),"*")}return}if("load"==g.action){l=g.toSketch;d=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);null!=g.noExitBtn&&null==urlParams.noExitBtn&&(urlParams.noExitBtn=g.noExitBtn);null!=g.title&&null!=this.buttonContainer&&(p=document.createElement("span"),mxUtils.write(p,g.title),"atlas"==uiTheme?(this.buttonContainer.style.paddingRight=
"12px",this.buttonContainer.style.paddingTop="6px",this.buttonContainer.style.right="1"==urlParams.noLangIcon?"0":"25px"):"min"!=uiTheme&&(this.buttonContainer.style.paddingRight="38px",this.buttonContainer.style.paddingTop="6px"),null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan),this.buttonContainer.appendChild(p),this.embedFilenameSpan=p);try{g.libs&&this.sidebar.showEntries(g.libs)}catch(P){}g=null!=g.xmlpng?this.extractGraphModelFromPng(g.xmlpng):
-null!=g.descriptor?g.descriptor:g.xml}else{if("merge"==g.action){var ca=this.getCurrentFile();null!=ca&&(p=k(g.xml),null!=p&&""!=p&&ca.mergeFile(new LocalFile(this,p),function(){m.postMessage(JSON.stringify({event:"merge",message:g}),"*")},function(a){m.postMessage(JSON.stringify({event:"merge",message:g,error:a}),"*")}))}else"remoteInvokeReady"==g.action?this.handleRemoteInvokeReady(m):"remoteInvoke"==g.action?this.handleRemoteInvoke(g,e.origin):"remoteInvokeResponse"==g.action?this.handleRemoteInvokeResponse(g):
-m.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(g)}),"*");return}}catch(P){this.handleError(P)}}var ma=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())}),T=mxUtils.bind(this,function(e,g){b=!0;try{a(e,g,null,l)}catch(da){this.handleError(da)}b=!1;null!=urlParams.modified&&this.editor.setStatus("");f=ma();d&&null==c&&(c=mxUtils.bind(this,function(a,c){var d=ma();if(d!=
+null!=g.descriptor?g.descriptor:g.xml}else{if("merge"==g.action){var ba=this.getCurrentFile();null!=ba&&(p=k(g.xml),null!=p&&""!=p&&ba.mergeFile(new LocalFile(this,p),function(){m.postMessage(JSON.stringify({event:"merge",message:g}),"*")},function(a){m.postMessage(JSON.stringify({event:"merge",message:g,error:a}),"*")}))}else"remoteInvokeReady"==g.action?this.handleRemoteInvokeReady(m):"remoteInvoke"==g.action?this.handleRemoteInvoke(g,e.origin):"remoteInvokeResponse"==g.action?this.handleRemoteInvokeResponse(g):
+m.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(g)}),"*");return}}catch(P){this.handleError(P)}}var ma=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())}),T=mxUtils.bind(this,function(e,g){b=!0;try{a(e,g,null,l)}catch(ca){this.handleError(ca)}b=!1;null!=urlParams.modified&&this.editor.setStatus("");f=ma();d&&null==c&&(c=mxUtils.bind(this,function(a,c){var d=ma();if(d!=
f&&!b){var e=this.createLoadMessage("autosave");e.xml=d;(window.opener||window.parent).postMessage(JSON.stringify(e),"*")}f=d}),this.editor.graph.model.addListener(mxEvent.CHANGE,c),this.editor.graph.addListener("gridSizeChanged",c),this.editor.graph.addListener("shadowVisibleChanged",c),this.addListener("pageFormatChanged",c),this.addListener("pageScaleChanged",c),this.addListener("backgroundColorChanged",c),this.addListener("backgroundImageChanged",c),this.addListener("foldingEnabledChanged",c),
this.addListener("mathEnabledChanged",c),this.addListener("gridEnabledChanged",c),this.addListener("guidesEnabledChanged",c),this.addListener("pageViewChanged",c));if("1"==urlParams.returnbounds||"json"==urlParams.proto){var k=this.createLoadMessage("load");k.xml=e;m.postMessage(JSON.stringify(k),"*")}});null!=g&&"function"===typeof g.substring&&"data:application/vnd.visio;base64,"==g.substring(0,34)?(k="0M8R4KGxGuE"==g.substring(34,45)?"raw.vsd":"raw.vsdx",this.importVisio(this.base64ToBlob(g.substring(g.indexOf(",")+
1)),function(a){T(a,e)},mxUtils.bind(this,function(a){this.handleError(a)}),k)):null!=g&&"function"===typeof g.substring&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(g,"")?this.parseFile(new Blob([g],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&200<=a.status&&299>=a.status&&"<mxGraphModel"==a.responseText.substring(0,13)&&T(a.responseText,e)}),""):null!=g&&"function"===typeof g.substring&&this.isLucidChartData(g)?this.convertLucidChart(g,
-mxUtils.bind(this,function(a){T(a)}),mxUtils.bind(this,function(a){this.handleError(a)})):null==g||"object"!==typeof g||null==g.format||null==g.data&&null==g.url?(g=k(g),T(g,e)):this.loadDescriptor(g,mxUtils.bind(this,function(a){T(ma(),e)}),mxUtils.bind(this,function(a){this.handleError(a,mxResources.get("errorLoadingFile"))}))}}));var m=window.opener||window.parent,k="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";m.postMessage(k,"*");if("json"==urlParams.proto){var p=
+mxUtils.bind(this,function(a){T(a)}),mxUtils.bind(this,function(a){this.handleError(a)})):null==g||"object"!==typeof g||null==g.format||null==g.data&&null==g.url?(g=k(g),T(g,e)):this.loadDescriptor(g,mxUtils.bind(this,function(a){T(ma(),e)}),mxUtils.bind(this,function(a){this.handleError(a,mxResources.get("errorLoadingFile"))}))}}));var m=window.opener||window.parent,g="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";m.postMessage(g,"*");if("json"==urlParams.proto){var p=
this.editor.graph.openLink;this.editor.graph.openLink=function(a,c,b){p.apply(this,arguments);m.postMessage(JSON.stringify({event:"openLink",href:a,target:c,allowOpener:b}),"*")}}};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.menubar){var a=document.createElement("div");a.style.display="inline-block";a.style.position="absolute";a.style.paddingTop="atlas"==uiTheme?"2px":"0px";a.style.paddingLeft="8px";a.style.paddingBottom="2px";var b=document.createElement("button");b.className="geBigButton";
var d=b;if("1"==urlParams.noSaveBtn){if("0"!=urlParams.saveAndExit){var f="1"==urlParams.publishClose?mxResources.get("publish"):mxResources.get("saveAndExit");mxUtils.write(b,f);b.setAttribute("title",f);mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()}));a.appendChild(b)}}else mxUtils.write(b,mxResources.get("save")),b.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)"),mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()})),
a.appendChild(b),"1"==urlParams.saveAndExit&&(b=document.createElement("a"),mxUtils.write(b,mxResources.get("saveAndExit")),b.setAttribute("title",mxResources.get("saveAndExit")),b.className="geBigButton geBigStandardButton",b.style.marginLeft="6px",mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),a.appendChild(b),d=b);"1"!=urlParams.noExitBtn&&(b=document.createElement("a"),d="1"==urlParams.publishClose?mxResources.get("close"):mxResources.get("exit"),
mxUtils.write(b,d),b.setAttribute("title",d),b.className="geBigButton geBigStandardButton",b.style.marginLeft="6px",mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()})),a.appendChild(b),d=b);d.style.marginRight="20px";this.toolbar.container.appendChild(a);this.toolbar.staticElements.push(a);a.style.right="atlas"!=uiTheme?"52px":"42px"}};EditorUi.prototype.showImportCsvDialog=function(){null==this.importCsvDialog&&(this.importCsvDialog=new TextareaDialog(this,
mxResources.get("csv")+":",Editor.defaultCsvValue,mxUtils.bind(this,function(a){this.importCsv(a)}),null,null,620,430,null,!0,!0,mxResources.get("import"),this.isOffline()?null:"https://drawio-app.com/import-from-csv-to-drawio/"));this.showDialog(this.importCsvDialog.container,640,520,!0,!0,null,null,null,null,!0);this.importCsvDialog.init()};EditorUi.prototype.executeLayoutList=function(a,b){for(var c=this.editor.graph,d=c.getSelectionCells(),e=0;e<a.length;e++){var f=new window[a[e].layout](c);
-if(null!=a[e].config)for(var k in a[e].config)f[k]=a[e].config[k];this.executeLayout(function(){f.execute(c.getDefaultParent(),0==d.length?null:d)},e==a.length-1,b)}};EditorUi.prototype.importCsv=function(a,b){try{var c=a.split("\n"),d=[],e=[],f={};if(0<c.length){var k={},m=null,p=null,x=null,G=null,z=null,E=null,H=null,K=null,F=null,I="",C="auto",M="auto",U=null,O=null,N=40,v=40,D=100,B=0,J=this.editor.graph;J.getGraphBounds();for(var L=function(){null!=b?b(ra):(J.setSelectionCells(ra),J.scrollCellToVisible(J.getSelectionCell()))},
-W=J.getFreeInsertPoint(),Q=W.x,aa=W.y,W=aa,na=null,ga="auto",F=null,ea=[],la=null,V=null,ca=0;ca<c.length&&"#"==c[ca].charAt(0);){a=c[ca];for(ca++;ca<c.length&&"\\"==a.charAt(a.length-1)&&"#"==c[ca].charAt(0);)a=a.substring(0,a.length-1)+mxUtils.trim(c[ca].substring(1)),ca++;if("#"!=a.charAt(1)){var ma=a.indexOf(":");if(0<ma){var T=mxUtils.trim(a.substring(1,ma)),P=mxUtils.trim(a.substring(ma+1));"label"==T?na=J.sanitizeHtml(P):"labelname"==T&&0<P.length&&"-"!=P?z=P:"labels"==T&&0<P.length&&"-"!=
-P?E=JSON.parse(P):"style"==T?p=P:"parentstyle"==T?H=P:"stylename"==T&&0<P.length&&"-"!=P?G=P:"styles"==T&&0<P.length&&"-"!=P?x=JSON.parse(P):"vars"==T&&0<P.length&&"-"!=P?m=JSON.parse(P):"identity"==T&&0<P.length&&"-"!=P?K=P:"parent"==T&&0<P.length&&"-"!=P?F=P:"namespace"==T&&0<P.length&&"-"!=P?I=P:"width"==T?C=P:"height"==T?M=P:"left"==T&&0<P.length?U=P:"top"==T&&0<P.length?O=P:"ignore"==T?V=P.split(","):"connect"==T?ea.push(JSON.parse(P)):"link"==T?la=P:"padding"==T?B=parseFloat(P):"edgespacing"==
-T?N=parseFloat(P):"nodespacing"==T?v=parseFloat(P):"levelspacing"==T?D=parseFloat(P):"layout"==T&&(ga=P)}}}if(null==c[ca])throw Error(mxResources.get("invalidOrMissingFile"));for(var ta=this.editor.csvToArray(c[ca]),T=ma=null,P=[],X=0;X<ta.length;X++)K==ta[X]&&(ma=X),F==ta[X]&&(T=X),P.push(mxUtils.trim(ta[X]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,""));null==na&&(na="%"+P[0]+"%");if(null!=ea)for(var da=0;da<ea.length;da++)null==k[ea[da].to]&&(k[ea[da].to]={});K=[];for(X=ca+1;X<
-c.length;X++){var ia=this.editor.csvToArray(c[X]);if(null==ia){var pa=40<c[X].length?c[X].substring(0,40)+"...":c[X];throw Error(pa+" ("+X+"):\n"+mxResources.get("containsValidationErrors"));}0<ia.length&&K.push(ia)}J.model.beginUpdate();try{for(X=0;X<K.length;X++){var ia=K[X],R=null,ka=null!=ma?I+ia[ma]:null;null!=ka&&(R=J.model.getCell(ka));var c=null!=R,ba=new mxCell(na,new mxGeometry(Q,W,0,0),p||"whiteSpace=wrap;html=1;");ba.vertex=!0;ba.id=ka;for(var ja=0;ja<ia.length;ja++)J.setAttributeForCell(ba,
-P[ja],ia[ja]);if(null!=z&&null!=E){var Y=E[ba.getAttribute(z)];null!=Y&&J.labelChanged(ba,Y)}if(null!=G&&null!=x){var qa=x[ba.getAttribute(G)];null!=qa&&(ba.style=qa)}J.setAttributeForCell(ba,"placeholders","1");ba.style=J.replacePlaceholders(ba,ba.style,m);c&&(J.model.setGeometry(R,ba.geometry),J.model.setStyle(R,ba.style),0>mxUtils.indexOf(e,R)&&e.push(R));R=ba;if(!c)for(da=0;da<ea.length;da++)k[ea[da].to][R.getAttribute(ea[da].to)]=R;null!=la&&"link"!=la&&(J.setLinkForCell(R,R.getAttribute(la)),
-J.setAttributeForCell(R,la,null));J.fireEvent(new mxEventObject("cellsInserted","cells",[R]));var va=this.editor.graph.getPreferredSizeForCell(R);R.vertex&&(null!=U&&null!=R.getAttribute(U)&&(R.geometry.x=Q+parseFloat(R.getAttribute(U))),null!=O&&null!=R.getAttribute(O)&&(R.geometry.y=aa+parseFloat(R.getAttribute(O))),"@"==C.charAt(0)&&null!=R.getAttribute(C.substring(1))?R.geometry.width=parseFloat(R.getAttribute(C.substring(1))):R.geometry.width="auto"==C?va.width+B:parseFloat(C),"@"==M.charAt(0)&&
-null!=R.getAttribute(M.substring(1))?R.geometry.height=parseFloat(R.getAttribute(M.substring(1))):R.geometry.height="auto"==M?va.height+B:parseFloat(M),W+=R.geometry.height+v);c?(null==f[ka]&&(f[ka]=[]),f[ka].push(R)):(F=null!=T?J.model.getCell(I+ia[T]):null,d.push(R),null!=F?(F.style=J.replacePlaceholders(F,H,m),J.addCell(R,F)):e.push(J.addCell(R)))}for(var ua=e.slice(),ra=e.slice(),da=0;da<ea.length;da++)for(var ya=ea[da],X=0;X<d.length;X++){var R=d[X],za=mxUtils.bind(this,function(a,c,b){var d=
-c.getAttribute(b.from);if(null!=d&&(J.setAttributeForCell(c,b.from,null),""!=d))for(var d=d.split(","),e=0;e<d.length;e++){var f=k[b.to][d[e]];if(null!=f){var g=b.label;null!=b.fromlabel&&(g=(c.getAttribute(b.fromlabel)||"")+(g||""));null!=b.sourcelabel&&(g=J.replacePlaceholders(c,b.sourcelabel,m)+(g||""));null!=b.tolabel&&(g=(g||"")+(f.getAttribute(b.tolabel)||""));null!=b.targetlabel&&(g=(g||"")+J.replacePlaceholders(f,b.targetlabel,m));var l="target"==b.placeholders==!b.invert?f:a,l=null!=b.style?
-J.replacePlaceholders(l,b.style,m):J.createCurrentEdgeStyle(),g=J.insertEdge(null,null,g||"",b.invert?f:a,b.invert?a:f,l);if(null!=b.labels)for(l=0;l<b.labels.length;l++){var n=b.labels[l],p=new mxCell(n.label||l,new mxGeometry(null!=n.x?n.x:0,null!=n.y?n.y:0,0,0),"resizable=0;html=1;");p.vertex=!0;p.connectable=!1;p.geometry.relative=!0;null!=n.placeholders&&(p.value=J.replacePlaceholders("target"==n.placeholders==!b.invert?f:a,p.value,m));if(null!=n.dx||null!=n.dy)p.geometry.offset=new mxPoint(null!=
-n.dx?n.dx:0,null!=n.dy?n.dy:0);g.insert(p)}ra.push(g);mxUtils.remove(b.invert?a:f,ua)}}});za(R,R,ya);if(null!=f[R.id])for(ja=0;ja<f[R.id].length;ja++)za(R,f[R.id][ja],ya)}if(null!=V)for(X=0;X<d.length;X++)for(R=d[X],ja=0;ja<V.length;ja++)J.setAttributeForCell(R,mxUtils.trim(V[ja]),null);if(0<e.length){var S=new mxParallelEdgeLayout(J);S.spacing=N;S.checkOverlap=!0;var Aa=function(){0<S.spacing&&S.execute(J.getDefaultParent());for(var a=0;a<e.length;a++){var c=J.getCellGeometry(e[a]);c.x=Math.round(J.snap(c.x));
-c.y=Math.round(J.snap(c.y));"auto"==C&&(c.width=Math.round(J.snap(c.width)));"auto"==M&&(c.height=Math.round(J.snap(c.height)))}};if("["==ga.charAt(0)){var ha=L;J.view.validate();this.executeLayoutList(JSON.parse(ga),function(){Aa();ha()});L=null}else if("circle"==ga){var Ba=new mxCircleLayout(J);Ba.disableEdgeStyle=!1;Ba.resetEdges=!1;var wa=Ba.isVertexIgnored;Ba.isVertexIgnored=function(a){return wa.apply(this,arguments)||0>mxUtils.indexOf(e,a)};this.executeLayout(function(){Ba.execute(J.getDefaultParent());
+if(null!=a[e].config)for(var g in a[e].config)f[g]=a[e].config[g];this.executeLayout(function(){f.execute(c.getDefaultParent(),0==d.length?null:d)},e==a.length-1,b)}};EditorUi.prototype.importCsv=function(a,b){try{var c=a.split("\n"),d=[],e=[],f={};if(0<c.length){var g={},m=null,p=null,x=null,G=null,z=null,E=null,H=null,K=null,F=null,I="",D="auto",M="auto",U=null,O=null,N=40,v=40,C=100,B=0,J=this.editor.graph;J.getGraphBounds();for(var L=function(){null!=b?b(ra):(J.setSelectionCells(ra),J.scrollCellToVisible(J.getSelectionCell()))},
+W=J.getFreeInsertPoint(),Q=W.x,Z=W.y,W=Z,na=null,ga="auto",F=null,da=[],la=null,V=null,ba=0;ba<c.length&&"#"==c[ba].charAt(0);){a=c[ba];for(ba++;ba<c.length&&"\\"==a.charAt(a.length-1)&&"#"==c[ba].charAt(0);)a=a.substring(0,a.length-1)+mxUtils.trim(c[ba].substring(1)),ba++;if("#"!=a.charAt(1)){var ma=a.indexOf(":");if(0<ma){var T=mxUtils.trim(a.substring(1,ma)),P=mxUtils.trim(a.substring(ma+1));"label"==T?na=J.sanitizeHtml(P):"labelname"==T&&0<P.length&&"-"!=P?z=P:"labels"==T&&0<P.length&&"-"!=P?
+E=JSON.parse(P):"style"==T?p=P:"parentstyle"==T?H=P:"stylename"==T&&0<P.length&&"-"!=P?G=P:"styles"==T&&0<P.length&&"-"!=P?x=JSON.parse(P):"vars"==T&&0<P.length&&"-"!=P?m=JSON.parse(P):"identity"==T&&0<P.length&&"-"!=P?K=P:"parent"==T&&0<P.length&&"-"!=P?F=P:"namespace"==T&&0<P.length&&"-"!=P?I=P:"width"==T?D=P:"height"==T?M=P:"left"==T&&0<P.length?U=P:"top"==T&&0<P.length?O=P:"ignore"==T?V=P.split(","):"connect"==T?da.push(JSON.parse(P)):"link"==T?la=P:"padding"==T?B=parseFloat(P):"edgespacing"==
+T?N=parseFloat(P):"nodespacing"==T?v=parseFloat(P):"levelspacing"==T?C=parseFloat(P):"layout"==T&&(ga=P)}}}if(null==c[ba])throw Error(mxResources.get("invalidOrMissingFile"));for(var ta=this.editor.csvToArray(c[ba]),T=ma=null,P=[],X=0;X<ta.length;X++)K==ta[X]&&(ma=X),F==ta[X]&&(T=X),P.push(mxUtils.trim(ta[X]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,""));null==na&&(na="%"+P[0]+"%");if(null!=da)for(var ca=0;ca<da.length;ca++)null==g[da[ca].to]&&(g[da[ca].to]={});K=[];for(X=ba+1;X<
+c.length;X++){var ia=this.editor.csvToArray(c[X]);if(null==ia){var pa=40<c[X].length?c[X].substring(0,40)+"...":c[X];throw Error(pa+" ("+X+"):\n"+mxResources.get("containsValidationErrors"));}0<ia.length&&K.push(ia)}J.model.beginUpdate();try{for(X=0;X<K.length;X++){var ia=K[X],R=null,ka=null!=ma?I+ia[ma]:null;null!=ka&&(R=J.model.getCell(ka));var c=null!=R,aa=new mxCell(na,new mxGeometry(Q,W,0,0),p||"whiteSpace=wrap;html=1;");aa.vertex=!0;aa.id=ka;for(var ja=0;ja<ia.length;ja++)J.setAttributeForCell(aa,
+P[ja],ia[ja]);if(null!=z&&null!=E){var ea=E[aa.getAttribute(z)];null!=ea&&J.labelChanged(aa,ea)}if(null!=G&&null!=x){var qa=x[aa.getAttribute(G)];null!=qa&&(aa.style=qa)}J.setAttributeForCell(aa,"placeholders","1");aa.style=J.replacePlaceholders(aa,aa.style,m);c&&(J.model.setGeometry(R,aa.geometry),J.model.setStyle(R,aa.style),0>mxUtils.indexOf(e,R)&&e.push(R));R=aa;if(!c)for(ca=0;ca<da.length;ca++)g[da[ca].to][R.getAttribute(da[ca].to)]=R;null!=la&&"link"!=la&&(J.setLinkForCell(R,R.getAttribute(la)),
+J.setAttributeForCell(R,la,null));J.fireEvent(new mxEventObject("cellsInserted","cells",[R]));var ya=this.editor.graph.getPreferredSizeForCell(R);R.vertex&&(null!=U&&null!=R.getAttribute(U)&&(R.geometry.x=Q+parseFloat(R.getAttribute(U))),null!=O&&null!=R.getAttribute(O)&&(R.geometry.y=Z+parseFloat(R.getAttribute(O))),"@"==D.charAt(0)&&null!=R.getAttribute(D.substring(1))?R.geometry.width=parseFloat(R.getAttribute(D.substring(1))):R.geometry.width="auto"==D?ya.width+B:parseFloat(D),"@"==M.charAt(0)&&
+null!=R.getAttribute(M.substring(1))?R.geometry.height=parseFloat(R.getAttribute(M.substring(1))):R.geometry.height="auto"==M?ya.height+B:parseFloat(M),W+=R.geometry.height+v);c?(null==f[ka]&&(f[ka]=[]),f[ka].push(R)):(F=null!=T?J.model.getCell(I+ia[T]):null,d.push(R),null!=F?(F.style=J.replacePlaceholders(F,H,m),J.addCell(R,F)):e.push(J.addCell(R)))}for(var ua=e.slice(),ra=e.slice(),ca=0;ca<da.length;ca++)for(var xa=da[ca],X=0;X<d.length;X++){var R=d[X],za=mxUtils.bind(this,function(a,c,b){var d=
+c.getAttribute(b.from);if(null!=d&&(J.setAttributeForCell(c,b.from,null),""!=d))for(var d=d.split(","),e=0;e<d.length;e++){var f=g[b.to][d[e]];if(null!=f){var k=b.label;null!=b.fromlabel&&(k=(c.getAttribute(b.fromlabel)||"")+(k||""));null!=b.sourcelabel&&(k=J.replacePlaceholders(c,b.sourcelabel,m)+(k||""));null!=b.tolabel&&(k=(k||"")+(f.getAttribute(b.tolabel)||""));null!=b.targetlabel&&(k=(k||"")+J.replacePlaceholders(f,b.targetlabel,m));var l="target"==b.placeholders==!b.invert?f:a,l=null!=b.style?
+J.replacePlaceholders(l,b.style,m):J.createCurrentEdgeStyle(),k=J.insertEdge(null,null,k||"",b.invert?f:a,b.invert?a:f,l);if(null!=b.labels)for(l=0;l<b.labels.length;l++){var n=b.labels[l],p=new mxCell(n.label||l,new mxGeometry(null!=n.x?n.x:0,null!=n.y?n.y:0,0,0),"resizable=0;html=1;");p.vertex=!0;p.connectable=!1;p.geometry.relative=!0;null!=n.placeholders&&(p.value=J.replacePlaceholders("target"==n.placeholders==!b.invert?f:a,p.value,m));if(null!=n.dx||null!=n.dy)p.geometry.offset=new mxPoint(null!=
+n.dx?n.dx:0,null!=n.dy?n.dy:0);k.insert(p)}ra.push(k);mxUtils.remove(b.invert?a:f,ua)}}});za(R,R,xa);if(null!=f[R.id])for(ja=0;ja<f[R.id].length;ja++)za(R,f[R.id][ja],xa)}if(null!=V)for(X=0;X<d.length;X++)for(R=d[X],ja=0;ja<V.length;ja++)J.setAttributeForCell(R,mxUtils.trim(V[ja]),null);if(0<e.length){var S=new mxParallelEdgeLayout(J);S.spacing=N;S.checkOverlap=!0;var Aa=function(){0<S.spacing&&S.execute(J.getDefaultParent());for(var a=0;a<e.length;a++){var c=J.getCellGeometry(e[a]);c.x=Math.round(J.snap(c.x));
+c.y=Math.round(J.snap(c.y));"auto"==D&&(c.width=Math.round(J.snap(c.width)));"auto"==M&&(c.height=Math.round(J.snap(c.height)))}};if("["==ga.charAt(0)){var ha=L;J.view.validate();this.executeLayoutList(JSON.parse(ga),function(){Aa();ha()});L=null}else if("circle"==ga){var Ba=new mxCircleLayout(J);Ba.disableEdgeStyle=!1;Ba.resetEdges=!1;var va=Ba.isVertexIgnored;Ba.isVertexIgnored=function(a){return va.apply(this,arguments)||0>mxUtils.indexOf(e,a)};this.executeLayout(function(){Ba.execute(J.getDefaultParent());
Aa()},!0,L);L=null}else if("horizontaltree"==ga||"verticaltree"==ga||"auto"==ga&&ra.length==2*e.length-1&&1==ua.length){J.view.validate();var Da=new mxCompactTreeLayout(J,"horizontaltree"==ga);Da.levelDistance=v;Da.edgeRouting=!1;Da.resetEdges=!1;this.executeLayout(function(){Da.execute(J.getDefaultParent(),0<ua.length?ua[0]:null)},!0,L);L=null}else if("horizontalflow"==ga||"verticalflow"==ga||"auto"==ga&&1==ua.length){J.view.validate();var Ca=new mxHierarchicalLayout(J,"horizontalflow"==ga?mxConstants.DIRECTION_WEST:
-mxConstants.DIRECTION_NORTH);Ca.intraCellSpacing=v;Ca.parallelEdgeSpacing=N;Ca.interRankCellSpacing=D;Ca.disableEdgeStyle=!1;this.executeLayout(function(){Ca.execute(J.getDefaultParent(),ra);J.moveCells(ra,Q,aa)},!0,L);L=null}else if("organic"==ga||"auto"==ga&&ra.length>e.length){J.view.validate();var xa=new mxFastOrganicLayout(J);xa.forceConstant=3*v;xa.disableEdgeStyle=!1;xa.resetEdges=!1;var Fa=xa.isVertexIgnored;xa.isVertexIgnored=function(a){return Fa.apply(this,arguments)||0>mxUtils.indexOf(e,
-a)};this.executeLayout(function(){xa.execute(J.getDefaultParent());Aa()},!0,L);L=null}}this.hideDialog()}finally{J.model.endUpdate()}null!=L&&L()}}catch(Z){this.handleError(Z)}};EditorUi.prototype.getSearch=function(a){var c="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=a&&0<window.location.search.length){var b="?",d;for(d in urlParams)0>mxUtils.indexOf(a,d)&&null!=urlParams[d]&&(c+=b+d+"="+urlParams[d],b="&")}else c=window.location.search;return c};EditorUi.prototype.getUrl=function(a){a=
-null!=a?a:window.location.pathname;var c=0<a.indexOf("?")?1:0;if("1"==urlParams.offline)a+=window.location.search;else{var b="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "),d;for(d in urlParams)0>mxUtils.indexOf(b,d)&&(a=0==c?a+"?":a+"&",null!=urlParams[d]&&(a+=d+"="+urlParams[d],c++))}return a};EditorUi.prototype.showLinkDialog=function(a,b,d,f,k){a=new LinkDialog(this,a,b,d,!0,f,k);this.showDialog(a.container,560,130,!0,!0);a.init()};EditorUi.prototype.getServiceCount=
+mxConstants.DIRECTION_NORTH);Ca.intraCellSpacing=v;Ca.parallelEdgeSpacing=N;Ca.interRankCellSpacing=C;Ca.disableEdgeStyle=!1;this.executeLayout(function(){Ca.execute(J.getDefaultParent(),ra);J.moveCells(ra,Q,Z)},!0,L);L=null}else if("organic"==ga||"auto"==ga&&ra.length>e.length){J.view.validate();var wa=new mxFastOrganicLayout(J);wa.forceConstant=3*v;wa.disableEdgeStyle=!1;wa.resetEdges=!1;var Fa=wa.isVertexIgnored;wa.isVertexIgnored=function(a){return Fa.apply(this,arguments)||0>mxUtils.indexOf(e,
+a)};this.executeLayout(function(){wa.execute(J.getDefaultParent());Aa()},!0,L);L=null}}this.hideDialog()}finally{J.model.endUpdate()}null!=L&&L()}}catch(Y){this.handleError(Y)}};EditorUi.prototype.getSearch=function(a){var c="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=a&&0<window.location.search.length){var b="?",d;for(d in urlParams)0>mxUtils.indexOf(a,d)&&null!=urlParams[d]&&(c+=b+d+"="+urlParams[d],b="&")}else c=window.location.search;return c};EditorUi.prototype.getUrl=function(a){a=
+null!=a?a:window.location.pathname;var c=0<a.indexOf("?")?1:0;if("1"==urlParams.offline)a+=window.location.search;else{var b="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "),d;for(d in urlParams)0>mxUtils.indexOf(b,d)&&(a=0==c?a+"?":a+"&",null!=urlParams[d]&&(a+=d+"="+urlParams[d],c++))}return a};EditorUi.prototype.showLinkDialog=function(a,b,d,f,g){a=new LinkDialog(this,a,b,d,!0,f,g);this.showDialog(a.container,560,130,!0,!0);a.init()};EditorUi.prototype.getServiceCount=
function(a){var c=1;null==this.drive&&"function"!==typeof window.DriveClient||c++;null==this.dropbox&&"function"!==typeof window.DropboxClient||c++;null==this.oneDrive&&"function"!==typeof window.OneDriveClient||c++;null!=this.gitHub&&c++;null!=this.gitLab&&c++;null!=this.notion&&c++;a&&isLocalStorage&&"1"==urlParams.browser&&c++;return c};EditorUi.prototype.updateUi=function(){this.updateButtonContainer();this.updateActionStates();var a=this.getCurrentFile(),b=null!=a||"1"==urlParams.embed&&this.editor.graph.isEnabled();
this.menus.get("viewPanels").setEnabled(b);this.menus.get("viewZoom").setEnabled(b);var d=("1"!=urlParams.embed||!this.editor.graph.isEnabled())&&(null==a||a.isRestricted());this.actions.get("makeCopy").setEnabled(!d);this.actions.get("print").setEnabled(!d);this.menus.get("exportAs").setEnabled(!d);this.menus.get("embed").setEnabled(!d);d="1"!=urlParams.embed||this.editor.graph.isEnabled();this.menus.get("extras").setEnabled(d);Editor.enableCustomLibraries&&(this.menus.get("openLibraryFrom").setEnabled(d),
this.menus.get("newLibrary").setEnabled(d));a="1"==urlParams.embed&&this.editor.graph.isEnabled()||null!=a&&a.isEditable();this.actions.get("image").setEnabled(b);this.actions.get("zoomIn").setEnabled(b);this.actions.get("zoomOut").setEnabled(b);this.actions.get("resetView").setEnabled(b);this.actions.get("undo").setEnabled(this.canUndo()&&a);this.actions.get("redo").setEnabled(this.canRedo()&&a);this.menus.get("edit").setEnabled(b);this.menus.get("view").setEnabled(b);this.menus.get("importFrom").setEnabled(a);
@@ -3650,105 +3653,105 @@ return null!=a&&a.isEditable()||"1"==urlParams.embed&&this.editor.graph.isEnable
f.length||a.isSelectionEmpty());this.actions.get("shadowVisible").setEnabled(d);this.actions.get("connectionArrows").setEnabled(d);this.actions.get("connectionPoints").setEnabled(d);this.actions.get("copyStyle").setEnabled(d&&!a.isSelectionEmpty());this.actions.get("pasteStyle").setEnabled(d&&0<f.length);this.actions.get("editGeometry").setEnabled(0<f.length&&a.getModel().isVertex(f[0]));this.actions.get("createShape").setEnabled(d);this.actions.get("createRevision").setEnabled(d);this.actions.get("moveToFolder").setEnabled(null!=
b);this.actions.get("makeCopy").setEnabled(null!=b&&!b.isRestricted());this.actions.get("editDiagram").setEnabled(d&&(null==b||!b.isRestricted()));this.actions.get("publishLink").setEnabled(null!=b&&!b.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!=
b&&b.isRenamable()||"1"==urlParams.embed);this.actions.get("close").setEnabled(null!=b);this.menus.get("publish").setEnabled(null!=b&&!b.isRestricted());b=this.actions.get("findReplace");b.setEnabled("hidden"!=this.diagramContainer.style.visibility);b.label=mxResources.get("find")+(a.isEnabled()?"/"+mxResources.get("replace"):"")+"...";a=a.view.getState(a.getSelectionCell());this.actions.get("editShape").setEnabled(d&&null!=a&&null!=a.shape&&null!=a.shape.stencil)};var p=EditorUi.prototype.destroy;
-EditorUi.prototype.destroy=function(){null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);p.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(a,b,d,f,k,m,p,t){var c=a.editor.graph;if("xml"==d)a.hideDialog(),a.saveData(b,"xml",mxUtils.getXml(a.editor.getGraphXml()),"text/xml");else if("svg"==d)a.hideDialog(),a.saveData(b,"svg",mxUtils.getXml(c.getSvg(f,
-k,m)),"image/svg+xml");else{var e=a.getFileData(!0,null,null,null,null,!0),g=c.getGraphBounds(),l=Math.floor(g.width*k/c.view.scale),n=Math.floor(g.height*k/c.view.scale);if(e.length<=MAX_REQUEST_SIZE&&l*n<MAX_AREA)if(a.hideDialog(),"png"!=d&&"jpg"!=d&&"jpeg"!=d||!a.isExportToCanvas()){var q={globalVars:c.getExportVariables()};t&&(q.grid={size:c.gridSize,steps:c.view.gridSteps,color:c.view.gridColor});a.saveRequest(b,d,function(a,b){return new mxXmlRequest(EXPORT_URL,"format="+d+"&base64="+(b||"0")+
-(null!=a?"&filename="+encodeURIComponent(a):"")+"&extras="+encodeURIComponent(JSON.stringify(q))+(0<p?"&dpi="+p:"")+"&bg="+(null!=f?f:"none")+"&w="+l+"&h="+n+"&border="+m+"&xml="+encodeURIComponent(e))})}else"png"==d?a.exportImage(k,null==f||"none"==f,!0,!1,!1,m,!0,!1,null,t,p):a.exportImage(k,!1,!0,!1,!1,m,!0,!1,"jpeg",t);else mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.getDiagramTextContent=function(){this.editor.graph.setEnabled(!1);var a=this.editor.graph,b="";if(null!=
+EditorUi.prototype.destroy=function(){null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);p.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(a,b,d,f,g,m,p,t){var c=a.editor.graph;if("xml"==d)a.hideDialog(),a.saveData(b,"xml",mxUtils.getXml(a.editor.getGraphXml()),"text/xml");else if("svg"==d)a.hideDialog(),a.saveData(b,"svg",mxUtils.getXml(c.getSvg(f,
+g,m)),"image/svg+xml");else{var e=a.getFileData(!0,null,null,null,null,!0),k=c.getGraphBounds(),l=Math.floor(k.width*g/c.view.scale),n=Math.floor(k.height*g/c.view.scale);if(e.length<=MAX_REQUEST_SIZE&&l*n<MAX_AREA)if(a.hideDialog(),"png"!=d&&"jpg"!=d&&"jpeg"!=d||!a.isExportToCanvas()){var q={globalVars:c.getExportVariables()};t&&(q.grid={size:c.gridSize,steps:c.view.gridSteps,color:c.view.gridColor});a.saveRequest(b,d,function(a,b){return new mxXmlRequest(EXPORT_URL,"format="+d+"&base64="+(b||"0")+
+(null!=a?"&filename="+encodeURIComponent(a):"")+"&extras="+encodeURIComponent(JSON.stringify(q))+(0<p?"&dpi="+p:"")+"&bg="+(null!=f?f:"none")+"&w="+l+"&h="+n+"&border="+m+"&xml="+encodeURIComponent(e))})}else"png"==d?a.exportImage(g,null==f||"none"==f,!0,!1,!1,m,!0,!1,null,t,p):a.exportImage(g,!1,!0,!1,!1,m,!0,!1,"jpeg",t);else mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.getDiagramTextContent=function(){this.editor.graph.setEnabled(!1);var a=this.editor.graph,b="";if(null!=
this.pages)for(var d=0;d<this.pages.length;d++){var f=a;this.currentPage!=this.pages[d]&&(f=this.createTemporaryGraph(a.getStylesheet()),this.updatePageRoot(this.pages[d]),f.model.setRoot(this.pages[d].root));b+=this.pages[d].getName()+" "+f.getIndexableText()+" "}else b=a.getIndexableText();this.editor.graph.setEnabled(!0);return b};EditorUi.prototype.showRemotelyStoredLibrary=function(a){var b={},c=document.createElement("div");c.style.whiteSpace="nowrap";var d=document.createElement("h3");mxUtils.write(d,
-mxUtils.htmlEntities(a));d.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";c.appendChild(d);var f=document.createElement("div");f.style.cssText="border:1px solid lightGray;overflow: auto;height:300px";f.innerHTML='<div style="text-align:center;padding:8px;"><img src="'+IMAGE_PATH+'/spin.gif"></div>';var k={};try{var m=mxSettings.getCustomLibraries();for(a=0;a<m.length;a++){var p=m[a];if("R"==p.substring(0,1)){var A=JSON.parse(decodeURIComponent(p.substring(1)));k[A[0]]=
-{id:A[0],title:A[1],downloadUrl:A[2]}}}}catch(x){}this.remoteInvoke("getCustomLibraries",null,null,function(a){f.innerHTML="";if(0==a.length)f.innerHTML='<div style="text-align:center;padding-top:20px;color:gray;">'+mxUtils.htmlEntities(mxResources.get("noLibraries"))+"</div>";else for(var c=0;c<a.length;c++){var d=a[c];k[d.id]&&(b[d.id]=d);var e=this.addCheckbox(f,d.title,k[d.id]);(function(a,c){mxEvent.addListener(c,"change",function(){this.checked?b[a.id]=a:delete b[a.id]})})(d,e)}},mxUtils.bind(this,
-function(a){f.innerHTML="";var b=document.createElement("div");b.style.padding="8px";b.style.textAlign="center";mxUtils.write(b,mxResources.get("error")+": ");mxUtils.write(b,null!=a&&null!=a.message?a.message:mxResources.get("unknownError"));f.appendChild(b)}));c.appendChild(f);c=new CustomDialog(this,c,mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"));var a=0,c;for(c in b)null==k[c]&&(a++,mxUtils.bind(this,function(b){this.remoteInvoke("getFileContent",[b.downloadUrl],
-null,mxUtils.bind(this,function(c){a--;0==a&&this.spinner.stop();try{this.loadLibrary(new RemoteLibrary(this,c,b))}catch(H){this.handleError(H,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(){a--;0==a&&this.spinner.stop();this.handleError(null,mxResources.get("errorLoadingFile"))}))})(b[c]));for(c in k)b[c]||this.closeLibrary(new RemoteLibrary(this,null,k[c]));0==a&&this.spinner.stop()}),null,null,"https://www.diagrams.net/doc/faq/custom-libraries-confluence-cloud");this.showDialog(c.container,
+mxUtils.htmlEntities(a));d.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";c.appendChild(d);var f=document.createElement("div");f.style.cssText="border:1px solid lightGray;overflow: auto;height:300px";f.innerHTML='<div style="text-align:center;padding:8px;"><img src="'+IMAGE_PATH+'/spin.gif"></div>';var g={};try{var m=mxSettings.getCustomLibraries();for(a=0;a<m.length;a++){var p=m[a];if("R"==p.substring(0,1)){var A=JSON.parse(decodeURIComponent(p.substring(1)));g[A[0]]=
+{id:A[0],title:A[1],downloadUrl:A[2]}}}}catch(x){}this.remoteInvoke("getCustomLibraries",null,null,function(a){f.innerHTML="";if(0==a.length)f.innerHTML='<div style="text-align:center;padding-top:20px;color:gray;">'+mxUtils.htmlEntities(mxResources.get("noLibraries"))+"</div>";else for(var c=0;c<a.length;c++){var d=a[c];g[d.id]&&(b[d.id]=d);var e=this.addCheckbox(f,d.title,g[d.id]);(function(a,c){mxEvent.addListener(c,"change",function(){this.checked?b[a.id]=a:delete b[a.id]})})(d,e)}},mxUtils.bind(this,
+function(a){f.innerHTML="";var b=document.createElement("div");b.style.padding="8px";b.style.textAlign="center";mxUtils.write(b,mxResources.get("error")+": ");mxUtils.write(b,null!=a&&null!=a.message?a.message:mxResources.get("unknownError"));f.appendChild(b)}));c.appendChild(f);c=new CustomDialog(this,c,mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"));var a=0,c;for(c in b)null==g[c]&&(a++,mxUtils.bind(this,function(b){this.remoteInvoke("getFileContent",[b.downloadUrl],
+null,mxUtils.bind(this,function(c){a--;0==a&&this.spinner.stop();try{this.loadLibrary(new RemoteLibrary(this,c,b))}catch(H){this.handleError(H,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(){a--;0==a&&this.spinner.stop();this.handleError(null,mxResources.get("errorLoadingFile"))}))})(b[c]));for(c in g)b[c]||this.closeLibrary(new RemoteLibrary(this,null,g[c]));0==a&&this.spinner.stop()}),null,null,"https://www.diagrams.net/doc/faq/custom-libraries-confluence-cloud");this.showDialog(c.container,
340,375,!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(a){this.remoteWin=a;for(var b=0;b<this.remoteInvokeQueue.length;b++)a.postMessage(this.remoteInvokeQueue[b],
-"*");this.remoteInvokeQueue=[]};EditorUi.prototype.handleRemoteInvokeResponse=function(a){var b=a.msgMarkers,c=this.remoteInvokeCallbacks[b.callbackId];if(null==c)throw Error("No callback for "+(null!=b?b.callbackId:"null"));a.error?c.error&&c.error(a.error.errResp):c.callback&&c.callback.apply(this,a.resp);this.remoteInvokeCallbacks[b.callbackId]=null};EditorUi.prototype.remoteInvoke=function(a,b,d,f,k){var c=!0,e=window.setTimeout(mxUtils.bind(this,function(){c=!1;k({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),
-this.timeout),g=mxUtils.bind(this,function(){window.clearTimeout(e);c&&f.apply(this,arguments)}),l=mxUtils.bind(this,function(){window.clearTimeout(e);c&&k.apply(this,arguments)});d=d||{};d.callbackId=this.remoteInvokeCallbacks.length;this.remoteInvokeCallbacks.push({callback:g,error:l});a=JSON.stringify({event:"remoteInvoke",funtionName:a,functionArgs:b,msgMarkers:d});null!=this.remoteWin?this.remoteWin.postMessage(a,"*"):this.remoteInvokeQueue.push(a)};EditorUi.prototype.handleRemoteInvoke=function(a,
-b){var c=mxUtils.bind(this,function(b,c){var d={event:"remoteInvokeResponse",msgMarkers:a.msgMarkers};null!=c?d.error={errResp:c}:null!=b&&(d.resp=b);this.remoteWin.postMessage(JSON.stringify(d),"*")});try{var d=a.funtionName,e=this.remoteInvokableFns[d];if(null!=e&&"function"===typeof this[d]){if(e.allowedDomains){for(var f=!1,k=0;k<e.allowedDomains.length;k++)if(b=="https://"+e.allowedDomains[k]){f=!0;break}if(!f){c(null,"Invalid Call: "+d+" is not allowed.");return}}var m=a.functionArgs;Array.isArray(m)||
+"*");this.remoteInvokeQueue=[]};EditorUi.prototype.handleRemoteInvokeResponse=function(a){var b=a.msgMarkers,c=this.remoteInvokeCallbacks[b.callbackId];if(null==c)throw Error("No callback for "+(null!=b?b.callbackId:"null"));a.error?c.error&&c.error(a.error.errResp):c.callback&&c.callback.apply(this,a.resp);this.remoteInvokeCallbacks[b.callbackId]=null};EditorUi.prototype.remoteInvoke=function(a,b,d,f,g){var c=!0,e=window.setTimeout(mxUtils.bind(this,function(){c=!1;g({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),
+this.timeout),k=mxUtils.bind(this,function(){window.clearTimeout(e);c&&f.apply(this,arguments)}),l=mxUtils.bind(this,function(){window.clearTimeout(e);c&&g.apply(this,arguments)});d=d||{};d.callbackId=this.remoteInvokeCallbacks.length;this.remoteInvokeCallbacks.push({callback:k,error:l});a=JSON.stringify({event:"remoteInvoke",funtionName:a,functionArgs:b,msgMarkers:d});null!=this.remoteWin?this.remoteWin.postMessage(a,"*"):this.remoteInvokeQueue.push(a)};EditorUi.prototype.handleRemoteInvoke=function(a,
+b){var c=mxUtils.bind(this,function(b,c){var d={event:"remoteInvokeResponse",msgMarkers:a.msgMarkers};null!=c?d.error={errResp:c}:null!=b&&(d.resp=b);this.remoteWin.postMessage(JSON.stringify(d),"*")});try{var d=a.funtionName,e=this.remoteInvokableFns[d];if(null!=e&&"function"===typeof this[d]){if(e.allowedDomains){for(var f=!1,g=0;g<e.allowedDomains.length;g++)if(b=="https://"+e.allowedDomains[g]){f=!0;break}if(!f){c(null,"Invalid Call: "+d+" is not allowed.");return}}var m=a.functionArgs;Array.isArray(m)||
(m=[]);if(e.isAsync)m.push(function(){c(Array.prototype.slice.apply(arguments))}),m.push(function(a){c(null,a||"Unkown Error")}),this[d].apply(this,m);else{var p=this[d].apply(this,m);c([p])}}else c(null,"Invalid Call: "+d+" is not found.")}catch(x){c(null,"Invalid Call: An error occurred, "+x.message)}};EditorUi.prototype.openDatabase=function(a,b){if(null==this.database){var c=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB;if(null!=c)try{var d=c.open("database",2);d.onupgradeneeded=
function(a){try{var c=d.result;1>a.oldVersion&&c.createObjectStore("objects",{keyPath:"key"});2>a.oldVersion&&(c.createObjectStore("files",{keyPath:"title"}),c.createObjectStore("filesInfo",{keyPath:"title"}),EditorUi.migrateStorageFiles=isLocalStorage)}catch(u){null!=b&&b(u)}};d.onsuccess=mxUtils.bind(this,function(b){var c=d.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(a){if(!a||"1"==urlParams.forceMigration){var b=document.createElement("iframe");b.style.display="none";b.setAttribute("src","https://www.draw.io?embed=1&proto=json&forceMigration="+urlParams.forceMigration);document.body.appendChild(b);var c=!0,d=!1,e,f=0,g=mxUtils.bind(this,function(){d=!0;this.setDatabaseItem(".drawioMigrated3",!0);b.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",
-funtionName:"setMigratedFlag"}),"*")}),k=mxUtils.bind(this,function(){f++;l()}),l=mxUtils.bind(this,function(){try{if(f>=e.length)g();else{var a=e[f];StorageFile.getFileContent(this,a,mxUtils.bind(this,function(c){null==c||".scratchpad"==a&&c==this.emptyLibraryXml?b.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFile",functionArgs:[a]}),"*"):k()}),k)}}catch(C){console.log(C)}}),m=mxUtils.bind(this,function(a){try{this.setDatabaseItem(null,[{title:a.title,
-size:a.data.length,lastModified:Date.now(),type:a.isLib?"L":"F"},{title:a.title,data:a.data}],k,k,["filesInfo","files"])}catch(C){console.log(C)}});a=mxUtils.bind(this,function(a){try{if(a.source==b.contentWindow){var f={};try{f=JSON.parse(a.data)}catch(M){}"init"==f.event?(b.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),"*"),b.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=f.event||d||
-(c?null!=f.resp&&0<f.resp.length&&null!=f.resp[0]?(e=f.resp[0],c=!1,l()):g():null!=f.resp&&0<f.resp.length&&null!=f.resp[0]?m(f.resp[0]):k())}}catch(M){console.log(M)}});window.addEventListener("message",a)}})));a(c);c.onversionchange=function(){c.close()}});d.onerror=b;d.onblocked=function(){}}catch(l){null!=b&&b(l)}else null!=b&&b()}else a(this.database)};EditorUi.prototype.setDatabaseItem=function(a,b,d,f,k){this.openDatabase(mxUtils.bind(this,function(c){try{k=k||"objects";Array.isArray(k)||(k=
-[k],a=[a],b=[b]);var e=c.transaction(k,"readwrite");e.oncomplete=d;e.onerror=f;for(c=0;c<k.length;c++)e.objectStore(k[c]).put(null!=a&&null!=a[c]?{key:a[c],data:b[c]}:b[c])}catch(t){null!=f&&f(t)}}),f)};EditorUi.prototype.removeDatabaseItem=function(a,b,d,f){this.openDatabase(mxUtils.bind(this,function(c){f=f||"objects";Array.isArray(f)||(f=[f],a=[a]);c=c.transaction(f,"readwrite");c.oncomplete=b;c.onerror=d;for(var e=0;e<f.length;e++)c.objectStore(f[e])["delete"](a[e])}),d)};EditorUi.prototype.getDatabaseItem=
+funtionName:"setMigratedFlag"}),"*")}),k=mxUtils.bind(this,function(){f++;l()}),l=mxUtils.bind(this,function(){try{if(f>=e.length)g();else{var a=e[f];StorageFile.getFileContent(this,a,mxUtils.bind(this,function(c){null==c||".scratchpad"==a&&c==this.emptyLibraryXml?b.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFile",functionArgs:[a]}),"*"):k()}),k)}}catch(D){console.log(D)}}),m=mxUtils.bind(this,function(a){try{this.setDatabaseItem(null,[{title:a.title,
+size:a.data.length,lastModified:Date.now(),type:a.isLib?"L":"F"},{title:a.title,data:a.data}],k,k,["filesInfo","files"])}catch(D){console.log(D)}});a=mxUtils.bind(this,function(a){try{if(a.source==b.contentWindow){var f={};try{f=JSON.parse(a.data)}catch(M){}"init"==f.event?(b.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),"*"),b.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=f.event||d||
+(c?null!=f.resp&&0<f.resp.length&&null!=f.resp[0]?(e=f.resp[0],c=!1,l()):g():null!=f.resp&&0<f.resp.length&&null!=f.resp[0]?m(f.resp[0]):k())}}catch(M){console.log(M)}});window.addEventListener("message",a)}})));a(c);c.onversionchange=function(){c.close()}});d.onerror=b;d.onblocked=function(){}}catch(l){null!=b&&b(l)}else null!=b&&b()}else a(this.database)};EditorUi.prototype.setDatabaseItem=function(a,b,d,f,g){this.openDatabase(mxUtils.bind(this,function(c){try{g=g||"objects";Array.isArray(g)||(g=
+[g],a=[a],b=[b]);var e=c.transaction(g,"readwrite");e.oncomplete=d;e.onerror=f;for(c=0;c<g.length;c++)e.objectStore(g[c]).put(null!=a&&null!=a[c]?{key:a[c],data:b[c]}:b[c])}catch(t){null!=f&&f(t)}}),f)};EditorUi.prototype.removeDatabaseItem=function(a,b,d,f){this.openDatabase(mxUtils.bind(this,function(c){f=f||"objects";Array.isArray(f)||(f=[f],a=[a]);c=c.transaction(f,"readwrite");c.oncomplete=b;c.onerror=d;for(var e=0;e<f.length;e++)c.objectStore(f[e])["delete"](a[e])}),d)};EditorUi.prototype.getDatabaseItem=
function(a,b,d,f){this.openDatabase(mxUtils.bind(this,function(c){try{f=f||"objects";var e=c.transaction([f],"readonly").objectStore(f).get(a);e.onsuccess=function(){b(e.result)};e.onerror=d}catch(u){null!=d&&d(u)}}),d)};EditorUi.prototype.getDatabaseItems=function(a,b,d){this.openDatabase(mxUtils.bind(this,function(c){try{d=d||"objects";var e=c.transaction([d],"readonly").objectStore(d).openCursor(IDBKeyRange.lowerBound(0)),f=[];e.onsuccess=function(b){null==b.target.result?a(f):(f.push(b.target.result.value),
b.target.result["continue"]())};e.onerror=b}catch(u){null!=b&&b(u)}}),b)};EditorUi.prototype.getDatabaseItemKeys=function(a,b,d){this.openDatabase(mxUtils.bind(this,function(c){try{d=d||"objects";var e=c.transaction([d],"readonly").objectStore(d).getAllKeys();e.onsuccess=function(){a(e.result)};e.onerror=b}catch(q){null!=b&&b(q)}}),b)};EditorUi.prototype.commentsSupported=function(){var a=this.getCurrentFile();return null!=a?a.commentsSupported():!1};EditorUi.prototype.commentsRefreshNeeded=function(){var a=
this.getCurrentFile();return null!=a?a.commentsRefreshNeeded():!0};EditorUi.prototype.commentsSaveNeeded=function(){var a=this.getCurrentFile();return null!=a?a.commentsSaveNeeded():!1};EditorUi.prototype.getComments=function(a,b){var c=this.getCurrentFile();null!=c?c.getComments(a,b):a([])};EditorUi.prototype.addComment=function(a,b,d){var c=this.getCurrentFile();null!=c?c.addComment(a,b,d):b(Date.now())};EditorUi.prototype.canReplyToReplies=function(){var a=this.getCurrentFile();return null!=a?
a.canReplyToReplies():!0};EditorUi.prototype.canComment=function(){var a=this.getCurrentFile();return null!=a?a.canComment():!0};EditorUi.prototype.newComment=function(a,b){var c=this.getCurrentFile();return null!=c?c.newComment(a,b):new DrawioComment(this,null,a,Date.now(),Date.now(),!1,b)};EditorUi.prototype.isRevisionHistorySupported=function(){var a=this.getCurrentFile();return null!=a&&a.isRevisionHistorySupported()};EditorUi.prototype.getRevisions=function(a,b){var c=this.getCurrentFile();null!=
-c&&c.getRevisions?c.getRevisions(a,b):b({message:mxResources.get("unknownError")})};EditorUi.prototype.isRevisionHistoryEnabled=function(){var a=this.getCurrentFile();return null!=a&&(a.constructor==DriveFile&&a.isEditable()||a.constructor==DropboxFile)};EditorUi.prototype.getServiceName=function(){return"draw.io"};EditorUi.prototype.addRemoteServiceSecurityCheck=function(a){a.setRequestHeader("Content-Language","da, mi, en, de-DE")};EditorUi.prototype.loadUrl=function(a,b,d,f,k,m,p,t){EditorUi.logEvent("SHOULD NOT BE CALLED: loadUrl");
-return this.editor.loadUrl(a,b,d,f,k,m,p,t)};EditorUi.prototype.loadFonts=function(a){EditorUi.logEvent("SHOULD NOT BE CALLED: loadFonts");return this.editor.loadFonts(a)};EditorUi.prototype.createSvgDataUri=function(a){EditorUi.logEvent("SHOULD NOT BE CALLED: createSvgDataUri");return Editor.createSvgDataUri(a)};EditorUi.prototype.embedCssFonts=function(a,b){EditorUi.logEvent("SHOULD NOT BE CALLED: embedCssFonts");return this.editor.embedCssFonts(a,b)};EditorUi.prototype.embedExtFonts=function(a){EditorUi.logEvent("SHOULD NOT BE CALLED: embedExtFonts");
-return this.editor.embedExtFonts(a)};EditorUi.prototype.exportToCanvas=function(a,b,d,f,k,m,p,t,A,x,G,z,E,H,K,F){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas");return this.editor.exportToCanvas(a,b,d,f,k,m,p,t,A,x,G,z,E,H,K,F)};EditorUi.prototype.createImageUrlConverter=function(){EditorUi.logEvent("SHOULD NOT BE CALLED: createImageUrlConverter");return this.editor.createImageUrlConverter()};EditorUi.prototype.convertImages=function(a,b,d,f){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImages");
+c&&c.getRevisions?c.getRevisions(a,b):b({message:mxResources.get("unknownError")})};EditorUi.prototype.isRevisionHistoryEnabled=function(){var a=this.getCurrentFile();return null!=a&&(a.constructor==DriveFile&&a.isEditable()||a.constructor==DropboxFile)};EditorUi.prototype.getServiceName=function(){return"draw.io"};EditorUi.prototype.addRemoteServiceSecurityCheck=function(a){a.setRequestHeader("Content-Language","da, mi, en, de-DE")};EditorUi.prototype.loadUrl=function(a,b,d,f,g,m,p,t){EditorUi.logEvent("SHOULD NOT BE CALLED: loadUrl");
+return this.editor.loadUrl(a,b,d,f,g,m,p,t)};EditorUi.prototype.loadFonts=function(a){EditorUi.logEvent("SHOULD NOT BE CALLED: loadFonts");return this.editor.loadFonts(a)};EditorUi.prototype.createSvgDataUri=function(a){EditorUi.logEvent("SHOULD NOT BE CALLED: createSvgDataUri");return Editor.createSvgDataUri(a)};EditorUi.prototype.embedCssFonts=function(a,b){EditorUi.logEvent("SHOULD NOT BE CALLED: embedCssFonts");return this.editor.embedCssFonts(a,b)};EditorUi.prototype.embedExtFonts=function(a){EditorUi.logEvent("SHOULD NOT BE CALLED: embedExtFonts");
+return this.editor.embedExtFonts(a)};EditorUi.prototype.exportToCanvas=function(a,b,d,f,g,m,p,t,A,x,G,z,E,H,K,F){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas");return this.editor.exportToCanvas(a,b,d,f,g,m,p,t,A,x,G,z,E,H,K,F)};EditorUi.prototype.createImageUrlConverter=function(){EditorUi.logEvent("SHOULD NOT BE CALLED: createImageUrlConverter");return this.editor.createImageUrlConverter()};EditorUi.prototype.convertImages=function(a,b,d,f){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImages");
return this.editor.convertImages(a,b,d,f)};EditorUi.prototype.convertImageToDataUri=function(a,b){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImageToDataUri");return this.editor.convertImageToDataUri(a,b)};EditorUi.prototype.base64Encode=function(a){EditorUi.logEvent("SHOULD NOT BE CALLED: base64Encode");return Editor.base64Encode(a)};EditorUi.prototype.updateCRC=function(a,b,d,f){EditorUi.logEvent("SHOULD NOT BE CALLED: updateCRC");return Editor.updateCRC(a,b,d,f)};EditorUi.prototype.crc32=function(a){EditorUi.logEvent("SHOULD NOT BE CALLED: crc32");
-return Editor.crc32(a)};EditorUi.prototype.writeGraphModelToPng=function(a,b,d,f,k){EditorUi.logEvent("SHOULD NOT BE CALLED: writeGraphModelToPng");return Editor.writeGraphModelToPng(a,b,d,f,k)};EditorUi.prototype.getLocalStorageFileNames=function(){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;for(var a=[],b=0;b<localStorage.length;b++){var d=localStorage.key(b),f=localStorage.getItem(d);if(0<d.length&&(".scratchpad"==d||"."!=d.charAt(0))&&0<f.length){var k=
-"<mxfile "===f.substring(0,8)||"<?xml"===f.substring(0,5)||"\x3c!--[if IE]>"===f.substring(0,12),f="<mxlibrary>"===f.substring(0,11);(k||f)&&a.push(d)}}return a};EditorUi.prototype.getLocalStorageFile=function(a){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;var b=localStorage.getItem(a);return{title:a,data:b,isLib:"<mxlibrary>"===b.substring(0,11)}};EditorUi.prototype.setMigratedFlag=function(){localStorage.setItem(".localStorageMigrated","1")}})();
-var CommentsWindow=function(a,b,d,k,f,m){function p(){for(var a=z.getElementsByTagName("div"),b=0,c=0;c<a.length;c++)"none"!=a[c].style.display&&a[c].parentNode==z&&b++;E.style.display=0==b?"block":"none"}function c(a,b,c,d){function e(){b.removeChild(k);b.removeChild(l);g.style.display="block";f.style.display="block"}A={div:b,comment:a,saveCallback:c,deleteOnCancel:d};var f=b.querySelector(".geCommentTxt"),g=b.querySelector(".geCommentActionsList"),k=document.createElement("textarea");k.className=
+return Editor.crc32(a)};EditorUi.prototype.writeGraphModelToPng=function(a,b,d,f,g){EditorUi.logEvent("SHOULD NOT BE CALLED: writeGraphModelToPng");return Editor.writeGraphModelToPng(a,b,d,f,g)};EditorUi.prototype.getLocalStorageFileNames=function(){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;for(var a=[],b=0;b<localStorage.length;b++){var d=localStorage.key(b),f=localStorage.getItem(d);if(0<d.length&&(".scratchpad"==d||"."!=d.charAt(0))&&0<f.length){var g=
+"<mxfile "===f.substring(0,8)||"<?xml"===f.substring(0,5)||"\x3c!--[if IE]>"===f.substring(0,12),f="<mxlibrary>"===f.substring(0,11);(g||f)&&a.push(d)}}return a};EditorUi.prototype.getLocalStorageFile=function(a){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;var b=localStorage.getItem(a);return{title:a,data:b,isLib:"<mxlibrary>"===b.substring(0,11)}};EditorUi.prototype.setMigratedFlag=function(){localStorage.setItem(".localStorageMigrated","1")}})();
+var CommentsWindow=function(a,b,d,g,f,m){function p(){for(var a=z.getElementsByTagName("div"),b=0,c=0;c<a.length;c++)"none"!=a[c].style.display&&a[c].parentNode==z&&b++;E.style.display=0==b?"block":"none"}function c(a,b,c,d){function e(){b.removeChild(k);b.removeChild(l);g.style.display="block";f.style.display="block"}A={div:b,comment:a,saveCallback:c,deleteOnCancel:d};var f=b.querySelector(".geCommentTxt"),g=b.querySelector(".geCommentActionsList"),k=document.createElement("textarea");k.className=
"geCommentEditTxtArea";k.style.minHeight=f.offsetHeight+"px";k.value=a.content;b.insertBefore(k,f);var l=document.createElement("div");l.className="geCommentEditBtns";var m=mxUtils.button(mxResources.get("cancel"),function(){d?(b.parentNode.removeChild(b),p()):e();A=null});m.className="geCommentEditBtn";l.appendChild(m);var n=mxUtils.button(mxResources.get("save"),function(){f.innerHTML="";a.content=k.value;mxUtils.write(f,a.content);e();c(a);A=null});mxEvent.addListener(k,"keydown",mxUtils.bind(this,
function(a){mxEvent.isConsumed(a)||((mxEvent.isControlDown(a)||mxClient.IS_MAC&&mxEvent.isMetaDown(a))&&13==a.keyCode?(n.click(),mxEvent.consume(a)):27==a.keyCode&&(m.click(),mxEvent.consume(a)))}));n.focus();n.className="geCommentEditBtn gePrimaryBtn";l.appendChild(n);b.insertBefore(l,f);g.style.display="none";f.style.display="none";k.focus()}function e(b,c){c.innerHTML="";var d=new Date(b.modifiedDate),e=a.timeSince(d);null==e&&(e=mxResources.get("lessThanAMinute"));mxUtils.write(c,mxResources.get("timeAgo",
-[e],"{1} ago"));c.setAttribute("title",d.toLocaleDateString()+" "+d.toLocaleTimeString())}function g(a){var b=document.createElement("img");b.className="geCommentBusyImg";b.src=IMAGE_PATH+"/spin.gif";a.appendChild(b);a.busyImg=b}function n(a){a.style.border="1px solid red";a.removeChild(a.busyImg)}function l(a){a.style.border="";a.removeChild(a.busyImg)}function q(b,d,f,k,m){function v(a,c,d){var e=document.createElement("li");e.className="geCommentAction";var f=document.createElement("a");f.className=
-"geCommentActionLnk";mxUtils.write(f,a);e.appendChild(f);mxEvent.addListener(f,"click",function(a){c(a,b);a.preventDefault();mxEvent.consume(a)});K.appendChild(e);d&&(e.style.display="none")}function N(){function a(b){c.push(d);if(null!=b.replies)for(var e=0;e<b.replies.length;e++)d=d.nextSibling,a(b.replies[e])}var c=[],d=x;a(b);return{pdiv:d,replies:c}}function C(d,e,f,m,p){function v(){g(C);b.addReply(z,function(a){z.id=a;b.replies.push(z);l(C);f&&f()},function(b){t();n(C);a.handleError(b,null,
-null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},m,p)}function t(){c(z,C,function(a){v()},!0)}var u=N().pdiv,z=a.newComment(d,a.getCurrentUser());z.pCommentId=b.id;null==b.replies&&(b.replies=[]);var C=q(z,b.replies,u,k+1);e?t():v()}if(m||!b.isResolved){E.style.display="none";var x=document.createElement("div");x.className="geCommentContainer";x.setAttribute("data-commentId",b.id);x.style.marginLeft=20*k+5+"px";b.isResolved&&!Editor.isDarkMode()&&(x.style.backgroundColor="ghostWhite");
-var D=document.createElement("div");D.className="geCommentHeader";var O=document.createElement("img");O.className="geCommentUserImg";O.src=b.user.pictureUrl||Editor.userImage;D.appendChild(O);O=document.createElement("div");O.className="geCommentHeaderTxt";D.appendChild(O);var H=document.createElement("div");H.className="geCommentUsername";mxUtils.write(H,b.user.displayName||"");O.appendChild(H);H=document.createElement("div");H.className="geCommentDate";H.setAttribute("data-commentId",b.id);e(b,
-H);O.appendChild(H);x.appendChild(D);D=document.createElement("div");D.className="geCommentTxt";mxUtils.write(D,b.content||"");x.appendChild(D);b.isLocked&&(x.style.opacity="0.5");D=document.createElement("div");D.className="geCommentActions";var K=document.createElement("ul");K.className="geCommentActionsList";D.appendChild(K);u||b.isLocked||0!=k&&!t||v(mxResources.get("reply"),function(){C("",!0)},b.isResolved);O=a.getCurrentUser();null==O||O.id!=b.user.id||u||b.isLocked||(v(mxResources.get("edit"),
-function(){function d(){c(b,x,function(){g(x);b.editComment(b.content,function(){l(x)},function(b){n(x);d();a.handleError(b,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}d()},b.isResolved),v(mxResources.get("delete"),function(){a.confirm(mxResources.get("areYouSure"),function(){g(x);b.deleteComment(function(a){if(!0===a){a=x.querySelector(".geCommentTxt");a.innerHTML="";mxUtils.write(a,mxResources.get("msgDeleted"));var c=x.querySelectorAll(".geCommentAction");for(a=
-0;a<c.length;a++)c[a].parentNode.removeChild(c[a]);l(x);x.style.opacity="0.5"}else{c=N(b).replies;for(a=0;a<c.length;a++)z.removeChild(c[a]);for(a=0;a<d.length;a++)if(d[a]==b){d.splice(a,1);break}E.style.display=0==z.getElementsByTagName("div").length?"block":"none"}},function(b){n(x);a.handleError(b,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},b.isResolved));u||b.isLocked||0!=k||v(b.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(a){function c(){var c=
-a.target;c.innerHTML="";b.isResolved=!b.isResolved;mxUtils.write(c,b.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var d=b.isResolved?"none":"",e=N(b).replies,f=Editor.isDarkMode()?"transparent":b.isResolved?"ghostWhite":"white",g=0;g<e.length;g++){e[g].style.backgroundColor=f;for(var k=e[g].querySelectorAll(".geCommentAction"),l=0;l<k.length;l++)k[l]!=c.parentNode&&(k[l].style.display=d);F||(e[g].style.display="none")}p()}b.isResolved?C(mxResources.get("reOpened")+": ",!0,
-c,!1,!0):C(mxResources.get("markedAsResolved"),!1,c,!0)});x.appendChild(D);null!=f?z.insertBefore(x,f.nextSibling):z.appendChild(x);for(f=0;null!=b.replies&&f<b.replies.length;f++)D=b.replies[f],D.isResolved=b.isResolved,q(D,b.replies,null,k+1,m);null!=A&&(A.comment.id==b.id?(m=b.content,b.content=A.comment.content,c(b,x,A.saveCallback,A.deleteOnCancel),b.content=m):null==A.comment.id&&A.comment.pCommentId==b.id&&(z.appendChild(A.div),c(A.comment,A.div,A.saveCallback,A.deleteOnCancel)));return x}}
+[e],"{1} ago"));c.setAttribute("title",d.toLocaleDateString()+" "+d.toLocaleTimeString())}function k(a){var b=document.createElement("img");b.className="geCommentBusyImg";b.src=IMAGE_PATH+"/spin.gif";a.appendChild(b);a.busyImg=b}function n(a){a.style.border="1px solid red";a.removeChild(a.busyImg)}function l(a){a.style.border="";a.removeChild(a.busyImg)}function q(b,d,f,g,m){function v(a,c,d){var e=document.createElement("li");e.className="geCommentAction";var f=document.createElement("a");f.className=
+"geCommentActionLnk";mxUtils.write(f,a);e.appendChild(f);mxEvent.addListener(f,"click",function(a){c(a,b);a.preventDefault();mxEvent.consume(a)});K.appendChild(e);d&&(e.style.display="none")}function N(){function a(b){c.push(d);if(null!=b.replies)for(var e=0;e<b.replies.length;e++)d=d.nextSibling,a(b.replies[e])}var c=[],d=x;a(b);return{pdiv:d,replies:c}}function D(d,e,f,m,p){function v(){k(D);b.addReply(z,function(a){z.id=a;b.replies.push(z);l(D);f&&f()},function(b){t();n(D);a.handleError(b,null,
+null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},m,p)}function t(){c(z,D,function(a){v()},!0)}var u=N().pdiv,z=a.newComment(d,a.getCurrentUser());z.pCommentId=b.id;null==b.replies&&(b.replies=[]);var D=q(z,b.replies,u,g+1);e?t():v()}if(m||!b.isResolved){E.style.display="none";var x=document.createElement("div");x.className="geCommentContainer";x.setAttribute("data-commentId",b.id);x.style.marginLeft=20*g+5+"px";b.isResolved&&!Editor.isDarkMode()&&(x.style.backgroundColor="ghostWhite");
+var C=document.createElement("div");C.className="geCommentHeader";var O=document.createElement("img");O.className="geCommentUserImg";O.src=b.user.pictureUrl||Editor.userImage;C.appendChild(O);O=document.createElement("div");O.className="geCommentHeaderTxt";C.appendChild(O);var H=document.createElement("div");H.className="geCommentUsername";mxUtils.write(H,b.user.displayName||"");O.appendChild(H);H=document.createElement("div");H.className="geCommentDate";H.setAttribute("data-commentId",b.id);e(b,
+H);O.appendChild(H);x.appendChild(C);C=document.createElement("div");C.className="geCommentTxt";mxUtils.write(C,b.content||"");x.appendChild(C);b.isLocked&&(x.style.opacity="0.5");C=document.createElement("div");C.className="geCommentActions";var K=document.createElement("ul");K.className="geCommentActionsList";C.appendChild(K);u||b.isLocked||0!=g&&!t||v(mxResources.get("reply"),function(){D("",!0)},b.isResolved);O=a.getCurrentUser();null==O||O.id!=b.user.id||u||b.isLocked||(v(mxResources.get("edit"),
+function(){function d(){c(b,x,function(){k(x);b.editComment(b.content,function(){l(x)},function(b){n(x);d();a.handleError(b,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}d()},b.isResolved),v(mxResources.get("delete"),function(){a.confirm(mxResources.get("areYouSure"),function(){k(x);b.deleteComment(function(a){if(!0===a){a=x.querySelector(".geCommentTxt");a.innerHTML="";mxUtils.write(a,mxResources.get("msgDeleted"));var c=x.querySelectorAll(".geCommentAction");for(a=
+0;a<c.length;a++)c[a].parentNode.removeChild(c[a]);l(x);x.style.opacity="0.5"}else{c=N(b).replies;for(a=0;a<c.length;a++)z.removeChild(c[a]);for(a=0;a<d.length;a++)if(d[a]==b){d.splice(a,1);break}E.style.display=0==z.getElementsByTagName("div").length?"block":"none"}},function(b){n(x);a.handleError(b,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},b.isResolved));u||b.isLocked||0!=g||v(b.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(a){function c(){var c=
+a.target;c.innerHTML="";b.isResolved=!b.isResolved;mxUtils.write(c,b.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var d=b.isResolved?"none":"",e=N(b).replies,f=Editor.isDarkMode()?"transparent":b.isResolved?"ghostWhite":"white",g=0;g<e.length;g++){e[g].style.backgroundColor=f;for(var k=e[g].querySelectorAll(".geCommentAction"),l=0;l<k.length;l++)k[l]!=c.parentNode&&(k[l].style.display=d);F||(e[g].style.display="none")}p()}b.isResolved?D(mxResources.get("reOpened")+": ",!0,
+c,!1,!0):D(mxResources.get("markedAsResolved"),!1,c,!0)});x.appendChild(C);null!=f?z.insertBefore(x,f.nextSibling):z.appendChild(x);for(f=0;null!=b.replies&&f<b.replies.length;f++)C=b.replies[f],C.isResolved=b.isResolved,q(C,b.replies,null,g+1,m);null!=A&&(A.comment.id==b.id?(m=b.content,b.content=A.comment.content,c(b,x,A.saveCallback,A.deleteOnCancel),b.content=m):null==A.comment.id&&A.comment.pCommentId==b.id&&(z.appendChild(A.div),c(A.comment,A.div,A.saveCallback,A.deleteOnCancel)));return x}}
var u=!a.canComment(),t=a.canReplyToReplies(),A=null,x=document.createElement("div");x.className="geCommentsWin";x.style.background=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";var G=EditorUi.compactUi?"26px":"30px",z=document.createElement("div");z.className="geCommentsList";z.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";z.style.bottom=parseInt(G)+7+"px";x.appendChild(z);var E=document.createElement("span");E.style.cssText="display:none;padding-top:10px;text-align:center;";
mxUtils.write(E,mxResources.get("noCommentsFound"));var H=document.createElement("div");H.className="geToolbarContainer geCommentsToolbar";H.style.height=G;H.style.padding=EditorUi.compactUi?"4px 0px 3px 0px":"1px";H.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";G=document.createElement("a");G.className="geButton";if(!u){var K=G.cloneNode();K.innerHTML='<div class="geSprite geSprite-plus" style="display:inline-block;"></div>';K.setAttribute("title",mxResources.get("create")+
-"...");mxEvent.addListener(K,"click",function(b){function d(){c(e,f,function(b){g(f);a.addComment(b,function(a){b.id=a;I.push(b);l(f)},function(b){n(f);d();a.handleError(b,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},!0)}var e=a.newComment("",a.getCurrentUser()),f=q(e,I,null,0);d();b.preventDefault();mxEvent.consume(b)});H.appendChild(K)}K=G.cloneNode();K.innerHTML='<img src="'+IMAGE_PATH+'/check.png" style="width: 16px; padding: 2px;">';K.setAttribute("title",mxResources.get("showResolved"));
-var F=!1;Editor.isDarkMode()&&(K.style.filter="invert(100%)");mxEvent.addListener(K,"click",function(a){this.className=(F=!F)?"geButton geCheckedBtn":"geButton";C();a.preventDefault();mxEvent.consume(a)});H.appendChild(K);a.commentsRefreshNeeded()&&(K=G.cloneNode(),K.innerHTML='<img src="'+IMAGE_PATH+'/update16.png" style="width: 16px; padding: 2px;">',K.setAttribute("title",mxResources.get("refresh")),Editor.isDarkMode()&&(K.style.filter="invert(100%)"),mxEvent.addListener(K,"click",function(a){C();
-a.preventDefault();mxEvent.consume(a)}),H.appendChild(K));a.commentsSaveNeeded()&&(G=G.cloneNode(),G.innerHTML='<img src="'+IMAGE_PATH+'/save.png" style="width: 20px; padding: 2px;">',G.setAttribute("title",mxResources.get("save")),Editor.isDarkMode()&&(G.style.filter="invert(100%)"),mxEvent.addListener(G,"click",function(a){m();a.preventDefault();mxEvent.consume(a)}),H.appendChild(G));x.appendChild(H);var I=[],C=mxUtils.bind(this,function(){this.hasError=!1;if(null!=A)try{A.div=A.div.cloneNode(!0);
+"...");mxEvent.addListener(K,"click",function(b){function d(){c(e,f,function(b){k(f);a.addComment(b,function(a){b.id=a;I.push(b);l(f)},function(b){n(f);d();a.handleError(b,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},!0)}var e=a.newComment("",a.getCurrentUser()),f=q(e,I,null,0);d();b.preventDefault();mxEvent.consume(b)});H.appendChild(K)}K=G.cloneNode();K.innerHTML='<img src="'+IMAGE_PATH+'/check.png" style="width: 16px; padding: 2px;">';K.setAttribute("title",mxResources.get("showResolved"));
+var F=!1;Editor.isDarkMode()&&(K.style.filter="invert(100%)");mxEvent.addListener(K,"click",function(a){this.className=(F=!F)?"geButton geCheckedBtn":"geButton";D();a.preventDefault();mxEvent.consume(a)});H.appendChild(K);a.commentsRefreshNeeded()&&(K=G.cloneNode(),K.innerHTML='<img src="'+IMAGE_PATH+'/update16.png" style="width: 16px; padding: 2px;">',K.setAttribute("title",mxResources.get("refresh")),Editor.isDarkMode()&&(K.style.filter="invert(100%)"),mxEvent.addListener(K,"click",function(a){D();
+a.preventDefault();mxEvent.consume(a)}),H.appendChild(K));a.commentsSaveNeeded()&&(G=G.cloneNode(),G.innerHTML='<img src="'+IMAGE_PATH+'/save.png" style="width: 20px; padding: 2px;">',G.setAttribute("title",mxResources.get("save")),Editor.isDarkMode()&&(G.style.filter="invert(100%)"),mxEvent.addListener(G,"click",function(a){m();a.preventDefault();mxEvent.consume(a)}),H.appendChild(G));x.appendChild(H);var I=[],D=mxUtils.bind(this,function(){this.hasError=!1;if(null!=A)try{A.div=A.div.cloneNode(!0);
var b=A.div.querySelector(".geCommentEditTxtArea"),d=A.div.querySelector(".geCommentEditBtns");A.comment.content=b.value;b.parentNode.removeChild(b);d.parentNode.removeChild(d)}catch(N){a.handleError(N)}z.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+IMAGE_PATH+'/spin.gif" valign="middle"> '+mxUtils.htmlEntities(mxResources.get("loading"))+"...</div>";t=a.canReplyToReplies();a.commentsSupported()?a.getComments(function(a){function b(a){if(null!=a){a.sort(function(a,b){return new Date(a.modifiedDate)-
new Date(b.modifiedDate)});for(var c=0;c<a.length;c++)b(a[c].replies)}}a.sort(function(a,b){return new Date(a.modifiedDate)-new Date(b.modifiedDate)});z.innerHTML="";z.appendChild(E);E.style.display="block";I=a;for(a=0;a<I.length;a++)b(I[a].replies),q(I[a],I,null,0,F);null!=A&&null==A.comment.id&&null==A.comment.pCommentId&&(z.appendChild(A.div),c(A.comment,A.div,A.saveCallback,A.deleteOnCancel))},mxUtils.bind(this,function(a){z.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(a&&a.message?
-": "+a.message:""));this.hasError=!0})):z.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});C();this.refreshComments=C;H=mxUtils.bind(this,function(){function a(b){var d=c[b.id];if(null!=d)for(e(b,d),d=0;null!=b.replies&&d<b.replies.length;d++)a(b.replies[d])}if(this.window.isVisible()){for(var b=z.querySelectorAll(".geCommentDate"),c={},d=0;d<b.length;d++){var f=b[d];c[f.getAttribute("data-commentId")]=f}for(d=0;d<I.length;d++)a(I[d])}});setInterval(H,6E4);this.refreshCommentsTime=H;this.window=
-new mxWindow(mxResources.get("comments"),x,b,d,k,f,!0,!0);this.window.minimumSize=new mxRectangle(0,0,300,200);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.window.fit()}));this.window.setLocation=function(a,b){var c=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;a=Math.max(0,Math.min(a,(window.innerWidth||
+": "+a.message:""));this.hasError=!0})):z.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});D();this.refreshComments=D;H=mxUtils.bind(this,function(){function a(b){var d=c[b.id];if(null!=d)for(e(b,d),d=0;null!=b.replies&&d<b.replies.length;d++)a(b.replies[d])}if(this.window.isVisible()){for(var b=z.querySelectorAll(".geCommentDate"),c={},d=0;d<b.length;d++){var f=b[d];c[f.getAttribute("data-commentId")]=f}for(d=0;d<I.length;d++)a(I[d])}});setInterval(H,6E4);this.refreshCommentsTime=H;this.window=
+new mxWindow(mxResources.get("comments"),x,b,d,g,f,!0,!0);this.window.minimumSize=new mxRectangle(0,0,300,200);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.window.fit()}));this.window.setLocation=function(a,b){var c=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;a=Math.max(0,Math.min(a,(window.innerWidth||
document.body.clientWidth||document.documentElement.clientWidth)-this.table.clientWidth));b=Math.max(0,Math.min(b,c-this.table.clientHeight-48));this.getX()==a&&this.getY()==b||mxWindow.prototype.setLocation.apply(this,arguments)};var M=mxUtils.bind(this,function(){var a=this.window.getX(),b=this.window.getY();this.window.setLocation(a,b)});mxEvent.addListener(window,"resize",M);this.destroy=function(){mxEvent.removeListener(window,"resize",M);this.window.destroy()}},ConfirmDialog=function(a,b,d,
-k,f,m,p,c,e,g,n){var l=document.createElement("div");l.style.textAlign="center";n=null!=n?n:44;var q=document.createElement("div");q.style.padding="6px";q.style.overflow="auto";q.style.maxHeight=n+"px";q.style.lineHeight="1.2em";mxUtils.write(q,b);l.appendChild(q);null!=g&&(q=document.createElement("div"),q.style.padding="6px 0 6px 0",b=document.createElement("img"),b.setAttribute("src",g),q.appendChild(b),l.appendChild(q));g=document.createElement("div");g.style.textAlign="center";g.style.whiteSpace=
-"nowrap";var u=document.createElement("input");u.setAttribute("type","checkbox");m=mxUtils.button(m||mxResources.get("cancel"),function(){a.hideDialog();null!=k&&k(u.checked)});m.className="geBtn";null!=c&&(m.innerHTML=c+"<br>"+m.innerHTML,m.style.paddingBottom="8px",m.style.paddingTop="8px",m.style.height="auto",m.style.width="40%");a.editor.cancelFirst&&g.appendChild(m);var t=mxUtils.button(f||mxResources.get("ok"),function(){a.hideDialog();null!=d&&d(u.checked)});g.appendChild(t);null!=p?(t.innerHTML=
-p+"<br>"+t.innerHTML+"<br>",t.style.paddingBottom="8px",t.style.paddingTop="8px",t.style.height="auto",t.className="geBtn",t.style.width="40%"):t.className="geBtn gePrimaryBtn";a.editor.cancelFirst||g.appendChild(m);l.appendChild(g);e?(g.style.marginTop="10px",q=document.createElement("p"),q.style.marginTop="20px",q.style.marginBottom="0px",q.appendChild(u),f=document.createElement("span"),mxUtils.write(f," "+mxResources.get("rememberThisSetting")),q.appendChild(f),l.appendChild(q),mxEvent.addListener(f,
-"click",function(a){u.checked=!u.checked;mxEvent.consume(a)})):g.style.marginTop="12px";this.init=function(){t.focus()};this.container=l};function DiagramPage(a,b){this.node=a;null!=b?this.node.setAttribute("id",b):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")};
+g,f,m,p,c,e,k,n){var l=document.createElement("div");l.style.textAlign="center";n=null!=n?n:44;var q=document.createElement("div");q.style.padding="6px";q.style.overflow="auto";q.style.maxHeight=n+"px";q.style.lineHeight="1.2em";mxUtils.write(q,b);l.appendChild(q);null!=k&&(q=document.createElement("div"),q.style.padding="6px 0 6px 0",b=document.createElement("img"),b.setAttribute("src",k),q.appendChild(b),l.appendChild(q));k=document.createElement("div");k.style.textAlign="center";k.style.whiteSpace=
+"nowrap";var u=document.createElement("input");u.setAttribute("type","checkbox");m=mxUtils.button(m||mxResources.get("cancel"),function(){a.hideDialog();null!=g&&g(u.checked)});m.className="geBtn";null!=c&&(m.innerHTML=c+"<br>"+m.innerHTML,m.style.paddingBottom="8px",m.style.paddingTop="8px",m.style.height="auto",m.style.width="40%");a.editor.cancelFirst&&k.appendChild(m);var t=mxUtils.button(f||mxResources.get("ok"),function(){a.hideDialog();null!=d&&d(u.checked)});k.appendChild(t);null!=p?(t.innerHTML=
+p+"<br>"+t.innerHTML+"<br>",t.style.paddingBottom="8px",t.style.paddingTop="8px",t.style.height="auto",t.className="geBtn",t.style.width="40%"):t.className="geBtn gePrimaryBtn";a.editor.cancelFirst||k.appendChild(m);l.appendChild(k);e?(k.style.marginTop="10px",q=document.createElement("p"),q.style.marginTop="20px",q.style.marginBottom="0px",q.appendChild(u),f=document.createElement("span"),mxUtils.write(f," "+mxResources.get("rememberThisSetting")),q.appendChild(f),l.appendChild(q),mxEvent.addListener(f,
+"click",function(a){u.checked=!u.checked;mxEvent.consume(a)})):k.style.marginTop="12px";this.init=function(){t.focus()};this.container=l};function DiagramPage(a,b){this.node=a;null!=b?this.node.setAttribute("id",b):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(a){null==a?this.node.removeAttribute("name"):this.node.setAttribute("name",a)};function RenamePage(a,b,d){this.ui=a;this.page=b;this.previous=this.name=d}RenamePage.prototype.execute=function(){var a=this.page.getName();this.page.setName(this.previous);this.name=this.previous;this.previous=a;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageRenamed"))};
function MovePage(a,b,d){this.ui=a;this.oldIndex=b;this.newIndex=d}MovePage.prototype.execute=function(){this.ui.pages.splice(this.newIndex,0,this.ui.pages.splice(this.oldIndex,1)[0]);var a=this.oldIndex;this.oldIndex=this.newIndex;this.newIndex=a;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageMoved"))};
function SelectPage(a,b,d){this.ui=a;this.previousPage=this.page=b;this.neverShown=!0;null!=b&&(this.neverShown=null==b.viewState,this.ui.updatePageRoot(b),null!=d&&(b.viewState=d,this.neverShown=!1))}
-SelectPage.prototype.execute=function(){var a=mxUtils.indexOf(this.ui.pages,this.previousPage);if(null!=this.page&&0<=a){var a=this.ui.currentPage,b=this.ui.editor,d=b.graph,k=Graph.compressNode(b.getGraphXml(!0));mxUtils.setTextContent(a.node,k);a.viewState=d.getViewState();a.root=d.model.root;null!=a.model&&a.model.rootChanged(a.root);d.view.clear(a.root,!0);d.clearSelection();this.ui.currentPage=this.previousPage;this.previousPage=a;a=this.ui.currentPage;d.model.prefix=Editor.guid()+"-";d.model.rootChanged(a.root);
+SelectPage.prototype.execute=function(){var a=mxUtils.indexOf(this.ui.pages,this.previousPage);if(null!=this.page&&0<=a){var a=this.ui.currentPage,b=this.ui.editor,d=b.graph,g=Graph.compressNode(b.getGraphXml(!0));mxUtils.setTextContent(a.node,g);a.viewState=d.getViewState();a.root=d.model.root;null!=a.model&&a.model.rootChanged(a.root);d.view.clear(a.root,!0);d.clearSelection();this.ui.currentPage=this.previousPage;this.previousPage=a;a=this.ui.currentPage;d.model.prefix=Editor.guid()+"-";d.model.rootChanged(a.root);
d.setViewState(a.viewState);d.gridEnabled=d.gridEnabled&&(!this.ui.editor.isChromelessView()||"1"==urlParams.grid);b.updateGraphComponents();d.view.validate();d.blockMathRender=!0;d.sizeDidChange();d.blockMathRender=!1;this.neverShown&&(this.neverShown=!1,d.selectUnlockedLayer());b.graph.fireEvent(new mxEventObject(mxEvent.ROOT));b.fireEvent(new mxEventObject("pageSelected","change",this))}};
-function ChangePage(a,b,d,k,f){SelectPage.call(this,a,d);this.relatedPage=b;this.index=k;this.previousIndex=null;this.noSelect=f}mxUtils.extend(ChangePage,SelectPage);
+function ChangePage(a,b,d,g,f){SelectPage.call(this,a,d);this.relatedPage=b;this.index=g;this.previousIndex=null;this.noSelect=f}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 a=mxUtils.indexOf(this.ui.pages,this.relatedPage);this.ui.pages.splice(a,1);this.index=a}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(){var a=null;if(null!=this.pages&&null!=this.currentPage)for(var b=0;b<this.pages.length;b++)if(this.pages[b]==this.currentPage){a=b;break}return a};EditorUi.prototype.getPageById=function(a){if(null!=this.pages)for(var b=0;b<this.pages.length;b++)if(this.pages[b].getId()==a)return this.pages[b];return null};
EditorUi.prototype.createImageForPageLink=function(a){var b=a.indexOf(","),d=null;0<b&&(b=this.getPageById(a.substring(b+1)),null!=b&&b!=this.currentPage&&(d=this.getImageForPage(b),d.originalSrc=a));null==d&&(d={originalSrc:a});return d};
-EditorUi.prototype.getImageForPage=function(a){var b=this.editor.graph.getGlobalVariable,d=this.createTemporaryGraph(this.editor.graph.getStylesheet());d.getGlobalVariable=function(a){return b.apply(this,arguments)};document.body.appendChild(d.container);this.updatePageRoot(a);d.model.setRoot(a.root);a=d.getSvg();var k=d.getGraphBounds();document.body.removeChild(d.container);return new mxImage(Editor.createSvgDataUri(mxUtils.getXml(a)),k.width,k.height,k.x,k.y)};
+EditorUi.prototype.getImageForPage=function(a){var b=this.editor.graph.getGlobalVariable,d=this.createTemporaryGraph(this.editor.graph.getStylesheet());d.getGlobalVariable=function(a){return b.apply(this,arguments)};document.body.appendChild(d.container);this.updatePageRoot(a);d.model.setRoot(a.root);a=d.getSvg();var g=d.getGraphBounds();document.body.removeChild(d.container);return new mxImage(Editor.createSvgDataUri(mxUtils.getXml(a)),g.width,g.height,g.x,g.y)};
EditorUi.prototype.initPages=function(){if(!this.editor.graph.standalone){this.actions.addAction("previousPage",mxUtils.bind(this,function(){this.selectNextPage(!1)}));this.actions.addAction("nextPage",mxUtils.bind(this,function(){this.selectNextPage(!0)}));this.isPagesEnabled()&&(this.keyHandler.bindAction(33,!0,"previousPage",!0),this.keyHandler.bindAction(34,!0,"nextPage",!0));var a=this.editor.graph,b=a.view.validateBackground;a.view.validateBackground=mxUtils.bind(this,function(){if(null!=this.tabContainer){var d=
-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";d!=this.tabContainer.style.height&&this.refresh(!1)}b.apply(a.view,arguments)});var d=null,k=mxUtils.bind(this,function(){this.updateTabContainer();var b=this.currentPage;null!=b&&b!=d&&(null==b.viewState||null==b.viewState.scrollLeft?(this.resetScrollbars(),a.isLightboxView()&&this.lightboxFit(),null!=this.chromelessResize&&
+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";d!=this.tabContainer.style.height&&this.refresh(!1)}b.apply(a.view,arguments)});var d=null,g=mxUtils.bind(this,function(){this.updateTabContainer();var b=this.currentPage;null!=b&&b!=d&&(null==b.viewState||null==b.viewState.scrollLeft?(this.resetScrollbars(),a.isLightboxView()&&this.lightboxFit(),null!=this.chromelessResize&&
(a.container.scrollLeft=0,a.container.scrollTop=0,this.chromelessResize())):(a.container.scrollLeft=a.view.translate.x*a.view.scale+b.viewState.scrollLeft,a.container.scrollTop=a.view.translate.y*a.view.scale+b.viewState.scrollTop),d=b);null!=this.actions.layersWindow&&this.actions.layersWindow.refreshLayers();"undefined"!==typeof MathJax&&"undefined"!==typeof MathJax.Hub?1!=MathJax.Hub.queue.pending||null==this.editor||this.editor.graph.mathEnabled||MathJax.Hub.Queue(mxUtils.bind(this,function(){null!=
-this.editor&&this.editor.graph.refresh()})):"undefined"===typeof Editor.MathJaxClear||null!=this.editor&&this.editor.graph.mathEnabled||Editor.MathJaxClear()});this.editor.graph.model.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(a,b){for(var d=b.getProperty("edit").changes,c=0;c<d.length;c++)if(d[c]instanceof SelectPage||d[c]instanceof RenamePage||d[c]instanceof MovePage||d[c]instanceof mxRootChange){k();break}}));null!=this.toolbar&&this.editor.addListener("pageSelected",this.toolbar.updateZoom)}};
-EditorUi.prototype.restoreViewState=function(a,b,d){a=null!=a?this.getPageById(a.getId()):null;var k=this.editor.graph;null!=a&&null!=this.currentPage&&null!=this.pages&&(a!=this.currentPage?this.selectPage(a,!0,b):(k.setViewState(b),this.editor.updateGraphComponents(),k.view.revalidate(),k.sizeDidChange()),k.container.scrollLeft=k.view.translate.x*k.view.scale+b.scrollLeft,k.container.scrollTop=k.view.translate.y*k.view.scale+b.scrollTop,k.restoreSelection(d))};
-Graph.prototype.createViewState=function(a){var b=a.getAttribute("page"),d=parseFloat(a.getAttribute("pageScale")),k=parseFloat(a.getAttribute("pageWidth")),f=parseFloat(a.getAttribute("pageHeight")),m=a.getAttribute("background"),p=this.parseBackgroundImage(a.getAttribute("backgroundImage")),c=a.getAttribute("extFonts");if(c)try{c=c.split("|").map(function(a){a=a.split("^");return{name:a[0],url:a[1]}})}catch(e){console.log("ExtFonts format error: "+e.message)}return{gridEnabled:"0"!=a.getAttribute("grid"),
-gridSize:parseFloat(a.getAttribute("gridSize"))||mxGraph.prototype.gridSize,guidesEnabled:"0"!=a.getAttribute("guides"),foldingEnabled:"0"!=a.getAttribute("fold"),shadowVisible:"1"==a.getAttribute("shadow"),pageVisible:this.isLightboxView()?!1:null!=b?"0"!=b:this.defaultPageVisible,background:null!=m&&0<m.length?m:null,backgroundImage:p,pageScale:isNaN(d)?mxGraph.prototype.pageScale:d,pageFormat:isNaN(k)||isNaN(f)?"undefined"===typeof mxSettings||null!=this.defaultPageFormat?mxGraph.prototype.pageFormat:
-mxSettings.getPageFormat():new mxRectangle(0,0,k,f),tooltips:"0"!=a.getAttribute("tooltips"),connect:"0"!=a.getAttribute("connect"),arrows:"0"!=a.getAttribute("arrows"),mathEnabled:"1"==a.getAttribute("math"),selectionCells:null,defaultParent:null,scrollbars:this.defaultScrollbars,scale:1,extFonts:c||[]}};
-Graph.prototype.saveViewState=function(a,b,d){d||(b.setAttribute("grid",null==a||a.gridEnabled?"1":"0"),b.setAttribute("gridSize",null!=a?a.gridSize:mxGraph.prototype.gridSize),b.setAttribute("guides",null==a||a.guidesEnabled?"1":"0"),b.setAttribute("tooltips",null==a||a.tooltips?"1":"0"),b.setAttribute("connect",null==a||a.connect?"1":"0"),b.setAttribute("arrows",null==a||a.arrows?"1":"0"),b.setAttribute("page",null==a&&this.defaultPageVisible||null!=a&&a.pageVisible?"1":"0"),b.setAttribute("fold",
-null==a||a.foldingEnabled?"1":"0"));b.setAttribute("pageScale",null!=a&&null!=a.pageScale?a.pageScale:mxGraph.prototype.pageScale);d=null!=a?a.pageFormat:"undefined"===typeof mxSettings||null!=this.defaultPageFormat?mxGraph.prototype.pageFormat:mxSettings.getPageFormat();null!=d&&(b.setAttribute("pageWidth",d.width),b.setAttribute("pageHeight",d.height));null!=a&&null!=a.background&&b.setAttribute("background",a.background);d=this.getBackgroundImageObject(a.backgroundImage);null!=d&&b.setAttribute("backgroundImage",
-JSON.stringify(d));b.setAttribute("math",null!=a&&a.mathEnabled?"1":"0");b.setAttribute("shadow",null!=a&&a.shadowVisible?"1":"0");null!=a&&null!=a.extFonts&&0<a.extFonts.length&&b.setAttribute("extFonts",a.extFonts.map(function(a){return a.name+"^"+a.url}).join("|"))};
+this.editor&&this.editor.graph.refresh()})):"undefined"===typeof Editor.MathJaxClear||null!=this.editor&&this.editor.graph.mathEnabled||Editor.MathJaxClear()});this.editor.graph.model.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(a,b){for(var d=b.getProperty("edit").changes,c=0;c<d.length;c++)if(d[c]instanceof SelectPage||d[c]instanceof RenamePage||d[c]instanceof MovePage||d[c]instanceof mxRootChange){g();break}}));null!=this.toolbar&&this.editor.addListener("pageSelected",this.toolbar.updateZoom)}};
+EditorUi.prototype.restoreViewState=function(a,b,d){a=null!=a?this.getPageById(a.getId()):null;var g=this.editor.graph;null!=a&&null!=this.currentPage&&null!=this.pages&&(a!=this.currentPage?this.selectPage(a,!0,b):(g.setViewState(b),this.editor.updateGraphComponents(),g.view.revalidate(),g.sizeDidChange()),g.container.scrollLeft=g.view.translate.x*g.view.scale+b.scrollLeft,g.container.scrollTop=g.view.translate.y*g.view.scale+b.scrollTop,g.restoreSelection(d))};
+Graph.prototype.createViewState=function(a){var b=a.getAttribute("page"),d=parseFloat(a.getAttribute("pageScale")),g=parseFloat(a.getAttribute("pageWidth")),f=parseFloat(a.getAttribute("pageHeight")),m=a.getAttribute("background"),p=this.parseBackgroundImage(a.getAttribute("backgroundImage")),c=a.getAttribute("extFonts");if(c)try{c=c.split("|").map(function(a){a=a.split("^");return{name:a[0],url:a[1]}})}catch(e){console.log("ExtFonts format error: "+e.message)}return{gridEnabled:"0"!=a.getAttribute("grid"),
+gridSize:parseFloat(a.getAttribute("gridSize"))||mxGraph.prototype.gridSize,guidesEnabled:"0"!=a.getAttribute("guides"),foldingEnabled:"0"!=a.getAttribute("fold"),shadowVisible:"1"==a.getAttribute("shadow"),pageVisible:this.isLightboxView()?!1:null!=b?"0"!=b:this.defaultPageVisible,background:null!=m&&0<m.length?m:null,backgroundImage:p,pageScale:isNaN(d)?mxGraph.prototype.pageScale:d,pageFormat:isNaN(g)||isNaN(f)?"undefined"===typeof mxSettings||null!=this.defaultPageFormat?mxGraph.prototype.pageFormat:
+mxSettings.getPageFormat():new mxRectangle(0,0,g,f),tooltips:"0"!=a.getAttribute("tooltips"),connect:"0"!=a.getAttribute("connect"),arrows:"0"!=a.getAttribute("arrows"),mathEnabled:"1"==a.getAttribute("math"),selectionCells:null,defaultParent:null,scrollbars:this.defaultScrollbars,scale:1,extFonts:c||[]}};
+Graph.prototype.saveViewState=function(a,b,d,g){d||(b.setAttribute("grid",null==a||a.gridEnabled?"1":"0"),b.setAttribute("gridSize",null!=a?a.gridSize:mxGraph.prototype.gridSize),b.setAttribute("guides",null==a||a.guidesEnabled?"1":"0"),b.setAttribute("tooltips",null==a||a.tooltips?"1":"0"),b.setAttribute("connect",null==a||a.connect?"1":"0"),b.setAttribute("arrows",null==a||a.arrows?"1":"0"),b.setAttribute("page",null==a&&this.defaultPageVisible||null!=a&&a.pageVisible?"1":"0"),b.setAttribute("fold",
+null==a||a.foldingEnabled?"1":"0"));b.setAttribute("pageScale",null!=a&&null!=a.pageScale?a.pageScale:mxGraph.prototype.pageScale);d=null!=a?a.pageFormat:"undefined"===typeof mxSettings||null!=this.defaultPageFormat?mxGraph.prototype.pageFormat:mxSettings.getPageFormat();null!=d&&(b.setAttribute("pageWidth",d.width),b.setAttribute("pageHeight",d.height));null!=a&&null!=a.background&&b.setAttribute("background",a.background);g=this.getBackgroundImageObject(a.backgroundImage,g);null!=g&&b.setAttribute("backgroundImage",
+JSON.stringify(g));b.setAttribute("math",null!=a&&a.mathEnabled?"1":"0");b.setAttribute("shadow",null!=a&&a.shadowVisible?"1":"0");null!=a&&null!=a.extFonts&&0<a.extFonts.length&&b.setAttribute("extFonts",a.extFonts.map(function(a){return a.name+"^"+a.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,extFonts:this.extFonts}};
Graph.prototype.setViewState=function(a,b){if(null!=a){this.lastPasteXml=a.lastPasteXml;this.pasteCounter=a.pasteCounter||0;this.mathEnabled=a.mathEnabled;this.gridEnabled=a.gridEnabled;this.gridSize=a.gridSize;this.graphHandler.guidesEnabled=a.guidesEnabled;this.foldingEnabled=a.foldingEnabled;this.setShadowVisible(a.shadowVisible,!1);this.scrollbars=a.scrollbars;this.pageVisible=!this.isViewer()&&a.pageVisible;this.background=a.background;this.pageScale=a.pageScale;this.pageFormat=a.pageFormat;
-this.view.currentRoot=a.currentRoot;this.defaultParent=a.defaultParent;this.connectionArrowsEnabled=a.arrows;this.setTooltips(a.tooltips);this.setConnectable(a.connect);this.setBackgroundImage(a.backgroundImage);var d=this.extFonts;this.extFonts=a.extFonts||[];if(b&&null!=d)for(var k=0;k<d.length;k++){var f=document.getElementById("extFont_"+d[k].name);null!=f&&f.parentNode.removeChild(f)}for(k=0;k<this.extFonts.length;k++)this.addExtFont(this.extFonts[k].name,this.extFonts[k].url,!0);this.view.scale=
+this.view.currentRoot=a.currentRoot;this.defaultParent=a.defaultParent;this.connectionArrowsEnabled=a.arrows;this.setTooltips(a.tooltips);this.setConnectable(a.connect);this.setBackgroundImage(a.backgroundImage);var d=this.extFonts;this.extFonts=a.extFonts||[];if(b&&null!=d)for(var g=0;g<d.length;g++){var f=document.getElementById("extFont_"+d[g].name);null!=f&&f.parentNode.removeChild(f)}for(g=0;g<this.extFonts.length;g++)this.addExtFont(this.extFonts[g].name,this.extFonts[g].url,!0);this.view.scale=
null!=a.scale?a.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!=a.translate&&(this.view.translate=a.translate)}else this.view.currentRoot=null,this.view.scale=1,this.gridEnabled=this.defaultGridEnabled,this.gridSize=mxGraph.prototype.gridSize,this.pageScale=mxGraph.prototype.pageScale,this.pageFormat="undefined"===
typeof mxSettings||null!=this.defaultPageFormat?mxGraph.prototype.pageFormat:mxSettings.getPageFormat(),this.pageVisible=this.defaultPageVisible,this.backgroundImage=this.background=null,this.scrollbars=this.defaultScrollbars,this.foldingEnabled=this.graphHandler.guidesEnabled=!0,this.setShadowVisible(!1,!1),this.defaultParent=null,this.setTooltips(!0),this.setConnectable(!0),this.lastPasteXml=null,this.pasteCounter=0,this.mathEnabled=!1,this.connectionArrowsEnabled=!0,this.extFonts=[];this.preferPageSize=
this.pageBreaksVisible=this.pageVisible;this.fireEvent(new mxEventObject("viewStateChanged","state",a))};
-Graph.prototype.addExtFont=function(a,b,d){if(a&&b){"1"!=urlParams["ext-fonts"]&&(Graph.recentCustomFonts[a.toLowerCase()]={name:a,url:b});var k="extFont_"+a;if(null==document.getElementById(k))if(0==b.indexOf(Editor.GOOGLE_FONTS))mxClient.link("stylesheet",b,null,k);else{document.getElementsByTagName("head");var f=document.createElement("style");f.appendChild(document.createTextNode('@font-face {\n\tfont-family: "'+a+'";\n\tsrc: url("'+b+'");\n}'));f.setAttribute("id",k);document.getElementsByTagName("head")[0].appendChild(f)}if(!d){null==
-this.extFonts&&(this.extFonts=[]);d=this.extFonts;k=!0;for(f=0;f<d.length;f++)if(d[f].name==a){k=!1;break}k&&this.extFonts.push({name:a,url:b})}}};
-EditorUi.prototype.updatePageRoot=function(a,b){if(null==a.root){var d=this.editor.extractGraphModel(a.node,null,b),k=Editor.extractParserError(d);if(k)throw Error(k);null!=d?(a.graphModelNode=d,a.viewState=this.editor.graph.createViewState(d),k=new mxCodec(d.ownerDocument),a.root=k.decode(d).root):a.root=this.editor.graph.model.createRoot()}else if(null==a.viewState){if(null==a.graphModelNode){d=this.editor.extractGraphModel(a.node);if(k=Editor.extractParserError(d))throw Error(k);null!=d&&(a.graphModelNode=
+Graph.prototype.addExtFont=function(a,b,d){if(a&&b){"1"!=urlParams["ext-fonts"]&&(Graph.recentCustomFonts[a.toLowerCase()]={name:a,url:b});var g="extFont_"+a;if(null==document.getElementById(g))if(0==b.indexOf(Editor.GOOGLE_FONTS))mxClient.link("stylesheet",b,null,g);else{document.getElementsByTagName("head");var f=document.createElement("style");f.appendChild(document.createTextNode('@font-face {\n\tfont-family: "'+a+'";\n\tsrc: url("'+b+'");\n}'));f.setAttribute("id",g);document.getElementsByTagName("head")[0].appendChild(f)}if(!d){null==
+this.extFonts&&(this.extFonts=[]);d=this.extFonts;g=!0;for(f=0;f<d.length;f++)if(d[f].name==a){g=!1;break}g&&this.extFonts.push({name:a,url:b})}}};
+EditorUi.prototype.updatePageRoot=function(a,b){if(null==a.root){var d=this.editor.extractGraphModel(a.node,null,b),g=Editor.extractParserError(d);if(g)throw Error(g);null!=d?(a.graphModelNode=d,a.viewState=this.editor.graph.createViewState(d),g=new mxCodec(d.ownerDocument),a.root=g.decode(d).root):a.root=this.editor.graph.model.createRoot()}else if(null==a.viewState){if(null==a.graphModelNode){d=this.editor.extractGraphModel(a.node);if(g=Editor.extractParserError(d))throw Error(g);null!=d&&(a.graphModelNode=
d)}null!=a.graphModelNode&&(a.viewState=this.editor.graph.createViewState(a.graphModelNode))}return a};
-EditorUi.prototype.selectPage=function(a,b,d){try{if(a!=this.currentPage){this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1);b=null!=b?b:!1;this.editor.graph.isMouseDown=!1;this.editor.graph.reset();var k=this.editor.graph.model.createUndoableEdit();k.ignoreEdit=!0;var f=new SelectPage(this,a,d);f.execute();k.add(f);k.notify();this.editor.graph.tooltipHandler.hide();b||this.editor.graph.model.fireEvent(new mxEventObject(mxEvent.UNDO,"edit",k))}}catch(m){this.handleError(m)}};
+EditorUi.prototype.selectPage=function(a,b,d){try{if(a!=this.currentPage){this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1);b=null!=b?b:!1;this.editor.graph.isMouseDown=!1;this.editor.graph.reset();var g=this.editor.graph.model.createUndoableEdit();g.ignoreEdit=!0;var f=new SelectPage(this,a,d);f.execute();g.add(f);g.notify();this.editor.graph.tooltipHandler.hide();b||this.editor.graph.model.fireEvent(new mxEventObject(mxEvent.UNDO,"edit",g))}}catch(m){this.handleError(m)}};
EditorUi.prototype.selectNextPage=function(a){var b=this.currentPage;null!=b&&null!=this.pages&&(b=mxUtils.indexOf(this.pages,b),a?this.selectPage(this.pages[mxUtils.mod(b+1,this.pages.length)]):a||this.selectPage(this.pages[mxUtils.mod(b-1,this.pages.length)]))};
EditorUi.prototype.insertPage=function(a,b){if(this.editor.graph.isEnabled()){this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1);a=null!=a?a:this.createPage(null,this.createPageId());b=null!=b?b:this.pages.length;var d=new ChangePage(this,a,a,b);this.editor.graph.model.execute(d)}return a};EditorUi.prototype.createPageId=function(){var a;do a=Editor.guid();while(null!=this.getPageById(a));return a};
EditorUi.prototype.createPage=function(a,b){var d=new DiagramPage(this.fileNode.ownerDocument.createElement("diagram"),b);d.setName(null!=a?a:this.createPageName());return d};EditorUi.prototype.createPageName=function(){for(var a={},b=0;b<this.pages.length;b++){var d=this.pages[b].getName();null!=d&&0<d.length&&(a[d]=d)}b=this.pages.length;do d=mxResources.get("pageWithNumber",[++b]);while(null!=a[d]);return d};
-EditorUi.prototype.removePage=function(a){try{var b=this.editor.graph,d=mxUtils.indexOf(this.pages,a);if(b.isEnabled()&&0<=d){this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1);b.model.beginUpdate();try{var k=this.currentPage;k==a&&1<this.pages.length?(d==this.pages.length-1?d--:d++,k=this.pages[d]):1>=this.pages.length&&(k=this.insertPage(),b.model.execute(new RenamePage(this,k,mxResources.get("pageWithNumber",[1]))));b.model.execute(new ChangePage(this,a,k))}finally{b.model.endUpdate()}}}catch(f){this.handleError(f)}return a};
-EditorUi.prototype.duplicatePage=function(a,b){var d=null;try{var k=this.editor.graph;if(k.isEnabled()){k.isEditing()&&k.stopEditing();var f=a.node.cloneNode(!1);f.removeAttribute("id");var m={},p=k.createCellLookup([k.model.root]),d=new DiagramPage(f);d.root=k.cloneCell(k.model.root,null,m);d.viewState=k.getViewState();d.viewState.scale=1;d.viewState.scrollLeft=null;d.viewState.scrollTop=null;d.viewState.currentRoot=null;d.viewState.defaultParent=null;d.setName(b);d=this.insertPage(d,mxUtils.indexOf(this.pages,
-a)+1);k.updateCustomLinks(k.createCellMapping(m,p),[d.root])}}catch(c){this.handleError(c)}return d};EditorUi.prototype.renamePage=function(a){if(this.editor.graph.isEnabled()){var b=new FilenameDialog(this,a.getName(),mxResources.get("rename"),mxUtils.bind(this,function(b){null!=b&&0<b.length&&this.editor.graph.model.execute(new RenamePage(this,a,b))}),mxResources.get("rename"));this.showDialog(b.container,300,80,!0,!0);b.init()}return a};
+EditorUi.prototype.removePage=function(a){try{var b=this.editor.graph,d=mxUtils.indexOf(this.pages,a);if(b.isEnabled()&&0<=d){this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1);b.model.beginUpdate();try{var g=this.currentPage;g==a&&1<this.pages.length?(d==this.pages.length-1?d--:d++,g=this.pages[d]):1>=this.pages.length&&(g=this.insertPage(),b.model.execute(new RenamePage(this,g,mxResources.get("pageWithNumber",[1]))));b.model.execute(new ChangePage(this,a,g))}finally{b.model.endUpdate()}}}catch(f){this.handleError(f)}return a};
+EditorUi.prototype.duplicatePage=function(a,b){var d=null;try{var g=this.editor.graph;if(g.isEnabled()){g.isEditing()&&g.stopEditing();var f=a.node.cloneNode(!1);f.removeAttribute("id");var m={},p=g.createCellLookup([g.model.root]),d=new DiagramPage(f);d.root=g.cloneCell(g.model.root,null,m);d.viewState=g.getViewState();d.viewState.scale=1;d.viewState.scrollLeft=null;d.viewState.scrollTop=null;d.viewState.currentRoot=null;d.viewState.defaultParent=null;d.setName(b);d=this.insertPage(d,mxUtils.indexOf(this.pages,
+a)+1);g.updateCustomLinks(g.createCellMapping(m,p),[d.root])}}catch(c){this.handleError(c)}return d};EditorUi.prototype.renamePage=function(a){if(this.editor.graph.isEnabled()){var b=new FilenameDialog(this,a.getName(),mxResources.get("rename"),mxUtils.bind(this,function(b){null!=b&&0<b.length&&this.editor.graph.model.execute(new RenamePage(this,a,b))}),mxResources.get("rename"));this.showDialog(b.container,300,80,!0,!0);b.init()}return a};
EditorUi.prototype.movePage=function(a,b){this.editor.graph.model.execute(new MovePage(this,a,b))};EditorUi.prototype.createTabContainer=function(){var a=document.createElement("div");a.className="geTabContainer";a.style.position="absolute";a.style.whiteSpace="nowrap";a.style.overflow="hidden";a.style.height="0px";return a};
-EditorUi.prototype.updateTabContainer=function(){if(null!=this.tabContainer&&null!=this.pages){var a=this.editor.graph,b=document.createElement("div");b.style.position="relative";b.style.display="inline-block";b.style.verticalAlign="top";b.style.height=this.tabContainer.style.height;b.style.whiteSpace="nowrap";b.style.overflow="hidden";b.style.fontSize="13px";b.style.marginLeft="30px";for(var d=this.editor.isChromelessView()?29:59,k=Math.min(140,Math.max(20,(this.tabContainer.clientWidth-d)/this.pages.length)+
+EditorUi.prototype.updateTabContainer=function(){if(null!=this.tabContainer&&null!=this.pages){var a=this.editor.graph,b=document.createElement("div");b.style.position="relative";b.style.display="inline-block";b.style.verticalAlign="top";b.style.height=this.tabContainer.style.height;b.style.whiteSpace="nowrap";b.style.overflow="hidden";b.style.fontSize="13px";b.style.marginLeft="30px";for(var d=this.editor.isChromelessView()?29:59,g=Math.min(140,Math.max(20,(this.tabContainer.clientWidth-d)/this.pages.length)+
1),f=null,m=0;m<this.pages.length;m++)mxUtils.bind(this,function(c,d){this.pages[c]==this.currentPage?(d.className="geActivePage",d.style.backgroundColor=Editor.isDarkMode()?"#2a2a2a":"#fff"):d.className="geInactivePage";d.setAttribute("draggable","true");mxEvent.addListener(d,"dragstart",mxUtils.bind(this,function(b){a.isEnabled()?(mxClient.IS_FF&&b.dataTransfer.setData("Text","<diagram/>"),f=c):mxEvent.consume(b)}));mxEvent.addListener(d,"dragend",mxUtils.bind(this,function(a){f=null;a.stopPropagation();
-a.preventDefault()}));mxEvent.addListener(d,"dragover",mxUtils.bind(this,function(a){null!=f&&(a.dataTransfer.dropEffect="move");a.stopPropagation();a.preventDefault()}));mxEvent.addListener(d,"drop",mxUtils.bind(this,function(a){null!=f&&c!=f&&this.movePage(f,c);a.stopPropagation();a.preventDefault()}));b.appendChild(d)})(m,this.createTabForPage(this.pages[m],k,this.pages[m]!=this.currentPage,m+1));this.tabContainer.innerHTML="";this.tabContainer.appendChild(b);k=this.createPageMenuTab();this.tabContainer.appendChild(k);
-k=null;this.isPageInsertTabVisible()&&(k=this.createPageInsertTab(),this.tabContainer.appendChild(k));if(b.clientWidth>this.tabContainer.clientWidth-d){null!=k&&(k.style.position="absolute",k.style.right="0px",b.style.marginRight="30px");var p=this.createControlTab(4,"&nbsp;&#10094;&nbsp;");p.style.position="absolute";p.style.right=this.editor.chromeless?"29px":"55px";p.style.fontSize="13pt";this.tabContainer.appendChild(p);var c=this.createControlTab(4,"&nbsp;&#10095;");c.style.position="absolute";
+a.preventDefault()}));mxEvent.addListener(d,"dragover",mxUtils.bind(this,function(a){null!=f&&(a.dataTransfer.dropEffect="move");a.stopPropagation();a.preventDefault()}));mxEvent.addListener(d,"drop",mxUtils.bind(this,function(a){null!=f&&c!=f&&this.movePage(f,c);a.stopPropagation();a.preventDefault()}));b.appendChild(d)})(m,this.createTabForPage(this.pages[m],g,this.pages[m]!=this.currentPage,m+1));this.tabContainer.innerHTML="";this.tabContainer.appendChild(b);g=this.createPageMenuTab();this.tabContainer.appendChild(g);
+g=null;this.isPageInsertTabVisible()&&(g=this.createPageInsertTab(),this.tabContainer.appendChild(g));if(b.clientWidth>this.tabContainer.clientWidth-d){null!=g&&(g.style.position="absolute",g.style.right="0px",b.style.marginRight="30px");var p=this.createControlTab(4,"&nbsp;&#10094;&nbsp;");p.style.position="absolute";p.style.right=this.editor.chromeless?"29px":"55px";p.style.fontSize="13pt";this.tabContainer.appendChild(p);var c=this.createControlTab(4,"&nbsp;&#10095;");c.style.position="absolute";
c.style.right=this.editor.chromeless?"0px":"29px";c.style.fontSize="13pt";this.tabContainer.appendChild(c);var e=Math.max(0,this.tabContainer.clientWidth-(this.editor.chromeless?86:116));b.style.width=e+"px";mxEvent.addListener(p,"click",mxUtils.bind(this,function(a){b.scrollLeft-=Math.max(20,e-20);mxUtils.setOpacity(p,0<b.scrollLeft?100:50);mxUtils.setOpacity(c,b.scrollLeft<b.scrollWidth-b.clientWidth?100:50);mxEvent.consume(a)}));mxUtils.setOpacity(p,0<b.scrollLeft?100:50);mxUtils.setOpacity(c,
b.scrollLeft<b.scrollWidth-b.clientWidth?100:50);mxEvent.addListener(c,"click",mxUtils.bind(this,function(a){b.scrollLeft+=Math.max(20,e-20);mxUtils.setOpacity(p,0<b.scrollLeft?100:50);mxUtils.setOpacity(c,b.scrollLeft<b.scrollWidth-b.clientWidth?100:50);mxEvent.consume(a)}))}}};EditorUi.prototype.isPageInsertTabVisible=function(){return 1==urlParams.embed||null!=this.getCurrentFile()&&this.getCurrentFile().isEditable()};
EditorUi.prototype.createTab=function(a){var b=document.createElement("div");b.style.display="inline-block";b.style.whiteSpace="nowrap";b.style.boxSizing="border-box";b.style.position="relative";b.style.overflow="hidden";b.style.textAlign="center";b.style.marginLeft="-1px";b.style.height=this.tabContainer.clientHeight+"px";b.style.padding="12px 4px 8px 4px";b.style.border=Editor.isDarkMode()?"1px solid #505759":"1px solid #e8eaed";b.style.borderTopStyle="none";b.style.borderBottomStyle="none";b.style.backgroundColor=
@@ -3757,33 +3760,33 @@ EditorUi.prototype.createControlTab=function(a,b,d){d=this.createTab(null!=d?d:!
EditorUi.prototype.createPageMenuTab=function(a){a=this.createControlTab(3,'<div class="geSprite geSprite-dots" style="display:inline-block;margin-top:5px;width:21px;height:21px;"></div>',a);a.setAttribute("title",mxResources.get("pages"));a.style.position="absolute";a.style.marginLeft="0px";a.style.top="0px";a.style.left="1px";mxEvent.addListener(a,"click",mxUtils.bind(this,function(a){this.editor.graph.popupMenuHandler.hideMenu();var b=new mxPopupMenu(mxUtils.bind(this,function(a,b){for(var c=0;c<
this.pages.length;c++)mxUtils.bind(this,function(c){var d=a.addItem(this.pages[c].getName(),null,mxUtils.bind(this,function(){this.selectPage(this.pages[c])}),b),e=this.pages[c].getId();d.setAttribute("title",this.pages[c].getName()+(null!=e?" ("+e+")":"")+" ["+(c+1)+"]");this.pages[c]==this.currentPage&&a.addCheckmark(d,Editor.checkmarkImage)})(c);if(this.editor.graph.isEnabled()){a.addSeparator(b);a.addItem(mxResources.get("insertPage"),null,mxUtils.bind(this,function(){this.insertPage()}),b);var d=
this.currentPage;null!=d&&(a.addSeparator(b),c=d.getName(),a.addItem(mxResources.get("removeIt",[c]),null,mxUtils.bind(this,function(){this.removePage(d)}),b),a.addItem(mxResources.get("renameIt",[c]),null,mxUtils.bind(this,function(){this.renamePage(d,d.getName())}),b),a.addSeparator(b),a.addItem(mxResources.get("duplicateIt",[c]),null,mxUtils.bind(this,function(){this.duplicatePage(d,mxResources.get("copyOf",[d.getName()]))}),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()});var k=mxEvent.getClientX(a),f=mxEvent.getClientY(a);b.popup(k,f,null,a);this.setCurrentMenu(b);mxEvent.consume(a)}));return a};
+!0;b.autoExpand=!0;b.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(b,arguments);b.destroy()});var g=mxEvent.getClientX(a),f=mxEvent.getClientY(a);b.popup(g,f,null,a);this.setCurrentMenu(b);mxEvent.consume(a)}));return a};
EditorUi.prototype.createPageInsertTab=function(){var a=this.createControlTab(4,'<div class="geSprite geSprite-plus" style="display:inline-block;width:21px;height:21px;"></div>');a.setAttribute("title",mxResources.get("insertPage"));mxEvent.addListener(a,"click",mxUtils.bind(this,function(a){this.insertPage();mxEvent.consume(a)}));return a};
-EditorUi.prototype.createTabForPage=function(a,b,d,k){d=this.createTab(d);var f=a.getName()||mxResources.get("untitled"),m=a.getId();d.setAttribute("title",f+(null!=m?" ("+m+")":"")+" ["+k+"]");mxUtils.write(d,f);d.style.maxWidth=b+"px";d.style.width=b+"px";this.addTabListeners(a,d);42<b&&(d.style.textOverflow="ellipsis");return d};
-EditorUi.prototype.addTabListeners=function(a,b){mxEvent.disableContextMenu(b);var d=this.editor.graph;mxEvent.addListener(b,"dblclick",mxUtils.bind(this,function(b){this.renamePage(a);mxEvent.consume(b)}));var k=!1,f=!1;mxEvent.addGestureListeners(b,mxUtils.bind(this,function(b){k=null!=this.currentMenu;f=a==this.currentPage;d.isMouseDown||f||this.selectPage(a)}),null,mxUtils.bind(this,function(m){if(d.isEnabled()&&!d.isMouseDown&&(mxEvent.isTouchEvent(m)&&f||mxEvent.isPopupTrigger(m))){d.popupMenuHandler.hideMenu();
-this.hideCurrentMenu();if(!mxEvent.isTouchEvent(m)||!k){var p=new mxPopupMenu(this.createPageMenu(a));p.div.className+=" geMenubarMenu";p.smartSeparators=!0;p.showDisabled=!0;p.autoExpand=!0;p.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(p,arguments);this.resetCurrentMenu();p.destroy()});var c=mxEvent.getClientX(m),e=mxEvent.getClientY(m);p.popup(c,e,null,m);this.setCurrentMenu(p,b)}mxEvent.consume(m)}}))};
-EditorUi.prototype.getLinkForPage=function(a,b,d){if(!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp){var k=this.getCurrentFile();if(null!=k&&k.constructor!=LocalFile&&"draw.io"==this.getServiceName()){var f=this.getSearch("create title mode url drive splash state clibs ui viewbox hide-pages".split(" ")),f=f+((0==f.length?"?":"&")+"page-id="+a.getId());null!=b&&(f+="&"+b.join("&"));return(d&&"1"!=urlParams.dev?EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?
-EditorUi.drawHost:"https://"+window.location.host)+"/"+f+"#"+k.getHash()}}return null};
-EditorUi.prototype.createPageMenu=function(a,b){return mxUtils.bind(this,function(d,k){var f=this.editor.graph;d.addItem(mxResources.get("insert"),null,mxUtils.bind(this,function(){this.insertPage(null,mxUtils.indexOf(this.pages,a)+1)}),k);d.addItem(mxResources.get("delete"),null,mxUtils.bind(this,function(){this.removePage(a)}),k);d.addItem(mxResources.get("rename"),null,mxUtils.bind(this,function(){this.renamePage(a,b)}),k);null!=this.getLinkForPage(a)&&(d.addSeparator(k),d.addItem(mxResources.get("link"),
-null,mxUtils.bind(this,function(){this.showPublishLinkDialog(mxResources.get("url"),!0,null,null,mxUtils.bind(this,function(b,d,c,e,g,k){b=this.createUrlParameters(b,d,c,e,g,k);c||b.push("hide-pages=1");f.isSelectionEmpty()||(c=f.getBoundingBox(f.getSelectionCells()),d=f.view.translate,g=f.view.scale,c.width/=g,c.height/=g,c.x=c.x/g-d.x,c.y=c.y/g-d.y,b.push("viewbox="+encodeURIComponent(JSON.stringify({x:Math.round(c.x),y:Math.round(c.y),width:Math.round(c.width),height:Math.round(c.height),border:100}))));
-e=new EmbedDialog(this,this.getLinkForPage(a,b,e));this.showDialog(e.container,440,240,!0,!0);e.init()}))})));d.addSeparator(k);d.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){this.duplicatePage(a,mxResources.get("copyOf",[a.getName()]))}),k);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"draw.io"!=this.getServiceName()||(d.addSeparator(k),d.addItem(mxResources.get("openInNewWindow"),null,mxUtils.bind(this,function(){this.editor.editAsNew(this.getFileData(!0,null,null,null,
-!0,!0))}),k))})};(function(){var a=EditorUi.prototype.refresh;EditorUi.prototype.refresh=function(b){a.apply(this,arguments);this.updateTabContainer()}})();(function(){mxCodecRegistry.getCodec(ChangePageSetup).exclude.push("page")})();(function(){var a=new mxObjectCodec(new MovePage,["ui"]);a.beforeDecode=function(a,d,k){k.ui=a.ui;return d};a.afterDecode=function(a,d,k){a=k.oldIndex;k.oldIndex=k.newIndex;k.newIndex=a;return k};mxCodecRegistry.register(a)})();
-(function(){var a=new mxObjectCodec(new RenamePage,["ui","page"]);a.beforeDecode=function(a,d,k){k.ui=a.ui;return d};a.afterDecode=function(a,d,k){a=k.previous;k.previous=k.name;k.name=a;return k};mxCodecRegistry.register(a)})();
-(function(){var a=new mxObjectCodec(new ChangePage,"ui relatedPage index neverShown page previousPage".split(" ")),b="defaultParent currentRoot scrollLeft scrollTop scale translate lastPasteXml pasteCounter".split(" ");a.afterEncode=function(a,k,f){f.setAttribute("relatedPage",k.relatedPage.getId());null==k.index&&(f.setAttribute("name",k.relatedPage.getName()),null!=k.relatedPage.viewState&&f.setAttribute("viewState",JSON.stringify(k.relatedPage.viewState,function(a,d){return 0>mxUtils.indexOf(b,
-a)?d:void 0})),null!=k.relatedPage.root&&a.encodeCell(k.relatedPage.root,f));return f};a.beforeDecode=function(a,b,f){f.ui=a.ui;f.relatedPage=f.ui.getPageById(b.getAttribute("relatedPage"));if(null==f.relatedPage){var d=b.ownerDocument.createElement("diagram");d.setAttribute("id",b.getAttribute("relatedPage"));d.setAttribute("name",b.getAttribute("name"));f.relatedPage=new DiagramPage(d);d=b.getAttribute("viewState");null!=d&&(f.relatedPage.viewState=JSON.parse(d),b.removeAttribute("viewState"));
-b=b.cloneNode(!0);d=b.firstChild;if(null!=d)for(f.relatedPage.root=a.decodeCell(d,!1),f=d.nextSibling,d.parentNode.removeChild(d),d=f;null!=d;){f=d.nextSibling;if(d.nodeType==mxConstants.NODETYPE_ELEMENT){var k=d.getAttribute("id");null==a.lookup(k)&&a.decodeCell(d)}d.parentNode.removeChild(d);d=f}}return b};a.afterDecode=function(a,b,f){f.index=f.previousIndex;return f};mxCodecRegistry.register(a)})();(function(){EditorUi.prototype.altShiftActions[68]="selectDescendants";var a=Graph.prototype.foldCells;Graph.prototype.foldCells=function(b,d,m,p,c){d=null!=d?d:!1;null==m&&(m=this.getFoldableCells(this.getSelectionCells(),b));this.stopEditing();this.model.beginUpdate();try{for(var e=m.slice(),f=0;f<m.length;f++)"1"==mxUtils.getValue(this.getCurrentCellStyle(m[f]),"treeFolding","0")&&this.foldTreeCell(b,m[f]);m=e;m=a.apply(this,arguments)}finally{this.model.endUpdate()}return m};Graph.prototype.foldTreeCell=
+EditorUi.prototype.createTabForPage=function(a,b,d,g){d=this.createTab(d);var f=a.getName()||mxResources.get("untitled"),m=a.getId();d.setAttribute("title",f+(null!=m?" ("+m+")":"")+" ["+g+"]");mxUtils.write(d,f);d.style.maxWidth=b+"px";d.style.width=b+"px";this.addTabListeners(a,d);42<b&&(d.style.textOverflow="ellipsis");return d};
+EditorUi.prototype.addTabListeners=function(a,b){mxEvent.disableContextMenu(b);var d=this.editor.graph;mxEvent.addListener(b,"dblclick",mxUtils.bind(this,function(b){this.renamePage(a);mxEvent.consume(b)}));var g=!1,f=!1;mxEvent.addGestureListeners(b,mxUtils.bind(this,function(b){g=null!=this.currentMenu;f=a==this.currentPage;d.isMouseDown||f||this.selectPage(a)}),null,mxUtils.bind(this,function(m){if(d.isEnabled()&&!d.isMouseDown&&(mxEvent.isTouchEvent(m)&&f||mxEvent.isPopupTrigger(m))){d.popupMenuHandler.hideMenu();
+this.hideCurrentMenu();if(!mxEvent.isTouchEvent(m)||!g){var p=new mxPopupMenu(this.createPageMenu(a));p.div.className+=" geMenubarMenu";p.smartSeparators=!0;p.showDisabled=!0;p.autoExpand=!0;p.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(p,arguments);this.resetCurrentMenu();p.destroy()});var c=mxEvent.getClientX(m),e=mxEvent.getClientY(m);p.popup(c,e,null,m);this.setCurrentMenu(p,b)}mxEvent.consume(m)}}))};
+EditorUi.prototype.getLinkForPage=function(a,b,d){if(!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp){var g=this.getCurrentFile();if(null!=g&&g.constructor!=LocalFile&&"draw.io"==this.getServiceName()){var f=this.getSearch("create title mode url drive splash state clibs ui viewbox hide-pages".split(" ")),f=f+((0==f.length?"?":"&")+"page-id="+a.getId());null!=b&&(f+="&"+b.join("&"));return(d&&"1"!=urlParams.dev?EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?
+EditorUi.drawHost:"https://"+window.location.host)+"/"+f+"#"+g.getHash()}}return null};
+EditorUi.prototype.createPageMenu=function(a,b){return mxUtils.bind(this,function(d,g){var f=this.editor.graph;d.addItem(mxResources.get("insert"),null,mxUtils.bind(this,function(){this.insertPage(null,mxUtils.indexOf(this.pages,a)+1)}),g);d.addItem(mxResources.get("delete"),null,mxUtils.bind(this,function(){this.removePage(a)}),g);d.addItem(mxResources.get("rename"),null,mxUtils.bind(this,function(){this.renamePage(a,b)}),g);null!=this.getLinkForPage(a)&&(d.addSeparator(g),d.addItem(mxResources.get("link"),
+null,mxUtils.bind(this,function(){this.showPublishLinkDialog(mxResources.get("url"),!0,null,null,mxUtils.bind(this,function(b,d,c,e,g,n){b=this.createUrlParameters(b,d,c,e,g,n);c||b.push("hide-pages=1");f.isSelectionEmpty()||(c=f.getBoundingBox(f.getSelectionCells()),d=f.view.translate,g=f.view.scale,c.width/=g,c.height/=g,c.x=c.x/g-d.x,c.y=c.y/g-d.y,b.push("viewbox="+encodeURIComponent(JSON.stringify({x:Math.round(c.x),y:Math.round(c.y),width:Math.round(c.width),height:Math.round(c.height),border:100}))));
+e=new EmbedDialog(this,this.getLinkForPage(a,b,e));this.showDialog(e.container,440,240,!0,!0);e.init()}))})));d.addSeparator(g);d.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){this.duplicatePage(a,mxResources.get("copyOf",[a.getName()]))}),g);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"draw.io"!=this.getServiceName()||(d.addSeparator(g),d.addItem(mxResources.get("openInNewWindow"),null,mxUtils.bind(this,function(){this.editor.editAsNew(this.getFileData(!0,null,null,null,
+!0,!0))}),g))})};(function(){var a=EditorUi.prototype.refresh;EditorUi.prototype.refresh=function(b){a.apply(this,arguments);this.updateTabContainer()}})();(function(){mxCodecRegistry.getCodec(ChangePageSetup).exclude.push("page")})();(function(){var a=new mxObjectCodec(new MovePage,["ui"]);a.beforeDecode=function(a,d,g){g.ui=a.ui;return d};a.afterDecode=function(a,d,g){a=g.oldIndex;g.oldIndex=g.newIndex;g.newIndex=a;return g};mxCodecRegistry.register(a)})();
+(function(){var a=new mxObjectCodec(new RenamePage,["ui","page"]);a.beforeDecode=function(a,d,g){g.ui=a.ui;return d};a.afterDecode=function(a,d,g){a=g.previous;g.previous=g.name;g.name=a;return g};mxCodecRegistry.register(a)})();
+(function(){var a=new mxObjectCodec(new ChangePage,"ui relatedPage index neverShown page previousPage".split(" ")),b="defaultParent currentRoot scrollLeft scrollTop scale translate lastPasteXml pasteCounter".split(" ");a.afterEncode=function(a,g,f){f.setAttribute("relatedPage",g.relatedPage.getId());null==g.index&&(f.setAttribute("name",g.relatedPage.getName()),null!=g.relatedPage.viewState&&f.setAttribute("viewState",JSON.stringify(g.relatedPage.viewState,function(a,d){return 0>mxUtils.indexOf(b,
+a)?d:void 0})),null!=g.relatedPage.root&&a.encodeCell(g.relatedPage.root,f));return f};a.beforeDecode=function(a,b,f){f.ui=a.ui;f.relatedPage=f.ui.getPageById(b.getAttribute("relatedPage"));if(null==f.relatedPage){var d=b.ownerDocument.createElement("diagram");d.setAttribute("id",b.getAttribute("relatedPage"));d.setAttribute("name",b.getAttribute("name"));f.relatedPage=new DiagramPage(d);d=b.getAttribute("viewState");null!=d&&(f.relatedPage.viewState=JSON.parse(d),b.removeAttribute("viewState"));
+b=b.cloneNode(!0);d=b.firstChild;if(null!=d)for(f.relatedPage.root=a.decodeCell(d,!1),f=d.nextSibling,d.parentNode.removeChild(d),d=f;null!=d;){f=d.nextSibling;if(d.nodeType==mxConstants.NODETYPE_ELEMENT){var g=d.getAttribute("id");null==a.lookup(g)&&a.decodeCell(d)}d.parentNode.removeChild(d);d=f}}return b};a.afterDecode=function(a,b,f){f.index=f.previousIndex;return f};mxCodecRegistry.register(a)})();(function(){EditorUi.prototype.altShiftActions[68]="selectDescendants";var a=Graph.prototype.foldCells;Graph.prototype.foldCells=function(b,d,m,p,c){d=null!=d?d:!1;null==m&&(m=this.getFoldableCells(this.getSelectionCells(),b));this.stopEditing();this.model.beginUpdate();try{for(var e=m.slice(),f=0;f<m.length;f++)"1"==mxUtils.getValue(this.getCurrentCellStyle(m[f]),"treeFolding","0")&&this.foldTreeCell(b,m[f]);m=e;m=a.apply(this,arguments)}finally{this.model.endUpdate()}return m};Graph.prototype.foldTreeCell=
function(a,b){this.model.beginUpdate();try{var d=[];this.traverse(b,!0,mxUtils.bind(this,function(a,e){var c=null!=e&&this.isTreeEdge(e);c&&d.push(e);a==b||null!=e&&!c||d.push(a);return(null==e||c)&&(a==b||!this.model.isCollapsed(a))}));this.model.setCollapsed(b,a);for(var f=0;f<d.length;f++)this.model.setVisible(d[f],!a)}finally{this.model.endUpdate()}};Graph.prototype.isTreeEdge=function(a){return!this.isEdgeIgnored(a)};Graph.prototype.getTreeEdges=function(a,b,d,p,c,e){return this.model.filterCells(this.getEdges(a,
b,d,p,c,e),mxUtils.bind(this,function(a){return this.isTreeEdge(a)}))};Graph.prototype.getIncomingTreeEdges=function(a,b){return this.getTreeEdges(a,b,!0,!1,!1)};Graph.prototype.getOutgoingTreeEdges=function(a,b){return this.getTreeEdges(a,b,!1,!0,!1)};var b=EditorUi.prototype.init;EditorUi.prototype.init=function(){b.apply(this,arguments);this.editor.isChromelessView()&&!this.editor.editable||this.addTrees()};EditorUi.prototype.addTrees=function(){function a(a){return A.isVertex(a)&&d(a)}function b(a){var b=
!1;null!=a&&(b="1"==t.getCurrentCellStyle(a).treeMoving);return b}function d(a){var b=!1;null!=a&&(a=A.getParent(a),b=t.view.getState(a),b="tree"==(null!=b?b.style:t.getCellStyle(a)).containerType);return b}function p(a){var b=!1;null!=a&&(a=A.getParent(a),b=t.view.getState(a),t.view.getState(a),b=null!=(null!=b?b.style:t.getCellStyle(a)).childLayout);return b}function c(a){a=t.view.getState(a);if(null!=a){var b=t.getIncomingTreeEdges(a.cell);if(0<b.length&&(b=t.view.getState(b[0]),null!=b&&(b=b.absolutePoints,
null!=b&&0<b.length&&(b=b[b.length-1],null!=b)))){if(b.y==a.y&&Math.abs(b.x-a.getCenterX())<a.width/2)return mxConstants.DIRECTION_SOUTH;if(b.y==a.y+a.height&&Math.abs(b.x-a.getCenterX())<a.width/2)return mxConstants.DIRECTION_NORTH;if(b.x>a.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function e(a,b){b=null!=b?b:!0;t.model.beginUpdate();try{var d=t.model.getParent(a),e=t.getIncomingTreeEdges(a),f=t.cloneCells([e[0],a]);t.model.setTerminal(f[0],t.model.getTerminal(e[0],
!0),!0);var g=c(a),k=d.geometry;g==mxConstants.DIRECTION_SOUTH||g==mxConstants.DIRECTION_NORTH?f[1].geometry.x+=b?a.geometry.width+10:-f[1].geometry.width-10:f[1].geometry.y+=b?a.geometry.height+10:-f[1].geometry.height-10;t.view.currentRoot!=d&&(f[1].geometry.x-=k.x,f[1].geometry.y-=k.y);var l=t.view.getState(a),m=t.view.scale;if(null!=l){var n=mxRectangle.fromRectangle(l);g==mxConstants.DIRECTION_SOUTH||g==mxConstants.DIRECTION_NORTH?n.x+=(b?a.geometry.width+10:-f[1].geometry.width-10)*m:n.y+=(b?
a.geometry.height+10:-f[1].geometry.height-10)*m;var p=t.getOutgoingTreeEdges(t.model.getTerminal(e[0],!0));if(null!=p){for(var q=g==mxConstants.DIRECTION_SOUTH||g==mxConstants.DIRECTION_NORTH,v=k=e=0;v<p.length;v++){var u=t.model.getTerminal(p[v],!1);if(g==c(u)){var z=t.view.getState(u);u!=a&&null!=z&&(q&&b!=z.getCenterX()<l.getCenterX()||!q&&b!=z.getCenterY()<l.getCenterY())&&mxUtils.intersects(n,z)&&(e=10+Math.max(e,(Math.min(n.x+n.width,z.x+z.width)-Math.max(n.x,z.x))/m),k=10+Math.max(k,(Math.min(n.y+
-n.height,z.y+z.height)-Math.max(n.y,z.y))/m))}}q?k=0:e=0;for(v=0;v<p.length;v++)if(u=t.model.getTerminal(p[v],!1),g==c(u)&&(z=t.view.getState(u),u!=a&&null!=z&&(q&&b!=z.getCenterX()<l.getCenterX()||!q&&b!=z.getCenterY()<l.getCenterY()))){var C=[];t.traverse(z.cell,!0,function(a,b){var c=null!=b&&t.isTreeEdge(b);c&&C.push(b);(null==b||c)&&C.push(a);return null==b||c});t.moveCells(C,(b?1:-1)*e,(b?1:-1)*k)}}}return t.addCells(f,d)}finally{t.model.endUpdate()}}function g(a){t.model.beginUpdate();try{var b=
+n.height,z.y+z.height)-Math.max(n.y,z.y))/m))}}q?k=0:e=0;for(v=0;v<p.length;v++)if(u=t.model.getTerminal(p[v],!1),g==c(u)&&(z=t.view.getState(u),u!=a&&null!=z&&(q&&b!=z.getCenterX()<l.getCenterX()||!q&&b!=z.getCenterY()<l.getCenterY()))){var D=[];t.traverse(z.cell,!0,function(a,b){var c=null!=b&&t.isTreeEdge(b);c&&D.push(b);(null==b||c)&&D.push(a);return null==b||c});t.moveCells(D,(b?1:-1)*e,(b?1:-1)*k)}}}return t.addCells(f,d)}finally{t.model.endUpdate()}}function k(a){t.model.beginUpdate();try{var b=
c(a),d=t.getIncomingTreeEdges(a),e=t.cloneCells([d[0],a]);t.model.setTerminal(d[0],e[1],!1);t.model.setTerminal(e[0],e[1],!0);t.model.setTerminal(e[0],a,!1);var f=t.model.getParent(a),g=f.geometry,k=[];t.view.currentRoot!=f&&(e[1].geometry.x-=g.x,e[1].geometry.y-=g.y);t.traverse(a,!0,function(a,b){var c=null!=b&&t.isTreeEdge(b);c&&k.push(b);(null==b||c)&&k.push(a);return null==b||c});var l=a.geometry.width+40,m=a.geometry.height+40;b==mxConstants.DIRECTION_SOUTH?l=0:b==mxConstants.DIRECTION_NORTH?
(l=0,m=-m):b==mxConstants.DIRECTION_WEST?(l=-l,m=0):b==mxConstants.DIRECTION_EAST&&(m=0);t.moveCells(k,l,m);return t.addCells(e,f)}finally{t.model.endUpdate()}}function n(a,b){t.model.beginUpdate();try{var d=t.model.getParent(a),e=t.getIncomingTreeEdges(a),f=c(a);0==e.length&&(e=[t.createEdge(d,null,"",null,null,t.createCurrentEdgeStyle())],f=b);var g=t.cloneCells([e[0],a]);t.model.setTerminal(g[0],a,!0);if(null==t.model.getTerminal(g[0],!1)){t.model.setTerminal(g[0],g[1],!1);var k=t.getCellStyle(g[1]).newEdgeStyle;
-if(null!=k)try{var l=JSON.parse(k),m;for(m in l)t.setCellStyles(m,l[m],[g[0]]),"edgeStyle"==m&&"elbowEdgeStyle"==l[m]&&t.setCellStyles("elbow",f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NOTH?"vertical":"horizontal",[g[0]])}catch(ca){}}var e=t.getOutgoingTreeEdges(a),n=d.geometry,k=[];t.view.currentRoot==d&&(n=new mxRectangle);for(l=0;l<e.length;l++){var p=t.model.getTerminal(e[l],!1);null!=p&&k.push(p)}var q=t.view.getBounds(k),v=t.view.translate,u=t.view.scale;f==mxConstants.DIRECTION_SOUTH?
-(g[1].geometry.x=null==q?a.geometry.x+(a.geometry.width-g[1].geometry.width)/2:(q.x+q.width)/u-v.x-n.x+10,g[1].geometry.y+=g[1].geometry.height-n.y+40):f==mxConstants.DIRECTION_NORTH?(g[1].geometry.x=null==q?a.geometry.x+(a.geometry.width-g[1].geometry.width)/2:(q.x+q.width)/u-v.x+-n.x+10,g[1].geometry.y-=g[1].geometry.height+n.y+40):(g[1].geometry.x=f==mxConstants.DIRECTION_WEST?g[1].geometry.x-(g[1].geometry.width+n.x+40):g[1].geometry.x+(g[1].geometry.width-n.x+40),g[1].geometry.y=null==q?a.geometry.y+
-(a.geometry.height-g[1].geometry.height)/2:(q.y+q.height)/u-v.y+-n.y+10);return t.addCells(g,d)}finally{t.model.endUpdate()}}function l(a,b,c){a=t.getOutgoingTreeEdges(a);c=t.view.getState(c);var d=[];if(null!=c&&null!=a){for(var e=0;e<a.length;e++){var f=t.view.getState(t.model.getTerminal(a[e],!1));null!=f&&(!b&&Math.min(f.x+f.width,c.x+c.width)>=Math.max(f.x,c.x)||b&&Math.min(f.y+f.height,c.y+c.height)>=Math.max(f.y,c.y))&&d.push(f)}d.sort(function(a,c){return b?a.x+a.width-c.x-c.width:a.y+a.height-
+if(null!=k)try{var l=JSON.parse(k),m;for(m in l)t.setCellStyles(m,l[m],[g[0]]),"edgeStyle"==m&&"elbowEdgeStyle"==l[m]&&t.setCellStyles("elbow",f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NOTH?"vertical":"horizontal",[g[0]])}catch(ba){}}var e=t.getOutgoingTreeEdges(a),n=d.geometry,k=[];t.view.currentRoot==d&&(n=new mxRectangle);for(l=0;l<e.length;l++){var p=t.model.getTerminal(e[l],!1);null!=p&&k.push(p)}var q=t.view.getBounds(k),u=t.view.translate,v=t.view.scale;f==mxConstants.DIRECTION_SOUTH?
+(g[1].geometry.x=null==q?a.geometry.x+(a.geometry.width-g[1].geometry.width)/2:(q.x+q.width)/v-u.x-n.x+10,g[1].geometry.y+=g[1].geometry.height-n.y+40):f==mxConstants.DIRECTION_NORTH?(g[1].geometry.x=null==q?a.geometry.x+(a.geometry.width-g[1].geometry.width)/2:(q.x+q.width)/v-u.x+-n.x+10,g[1].geometry.y-=g[1].geometry.height+n.y+40):(g[1].geometry.x=f==mxConstants.DIRECTION_WEST?g[1].geometry.x-(g[1].geometry.width+n.x+40):g[1].geometry.x+(g[1].geometry.width-n.x+40),g[1].geometry.y=null==q?a.geometry.y+
+(a.geometry.height-g[1].geometry.height)/2:(q.y+q.height)/v-u.y+-n.y+10);return t.addCells(g,d)}finally{t.model.endUpdate()}}function l(a,b,c){a=t.getOutgoingTreeEdges(a);c=t.view.getState(c);var d=[];if(null!=c&&null!=a){for(var e=0;e<a.length;e++){var f=t.view.getState(t.model.getTerminal(a[e],!1));null!=f&&(!b&&Math.min(f.x+f.width,c.x+c.width)>=Math.max(f.x,c.x)||b&&Math.min(f.y+f.height,c.y+c.height)>=Math.max(f.y,c.y))&&d.push(f)}d.sort(function(a,c){return b?a.x+a.width-c.x-c.width:a.y+a.height-
c.y-c.height})}return d}function q(a,b){var d=c(a),e=b==mxConstants.DIRECTION_EAST||b==mxConstants.DIRECTION_WEST;(d==mxConstants.DIRECTION_EAST||d==mxConstants.DIRECTION_WEST)==e&&d!=b?u.actions.get("selectParent").funct():d==b?(e=t.getOutgoingTreeEdges(a),null!=e&&0<e.length&&t.setSelectionCell(t.model.getTerminal(e[0],!1))):(d=t.getIncomingTreeEdges(a),null!=d&&0<d.length&&(e=l(t.model.getTerminal(d[0],!0),e,a),d=t.view.getState(a),null!=d&&(d=mxUtils.indexOf(e,d),0<=d&&(d+=b==mxConstants.DIRECTION_NORTH||
b==mxConstants.DIRECTION_WEST?-1:1,0<=d&&d<=e.length-1&&t.setSelectionCell(e[d].cell)))))}var u=this,t=u.editor.graph,A=t.getModel(),x=u.menus.createPopupMenu;u.menus.createPopupMenu=function(b,c,d){x.apply(this,arguments);if(1==t.getSelectionCount()){c=t.getSelectionCell();var e=t.getOutgoingTreeEdges(c);b.addSeparator();0<e.length&&(a(t.getSelectionCell())&&this.addMenuItems(b,["selectChildren"],null,d),this.addMenuItems(b,["selectDescendants"],null,d));a(t.getSelectionCell())?(b.addSeparator(),
0<t.getIncomingTreeEdges(c).length&&this.addMenuItems(b,["selectSiblings","selectParent"],null,d)):0<t.model.getEdgeCount(c)&&this.addMenuItems(b,["selectConnections"],null,d)}};u.actions.addAction("selectChildren",function(){if(t.isEnabled()&&1==t.getSelectionCount()){var a=t.getSelectionCell(),a=t.getOutgoingTreeEdges(a);if(null!=a){for(var b=[],c=0;c<a.length;c++)b.push(t.model.getTerminal(a[c],!1));t.setSelectionCells(b)}}},null,null,"Alt+Shift+X");u.actions.addAction("selectSiblings",function(){if(t.isEnabled()&&
@@ -3792,13 +3795,13 @@ b==mxConstants.DIRECTION_WEST?-1:1,0<=d&&d<=e.length-1&&t.setSelectionCell(e[d].
var G=t.removeCells;t.removeCells=function(b,c){c=null!=c?c:!0;null==b&&(b=this.getDeletableCells(this.getSelectionCells()));c&&(b=this.getDeletableCells(this.addAllEdges(b)));for(var e=[],f=0;f<b.length;f++){var g=b[f];A.isEdge(g)&&d(g)&&(e.push(g),g=A.getTerminal(g,!1));if(a(g)){var k=[];t.traverse(g,!0,function(a,b){var c=null!=b&&t.isTreeEdge(b);c&&k.push(b);(null==b||c)&&k.push(a);return null==b||c});0<k.length&&(e=e.concat(k),g=t.getIncomingTreeEdges(b[f]),b=b.concat(g))}else null!=g&&e.push(b[f])}b=
e;return G.apply(this,arguments)};u.hoverIcons.getStateAt=function(b,c,d){return a(b.cell)?null:this.graph.view.getState(this.graph.getCellAt(c,d))};var z=t.duplicateCells;t.duplicateCells=function(b,c){b=null!=b?b:this.getSelectionCells();for(var d=b.slice(0),e=0;e<d.length;e++){var f=t.view.getState(d[e]);if(null!=f&&a(f.cell))for(var g=t.getIncomingTreeEdges(f.cell),f=0;f<g.length;f++)mxUtils.remove(g[f],b)}this.model.beginUpdate();try{var k=z.call(this,b,c);if(k.length==b.length)for(e=0;e<b.length;e++)if(a(b[e])){var l=
t.getIncomingTreeEdges(k[e]),g=t.getIncomingTreeEdges(b[e]);if(0==l.length&&0<g.length){var m=this.cloneCell(g[0]);this.addEdge(m,t.getDefaultParent(),this.model.getTerminal(g[0],!0),k[e])}}}finally{this.model.endUpdate()}return k};var E=t.moveCells;t.moveCells=function(b,c,d,e,f,g,k){var l=null;this.model.beginUpdate();try{var m=f,n=this.getCurrentCellStyle(f);if(null!=b&&a(f)&&"1"==mxUtils.getValue(n,"treeFolding","0")){for(var p=0;p<b.length;p++)if(a(b[p])||t.model.isEdge(b[p])&&null==t.model.getTerminal(b[p],
-!0)){f=t.model.getParent(b[p]);break}if(null!=m&&f!=m&&null!=this.view.getState(b[0])){var q=t.getIncomingTreeEdges(b[0]);if(0<q.length){var v=t.view.getState(t.model.getTerminal(q[0],!0));if(null!=v){var u=t.view.getState(m);null!=u&&(c=(u.getCenterX()-v.getCenterX())/t.view.scale,d=(u.getCenterY()-v.getCenterY())/t.view.scale)}}}}l=E.apply(this,arguments);if(null!=l&&null!=b&&l.length==b.length)for(p=0;p<l.length;p++)if(this.model.isEdge(l[p]))a(m)&&0>mxUtils.indexOf(l,this.model.getTerminal(l[p],
+!0)){f=t.model.getParent(b[p]);break}if(null!=m&&f!=m&&null!=this.view.getState(b[0])){var q=t.getIncomingTreeEdges(b[0]);if(0<q.length){var u=t.view.getState(t.model.getTerminal(q[0],!0));if(null!=u){var v=t.view.getState(m);null!=v&&(c=(v.getCenterX()-u.getCenterX())/t.view.scale,d=(v.getCenterY()-u.getCenterY())/t.view.scale)}}}}l=E.apply(this,arguments);if(null!=l&&null!=b&&l.length==b.length)for(p=0;p<l.length;p++)if(this.model.isEdge(l[p]))a(m)&&0>mxUtils.indexOf(l,this.model.getTerminal(l[p],
!0))&&this.model.setTerminal(l[p],m,!0);else if(a(b[p])&&(q=t.getIncomingTreeEdges(b[p]),0<q.length))if(!e)a(m)&&0>mxUtils.indexOf(b,this.model.getTerminal(q[0],!0))&&this.model.setTerminal(q[0],m,!0);else if(0==t.getIncomingTreeEdges(l[p]).length){n=m;if(null==n||n==t.model.getParent(b[p]))n=t.model.getTerminal(q[0],!0);e=this.cloneCell(q[0]);this.addEdge(e,t.getDefaultParent(),n,l[p])}}finally{this.model.endUpdate()}return l};if(null!=u.sidebar){var H=u.sidebar.dropAndConnect;u.sidebar.dropAndConnect=
function(b,c,d,e){var f=t.model,g=null;f.beginUpdate();try{if(g=H.apply(this,arguments),a(b))for(var k=0;k<g.length;k++)if(f.isEdge(g[k])&&null==f.getTerminal(g[k],!0)){f.setTerminal(g[k],b,!0);var l=t.getCellGeometry(g[k]);l.points=null;null!=l.getTerminalPoint(!0)&&l.setTerminalPoint(null,!0)}}finally{f.endUpdate()}return g}}var K={88:u.actions.get("selectChildren"),84:u.actions.get("selectSubtree"),80:u.actions.get("selectParent"),83:u.actions.get("selectSiblings")},F=u.onKeyDown;u.onKeyDown=function(b){try{if(t.isEnabled()&&
-!t.isEditing()&&a(t.getSelectionCell())&&1==t.getSelectionCount()){var c=null;0<t.getIncomingTreeEdges(t.getSelectionCell()).length&&(9==b.which?c=mxEvent.isShiftDown(b)?g(t.getSelectionCell()):n(t.getSelectionCell()):13==b.which&&(c=e(t.getSelectionCell(),!mxEvent.isShiftDown(b))));if(null!=c&&0<c.length)1==c.length&&t.model.isEdge(c[0])?t.setSelectionCell(t.model.getTerminal(c[0],!1)):t.setSelectionCell(c[c.length-1]),null!=u.hoverIcons&&u.hoverIcons.update(t.view.getState(t.getSelectionCell())),
+!t.isEditing()&&a(t.getSelectionCell())&&1==t.getSelectionCount()){var c=null;0<t.getIncomingTreeEdges(t.getSelectionCell()).length&&(9==b.which?c=mxEvent.isShiftDown(b)?k(t.getSelectionCell()):n(t.getSelectionCell()):13==b.which&&(c=e(t.getSelectionCell(),!mxEvent.isShiftDown(b))));if(null!=c&&0<c.length)1==c.length&&t.model.isEdge(c[0])?t.setSelectionCell(t.model.getTerminal(c[0],!1)):t.setSelectionCell(c[c.length-1]),null!=u.hoverIcons&&u.hoverIcons.update(t.view.getState(t.getSelectionCell())),
t.startEditingAtCell(t.getSelectionCell()),mxEvent.consume(b);else if(mxEvent.isAltDown(b)&&mxEvent.isShiftDown(b)){var d=K[b.keyCode];null!=d&&(d.funct(b),mxEvent.consume(b))}else 37==b.keyCode?(q(t.getSelectionCell(),mxConstants.DIRECTION_WEST),mxEvent.consume(b)):38==b.keyCode?(q(t.getSelectionCell(),mxConstants.DIRECTION_NORTH),mxEvent.consume(b)):39==b.keyCode?(q(t.getSelectionCell(),mxConstants.DIRECTION_EAST),mxEvent.consume(b)):40==b.keyCode&&(q(t.getSelectionCell(),mxConstants.DIRECTION_SOUTH),
-mxEvent.consume(b))}}catch(B){u.handleError(B)}mxEvent.isConsumed(b)||F.apply(this,arguments)};var I=t.connectVertex;t.connectVertex=function(b,d,f,k,l,m,p){var q=t.getIncomingTreeEdges(b);if(a(b)){var v=c(b),u=v==mxConstants.DIRECTION_EAST||v==mxConstants.DIRECTION_WEST,z=d==mxConstants.DIRECTION_EAST||d==mxConstants.DIRECTION_WEST;return v==d||0==q.length?n(b,d):u==z?g(b):e(b,d!=mxConstants.DIRECTION_NORTH&&d!=mxConstants.DIRECTION_WEST)}return I.apply(this,arguments)};t.getSubtree=function(c){var d=
-[c];!b(c)&&!a(c)||p(c)||t.traverse(c,!0,function(a,b){var c=null!=b&&t.isTreeEdge(b);c&&0>mxUtils.indexOf(d,b)&&d.push(b);(null==b||c)&&0>mxUtils.indexOf(d,a)&&d.push(a);return null==b||c});return d};var C=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){C.apply(this,arguments);(b(this.state.cell)||a(this.state.cell))&&!p(this.state.cell)&&0<this.graph.getOutgoingTreeEdges(this.state.cell).length&&(this.moveHandle=mxUtils.createImage(Editor.moveImage),this.moveHandle.setAttribute("title",
+mxEvent.consume(b))}}catch(B){u.handleError(B)}mxEvent.isConsumed(b)||F.apply(this,arguments)};var I=t.connectVertex;t.connectVertex=function(b,d,f,g,l,m,p){var q=t.getIncomingTreeEdges(b);if(a(b)){var u=c(b),v=u==mxConstants.DIRECTION_EAST||u==mxConstants.DIRECTION_WEST,z=d==mxConstants.DIRECTION_EAST||d==mxConstants.DIRECTION_WEST;return u==d||0==q.length?n(b,d):v==z?k(b):e(b,d!=mxConstants.DIRECTION_NORTH&&d!=mxConstants.DIRECTION_WEST)}return I.apply(this,arguments)};t.getSubtree=function(c){var d=
+[c];!b(c)&&!a(c)||p(c)||t.traverse(c,!0,function(a,b){var c=null!=b&&t.isTreeEdge(b);c&&0>mxUtils.indexOf(d,b)&&d.push(b);(null==b||c)&&0>mxUtils.indexOf(d,a)&&d.push(a);return null==b||c});return d};var D=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){D.apply(this,arguments);(b(this.state.cell)||a(this.state.cell))&&!p(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(a){this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(a),mxEvent.getClientY(a),this.graph.getSubtree(this.state.cell));this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(a);
this.graph.isMouseDown=!0;u.hoverIcons.reset();mxEvent.consume(a)})))};var M=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){M.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.style.left=this.state.x+this.state.width+(40>this.state.width?10:0)+2+"px",this.moveHandle.style.top=this.state.y+this.state.height+(40>this.state.height?10:0)+2+"px")};var U=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(a){U.apply(this,
arguments);null!=this.moveHandle&&(this.moveHandle.style.display=a?"":"none")};var O=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(a,b){O.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)}};if("undefined"!==typeof Sidebar){var d=Sidebar.prototype.createAdvancedShapes;Sidebar.prototype.createAdvancedShapes=function(){var a=d.apply(this,arguments),b=this.graph;return a.concat([this.addEntry("tree container",
@@ -3806,26 +3809,26 @@ function(){var a=new mxCell("Tree Container",new mxGeometry(0,0,400,320),"swimla
c.vertex=!0;var d=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");d.geometry.relative=!0;d.edge=!0;b.insertEdge(d,!0);c.insertEdge(d,!1);a.insert(d);a.insert(b);a.insert(c);return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap mindmaps central idea branch topic",function(){var a=new mxCell("Mindmap",new mxGeometry(0,0,420,126),"swimlane;startSize=20;horizontal=1;containerType=tree;");
a.vertex=!0;var b=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};');b.vertex=!0;var c=new mxCell("Topic",new mxGeometry(320,40,80,20),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
c.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;b.insertEdge(d,!0);c.insertEdge(d,!1);var f=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};');
-f.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;b.insertEdge(k,!0);f.insertEdge(k,!1);var l=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};');
+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;b.insertEdge(g,!0);f.insertEdge(g,!1);var l=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};');
l.vertex=!0;var q=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");q.geometry.relative=!0;q.edge=!0;b.insertEdge(q,!0);l.insertEdge(q,!1);var u=new mxCell("Branch",new mxGeometry(20,80,72,26),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
-u.vertex=!0;var t=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");t.geometry.relative=!0;t.edge=!0;b.insertEdge(t,!0);u.insertEdge(t,!1);a.insert(d);a.insert(k);a.insert(q);a.insert(t);a.insert(b);a.insert(c);a.insert(f);a.insert(l);a.insert(u);return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap mindmaps central idea",function(){var a=new mxCell("Central Idea",
+u.vertex=!0;var t=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");t.geometry.relative=!0;t.edge=!0;b.insertEdge(t,!0);u.insertEdge(t,!1);a.insert(d);a.insert(g);a.insert(q);a.insert(t);a.insert(b);a.insert(c);a.insert(f);a.insert(l);a.insert(u);return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap mindmaps central idea",function(){var a=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;');a.vertex=!0;return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap mindmaps branch",function(){var a=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};');
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.setTerminalPoint(new mxPoint(-40,40),!0);b.geometry.relative=!0;b.edge=!0;a.insertEdge(b,!1);return sb.createVertexTemplateFromCells([a,b],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap mindmaps sub topic",function(){var a=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};');
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.setTerminalPoint(new mxPoint(-40,40),!0);b.geometry.relative=!0;b.edge=!0;a.insertEdge(b,!1);return sb.createVertexTemplateFromCells([a,b],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree orgchart organization division",function(){var a=new mxCell("Orgchart",new mxGeometry(0,0,280,220),'swimlane;startSize=20;horizontal=1;containerType=tree;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');
a.vertex=!0;var d=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(d,"treeRoot","1");d.vertex=!0;var c=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"};');
-c.vertex=!0;var e=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");e.geometry.relative=!0;e.edge=!0;d.insertEdge(e,!0);c.insertEdge(e,!1);var f=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"};');f.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;d.insertEdge(k,!0);f.insertEdge(k,!1);a.insert(e);a.insert(k);a.insert(d);a.insert(c);a.insert(f);return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree root",function(){var a=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(a,"treeRoot",
+c.vertex=!0;var e=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");e.geometry.relative=!0;e.edge=!0;d.insertEdge(e,!0);c.insertEdge(e,!1);var f=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"};');f.vertex=!0;var g=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");
+g.geometry.relative=!0;g.edge=!0;d.insertEdge(g,!0);f.insertEdge(g,!1);a.insert(e);a.insert(g);a.insert(d);a.insert(c);a.insert(f);return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree root",function(){var a=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(a,"treeRoot",
"1");a.vertex=!0;return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree division",function(){var a=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"};');a.vertex=!0;var b=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");
b.geometry.setTerminalPoint(new mxPoint(0,0),!0);b.geometry.relative=!0;b.edge=!0;a.insertEdge(b,!1);return sb.createVertexTemplateFromCells([a,b],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree sub sections",function(){var a=new mxCell("Sub Section",new mxGeometry(0,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");a.vertex=!0;var b=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;startArrow=none;endArrow=none;rounded=0;targetPortConstraint=eastwest;sourcePortConstraint=northsouth;");
b.geometry.setTerminalPoint(new mxPoint(110,-40),!0);b.geometry.relative=!0;b.edge=!0;a.insertEdge(b,!1);var c=new mxCell("Sub Section",new mxGeometry(120,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");c.vertex=!0;var d=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;startArrow=none;endArrow=none;rounded=0;targetPortConstraint=eastwest;sourcePortConstraint=northsouth;");d.geometry.setTerminalPoint(new mxPoint(110,-40),!0);d.geometry.relative=
-!0;d.edge=!0;c.insertEdge(d,!1);return sb.createVertexTemplateFromCells([b,d,a,c],220,60,"Sub Sections")})])}}})();EditorUi.initMinimalTheme=function(){function a(a,b){var c=a.editor.graph;c.popupMenuHandler.hideMenu();null==a.formatWindow?(a.formatWindow=new k(a,mxResources.get("format"),"1"==urlParams.sketch?Math.max(10,a.diagramContainer.clientWidth-241):Math.max(10,a.diagramContainer.clientWidth-248),60,240,Math.min(566,c.container.clientHeight-10),function(b){var c=a.createFormat(b);c.init();a.addListener("darkModeChanged",mxUtils.bind(this,function(){c.refresh()}));return c}),a.formatWindow.window.minimumSize=
-new mxRectangle(0,0,240,80),a.formatWindow.window.setVisible(!0)):a.formatWindow.window.setVisible(null!=b?b:!a.formatWindow.window.isVisible());a.formatWindow.window.isVisible()&&"1"!=urlParams.sketch&&a.formatWindow.window.fit()}function b(a,b){var c=a.editor.graph;c.popupMenuHandler.hideMenu();new mxRectangle;if(null==a.sidebarWindow){var d=Math.min(c.container.clientWidth-10,218);a.sidebarWindow=new k(a,mxResources.get("shapes"),10,"1"==urlParams.sketch?15:56,d-6,Math.min(650,c.container.clientHeight-
+!0;d.edge=!0;c.insertEdge(d,!1);return sb.createVertexTemplateFromCells([b,d,a,c],220,60,"Sub Sections")})])}}})();EditorUi.initMinimalTheme=function(){function a(a,b){var c=a.editor.graph;c.popupMenuHandler.hideMenu();null==a.formatWindow?(a.formatWindow=new g(a,mxResources.get("format"),"1"==urlParams.sketch?Math.max(10,a.diagramContainer.clientWidth-241):Math.max(10,a.diagramContainer.clientWidth-248),60,240,Math.min(566,c.container.clientHeight-10),function(b){var c=a.createFormat(b);c.init();a.addListener("darkModeChanged",mxUtils.bind(this,function(){c.refresh()}));return c}),a.formatWindow.window.minimumSize=
+new mxRectangle(0,0,240,80),a.formatWindow.window.setVisible(!0)):a.formatWindow.window.setVisible(null!=b?b:!a.formatWindow.window.isVisible());a.formatWindow.window.isVisible()&&"1"!=urlParams.sketch&&a.formatWindow.window.fit()}function b(a,b){var c=a.editor.graph;c.popupMenuHandler.hideMenu();new mxRectangle;if(null==a.sidebarWindow){var d=Math.min(c.container.clientWidth-10,218);a.sidebarWindow=new g(a,mxResources.get("shapes"),10,"1"==urlParams.sketch?15:56,d-6,Math.min(650,c.container.clientHeight-
30),function(b){function c(c,d){var f=a.menus.get(c),g=e.addMenu(d,mxUtils.bind(this,function(){f.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";b.appendChild(g);return g}var d=document.createElement("div");d.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;";
d.className="geTitle";d.innerHTML='<span style="font-size:18px;margin-right:5px;">+</span>';mxUtils.write(d,mxResources.get("moreShapes"));b.appendChild(d);mxEvent.addListener(d,"click",function(){a.actions.get("shapes").funct()});var e=new Menubar(a,b);if(!Editor.enableCustomLibraries||"1"==urlParams.embed&&"1"!=urlParams.libraries)d.style.bottom="0";else if(null!=a.actions.get("newLibrary")){d=document.createElement("div");d.style.cssText="position:absolute;left:0px;width:50%;border-top:1px solid lightgray;height:30px;bottom:0px;text-align:center;cursor:pointer;padding:0px;";
d.className="geTitle";var f=document.createElement("span");f.style.cssText="position:relative;top:6px;";mxUtils.write(f,mxResources.get("newLibrary"));d.appendChild(f);b.appendChild(d);mxEvent.addListener(d,"click",a.actions.get("newLibrary").funct);d=document.createElement("div");d.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;";d.className="geTitle";f=document.createElement("span");
f.style.cssText="position:relative;top:6px;";mxUtils.write(f,mxResources.get("openLibrary"));d.appendChild(f);b.appendChild(d);mxEvent.addListener(d,"click",a.actions.get("openLibrary").funct)}else d=c("newLibrary",mxResources.get("newLibrary")),d.style.boxSizing="border-box",d.style.paddingRight="6px",d.style.paddingLeft="6px",d.style.height="32px",d.style.left="0",d=c("openLibraryFrom",mxResources.get("openLibraryFrom")),d.style.borderLeft="1px solid lightgray",d.style.boxSizing="border-box",d.style.paddingRight=
"6px",d.style.paddingLeft="6px",d.style.height="32px",d.style.left="50%";b.appendChild(a.sidebar.container);b.style.overflow="hidden";return b});a.sidebarWindow.window.minimumSize=new mxRectangle(0,0,90,90);a.sidebarWindow.window.setVisible(!0);a.getLocalData("sidebar",function(b){a.sidebar.showEntries(b,null,!0)});a.restoreLibraries()}else a.sidebarWindow.window.setVisible(null!=b?b:!a.sidebarWindow.window.isVisible());a.sidebarWindow.window.isVisible()&&a.sidebarWindow.window.fit()}if("1"==urlParams.lightbox||
-"0"==urlParams.chrome||"undefined"===typeof window.Format||"undefined"===typeof window.Menus)window.uiTheme=null;else{var d=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,k=function(a,b,c,d,e,f,g){var k=document.createElement("div");k.className="geSidebarContainer";k.style.position="absolute";k.style.width="100%";k.style.height="100%";k.style.border="1px solid whiteSmoke";k.style.overflowX="hidden";k.style.overflowY="auto";g(k);this.window=new mxWindow(b,k,c,d,
+"0"==urlParams.chrome||"undefined"===typeof window.Format||"undefined"===typeof window.Menus)window.uiTheme=null;else{var d=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,g=function(a,b,c,d,e,f,g){var k=document.createElement("div");k.className="geSidebarContainer";k.style.position="absolute";k.style.width="100%";k.style.height="100%";k.style.border="1px solid whiteSmoke";k.style.overflowX="hidden";k.style.overflowY="auto";g(k);this.window=new mxWindow(b,k,c,d,
e,f,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.window.setLocation=function(a,b){var c=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight;a=Math.max(0,Math.min(a,(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)-this.table.clientWidth));b=Math.max(0,Math.min(b,c-this.table.clientHeight-("1"==urlParams.sketch?3:48)));
this.getX()==a&&this.getY()==b||mxWindow.prototype.setLocation.apply(this,arguments)};mxClient.IS_SF&&(this.window.div.onselectstart=mxUtils.bind(this,function(b){null==b&&(b=window.event);return null!=b&&a.isSelectionAllowed(b)}))};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="#29b6f2"/>');
@@ -3844,7 +3847,7 @@ document.body.style.backgroundColor=Editor.isDarkMode()?"#2a2a2a":"#ffffff";m.in
(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?"html .geStatusAlertOrange, html .geStatusAlert { margin-top: -2px; }a.geStatus > div { overflow: hidden; text-overflow: ellipsis; max-width: 100%; }":"")};var m=document.createElement("style");m.type="text/css";m.innerHTML=Editor.createMinimalCss();document.getElementsByTagName("head")[0].appendChild(m);Editor.prototype.isChromelessView=function(){return!1};Graph.prototype.isLightboxView=
function(){return!1};var p=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");p.apply(this,arguments)};var c=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){c.apply(this,arguments);this.menus.get("save").setEnabled(null!=this.getCurrentFile()||"1"==urlParams.embed)};var e=
-Menus.prototype.addShortcut;Menus.prototype.addShortcut=function(a,b){null!=b.shortcut&&900>d&&!mxClient.IS_IOS?a.firstChild.nextSibling.setAttribute("title",b.shortcut):e.apply(this,arguments)};var g=App.prototype.updateUserElement;App.prototype.updateUserElement=function(){g.apply(this,arguments);if(null!=this.userElement){var a=this.userElement;a.style.cssText="position:relative;margin-right:4px;cursor:pointer;display:"+a.style.display;a.className="geToolbarButton";a.innerHTML="";a.style.backgroundImage=
+Menus.prototype.addShortcut;Menus.prototype.addShortcut=function(a,b){null!=b.shortcut&&900>d&&!mxClient.IS_IOS?a.firstChild.nextSibling.setAttribute("title",b.shortcut):e.apply(this,arguments)};var k=App.prototype.updateUserElement;App.prototype.updateUserElement=function(){k.apply(this,arguments);if(null!=this.userElement){var a=this.userElement;a.style.cssText="position:relative;margin-right:4px;cursor:pointer;display:"+a.style.display;a.className="geToolbarButton";a.innerHTML="";a.style.backgroundImage=
"url("+Editor.userImage+")";a.style.backgroundPosition="center center";a.style.backgroundRepeat="no-repeat";a.style.backgroundSize="24px 24px";a.style.height="24px";a.style.width="24px";a.style.cssFloat="right";a.setAttribute("title",mxResources.get("changeUser"));"none"!=a.style.display&&(a.style.display="inline-block")}};var n=App.prototype.updateButtonContainer;App.prototype.updateButtonContainer=function(){n.apply(this,arguments);if(null!=this.shareButton){var a=this.shareButton;a.style.cssText=
"display:inline-block;position:relative;box-sizing:border-box;margin-right:4px;cursor:pointer;";a.className="geToolbarButton";a.innerHTML="";a.style.backgroundImage="url("+Editor.shareImage+")";a.style.backgroundPosition="center center";a.style.backgroundRepeat="no-repeat";a.style.backgroundSize="24px 24px";a.style.height="24px";a.style.width="24px";"1"==urlParams.sketch&&(this.shareButton.style.display="none")}null!=this.buttonContainer&&(this.buttonContainer.style.marginTop="-2px",this.buttonContainer.style.paddingTop=
"4px")};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.buttonContainer){var a=document.createElement("div");a.style.display="inline-block";a.style.position="relative";a.style.marginTop="6px";a.style.marginRight="4px";var b=document.createElement("a");b.className="geMenuItem gePrimaryBtn";b.style.marginLeft="8px";b.style.padding="6px";if("1"==urlParams.noSaveBtn){var c="1"==urlParams.publishClose?mxResources.get("publish"):mxResources.get("saveAndExit");mxUtils.write(b,c);b.setAttribute("title",
@@ -3858,7 +3861,7 @@ Menus.prototype.addPopupMenuEditItems=function(a,b,c){u.apply(this,arguments);th
this.actions.layersWindow=null);null!=this.menus.tagsWindow&&(this.menus.tagsWindow.window.setVisible(!1),this.menus.tagsWindow.window.destroy(),this.menus.tagsWindow=null);null!=this.menus.findWindow&&(this.menus.findWindow.window.setVisible(!1),this.menus.findWindow.window.destroy(),this.menus.findWindow=null);null!=this.menus.findReplaceWindow&&(this.menus.findReplaceWindow.window.setVisible(!1),this.menus.findReplaceWindow.window.destroy(),this.menus.findReplaceWindow=null);t.apply(this,arguments)};
var A=EditorUi.prototype.setGraphEnabled;EditorUi.prototype.setGraphEnabled=function(a){A.apply(this,arguments);if(a){var b=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;1E3<=b&&null!=this.sidebarWindow&&"1"!=urlParams.sketch&&this.sidebarWindow.window.setVisible(!0);null!=this.formatWindow&&(1E3<=b||"1"==urlParams.sketch)&&this.formatWindow.window.setVisible(!0)}else null!=this.sidebarWindow&&this.sidebarWindow.window.setVisible(!1),null!=this.formatWindow&&this.formatWindow.window.setVisible(!1)};
EditorUi.prototype.chromelessWindowResize=function(){};var x=Menus.prototype.init;Menus.prototype.init=function(){x.apply(this,arguments);var c=this.editorUi,d=c.editor.graph;c.actions.get("editDiagram").label=mxResources.get("formatXml")+"...";c.actions.get("createShape").label=mxResources.get("shape")+"...";c.actions.get("outline").label=mxResources.get("outline")+"...";c.actions.get("layers").label=mxResources.get("layers")+"...";c.actions.get("forkme").visible="1"!=urlParams.sketch;c.actions.get("downloadDesktop").visible=
-"1"!=urlParams.sketch;var e=c.actions.put("toggleDarkMode",new Action(mxResources.get("dark"),function(){c.setDarkMode(!Editor.darkMode)}));e.setToggleAction(!0);e.setSelectedCallback(function(){return Editor.isDarkMode()});c.actions.put("importCsv",new Action(mxResources.get("csv")+"...",function(){d.popupMenuHandler.hideMenu();c.showImportCsvDialog()}));c.actions.put("importText",new Action(mxResources.get("text")+"...",function(){var a=new ParseDialog(c,"Insert from Text");c.showDialog(a.container,
+"1"!=urlParams.sketch;var e=c.actions.put("toggleDarkMode",new Action(mxResources.get("dark"),function(a){c.setDarkMode(!Editor.darkMode)}));e.setToggleAction(!0);e.setSelectedCallback(function(){return Editor.isDarkMode()});c.actions.put("importCsv",new Action(mxResources.get("csv")+"...",function(){d.popupMenuHandler.hideMenu();c.showImportCsvDialog()}));c.actions.put("importText",new Action(mxResources.get("text")+"...",function(){var a=new ParseDialog(c,"Insert from Text");c.showDialog(a.container,
620,420,!0,!1);a.init()}));c.actions.put("formatSql",new Action(mxResources.get("formatSql")+"...",function(){var a=new ParseDialog(c,"Insert from Text","formatSql");c.showDialog(a.container,620,420,!0,!1);a.init()}));c.actions.put("toggleShapes",new Action(mxResources.get("1"==urlParams.sketch?"moreShapes":"shapes")+"...",function(){b(c)},null,null,Editor.ctrlKey+"+Shift+K"));c.actions.put("toggleFormat",new Action(mxResources.get("format")+"...",function(){a(c)})).shortcut=c.actions.get("formatPanel").shortcut;
EditorUi.enablePlantUml&&!c.isOffline()&&c.actions.put("plantUml",new Action(mxResources.get("plantUml")+"...",function(){var a=new ParseDialog(c,mxResources.get("plantUml")+"...","plantUml");c.showDialog(a.container,620,420,!0,!1);a.init()}));c.actions.put("mermaid",new Action(mxResources.get("mermaid")+"...",function(){var a=new ParseDialog(c,mxResources.get("mermaid")+"...","mermaid");c.showDialog(a.container,620,420,!0,!1);a.init()}));var f=this.addPopupMenuCellEditItems;this.put("editCell",new Menu(mxUtils.bind(this,
function(a,b){var c=this.editorUi.editor.graph,d=c.getSelectionCell();f.call(this,a,d,null,b);this.addMenuItems(a,["editTooltip"],b);c.model.isVertex(d)&&this.addMenuItems(a,["editGeometry"],b);this.addMenuItems(a,["-","edit"],b)})));this.addPopupMenuCellEditItems=function(a,b,c,d){a.addSeparator();this.addSubmenu("editCell",a,d,mxResources.get("edit"))};this.put("diagram",new Menu(mxUtils.bind(this,function(a,b){var d=c.getCurrentFile();"1"!=urlParams.sketch&&(c.menus.addSubmenu("extras",a,b,mxResources.get("preferences")),
@@ -3873,127 +3876,128 @@ b);!c.isOfflineApp()&&isLocalStorage&&c.menus.addMenuItem(a,"plugins",b);a.addSe
d)):(b.apply(this,arguments),c.menus.addSubmenu("table",a,d),a.addSeparator(d));c.menus.addMenuItems(a,["-","toggleShapes"],d)}})();var m="horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "),n=function(a,b,d,e){a.addItem(d,null,mxUtils.bind(this,function(){var a=new CreateGraphDialog(c,d,e);c.showDialog(a.container,620,420,!0,!1);a.init()}),b)};this.put("insertLayout",new Menu(mxUtils.bind(this,function(a,b){for(var c=0;c<m.length;c++)"-"==m[c]?a.addSeparator(b):
n(a,b,mxResources.get(m[c])+"...",m[c])})));this.put("view",new Menu(mxUtils.bind(this,function(a,b){c.menus.addMenuItems(a,"grid guides ruler - connectionArrows connectionPoints -".split(" "),b);if("undefined"!==typeof MathJax){var d=c.menus.addMenuItem(a,"mathematicalTypesetting",b);c.menus.addLinkToItem(d,"https://www.diagrams.net/doc/faq/math-typesetting")}c.menus.addMenuItems(a,["copyConnect","collapseExpand","-"],b);d=c.getCurrentFile();null!=d&&null!=c.fileNode&&(d=null!=d.getTitle()?d.getTitle():
c.defaultFilename,/(\.html)$/i.test(d)||/(\.svg)$/i.test(d)||this.addMenuItems(a,["properties"],b));c.menus.addMenuItems(a,["pageScale"],b);"1"!=urlParams.sketch?c.menus.addMenuItems(a,["-","fullscreen","toggleDarkMode"],b):c.menus.addMenuItems(a,["pageSetup","-","layers"],b)})))};EditorUi.prototype.installFormatToolbar=function(a){var b=this.editor.graph,c=document.createElement("div");c.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%;";
-b.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(d,e){0<b.getSelectionCount()?(a.appendChild(c),c.innerHTML="Selected: "+b.getSelectionCount()):null!=c.parentNode&&c.parentNode.removeChild(c)}))};var G=EditorUi.prototype.init;EditorUi.prototype.init=function(){function c(a,b,c){var d=m.menus.get(a),e=t.addMenu(mxResources.get(a),mxUtils.bind(this,function(){d.funct.apply(this,arguments)}),q);e.className="geMenuItem";e.style.display="inline-block";e.style.boxSizing="border-box";
+b.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(d,e){0<b.getSelectionCount()?(a.appendChild(c),c.innerHTML="Selected: "+b.getSelectionCount()):null!=c.parentNode&&c.parentNode.removeChild(c)}))};var G=EditorUi.prototype.init;EditorUi.prototype.init=function(){function c(a,b,c){var d=m.menus.get(a),e=u.addMenu(mxResources.get(a),mxUtils.bind(this,function(){d.funct.apply(this,arguments)}),q);e.className="geMenuItem";e.style.display="inline-block";e.style.boxSizing="border-box";
e.style.top="6px";e.style.marginRight="6px";e.style.height="30px";e.style.paddingTop="6px";e.style.paddingBottom="6px";e.style.cursor="pointer";e.setAttribute("title",mxResources.get(a));m.menus.menuCreated(d,e,"geMenuItem");null!=c?(e.style.backgroundImage="url("+c+")",e.style.backgroundPosition="center center",e.style.backgroundRepeat="no-repeat",e.style.backgroundSize="24px 24px",e.style.width="34px",e.innerHTML=""):b||(e.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",e.style.backgroundPosition=
"right 6px center",e.style.backgroundRepeat="no-repeat",e.style.paddingRight="22px");return e}function e(a,b,c,d,e,f){var g=document.createElement("a");g.className="geMenuItem";g.style.display="inline-block";g.style.boxSizing="border-box";g.style.height="30px";g.style.padding="6px";g.style.position="relative";g.style.verticalAlign="top";g.style.top="0px";"1"==urlParams.sketch&&(g.style.borderStyle="none",g.style.boxShadow="none",g.style.padding="6px",g.style.margin="0px");null!=m.statusContainer?
p.insertBefore(g,m.statusContainer):p.appendChild(g);null!=f?(g.style.backgroundImage="url("+f+")",g.style.backgroundPosition="center center",g.style.backgroundRepeat="no-repeat",g.style.backgroundSize="24px 24px",g.style.width="34px"):mxUtils.write(g,a);mxEvent.addListener(g,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(a){a.preventDefault()}));mxEvent.addListener(g,"click",function(a){"disabled"!=g.getAttribute("disabled")&&b(a);mxEvent.consume(a)});null==c&&(g.style.marginRight=
"4px");null!=d&&g.setAttribute("title",d);null!=e&&(a=function(){e.isEnabled()?(g.removeAttribute("disabled"),g.style.cursor="pointer"):(g.setAttribute("disabled","disabled"),g.style.cursor="default")},e.addListener("stateChanged",a),n.addListener("enabledChanged",a),a());return g}function f(a,b,c){c=document.createElement("div");c.className="geMenuItem";c.style.display="inline-block";c.style.verticalAlign="top";c.style.marginRight="6px";c.style.padding="0 4px 0 4px";c.style.height="30px";c.style.position=
"relative";c.style.top="0px";"1"==urlParams.sketch&&(c.style.boxShadow="none");for(var d=0;d<a.length;d++)null!=a[d]&&("1"==urlParams.sketch&&(a[d].style.padding="10px 8px",a[d].style.width="30px"),a[d].style.margin="0px",a[d].style.boxShadow="none",c.appendChild(a[d]));null!=b&&mxUtils.setOpacity(c,b);null!=m.statusContainer&&"1"!=urlParams.sketch?p.insertBefore(c,m.statusContainer):p.appendChild(c);return c}function g(){for(var a=p.firstChild;null!=a;){var b=a.nextSibling;"geMenuItem"!=a.className&&
-"geItem"!=a.className||a.parentNode.removeChild(a);a=b}q=p.firstChild;d=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;(a=1E3>d||"1"==urlParams.sketch)||c("diagram");if("1"==urlParams.sketch)aa.style.left=58>Q.offsetTop-Q.offsetHeight/2?"70px":"10px";else if(f([a?c("diagram",null,IMAGE_PATH+"/drawlogo.svg"):null,e(mxResources.get("shapes"),m.actions.get("toggleShapes").funct,null,mxResources.get("shapes"),m.actions.get("image"),a?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTMgMTN2OGg4di04aC04ek0zIDIxaDh2LThIM3Y4ek0zIDN2OGg4VjNIM3ptMTMuNjYtMS4zMUwxMSA3LjM0IDE2LjY2IDEzbDUuNjYtNS42Ni01LjY2LTUuNjV6Ii8+PC9zdmc+":
-null),e(mxResources.get("format"),m.actions.get("toggleFormat").funct,null,mxResources.get("format")+" ("+m.actions.get("formatPanel").shortcut+")",m.actions.get("image"),a?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTIgM2MtNC45NyAwLTkgNC4wMy05IDlzNC4wMyA5IDkgOWMuODMgMCAxLjUtLjY3IDEuNS0xLjUgMC0uMzktLjE1LS43NC0uMzktMS4wMS0uMjMtLjI2LS4zOC0uNjEtLjM4LS45OSAwLS44My42Ny0xLjUgMS41LTEuNUgxNmMyLjc2IDAgNS0yLjI0IDUtNSAwLTQuNDItNC4wMy04LTktOHptLTUuNSA5Yy0uODMgMC0xLjUtLjY3LTEuNS0xLjVTNS42NyA5IDYuNSA5IDggOS42NyA4IDEwLjUgNy4zMyAxMiA2LjUgMTJ6bTMtNEM4LjY3IDggOCA3LjMzIDggNi41UzguNjcgNSA5LjUgNXMxLjUuNjcgMS41IDEuNVMxMC4zMyA4IDkuNSA4em01IDBjLS44MyAwLTEuNS0uNjctMS41LTEuNVMxMy42NyA1IDE0LjUgNXMxLjUuNjcgMS41IDEuNVMxNS4zMyA4IDE0LjUgOHptMyA0Yy0uODMgMC0xLjUtLjY3LTEuNS0xLjVTMTYuNjcgOSAxNy41IDlzMS41LjY3IDEuNSAxLjUtLjY3IDEuNS0xLjUgMS41eiIvPjwvc3ZnPg==":
-null)],a?60:null),b=c("insert",!0,a?L:null),f([b,e(mxResources.get("delete"),m.actions.get("delete").funct,null,mxResources.get("delete"),m.actions.get("delete"),a?ra:null)],a?60:null),411<=d&&(f([qa,va],60),520<=d&&(f([ua,640<=d?e("",P.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +)",P,ta):null,640<=d?e("",X.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",X,da):null],60),720<=d))){var g=e("",R.funct,null,mxResources.get("dark"),R,Editor.isDarkMode()?ba:ka);g.style.opacity=
-"0.4";m.addListener("darkModeChanged",mxUtils.bind(this,function(){g.style.backgroundImage="url("+(Editor.isDarkMode()?ba:ka)+")"}));null!=m.statusContainer&&"1"!=urlParams.sketch?p.insertBefore(g,m.statusContainer):p.appendChild(g)}a=m.menus.get("language");null!=a&&!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&600<=d&&"1"!=urlParams.sketch?(null==wa&&(b=t.addMenu("",a.funct),b.setAttribute("title",mxResources.get("language")),b.className="geToolbarButton",b.style.backgroundImage="url("+Editor.globeImage+
-")",b.style.backgroundPosition="center center",b.style.backgroundRepeat="no-repeat",b.style.backgroundSize="24px 24px",b.style.position="absolute",b.style.height="24px",b.style.width="24px",b.style.zIndex="1",b.style.right="8px",b.style.cursor="pointer",b.style.top="1"==urlParams.embed?"12px":"11px",p.appendChild(b),wa=b),m.buttonContainer.style.paddingRight="34px"):(m.buttonContainer.style.paddingRight="4px",null!=wa&&(wa.parentNode.removeChild(wa),wa=null))}G.apply(this,arguments);this.doSetDarkMode(null!=
-urlParams.dark?1==urlParams.dark:mxSettings.settings.darkMode);var k=document.createElement("div");k.style.cssText="position:absolute;left:0px;right:0px;top:0px;overflow-y:auto;overflow-x:hidden;";k.style.bottom="1"!=urlParams.embed||"1"==urlParams.libraries?"63px":"32px";this.sidebar=this.createSidebar(k);"1"==urlParams.sketch&&(this.toggleScratchpad(),this.editor.graph.isZoomWheelEvent=function(a){return!mxEvent.isShiftDown(a)&&!mxEvent.isMetaDown(a)&&!mxEvent.isAltDown(a)&&(!mxEvent.isControlDown(a)||
-mxClient.IS_MAC)});if("1"!=urlParams.sketch&&1E3<=d||null!=urlParams.clibs||null!=urlParams.libs||null!=urlParams["search-shapes"])b(this,!0),null!=this.sidebar&&null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes&&(this.sidebar.searchShapes(urlParams["search-shapes"]),this.sidebar.showEntries("search"));this.keyHandler.bindAction(75,!0,"toggleShapes",!0);if("1"==urlParams.sketch||1E3<=d)if(a(this,!0),"1"==urlParams.sketch){this.formatWindow.window.setClosable(!1);var l=this.formatWindow.window.toggleMinimized;
-this.formatWindow.window.toggleMinimized=function(){l.apply(this,arguments);this.minimized?(this.div.style.width="90px",this.table.style.width="90px",this.div.style.left=parseInt(this.div.style.left)+150+"px"):(this.div.style.width="240px",this.table.style.width="240px",this.div.style.left=parseInt(this.div.style.left)-150+"px");this.fit()};mxEvent.addListener(this.formatWindow.window.title,"dblclick",mxUtils.bind(this,function(a){mxEvent.getSource(a)==this.formatWindow.window.title&&this.formatWindow.window.toggleMinimized()}));
-this.formatWindow.window.toggleMinimized()}var m=this,n=m.editor.graph;m.toolbar=this.createToolbar(m.createDiv("geToolbar"));m.defaultLibraryName=mxResources.get("untitledLibrary");var p=document.createElement("div");p.className="geMenubarContainer";var q=null,t=new Menubar(m,p);m.statusContainer=m.createStatusContainer();m.statusContainer.style.position="relative";m.statusContainer.style.maxWidth="";m.statusContainer.style.marginTop="7px";m.statusContainer.style.marginLeft="6px";m.statusContainer.style.color=
-"gray";m.statusContainer.style.cursor="default";var u=m.hideCurrentMenu;m.hideCurrentMenu=function(){u.apply(this,arguments);this.editor.graph.popupMenuHandler.hideMenu()};var x=m.descriptorChanged;m.descriptorChanged=function(){x.apply(this,arguments);var a=m.getCurrentFile();if(null!=a&&null!=a.getTitle()){var b=a.getMode();"google"==b?b="googleDrive":"github"==b?b="gitHub":"gitlab"==b?b="gitLab":"onedrive"==b&&(b="oneDrive");b=mxResources.get(b);p.setAttribute("title",a.getTitle()+(null!=b?" ("+
-b+")":""))}else p.removeAttribute("title")};m.setStatusText(m.editor.getStatus());p.appendChild(m.statusContainer);m.buttonContainer=document.createElement("div");m.buttonContainer.style.cssText="position:absolute;right:0px;padding-right:34px;top:10px;white-space:nowrap;padding-top:2px;background-color:inherit;";p.appendChild(m.buttonContainer);m.menubarContainer=m.buttonContainer;m.tabContainer=document.createElement("div");m.tabContainer.className="geTabContainer";m.tabContainer.style.cssText="position:absolute;left:0px;right:0px;bottom:0px;height:30px;white-space:nowrap;margin-bottom:-2px;visibility:hidden;";
-var k=m.diagramContainer.parentNode,A=document.createElement("div");A.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";m.diagramContainer.style.top="1"==urlParams.sketch?"0px":"47px";var J=m.menus.get("viewZoom"),L="1"!=urlParams.sketch?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTkgMTNoLTZ2NmgtMnYtNkg1di0yaDZWNWgydjZoNnYyeiIvPjwvc3ZnPg==":"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGVuYWJsZS1iYWNrZ3JvdW5kPSJuZXcgMCAwIDI0IDI0IiBoZWlnaHQ9IjI0cHgiIHZpZXdCb3g9IjAgMCAyNCAyNCIgd2lkdGg9IjI0cHgiIGZpbGw9IiMwMDAwMDAiPjxnPjxwYXRoIGQ9Ik0wLDBoMjR2MjRIMFYweiIgZmlsbD0ibm9uZSIvPjwvZz48Zz48Zz48cGF0aCBkPSJNMywxMWg4VjNIM1YxMXogTTUsNWg0djRINVY1eiIvPjxwYXRoIGQ9Ik0xMywzdjhoOFYzSDEzeiBNMTksOWgtNFY1aDRWOXoiLz48cGF0aCBkPSJNMywyMWg4di04SDNWMjF6IE01LDE1aDR2NEg1VjE1eiIvPjxwb2x5Z29uIHBvaW50cz0iMTgsMTMgMTYsMTMgMTYsMTYgMTMsMTYgMTMsMTggMTYsMTggMTYsMjEgMTgsMjEgMTgsMTggMjEsMTggMjEsMTYgMTgsMTYiLz48L2c+PC9nPjwvc3ZnPg==",
-W="1"==urlParams.sketch?document.createElement("div"):null,Q="1"==urlParams.sketch?document.createElement("div"):null,aa="1"==urlParams.sketch?document.createElement("div"):null;m.addListener("darkModeChanged",mxUtils.bind(this,function(){null!=this.sidebar&&(this.sidebar.graph.stylesheet.styles=mxUtils.clone(n.stylesheet.styles),this.sidebar.container.innerHTML="",this.sidebar.palettes={},this.sidebar.init(),"1"==urlParams.sketch&&(this.scratchpad=null,this.toggleScratchpad()));n.refresh();n.refreshBackgroundImage();
+"geItem"!=a.className||a.parentNode.removeChild(a);a=b}q=p.firstChild;d=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;var a=1E3>d||"1"==urlParams.sketch,g=null;a||(g=c("diagram"));if("1"==urlParams.sketch)Z.style.left=58>Q.offsetTop-Q.offsetHeight/2?"70px":"10px";else if(b=a?c("diagram",null,IMAGE_PATH+"/drawlogo.svg"):null,null!=b&&(g=b),f([g,e(mxResources.get("shapes"),m.actions.get("toggleShapes").funct,null,mxResources.get("shapes"),m.actions.get("image"),
+a?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTMgMTN2OGg4di04aC04ek0zIDIxaDh2LThIM3Y4ek0zIDN2OGg4VjNIM3ptMTMuNjYtMS4zMUwxMSA3LjM0IDE2LjY2IDEzbDUuNjYtNS42Ni01LjY2LTUuNjV6Ii8+PC9zdmc+":null),e(mxResources.get("format"),m.actions.get("toggleFormat").funct,null,mxResources.get("format")+" ("+m.actions.get("formatPanel").shortcut+")",m.actions.get("image"),a?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTIgM2MtNC45NyAwLTkgNC4wMy05IDlzNC4wMyA5IDkgOWMuODMgMCAxLjUtLjY3IDEuNS0xLjUgMC0uMzktLjE1LS43NC0uMzktMS4wMS0uMjMtLjI2LS4zOC0uNjEtLjM4LS45OSAwLS44My42Ny0xLjUgMS41LTEuNUgxNmMyLjc2IDAgNS0yLjI0IDUtNSAwLTQuNDItNC4wMy04LTktOHptLTUuNSA5Yy0uODMgMC0xLjUtLjY3LTEuNS0xLjVTNS42NyA5IDYuNSA5IDggOS42NyA4IDEwLjUgNy4zMyAxMiA2LjUgMTJ6bTMtNEM4LjY3IDggOCA3LjMzIDggNi41UzguNjcgNSA5LjUgNXMxLjUuNjcgMS41IDEuNVMxMC4zMyA4IDkuNSA4em01IDBjLS44MyAwLTEuNS0uNjctMS41LTEuNVMxMy42NyA1IDE0LjUgNXMxLjUuNjcgMS41IDEuNVMxNS4zMyA4IDE0LjUgOHptMyA0Yy0uODMgMC0xLjUtLjY3LTEuNS0xLjVTMTYuNjcgOSAxNy41IDlzMS41LjY3IDEuNSAxLjUtLjY3IDEuNS0xLjUgMS41eiIvPjwvc3ZnPg==":
+null)],a?60:null),b=c("insert",!0,a?L:null),f([b,e(mxResources.get("delete"),m.actions.get("delete").funct,null,mxResources.get("delete"),m.actions.get("delete"),a?ra:null)],a?60:null),411<=d&&(f([qa,ya],60),520<=d&&(f([ua,640<=d?e("",P.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +)",P,ta):null,640<=d?e("",X.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",X,ca):null],60),720<=d))){var k=e("",R.funct,null,mxResources.get("dark"),R,Editor.isDarkMode()?aa:ka);k.style.opacity=
+"0.4";m.addListener("darkModeChanged",mxUtils.bind(this,function(){k.style.backgroundImage="url("+(Editor.isDarkMode()?aa:ka)+")"}));null!=m.statusContainer&&"1"!=urlParams.sketch?p.insertBefore(k,m.statusContainer):p.appendChild(k)}null!=g&&(mxEvent.disableContextMenu(g),mxEvent.addGestureListeners(g,mxUtils.bind(this,function(a){(mxEvent.isShiftDown(a)||mxEvent.isAltDown(a)||mxEvent.isMetaDown(a)||mxEvent.isControlDown(a)||mxEvent.isPopupTrigger(a))&&m.appIconClicked(a)}),null,null));b=m.menus.get("language");
+null!=b&&!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&600<=d&&"1"!=urlParams.sketch?(null==va&&(b=u.addMenu("",b.funct),b.setAttribute("title",mxResources.get("language")),b.className="geToolbarButton",b.style.backgroundImage="url("+Editor.globeImage+")",b.style.backgroundPosition="center center",b.style.backgroundRepeat="no-repeat",b.style.backgroundSize="24px 24px",b.style.position="absolute",b.style.height="24px",b.style.width="24px",b.style.zIndex="1",b.style.right="8px",b.style.cursor="pointer",
+b.style.top="1"==urlParams.embed?"12px":"11px",p.appendChild(b),va=b),m.buttonContainer.style.paddingRight="34px"):(m.buttonContainer.style.paddingRight="4px",null!=va&&(va.parentNode.removeChild(va),va=null))}G.apply(this,arguments);this.doSetDarkMode(null!=urlParams.dark?1==urlParams.dark:mxSettings.settings.darkMode);var k=document.createElement("div");k.style.cssText="position:absolute;left:0px;right:0px;top:0px;overflow-y:auto;overflow-x:hidden;";k.style.bottom="1"!=urlParams.embed||"1"==urlParams.libraries?
+"63px":"32px";this.sidebar=this.createSidebar(k);"1"==urlParams.sketch&&(this.toggleScratchpad(),this.editor.graph.isZoomWheelEvent=function(a){return!mxEvent.isShiftDown(a)&&!mxEvent.isMetaDown(a)&&!mxEvent.isAltDown(a)&&(!mxEvent.isControlDown(a)||mxClient.IS_MAC)});if("1"!=urlParams.sketch&&1E3<=d||null!=urlParams.clibs||null!=urlParams.libs||null!=urlParams["search-shapes"])b(this,!0),null!=this.sidebar&&null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes&&(this.sidebar.searchShapes(urlParams["search-shapes"]),
+this.sidebar.showEntries("search"));this.keyHandler.bindAction(75,!0,"toggleShapes",!0);if("1"==urlParams.sketch||1E3<=d)if(a(this,!0),"1"==urlParams.sketch){this.formatWindow.window.setClosable(!1);var l=this.formatWindow.window.toggleMinimized;this.formatWindow.window.toggleMinimized=function(){l.apply(this,arguments);this.minimized?(this.div.style.width="90px",this.table.style.width="90px",this.div.style.left=parseInt(this.div.style.left)+150+"px"):(this.div.style.width="240px",this.table.style.width=
+"240px",this.div.style.left=parseInt(this.div.style.left)-150+"px");this.fit()};mxEvent.addListener(this.formatWindow.window.title,"dblclick",mxUtils.bind(this,function(a){mxEvent.getSource(a)==this.formatWindow.window.title&&this.formatWindow.window.toggleMinimized()}));this.formatWindow.window.toggleMinimized()}var m=this,n=m.editor.graph;m.toolbar=this.createToolbar(m.createDiv("geToolbar"));m.defaultLibraryName=mxResources.get("untitledLibrary");var p=document.createElement("div");p.className=
+"geMenubarContainer";var q=null,u=new Menubar(m,p);m.statusContainer=m.createStatusContainer();m.statusContainer.style.position="relative";m.statusContainer.style.maxWidth="";m.statusContainer.style.marginTop="7px";m.statusContainer.style.marginLeft="6px";m.statusContainer.style.color="gray";m.statusContainer.style.cursor="default";var t=m.hideCurrentMenu;m.hideCurrentMenu=function(){t.apply(this,arguments);this.editor.graph.popupMenuHandler.hideMenu()};var x=m.descriptorChanged;m.descriptorChanged=
+function(){x.apply(this,arguments);var a=m.getCurrentFile();if(null!=a&&null!=a.getTitle()){var b=a.getMode();"google"==b?b="googleDrive":"github"==b?b="gitHub":"gitlab"==b?b="gitLab":"onedrive"==b&&(b="oneDrive");b=mxResources.get(b);p.setAttribute("title",a.getTitle()+(null!=b?" ("+b+")":""))}else p.removeAttribute("title")};m.setStatusText(m.editor.getStatus());p.appendChild(m.statusContainer);m.buttonContainer=document.createElement("div");m.buttonContainer.style.cssText="position:absolute;right:0px;padding-right:34px;top:10px;white-space:nowrap;padding-top:2px;background-color:inherit;";
+p.appendChild(m.buttonContainer);m.menubarContainer=m.buttonContainer;m.tabContainer=document.createElement("div");m.tabContainer.className="geTabContainer";m.tabContainer.style.cssText="position:absolute;left:0px;right:0px;bottom:0px;height:30px;white-space:nowrap;margin-bottom:-2px;visibility:hidden;";var k=m.diagramContainer.parentNode,A=document.createElement("div");A.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";m.diagramContainer.style.top="1"==urlParams.sketch?
+"0px":"47px";var J=m.menus.get("viewZoom"),L="1"!=urlParams.sketch?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTkgMTNoLTZ2NmgtMnYtNkg1di0yaDZWNWgydjZoNnYyeiIvPjwvc3ZnPg==":"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGVuYWJsZS1iYWNrZ3JvdW5kPSJuZXcgMCAwIDI0IDI0IiBoZWlnaHQ9IjI0cHgiIHZpZXdCb3g9IjAgMCAyNCAyNCIgd2lkdGg9IjI0cHgiIGZpbGw9IiMwMDAwMDAiPjxnPjxwYXRoIGQ9Ik0wLDBoMjR2MjRIMFYweiIgZmlsbD0ibm9uZSIvPjwvZz48Zz48Zz48cGF0aCBkPSJNMywxMWg4VjNIM1YxMXogTTUsNWg0djRINVY1eiIvPjxwYXRoIGQ9Ik0xMywzdjhoOFYzSDEzeiBNMTksOWgtNFY1aDRWOXoiLz48cGF0aCBkPSJNMywyMWg4di04SDNWMjF6IE01LDE1aDR2NEg1VjE1eiIvPjxwb2x5Z29uIHBvaW50cz0iMTgsMTMgMTYsMTMgMTYsMTYgMTMsMTYgMTMsMTggMTYsMTggMTYsMjEgMTgsMjEgMTgsMTggMjEsMTggMjEsMTYgMTgsMTYiLz48L2c+PC9nPjwvc3ZnPg==",
+W="1"==urlParams.sketch?document.createElement("div"):null,Q="1"==urlParams.sketch?document.createElement("div"):null,Z="1"==urlParams.sketch?document.createElement("div"):null;m.addListener("darkModeChanged",mxUtils.bind(this,function(){null!=this.sidebar&&(this.sidebar.graph.stylesheet.styles=mxUtils.clone(n.stylesheet.styles),this.sidebar.container.innerHTML="",this.sidebar.palettes={},this.sidebar.init(),"1"==urlParams.sketch&&(this.scratchpad=null,this.toggleScratchpad()));n.refresh();n.refreshBackgroundImage();
n.view.validateBackground()}));Graph.touchStyle&&(n.panningHandler.isPanningTrigger=function(a){var b=a.getEvent();return null==a.getState()&&!mxEvent.isMouseEvent(b)&&!n.freehand.isDrawing()||mxEvent.isPopupTrigger(b)&&(null==a.getState()||mxEvent.isControlDown(b)||mxEvent.isShiftDown(b))});if(null!=m.hoverIcons){var na=m.hoverIcons.update;m.hoverIcons.update=function(){n.freehand.isDrawing()||na.apply(this,arguments)}}if(null!=n.freehand){var ga=n.freehand.createStyle;n.freehand.createStyle=function(a){return ga.apply(this,
-arguments)+"sketch=0;"}}if("1"==urlParams.sketch){Q.className="geToolbarContainer";W.className="geToolbarContainer";aa.className="geToolbarContainer";p.className="geToolbarContainer";m.picker=Q;var ea=!1;mxEvent.addListener(p,"mouseenter",function(){m.statusContainer.style.display="inline-block"});mxEvent.addListener(p,"mouseleave",function(){ea||(m.statusContainer.style.display="none")});var la=mxUtils.bind(this,function(a){null!=m.notificationBtn&&(null!=a?m.notificationBtn.setAttribute("title",
+arguments)+"sketch=0;"}}if("1"==urlParams.sketch){Q.className="geToolbarContainer";W.className="geToolbarContainer";Z.className="geToolbarContainer";p.className="geToolbarContainer";m.picker=Q;var da=!1;mxEvent.addListener(p,"mouseenter",function(){m.statusContainer.style.display="inline-block"});mxEvent.addListener(p,"mouseleave",function(){da||(m.statusContainer.style.display="none")});var la=mxUtils.bind(this,function(a){null!=m.notificationBtn&&(null!=a?m.notificationBtn.setAttribute("title",
a):m.notificationBtn.removeAttribute("title"))});"1"!=urlParams.embed&&m.editor.addListener("statusChanged",mxUtils.bind(this,function(){m.setStatusText(m.editor.getStatus());if(0==m.statusContainer.children.length||1==m.statusContainer.children.length&&null==m.statusContainer.firstChild.getAttribute("class")){null!=m.statusContainer.firstChild?la(m.statusContainer.firstChild.getAttribute("title")):la(m.editor.getStatus());var a=m.getCurrentFile(),a=null!=a?a.savingStatusKey:DrawioFile.prototype.savingStatusKey;
-null!=m.notificationBtn&&m.notificationBtn.getAttribute("title")==mxResources.get(a)+"..."?(m.statusContainer.innerHTML='<img title="'+mxUtils.htmlEntities(mxResources.get(a))+'..."src="'+IMAGE_PATH+'/spin.gif">',m.statusContainer.style.display="inline-block",ea=!0):(m.statusContainer.style.display="none",ea=!1)}else m.statusContainer.style.display="inline-block",la(null),ea=!0}));S=c("diagram",null,IMAGE_PATH+"/drawlogo.svg");S.style.boxShadow="none";S.style.opacity="0.4";S.style.padding="6px";S.style.margin=
-"0px";aa.appendChild(S);m.statusContainer.style.position="";m.statusContainer.style.display="none";m.statusContainer.style.margin="0px";m.statusContainer.style.padding="6px 0px";m.statusContainer.style.maxWidth=Math.min(d-240,280)+"px";m.statusContainer.style.display="inline-block";m.statusContainer.style.textOverflow="ellipsis";m.buttonContainer.style.position="";m.buttonContainer.style.paddingRight="0px";m.buttonContainer.style.display="inline-block";var V=document.createElement("a");V.style.padding=
-"0px";V.style.boxShadow="none";V.className="geMenuItem";V.style.display="inline-block";V.style.width="40px";V.style.height="12px";V.style.marginBottom="-2px";V.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")";V.style.backgroundPosition="top center";V.style.backgroundRepeat="no-repeat";V.setAttribute("title","Minimize");var ca=!1,ma=mxUtils.bind(this,function(){Q.innerHTML="";if(!ca){var a=function(a,c,d){a=e("",a.funct,null,c,a,d);a.style.width="40px";return b(a,null,"pointer")},
-b=function(a,b,c){null!=b&&a.setAttribute("title",b);a.style.cursor=null!=c?c:"default";a.style.margin="2px 0px";Q.appendChild(a);mxUtils.br(Q);return a};b(m.sidebar.createVertexTemplate("text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;",40,20,"Text",mxResources.get("text"),!0,!0,null,!0),mxResources.get("text")+" ("+Editor.ctrlKey+"+Shift+X)");b(m.sidebar.createVertexTemplate("shape=note;whiteSpace=wrap;html=1;backgroundOutline=1;fontColor=#000000;darkOpacity=0.05;fillColor=#FFF9B2;strokeColor=none;fillStyle=solid;direction=west;gradientDirection=north;gradientColor=#FFF2A1;shadow=1;size=20;fontSize=24;pointerEvents=1;"+
-("0"!=urlParams.rough?"sketch=1;jiggle=2;":""),140,160,"",mxResources.get("note"),!0,!0,null,!0),mxResources.get("note"));b(m.sidebar.createVertexTemplate("rounded=0;whiteSpace=wrap;html=1;",160,80,"",mxResources.get("rectangle"),!0,!0,null,!0),mxResources.get("rectangle")+" ("+Editor.ctrlKey+"+K)");b(m.sidebar.createVertexTemplate("ellipse;whiteSpace=wrap;html=1;",160,100,"",mxResources.get("ellipse"),!0,!0,null,!0),mxResources.get("ellipse"));(function(){var a=new mxCell("",new mxGeometry(0,0,n.defaultEdgeLength,
-0),"edgeStyle=none;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;endArrow=open;sourcePerimeterSpacing=8;targetPerimeterSpacing=8;fontSize=16;"+("0"!=urlParams.rough?"sketch=1;":""));a.geometry.setTerminalPoint(new mxPoint(0,0),!0);a.geometry.setTerminalPoint(new mxPoint(a.geometry.width,0),!1);a.geometry.points=[];a.geometry.relative=!0;a.edge=!0;b(m.sidebar.createEdgeTemplateFromCells([a],a.geometry.width,a.geometry.height,mxResources.get("line"),!1,null,!0),mxResources.get("line"));
-a=a.clone();a.style+="shape=flexArrow;rounded=1;startSize=8;endSize=8;";a.geometry.width=n.defaultEdgeLength+20;a.geometry.setTerminalPoint(new mxPoint(0,20),!0);a.geometry.setTerminalPoint(new mxPoint(a.geometry.width,20),!1);a=b(m.sidebar.createEdgeTemplateFromCells([a],a.geometry.width,40,mxResources.get("arrow"),!1,null,!0),mxResources.get("arrow"));a.style.borderBottom="1px solid lightgray";a.style.paddingBottom="14px";a.style.marginBottom="14px"})();a(m.actions.get("insertFreehand"),mxResources.get("freehand"),
-"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMjRweCIgZmlsbD0iIzAwMDAwMCI+PHJlY3QgZmlsbD0ibm9uZSIgaGVpZ2h0PSIyNCIgd2lkdGg9IjI0Ii8+PHBhdGggZD0iTTQuNSw4YzEuMDQsMCwyLjM0LTEuNSw0LjI1LTEuNWMxLjUyLDAsMi43NSwxLjIzLDIuNzUsMi43NWMwLDIuMDQtMS45OSwzLjE1LTMuOTEsNC4yMkM1LjQyLDE0LjY3LDQsMTUuNTcsNCwxNyBjMCwxLjEsMC45LDIsMiwydjJjLTIuMjEsMC00LTEuNzktNC00YzAtMi43MSwyLjU2LTQuMTQsNC42Mi01LjI4YzEuNDItMC43OSwyLjg4LTEuNiwyLjg4LTIuNDdjMC0wLjQxLTAuMzQtMC43NS0wLjc1LTAuNzUgQzcuNSw4LjUsNi4yNSwxMCw0LjUsMTBDMy4xMiwxMCwyLDguODgsMiw3LjVDMiw1LjQ1LDQuMTcsMi44Myw1LDJsMS40MSwxLjQxQzUuNDEsNC40Miw0LDYuNDMsNCw3LjVDNCw3Ljc4LDQuMjIsOCw0LjUsOHogTTgsMjEgbDMuNzUsMGw4LjA2LTguMDZsLTMuNzUtMy43NUw4LDE3LjI1TDgsMjF6IE0xMCwxOC4wOGw2LjA2LTYuMDZsMC45MiwwLjkyTDEwLjkyLDE5TDEwLDE5TDEwLDE4LjA4eiBNMjAuMzcsNi4yOSBjLTAuMzktMC4zOS0xLjAyLTAuMzktMS40MSwwbC0xLjgzLDEuODNsMy43NSwzLjc1bDEuODMtMS44M2MwLjM5LTAuMzksMC4zOS0xLjAyLDAtMS40MUwyMC4zNyw2LjI5eiIvPjwvc3ZnPg==");
+null!=m.notificationBtn&&m.notificationBtn.getAttribute("title")==mxResources.get(a)+"..."?(m.statusContainer.innerHTML='<img title="'+mxUtils.htmlEntities(mxResources.get(a))+'..."src="'+IMAGE_PATH+'/spin.gif">',m.statusContainer.style.display="inline-block",da=!0):(m.statusContainer.style.display="none",da=!1)}else m.statusContainer.style.display="inline-block",la(null),da=!0}));S=c("diagram",null,IMAGE_PATH+"/drawlogo.svg");S.style.boxShadow="none";S.style.opacity="0.4";S.style.padding="6px";S.style.margin=
+"0px";Z.appendChild(S);mxEvent.disableContextMenu(S);mxEvent.addGestureListeners(S,mxUtils.bind(this,function(a){(mxEvent.isShiftDown(a)||mxEvent.isAltDown(a)||mxEvent.isMetaDown(a)||mxEvent.isControlDown(a)||mxEvent.isPopupTrigger(a))&&this.appIconClicked(a)}),null,null);m.statusContainer.style.position="";m.statusContainer.style.display="none";m.statusContainer.style.margin="0px";m.statusContainer.style.padding="6px 0px";m.statusContainer.style.maxWidth=Math.min(d-240,280)+"px";m.statusContainer.style.display=
+"inline-block";m.statusContainer.style.textOverflow="ellipsis";m.buttonContainer.style.position="";m.buttonContainer.style.paddingRight="0px";m.buttonContainer.style.display="inline-block";var V=document.createElement("a");V.style.padding="0px";V.style.boxShadow="none";V.className="geMenuItem";V.style.display="inline-block";V.style.width="40px";V.style.height="12px";V.style.marginBottom="-2px";V.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")";V.style.backgroundPosition="top center";
+V.style.backgroundRepeat="no-repeat";V.setAttribute("title","Minimize");var ba=!1,ma=mxUtils.bind(this,function(){Q.innerHTML="";if(!ba){var a=function(a,c,d){a=e("",a.funct,null,c,a,d);a.style.width="40px";return b(a,null,"pointer")},b=function(a,b,c){null!=b&&a.setAttribute("title",b);a.style.cursor=null!=c?c:"default";a.style.margin="2px 0px";Q.appendChild(a);mxUtils.br(Q);return a};b(m.sidebar.createVertexTemplate("text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;",
+40,20,"Text",mxResources.get("text"),!0,!0,null,!0),mxResources.get("text")+" ("+Editor.ctrlKey+"+Shift+X)");b(m.sidebar.createVertexTemplate("shape=note;whiteSpace=wrap;html=1;backgroundOutline=1;fontColor=#000000;darkOpacity=0.05;fillColor=#FFF9B2;strokeColor=none;fillStyle=solid;direction=west;gradientDirection=north;gradientColor=#FFF2A1;shadow=1;size=20;fontSize=24;pointerEvents=1;"+("0"!=urlParams.rough?"sketch=1;jiggle=2;":""),140,160,"",mxResources.get("note"),!0,!0,null,!0),mxResources.get("note"));
+b(m.sidebar.createVertexTemplate("rounded=0;whiteSpace=wrap;html=1;",160,80,"",mxResources.get("rectangle"),!0,!0,null,!0),mxResources.get("rectangle")+" ("+Editor.ctrlKey+"+K)");b(m.sidebar.createVertexTemplate("ellipse;whiteSpace=wrap;html=1;",160,100,"",mxResources.get("ellipse"),!0,!0,null,!0),mxResources.get("ellipse"));(function(){var a=new mxCell("",new mxGeometry(0,0,n.defaultEdgeLength,0),"edgeStyle=none;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;endArrow=open;sourcePerimeterSpacing=8;targetPerimeterSpacing=8;fontSize=16;"+
+("0"!=urlParams.rough?"sketch=1;":""));a.geometry.setTerminalPoint(new mxPoint(0,0),!0);a.geometry.setTerminalPoint(new mxPoint(a.geometry.width,0),!1);a.geometry.points=[];a.geometry.relative=!0;a.edge=!0;b(m.sidebar.createEdgeTemplateFromCells([a],a.geometry.width,a.geometry.height,mxResources.get("line"),!1,null,!0),mxResources.get("line"));a=a.clone();a.style+="shape=flexArrow;rounded=1;startSize=8;endSize=8;";a.geometry.width=n.defaultEdgeLength+20;a.geometry.setTerminalPoint(new mxPoint(0,20),
+!0);a.geometry.setTerminalPoint(new mxPoint(a.geometry.width,20),!1);a=b(m.sidebar.createEdgeTemplateFromCells([a],a.geometry.width,40,mxResources.get("arrow"),!1,null,!0),mxResources.get("arrow"));a.style.borderBottom="1px solid "+(Editor.isDarkMode()?"#505050":"lightgray");a.style.paddingBottom="14px";a.style.marginBottom="14px"})();a(m.actions.get("insertFreehand"),mxResources.get("freehand"),"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMjRweCIgZmlsbD0iIzAwMDAwMCI+PHJlY3QgZmlsbD0ibm9uZSIgaGVpZ2h0PSIyNCIgd2lkdGg9IjI0Ii8+PHBhdGggZD0iTTQuNSw4YzEuMDQsMCwyLjM0LTEuNSw0LjI1LTEuNWMxLjUyLDAsMi43NSwxLjIzLDIuNzUsMi43NWMwLDIuMDQtMS45OSwzLjE1LTMuOTEsNC4yMkM1LjQyLDE0LjY3LDQsMTUuNTcsNCwxNyBjMCwxLjEsMC45LDIsMiwydjJjLTIuMjEsMC00LTEuNzktNC00YzAtMi43MSwyLjU2LTQuMTQsNC42Mi01LjI4YzEuNDItMC43OSwyLjg4LTEuNiwyLjg4LTIuNDdjMC0wLjQxLTAuMzQtMC43NS0wLjc1LTAuNzUgQzcuNSw4LjUsNi4yNSwxMCw0LjUsMTBDMy4xMiwxMCwyLDguODgsMiw3LjVDMiw1LjQ1LDQuMTcsMi44Myw1LDJsMS40MSwxLjQxQzUuNDEsNC40Miw0LDYuNDMsNCw3LjVDNCw3Ljc4LDQuMjIsOCw0LjUsOHogTTgsMjEgbDMuNzUsMGw4LjA2LTguMDZsLTMuNzUtMy43NUw4LDE3LjI1TDgsMjF6IE0xMCwxOC4wOGw2LjA2LTYuMDZsMC45MiwwLjkyTDEwLjkyLDE5TDEwLDE5TDEwLDE4LjA4eiBNMjAuMzcsNi4yOSBjLTAuMzktMC4zOS0xLjAyLTAuMzktMS40MSwwbC0xLjgzLDEuODNsMy43NSwzLjc1bDEuODMtMS44M2MwLjM5LTAuMzksMC4zOS0xLjAyLDAtMS40MUwyMC4zNyw2LjI5eiIvPjwvc3ZnPg==");
var c=m.actions.get("toggleShapes");a(c,mxResources.get("shapes")+" ("+c.shortcut+")",L);a(m.actions.get("insertTemplate"),mxResources.get("template"),"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMjRweCIgZmlsbD0iIzAwMDAwMCI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTEzIDExaC0ydjNIOHYyaDN2M2gydi0zaDN2LTJoLTN6bTEtOUg2Yy0xLjEgMC0yIC45LTIgMnYxNmMwIDEuMS44OSAyIDEuOTkgMkgxOGMxLjEgMCAyLS45IDItMlY4bC02LTZ6bTQgMThINlY0aDd2NWg1djExeiIvPjwvc3ZnPg==")}Q.appendChild(V)});
-mxEvent.addListener(V,"click",mxUtils.bind(this,function(){ca?(mxUtils.setPrefixedStyle(Q.style,"transform","translate(0, -50%)"),Q.style.padding="8px 6px 4px",Q.style.top="50%",Q.style.bottom="",Q.style.height="",V.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",V.style.width="40px",V.style.height="12px",V.setAttribute("title","Minimize"),ca=!1,ma()):(Q.innerHTML="",Q.appendChild(V),mxUtils.setPrefixedStyle(Q.style,"transform","translate(0, 0)"),Q.style.top="",Q.style.bottom="12px",
-Q.style.padding="0px",Q.style.height="24px",V.style.height="24px",V.style.backgroundImage="url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTkgMTNoLTZ2NmgtMnYtNkg1di0yaDZWNWgydjZoNnYyeiIvPjwvc3ZnPg==)",V.setAttribute("title",mxResources.get("insert")),V.style.width="24px",ca=!0)}));ma();m.addListener("darkModeChanged",mxUtils.bind(this,function(){ma()}))}else m.editor.addListener("statusChanged",
+mxEvent.addListener(V,"click",mxUtils.bind(this,function(){ba?(mxUtils.setPrefixedStyle(Q.style,"transform","translate(0, -50%)"),Q.style.padding="8px 6px 4px",Q.style.top="50%",Q.style.bottom="",Q.style.height="",V.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",V.style.width="40px",V.style.height="12px",V.setAttribute("title","Minimize"),ba=!1,ma()):(Q.innerHTML="",Q.appendChild(V),mxUtils.setPrefixedStyle(Q.style,"transform","translate(0, 0)"),Q.style.top="",Q.style.bottom="12px",
+Q.style.padding="0px",Q.style.height="24px",V.style.height="24px",V.style.backgroundImage="url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTkgMTNoLTZ2NmgtMnYtNkg1di0yaDZWNWgydjZoNnYyeiIvPjwvc3ZnPg==)",V.setAttribute("title",mxResources.get("insert")),V.style.width="24px",ba=!0)}));ma();m.addListener("darkModeChanged",mxUtils.bind(this,function(){ma()}))}else m.editor.addListener("statusChanged",
mxUtils.bind(this,function(){m.setStatusText(m.editor.getStatus())}));if(null!=J){var T=function(a){n.popupMenuHandler.hideMenu();mxEvent.isAltDown(a)?m.actions.get("customZoom").funct():m.actions.get("smartFit").funct()},P=m.actions.get("zoomIn"),ta="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTUuNSAxNGgtLjc5bC0uMjgtLjI3QzE1LjQxIDEyLjU5IDE2IDExLjExIDE2IDkuNSAxNiA1LjkxIDEzLjA5IDMgOS41IDNTMyA1LjkxIDMgOS41IDUuOTEgMTYgOS41IDE2YzEuNjEgMCAzLjA5LS41OSA0LjIzLTEuNTdsLjI3LjI4di43OWw1IDQuOTlMMjAuNDkgMTlsLTQuOTktNXptLTYgMEM3LjAxIDE0IDUgMTEuOTkgNSA5LjVTNy4wMSA1IDkuNSA1IDE0IDcuMDEgMTQgOS41IDExLjk5IDE0IDkuNSAxNHptMi41LTRoLTJ2Mkg5di0ySDdWOWgyVjdoMXYyaDJ2MXoiLz48L3N2Zz4=",
-X=m.actions.get("zoomOut"),da="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTUuNSAxNGgtLjc5bC0uMjgtLjI3QzE1LjQxIDEyLjU5IDE2IDExLjExIDE2IDkuNSAxNiA1LjkxIDEzLjA5IDMgOS41IDNTMyA1LjkxIDMgOS41IDUuOTEgMTYgOS41IDE2YzEuNjEgMCAzLjA5LS41OSA0LjIzLTEuNTdsLjI3LjI4di43OWw1IDQuOTlMMjAuNDkgMTlsLTQuOTktNXptLTYgMEM3LjAxIDE0IDUgMTEuOTkgNSA5LjVTNy4wMSA1IDkuNSA1IDE0IDcuMDEgMTQgOS41IDExLjk5IDE0IDkuNSAxNHpNNyA5aDV2MUg3eiIvPjwvc3ZnPg==",
+X=m.actions.get("zoomOut"),ca="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTUuNSAxNGgtLjc5bC0uMjgtLjI3QzE1LjQxIDEyLjU5IDE2IDExLjExIDE2IDkuNSAxNiA1LjkxIDEzLjA5IDMgOS41IDNTMyA1LjkxIDMgOS41IDUuOTEgMTYgOS41IDE2YzEuNjEgMCAzLjA5LS41OSA0LjIzLTEuNTdsLjI3LjI4di43OWw1IDQuOTlMMjAuNDkgMTlsLTQuOTktNXptLTYgMEM3LjAxIDE0IDUgMTEuOTkgNSA5LjVTNy4wMSA1IDkuNSA1IDE0IDcuMDEgMTQgOS41IDExLjk5IDE0IDkuNSAxNHpNNyA5aDV2MUg3eiIvPjwvc3ZnPg==",
ia=m.actions.get("resetView"),pa=m.actions.get("fullscreen"),R=m.actions.get("toggleDarkMode"),ka="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGVuYWJsZS1iYWNrZ3JvdW5kPSJuZXcgMCAwIDI0IDI0IiBoZWlnaHQ9IjI0cHgiIHZpZXdCb3g9IjAgMCAyNCAyNCIgd2lkdGg9IjI0cHgiIGZpbGw9IiMwMDAwMDAiPjxyZWN0IGZpbGw9Im5vbmUiIGhlaWdodD0iMjQiIHdpZHRoPSIyNCIvPjxwYXRoIGQ9Ik05LjM3LDUuNTFDOS4xOSw2LjE1LDkuMSw2LjgyLDkuMSw3LjVjMCw0LjA4LDMuMzIsNy40LDcuNCw3LjRjMC42OCwwLDEuMzUtMC4wOSwxLjk5LTAuMjdDMTcuNDUsMTcuMTksMTQuOTMsMTksMTIsMTkgYy0zLjg2LDAtNy0zLjE0LTctN0M1LDkuMDcsNi44MSw2LjU1LDkuMzcsNS41MXogTTEyLDNjLTQuOTcsMC05LDQuMDMtOSw5czQuMDMsOSw5LDlzOS00LjAzLDktOWMwLTAuNDYtMC4wNC0wLjkyLTAuMS0xLjM2IGMtMC45OCwxLjM3LTIuNTgsMi4yNi00LjQsMi4yNmMtMi45OCwwLTUuNC0yLjQyLTUuNC01LjRjMC0xLjgxLDAuODktMy40MiwyLjI2LTQuNEMxMi45MiwzLjA0LDEyLjQ2LDMsMTIsM0wxMiwzeiIvPjwvc3ZnPg==",
-ba="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGVuYWJsZS1iYWNrZ3JvdW5kPSJuZXcgMCAwIDI0IDI0IiBoZWlnaHQ9IjI0cHgiIHZpZXdCb3g9IjAgMCAyNCAyNCIgd2lkdGg9IjI0cHgiIGZpbGw9IiMwMDAwMDAiPjxyZWN0IGZpbGw9Im5vbmUiIGhlaWdodD0iMjQiIHdpZHRoPSIyNCIvPjxwYXRoIGQ9Ik0xMiw5YzEuNjUsMCwzLDEuMzUsMywzcy0xLjM1LDMtMywzcy0zLTEuMzUtMy0zUzEwLjM1LDksMTIsOSBNMTIsN2MtMi43NiwwLTUsMi4yNC01LDVzMi4yNCw1LDUsNXM1LTIuMjQsNS01IFMxNC43Niw3LDEyLDdMMTIsN3ogTTIsMTNsMiwwYzAuNTUsMCwxLTAuNDUsMS0xcy0wLjQ1LTEtMS0xbC0yLDBjLTAuNTUsMC0xLDAuNDUtMSwxUzEuNDUsMTMsMiwxM3ogTTIwLDEzbDIsMGMwLjU1LDAsMS0wLjQ1LDEtMSBzLTAuNDUtMS0xLTFsLTIsMGMtMC41NSwwLTEsMC40NS0xLDFTMTkuNDUsMTMsMjAsMTN6IE0xMSwydjJjMCwwLjU1LDAuNDUsMSwxLDFzMS0wLjQ1LDEtMVYyYzAtMC41NS0wLjQ1LTEtMS0xUzExLDEuNDUsMTEsMnogTTExLDIwdjJjMCwwLjU1LDAuNDUsMSwxLDFzMS0wLjQ1LDEtMXYtMmMwLTAuNTUtMC40NS0xLTEtMUMxMS40NSwxOSwxMSwxOS40NSwxMSwyMHogTTUuOTksNC41OGMtMC4zOS0wLjM5LTEuMDMtMC4zOS0xLjQxLDAgYy0wLjM5LDAuMzktMC4zOSwxLjAzLDAsMS40MWwxLjA2LDEuMDZjMC4zOSwwLjM5LDEuMDMsMC4zOSwxLjQxLDBzMC4zOS0xLjAzLDAtMS40MUw1Ljk5LDQuNTh6IE0xOC4zNiwxNi45NSBjLTAuMzktMC4zOS0xLjAzLTAuMzktMS40MSwwYy0wLjM5LDAuMzktMC4zOSwxLjAzLDAsMS40MWwxLjA2LDEuMDZjMC4zOSwwLjM5LDEuMDMsMC4zOSwxLjQxLDBjMC4zOS0wLjM5LDAuMzktMS4wMywwLTEuNDEgTDE4LjM2LDE2Ljk1eiBNMTkuNDIsNS45OWMwLjM5LTAuMzksMC4zOS0xLjAzLDAtMS40MWMtMC4zOS0wLjM5LTEuMDMtMC4zOS0xLjQxLDBsLTEuMDYsMS4wNmMtMC4zOSwwLjM5LTAuMzksMS4wMywwLDEuNDEgczEuMDMsMC4zOSwxLjQxLDBMMTkuNDIsNS45OXogTTcuMDUsMTguMzZjMC4zOS0wLjM5LDAuMzktMS4wMywwLTEuNDFjLTAuMzktMC4zOS0xLjAzLTAuMzktMS40MSwwbC0xLjA2LDEuMDYgYy0wLjM5LDAuMzktMC4zOSwxLjAzLDAsMS40MXMxLjAzLDAuMzksMS40MSwwTDcuMDUsMTguMzZ6Ii8+PC9zdmc+",
-ja=m.actions.get("undo"),Y=m.actions.get("redo"),qa=e("",ja.funct,null,mxResources.get("undo")+" ("+ja.shortcut+")",ja,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTIuNSA4Yy0yLjY1IDAtNS4wNS45OS02LjkgMi42TDIgN3Y5aDlsLTMuNjItMy42MmMxLjM5LTEuMTYgMy4xNi0xLjg4IDUuMTItMS44OCAzLjU0IDAgNi41NSAyLjMxIDcuNiA1LjVsMi4zNy0uNzhDMjEuMDggMTEuMDMgMTcuMTUgOCAxMi41IDh6Ii8+PC9zdmc+"),va=e("",Y.funct,null,mxResources.get("redo")+
-" ("+Y.shortcut+")",Y,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTguNCAxMC42QzE2LjU1IDguOTkgMTQuMTUgOCAxMS41IDhjLTQuNjUgMC04LjU4IDMuMDMtOS45NiA3LjIyTDMuOSAxNmMxLjA1LTMuMTkgNC4wNS01LjUgNy42LTUuNSAxLjk1IDAgMy43My43MiA1LjEyIDEuODhMMTMgMTZoOVY3bC0zLjYgMy42eiIvPjwvc3ZnPg=="),ua=e("",T,!0,mxResources.get("fit")+" ("+Editor.ctrlKey+"+H)",ia,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGVuYWJsZS1iYWNrZ3JvdW5kPSJuZXcgMCAwIDI0IDI0IiBoZWlnaHQ9IjI0cHgiIHZpZXdCb3g9IjAgMCAyNCAyNCIgd2lkdGg9IjI0cHgiIGZpbGw9IiMwMDAwMDAiPjxnPjxwYXRoIGQ9Ik0wLDBoMjR2MjRIMFYweiIgZmlsbD0ibm9uZSIvPjwvZz48Zz48cGF0aCBkPSJNNiwxNmgxMlY4SDZWMTZ6IE04LDEwaDh2NEg4VjEweiBNNCwxNUgydjNjMCwxLjEsMC45LDIsMiwyaDN2LTJINFYxNXogTTQsNmgzVjRINEMyLjksNCwyLDQuOSwyLDZ2M2gyVjZ6IE0yMCw0aC0zdjJoM3YzIGgyVjZDMjIsNC45LDIxLjEsNCwyMCw0eiBNMjAsMThoLTN2MmgzYzEuMSwwLDItMC45LDItMnYtM2gtMlYxOHoiLz48L2c+PC9zdmc+"),
+aa="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGVuYWJsZS1iYWNrZ3JvdW5kPSJuZXcgMCAwIDI0IDI0IiBoZWlnaHQ9IjI0cHgiIHZpZXdCb3g9IjAgMCAyNCAyNCIgd2lkdGg9IjI0cHgiIGZpbGw9IiMwMDAwMDAiPjxyZWN0IGZpbGw9Im5vbmUiIGhlaWdodD0iMjQiIHdpZHRoPSIyNCIvPjxwYXRoIGQ9Ik0xMiw5YzEuNjUsMCwzLDEuMzUsMywzcy0xLjM1LDMtMywzcy0zLTEuMzUtMy0zUzEwLjM1LDksMTIsOSBNMTIsN2MtMi43NiwwLTUsMi4yNC01LDVzMi4yNCw1LDUsNXM1LTIuMjQsNS01IFMxNC43Niw3LDEyLDdMMTIsN3ogTTIsMTNsMiwwYzAuNTUsMCwxLTAuNDUsMS0xcy0wLjQ1LTEtMS0xbC0yLDBjLTAuNTUsMC0xLDAuNDUtMSwxUzEuNDUsMTMsMiwxM3ogTTIwLDEzbDIsMGMwLjU1LDAsMS0wLjQ1LDEtMSBzLTAuNDUtMS0xLTFsLTIsMGMtMC41NSwwLTEsMC40NS0xLDFTMTkuNDUsMTMsMjAsMTN6IE0xMSwydjJjMCwwLjU1LDAuNDUsMSwxLDFzMS0wLjQ1LDEtMVYyYzAtMC41NS0wLjQ1LTEtMS0xUzExLDEuNDUsMTEsMnogTTExLDIwdjJjMCwwLjU1LDAuNDUsMSwxLDFzMS0wLjQ1LDEtMXYtMmMwLTAuNTUtMC40NS0xLTEtMUMxMS40NSwxOSwxMSwxOS40NSwxMSwyMHogTTUuOTksNC41OGMtMC4zOS0wLjM5LTEuMDMtMC4zOS0xLjQxLDAgYy0wLjM5LDAuMzktMC4zOSwxLjAzLDAsMS40MWwxLjA2LDEuMDZjMC4zOSwwLjM5LDEuMDMsMC4zOSwxLjQxLDBzMC4zOS0xLjAzLDAtMS40MUw1Ljk5LDQuNTh6IE0xOC4zNiwxNi45NSBjLTAuMzktMC4zOS0xLjAzLTAuMzktMS40MSwwYy0wLjM5LDAuMzktMC4zOSwxLjAzLDAsMS40MWwxLjA2LDEuMDZjMC4zOSwwLjM5LDEuMDMsMC4zOSwxLjQxLDBjMC4zOS0wLjM5LDAuMzktMS4wMywwLTEuNDEgTDE4LjM2LDE2Ljk1eiBNMTkuNDIsNS45OWMwLjM5LTAuMzksMC4zOS0xLjAzLDAtMS40MWMtMC4zOS0wLjM5LTEuMDMtMC4zOS0xLjQxLDBsLTEuMDYsMS4wNmMtMC4zOSwwLjM5LTAuMzksMS4wMywwLDEuNDEgczEuMDMsMC4zOSwxLjQxLDBMMTkuNDIsNS45OXogTTcuMDUsMTguMzZjMC4zOS0wLjM5LDAuMzktMS4wMywwLTEuNDFjLTAuMzktMC4zOS0xLjAzLTAuMzktMS40MSwwbC0xLjA2LDEuMDYgYy0wLjM5LDAuMzktMC4zOSwxLjAzLDAsMS40MXMxLjAzLDAuMzksMS40MSwwTDcuMDUsMTguMzZ6Ii8+PC9zdmc+",
+ja=m.actions.get("undo"),ea=m.actions.get("redo"),qa=e("",ja.funct,null,mxResources.get("undo")+" ("+ja.shortcut+")",ja,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTIuNSA4Yy0yLjY1IDAtNS4wNS45OS02LjkgMi42TDIgN3Y5aDlsLTMuNjItMy42MmMxLjM5LTEuMTYgMy4xNi0xLjg4IDUuMTItMS44OCAzLjU0IDAgNi41NSAyLjMxIDcuNiA1LjVsMi4zNy0uNzhDMjEuMDggMTEuMDMgMTcuMTUgOCAxMi41IDh6Ii8+PC9zdmc+"),ya=e("",ea.funct,null,mxResources.get("redo")+
+" ("+ea.shortcut+")",ea,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTguNCAxMC42QzE2LjU1IDguOTkgMTQuMTUgOCAxMS41IDhjLTQuNjUgMC04LjU4IDMuMDMtOS45NiA3LjIyTDMuOSAxNmMxLjA1LTMuMTkgNC4wNS01LjUgNy42LTUuNSAxLjk1IDAgMy43My43MiA1LjEyIDEuODhMMTMgMTZoOVY3bC0zLjYgMy42eiIvPjwvc3ZnPg=="),ua=e("",T,!0,mxResources.get("fit")+" ("+Editor.ctrlKey+"+H)",ia,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGVuYWJsZS1iYWNrZ3JvdW5kPSJuZXcgMCAwIDI0IDI0IiBoZWlnaHQ9IjI0cHgiIHZpZXdCb3g9IjAgMCAyNCAyNCIgd2lkdGg9IjI0cHgiIGZpbGw9IiMwMDAwMDAiPjxnPjxwYXRoIGQ9Ik0wLDBoMjR2MjRIMFYweiIgZmlsbD0ibm9uZSIvPjwvZz48Zz48cGF0aCBkPSJNNiwxNmgxMlY4SDZWMTZ6IE04LDEwaDh2NEg4VjEweiBNNCwxNUgydjNjMCwxLjEsMC45LDIsMiwyaDN2LTJINFYxNXogTTQsNmgzVjRINEMyLjksNCwyLDQuOSwyLDZ2M2gyVjZ6IE0yMCw0aC0zdjJoM3YzIGgyVjZDMjIsNC45LDIxLjEsNCwyMCw0eiBNMjAsMThoLTN2MmgzYzEuMSwwLDItMC45LDItMnYtM2gtMlYxOHoiLz48L2c+PC9zdmc+"),
ia=e("",pa.funct,null,mxResources.get("fullscreen"),pa,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMyA1djRoMlY1aDRWM0g1Yy0xLjEgMC0yIC45LTIgMnptMiAxMEgzdjRjMCAxLjEuOSAyIDIgMmg0di0ySDV2LTR6bTE0IDRoLTR2Mmg0YzEuMSAwIDItLjkgMi0ydi00aC0ydjR6bTAtMTZoLTR2Mmg0djRoMlY1YzAtMS4xLS45LTItMi0yeiIvPjwvc3ZnPg=="),ra="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNNiAxOWMwIDEuMS45IDIgMiAyaDhjMS4xIDAgMi0uOSAyLTJWN0g2djEyek0xOSA0aC0zLjVsLTEtMWgtNWwtMSAxSDV2MmgxNFY0eiIvPjwvc3ZnPg==";
-if(null!=W){var ya=m.actions.get("delete"),za=e("",ya.funct,null,mxResources.get("delete"),ya,ra);za.style.opacity="0.1";aa.appendChild(za);ya.addListener("stateChanged",function(){za.style.opacity=ya.enabled?"0.4":"0.1"});J=function(){qa.style.display=0<m.editor.undoManager.history.length||n.isEditing()?"inline-block":"none";va.style.display=qa.style.display;qa.style.opacity=ja.enabled?"0.4":"0.1";va.style.opacity=Y.enabled?"0.4":"0.1"};aa.appendChild(qa);aa.appendChild(va);ja.addListener("stateChanged",
-J);Y.addListener("stateChanged",J);J();J=m.actions.get("outline");J=e("",J.funct,null,mxResources.get("outline"),J,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMjRweCIgZmlsbD0iIzAwMDAwMCI+PHBhdGggZD0iTTAgMGgyNHYyNEgweiIgZmlsbD0ibm9uZSIvPjxwYXRoIGQ9Ik0yMC41IDNsLS4xNi4wM0wxNSA1LjEgOSAzIDMuMzYgNC45Yy0uMjEuMDctLjM2LjI1LS4zNi40OFYyMC41YzAgLjI4LjIyLjUuNS41bC4xNi0uMDNMOSAxOC45bDYgMi4xIDUuNjQtMS45Yy4yMS0uMDcuMzYtLjI1LjM2LS40OFYzLjVjMC0uMjgtLjIyLS41LS41LS41ek0xNSAxOWwtNi0yLjExVjVsNiAyLjExVjE5eiIvPjwvc3ZnPg==");
-J.style.opacity="0.4";W.appendChild(J);J=e("",X.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -/Alt+Mousewheel)",X,da);J.style.opacity="0.4";W.appendChild(J);var S=document.createElement("div");S.innerHTML="100%";S.setAttribute("title",mxResources.get("fitWindow")+"/"+mxResources.get("resetView")+" (Enter)");S.style.display="inline-block";S.style.cursor="pointer";S.style.textAlign="center";S.style.whiteSpace="nowrap";S.style.paddingRight="10px";S.style.textDecoration="none";S.style.verticalAlign=
-"top";S.style.padding="6px 0";S.style.fontSize="14px";S.style.width="40px";S.style.opacity="0.4";W.appendChild(S);mxEvent.addListener(S,"click",T);T=e("",P.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +/Alt+Mousewheel)",P,ta);T.style.opacity="0.4";W.appendChild(T);var Aa=e("",R.funct,null,mxResources.get("dark"),R,Editor.isDarkMode()?ba:ka);Aa.style.opacity="0.4";W.appendChild(Aa);m.addListener("darkModeChanged",mxUtils.bind(this,function(){Aa.style.backgroundImage="url("+(Editor.isDarkMode()?
-ba:ka)+")"}));pa.visible&&(ia.style.opacity="0.4",W.appendChild(ia));var ha=this.createPageMenuTab(!1);ha.style.display="none";ha.style.position="";ha.style.marginLeft="";ha.style.top="";ha.style.left="";ha.style.height="100%";ha.style.lineHeight="";ha.style.borderStyle="none";ha.style.padding="3px 0";ha.style.margin="0px";ha.style.background="";ha.style.border="";ha.style.boxShadow="none";ha.style.verticalAlign="top";ha.firstChild.style.height="100%";ha.firstChild.style.opacity="0.6";ha.firstChild.style.margin=
-"0px";W.appendChild(ha);m.addListener("fileDescriptorChanged",function(){ha.style.display="1"==urlParams.pages||null!=m.pages&&1<m.pages.length?"inline-block":"none"});m.tabContainer.style.visibility="hidden";p.style.cssText="position:absolute;right:12px;top:10px;height:30px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px 0px 6px 6px;border-bottom:1px solid lightgray;text-align:right;white-space:nowrap;overflow:hidden;user-select:none;";aa.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;";
-W.style.cssText="position:absolute;right:12px;bottom:12px;height:28px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:8px;white-space:nowrap;user-select:none;";A.appendChild(aa);A.appendChild(W);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;";A.appendChild(Q);window.setTimeout(function(){mxUtils.setPrefixedStyle(Q.style,
-"transition","transform .3s ease-out")},0);"1"==urlParams["format-toolbar"]&&this.installFormatToolbar(A)}else p.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",S=t.addMenu("100%",J.funct),S.setAttribute("title",mxResources.get("zoom")+" (Alt+Mousewheel)"),S.style.whiteSpace="nowrap",S.style.paddingRight="10px",S.style.textDecoration="none",S.style.textDecoration="none",S.style.overflow="hidden",
+if(null!=W){var xa=m.actions.get("delete"),za=e("",xa.funct,null,mxResources.get("delete"),xa,ra);za.style.opacity="0.1";Z.appendChild(za);xa.addListener("stateChanged",function(){za.style.opacity=xa.enabled?"0.4":"0.1"});J=function(){qa.style.display=0<m.editor.undoManager.history.length||n.isEditing()?"inline-block":"none";ya.style.display=qa.style.display;qa.style.opacity=ja.enabled?"0.4":"0.1";ya.style.opacity=ea.enabled?"0.4":"0.1"};Z.appendChild(qa);Z.appendChild(ya);ja.addListener("stateChanged",
+J);ea.addListener("stateChanged",J);J();J=m.actions.get("outline");J=e("",J.funct,null,mxResources.get("outline"),J,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMjRweCIgZmlsbD0iIzAwMDAwMCI+PHBhdGggZD0iTTAgMGgyNHYyNEgweiIgZmlsbD0ibm9uZSIvPjxwYXRoIGQ9Ik0yMC41IDNsLS4xNi4wM0wxNSA1LjEgOSAzIDMuMzYgNC45Yy0uMjEuMDctLjM2LjI1LS4zNi40OFYyMC41YzAgLjI4LjIyLjUuNS41bC4xNi0uMDNMOSAxOC45bDYgMi4xIDUuNjQtMS45Yy4yMS0uMDcuMzYtLjI1LjM2LS40OFYzLjVjMC0uMjgtLjIyLS41LS41LS41ek0xNSAxOWwtNi0yLjExVjVsNiAyLjExVjE5eiIvPjwvc3ZnPg==");
+J.style.opacity="0.4";W.appendChild(J);J=e("",X.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -/Alt+Mousewheel)",X,ca);J.style.opacity="0.4";W.appendChild(J);var S=document.createElement("div");S.innerHTML="100%";S.setAttribute("title",mxResources.get("fitWindow")+"/"+mxResources.get("resetView")+" (Enter)");S.style.display="inline-block";S.style.cursor="pointer";S.style.textAlign="center";S.style.whiteSpace="nowrap";S.style.paddingRight="10px";S.style.textDecoration="none";S.style.verticalAlign=
+"top";S.style.padding="6px 0";S.style.fontSize="14px";S.style.width="40px";S.style.opacity="0.4";W.appendChild(S);mxEvent.addListener(S,"click",T);T=e("",P.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +/Alt+Mousewheel)",P,ta);T.style.opacity="0.4";W.appendChild(T);var Aa=e("",R.funct,null,mxResources.get("dark"),R,Editor.isDarkMode()?aa:ka);Aa.style.opacity="0.4";W.appendChild(Aa);m.addListener("darkModeChanged",mxUtils.bind(this,function(){Aa.style.backgroundImage="url("+(Editor.isDarkMode()?
+aa:ka)+")"}));pa.visible&&(ia.style.opacity="0.4",W.appendChild(ia));var ha=this.createPageMenuTab(!1);ha.style.display="none";ha.style.position="";ha.style.marginLeft="";ha.style.top="";ha.style.left="";ha.style.height="100%";ha.style.lineHeight="";ha.style.borderStyle="none";ha.style.padding="3px 0";ha.style.margin="0px";ha.style.background="";ha.style.border="";ha.style.boxShadow="none";ha.style.verticalAlign="top";ha.firstChild.style.height="100%";ha.firstChild.style.opacity="0.6";ha.firstChild.style.margin=
+"0px";W.appendChild(ha);m.addListener("fileDescriptorChanged",function(){ha.style.display="1"==urlParams.pages||null!=m.pages&&1<m.pages.length?"inline-block":"none"});m.tabContainer.style.visibility="hidden";p.style.cssText="position:absolute;right:12px;top:10px;height:30px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px 0px 6px 6px;border-bottom:1px solid lightgray;text-align:right;white-space:nowrap;overflow:hidden;user-select:none;";Z.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;";
+W.style.cssText="position:absolute;right:12px;bottom:12px;height:28px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:8px;white-space:nowrap;user-select:none;";A.appendChild(Z);A.appendChild(W);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;";A.appendChild(Q);window.setTimeout(function(){mxUtils.setPrefixedStyle(Q.style,
+"transition","transform .3s ease-out")},0);"1"==urlParams["format-toolbar"]&&this.installFormatToolbar(A)}else p.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",S=u.addMenu("100%",J.funct),S.setAttribute("title",mxResources.get("zoom")+" (Alt+Mousewheel)"),S.style.whiteSpace="nowrap",S.style.paddingRight="10px",S.style.textDecoration="none",S.style.textDecoration="none",S.style.overflow="hidden",
S.style.visibility="hidden",S.style.textAlign="center",S.style.cursor="pointer",S.style.height=parseInt(m.tabContainerHeight)-1+"px",S.style.lineHeight=parseInt(m.tabContainerHeight)+1+"px",S.style.position="absolute",S.style.display="block",S.style.fontSize="12px",S.style.width="59px",S.style.right="0px",S.style.bottom="0px",S.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+")",S.style.backgroundPosition="right 6px center",S.style.backgroundRepeat="no-repeat",A.appendChild(S);pa=mxUtils.bind(this,
function(){S.innerHTML=Math.round(100*m.editor.graph.view.scale)+"%"});m.editor.graph.view.addListener(mxEvent.EVENT_SCALE,pa);m.editor.addListener("resetGraphView",pa);m.editor.addListener("pageSelected",pa);var Ba=m.setGraphEnabled;m.setGraphEnabled=function(){Ba.apply(this,arguments);null!=this.tabContainer&&(S.style.visibility=this.tabContainer.style.visibility,this.diagramContainer.style.bottom="hidden"!=this.tabContainer.style.visibility&&null==W?this.tabContainerHeight+"px":"0px")}}A.appendChild(p);
-A.appendChild(m.diagramContainer);k.appendChild(A);m.updateTabContainer();null==W&&A.appendChild(m.tabContainer);var wa=null;g();mxEvent.addListener(window,"resize",function(){g();null!=m.sidebarWindow&&m.sidebarWindow.window.fit();null!=m.formatWindow&&m.formatWindow.window.fit();null!=m.actions.outlineWindow&&m.actions.outlineWindow.window.fit();null!=m.actions.layersWindow&&m.actions.layersWindow.window.fit();null!=m.menus.tagsWindow&&m.menus.tagsWindow.window.fit();null!=m.menus.findWindow&&m.menus.findWindow.window.fit();
-null!=m.menus.findReplaceWindow&&m.menus.findReplaceWindow.window.fit()})}}};(function(){var a=!1;"min"!=uiTheme||a||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),a=!0);var b=EditorUi.initTheme;EditorUi.initTheme=function(){b.apply(this,arguments);"min"!=uiTheme||a||(this.initMinimalTheme(),a=!0)}})();DrawioComment=function(a,b,d,k,f,m,p){this.file=a;this.id=b;this.content=d;this.modifiedDate=k;this.createdDate=f;this.isResolved=m;this.user=p;this.replies=[]};DrawioComment.prototype.addReplyDirect=function(a){null!=a&&this.replies.push(a)};DrawioComment.prototype.addReply=function(a,b,d,k,f){b()};DrawioComment.prototype.editComment=function(a,b,d){b()};DrawioComment.prototype.deleteComment=function(a,b){a()};DrawioUser=function(a,b,d,k,f){this.id=a;this.email=b;this.displayName=d;this.pictureUrl=k;this.locale=f};mxResources.parse('# *DO NOT DIRECTLY EDIT THIS FILE, IT IS AUTOMATICALLY GENERATED AND IT IS BASED ON:*\n# https://docs.google.com/spreadsheet/ccc?key=0AmQEO36liL4FdDJLWVNMaVV2UmRKSnpXU09MYkdGbEE\nabout=About \naboutDrawio=About draw.io\naccessDenied=Access Denied\naction=Action\nactualSize=Actual Size\nadd=Add\naddAccount=Add account\naddedFile=Added {1}\naddImages=Add Images\naddImageUrl=Add Image URL\naddLayer=Add Layer\naddProperty=Add Property\naddress=Address\naddToExistingDrawing=Add to Existing Drawing\naddWaypoint=Add Waypoint\nadjustTo=Adjust to\nadvanced=Advanced\nalign=Align\nalignment=Alignment\nallChangesLost=All changes will be lost!\nallPages=All Pages\nallProjects=All Projects\nallSpaces=All Spaces\nallTags=All Tags\nanchor=Anchor\nandroid=Android\nangle=Angle\narc=Arc\nareYouSure=Are you sure?\nensureDataSaved=Please ensure your data is saved before closing.\nallChangesSaved=All changes saved\nallChangesSavedInDrive=All changes saved in Drive\nallowPopups=Allow pop-ups to avoid this dialog.\nallowRelativeUrl=Allow relative URL\nalreadyConnected=Nodes already connected\napply=Apply\narchiMate21=ArchiMate 2.1\narrange=Arrange\narrow=Arrow\narrows=Arrows\nasNew=As New\natlas=Atlas\nauthor=Author\nauthorizationRequired=Authorization required\nauthorizeThisAppIn=Authorize this app in {1}:\nauthorize=Authorize\nauthorizing=Authorizing\nautomatic=Automatic\nautosave=Autosave\nautosize=Autosize\nattachments=Attachments\naws=AWS\naws3d=AWS 3D\nazure=Azure\nback=Back\nbackground=Background\nbackgroundColor=Background Color\nbackgroundImage=Background Image\nbasic=Basic\nblankDrawing=Blank Drawing\nblankDiagram=Blank Diagram\nblock=Block\nblockquote=Blockquote\nblog=Blog\nbold=Bold\nbootstrap=Bootstrap\nborder=Border\nborderColor=Border Color\nborderWidth=Border Width\nbottom=Bottom\nbottomAlign=Bottom Align\nbottomLeft=Bottom Left\nbottomRight=Bottom Right\nbpmn=BPMN\nbringForward=Bring Forward\nbrowser=Browser\nbulletedList=Bulleted List\nbusiness=Business\nbusy=Operation in progress\ncabinets=Cabinets\ncancel=Cancel\ncenter=Center\ncannotLoad=Load attempts failed. Please try again later.\ncannotLogin=Log in attempts failed. Please try again later.\ncannotOpenFile=Cannot open file\nchange=Change\nchangeOrientation=Change Orientation\nchangeUser=Change user\nchangeStorage=Change storage\nchangesNotSaved=Changes have not been saved\nclassDiagram=Class Diagram\nuserJoined={1} has joined\nuserLeft={1} has left\nchatWindowTitle=Chat\nchooseAnOption=Choose an option\nchromeApp=Chrome App\ncollaborativeEditingNotice=Important Notice for Collaborative Editing\ncompare=Compare\ncompressed=Compressed\ncommitMessage=Commit Message\nconfigLinkWarn=This link configures draw.io. Only click OK if you trust whoever gave you it!\nconfigLinkConfirm=Click OK to configure and restart draw.io.\ncontainer=Container\ncsv=CSV\ndark=Dark\ndiagramXmlDesc=XML File\ndiagramHtmlDesc=HTML File\ndiagramPngDesc=Editable Bitmap Image\ndiagramSvgDesc=Editable Vector Image\ndidYouMeanToExportToPdf=Did you mean to export to PDF?\ndraftFound=A draft for \'{1}\' has been found. Load it into the editor or discard it to continue.\ndraftRevisionMismatch=There is a different version of this diagram on a shared draft of this page. Please edit the diagram from the draft to ensure you are working with the latest version.\nselectDraft=Select a draft to continue editing:\ndragAndDropNotSupported=Drag and drop not supported for images. Would you like to import instead?\ndropboxCharsNotAllowed=The following characters are not allowed: / : ? * " |\ncheck=Check\nchecksum=Checksum\ncircle=Circle\ncisco=Cisco\nclassic=Classic\nclearDefaultStyle=Clear Default Style\nclearWaypoints=Clear Waypoints\nclipart=Clipart\nclose=Close\nclosingFile=Closing file\ncollaborator=Collaborator\ncollaborators=Collaborators\ncollapse=Collapse\ncollapseExpand=Collapse/Expand\ncollapse-expand=Click to collapse/expand\nShift-click to move neighbors \nAlt-click to protect group size\ncollapsible=Collapsible\ncomic=Comic\ncomment=Comment\ncommentsNotes=Comments/Notes\ncompress=Compress\nconfiguration=Configuration\nconnect=Connect\nconnecting=Connecting\nconnectWithDrive=Connect with Google Drive\nconnection=Connection\nconnectionArrows=Connection Arrows\nconnectionPoints=Connection Points\nconstrainProportions=Constrain Proportions\ncontainsValidationErrors=Contains validation errors\ncopiedToClipboard=Copied to clipboard\ncopy=Copy\ncopyConnect=Copy on connect\ncopyCreated=A copy of the file was created.\ncopyData=Copy Data\ncopyOf=Copy of {1}\ncopyOfDrawing=Copy of Drawing\ncopySize=Copy Size\ncopyStyle=Copy Style\ncreate=Create\ncreateNewDiagram=Create New Diagram\ncreateRevision=Create Revision\ncreateShape=Create Shape\ncrop=Crop\ncurved=Curved\ncustom=Custom\ncurrent=Current\ncurrentPage=Current page\ncut=Cut\ndashed=Dashed\ndecideLater=Decide later\ndefault=Default\ndelete=Delete\ndeleteColumn=Delete Column\ndeleteLibrary401=Insufficient permissions to delete this library\ndeleteLibrary404=Selected library could not be found\ndeleteLibrary500=Error deleting library\ndeleteLibraryConfirm=You are about to permanently delete this library. Are you sure you want to do this?\ndeleteRow=Delete Row\ndescription=Description\ndevice=Device\ndiagram=Diagram\ndiagramContent=Diagram Content\ndiagramLocked=Diagram has been locked to prevent further data loss.\ndiagramLockedBySince=The diagram is locked by {1} since {2} ago\ndiagramName=Diagram Name\ndiagramIsPublic=Diagram is public\ndiagramIsNotPublic=Diagram is not public\ndiamond=Diamond\ndiamondThin=Diamond (thin)\ndidYouKnow=Did you know...\ndirection=Direction\ndiscard=Discard\ndiscardChangesAndReconnect=Discard Changes and Reconnect\ngoogleDriveMissingClickHere=Google Drive missing? Click here!\ndiscardChanges=Discard Changes\ndisconnected=Disconnected\ndistribute=Distribute\ndone=Done\ndoNotShowAgain=Do not show again\ndotted=Dotted\ndoubleClickOrientation=Doubleclick to change orientation\ndoubleClickTooltip=Doubleclick to insert text\ndoubleClickChangeProperty=Doubleclick to change property name\ndownload=Download\ndownloadDesktop=Get Desktop\ndownloadAs=Download as\nclickHereToSave=Click here to save.\ndpi=DPI\ndraftDiscarded=Draft discarded\ndraftSaved=Draft saved\ndragElementsHere=Drag elements here\ndragImagesHere=Drag images or URLs here\ndragUrlsHere=Drag URLs here\ndraw.io=draw.io\ndrawing=Drawing{1}\ndrawingEmpty=Drawing is empty\ndrawingTooLarge=Drawing is too large\ndrawioForWork=Draw.io for GSuite\ndropbox=Dropbox\nduplicate=Duplicate\nduplicateIt=Duplicate {1}\ndivider=Divider\ndx=Dx\ndy=Dy\neast=East\nedit=Edit\neditData=Edit Data\neditDiagram=Edit Diagram\neditGeometry=Edit Geometry\neditImage=Edit Image\neditImageUrl=Edit Image URL\neditLink=Edit Link\neditShape=Edit Shape\neditStyle=Edit Style\neditText=Edit Text\neditTooltip=Edit Tooltip\nglass=Glass\ngoogleImages=Google Images\nimageSearch=Image Search\neip=EIP\nembed=Embed\nembedImages=Embed Images\nmainEmbedNotice=Paste this into the page\nelectrical=Electrical\nellipse=Ellipse\nembedNotice=Paste this once at the end of the page\nenterGroup=Enter Group\nenterName=Enter Name\nenterPropertyName=Enter Property Name\nenterValue=Enter Value\nentityRelation=Entity Relation\nentityRelationshipDiagram=Entity Relationship Diagram\nerror=Error\nerrorDeletingFile=Error deleting file\nerrorLoadingFile=Error loading file\nerrorRenamingFile=Error renaming file\nerrorRenamingFileNotFound=Error renaming file. File was not found.\nerrorRenamingFileForbidden=Error renaming file. Insufficient access rights.\nerrorSavingDraft=Error saving draft\nerrorSavingFile=Error saving file\nerrorSavingFileUnknown=Error authorizing with Google\'s servers. Please refresh the page to re-attempt.\nerrorSavingFileForbidden=Error saving file. Insufficient access rights.\nerrorSavingFileNameConflict=Could not save diagram. Current page already contains file named \'{1}\'.\nerrorSavingFileNotFound=Error saving file. File was not found.\nerrorSavingFileReadOnlyMode=Could not save diagram while read-only mode is active.\nerrorSavingFileSessionTimeout=Your session has ended. Please <a target=\'_blank\' href=\'{1}\'>{2}</a> and return to this tab to try to save again.\nerrorSendingFeedback=Error sending feedback.\nerrorUpdatingPreview=Error updating preview.\nexit=Exit\nexitGroup=Exit Group\nexpand=Expand\nexport=Export\nexporting=Exporting\nexportAs=Export as\nexportOptionsDisabled=Export options disabled\nexportOptionsDisabledDetails=The owner has disabled options to download, print or copy for commenters and viewers on this file.\nexternalChanges=External Changes\nextras=Extras\nfacebook=Facebook\nfailedToSaveTryReconnect=Failed to save, trying to reconnect\nfeatureRequest=Feature Request\nfeedback=Feedback\nfeedbackSent=Feedback successfully sent.\nfloorplans=Floorplans\nfile=File\nfileChangedOverwriteDialog=The file has been modified. Do you want to save the file and overwrite those changes?\nfileChangedSyncDialog=The file has been modified. Do you want to synchronize those changes?\nfileChangedSync=The file has been modified. Click here to synchronize.\noverwrite=Overwrite\nsynchronize=Synchronize\nfilename=Filename\nfileExists=File already exists\nfileMovedToTrash=File was moved to trash\nfileNearlyFullSeeFaq=File nearly full, please see FAQ\nfileNotFound=File not found\nrepositoryNotFound=Repository not found\nfileNotFoundOrDenied=The file was not found. It does not exist or you do not have access.\nfileNotLoaded=File not loaded\nfileNotSaved=File not saved\nfileOpenLocation=How would you like to open these file(s)?\nfiletypeHtml=.html causes file to save as HTML with redirect to cloud URL\nfiletypePng=.png causes file to save as PNG with embedded data\nfiletypeSvg=.svg causes file to save as SVG with embedded data\nfileWillBeSavedInAppFolder={1} will be saved in the app folder.\nfill=Fill\nfillColor=Fill Color\nfilterCards=Filter Cards\nfind=Find\nfit=Fit\nfitContainer=Resize Container\nfitIntoContainer=Fit into Container\nfitPage=Fit Page\nfitPageWidth=Fit Page Width\nfitTo=Fit to\nfitToSheetsAcross=sheet(s) across\nfitToBy=by\nfitToSheetsDown=sheet(s) down\nfitTwoPages=Two Pages\nfitWindow=Fit Window\nflip=Flip\nflipH=Flip Horizontal\nflipV=Flip Vertical\nflowchart=Flowchart\nfolder=Folder\nfont=Font\nfontColor=Font Color\nfontFamily=Font Family\nfontSize=Font Size\nforbidden=You are not authorized to access this file\nformat=Format\nformatPanel=Format Panel\nformatted=Formatted\nformattedText=Formatted Text\nformatPng=PNG\nformatGif=GIF\nformatJpg=JPEG\nformatPdf=PDF\nformatSql=SQL\nformatSvg=SVG\nformatHtmlEmbedded=HTML\nformatSvgEmbedded=SVG (with XML)\nformatVsdx=VSDX\nformatVssx=VSSX\nformatXmlPlain=XML (Plain)\nformatXml=XML\nforum=Discussion/Help Forums\nfreehand=Freehand\nfromTemplate=From Template\nfromTemplateUrl=From Template URL\nfromText=From Text\nfromUrl=From URL\nfromThisPage=From this page\nfullscreen=Fullscreen\ngap=Gap\ngcp=GCP\ngeneral=General\ngithub=GitHub\ngitlab=GitLab\ngliffy=Gliffy\nglobal=Global\ngoogleDocs=Google Docs\ngoogleDrive=Google Drive\ngoogleGadget=Google Gadget\ngooglePlus=Google+\ngoogleSharingNotAvailable=Sharing is only available via Google Drive. Please click Open below and share from the more actions menu:\ngoogleSlides=Google Slides\ngoogleSites=Google Sites\ngoogleSheets=Google Sheets\ngradient=Gradient\ngradientColor=Color\ngrid=Grid\ngridColor=Grid Color\ngridSize=Grid Size\ngroup=Group\nguides=Guides\nhateApp=I hate draw.io\nheading=Heading\nheight=Height\nhelp=Help\nhelpTranslate=Help us translate this application\nhide=Hide\nhideIt=Hide {1}\nhidden=Hidden\nhome=Home\nhorizontal=Horizontal\nhorizontalFlow=Horizontal Flow\nhorizontalTree=Horizontal Tree\nhowTranslate=How good is the translation in your language?\nhtml=HTML\nhtmlText=HTML Text\nid=ID\niframe=IFrame\nignore=Ignore\nimage=Image\nimageUrl=Image URL\nimages=Images\nimagePreviewError=This image couldn\'t be loaded for preview. Please check the URL.\nimageTooBig=Image too big\nimgur=Imgur\nimport=Import\nimportFrom=Import from\nincludeCopyOfMyDiagram=Include a copy of my diagram\nincreaseIndent=Increase Indent\ndecreaseIndent=Decrease Indent\ninsert=Insert\ninsertColumnBefore=Insert Column Left\ninsertColumnAfter=Insert Column Right\ninsertEllipse=Insert Ellipse\ninsertImage=Insert Image\ninsertHorizontalRule=Insert Horizontal Rule\ninsertLink=Insert Link\ninsertPage=Insert Page\ninsertRectangle=Insert Rectangle\ninsertRhombus=Insert Rhombus\ninsertRowBefore=Insert Row Above\ninsertRowAfter=Insert Row After\ninsertText=Insert Text\ninserting=Inserting\ninstallApp=Install App\ninvalidFilename=Diagram names must not contain the following characters: / | : ; { } < > & + ? = "\ninvalidLicenseSeeThisPage=Your license is invalid, please see this <a target="_blank" href="https://support.draw.io/display/DFCS/Licensing+your+draw.io+plugin">page</a>.\ninvalidInput=Invalid input\ninvalidName=Invalid name\ninvalidOrMissingFile=Invalid or missing file\ninvalidPublicUrl=Invalid public URL\nisometric=Isometric\nios=iOS\nitalic=Italic\nkennedy=Kennedy\nkeyboardShortcuts=Keyboard Shortcuts\nlayers=Layers\nlandscape=Landscape\nlanguage=Language\nleanMapping=Lean Mapping\nlastChange=Last change {1} ago\nlessThanAMinute=less than a minute\nlicensingError=Licensing Error\nlicenseHasExpired=The license for {1} has expired on {2}. Click here.\nlicenseRequired=This feature requires draw.io to be licensed.\nlicenseWillExpire=The license for {1} will expire on {2}. Click here.\nlineJumps=Line jumps\nlinkAccountRequired=If the diagram is not public a Google account is required to view the link.\nlinkText=Link Text\nlist=List\nminute=minute\nminutes=minutes\nhours=hours\ndays=days\nmonths=months\nyears=years\nrestartForChangeRequired=Changes will take effect after a restart of the application.\nlaneColor=Lanecolor\nlastModified=Last modified\nlayout=Layout\nleft=Left\nleftAlign=Left Align\nleftToRight=Left to right\nlibraryTooltip=Drag and drop shapes here or click + to insert. Double click to edit.\nlightbox=Lightbox\nline=Line\nlineend=Line end\nlineheight=Line Height\nlinestart=Line start\nlinewidth=Linewidth\nlink=Link\nlinks=Links\nloading=Loading\nlockUnlock=Lock/Unlock\nloggedOut=Logged Out\nlogIn=log in\nloveIt=I love {1}\nlucidchart=Lucidchart\nmaps=Maps\nmathematicalTypesetting=Mathematical Typesetting\nmakeCopy=Make a Copy\nmanual=Manual\nmerge=Merge\nmermaid=Mermaid\nmicrosoftOffice=Microsoft Office\nmicrosoftExcel=Microsoft Excel\nmicrosoftPowerPoint=Microsoft PowerPoint\nmicrosoftWord=Microsoft Word\nmiddle=Middle\nminimal=Minimal\nmisc=Misc\nmockups=Mockups\nmodificationDate=Modification date\nmodifiedBy=Modified by\nmore=More\nmoreResults=More Results\nmoreShapes=More Shapes\nmove=Move\nmoveToFolder=Move to Folder\nmoving=Moving\nmoveSelectionTo=Move selection to {1}\nname=Name\nnavigation=Navigation\nnetwork=Network\nnetworking=Networking\nnew=New\nnewLibrary=New Library\nnextPage=Next Page\nno=No\nnoPickFolder=No, pick folder\nnoAttachments=No attachments found\nnoColor=No Color\nnoFiles=No Files\nnoFileSelected=No file selected\nnoLibraries=No libraries found\nnoMoreResults=No more results\nnone=None\nnoOtherViewers=No other viewers\nnoPlugins=No plugins\nnoPreview=No preview\nnoResponse=No response from server\nnoResultsFor=No results for \'{1}\'\nnoRevisions=No revisions\nnoSearchResults=No search results found\nnoPageContentOrNotSaved=No anchors found on this page or it hasn\'t been saved yet\nnormal=Normal\nnorth=North\nnotADiagramFile=Not a diagram file\nnotALibraryFile=Not a library file\nnotAvailable=Not available\nnotAUtf8File=Not a UTF-8 file\nnotConnected=Not connected\nnote=Note\nnotion=Notion\nnotSatisfiedWithImport=Not satisfied with the import?\nnotUsingService=Not using {1}?\nnumberedList=Numbered list\noffline=Offline\nok=OK\noneDrive=OneDrive\nonline=Online\nopacity=Opacity\nopen=Open\nopenArrow=Open Arrow\nopenExistingDiagram=Open Existing Diagram\nopenFile=Open File\nopenFrom=Open from\nopenLibrary=Open Library\nopenLibraryFrom=Open Library from\nopenLink=Open Link\nopenInNewWindow=Open in New Window\nopenInThisWindow=Open in This Window\nopenIt=Open {1}\nopenRecent=Open Recent\nopenSupported=Supported formats are files saved from this software (.xml), .vsdx and .gliffy\noptions=Options\norganic=Organic\norgChart=Org Chart\northogonal=Orthogonal\notherViewer=other viewer\notherViewers=other viewers\noutline=Outline\noval=Oval\npage=Page\npageContent=Page Content\npageNotFound=Page not found\npageWithNumber=Page-{1}\npages=Pages\npageView=Page View\npageSetup=Page Setup\npageScale=Page Scale\npan=Pan\npanTooltip=Space+Drag to pan\npaperSize=Paper Size\npattern=Pattern\nparallels=Parallels\npaste=Paste\npasteData=Paste Data\npasteHere=Paste here\npasteSize=Paste Size\npasteStyle=Paste Style\nperimeter=Perimeter\npermissionAnyone=Anyone can edit\npermissionAuthor=Owner and admins can edit\npickFolder=Pick a folder\npickLibraryDialogTitle=Select Library\npublicDiagramUrl=Public URL of the diagram\nplaceholders=Placeholders\nplantUml=PlantUML\nplugins=Plugins\npluginUrl=Plugin URL\npluginWarning=The page has requested to load the following plugin(s):\n \n {1}\n \n Would you like to load these plugin(s) now?\n \n NOTE : Only allow plugins to run if you fully understand the security implications of doing so.\n\nplusTooltip=Click to connect and clone (ctrl+click to clone, shift+click to connect). Drag to connect (ctrl+drag to clone).\nportrait=Portrait\nposition=Position\nposterPrint=Poster Print\npreferences=Preferences\npreview=Preview\npreviousPage=Previous Page\nprint=Print\nprintAllPages=Print All Pages\nprocEng=Proc. Eng.\nproject=Project\npriority=Priority\nproperties=Properties\npublish=Publish\nquickStart=Quick Start Video\nrack=Rack\nradial=Radial\nradialTree=Radial Tree\nreadOnly=Read-only\nreconnecting=Reconnecting\nrecentlyUpdated=Recently Updated\nrecentlyViewed=Recently Viewed\nrectangle=Rectangle\nredirectToNewApp=This file was created or modified in a newer version of this app. You will be redirected now.\nrealtimeTimeout=It looks like you\'ve made a few changes while offline. We\'re sorry, these changes cannot be saved.\nredo=Redo\nrefresh=Refresh\nregularExpression=Regular Expression\nrelative=Relative\nrelativeUrlNotAllowed=Relative URL not allowed\nrememberMe=Remember me\nrememberThisSetting=Remember this setting\nremoveFormat=Clear Formatting\nremoveFromGroup=Remove from Group\nremoveIt=Remove {1}\nremoveWaypoint=Remove Waypoint\nrename=Rename\nrenamed=Renamed\nrenameIt=Rename {1}\nrenaming=Renaming\nreplace=Replace\nreplaceIt={1} already exists. Do you want to replace it?\nreplaceExistingDrawing=Replace existing drawing\nrequired=required\nreset=Reset\nresetView=Reset View\nresize=Resize\nresizeLargeImages=Do you want to resize large images to make the application run faster?\nretina=Retina\nresponsive=Responsive\nrestore=Restore\nrestoring=Restoring\nretryingIn=Retrying in {1} second(s)\nretryingLoad=Load failed. Retrying...\nretryingLogin=Login time out. Retrying...\nreverse=Reverse\nrevision=Revision\nrevisionHistory=Revision History\nrhombus=Rhombus\nright=Right\nrightAlign=Right Align\nrightToLeft=Right to left\nrotate=Rotate\nrotateTooltip=Click and drag to rotate, click to turn shape only by 90 degrees\nrotation=Rotation\nrounded=Rounded\nsave=Save\nsaveAndExit=Save & Exit\nsaveAs=Save as\nsaveAsXmlFile=Save as XML file?\nsaved=Saved\nsaveDiagramFirst=Please save the diagram first\nsaveDiagramsTo=Save diagrams to\nsaveLibrary403=Insufficient permissions to edit this library\nsaveLibrary500=There was an error while saving the library\nsaveLibraryReadOnly=Could not save library while read-only mode is active\nsaving=Saving\nscratchpad=Scratchpad\nscrollbars=Scrollbars\nsearch=Search\nsearchShapes=Search Shapes\nselectAll=Select All\nselectionOnly=Selection Only\nselectCard=Select Card\nselectEdges=Select Edges\nselectFile=Select File\nselectFolder=Select Folder\nselectFont=Select Font\nselectNone=Select None\nselectTemplate=Select Template\nselectVertices=Select Vertices\nsendBackward=Send Backward\nsendMessage=Send\nsendYourFeedback=Send your feedback\nserviceUnavailableOrBlocked=Service unavailable or blocked\nsessionExpired=Your session has expired. Please refresh the browser window.\nsessionTimeoutOnSave=Your session has timed out and you have been disconnected from the Google Drive. Press OK to login and save. \nsetAsDefaultStyle=Set as Default Style\nshadow=Shadow\nshape=Shape\nshapes=Shapes\nshare=Share\nshareLink=Link for shared editing\nsharingAvailable=Sharing available for Google Drive and OneDrive files.\nsharp=Sharp\nshow=Show\nshowStartScreen=Show Start Screen\nsidebarTooltip=Click to expand. Drag and drop shapes into the diagram. Shift+click to change selection. Alt+click to insert and connect.\nsigns=Signs\nsignOut=Sign out\nsimple=Simple\nsimpleArrow=Simple Arrow\nsimpleViewer=Simple Viewer\nsize=Size\nsketch=Sketch\nsolid=Solid\nsourceSpacing=Source Spacing\nsouth=South\nsoftware=Software\nspace=Space\nspacing=Spacing\nspecialLink=Special Link\nstandard=Standard\nstartDrawing=Start drawing\nstopDrawing=Stop drawing\nstarting=Starting\nstraight=Straight\nstrikethrough=Strikethrough\nstrokeColor=Line Color\nstyle=Style\nsubscript=Subscript\nsummary=Summary\nsuperscript=Superscript\nsupport=Support\nswimlaneDiagram=Swimlane Diagram\nsysml=SysML\ntags=Tags\ntable=Table\ntables=Tables\ntakeOver=Take Over\ntargetSpacing=Target Spacing\ntemplate=Template\ntemplates=Templates\ntext=Text\ntextAlignment=Text Alignment\ntextOpacity=Text Opacity\ntheme=Theme\ntimeout=Timeout\ntitle=Title\nto=to\ntoBack=To Back\ntoFront=To Front\ntooLargeUseDownload=Too large, use download instead.\ntoolbar=Toolbar\ntooltips=Tooltips\ntop=Top\ntopAlign=Top Align\ntopLeft=Top Left\ntopRight=Top Right\ntransparent=Transparent\ntransparentBackground=Transparent Background\ntrello=Trello\ntryAgain=Try again\ntryOpeningViaThisPage=Try opening via this page\nturn=Rotate shape only by 90°\ntype=Type\ntwitter=Twitter\numl=UML\nunderline=Underline\nundo=Undo\nungroup=Ungroup\nunsavedChanges=Unsaved changes\nunsavedChangesClickHereToSave=Unsaved changes. Click here to save.\nuntitled=Untitled\nuntitledDiagram=Untitled Diagram\nuntitledLayer=Untitled Layer\nuntitledLibrary=Untitled Library\nunknownError=Unknown error\nupdateFile=Update {1}\nupdatingDocument=Updating Document. Please wait...\nupdatingPreview=Updating Preview. Please wait...\nupdatingSelection=Updating Selection. Please wait...\nupload=Upload\nurl=URL\nuseOffline=Use Offline\nuseRootFolder=Use root folder?\nuserManual=User Manual\nvertical=Vertical\nverticalFlow=Vertical Flow\nverticalTree=Vertical Tree\nview=View\nviewerSettings=Viewer Settings\nviewUrl=Link to view: {1}\nvoiceAssistant=Voice Assistant (beta)\nwarning=Warning\nwaypoints=Waypoints\nwest=West\nwidth=Width\nwiki=Wiki\nwordWrap=Word Wrap\nwritingDirection=Writing Direction\nyes=Yes\nyourEmailAddress=Your email address\nzoom=Zoom\nzoomIn=Zoom In\nzoomOut=Zoom Out\nbasic=Basic\nbusinessprocess=Business Processes\ncharts=Charts\nengineering=Engineering\nflowcharts=Flowcharts\ngmdl=Material Design\nmindmaps=Mindmaps\nmockups=Mockups\nnetworkdiagrams=Network Diagrams\nnothingIsSelected=Nothing is selected\nother=Other\nsoftwaredesign=Software Design\nvenndiagrams=Venn Diagrams\nwebEmailOrOther=Web, email or any other internet address\nwebLink=Web Link\nwireframes=Wireframes\nproperty=Property\nvalue=Value\nshowMore=Show More\nshowLess=Show Less\nmyDiagrams=My Diagrams\nallDiagrams=All Diagrams\nrecentlyUsed=Recently used\nlistView=List view\ngridView=Grid view\nresultsFor=Results for \'{1}\'\noneDriveCharsNotAllowed=The following characters are not allowed: ~ " # % * : < > ? / { | }\noneDriveInvalidDeviceName=The specified device name is invalid\nofficeNotLoggedOD=You are not logged in to OneDrive. Please open draw.io task pane and login first.\nofficeSelectSingleDiag=Please select a single draw.io diagram only without other contents.\nofficeSelectDiag=Please select a draw.io diagram.\nofficeCannotFindDiagram=Cannot find a draw.io diagram in the selection\nnoDiagrams=No diagrams found\nauthFailed=Authentication failed\nofficeFailedAuthMsg=Unable to successfully authenticate user or authorize application.\nconvertingDiagramFailed=Converting diagram failed\nofficeCopyImgErrMsg=Due to some limitations in the host application, the image could not be inserted. Please manually copy the image then paste it to the document.\ninsertingImageFailed=Inserting image failed\nofficeCopyImgInst=Instructions: Right-click the image below. Select "Copy image" from the context menu. Then, in the document, right-click and select "Paste" from the context menu.\nfolderEmpty=Folder is empty\nrecent=Recent\nsharedWithMe=Shared With Me\nsharepointSites=Sharepoint Sites\nerrorFetchingFolder=Error fetching folder items\nerrorAuthOD=Error authenticating to OneDrive\nofficeMainHeader=Adds draw.io diagrams to your document.\nofficeStepsHeader=This add-in performs the following steps:\nofficeStep1=Connects to Microsoft OneDrive, Google Drive or your device.\nofficeStep2=Select a draw.io diagram.\nofficeStep3=Insert the diagram into the document.\nofficeAuthPopupInfo=Please complete the authentication in the pop-up window.\nofficeSelDiag=Select draw.io Diagram:\nfiles=Files\nshared=Shared\nsharepoint=Sharepoint\nofficeManualUpdateInst=Instructions: Copy draw.io diagram from the document. Then, in the box below, right-click and select "Paste" from the context menu.\nofficeClickToEdit=Click icon to start editing:\npasteDiagram=Paste draw.io diagram here\nconnectOD=Connect to OneDrive\nselectChildren=Select Children\nselectSiblings=Select Siblings\nselectParent=Select Parent\nselectDescendants=Select Descendants\nlastSaved=Last saved {1} ago\nresolve=Resolve\nreopen=Re-open\nshowResolved=Show Resolved\nreply=Reply\nobjectNotFound=Object not found\nreOpened=Re-opened\nmarkedAsResolved=Marked as resolved\nnoCommentsFound=No comments found\ncomments=Comments\ntimeAgo={1} ago\nconfluenceCloud=Confluence Cloud\nlibraries=Libraries\nconfAnchor=Confluence Page Anchor\nconfTimeout=The connection has timed out\nconfSrvTakeTooLong=The server at {1} is taking too long to respond.\nconfCannotInsertNew=Cannot insert draw.io diagram to a new Confluence page\nconfSaveTry=Please save the page and try again.\nconfCannotGetID=Unable to determine page ID\nconfContactAdmin=Please contact your Confluence administrator.\nreadErr=Read Error\neditingErr=Editing Error\nconfExtEditNotPossible=This diagram cannot be edited externally. Please try editing it while editing the page\nconfEditedExt=Diagram/Page edited externally\ndiagNotFound=Diagram Not Found\nconfEditedExtRefresh=Diagram/Page is edited externally. Please refresh the page.\nconfCannotEditDraftDelOrExt=Cannot edit diagrams in a draft page, diagram is deleted from the page, or diagram is edited externally. Please check the page.\nretBack=Return back\nconfDiagNotPublished=The diagram does not belong to a published page\ncreatedByDraw=Created by draw.io\nfilenameShort=Filename too short\ninvalidChars=Invalid characters\nalreadyExst={1} already exists\ndraftReadErr=Draft Read Error\ndiagCantLoad=Diagram cannot be loaded\ndraftWriteErr=Draft Write Error\ndraftCantCreate=Draft could not be created\nconfDuplName=Duplicate diagram name detected. Please pick another name.\nconfSessionExpired=Looks like your session expired. Log in again to keep working.\nlogin=Login\ndrawPrev=draw.io preview\ndrawDiag=draw.io diagram\ninvalidCallFnNotFound=Invalid Call: {1} not found\ninvalidCallErrOccured=Invalid Call: An error occurred, {1}\nanonymous=Anonymous\nconfGotoPage=Go to containing page\nshowComments=Show Comments\nconfError=Error: {1}\ngliffyImport=Gliffy Import\ngliffyImportInst1=Click the "Start Import" button to import all Gliffy diagrams to draw.io.\ngliffyImportInst2=Please note that the import procedure will take some time and the browser window must remain open until the import is completed.\nstartImport=Start Import\ndrawConfig=draw.io Configuration\ncustomLib=Custom Libraries\ncustomTemp=Custom Templates\npageIdsExp=Page IDs Export\ndrawReindex=draw.io re-indexing (beta)\nworking=Working\ndrawConfigNotFoundInst=draw.io Configuration Space (DRAWIOCONFIG) does not exist. This space is needed to store draw.io configuration files and custom libraries/templates.\ncreateConfSp=Create Config Space\nunexpErrRefresh=Unexpected error, please refresh the page and try again.\nconfigJSONInst=Write draw.io JSON configuration in the editor below then click save. If you need help, please refer to\nthisPage=this page\ncurCustLib=Current Custom Libraries\nlibName=Library Name\naction=Action\ndrawConfID=draw.io Config ID\naddLibInst=Click the "Add Library" button to upload a new library.\naddLib=Add Library\ncustomTempInst1=Custom templates are draw.io diagrams saved in children pages of\ncustomTempInst2=For more details, please refer to\ntempsPage=Templates page\npageIdsExpInst1=Select export target, then click the "Start Export" button to export all pages IDs.\npageIdsExpInst2=Please note that the export procedure will take some time and the browser window must remain open until the export is completed.\nstartExp=Start Export\nrefreshDrawIndex=Refresh draw.io Diagrams Index\nreindexInst1=Click the "Start Indexing" button to refresh draw.io diagrams index.\nreindexInst2=Please note that the indexing procedure will take some time and the browser window must remain open until the indexing is completed.\nstartIndexing=Start Indexing\nconfAPageFoundFetch=Page "{1}" found. Fetching\nconfAAllDiagDone=All {1} diagrams processed. Process finished.\nconfAStartedProcessing=Started processing page "{1}"\nconfAAllDiagInPageDone=All {1} diagrams in page "{2}" processed successfully.\nconfAPartialDiagDone={1} out of {2} {3} diagrams in page "{4}" processed successfully.\nconfAUpdatePageFailed=Updating page "{1}" failed.\nconfANoDiagFoundInPage=No {1} diagrams found in page "{2}".\nconfAFetchPageFailed=Fetching the page failed.\nconfANoDiagFound=No {1} diagrams found. Process finished.\nconfASearchFailed=Searching for {1} diagrams failed. Please try again later.\nconfAGliffyDiagFound={2} diagram "{1}" found. Importing\nconfAGliffyDiagImported={2} diagram "{1}" imported successfully.\nconfASavingImpGliffyFailed=Saving imported {2} diagram "{1}" failed.\nconfAImportedFromByDraw=Imported from "{1}" by draw.io\nconfAImportGliffyFailed=Importing {2} diagram "{1}" failed.\nconfAFetchGliffyFailed=Fetching {2} diagram "{1}" failed.\nconfACheckBrokenDiagLnk=Checking for broken diagrams links.\nconfADelDiagLinkOf=Deleting diagram link of "{1}"\nconfADupLnk=(duplicate link)\nconfADelDiagLnkFailed=Deleting diagram link of "{1}" failed.\nconfAUnexpErrProcessPage=Unexpected error during processing the page with id: {1}\nconfADiagFoundIndex=Diagram "{1}" found. Indexing\nconfADiagIndexSucc=Diagram "{1}" indexed successfully.\nconfAIndexDiagFailed=Indexing diagram "{1}" failed.\nconfASkipDiagOtherPage=Skipped "{1}" as it belongs to another page!\nconfADiagUptoDate=Diagram "{1}" is up to date.\nconfACheckPagesWDraw=Checking pages having draw.io diagrams.\nconfAErrOccured=An error occurred!\nsavedSucc=Saved successfully\nconfASaveFailedErr=Saving Failed (Unexpected Error)\ncharacter=Character\nconfAConfPageDesc=This page contains draw.io configuration file (configuration.json) as attachment\nconfALibPageDesc=This page contains draw.io custom libraries as attachments\nconfATempPageDesc=This page contains draw.io custom templates as attachments\nworking=Working\nconfAConfSpaceDesc=This space is used to store draw.io configuration files and custom libraries/templates\nconfANoCustLib=No Custom Libraries\ndelFailed=Delete failed!\nshowID=Show ID\nconfAIncorrectLibFileType=Incorrect file type. Libraries should be XML files.\nuploading=Uploading\nconfALibExist=This library already exists\nconfAUploadSucc=Uploaded successfully\nconfAUploadFailErr=Upload Failed (Unexpected Error)\nhiResPreview=High Res Preview\nofficeNotLoggedGD=You are not logged in to Google Drive. Please open draw.io task pane and login first.\nofficePopupInfo=Please complete the process in the pop-up window.\npickODFile=Pick OneDrive File\npickGDriveFile=Pick Google Drive File\npickDeviceFile=Pick Device File\nvsdNoConfig="vsdurl" is not configured\nruler=Ruler\nunits=Units\npoints=Points\ninches=Inches\nmillimeters=Millimeters\nconfEditDraftDelOrExt=This diagram is in a draft page, is deleted from the page, or is edited externally. It will be saved as a new attachment version and may not be reflected in the page.\nconfDiagEditedExt=Diagram is edited in another session. It will be saved as a new attachment version but the page will show other session\'s modifications.\nmacroNotFound=Macro Not Found\nconfAInvalidPageIdsFormat=Incorrect Page IDs file format\nconfACollectingCurPages=Collecting current pages\nconfABuildingPagesMap=Building pages mapping\nconfAProcessDrawDiag=Started processing imported draw.io diagrams\nconfAProcessDrawDiagDone=Finished processing imported draw.io diagrams\nconfAProcessImpPages=Started processing imported pages\nconfAErrPrcsDiagInPage=Error processing draw.io diagrams in page "{1}"\nconfAPrcsDiagInPage=Processing draw.io diagrams in page "{1}"\nconfAImpDiagram=Importing diagram "{1}"\nconfAImpDiagramFailed=Importing diagram "{1}" failed. Cannot find its new page ID. Maybe it points to a page that is not imported. \nconfAImpDiagramError=Error importing diagram "{1}". Cannot fetch or save the diagram. Cannot fix this diagram links.\nconfAUpdateDgrmCCFailed=Updating link to diagram "{1}" failed.\nconfImpDiagramSuccess=Updating diagram "{1}" done successfully.\nconfANoLnksInDrgm=No links to update in: {1}\nconfAUpdateLnkToPg=Updated link to page: "{1}" in diagram: "{2}"\nconfAUpdateLBLnkToPg=Updated lightbox link to page: "{1}" in diagram: "{2}"\nconfAUpdateLnkBase=Updated base URL from: "{1}" to: "{2}" in diagram: "{3}"\nconfAPageIdsImpDone=Page IDs Import finished\nconfAPrcsMacrosInPage=Processing draw.io macros in page "{1}"\nconfAErrFetchPage=Error fetching page "{1}"\nconfAFixingMacro=Fixing macro of diagram "{1}"\nconfAErrReadingExpFile=Error reading export file\nconfAPrcsDiagInPageDone=Processing draw.io diagrams in page "{1}" finished\nconfAFixingMacroSkipped=Fixing macro of diagram "{1}" failed. Cannot find its new page ID. Maybe it points to a page that is not imported. \npageIdsExpTrg=Export target\nconfALucidDiagImgImported={2} diagram "{1}" image extracted successfully\nconfASavingLucidDiagImgFailed=Extracting {2} diagram "{1}" image failed\nconfGetInfoFailed=Fetching file info from {1} failed.\nconfCheckCacheFailed=Cannot get cached file info.\nconfReadFileErr=Cannot read "{1}" file from {2}.\nconfSaveCacheFailed=Unexpected error. Cannot save cached file\norgChartType=Org Chart Type\nlinear=Linear\nhanger2=Hanger 2\nhanger4=Hanger 4\nfishbone1=Fishbone 1\nfishbone2=Fishbone 2\n1ColumnLeft=Single Column Left\n1ColumnRight=Single Column Right\nsmart=Smart\nparentChildSpacing=Parent Child Spacing\nsiblingSpacing=Sibling Spacing\nconfNoPermErr=Sorry, you don\'t have enough permissions to view this embedded diagram from page {1}\ncopyAsImage=Copy as Image\nlucidImport=Lucidchart Import\nlucidImportInst1=Click the "Start Import" button to import all Lucidchart diagrams.\ninstallFirst=Please install {1} first\ndrawioChromeExt=draw.io Chrome Extension\nloginFirstThen=Please login to {1} first, then {2}\nerrFetchDocList=Error: Couldn\'t fetch documents list\nbuiltinPlugins=Built-in Plugins\nextPlugins=External Plugins\nbackupFound=Backup file found\nchromeOnly=This feature only works in Google Chrome\nmsgDeleted=This message has been deleted\nconfAErrFetchDrawList=Error fetching diagrams list. Some diagrams are skipped.\nconfAErrCheckDrawDiag=Cannot check diagram {1}\nconfAErrFetchPageList=Error fetching pages list\nconfADiagImportIncom={1} diagram "{2}" is imported partially and may have missing shapes\ninvalidSel=Invalid selection\ndiagNameEmptyErr=Diagram name cannot be empty\nopenDiagram=Open Diagram\nnewDiagram=New diagram\neditable=Editable\nconfAReimportStarted=Re-import {1} diagrams started...\nspaceFilter=Filter by spaces\ncurViewState=Current Viewer State\npageLayers=Page and Layers\ncustomize=Customize\nfirstPage=First Page (All Layers)\ncurEditorState=Current Editor State\nnoAnchorsFound=No anchors found \nattachment=Attachment\ncurDiagram=Current Diagram\nrecentDiags=Recent Diagrams\ncsvImport=CSV Import\nchooseFile=Choose a file...\nchoose=Choose\ngdriveFname=Google Drive filename\nwidthOfViewer=Width of the viewer (px)\nheightOfViewer=Height of the viewer (px)\nautoSetViewerSize=Automatically set the size of the viewer\nthumbnail=Thumbnail\nprevInDraw=Preview in draw.io\nonedriveFname=OneDrive filename\ndiagFname=Diagram filename\ndiagUrl=Diagram URL\nshowDiag=Show Diagram\ndiagPreview=Diagram Preview\ncsvFileUrl=CSV File URL\ngenerate=Generate\nselectDiag2Insert=Please select a diagram to insert it.\nerrShowingDiag=Unexpected error. Cannot show diagram\nnoRecentDiags=No recent diagrams found\nfetchingRecentFailed=Failed to fetch recent diagrams\nuseSrch2FindDiags=Use the search box to find draw.io diagrams\ncantReadChckPerms=Cannot read the specified diagram. Please check you have read permission on that file.\ncantFetchChckPerms=Cannot fetch diagram info. Please check you have read permission on that file.\nsearchFailed=Searching failed. Please try again later.\nplsTypeStr=Please type a search string.\nunsupportedFileChckUrl=Unsupported file. Please check the specified URL\ndiagNotFoundChckUrl=Diagram not found or cannot be accessed. Please check the specified URL\ncsvNotFoundChckUrl=CSV file not found or cannot be accessed. Please check the specified URL\ncantReadUpload=Cannot read the uploaded diagram\nselect=Select\nerrCantGetIdType=Unexpected Error: Cannot get content id or type.\nerrGAuthWinBlocked=Error: Google Authentication window blocked\nauthDrawAccess=Authorize draw.io to access {1}\nconnTimeout=The connection has timed out\nerrAuthSrvc=Error authenticating to {1}\nplsSelectFile=Please select a file\nmustBgtZ={1} must be greater than zero\ncantLoadPrev=Cannot load file preview.\nerrAccessFile=Error: Access Denied. You do not have permission to access "{1}".\nnoPrevAvail=No preview is available.\npersonalAccNotSup=Personal accounts are not supported.\nerrSavingTryLater=Error occurred during saving, please try again later.\nplsEnterFld=Please enter {1}\ninvalidDiagUrl=Invalid Diagram URL\nunsupportedVsdx=Unsupported vsdx file\nunsupportedImg=Unsupported image file\nunsupportedFormat=Unsupported file format\nplsSelectSingleFile=Please select a single file only\nattCorrupt=Attachment file "{1}" is corrupted\nloadAttFailed=Failed to load attachment "{1}"\nembedDrawDiag=Embed draw.io Diagram\naddDiagram=Add Diagram\nembedDiagram=Embed Diagram\neditOwningPg=Edit owning page\ndeepIndexing=Deep Indexing (Index diagrams that aren\'t used in any page also)\nconfADeepIndexStarted=Deep Indexing Started\nconfADeepIndexDone=Deep Indexing Done\nofficeNoDiagramsSelected=No diagrams found in the selection\nofficeNoDiagramsInDoc=No diagrams found in the document\nofficeNotSupported=This feature is not supported in this host application\nsomeImagesFailed={1} out of {2} failed due to the following errors\nimportingNoUsedDiagrams=Importing {1} Diagrams not used in pages\nimportingDrafts=Importing {1} Diagrams in drafts\nprocessingDrafts=Processing drafts\nupdatingDrafts=Updating drafts\nupdateDrafts=Update drafts\nnotifications=Notifications\ndrawioImp=draw.io Import\nconfALibsImp=Importing draw.io Libraries\nconfALibsImpFailed=Importing {1} library failed\ncontributors=Contributors\ndrawDiagrams=draw.io Diagrams\nerrFileNotFoundOrNoPer=Error: Access Denied. File not found or you do not have permission to access "{1}" on {2}.\nconfACheckPagesWEmbed=Checking pages having embedded draw.io diagrams.\nconfADelBrokenEmbedDiagLnk=Removing broken embedded diagram links\nreplaceWith=Replace with\nreplaceAll=Replace All\nconfASkipDiagModified=Skipped "{1}" as it was modified after initial import\nreplFind=Replace/Find\nmatchesRepl={1} matches replaced\ndraftErrDataLoss=An error occurred while reading the draft file. The diagram cannot be edited now to prevent any possible data loss. Please try again later or contact support.\nibm=IBM\nlinkToDiagramHint=Add a link to this diagram. The diagram can only be edited from the page that owns it.\nlinkToDiagram=Link to Diagram\nchangedBy=Changed By\nlastModifiedOn=Last modified on\nsearchResults=Search Results\nshowAllTemps=Show all templates\nnotionToken=Notion Token\nselectDB=Select Database\nnoDBs=No Databases\ndiagramEdited={1} diagram "{2}" edited\n');Graph.prototype.defaultThemes["default-style2"]=mxUtils.parseXml('<mxStylesheet><add as="defaultVertex"><add as="shape" value="label"/><add as="perimeter" value="rectanglePerimeter"/><add as="fontSize" value="12"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="fillColor" value="#ffffff"/><add as="strokeColor" value="#000000"/><add as="fontColor" value="#000000"/></add><add as="defaultEdge"><add as="shape" value="connector"/><add as="labelBackgroundColor" value="#ffffff"/><add as="endArrow" value="classic"/><add as="fontSize" value="11"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="rounded" value="1"/><add as="strokeColor" value="#000000"/><add as="fontColor" value="#000000"/></add><add as="text"><add as="fillColor" value="none"/><add as="gradientColor" value="none"/><add as="strokeColor" value="none"/><add as="align" value="left"/><add as="verticalAlign" value="top"/></add><add as="edgeLabel" extend="text"><add as="labelBackgroundColor" value="#ffffff"/><add as="fontSize" value="11"/></add><add as="label"><add as="fontStyle" value="1"/><add as="align" value="left"/><add as="verticalAlign" value="middle"/><add as="spacing" value="2"/><add as="spacingLeft" value="52"/><add as="imageWidth" value="42"/><add as="imageHeight" value="42"/><add as="rounded" value="1"/></add><add as="icon" extend="label"><add as="align" value="center"/><add as="imageAlign" value="center"/><add as="verticalLabelPosition" value="bottom"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="4"/><add as="labelBackgroundColor" value="#ffffff"/><add as="spacing" value="0"/><add as="spacingLeft" value="0"/><add as="spacingTop" value="6"/><add as="fontStyle" value="0"/><add as="imageWidth" value="48"/><add as="imageHeight" value="48"/></add><add as="swimlane"><add as="shape" value="swimlane"/><add as="fontSize" value="12"/><add as="fontStyle" value="1"/><add as="startSize" value="23"/></add><add as="group"><add as="verticalAlign" value="top"/><add as="fillColor" value="none"/><add as="strokeColor" value="none"/><add as="gradientColor" value="none"/><add as="pointerEvents" value="0"/></add><add as="ellipse"><add as="shape" value="ellipse"/><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombus"><add as="shape" value="rhombus"/><add as="perimeter" value="rhombusPerimeter"/></add><add as="triangle"><add as="shape" value="triangle"/><add as="perimeter" value="trianglePerimeter"/></add><add as="line"><add as="shape" value="line"/><add as="strokeWidth" value="4"/><add as="labelBackgroundColor" value="#ffffff"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="8"/></add><add as="image"><add as="shape" value="image"/><add as="labelBackgroundColor" value="white"/><add as="verticalAlign" value="top"/><add as="verticalLabelPosition" value="bottom"/></add><add as="roundImage" extend="image"><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombusImage" extend="image"><add as="perimeter" value="rhombusPerimeter"/></add><add as="arrow"><add as="shape" value="arrow"/><add as="edgeStyle" value="none"/><add as="fillColor" value="#ffffff"/></add><add as="fancy"><add as="shadow" value="1"/><add as="glass" value="1"/></add><add as="gray" extend="fancy"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="blue" extend="fancy"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="green" extend="fancy"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="turquoise" extend="fancy"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="yellow" extend="fancy"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="orange" extend="fancy"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="red" extend="fancy"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="pink" extend="fancy"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="purple" extend="fancy"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add><add as="plain-gray"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="plain-blue"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="plain-green"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="plain-turquoise"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="plain-yellow"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="plain-orange"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="plain-red"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="plain-pink"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="plain-purple"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add></mxStylesheet>').documentElement;
+A.appendChild(m.diagramContainer);k.appendChild(A);m.updateTabContainer();null==W&&A.appendChild(m.tabContainer);var va=null;g();mxEvent.addListener(window,"resize",function(){g();null!=m.sidebarWindow&&m.sidebarWindow.window.fit();null!=m.formatWindow&&m.formatWindow.window.fit();null!=m.actions.outlineWindow&&m.actions.outlineWindow.window.fit();null!=m.actions.layersWindow&&m.actions.layersWindow.window.fit();null!=m.menus.tagsWindow&&m.menus.tagsWindow.window.fit();null!=m.menus.findWindow&&m.menus.findWindow.window.fit();
+null!=m.menus.findReplaceWindow&&m.menus.findReplaceWindow.window.fit()})}}};(function(){var a=!1;"min"!=uiTheme||a||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),a=!0);var b=EditorUi.initTheme;EditorUi.initTheme=function(){b.apply(this,arguments);"min"!=uiTheme||a||(this.initMinimalTheme(),a=!0)}})();DrawioComment=function(a,b,d,g,f,m,p){this.file=a;this.id=b;this.content=d;this.modifiedDate=g;this.createdDate=f;this.isResolved=m;this.user=p;this.replies=[]};DrawioComment.prototype.addReplyDirect=function(a){null!=a&&this.replies.push(a)};DrawioComment.prototype.addReply=function(a,b,d,g,f){b()};DrawioComment.prototype.editComment=function(a,b,d){b()};DrawioComment.prototype.deleteComment=function(a,b){a()};DrawioUser=function(a,b,d,g,f){this.id=a;this.email=b;this.displayName=d;this.pictureUrl=g;this.locale=f};mxResources.parse('# *DO NOT DIRECTLY EDIT THIS FILE, IT IS AUTOMATICALLY GENERATED AND IT IS BASED ON:*\n# https://docs.google.com/spreadsheet/ccc?key=0AmQEO36liL4FdDJLWVNMaVV2UmRKSnpXU09MYkdGbEE\nabout=About \naboutDrawio=About draw.io\naccessDenied=Access Denied\naction=Action\nactualSize=Actual Size\nadd=Add\naddAccount=Add account\naddedFile=Added {1}\naddImages=Add Images\naddImageUrl=Add Image URL\naddLayer=Add Layer\naddProperty=Add Property\naddress=Address\naddToExistingDrawing=Add to Existing Drawing\naddWaypoint=Add Waypoint\nadjustTo=Adjust to\nadvanced=Advanced\nalign=Align\nalignment=Alignment\nallChangesLost=All changes will be lost!\nallPages=All Pages\nallProjects=All Projects\nallSpaces=All Spaces\nallTags=All Tags\nanchor=Anchor\nandroid=Android\nangle=Angle\narc=Arc\nareYouSure=Are you sure?\nensureDataSaved=Please ensure your data is saved before closing.\nallChangesSaved=All changes saved\nallChangesSavedInDrive=All changes saved in Drive\nallowPopups=Allow pop-ups to avoid this dialog.\nallowRelativeUrl=Allow relative URL\nalreadyConnected=Nodes already connected\napply=Apply\narchiMate21=ArchiMate 2.1\narrange=Arrange\narrow=Arrow\narrows=Arrows\nasNew=As New\natlas=Atlas\nauthor=Author\nauthorizationRequired=Authorization required\nauthorizeThisAppIn=Authorize this app in {1}:\nauthorize=Authorize\nauthorizing=Authorizing\nautomatic=Automatic\nautosave=Autosave\nautosize=Autosize\nattachments=Attachments\naws=AWS\naws3d=AWS 3D\nazure=Azure\nback=Back\nbackground=Background\nbackgroundColor=Background Color\nbackgroundImage=Background Image\nbasic=Basic\nblankDrawing=Blank Drawing\nblankDiagram=Blank Diagram\nblock=Block\nblockquote=Blockquote\nblog=Blog\nbold=Bold\nbootstrap=Bootstrap\nborder=Border\nborderColor=Border Color\nborderWidth=Border Width\nbottom=Bottom\nbottomAlign=Bottom Align\nbottomLeft=Bottom Left\nbottomRight=Bottom Right\nbpmn=BPMN\nbringForward=Bring Forward\nbrowser=Browser\nbulletedList=Bulleted List\nbusiness=Business\nbusy=Operation in progress\ncabinets=Cabinets\ncancel=Cancel\ncenter=Center\ncannotLoad=Load attempts failed. Please try again later.\ncannotLogin=Log in attempts failed. Please try again later.\ncannotOpenFile=Cannot open file\nchange=Change\nchangeOrientation=Change Orientation\nchangeUser=Change user\nchangeStorage=Change storage\nchangesNotSaved=Changes have not been saved\nclassDiagram=Class Diagram\nuserJoined={1} has joined\nuserLeft={1} has left\nchatWindowTitle=Chat\nchooseAnOption=Choose an option\nchromeApp=Chrome App\ncollaborativeEditingNotice=Important Notice for Collaborative Editing\ncompare=Compare\ncompressed=Compressed\ncommitMessage=Commit Message\nconfigLinkWarn=This link configures draw.io. Only click OK if you trust whoever gave you it!\nconfigLinkConfirm=Click OK to configure and restart draw.io.\ncontainer=Container\ncsv=CSV\ndark=Dark\ndiagramXmlDesc=XML File\ndiagramHtmlDesc=HTML File\ndiagramPngDesc=Editable Bitmap Image\ndiagramSvgDesc=Editable Vector Image\ndidYouMeanToExportToPdf=Did you mean to export to PDF?\ndraftFound=A draft for \'{1}\' has been found. Load it into the editor or discard it to continue.\ndraftRevisionMismatch=There is a different version of this diagram on a shared draft of this page. Please edit the diagram from the draft to ensure you are working with the latest version.\nselectDraft=Select a draft to continue editing:\ndragAndDropNotSupported=Drag and drop not supported for images. Would you like to import instead?\ndropboxCharsNotAllowed=The following characters are not allowed: / : ? * " |\ncheck=Check\nchecksum=Checksum\ncircle=Circle\ncisco=Cisco\nclassic=Classic\nclearDefaultStyle=Clear Default Style\nclearWaypoints=Clear Waypoints\nclipart=Clipart\nclose=Close\nclosingFile=Closing file\ncollaborator=Collaborator\ncollaborators=Collaborators\ncollapse=Collapse\ncollapseExpand=Collapse/Expand\ncollapse-expand=Click to collapse/expand\nShift-click to move neighbors \nAlt-click to protect group size\ncollapsible=Collapsible\ncomic=Comic\ncomment=Comment\ncommentsNotes=Comments/Notes\ncompress=Compress\nconfiguration=Configuration\nconnect=Connect\nconnecting=Connecting\nconnectWithDrive=Connect with Google Drive\nconnection=Connection\nconnectionArrows=Connection Arrows\nconnectionPoints=Connection Points\nconstrainProportions=Constrain Proportions\ncontainsValidationErrors=Contains validation errors\ncopiedToClipboard=Copied to clipboard\ncopy=Copy\ncopyConnect=Copy on connect\ncopyCreated=A copy of the file was created.\ncopyData=Copy Data\ncopyOf=Copy of {1}\ncopyOfDrawing=Copy of Drawing\ncopySize=Copy Size\ncopyStyle=Copy Style\ncreate=Create\ncreateNewDiagram=Create New Diagram\ncreateRevision=Create Revision\ncreateShape=Create Shape\ncrop=Crop\ncurved=Curved\ncustom=Custom\ncurrent=Current\ncurrentPage=Current page\ncut=Cut\ndashed=Dashed\ndecideLater=Decide later\ndefault=Default\ndelete=Delete\ndeleteColumn=Delete Column\ndeleteLibrary401=Insufficient permissions to delete this library\ndeleteLibrary404=Selected library could not be found\ndeleteLibrary500=Error deleting library\ndeleteLibraryConfirm=You are about to permanently delete this library. Are you sure you want to do this?\ndeleteRow=Delete Row\ndescription=Description\ndevice=Device\ndiagram=Diagram\ndiagramContent=Diagram Content\ndiagramLocked=Diagram has been locked to prevent further data loss.\ndiagramLockedBySince=The diagram is locked by {1} since {2} ago\ndiagramName=Diagram Name\ndiagramIsPublic=Diagram is public\ndiagramIsNotPublic=Diagram is not public\ndiamond=Diamond\ndiamondThin=Diamond (thin)\ndidYouKnow=Did you know...\ndirection=Direction\ndiscard=Discard\ndiscardChangesAndReconnect=Discard Changes and Reconnect\ngoogleDriveMissingClickHere=Google Drive missing? Click here!\ndiscardChanges=Discard Changes\ndisconnected=Disconnected\ndistribute=Distribute\ndone=Done\ndoNotShowAgain=Do not show again\ndotted=Dotted\ndoubleClickOrientation=Doubleclick to change orientation\ndoubleClickTooltip=Doubleclick to insert text\ndoubleClickChangeProperty=Doubleclick to change property name\ndownload=Download\ndownloadDesktop=Get Desktop\ndownloadAs=Download as\nclickHereToSave=Click here to save.\ndpi=DPI\ndraftDiscarded=Draft discarded\ndraftSaved=Draft saved\ndragElementsHere=Drag elements here\ndragImagesHere=Drag images or URLs here\ndragUrlsHere=Drag URLs here\ndraw.io=draw.io\ndrawing=Drawing{1}\ndrawingEmpty=Drawing is empty\ndrawingTooLarge=Drawing is too large\ndrawioForWork=Draw.io for GSuite\ndropbox=Dropbox\nduplicate=Duplicate\nduplicateIt=Duplicate {1}\ndivider=Divider\ndx=Dx\ndy=Dy\neast=East\nedit=Edit\neditData=Edit Data\neditDiagram=Edit Diagram\neditGeometry=Edit Geometry\neditImage=Edit Image\neditImageUrl=Edit Image URL\neditLink=Edit Link\neditShape=Edit Shape\neditStyle=Edit Style\neditText=Edit Text\neditTooltip=Edit Tooltip\nglass=Glass\ngoogleImages=Google Images\nimageSearch=Image Search\neip=EIP\nembed=Embed\nembedImages=Embed Images\nmainEmbedNotice=Paste this into the page\nelectrical=Electrical\nellipse=Ellipse\nembedNotice=Paste this once at the end of the page\nenterGroup=Enter Group\nenterName=Enter Name\nenterPropertyName=Enter Property Name\nenterValue=Enter Value\nentityRelation=Entity Relation\nentityRelationshipDiagram=Entity Relationship Diagram\nerror=Error\nerrorDeletingFile=Error deleting file\nerrorLoadingFile=Error loading file\nerrorRenamingFile=Error renaming file\nerrorRenamingFileNotFound=Error renaming file. File was not found.\nerrorRenamingFileForbidden=Error renaming file. Insufficient access rights.\nerrorSavingDraft=Error saving draft\nerrorSavingFile=Error saving file\nerrorSavingFileUnknown=Error authorizing with Google\'s servers. Please refresh the page to re-attempt.\nerrorSavingFileForbidden=Error saving file. Insufficient access rights.\nerrorSavingFileNameConflict=Could not save diagram. Current page already contains file named \'{1}\'.\nerrorSavingFileNotFound=Error saving file. File was not found.\nerrorSavingFileReadOnlyMode=Could not save diagram while read-only mode is active.\nerrorSavingFileSessionTimeout=Your session has ended. Please <a target=\'_blank\' href=\'{1}\'>{2}</a> and return to this tab to try to save again.\nerrorSendingFeedback=Error sending feedback.\nerrorUpdatingPreview=Error updating preview.\nexit=Exit\nexitGroup=Exit Group\nexpand=Expand\nexport=Export\nexporting=Exporting\nexportAs=Export as\nexportOptionsDisabled=Export options disabled\nexportOptionsDisabledDetails=The owner has disabled options to download, print or copy for commenters and viewers on this file.\nexternalChanges=External Changes\nextras=Extras\nfacebook=Facebook\nfailedToSaveTryReconnect=Failed to save, trying to reconnect\nfeatureRequest=Feature Request\nfeedback=Feedback\nfeedbackSent=Feedback successfully sent.\nfloorplans=Floorplans\nfile=File\nfileChangedOverwriteDialog=The file has been modified. Do you want to save the file and overwrite those changes?\nfileChangedSyncDialog=The file has been modified. Do you want to synchronize those changes?\nfileChangedSync=The file has been modified. Click here to synchronize.\noverwrite=Overwrite\nsynchronize=Synchronize\nfilename=Filename\nfileExists=File already exists\nfileMovedToTrash=File was moved to trash\nfileNearlyFullSeeFaq=File nearly full, please see FAQ\nfileNotFound=File not found\nrepositoryNotFound=Repository not found\nfileNotFoundOrDenied=The file was not found. It does not exist or you do not have access.\nfileNotLoaded=File not loaded\nfileNotSaved=File not saved\nfileOpenLocation=How would you like to open these file(s)?\nfiletypeHtml=.html causes file to save as HTML with redirect to cloud URL\nfiletypePng=.png causes file to save as PNG with embedded data\nfiletypeSvg=.svg causes file to save as SVG with embedded data\nfileWillBeSavedInAppFolder={1} will be saved in the app folder.\nfill=Fill\nfillColor=Fill Color\nfilterCards=Filter Cards\nfind=Find\nfit=Fit\nfitContainer=Resize Container\nfitIntoContainer=Fit into Container\nfitPage=Fit Page\nfitPageWidth=Fit Page Width\nfitTo=Fit to\nfitToSheetsAcross=sheet(s) across\nfitToBy=by\nfitToSheetsDown=sheet(s) down\nfitTwoPages=Two Pages\nfitWindow=Fit Window\nflip=Flip\nflipH=Flip Horizontal\nflipV=Flip Vertical\nflowchart=Flowchart\nfolder=Folder\nfont=Font\nfontColor=Font Color\nfontFamily=Font Family\nfontSize=Font Size\nforbidden=You are not authorized to access this file\nformat=Format\nformatPanel=Format Panel\nformatted=Formatted\nformattedText=Formatted Text\nformatPng=PNG\nformatGif=GIF\nformatJpg=JPEG\nformatPdf=PDF\nformatSql=SQL\nformatSvg=SVG\nformatHtmlEmbedded=HTML\nformatSvgEmbedded=SVG (with XML)\nformatVsdx=VSDX\nformatVssx=VSSX\nformatXmlPlain=XML (Plain)\nformatXml=XML\nforum=Discussion/Help Forums\nfreehand=Freehand\nfromTemplate=From Template\nfromTemplateUrl=From Template URL\nfromText=From Text\nfromUrl=From URL\nfromThisPage=From this page\nfullscreen=Fullscreen\ngap=Gap\ngcp=GCP\ngeneral=General\ngithub=GitHub\ngitlab=GitLab\ngliffy=Gliffy\nglobal=Global\ngoogleDocs=Google Docs\ngoogleDrive=Google Drive\ngoogleGadget=Google Gadget\ngooglePlus=Google+\ngoogleSharingNotAvailable=Sharing is only available via Google Drive. Please click Open below and share from the more actions menu:\ngoogleSlides=Google Slides\ngoogleSites=Google Sites\ngoogleSheets=Google Sheets\ngradient=Gradient\ngradientColor=Color\ngrid=Grid\ngridColor=Grid Color\ngridSize=Grid Size\ngroup=Group\nguides=Guides\nhateApp=I hate draw.io\nheading=Heading\nheight=Height\nhelp=Help\nhelpTranslate=Help us translate this application\nhide=Hide\nhideIt=Hide {1}\nhidden=Hidden\nhome=Home\nhorizontal=Horizontal\nhorizontalFlow=Horizontal Flow\nhorizontalTree=Horizontal Tree\nhowTranslate=How good is the translation in your language?\nhtml=HTML\nhtmlText=HTML Text\nid=ID\niframe=IFrame\nignore=Ignore\nimage=Image\nimageUrl=Image URL\nimages=Images\nimagePreviewError=This image couldn\'t be loaded for preview. Please check the URL.\nimageTooBig=Image too big\nimgur=Imgur\nimport=Import\nimportFrom=Import from\nincludeCopyOfMyDiagram=Include a copy of my diagram\nincreaseIndent=Increase Indent\ndecreaseIndent=Decrease Indent\ninsert=Insert\ninsertColumnBefore=Insert Column Left\ninsertColumnAfter=Insert Column Right\ninsertEllipse=Insert Ellipse\ninsertImage=Insert Image\ninsertHorizontalRule=Insert Horizontal Rule\ninsertLink=Insert Link\ninsertPage=Insert Page\ninsertRectangle=Insert Rectangle\ninsertRhombus=Insert Rhombus\ninsertRowBefore=Insert Row Above\ninsertRowAfter=Insert Row After\ninsertText=Insert Text\ninserting=Inserting\ninstallApp=Install App\ninvalidFilename=Diagram names must not contain the following characters: / | : ; { } < > & + ? = "\ninvalidLicenseSeeThisPage=Your license is invalid, please see this <a target="_blank" href="https://support.draw.io/display/DFCS/Licensing+your+draw.io+plugin">page</a>.\ninvalidInput=Invalid input\ninvalidName=Invalid name\ninvalidOrMissingFile=Invalid or missing file\ninvalidPublicUrl=Invalid public URL\nisometric=Isometric\nios=iOS\nitalic=Italic\nkennedy=Kennedy\nkeyboardShortcuts=Keyboard Shortcuts\nlayers=Layers\nlandscape=Landscape\nlanguage=Language\nleanMapping=Lean Mapping\nlastChange=Last change {1} ago\nlessThanAMinute=less than a minute\nlicensingError=Licensing Error\nlicenseHasExpired=The license for {1} has expired on {2}. Click here.\nlicenseRequired=This feature requires draw.io to be licensed.\nlicenseWillExpire=The license for {1} will expire on {2}. Click here.\nlineJumps=Line jumps\nlinkAccountRequired=If the diagram is not public a Google account is required to view the link.\nlinkText=Link Text\nlist=List\nminute=minute\nminutes=minutes\nhours=hours\ndays=days\nmonths=months\nyears=years\nrestartForChangeRequired=Changes will take effect after a restart of the application.\nlaneColor=Lanecolor\nlastModified=Last modified\nlayout=Layout\nleft=Left\nleftAlign=Left Align\nleftToRight=Left to right\nlibraryTooltip=Drag and drop shapes here or click + to insert. Double click to edit.\nlightbox=Lightbox\nline=Line\nlineend=Line end\nlineheight=Line Height\nlinestart=Line start\nlinewidth=Linewidth\nlink=Link\nlinks=Links\nloading=Loading\nlockUnlock=Lock/Unlock\nloggedOut=Logged Out\nlogIn=log in\nloveIt=I love {1}\nlucidchart=Lucidchart\nmaps=Maps\nmathematicalTypesetting=Mathematical Typesetting\nmakeCopy=Make a Copy\nmanual=Manual\nmerge=Merge\nmermaid=Mermaid\nmicrosoftOffice=Microsoft Office\nmicrosoftExcel=Microsoft Excel\nmicrosoftPowerPoint=Microsoft PowerPoint\nmicrosoftWord=Microsoft Word\nmiddle=Middle\nminimal=Minimal\nmisc=Misc\nmockups=Mockups\nmodificationDate=Modification date\nmodifiedBy=Modified by\nmore=More\nmoreResults=More Results\nmoreShapes=More Shapes\nmove=Move\nmoveToFolder=Move to Folder\nmoving=Moving\nmoveSelectionTo=Move selection to {1}\nname=Name\nnavigation=Navigation\nnetwork=Network\nnetworking=Networking\nnew=New\nnewLibrary=New Library\nnextPage=Next Page\nno=No\nnoPickFolder=No, pick folder\nnoAttachments=No attachments found\nnoColor=No Color\nnoFiles=No Files\nnoFileSelected=No file selected\nnoLibraries=No libraries found\nnoMoreResults=No more results\nnone=None\nnoOtherViewers=No other viewers\nnoPlugins=No plugins\nnoPreview=No preview\nnoResponse=No response from server\nnoResultsFor=No results for \'{1}\'\nnoRevisions=No revisions\nnoSearchResults=No search results found\nnoPageContentOrNotSaved=No anchors found on this page or it hasn\'t been saved yet\nnormal=Normal\nnorth=North\nnotADiagramFile=Not a diagram file\nnotALibraryFile=Not a library file\nnotAvailable=Not available\nnotAUtf8File=Not a UTF-8 file\nnotConnected=Not connected\nnote=Note\nnotion=Notion\nnotSatisfiedWithImport=Not satisfied with the import?\nnotUsingService=Not using {1}?\nnumberedList=Numbered list\noffline=Offline\nok=OK\noneDrive=OneDrive\nonline=Online\nopacity=Opacity\nopen=Open\nopenArrow=Open Arrow\nopenExistingDiagram=Open Existing Diagram\nopenFile=Open File\nopenFrom=Open from\nopenLibrary=Open Library\nopenLibraryFrom=Open Library from\nopenLink=Open Link\nopenInNewWindow=Open in New Window\nopenInThisWindow=Open in This Window\nopenIt=Open {1}\nopenRecent=Open Recent\nopenSupported=Supported formats are files saved from this software (.xml), .vsdx and .gliffy\noptions=Options\norganic=Organic\norgChart=Org Chart\northogonal=Orthogonal\notherViewer=other viewer\notherViewers=other viewers\noutline=Outline\noval=Oval\npage=Page\npageContent=Page Content\npageNotFound=Page not found\npageWithNumber=Page-{1}\npages=Pages\npageView=Page View\npageSetup=Page Setup\npageScale=Page Scale\npan=Pan\npanTooltip=Space+Drag to pan\npaperSize=Paper Size\npattern=Pattern\nparallels=Parallels\npaste=Paste\npasteData=Paste Data\npasteHere=Paste here\npasteSize=Paste Size\npasteStyle=Paste Style\nperimeter=Perimeter\npermissionAnyone=Anyone can edit\npermissionAuthor=Owner and admins can edit\npickFolder=Pick a folder\npickLibraryDialogTitle=Select Library\npublicDiagramUrl=Public URL of the diagram\nplaceholders=Placeholders\nplantUml=PlantUML\nplugins=Plugins\npluginUrl=Plugin URL\npluginWarning=The page has requested to load the following plugin(s):\n \n {1}\n \n Would you like to load these plugin(s) now?\n \n NOTE : Only allow plugins to run if you fully understand the security implications of doing so.\n\nplusTooltip=Click to connect and clone (ctrl+click to clone, shift+click to connect). Drag to connect (ctrl+drag to clone).\nportrait=Portrait\nposition=Position\nposterPrint=Poster Print\npreferences=Preferences\npreview=Preview\npreviousPage=Previous Page\nprint=Print\nprintAllPages=Print All Pages\nprocEng=Proc. Eng.\nproject=Project\npriority=Priority\nproperties=Properties\npublish=Publish\nquickStart=Quick Start Video\nrack=Rack\nradial=Radial\nradialTree=Radial Tree\nreadOnly=Read-only\nreconnecting=Reconnecting\nrecentlyUpdated=Recently Updated\nrecentlyViewed=Recently Viewed\nrectangle=Rectangle\nredirectToNewApp=This file was created or modified in a newer version of this app. You will be redirected now.\nrealtimeTimeout=It looks like you\'ve made a few changes while offline. We\'re sorry, these changes cannot be saved.\nredo=Redo\nrefresh=Refresh\nregularExpression=Regular Expression\nrelative=Relative\nrelativeUrlNotAllowed=Relative URL not allowed\nrememberMe=Remember me\nrememberThisSetting=Remember this setting\nremoveFormat=Clear Formatting\nremoveFromGroup=Remove from Group\nremoveIt=Remove {1}\nremoveWaypoint=Remove Waypoint\nrename=Rename\nrenamed=Renamed\nrenameIt=Rename {1}\nrenaming=Renaming\nreplace=Replace\nreplaceIt={1} already exists. Do you want to replace it?\nreplaceExistingDrawing=Replace existing drawing\nrequired=required\nreset=Reset\nresetView=Reset View\nresize=Resize\nresizeLargeImages=Do you want to resize large images to make the application run faster?\nretina=Retina\nresponsive=Responsive\nrestore=Restore\nrestoring=Restoring\nretryingIn=Retrying in {1} second(s)\nretryingLoad=Load failed. Retrying...\nretryingLogin=Login time out. Retrying...\nreverse=Reverse\nrevision=Revision\nrevisionHistory=Revision History\nrhombus=Rhombus\nright=Right\nrightAlign=Right Align\nrightToLeft=Right to left\nrotate=Rotate\nrotateTooltip=Click and drag to rotate, click to turn shape only by 90 degrees\nrotation=Rotation\nrounded=Rounded\nsave=Save\nsaveAndExit=Save & Exit\nsaveAs=Save as\nsaveAsXmlFile=Save as XML file?\nsaved=Saved\nsaveDiagramFirst=Please save the diagram first\nsaveDiagramsTo=Save diagrams to\nsaveLibrary403=Insufficient permissions to edit this library\nsaveLibrary500=There was an error while saving the library\nsaveLibraryReadOnly=Could not save library while read-only mode is active\nsaving=Saving\nscratchpad=Scratchpad\nscrollbars=Scrollbars\nsearch=Search\nsearchShapes=Search Shapes\nselectAll=Select All\nselectionOnly=Selection Only\nselectCard=Select Card\nselectEdges=Select Edges\nselectFile=Select File\nselectFolder=Select Folder\nselectFont=Select Font\nselectNone=Select None\nselectTemplate=Select Template\nselectVertices=Select Vertices\nsendBackward=Send Backward\nsendMessage=Send\nsendYourFeedback=Send your feedback\nserviceUnavailableOrBlocked=Service unavailable or blocked\nsessionExpired=Your session has expired. Please refresh the browser window.\nsessionTimeoutOnSave=Your session has timed out and you have been disconnected from the Google Drive. Press OK to login and save. \nsetAsDefaultStyle=Set as Default Style\nshadow=Shadow\nshape=Shape\nshapes=Shapes\nshare=Share\nshareLink=Link for shared editing\nsharingAvailable=Sharing available for Google Drive and OneDrive files.\nsharp=Sharp\nshow=Show\nshowStartScreen=Show Start Screen\nsidebarTooltip=Click to expand. Drag and drop shapes into the diagram. Shift+click to change selection. Alt+click to insert and connect.\nsigns=Signs\nsignOut=Sign out\nsimple=Simple\nsimpleArrow=Simple Arrow\nsimpleViewer=Simple Viewer\nsize=Size\nsketch=Sketch\nsolid=Solid\nsourceSpacing=Source Spacing\nsouth=South\nsoftware=Software\nspace=Space\nspacing=Spacing\nspecialLink=Special Link\nstandard=Standard\nstartDrawing=Start drawing\nstopDrawing=Stop drawing\nstarting=Starting\nstraight=Straight\nstrikethrough=Strikethrough\nstrokeColor=Line Color\nstyle=Style\nsubscript=Subscript\nsummary=Summary\nsuperscript=Superscript\nsupport=Support\nswimlaneDiagram=Swimlane Diagram\nsysml=SysML\ntags=Tags\ntable=Table\ntables=Tables\ntakeOver=Take Over\ntargetSpacing=Target Spacing\ntemplate=Template\ntemplates=Templates\ntext=Text\ntextAlignment=Text Alignment\ntextOpacity=Text Opacity\ntheme=Theme\ntimeout=Timeout\ntitle=Title\nto=to\ntoBack=To Back\ntoFront=To Front\ntooLargeUseDownload=Too large, use download instead.\ntoolbar=Toolbar\ntooltips=Tooltips\ntop=Top\ntopAlign=Top Align\ntopLeft=Top Left\ntopRight=Top Right\ntransparent=Transparent\ntransparentBackground=Transparent Background\ntrello=Trello\ntryAgain=Try again\ntryOpeningViaThisPage=Try opening via this page\nturn=Rotate shape only by 90°\ntype=Type\ntwitter=Twitter\numl=UML\nunderline=Underline\nundo=Undo\nungroup=Ungroup\nunsavedChanges=Unsaved changes\nunsavedChangesClickHereToSave=Unsaved changes. Click here to save.\nuntitled=Untitled\nuntitledDiagram=Untitled Diagram\nuntitledLayer=Untitled Layer\nuntitledLibrary=Untitled Library\nunknownError=Unknown error\nupdateFile=Update {1}\nupdatingDocument=Updating Document. Please wait...\nupdatingPreview=Updating Preview. Please wait...\nupdatingSelection=Updating Selection. Please wait...\nupload=Upload\nurl=URL\nuseOffline=Use Offline\nuseRootFolder=Use root folder?\nuserManual=User Manual\nvertical=Vertical\nverticalFlow=Vertical Flow\nverticalTree=Vertical Tree\nview=View\nviewerSettings=Viewer Settings\nviewUrl=Link to view: {1}\nvoiceAssistant=Voice Assistant (beta)\nwarning=Warning\nwaypoints=Waypoints\nwest=West\nwidth=Width\nwiki=Wiki\nwordWrap=Word Wrap\nwritingDirection=Writing Direction\nyes=Yes\nyourEmailAddress=Your email address\nzoom=Zoom\nzoomIn=Zoom In\nzoomOut=Zoom Out\nbasic=Basic\nbusinessprocess=Business Processes\ncharts=Charts\nengineering=Engineering\nflowcharts=Flowcharts\ngmdl=Material Design\nmindmaps=Mindmaps\nmockups=Mockups\nnetworkdiagrams=Network Diagrams\nnothingIsSelected=Nothing is selected\nother=Other\nsoftwaredesign=Software Design\nvenndiagrams=Venn Diagrams\nwebEmailOrOther=Web, email or any other internet address\nwebLink=Web Link\nwireframes=Wireframes\nproperty=Property\nvalue=Value\nshowMore=Show More\nshowLess=Show Less\nmyDiagrams=My Diagrams\nallDiagrams=All Diagrams\nrecentlyUsed=Recently used\nlistView=List view\ngridView=Grid view\nresultsFor=Results for \'{1}\'\noneDriveCharsNotAllowed=The following characters are not allowed: ~ " # % * : < > ? / { | }\noneDriveInvalidDeviceName=The specified device name is invalid\nofficeNotLoggedOD=You are not logged in to OneDrive. Please open draw.io task pane and login first.\nofficeSelectSingleDiag=Please select a single draw.io diagram only without other contents.\nofficeSelectDiag=Please select a draw.io diagram.\nofficeCannotFindDiagram=Cannot find a draw.io diagram in the selection\nnoDiagrams=No diagrams found\nauthFailed=Authentication failed\nofficeFailedAuthMsg=Unable to successfully authenticate user or authorize application.\nconvertingDiagramFailed=Converting diagram failed\nofficeCopyImgErrMsg=Due to some limitations in the host application, the image could not be inserted. Please manually copy the image then paste it to the document.\ninsertingImageFailed=Inserting image failed\nofficeCopyImgInst=Instructions: Right-click the image below. Select "Copy image" from the context menu. Then, in the document, right-click and select "Paste" from the context menu.\nfolderEmpty=Folder is empty\nrecent=Recent\nsharedWithMe=Shared With Me\nsharepointSites=Sharepoint Sites\nerrorFetchingFolder=Error fetching folder items\nerrorAuthOD=Error authenticating to OneDrive\nofficeMainHeader=Adds draw.io diagrams to your document.\nofficeStepsHeader=This add-in performs the following steps:\nofficeStep1=Connects to Microsoft OneDrive, Google Drive or your device.\nofficeStep2=Select a draw.io diagram.\nofficeStep3=Insert the diagram into the document.\nofficeAuthPopupInfo=Please complete the authentication in the pop-up window.\nofficeSelDiag=Select draw.io Diagram:\nfiles=Files\nshared=Shared\nsharepoint=Sharepoint\nofficeManualUpdateInst=Instructions: Copy draw.io diagram from the document. Then, in the box below, right-click and select "Paste" from the context menu.\nofficeClickToEdit=Click icon to start editing:\npasteDiagram=Paste draw.io diagram here\nconnectOD=Connect to OneDrive\nselectChildren=Select Children\nselectSiblings=Select Siblings\nselectParent=Select Parent\nselectDescendants=Select Descendants\nlastSaved=Last saved {1} ago\nresolve=Resolve\nreopen=Re-open\nshowResolved=Show Resolved\nreply=Reply\nobjectNotFound=Object not found\nreOpened=Re-opened\nmarkedAsResolved=Marked as resolved\nnoCommentsFound=No comments found\ncomments=Comments\ntimeAgo={1} ago\nconfluenceCloud=Confluence Cloud\nlibraries=Libraries\nconfAnchor=Confluence Page Anchor\nconfTimeout=The connection has timed out\nconfSrvTakeTooLong=The server at {1} is taking too long to respond.\nconfCannotInsertNew=Cannot insert draw.io diagram to a new Confluence page\nconfSaveTry=Please save the page and try again.\nconfCannotGetID=Unable to determine page ID\nconfContactAdmin=Please contact your Confluence administrator.\nreadErr=Read Error\neditingErr=Editing Error\nconfExtEditNotPossible=This diagram cannot be edited externally. Please try editing it while editing the page\nconfEditedExt=Diagram/Page edited externally\ndiagNotFound=Diagram Not Found\nconfEditedExtRefresh=Diagram/Page is edited externally. Please refresh the page.\nconfCannotEditDraftDelOrExt=Cannot edit diagrams in a draft page, diagram is deleted from the page, or diagram is edited externally. Please check the page.\nretBack=Return back\nconfDiagNotPublished=The diagram does not belong to a published page\ncreatedByDraw=Created by draw.io\nfilenameShort=Filename too short\ninvalidChars=Invalid characters\nalreadyExst={1} already exists\ndraftReadErr=Draft Read Error\ndiagCantLoad=Diagram cannot be loaded\ndraftWriteErr=Draft Write Error\ndraftCantCreate=Draft could not be created\nconfDuplName=Duplicate diagram name detected. Please pick another name.\nconfSessionExpired=Looks like your session expired. Log in again to keep working.\nlogin=Login\ndrawPrev=draw.io preview\ndrawDiag=draw.io diagram\ninvalidCallFnNotFound=Invalid Call: {1} not found\ninvalidCallErrOccured=Invalid Call: An error occurred, {1}\nanonymous=Anonymous\nconfGotoPage=Go to containing page\nshowComments=Show Comments\nconfError=Error: {1}\ngliffyImport=Gliffy Import\ngliffyImportInst1=Click the "Start Import" button to import all Gliffy diagrams to draw.io.\ngliffyImportInst2=Please note that the import procedure will take some time and the browser window must remain open until the import is completed.\nstartImport=Start Import\ndrawConfig=draw.io Configuration\ncustomLib=Custom Libraries\ncustomTemp=Custom Templates\npageIdsExp=Page IDs Export\ndrawReindex=draw.io re-indexing (beta)\nworking=Working\ndrawConfigNotFoundInst=draw.io Configuration Space (DRAWIOCONFIG) does not exist. This space is needed to store draw.io configuration files and custom libraries/templates.\ncreateConfSp=Create Config Space\nunexpErrRefresh=Unexpected error, please refresh the page and try again.\nconfigJSONInst=Write draw.io JSON configuration in the editor below then click save. If you need help, please refer to\nthisPage=this page\ncurCustLib=Current Custom Libraries\nlibName=Library Name\naction=Action\ndrawConfID=draw.io Config ID\naddLibInst=Click the "Add Library" button to upload a new library.\naddLib=Add Library\ncustomTempInst1=Custom templates are draw.io diagrams saved in children pages of\ncustomTempInst2=For more details, please refer to\ntempsPage=Templates page\npageIdsExpInst1=Select export target, then click the "Start Export" button to export all pages IDs.\npageIdsExpInst2=Please note that the export procedure will take some time and the browser window must remain open until the export is completed.\nstartExp=Start Export\nrefreshDrawIndex=Refresh draw.io Diagrams Index\nreindexInst1=Click the "Start Indexing" button to refresh draw.io diagrams index.\nreindexInst2=Please note that the indexing procedure will take some time and the browser window must remain open until the indexing is completed.\nstartIndexing=Start Indexing\nconfAPageFoundFetch=Page "{1}" found. Fetching\nconfAAllDiagDone=All {1} diagrams processed. Process finished.\nconfAStartedProcessing=Started processing page "{1}"\nconfAAllDiagInPageDone=All {1} diagrams in page "{2}" processed successfully.\nconfAPartialDiagDone={1} out of {2} {3} diagrams in page "{4}" processed successfully.\nconfAUpdatePageFailed=Updating page "{1}" failed.\nconfANoDiagFoundInPage=No {1} diagrams found in page "{2}".\nconfAFetchPageFailed=Fetching the page failed.\nconfANoDiagFound=No {1} diagrams found. Process finished.\nconfASearchFailed=Searching for {1} diagrams failed. Please try again later.\nconfAGliffyDiagFound={2} diagram "{1}" found. Importing\nconfAGliffyDiagImported={2} diagram "{1}" imported successfully.\nconfASavingImpGliffyFailed=Saving imported {2} diagram "{1}" failed.\nconfAImportedFromByDraw=Imported from "{1}" by draw.io\nconfAImportGliffyFailed=Importing {2} diagram "{1}" failed.\nconfAFetchGliffyFailed=Fetching {2} diagram "{1}" failed.\nconfACheckBrokenDiagLnk=Checking for broken diagrams links.\nconfADelDiagLinkOf=Deleting diagram link of "{1}"\nconfADupLnk=(duplicate link)\nconfADelDiagLnkFailed=Deleting diagram link of "{1}" failed.\nconfAUnexpErrProcessPage=Unexpected error during processing the page with id: {1}\nconfADiagFoundIndex=Diagram "{1}" found. Indexing\nconfADiagIndexSucc=Diagram "{1}" indexed successfully.\nconfAIndexDiagFailed=Indexing diagram "{1}" failed.\nconfASkipDiagOtherPage=Skipped "{1}" as it belongs to another page!\nconfADiagUptoDate=Diagram "{1}" is up to date.\nconfACheckPagesWDraw=Checking pages having draw.io diagrams.\nconfAErrOccured=An error occurred!\nsavedSucc=Saved successfully\nconfASaveFailedErr=Saving Failed (Unexpected Error)\ncharacter=Character\nconfAConfPageDesc=This page contains draw.io configuration file (configuration.json) as attachment\nconfALibPageDesc=This page contains draw.io custom libraries as attachments\nconfATempPageDesc=This page contains draw.io custom templates as attachments\nworking=Working\nconfAConfSpaceDesc=This space is used to store draw.io configuration files and custom libraries/templates\nconfANoCustLib=No Custom Libraries\ndelFailed=Delete failed!\nshowID=Show ID\nconfAIncorrectLibFileType=Incorrect file type. Libraries should be XML files.\nuploading=Uploading\nconfALibExist=This library already exists\nconfAUploadSucc=Uploaded successfully\nconfAUploadFailErr=Upload Failed (Unexpected Error)\nhiResPreview=High Res Preview\nofficeNotLoggedGD=You are not logged in to Google Drive. Please open draw.io task pane and login first.\nofficePopupInfo=Please complete the process in the pop-up window.\npickODFile=Pick OneDrive File\npickGDriveFile=Pick Google Drive File\npickDeviceFile=Pick Device File\nvsdNoConfig="vsdurl" is not configured\nruler=Ruler\nunits=Units\npoints=Points\ninches=Inches\nmillimeters=Millimeters\nconfEditDraftDelOrExt=This diagram is in a draft page, is deleted from the page, or is edited externally. It will be saved as a new attachment version and may not be reflected in the page.\nconfDiagEditedExt=Diagram is edited in another session. It will be saved as a new attachment version but the page will show other session\'s modifications.\nmacroNotFound=Macro Not Found\nconfAInvalidPageIdsFormat=Incorrect Page IDs file format\nconfACollectingCurPages=Collecting current pages\nconfABuildingPagesMap=Building pages mapping\nconfAProcessDrawDiag=Started processing imported draw.io diagrams\nconfAProcessDrawDiagDone=Finished processing imported draw.io diagrams\nconfAProcessImpPages=Started processing imported pages\nconfAErrPrcsDiagInPage=Error processing draw.io diagrams in page "{1}"\nconfAPrcsDiagInPage=Processing draw.io diagrams in page "{1}"\nconfAImpDiagram=Importing diagram "{1}"\nconfAImpDiagramFailed=Importing diagram "{1}" failed. Cannot find its new page ID. Maybe it points to a page that is not imported. \nconfAImpDiagramError=Error importing diagram "{1}". Cannot fetch or save the diagram. Cannot fix this diagram links.\nconfAUpdateDgrmCCFailed=Updating link to diagram "{1}" failed.\nconfImpDiagramSuccess=Updating diagram "{1}" done successfully.\nconfANoLnksInDrgm=No links to update in: {1}\nconfAUpdateLnkToPg=Updated link to page: "{1}" in diagram: "{2}"\nconfAUpdateLBLnkToPg=Updated lightbox link to page: "{1}" in diagram: "{2}"\nconfAUpdateLnkBase=Updated base URL from: "{1}" to: "{2}" in diagram: "{3}"\nconfAPageIdsImpDone=Page IDs Import finished\nconfAPrcsMacrosInPage=Processing draw.io macros in page "{1}"\nconfAErrFetchPage=Error fetching page "{1}"\nconfAFixingMacro=Fixing macro of diagram "{1}"\nconfAErrReadingExpFile=Error reading export file\nconfAPrcsDiagInPageDone=Processing draw.io diagrams in page "{1}" finished\nconfAFixingMacroSkipped=Fixing macro of diagram "{1}" failed. Cannot find its new page ID. Maybe it points to a page that is not imported. \npageIdsExpTrg=Export target\nconfALucidDiagImgImported={2} diagram "{1}" image extracted successfully\nconfASavingLucidDiagImgFailed=Extracting {2} diagram "{1}" image failed\nconfGetInfoFailed=Fetching file info from {1} failed.\nconfCheckCacheFailed=Cannot get cached file info.\nconfReadFileErr=Cannot read "{1}" file from {2}.\nconfSaveCacheFailed=Unexpected error. Cannot save cached file\norgChartType=Org Chart Type\nlinear=Linear\nhanger2=Hanger 2\nhanger4=Hanger 4\nfishbone1=Fishbone 1\nfishbone2=Fishbone 2\n1ColumnLeft=Single Column Left\n1ColumnRight=Single Column Right\nsmart=Smart\nparentChildSpacing=Parent Child Spacing\nsiblingSpacing=Sibling Spacing\nconfNoPermErr=Sorry, you don\'t have enough permissions to view this embedded diagram from page {1}\ncopyAsImage=Copy as Image\nlucidImport=Lucidchart Import\nlucidImportInst1=Click the "Start Import" button to import all Lucidchart diagrams.\ninstallFirst=Please install {1} first\ndrawioChromeExt=draw.io Chrome Extension\nloginFirstThen=Please login to {1} first, then {2}\nerrFetchDocList=Error: Couldn\'t fetch documents list\nbuiltinPlugins=Built-in Plugins\nextPlugins=External Plugins\nbackupFound=Backup file found\nchromeOnly=This feature only works in Google Chrome\nmsgDeleted=This message has been deleted\nconfAErrFetchDrawList=Error fetching diagrams list. Some diagrams are skipped.\nconfAErrCheckDrawDiag=Cannot check diagram {1}\nconfAErrFetchPageList=Error fetching pages list\nconfADiagImportIncom={1} diagram "{2}" is imported partially and may have missing shapes\ninvalidSel=Invalid selection\ndiagNameEmptyErr=Diagram name cannot be empty\nopenDiagram=Open Diagram\nnewDiagram=New diagram\neditable=Editable\nconfAReimportStarted=Re-import {1} diagrams started...\nspaceFilter=Filter by spaces\ncurViewState=Current Viewer State\npageLayers=Page and Layers\ncustomize=Customize\nfirstPage=First Page (All Layers)\ncurEditorState=Current Editor State\nnoAnchorsFound=No anchors found \nattachment=Attachment\ncurDiagram=Current Diagram\nrecentDiags=Recent Diagrams\ncsvImport=CSV Import\nchooseFile=Choose a file...\nchoose=Choose\ngdriveFname=Google Drive filename\nwidthOfViewer=Width of the viewer (px)\nheightOfViewer=Height of the viewer (px)\nautoSetViewerSize=Automatically set the size of the viewer\nthumbnail=Thumbnail\nprevInDraw=Preview in draw.io\nonedriveFname=OneDrive filename\ndiagFname=Diagram filename\ndiagUrl=Diagram URL\nshowDiag=Show Diagram\ndiagPreview=Diagram Preview\ncsvFileUrl=CSV File URL\ngenerate=Generate\nselectDiag2Insert=Please select a diagram to insert it.\nerrShowingDiag=Unexpected error. Cannot show diagram\nnoRecentDiags=No recent diagrams found\nfetchingRecentFailed=Failed to fetch recent diagrams\nuseSrch2FindDiags=Use the search box to find draw.io diagrams\ncantReadChckPerms=Cannot read the specified diagram. Please check you have read permission on that file.\ncantFetchChckPerms=Cannot fetch diagram info. Please check you have read permission on that file.\nsearchFailed=Searching failed. Please try again later.\nplsTypeStr=Please type a search string.\nunsupportedFileChckUrl=Unsupported file. Please check the specified URL\ndiagNotFoundChckUrl=Diagram not found or cannot be accessed. Please check the specified URL\ncsvNotFoundChckUrl=CSV file not found or cannot be accessed. Please check the specified URL\ncantReadUpload=Cannot read the uploaded diagram\nselect=Select\nerrCantGetIdType=Unexpected Error: Cannot get content id or type.\nerrGAuthWinBlocked=Error: Google Authentication window blocked\nauthDrawAccess=Authorize draw.io to access {1}\nconnTimeout=The connection has timed out\nerrAuthSrvc=Error authenticating to {1}\nplsSelectFile=Please select a file\nmustBgtZ={1} must be greater than zero\ncantLoadPrev=Cannot load file preview.\nerrAccessFile=Error: Access Denied. You do not have permission to access "{1}".\nnoPrevAvail=No preview is available.\npersonalAccNotSup=Personal accounts are not supported.\nerrSavingTryLater=Error occurred during saving, please try again later.\nplsEnterFld=Please enter {1}\ninvalidDiagUrl=Invalid Diagram URL\nunsupportedVsdx=Unsupported vsdx file\nunsupportedImg=Unsupported image file\nunsupportedFormat=Unsupported file format\nplsSelectSingleFile=Please select a single file only\nattCorrupt=Attachment file "{1}" is corrupted\nloadAttFailed=Failed to load attachment "{1}"\nembedDrawDiag=Embed draw.io Diagram\naddDiagram=Add Diagram\nembedDiagram=Embed Diagram\neditOwningPg=Edit owning page\ndeepIndexing=Deep Indexing (Index diagrams that aren\'t used in any page also)\nconfADeepIndexStarted=Deep Indexing Started\nconfADeepIndexDone=Deep Indexing Done\nofficeNoDiagramsSelected=No diagrams found in the selection\nofficeNoDiagramsInDoc=No diagrams found in the document\nofficeNotSupported=This feature is not supported in this host application\nsomeImagesFailed={1} out of {2} failed due to the following errors\nimportingNoUsedDiagrams=Importing {1} Diagrams not used in pages\nimportingDrafts=Importing {1} Diagrams in drafts\nprocessingDrafts=Processing drafts\nupdatingDrafts=Updating drafts\nupdateDrafts=Update drafts\nnotifications=Notifications\ndrawioImp=draw.io Import\nconfALibsImp=Importing draw.io Libraries\nconfALibsImpFailed=Importing {1} library failed\ncontributors=Contributors\ndrawDiagrams=draw.io Diagrams\nerrFileNotFoundOrNoPer=Error: Access Denied. File not found or you do not have permission to access "{1}" on {2}.\nconfACheckPagesWEmbed=Checking pages having embedded draw.io diagrams.\nconfADelBrokenEmbedDiagLnk=Removing broken embedded diagram links\nreplaceWith=Replace with\nreplaceAll=Replace All\nconfASkipDiagModified=Skipped "{1}" as it was modified after initial import\nreplFind=Replace/Find\nmatchesRepl={1} matches replaced\ndraftErrDataLoss=An error occurred while reading the draft file. The diagram cannot be edited now to prevent any possible data loss. Please try again later or contact support.\nibm=IBM\nlinkToDiagramHint=Add a link to this diagram. The diagram can only be edited from the page that owns it.\nlinkToDiagram=Link to Diagram\nchangedBy=Changed By\nlastModifiedOn=Last modified on\nsearchResults=Search Results\nshowAllTemps=Show all templates\nnotionToken=Notion Token\nselectDB=Select Database\nnoDBs=No Databases\ndiagramEdited={1} diagram "{2}" edited\n');Graph.prototype.defaultThemes["default-style2"]=mxUtils.parseXml('<mxStylesheet><add as="defaultVertex"><add as="shape" value="label"/><add as="perimeter" value="rectanglePerimeter"/><add as="fontSize" value="12"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="fillColor" value="#ffffff"/><add as="strokeColor" value="#000000"/><add as="fontColor" value="#000000"/></add><add as="defaultEdge"><add as="shape" value="connector"/><add as="labelBackgroundColor" value="#ffffff"/><add as="endArrow" value="classic"/><add as="fontSize" value="11"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="rounded" value="1"/><add as="strokeColor" value="#000000"/><add as="fontColor" value="#000000"/></add><add as="text"><add as="fillColor" value="none"/><add as="gradientColor" value="none"/><add as="strokeColor" value="none"/><add as="align" value="left"/><add as="verticalAlign" value="top"/></add><add as="edgeLabel" extend="text"><add as="labelBackgroundColor" value="#ffffff"/><add as="fontSize" value="11"/></add><add as="label"><add as="fontStyle" value="1"/><add as="align" value="left"/><add as="verticalAlign" value="middle"/><add as="spacing" value="2"/><add as="spacingLeft" value="52"/><add as="imageWidth" value="42"/><add as="imageHeight" value="42"/><add as="rounded" value="1"/></add><add as="icon" extend="label"><add as="align" value="center"/><add as="imageAlign" value="center"/><add as="verticalLabelPosition" value="bottom"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="4"/><add as="labelBackgroundColor" value="#ffffff"/><add as="spacing" value="0"/><add as="spacingLeft" value="0"/><add as="spacingTop" value="6"/><add as="fontStyle" value="0"/><add as="imageWidth" value="48"/><add as="imageHeight" value="48"/></add><add as="swimlane"><add as="shape" value="swimlane"/><add as="fontSize" value="12"/><add as="fontStyle" value="1"/><add as="startSize" value="23"/></add><add as="group"><add as="verticalAlign" value="top"/><add as="fillColor" value="none"/><add as="strokeColor" value="none"/><add as="gradientColor" value="none"/><add as="pointerEvents" value="0"/></add><add as="ellipse"><add as="shape" value="ellipse"/><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombus"><add as="shape" value="rhombus"/><add as="perimeter" value="rhombusPerimeter"/></add><add as="triangle"><add as="shape" value="triangle"/><add as="perimeter" value="trianglePerimeter"/></add><add as="line"><add as="shape" value="line"/><add as="strokeWidth" value="4"/><add as="labelBackgroundColor" value="#ffffff"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="8"/></add><add as="image"><add as="shape" value="image"/><add as="labelBackgroundColor" value="white"/><add as="verticalAlign" value="top"/><add as="verticalLabelPosition" value="bottom"/></add><add as="roundImage" extend="image"><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombusImage" extend="image"><add as="perimeter" value="rhombusPerimeter"/></add><add as="arrow"><add as="shape" value="arrow"/><add as="edgeStyle" value="none"/><add as="fillColor" value="#ffffff"/></add><add as="fancy"><add as="shadow" value="1"/><add as="glass" value="1"/></add><add as="gray" extend="fancy"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="blue" extend="fancy"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="green" extend="fancy"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="turquoise" extend="fancy"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="yellow" extend="fancy"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="orange" extend="fancy"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="red" extend="fancy"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="pink" extend="fancy"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="purple" extend="fancy"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add><add as="plain-gray"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="plain-blue"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="plain-green"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="plain-turquoise"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="plain-yellow"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="plain-orange"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="plain-red"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="plain-pink"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="plain-purple"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add></mxStylesheet>').documentElement;
Graph.prototype.defaultThemes.darkTheme=mxUtils.parseXml('<mxStylesheet><add as="defaultVertex"><add as="shape" value="label"/><add as="perimeter" value="rectanglePerimeter"/><add as="fontSize" value="12"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="fillColor" value="#2a2a2a"/><add as="strokeColor" value="#f0f0f0"/><add as="fontColor" value="#f0f0f0"/></add><add as="defaultEdge"><add as="shape" value="connector"/><add as="labelBackgroundColor" value="#2a2a2a"/><add as="endArrow" value="classic"/><add as="fontSize" value="11"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="rounded" value="1"/><add as="strokeColor" value="#f0f0f0"/><add as="fontColor" value="#f0f0f0"/></add><add as="text"><add as="fillColor" value="none"/><add as="gradientColor" value="none"/><add as="strokeColor" value="none"/><add as="align" value="left"/><add as="verticalAlign" value="top"/></add><add as="edgeLabel" extend="text"><add as="labelBackgroundColor" value="#2a2a2a"/><add as="fontSize" value="11"/></add><add as="label"><add as="fontStyle" value="1"/><add as="align" value="left"/><add as="verticalAlign" value="middle"/><add as="spacing" value="2"/><add as="spacingLeft" value="52"/><add as="imageWidth" value="42"/><add as="imageHeight" value="42"/><add as="rounded" value="1"/></add><add as="icon" extend="label"><add as="align" value="center"/><add as="imageAlign" value="center"/><add as="verticalLabelPosition" value="bottom"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="4"/><add as="labelBackgroundColor" value="#2a2a2a"/><add as="spacing" value="0"/><add as="spacingLeft" value="0"/><add as="spacingTop" value="6"/><add as="fontStyle" value="0"/><add as="imageWidth" value="48"/><add as="imageHeight" value="48"/></add><add as="swimlane"><add as="shape" value="swimlane"/><add as="fontSize" value="12"/><add as="fontStyle" value="1"/><add as="startSize" value="23"/></add><add as="group"><add as="verticalAlign" value="top"/><add as="fillColor" value="none"/><add as="strokeColor" value="none"/><add as="gradientColor" value="none"/><add as="pointerEvents" value="0"/></add><add as="ellipse"><add as="shape" value="ellipse"/><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombus"><add as="shape" value="rhombus"/><add as="perimeter" value="rhombusPerimeter"/></add><add as="triangle"><add as="shape" value="triangle"/><add as="perimeter" value="trianglePerimeter"/></add><add as="line"><add as="shape" value="line"/><add as="strokeWidth" value="4"/><add as="labelBackgroundColor" value="#2a2a2a"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="8"/></add><add as="image"><add as="shape" value="image"/><add as="labelBackgroundColor" value="#2a2a2a"/><add as="verticalAlign" value="top"/><add as="verticalLabelPosition" value="bottom"/></add><add as="roundImage" extend="image"><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombusImage" extend="image"><add as="perimeter" value="rhombusPerimeter"/></add><add as="arrow"><add as="shape" value="arrow"/><add as="edgeStyle" value="none"/><add as="fillColor" value="#2a2a2a"/></add></mxStylesheet>').documentElement;GraphViewer=function(a,b,d){this.init(a,b,d)};mxUtils.extend(GraphViewer,mxEventSource);GraphViewer.prototype.editBlankUrl="https://app.diagrams.net/";GraphViewer.prototype.imageBaseUrl="https://viewer.diagrams.net/";GraphViewer.prototype.toolbarHeight="BackCompat"==document.compatMode?28:30;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(a,b,d){this.graphConfig=null!=d?d:{};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.lightboxEnabled=0<=mxUtils.indexOf(this.toolbarItems,"lightbox");this.lightboxClickEnabled=0!=this.graphConfig.lightbox;this.initialWidth=null!=a?a.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!=b&&(this.xmlDocument=b.ownerDocument,this.xmlNode=b,this.xml=mxUtils.getXml(b),null!=a)){var k=mxUtils.bind(this,function(){this.graph=new Graph(a);this.graph.enableFlowAnimation=!0;this.graph.defaultPageBackgroundColor="transparent";this.graph.transparentBackground=!1;if(this.responsive&&this.graph.dialect==mxConstants.DIALECT_SVG){var d=this.graph.view.getDrawPane().ownerSVGElement;
+this.pageId=this.graphConfig.pageId;this.editor=null;"inline"==this.graphConfig["toolbar-position"]&&(this.minHeight+=this.toolbarHeight);if(null!=b&&(this.xmlDocument=b.ownerDocument,this.xmlNode=b,this.xml=mxUtils.getXml(b),null!=a)){var g=mxUtils.bind(this,function(){this.graph=new Graph(a);this.graph.enableFlowAnimation=!0;this.graph.defaultPageBackgroundColor="transparent";this.graph.transparentBackground=!1;if(this.responsive&&this.graph.dialect==mxConstants.DIALECT_SVG){var d=this.graph.view.getDrawPane().ownerSVGElement;
this.graph.view.getCanvas();null!=this.graphConfig.border?d.style.padding=this.graphConfig.border+"px":""==a.style.padding&&(d.style.padding="8px");d.style.boxSizing="border-box";d.style.overflow="visible";this.graph.fit=function(){};this.graph.sizeDidChange=function(){var a=this.view.graphBounds,b=this.view.translate;d.setAttribute("viewBox",a.x+b.x-this.panDx+" "+(a.y+b.y-this.panDy)+" "+(a.width+1)+" "+(a.height+1));this.container.style.backgroundColor=d.style.backgroundColor;this.fireEvent(new mxEventObject(mxEvent.SIZE,
"bounds",a))}}this.graphConfig.move&&(this.graph.isMoveCellsEvent=function(a){return!0});this.lightboxClickEnabled&&(a.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!=b&&(this.xml=mxUtils.getXml(this.xmlNode),this.xmlDocument=this.xmlNode.ownerDocument);var c=this;this.graph.getImageFromBundles=function(a){return c.getImageUrl(a)};mxClient.IS_SVG&&this.graph.addSvgShadow(this.graph.view.canvas.ownerSVGElement,null,!0);if("mxfile"==this.xmlNode.nodeName){var e=this.xmlNode.getElementsByTagName("diagram");if(0<e.length){if(null!=this.pageId)for(var f=0;f<e.length;f++)if(this.pageId==e[f].getAttribute("id")){this.currentPage=f;break}var k=this.graph.getGlobalVariable,
-c=this;this.graph.getGlobalVariable=function(a){var b=e[c.currentPage];return"page"==a?b.getAttribute("name")||"Page-"+(c.currentPage+1):"pagenumber"==a?c.currentPage+1:"pagecount"==a?e.length:k.apply(this,arguments)}}}this.diagrams=[];var l=null;this.selectPage=function(a){this.handlingResize||(this.currentPage=mxUtils.mod(a,this.diagrams.length),this.updateGraphXml(Editor.parseDiagramNode(this.diagrams[this.currentPage])))};this.selectPageById=function(a){for(var b=!1,c=0;c<this.diagrams.length;c++)if(this.diagrams[c].getAttribute("id")==
+this.xmlNode!=b&&(this.xml=mxUtils.getXml(this.xmlNode),this.xmlDocument=this.xmlNode.ownerDocument);var c=this;this.graph.getImageFromBundles=function(a){return c.getImageUrl(a)};mxClient.IS_SVG&&this.graph.addSvgShadow(this.graph.view.canvas.ownerSVGElement,null,!0);if("mxfile"==this.xmlNode.nodeName){var e=this.xmlNode.getElementsByTagName("diagram");if(0<e.length){if(null!=this.pageId)for(var f=0;f<e.length;f++)if(this.pageId==e[f].getAttribute("id")){this.currentPage=f;break}var g=this.graph.getGlobalVariable,
+c=this;this.graph.getGlobalVariable=function(a){var b=e[c.currentPage];return"page"==a?b.getAttribute("name")||"Page-"+(c.currentPage+1):"pagenumber"==a?c.currentPage+1:"pagecount"==a?e.length:g.apply(this,arguments)}}}this.diagrams=[];var l=null;this.selectPage=function(a){this.handlingResize||(this.currentPage=mxUtils.mod(a,this.diagrams.length),this.updateGraphXml(Editor.parseDiagramNode(this.diagrams[this.currentPage])))};this.selectPageById=function(a){for(var b=!1,c=0;c<this.diagrams.length;c++)if(this.diagrams[c].getAttribute("id")==
a){this.selectPage(c);b=!0;break}return b};f=mxUtils.bind(this,function(){if(null==this.xmlNode||"mxfile"!=this.xmlNode.nodeName)this.diagrams=[];this.xmlNode!=l&&(this.diagrams=this.xmlNode.getElementsByTagName("diagram"),l=this.xmlNode)});this.addListener("xmlNodeChanged",f);f();urlParams.page=c.currentPage;f=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,f=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(a){return!mxEvent.isPopupTrigger(a.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&&a.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!=f&&this.setLayersVisible(f);
this.graph.customLinkClicked=function(a){if(Graph.isPageLink(a)){var b=a.indexOf(",");c.selectPageById(a.substring(b+1))||alert(mxResources.get("pageNotFound")||"Page not found")}else this.handleCustomLink(a);return!0};var m=this.graph.foldTreeCell;this.graph.foldTreeCell=mxUtils.bind(this,function(){this.treeCellFolded=!0;return m.apply(this.graph,arguments)});this.fireEvent(new mxEventObject("render"))});d=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;if(this.checkVisibleState&&
-0==a.offsetWidth&&"undefined"!==typeof d){var f=this.getObservableParent(a),m=new d(mxUtils.bind(this,function(b){0<a.offsetWidth&&(m.disconnect(),k())}));m.observe(f,{attributes:!0})}else k()}};GraphViewer.prototype.getObservableParent=function(a){for(a=a.parentNode;a!=document.body&&null!=a.parentNode&&"none"!==mxUtils.getCurrentStyle(a).display;)a=a.parentNode;return a};
+0==a.offsetWidth&&"undefined"!==typeof d){var f=this.getObservableParent(a),m=new d(mxUtils.bind(this,function(b){0<a.offsetWidth&&(m.disconnect(),g())}));m.observe(f,{attributes:!0})}else g()}};GraphViewer.prototype.getObservableParent=function(a){for(a=a.parentNode;a!=document.body&&null!=a.parentNode&&"none"!==mxUtils.getCurrentStyle(a).display;)a=a.parentNode;return a};
GraphViewer.prototype.getImageUrl=function(a){null!=a&&"http://"!=a.substring(0,7)&&"https://"!=a.substring(0,8)&&"data:image"!=a.substring(0,10)&&("/"==a.charAt(0)&&(a=a.substring(1,a.length)),a=this.imageBaseUrl+a);return a};GraphViewer.prototype.setXmlNode=function(a){a=this.editor.extractGraphModel(a,!0);this.xmlDocument=a.ownerDocument;this.xml=mxUtils.getXml(a);this.xmlNode=a;this.updateGraphXml(a);this.fireEvent(new mxEventObject("xmlNodeChanged"))};
GraphViewer.prototype.setFileNode=function(a){null==this.xmlNode&&(this.xmlDocument=a.ownerDocument,this.xml=mxUtils.getXml(a),this.xmlNode=a);this.setGraphXml(a)};GraphViewer.prototype.updateGraphXml=function(a){this.setGraphXml(a);this.fireEvent(new mxEventObject("graphChanged"))};
-GraphViewer.prototype.setLayersVisible=function(a){var b=!0;if(!this.autoOrigin){var d=[],k=this.graph.getModel();k.beginUpdate();try{for(var f=0;f<k.getChildCount(k.root);f++){var m=k.getChildAt(k.root,f),b=b&&k.isVisible(m);d.push(k.isVisible(m));k.setVisible(m,null!=a?a[f]:!0)}}finally{k.endUpdate()}}return b?null:d};
+GraphViewer.prototype.setLayersVisible=function(a){var b=!0;if(!this.autoOrigin){var d=[],g=this.graph.getModel();g.beginUpdate();try{for(var f=0;f<g.getChildCount(g.root);f++){var m=g.getChildAt(g.root,f),b=b&&g.isVisible(m);d.push(g.isVisible(m));g.setVisible(m,null!=a?a[f]:!0)}}finally{g.endUpdate()}}return b?null:d};
GraphViewer.prototype.setGraphXml=function(a){if(null!=this.graph){this.graph.view.translate=new mxPoint;this.graph.view.scale=1;var b=null;this.graph.getModel().beginUpdate();try{this.graph.getModel().clear(),this.editor.setGraphXml(a),b=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};b&&this.setLayersVisible(b)}};
-GraphViewer.prototype.addSizeHandler=function(){var a=this.graph.container,b=this.graph.getGraphBounds(),d=!1;a.style.overflow=1!=this.graphConfig["toolbar-nohide"]?"hidden":"visible";var k=mxUtils.bind(this,function(){if(!d){d=!0;var b=this.graph.getGraphBounds();a.style.overflow=1!=this.graphConfig["toolbar-nohide"]?b.width+2*this.graph.border>a.offsetWidth-2?"auto":"hidden":"visible";if(null!=this.toolbar&&1!=this.graphConfig["toolbar-nohide"]){var b=a.getBoundingClientRect(),e=mxUtils.getScrollOrigin(document.body),
+GraphViewer.prototype.addSizeHandler=function(){var a=this.graph.container,b=this.graph.getGraphBounds(),d=!1;a.style.overflow=1!=this.graphConfig["toolbar-nohide"]?"hidden":"visible";var g=mxUtils.bind(this,function(){if(!d){d=!0;var b=this.graph.getGraphBounds();a.style.overflow=1!=this.graphConfig["toolbar-nohide"]?b.width+2*this.graph.border>a.offsetWidth-2?"auto":"hidden":"visible";if(null!=this.toolbar&&1!=this.graphConfig["toolbar-nohide"]){var b=a.getBoundingClientRect(),e=mxUtils.getScrollOrigin(document.body),
e="relative"===document.body.style.position?document.body.getBoundingClientRect():{left:-e.x,top:-e.y},b={left:b.left-e.left,top:b.top-e.top,bottom:b.bottom-e.top,right:b.right-e.left};this.toolbar.style.left=b.left+"px";"bottom"==this.graphConfig["toolbar-position"]?this.toolbar.style.top=b.bottom-1+"px":"inline"!=this.graphConfig["toolbar-position"]?(this.toolbar.style.width=Math.max(this.minToolbarWidth,a.offsetWidth)+"px",this.toolbar.style.top=b.top+1+"px"):this.toolbar.style.top=b.top+"px"}else null!=
this.toolbar&&(this.toolbar.style.width=Math.max(this.minToolbarWidth,a.offsetWidth)+"px");this.treeCellFolded&&(this.treeCellFolded=!1,this.positionGraph(this.graph.view.translate),this.graph.initialViewState.translate=this.graph.view.translate.clone());d=!1}}),f=null;this.handlingResize=!1;this.fitGraph=mxUtils.bind(this,function(b){var c=a.offsetWidth;c==f||this.handlingResize||(this.handlingResize=!0,"auto"==a.style.overflow&&(a.style.overflow="hidden"),this.graph.maxFitScale=null!=b?b:this.graphConfig.zoom||
(this.allowZoomIn?null:1),this.graph.fit(null,null,null,null,null,!0),(this.center||0==this.graphConfig.resize&&""!=a.style.height)&&this.graph.center(),this.graph.maxFitScale=null,0==this.graphConfig.resize&&""!=a.style.height||this.updateContainerHeight(a,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},f=c,window.setTimeout(mxUtils.bind(this,function(){this.handlingResize=
-!1}),0))});GraphViewer.useResizeSensor&&(9>=document.documentMode?(mxEvent.addListener(window,"resize",k),this.graph.addListener("size",k)):new ResizeSensor(this.graph.container,k));if(this.graphConfig.resize||(this.zoomEnabled||!this.autoFit)&&0!=this.graphConfig.resize)this.graph.minimumContainerSize=new mxRectangle(0,0,this.minWidth,this.minHeight),this.graph.resizeContainer=!0;else if(!this.widthIsEmpty||""!=a.style.height&&this.autoFit||this.updateContainerWidth(a,b.width+2*this.graph.border),
-0==this.graphConfig.resize&&""!=a.style.height||this.updateContainerHeight(a,Math.max(this.minHeight,b.height+2*this.graph.border+1)),!this.zoomEnabled&&this.autoFit){var m=f=null,k=mxUtils.bind(this,function(){window.clearTimeout(m);this.handlingResize||(m=window.setTimeout(mxUtils.bind(this,this.fitGraph),100))});GraphViewer.useResizeSensor&&(9>=document.documentMode?mxEvent.addListener(window,"resize",k):new ResizeSensor(this.graph.container,k))}else 9>=document.documentMode||this.graph.addListener("size",
-k);var p=mxUtils.bind(this,function(c){var d=a.style.minWidth;this.widthIsEmpty&&(a.style.minWidth="100%");var g=null!=this.graphConfig["max-height"]?this.graphConfig["max-height"]:""!=a.style.height&&this.autoFit?a.offsetHeight:void 0;0<a.offsetWidth&&null==c&&this.allowZoomOut&&(this.allowZoomIn||b.width+2*this.graph.border>a.offsetWidth||b.height+2*this.graph.border>g)?(c=null,null!=g&&b.height+2*this.graph.border>g-2&&(c=(g-2*this.graph.border-2)/b.height),this.fitGraph(c)):this.widthIsEmpty||
+!1}),0))});GraphViewer.useResizeSensor&&(9>=document.documentMode?(mxEvent.addListener(window,"resize",g),this.graph.addListener("size",g)):new ResizeSensor(this.graph.container,g));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||""!=a.style.height&&this.autoFit||this.updateContainerWidth(a,b.width+2*this.graph.border),
+0==this.graphConfig.resize&&""!=a.style.height||this.updateContainerHeight(a,Math.max(this.minHeight,b.height+2*this.graph.border+1)),!this.zoomEnabled&&this.autoFit){var m=f=null,g=mxUtils.bind(this,function(){window.clearTimeout(m);this.handlingResize||(m=window.setTimeout(mxUtils.bind(this,this.fitGraph),100))});GraphViewer.useResizeSensor&&(9>=document.documentMode?mxEvent.addListener(window,"resize",g):new ResizeSensor(this.graph.container,g))}else 9>=document.documentMode||this.graph.addListener("size",
+g);var p=mxUtils.bind(this,function(c){var d=a.style.minWidth;this.widthIsEmpty&&(a.style.minWidth="100%");var g=null!=this.graphConfig["max-height"]?this.graphConfig["max-height"]:""!=a.style.height&&this.autoFit?a.offsetHeight:void 0;0<a.offsetWidth&&null==c&&this.allowZoomOut&&(this.allowZoomIn||b.width+2*this.graph.border>a.offsetWidth||b.height+2*this.graph.border>g)?(c=null,null!=g&&b.height+2*this.graph.border>g-2&&(c=(g-2*this.graph.border-2)/b.height),this.fitGraph(c)):this.widthIsEmpty||
null!=c||0!=this.graphConfig.resize||""==a.style.height?(c=null!=c?c:new mxPoint,this.graph.view.setTranslate(Math.floor(this.graph.border-b.x/this.graph.view.scale)+c.x,Math.floor(this.graph.border-b.y/this.graph.view.scale)+c.y),f=a.offsetWidth):this.graph.center((!this.widthIsEmpty||b.width<this.minWidth)&&1!=this.graphConfig.resize);a.style.minWidth=d});8==document.documentMode?window.setTimeout(p,0):p();this.positionGraph=function(a){b=this.graph.getGraphBounds();f=null;p(a)}};
-GraphViewer.prototype.crop=function(){var a=this.graph,b=a.getGraphBounds(),d=a.border,k=a.view.scale;a.view.setTranslate(null!=b.x?Math.floor(a.view.translate.x-b.x/k+d):d,null!=b.y?Math.floor(a.view.translate.y-b.y/k+d):d)};GraphViewer.prototype.updateContainerWidth=function(a,b){a.style.width=b+"px"};GraphViewer.prototype.updateContainerHeight=function(a,b){if(this.forceCenter||this.zoomEnabled||!this.autoFit||"BackCompat"==document.compatMode||8==document.documentMode)a.style.height=b+"px"};
-GraphViewer.prototype.showLayers=function(a,b){var d=this.graphConfig.layers,d=null!=d&&0<d.length?d.split(" "):[],k=this.graphConfig.layerIds,f=null!=k&&0<k.length,m=!1;if(0<d.length||f||null!=b){var p=null!=b?b.getModel():null,m=a.getModel();m.beginUpdate();try{var c=m.getChildCount(m.root);if(null==p){var p=!1,e={};if(f)for(var g=0;g<k.length;g++){var n=m.getCell(k[g]);null!=n&&(p=!0,e[n.id]=!0)}else for(g=0;g<d.length;g++)n=m.getChildAt(m.root,parseInt(d[g])),null!=n&&(p=!0,e[n.id]=!0);for(g=
-0;p&&g<c;g++)n=m.getChildAt(m.root,g),m.setVisible(n,e[n.id]||!1)}else for(g=0;g<c;g++)m.setVisible(m.getChildAt(m.root,g),p.isVisible(p.getChildAt(p.root,g)))}finally{m.endUpdate()}m=!0}return m};
+GraphViewer.prototype.crop=function(){var a=this.graph,b=a.getGraphBounds(),d=a.border,g=a.view.scale;a.view.setTranslate(null!=b.x?Math.floor(a.view.translate.x-b.x/g+d):d,null!=b.y?Math.floor(a.view.translate.y-b.y/g+d):d)};GraphViewer.prototype.updateContainerWidth=function(a,b){a.style.width=b+"px"};GraphViewer.prototype.updateContainerHeight=function(a,b){if(this.forceCenter||this.zoomEnabled||!this.autoFit||"BackCompat"==document.compatMode||8==document.documentMode)a.style.height=b+"px"};
+GraphViewer.prototype.showLayers=function(a,b){var d=this.graphConfig.layers,d=null!=d&&0<d.length?d.split(" "):[],g=this.graphConfig.layerIds,f=null!=g&&0<g.length,m=!1;if(0<d.length||f||null!=b){var p=null!=b?b.getModel():null,m=a.getModel();m.beginUpdate();try{var c=m.getChildCount(m.root);if(null==p){var p=!1,e={};if(f)for(var k=0;k<g.length;k++){var n=m.getCell(g[k]);null!=n&&(p=!0,e[n.id]=!0)}else for(k=0;k<d.length;k++)n=m.getChildAt(m.root,parseInt(d[k])),null!=n&&(p=!0,e[n.id]=!0);for(k=
+0;p&&k<c;k++)n=m.getChildAt(m.root,k),m.setVisible(n,e[n.id]||!1)}else for(k=0;k<c;k++)m.setVisible(m.getChildAt(m.root,k),p.isVisible(p.getChildAt(p.root,k)))}finally{m.endUpdate()}m=!0}return m};
GraphViewer.prototype.addToolbar=function(){function a(a,b,c,e){var f=document.createElement("div");f.style.borderRight="1px solid #d0d0d0";f.style.padding="3px 6px 3px 6px";mxEvent.addListener(f,"click",a);null!=c&&f.setAttribute("title",c);f.style.display="inline-block";a=document.createElement("img");a.setAttribute("border","0");a.setAttribute("src",b);null==e||e?(mxEvent.addListener(f,"mouseenter",function(){f.style.backgroundColor="#ddd"}),mxEvent.addListener(f,"mouseleave",function(){f.style.backgroundColor=
"#eee"}),mxUtils.setOpacity(a,60),f.style.cursor="pointer"):mxUtils.setOpacity(f,30);f.appendChild(a);d.appendChild(f);n++;return f}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,f=null,m=mxUtils.bind(this,function(a){null!=k&&(window.clearTimeout(k),fadeThead=null);null!=f&&(window.clearTimeout(f),fadeThead2=null);k=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(d,0);k=
-null;f=window.setTimeout(mxUtils.bind(this,function(){d.style.display="none";f=null}),100)}),a||200)}),p=mxUtils.bind(this,function(a){null!=k&&(window.clearTimeout(k),fadeThead=null);null!=f&&(window.clearTimeout(f),fadeThead2=null);d.style.display="";mxUtils.setOpacity(d,a||30)});mxEvent.addListener(this.graph.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||(p(30),m())}));mxEvent.addListener(d,mxClient.IS_POINTER?"pointermove":"mousemove",
+"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 g=null,f=null,m=mxUtils.bind(this,function(a){null!=g&&(window.clearTimeout(g),fadeThead=null);null!=f&&(window.clearTimeout(f),fadeThead2=null);g=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(d,0);g=
+null;f=window.setTimeout(mxUtils.bind(this,function(){d.style.display="none";f=null}),100)}),a||200)}),p=mxUtils.bind(this,function(a){null!=g&&(window.clearTimeout(g),fadeThead=null);null!=f&&(window.clearTimeout(f),fadeThead2=null);d.style.display="";mxUtils.setOpacity(d,a||30)});mxEvent.addListener(this.graph.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||(p(30),m())}));mxEvent.addListener(d,mxClient.IS_POINTER?"pointermove":"mousemove",
function(a){mxEvent.consume(a)});mxEvent.addListener(d,"mouseenter",mxUtils.bind(this,function(a){p(100)}));mxEvent.addListener(d,"mousemove",mxUtils.bind(this,function(a){p(100);mxEvent.consume(a)}));mxEvent.addListener(d,"mouseleave",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||p(30)}));var c=this.graph,e=c.getTolerance();c.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(a,b){this.startX=b.getGraphX();this.startY=b.getGraphY();this.scrollLeft=c.container.scrollLeft;
-this.scrollTop=c.container.scrollTop},mouseMove:function(a,b){},mouseUp:function(a,b){mxEvent.isTouchEvent(b.getEvent())&&Math.abs(this.scrollLeft-c.container.scrollLeft)<e&&Math.abs(this.scrollTop-c.container.scrollTop)<e&&Math.abs(this.startX-b.getGraphX())<e&&Math.abs(this.startY-b.getGraphY())<e&&(0<parseFloat(d.style.opacity||0)?m():p(30))}})}for(var g=this.toolbarItems,n=0,l=null,q=null,u=0;u<g.length;u++){var t=g[u];if("pages"==t){q=b.ownerDocument.createElement("div");q.style.cssText="display:inline-block;position:relative;padding:3px 4px 0 4px;vertical-align:top;font-family:Helvetica,Arial;font-size:12px;top:4px;cursor:default;";
+this.scrollTop=c.container.scrollTop},mouseMove:function(a,b){},mouseUp:function(a,b){mxEvent.isTouchEvent(b.getEvent())&&Math.abs(this.scrollLeft-c.container.scrollLeft)<e&&Math.abs(this.scrollTop-c.container.scrollTop)<e&&Math.abs(this.startX-b.getGraphX())<e&&Math.abs(this.startY-b.getGraphY())<e&&(0<parseFloat(d.style.opacity||0)?m():p(30))}})}for(var k=this.toolbarItems,n=0,l=null,q=null,u=0;u<k.length;u++){var t=k[u];if("pages"==t){q=b.ownerDocument.createElement("div");q.style.cssText="display:inline-block;position:relative;padding:3px 4px 0 4px;vertical-align:top;font-family:Helvetica,Arial;font-size:12px;top:4px;cursor:default;";
mxUtils.setOpacity(q,70);var A=a(mxUtils.bind(this,function(){this.selectPage(this.currentPage-1)}),Editor.previousImage,mxResources.get("previousPage")||"Previous Page");A.style.borderRightStyle="none";A.style.paddingLeft="0px";A.style.paddingRight="0px";d.appendChild(q);var x=a(mxUtils.bind(this,function(){this.selectPage(this.currentPage+1)}),Editor.nextImage,mxResources.get("nextPage")||"Next Page");x.style.paddingLeft="0px";x.style.paddingRight="0px";t=mxUtils.bind(this,function(){q.innerHTML=
"";mxUtils.write(q,this.currentPage+1+" / "+this.diagrams.length);q.style.display=1<this.diagrams.length?"inline-block":"none";A.style.display=q.style.display;x.style.display=q.style.display});this.addListener("graphChanged",t);t()}else if("zoom"==t)this.zoomEnabled&&(a(mxUtils.bind(this,function(){this.graph.zoomOut()}),Editor.zoomOutImage,mxResources.get("zoomOut")||"Zoom Out"),a(mxUtils.bind(this,function(){this.graph.zoomIn()}),Editor.zoomInImage,mxResources.get("zoomIn")||"Zoom In"),a(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"==t){if(this.layersEnabled){var G=this.graph.getModel(),z=a(mxUtils.bind(this,function(a){if(null!=l)l.parentNode.removeChild(l),l=null;else{l=this.graph.createLayersDialog(mxUtils.bind(this,function(){if(this.autoCrop)this.crop();else if(this.autoOrigin){var a=this.graph.getGraphBounds(),
b=this.graph.view;0>a.x||0>a.y?(this.crop(),this.graph.originalViewState=this.graph.initialViewState,this.graph.initialViewState={translate:b.translate.clone(),scale:b.scale}):null!=this.graph.originalViewState&&0<a.x/b.scale+this.graph.originalViewState.translate.x-b.translate.x&&0<a.y/b.scale+this.graph.originalViewState.translate.y-b.translate.y&&(b.setTranslate(this.graph.originalViewState.translate.x,this.graph.originalViewState.translate.y),this.graph.originalViewState=null,this.graph.initialViewState=
{translate:b.translate.clone(),scale:b.scale})}}));mxEvent.addListener(l,"mouseleave",function(){l.parentNode.removeChild(l);l=null});a=z.getBoundingClientRect();l.style.width="140px";l.style.padding="2px 0px 2px 0px";l.style.border="1px solid #d0d0d0";l.style.backgroundColor="#eee";l.style.fontFamily="Helvetica Neue,Helvetica,Arial Unicode MS,Arial";l.style.fontSize="11px";l.style.zIndex=this.toolbarZIndex+1;mxUtils.setOpacity(l,80);var b=mxUtils.getDocumentScrollOrigin(document);l.style.left=b.x+
a.left-1+"px";l.style.top=b.y+a.bottom-2+"px";document.body.appendChild(l)}}),Editor.layersImage,mxResources.get("layers")||"Layers");G.addListener(mxEvent.CHANGE,function(){z.style.display=1<G.getChildCount(G.root)?"inline-block":"none"});z.style.display=1<G.getChildCount(G.root)?"inline-block":"none"}}else"lightbox"==t?this.lightboxEnabled&&a(mxUtils.bind(this,function(){this.showLightbox()}),Editor.maximizeImage,mxResources.get("show")||"Show"):null!=this.graphConfig["toolbar-buttons"]&&(t=this.graphConfig["toolbar-buttons"][t],
-null!=t&&(t.elem=a(null==t.enabled||t.enabled?t.handler:function(){},t.image,t.title,t.enabled)))}null!=this.graph.minimumContainerSize&&(this.graph.minimumContainerSize.width=34*n);null!=this.graphConfig.title&&(g=b.ownerDocument.createElement("div"),g.style.cssText="display:inline-block;position:relative;padding:3px 6px 0 6px;vertical-align:top;font-family:Helvetica,Arial;font-size:12px;top:4px;cursor:default;",g.setAttribute("title",this.graphConfig.title),mxUtils.write(g,this.graphConfig.title),
-mxUtils.setOpacity(g,70),d.appendChild(g),this.filename=g);this.minToolbarWidth=34*n;var E=b.style.border,H=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 a=b.getBoundingClientRect(),c=mxUtils.getScrollOrigin(document.body),c="relative"===document.body.style.position?document.body.getBoundingClientRect():{left:-c.x,top:-c.y},
+null!=t&&(t.elem=a(null==t.enabled||t.enabled?t.handler:function(){},t.image,t.title,t.enabled)))}null!=this.graph.minimumContainerSize&&(this.graph.minimumContainerSize.width=34*n);null!=this.graphConfig.title&&(k=b.ownerDocument.createElement("div"),k.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;",k.setAttribute("title",this.graphConfig.title),mxUtils.write(k,this.graphConfig.title),
+mxUtils.setOpacity(k,70),d.appendChild(k),this.filename=k);this.minToolbarWidth=34*n;var E=b.style.border,H=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 a=b.getBoundingClientRect(),c=mxUtils.getScrollOrigin(document.body),c="relative"===document.body.style.position?document.body.getBoundingClientRect():{left:-c.x,top:-c.y},
a={left:a.left-c.left,top:a.top-c.top,bottom:a.bottom-c.top,right:a.right-c.left};d.style.left=a.left+"px";"bottom"==this.graphConfig["toolbar-position"]?d.style.top=a.bottom-1+"px":"inline"!=this.graphConfig["toolbar-position"]?(d.style.marginTop=-this.toolbarHeight+"px",d.style.top=a.top+1+"px"):d.style.top=a.top+"px";"1px solid transparent"==E&&(b.style.border="1px solid #d0d0d0");document.body.appendChild(d);var e=mxUtils.bind(this,function(){null!=d.parentNode&&d.parentNode.removeChild(d);null!=
l&&(l.parentNode.removeChild(l),l=null);b.style.border=E});mxEvent.addListener(document,"mousemove",function(a){for(a=mxEvent.getSource(a);null!=a;){if(a==b||a==d||a==l)return;a=a.parentNode}e()});mxEvent.addListener(document.body,"mouseleave",function(a){e()})}else d.style.top=-this.toolbarHeight+"px",b.appendChild(d)});1!=this.graphConfig["toolbar-nohide"]?mxEvent.addListener(b,"mouseenter",H):H();this.responsive&&"undefined"!==typeof ResizeObserver&&(new ResizeObserver(function(){null!=d.parentNode&&
H()})).observe(b)};GraphViewer.prototype.disableButton=function(a){var b=this.graphConfig["toolbar-buttons"][a];null!=b&&(mxUtils.setOpacity(b.elem,30),mxEvent.removeListener(b.elem,"click",b.handler),mxEvent.addListener(b.elem,"mouseenter",function(){b.elem.style.backgroundColor="#eee"}))};
-GraphViewer.prototype.addClickHandler=function(a,b){a.linkPolicy=this.graphConfig.target||a.linkPolicy;a.addClickHandler(this.graphConfig.highlight,mxUtils.bind(this,function(d,k){if(null==k)for(var f=mxEvent.getSource(d);f!=a.container&&null!=f&&null==k;)"a"==f.nodeName.toLowerCase()&&(k=f.getAttribute("href")),f=f.parentNode;null!=b?null==k||a.isCustomLink(k)?mxEvent.consume(d):a.isExternalProtocol(k)||a.isBlankLink(k)||window.setTimeout(function(){b.destroy()},0):null!=k&&null==b&&a.isCustomLink(k)&&
-(mxEvent.isTouchEvent(d)||!mxEvent.isPopupTrigger(d))&&a.customLinkClicked(k)&&(mxUtils.clearSelection(),mxEvent.consume(d))}),mxUtils.bind(this,function(a){null!=b||!this.lightboxClickEnabled||mxEvent.isTouchEvent(a)&&0!=this.toolbarItems.length||this.showLightbox()}))};
+GraphViewer.prototype.addClickHandler=function(a,b){a.linkPolicy=this.graphConfig.target||a.linkPolicy;a.addClickHandler(this.graphConfig.highlight,mxUtils.bind(this,function(d,g){if(null==g)for(var f=mxEvent.getSource(d);f!=a.container&&null!=f&&null==g;)"a"==f.nodeName.toLowerCase()&&(g=f.getAttribute("href")),f=f.parentNode;null!=b?null==g||a.isCustomLink(g)?mxEvent.consume(d):a.isExternalProtocol(g)||a.isBlankLink(g)||window.setTimeout(function(){b.destroy()},0):null!=g&&null==b&&a.isCustomLink(g)&&
+(mxEvent.isTouchEvent(d)||!mxEvent.isPopupTrigger(d))&&a.customLinkClicked(g)&&(mxUtils.clearSelection(),mxEvent.consume(d))}),mxUtils.bind(this,function(a){null!=b||!this.lightboxClickEnabled||mxEvent.isTouchEvent(a)&&0!=this.toolbarItems.length||this.showLightbox()}))};
GraphViewer.prototype.showLightbox=function(a,b,d){if("open"==this.graphConfig.lightbox||window.self!==window.top)if(null==this.lightboxWindow||this.lightboxWindow.closed){a=null!=a?a:null!=this.graphConfig.editable?this.graphConfig.editable:!0;d={client:1,target:null!=d?d:"blank"};a&&(d.edit=this.graphConfig.edit||"_blank");if(null!=b?b:1)d.close=1;this.layersEnabled&&(d.layers=1);null!=this.graphConfig&&0!=this.graphConfig.nav&&(d.nav=1);null!=this.graphConfig&&null!=this.graphConfig.highlight&&
(d.highlight=this.graphConfig.highlight.substring(1));null!=this.currentPage&&0<this.currentPage&&(d.page=this.currentPage);"undefined"!==typeof window.postMessage&&(null==document.documentMode||10<=document.documentMode)?null==this.lightboxWindow&&mxEvent.addListener(window,"message",mxUtils.bind(this,function(a){"ready"==a.data&&a.source==this.lightboxWindow&&this.lightboxWindow.postMessage(this.xml,"*")})):d.data=encodeURIComponent(this.xml);"1"==urlParams.dev&&(d.dev="1");this.lightboxWindow=
window.open(("1"!=urlParams.dev?EditorUi.lightboxHost:"https://test.draw.io")+"/#P"+encodeURIComponent(JSON.stringify(d)))}else this.lightboxWindow.focus();else this.showLocalLightbox()};
GraphViewer.prototype.showLocalLightbox=function(){mxUtils.getDocumentScrollOrigin(document);var a=document.createElement("div");a.style.cssText="position:fixed;top:0;left:0;bottom:0;right:0;";a.style.zIndex=this.lightboxZIndex;a.style.backgroundColor="#000000";mxUtils.setOpacity(a,70);document.body.appendChild(a);var b=document.createElement("img");b.setAttribute("border","0");b.setAttribute("src",Editor.closeImage);b.style.cssText="position:fixed;top:32px;right:32px;";b.style.cursor="pointer";mxEvent.addListener(b,
-"click",function(){k.destroy()});urlParams.pages="1";urlParams.page=this.currentPage;urlParams["page-id"]=this.graphConfig.pageId;urlParams["layer-ids"]=null!=this.graphConfig.layerIds&&0<this.graphConfig.layerIds.length?this.graphConfig.layerIds.join(" "):null;urlParams.nav=0!=this.graphConfig.nav?"1":"0";urlParams.layers=this.layersEnabled?"1":"0";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 d=Graph.prototype.shadowId;Graph.prototype.shadowId="lightboxDropShadow";var k=new EditorUi(new Editor(!0),document.createElement("div"),!0);k.editor.editBlankUrl=this.editBlankUrl;k.editor.graph.shadowId="lightboxDropShadow";Graph.prototype.shadowId=d;k.refresh=function(){};var f=mxUtils.bind(this,function(a){27==a.keyCode&&k.destroy()}),
-m=k.destroy;k.destroy=function(){mxEvent.removeListener(document.documentElement,"keydown",f);document.body.removeChild(a);document.body.removeChild(b);document.body.style.overflow="auto";GraphViewer.resizeSensorEnabled=!0;m.apply(this,arguments)};var p=k.editor.graph,c=p.container;c.style.overflow="hidden";this.lightboxChrome?(c.style.border="1px solid #c0c0c0",c.style.margin="40px",mxEvent.addListener(document.documentElement,"keydown",f)):(a.style.display="none",b.style.display="none");var e=this;
-p.getImageFromBundles=function(a){return e.getImageUrl(a)};var g=k.createTemporaryGraph;k.createTemporaryGraph=function(){var a=g.apply(this,arguments);a.getImageFromBundles=function(a){return e.getImageUrl(a)};return a};this.graphConfig.move&&(p.isMoveCellsEvent=function(a){return!0});mxUtils.setPrefixedStyle(c.style,"border-radius","4px");c.style.position="fixed";GraphViewer.resizeSensorEnabled=!1;document.body.style.overflow="hidden";mxClient.IS_SF||mxClient.IS_EDGE||(mxUtils.setPrefixedStyle(c.style,
-"transform","rotateY(90deg)"),mxUtils.setPrefixedStyle(c.style,"transition","all .25s ease-in-out"));this.addClickHandler(p,k);window.setTimeout(mxUtils.bind(this,function(){c.style.outline="none";c.style.zIndex=this.lightboxZIndex;b.style.zIndex=this.lightboxZIndex;document.body.appendChild(c);document.body.appendChild(b);k.setFileData(this.xml);mxUtils.setPrefixedStyle(c.style,"transform","rotateY(0deg)");k.chromelessToolbar.style.bottom="60px";k.chromelessToolbar.style.zIndex=this.lightboxZIndex;
-document.body.appendChild(k.chromelessToolbar);k.getEditBlankXml=mxUtils.bind(this,function(){return this.xml});k.lightboxFit();k.chromelessResize();this.showLayers(p,this.graph);mxEvent.addListener(a,"click",function(){k.destroy()})}),0);return k};
+"click",function(){g.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";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 d=Graph.prototype.shadowId;Graph.prototype.shadowId="lightboxDropShadow";var g=new EditorUi(new Editor(!0),document.createElement("div"),!0);g.editor.editBlankUrl=this.editBlankUrl;g.editor.graph.shadowId="lightboxDropShadow";Graph.prototype.shadowId=d;g.refresh=function(){};var f=mxUtils.bind(this,function(a){27==a.keyCode&&g.destroy()}),
+m=g.destroy;g.destroy=function(){mxEvent.removeListener(document.documentElement,"keydown",f);document.body.removeChild(a);document.body.removeChild(b);document.body.style.overflow="auto";GraphViewer.resizeSensorEnabled=!0;m.apply(this,arguments)};var p=g.editor.graph,c=p.container;c.style.overflow="hidden";this.lightboxChrome?(c.style.border="1px solid #c0c0c0",c.style.margin="40px",mxEvent.addListener(document.documentElement,"keydown",f)):(a.style.display="none",b.style.display="none");var e=this;
+p.getImageFromBundles=function(a){return e.getImageUrl(a)};var k=g.createTemporaryGraph;g.createTemporaryGraph=function(){var a=k.apply(this,arguments);a.getImageFromBundles=function(a){return e.getImageUrl(a)};return a};this.graphConfig.move&&(p.isMoveCellsEvent=function(a){return!0});mxUtils.setPrefixedStyle(c.style,"border-radius","4px");c.style.position="fixed";GraphViewer.resizeSensorEnabled=!1;document.body.style.overflow="hidden";mxClient.IS_SF||mxClient.IS_EDGE||(mxUtils.setPrefixedStyle(c.style,
+"transform","rotateY(90deg)"),mxUtils.setPrefixedStyle(c.style,"transition","all .25s ease-in-out"));this.addClickHandler(p,g);window.setTimeout(mxUtils.bind(this,function(){c.style.outline="none";c.style.zIndex=this.lightboxZIndex;b.style.zIndex=this.lightboxZIndex;document.body.appendChild(c);document.body.appendChild(b);g.setFileData(this.xml);mxUtils.setPrefixedStyle(c.style,"transform","rotateY(0deg)");g.chromelessToolbar.style.bottom="60px";g.chromelessToolbar.style.zIndex=this.lightboxZIndex;
+document.body.appendChild(g.chromelessToolbar);g.getEditBlankXml=mxUtils.bind(this,function(){return this.xml});g.lightboxFit();g.chromelessResize();this.showLayers(p,this.graph);mxEvent.addListener(a,"click",function(){g.destroy()})}),0);return g};
GraphViewer.prototype.updateTitle=function(a){a=a||"";this.showTitleAsTooltip&&null!=this.graph&&null!=this.graph.container&&this.graph.container.setAttribute("title",a);null!=this.filename&&(this.filename.innerHTML="",mxUtils.write(this.filename,a),this.filename.setAttribute("title",a))};
GraphViewer.processElements=function(a){mxUtils.forEach(GraphViewer.getElementsByClassName(a||"mxgraph"),function(a){try{a.innerHTML="",GraphViewer.createViewerForElement(a)}catch(d){a.innerHTML=d.message,null!=window.console&&console.error(d)}})};
-GraphViewer.getElementsByClassName=function(a){if(document.getElementsByClassName){var b=document.getElementsByClassName(a);a=[];for(var d=0;d<b.length;d++)a.push(b[d]);return a}for(var k=document.getElementsByTagName("*"),b=[],d=0;d<k.length;d++){var f=k[d].className;null!=f&&0<f.length&&(f=f.split(" "),0<=mxUtils.indexOf(f,a)&&b.push(k[d]))}return b};
-GraphViewer.createViewerForElement=function(a,b){var d=a.getAttribute("data-mxgraph");if(null!=d){var k=JSON.parse(d),f=function(d){d=mxUtils.parseXml(d);d=new GraphViewer(a,d.documentElement,k);null!=b&&b(d)};null!=k.url?GraphViewer.getUrl(k.url,function(a){f(a)}):f(k.xml)}};
+GraphViewer.getElementsByClassName=function(a){if(document.getElementsByClassName){var b=document.getElementsByClassName(a);a=[];for(var d=0;d<b.length;d++)a.push(b[d]);return a}for(var g=document.getElementsByTagName("*"),b=[],d=0;d<g.length;d++){var f=g[d].className;null!=f&&0<f.length&&(f=f.split(" "),0<=mxUtils.indexOf(f,a)&&b.push(g[d]))}return b};
+GraphViewer.createViewerForElement=function(a,b){var d=a.getAttribute("data-mxgraph");if(null!=d){var g=JSON.parse(d),f=function(d){d=mxUtils.parseXml(d);d=new GraphViewer(a,d.documentElement,g);null!=b&&b(d)};null!=g.url?GraphViewer.getUrl(g.url,function(a){f(a)}):f(g.xml)}};
GraphViewer.initCss=function(){try{var a=document.createElement("style");a.type="text/css";a.innerHTML="div.mxTooltip {\n-webkit-box-shadow: 3px 3px 12px #C0C0C0;\n-moz-box-shadow: 3px 3px 12px #C0C0C0;\nbox-shadow: 3px 3px 12px #C0C0C0;\nbackground: #FFFFCC;\nborder-style: solid;\nborder-width: 1px;\nborder-color: black;\nfont-family: Arial;\nfont-size: 8pt;\nposition: absolute;\ncursor: default;\npadding: 4px;\ncolor: black;}\ntd.mxPopupMenuIcon div {\nwidth:16px;\nheight:16px;}\nhtml div.mxPopupMenu {\n-webkit-box-shadow:2px 2px 3px #d5d5d5;\n-moz-box-shadow:2px 2px 3px #d5d5d5;\nbox-shadow:2px 2px 3px #d5d5d5;\n_filter:progid:DXImageTransform.Microsoft.DropShadow(OffX=2, OffY=2, Color='#d0d0d0',Positive='true');\nbackground:white;\nposition:absolute;\nborder:3px solid #e7e7e7;\npadding:3px;}\nhtml table.mxPopupMenu {\nborder-collapse:collapse;\nmargin:0px;}\nhtml td.mxPopupMenuItem {\npadding:7px 30px 7px 30px;\nfont-family:Helvetica Neue,Helvetica,Arial Unicode MS,Arial;\nfont-size:10pt;}\nhtml td.mxPopupMenuIcon {\nbackground-color:white;\npadding:0px;}\ntd.mxPopupMenuIcon .geIcon {\npadding:2px;\npadding-bottom:4px;\nmargin:2px;\nborder:1px solid transparent;\nopacity:0.5;\n_width:26px;\n_height:26px;}\ntd.mxPopupMenuIcon .geIcon:hover {\nborder:1px solid gray;\nborder-radius:2px;\nopacity:1;}\nhtml tr.mxPopupMenuItemHover {\nbackground-color: #eeeeee;\ncolor: black;}\ntable.mxPopupMenu hr {\ncolor:#cccccc;\nbackground-color:#cccccc;\nborder:none;\nheight:1px;}\ntable.mxPopupMenu tr {\tfont-size:4pt;}\n.geDialog { font-family:Helvetica Neue,Helvetica,Arial Unicode MS,Arial;\nfont-size:10pt;\nborder:none;\nmargin:0px;}\n.geDialog {\tposition:absolute;\tbackground:white;\toverflow:hidden;\tpadding:30px;\tborder:1px solid #acacac;\t-webkit-box-shadow:0px 0px 2px 2px #d5d5d5;\t-moz-box-shadow:0px 0px 2px 2px #d5d5d5;\tbox-shadow:0px 0px 2px 2px #d5d5d5;\t_filter:progid:DXImageTransform.Microsoft.DropShadow(OffX=2, OffY=2, Color='#d5d5d5', Positive='true');\tz-index: 2;}.geDialogClose {\tposition:absolute;\twidth:9px;\theight:9px;\topacity:0.5;\tcursor:pointer;\t_filter:alpha(opacity=50);}.geDialogClose:hover {\topacity:1;}.geDialogTitle {\tbox-sizing:border-box;\twhite-space:nowrap;\tbackground:rgb(229, 229, 229);\tborder-bottom:1px solid rgb(192, 192, 192);\tfont-size:15px;\tfont-weight:bold;\ttext-align:center;\tcolor:rgb(35, 86, 149);}.geDialogFooter {\tbackground:whiteSmoke;\twhite-space:nowrap;\ttext-align:right;\tbox-sizing:border-box;\tborder-top:1px solid #e5e5e5;\tcolor:darkGray;}\n.geBtn {\tbackground-color: #f5f5f5;\tborder-radius: 2px;\tborder: 1px solid #d8d8d8;\tcolor: #333;\tcursor: default;\tfont-size: 11px;\tfont-weight: bold;\theight: 29px;\tline-height: 27px;\tmargin: 0 0 0 8px;\tmin-width: 72px;\toutline: 0;\tpadding: 0 8px;\tcursor: pointer;}.geBtn:hover, .geBtn:focus {\t-webkit-box-shadow: 0px 1px 1px rgba(0,0,0,0.1);\t-moz-box-shadow: 0px 1px 1px rgba(0,0,0,0.1);\tbox-shadow: 0px 1px 1px rgba(0,0,0,0.1);\tborder: 1px solid #c6c6c6;\tbackground-color: #f8f8f8;\tbackground-image: linear-gradient(#f8f8f8 0px,#f1f1f1 100%);\tcolor: #111;}.geBtn:disabled {\topacity: .5;}.gePrimaryBtn {\tbackground-color: #4d90fe;\tbackground-image: linear-gradient(#4d90fe 0px,#4787ed 100%);\tborder: 1px solid #3079ed;\tcolor: #fff;}.gePrimaryBtn:hover, .gePrimaryBtn:focus {\tbackground-color: #357ae8;\tbackground-image: linear-gradient(#4d90fe 0px,#357ae8 100%);\tborder: 1px solid #2f5bb7;\tcolor: #fff;}.gePrimaryBtn:disabled {\topacity: .5;}";document.getElementsByTagName("head")[0].appendChild(a)}catch(b){}};
-GraphViewer.cachedUrls={};GraphViewer.getUrl=function(a,b,d){if(null!=GraphViewer.cachedUrls[a])b(GraphViewer.cachedUrls[a]);else{var k=null!=navigator.userAgent&&0<navigator.userAgent.indexOf("MSIE 9")?new XDomainRequest:new XMLHttpRequest;k.open("GET",a);k.onload=function(){b(null!=k.getText?k.getText():k.responseText)};k.onerror=d;k.send()}};GraphViewer.resizeSensorEnabled=!0;GraphViewer.useResizeSensor=!0;
-(function(){var a=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||function(a){return window.setTimeout(a,20)},b=function(d,k){function f(){this.q=[];this.add=function(a){this.q.push(a)};var a,b;this.call=function(){a=0;for(b=this.q.length;a<b;a++)this.q[a].call()}}function m(a,b){return a.currentStyle?a.currentStyle[b]:window.getComputedStyle?window.getComputedStyle(a,null).getPropertyValue(b):a.style[b]}function p(b,c){if(!b.resizedAttached)b.resizedAttached=
+GraphViewer.cachedUrls={};GraphViewer.getUrl=function(a,b,d){if(null!=GraphViewer.cachedUrls[a])b(GraphViewer.cachedUrls[a]);else{var g=null!=navigator.userAgent&&0<navigator.userAgent.indexOf("MSIE 9")?new XDomainRequest:new XMLHttpRequest;g.open("GET",a);g.onload=function(){b(null!=g.getText?g.getText():g.responseText)};g.onerror=d;g.send()}};GraphViewer.resizeSensorEnabled=!0;GraphViewer.useResizeSensor=!0;
+(function(){var a=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||function(a){return window.setTimeout(a,20)},b=function(d,g){function f(){this.q=[];this.add=function(a){this.q.push(a)};var a,b;this.call=function(){a=0;for(b=this.q.length;a<b;a++)this.q[a].call()}}function m(a,b){return a.currentStyle?a.currentStyle[b]:window.getComputedStyle?window.getComputedStyle(a,null).getPropertyValue(b):a.style[b]}function p(b,c){if(!b.resizedAttached)b.resizedAttached=
new f,b.resizedAttached.add(c);else if(b.resizedAttached){b.resizedAttached.add(c);return}b.resizeSensor=document.createElement("div");b.resizeSensor.className="resize-sensor";b.resizeSensor.style.cssText="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;";b.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>';
-b.appendChild(b.resizeSensor);"static"==m(b,"position")&&(b.style.position="relative");var d=b.resizeSensor.childNodes[0],e=d.childNodes[0],g=b.resizeSensor.childNodes[1],k=function(){e.style.width="100000px";e.style.height="100000px";d.scrollLeft=1E5;d.scrollTop=1E5;g.scrollLeft=1E5;g.scrollTop=1E5};k();var l=!1,n=function(){b.resizedAttached&&(l&&(b.resizedAttached.call(),l=!1),a(n))};a(n);var p,q,K,F,I=function(){if((K=b.offsetWidth)!=p||(F=b.offsetHeight)!=q)l=!0,p=K,q=F;k()},C=function(a,b,c){a.attachEvent?
-a.attachEvent("on"+b,c):a.addEventListener(b,c)};C(d,"scroll",I);C(g,"scroll",I)}var c=function(){GraphViewer.resizeSensorEnabled&&k()},e=Object.prototype.toString.call(d),g="[object Array]"===e||"[object NodeList]"===e||"[object HTMLCollection]"===e||"undefined"!==typeof jQuery&&d instanceof jQuery||"undefined"!==typeof Elements&&d instanceof Elements;if(g)for(var e=0,n=d.length;e<n;e++)p(d[e],c);else p(d,c);this.detach=function(){if(g)for(var a=0,c=d.length;a<c;a++)b.detach(d[a]);else b.detach(d)}};
+b.appendChild(b.resizeSensor);"static"==m(b,"position")&&(b.style.position="relative");var d=b.resizeSensor.childNodes[0],e=d.childNodes[0],g=b.resizeSensor.childNodes[1],k=function(){e.style.width="100000px";e.style.height="100000px";d.scrollLeft=1E5;d.scrollTop=1E5;g.scrollLeft=1E5;g.scrollTop=1E5};k();var l=!1,n=function(){b.resizedAttached&&(l&&(b.resizedAttached.call(),l=!1),a(n))};a(n);var p,q,K,F,I=function(){if((K=b.offsetWidth)!=p||(F=b.offsetHeight)!=q)l=!0,p=K,q=F;k()},D=function(a,b,c){a.attachEvent?
+a.attachEvent("on"+b,c):a.addEventListener(b,c)};D(d,"scroll",I);D(g,"scroll",I)}var c=function(){GraphViewer.resizeSensorEnabled&&g()},e=Object.prototype.toString.call(d),k="[object Array]"===e||"[object NodeList]"===e||"[object HTMLCollection]"===e||"undefined"!==typeof jQuery&&d instanceof jQuery||"undefined"!==typeof Elements&&d instanceof Elements;if(k)for(var e=0,n=d.length;e<n;e++)p(d[e],c);else p(d,c);this.detach=function(){if(k)for(var a=0,c=d.length;a<c;a++)b.detach(d[a]);else b.detach(d)}};
b.detach=function(a){a.resizeSensor&&(a.removeChild(a.resizeSensor),delete a.resizeSensor,delete a.resizedAttached)};window.ResizeSensor=b})();
(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 92fe080b..ebc9616f 100644
--- a/src/main/webapp/mxgraph/mxClient.js
+++ b/src/main/webapp/mxgraph/mxClient.js
@@ -1,4 +1,4 @@
-var mxClient={VERSION:"15.0.3",IS_IE:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE"),IS_IE11:null!=navigator.userAgent&&!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:null!=navigator.userAgent&&!!navigator.userAgent.match(/Edge\//),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&0>navigator.userAgent.indexOf("Edge/"),
+var mxClient={VERSION:"15.0.4",IS_IE:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE"),IS_IE11:null!=navigator.userAgent&&!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:null!=navigator.userAgent&&!!navigator.userAgent.match(/Edge\//),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&0>navigator.userAgent.indexOf("Edge/"),
IS_OP:null!=navigator.userAgent&&(0<=navigator.userAgent.indexOf("Opera/")||0<=navigator.userAgent.indexOf("OPR/")),IS_OT:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Presto/")&&0>navigator.userAgent.indexOf("Presto/2.4.")&&0>navigator.userAgent.indexOf("Presto/2.3.")&&0>navigator.userAgent.indexOf("Presto/2.2.")&&0>navigator.userAgent.indexOf("Presto/2.1.")&&0>navigator.userAgent.indexOf("Presto/2.0.")&&0>navigator.userAgent.indexOf("Presto/1."),IS_SF:/Apple Computer, Inc/.test(navigator.vendor),
IS_ANDROID:0<=navigator.appVersion.indexOf("Android"),IS_IOS:/iP(hone|od|ad)/.test(navigator.platform),IS_GC:/Google Inc/.test(navigator.vendor),IS_CHROMEAPP:null!=window.chrome&&null!=chrome.app&&null!=chrome.app.runtime,IS_FF:"undefined"!==typeof InstallTrigger,IS_MT:0<=navigator.userAgent.indexOf("Firefox/")&&0>navigator.userAgent.indexOf("Firefox/1.")&&0>navigator.userAgent.indexOf("Firefox/2.")||0<=navigator.userAgent.indexOf("Iceweasel/")&&0>navigator.userAgent.indexOf("Iceweasel/1.")&&0>navigator.userAgent.indexOf("Iceweasel/2.")||
0<=navigator.userAgent.indexOf("SeaMonkey/")&&0>navigator.userAgent.indexOf("SeaMonkey/1.")||0<=navigator.userAgent.indexOf("Iceape/")&&0>navigator.userAgent.indexOf("Iceape/1."),IS_SVG:"MICROSOFT INTERNET EXPLORER"!=navigator.appName.toUpperCase(),NO_FO:!document.createElementNS||"[object SVGForeignObjectElement]"!=document.createElementNS("http://www.w3.org/2000/svg","foreignObject")||0<=navigator.userAgent.indexOf("Opera/"),IS_WIN:0<navigator.appVersion.indexOf("Win"),IS_MAC:0<navigator.appVersion.indexOf("Mac"),
@@ -834,7 +834,7 @@ q=g.isEventsEnabled();g.setEventsEnabled(!1);var r=this.graph.isEnabled();this.g
null;try{var B=[this.getRoot()];a=new mxTemporaryCellStates(g,c,B,null,mxUtils.bind(this,function(a){return this.getLinkForCellState(a)}))}finally{if(mxClient.IS_IE)g.overlayPane.innerHTML="",g.canvas.style.overflow="hidden",g.canvas.style.position="relative",g.canvas.style.top=this.marginTop+"px",g.canvas.style.width=f.width+"px",g.canvas.style.height=f.height+"px";else for(c=e.firstChild;null!=c;)B=c.nextSibling,b=c.nodeName.toLowerCase(),"svg"==b?(c.style.overflow="hidden",c.style.position="relative",
c.style.top=this.marginTop+"px",c.setAttribute("width",f.width),c.setAttribute("height",f.height),c.style.width="",c.style.height=""):"default"!=c.style.cursor&&"div"!=b&&c.parentNode.removeChild(c),c=B;this.printBackgroundImage&&(e=e.getElementsByTagName("svg"),0<e.length&&(e[0].style.position="absolute"));g.overlayPane.parentNode.removeChild(g.overlayPane);this.graph.setEnabled(r);this.graph.container=d;this.graph.cellRenderer.redraw=u;g.canvas=k;g.backgroundPane=l;g.drawPane=m;g.overlayPane=n;
g.translate=t;a.destroy();g.setEventsEnabled(q)}};mxPrintPreview.prototype.getLinkForCellState=function(a){return this.graph.getLinkForCell(a.cell)};
-mxPrintPreview.prototype.insertBackgroundImage=function(a,b,c){var d=this.graph.backgroundImage;if(null!=d){var e=document.createElement("img");e.style.position="absolute";e.style.marginLeft=Math.round(b*this.scale)+"px";e.style.marginTop=Math.round(c*this.scale)+"px";e.setAttribute("width",Math.round(this.scale*d.width));e.setAttribute("height",Math.round(this.scale*d.height));e.src=d.src;a.insertBefore(e,a.firstChild)}};mxPrintPreview.prototype.getCoverPages=function(){return null};
+mxPrintPreview.prototype.insertBackgroundImage=function(a,b,c){var d=this.graph.backgroundImage;if(null!=d){var e=document.createElement("img");e.style.position="absolute";e.style.marginLeft=Math.round((b+d.x)*this.scale)+"px";e.style.marginTop=Math.round((c+d.y)*this.scale)+"px";e.setAttribute("width",Math.round(d.width*this.scale));e.setAttribute("height",Math.round(d.height*this.scale));e.src=d.src;a.insertBefore(e,a.firstChild)}};mxPrintPreview.prototype.getCoverPages=function(){return null};
mxPrintPreview.prototype.getAppendices=function(){return null};mxPrintPreview.prototype.print=function(a){a=this.open(a);null!=a&&a.print()};mxPrintPreview.prototype.close=function(){null!=this.wnd&&(this.wnd.close(),this.wnd=null)};function mxStylesheet(){this.styles={};this.putDefaultVertexStyle(this.createDefaultVertexStyle());this.putDefaultEdgeStyle(this.createDefaultEdgeStyle())}
mxStylesheet.prototype.createDefaultVertexStyle=function(){var a={};a[mxConstants.STYLE_SHAPE]=mxConstants.SHAPE_RECTANGLE;a[mxConstants.STYLE_PERIMETER]=mxPerimeter.RectanglePerimeter;a[mxConstants.STYLE_VERTICAL_ALIGN]=mxConstants.ALIGN_MIDDLE;a[mxConstants.STYLE_ALIGN]=mxConstants.ALIGN_CENTER;a[mxConstants.STYLE_FILLCOLOR]="#C3D9FF";a[mxConstants.STYLE_STROKECOLOR]="#6482B9";a[mxConstants.STYLE_FONTCOLOR]="#774400";return a};
mxStylesheet.prototype.createDefaultEdgeStyle=function(){var a={};a[mxConstants.STYLE_SHAPE]=mxConstants.SHAPE_CONNECTOR;a[mxConstants.STYLE_ENDARROW]=mxConstants.ARROW_CLASSIC;a[mxConstants.STYLE_VERTICAL_ALIGN]=mxConstants.ALIGN_MIDDLE;a[mxConstants.STYLE_ALIGN]=mxConstants.ALIGN_CENTER;a[mxConstants.STYLE_STROKECOLOR]="#6482B9";a[mxConstants.STYLE_FONTCOLOR]="#446299";return a};mxStylesheet.prototype.putDefaultVertexStyle=function(a){this.putCellStyle("defaultVertex",a)};
diff --git a/src/main/webapp/service-worker.js b/src/main/webapp/service-worker.js
index 74118a30..c3130a25 100644
--- a/src/main/webapp/service-worker.js
+++ b/src/main/webapp/service-worker.js
@@ -1,2 +1,2 @@
-if(!self.define){const e=e=>{"require"!==e&&(e+=".js");let i=Promise.resolve();return r[e]||(i=new Promise((async i=>{if("document"in self){const r=document.createElement("script");r.src=e,document.head.appendChild(r),r.onload=i}else importScripts(e),i()}))),i.then((()=>{if(!r[e])throw new Error(`Module ${e} didn’t register its module`);return r[e]}))},i=(i,r)=>{Promise.all(i.map(e)).then((e=>r(1===e.length?e[0]:e)))},r={require:Promise.resolve(i)};self.define=(i,a,c)=>{r[i]||(r[i]=Promise.resolve().then((()=>{let r={};const s={uri:location.origin+i.slice(1)};return Promise.all(a.map((i=>{switch(i){case"exports":return r;case"module":return s;default:return e(i)}}))).then((e=>{const i=c(...e);return r.default||(r.default=i),r}))})))}}define("./service-worker.js",["./workbox-f163abaa"],(function(e){"use strict";self.addEventListener("message",(e=>{e.data&&"SKIP_WAITING"===e.data.type&&self.skipWaiting()})),e.precacheAndRoute([{url:"js/app.min.js",revision:"00c4b466892ccdb5d716c4dbd02348fb"},{url:"js/extensions.min.js",revision:"adae2bddf90d292f9e6297db50f39dd3"},{url:"js/stencils.min.js",revision:"c170a229d8726934c0d6b04c2214a36c"},{url:"js/shapes-14-6-5.min.js",revision:"2a45abd06dfe78e69135e9f87f9b78d3"},{url:"js/math-print.js",revision:"9d98c920695f6c3395da4b68f723e60a"},{url:"index.html",revision:"6d4fee0a8111a8faf43063d25ceea2dc"},{url:"open.html",revision:"d71816b3b00e769fc6019fcdd6921662"},{url:"styles/grapheditor.css",revision:"a02a5d8342a82adf17798f4eae85befc"},{url:"styles/atlas.css",revision:"e8152cda9233d3a3af017422993abfce"},{url:"styles/dark.css",revision:"87d5d01385c5d0f0c4c4f5d0f3532826"},{url:"js/croppie/croppie.min.css",revision:"fc297c9002c79c15a132f13ee3ec427e"},{url:"js/dropbox/Dropbox-sdk.min.js",revision:"4b9842892aa37b156db0a8364b7a83b0"},{url:"js/onedrive/OneDrive.js",revision:"505e8280346666f7ee801bc59521fa67"},{url:"js/viewer-static.min.js",revision:"b1a2e1b1a68bd1d096b0df37be0ee66a"},{url:"connect/jira/editor-1-3-3.html",revision:"a2b0e7267a08a838f3cc404eba831ec0"},{url:"connect/jira/viewerPanel-1-3-12.html",revision:"2ce6e99d95113e9ca6b24343cea202e0"},{url:"connect/jira/fullScreenViewer-1-3-3.html",revision:"ba7ece2dfb2833b72f97280d7092f25e"},{url:"connect/jira/viewerPanel.js",revision:"f7a38ee065b927f3e9568213709e5b84"},{url:"connect/jira/spinner.gif",revision:"7d857ab9d86123e93d74d48e958fe743"},{url:"connect/jira/editor.js",revision:"375a89b2a867264a395f384d00eeba13"},{url:"connect/jira/fullscreen-viewer-init.js",revision:"197ed5837ed27992688fc424699a9a78"},{url:"connect/jira/fullscreen-viewer.js",revision:"4e0775a6c156a803e777870623ac7c3e"},{url:"plugins/connectJira.js",revision:"4cefa13414e0d406550f3c073923080c"},{url:"plugins/cConf-comments.js",revision:"c787357209cff2986dcca567b599e2ef"},{url:"plugins/cConf-1-4-8.js",revision:"ec6e55011746305549024292f46270bd"},{url:"connect/confluence/connectUtils-1-4-8.js",revision:"74878fb4834967aa4a68647cab7888c1"},{url:"connect/new_common/cac.js",revision:"3d8c436c566db645fb1e6e6ba9f69bbc"},{url:"connect/gdrive_common/gac.js",revision:"38f1df3ecc4d78290493f47e62202138"},{url:"connect/onedrive_common/ac.js",revision:"293aa21acaf0a3349686f420b2be874a"},{url:"connect/confluence/viewer-init.js",revision:"4a60c6c805cab7bc782f1e52f7818d9f"},{url:"connect/confluence/viewer.js",revision:"c861a0b3beb7a99be4eaceb970e088b5"},{url:"connect/confluence/viewer-1-4-42.html",revision:"c7b38b3af4eb7a58ab6dc4791216530e"},{url:"connect/confluence/macroEditor-1-4-8.html",revision:"8cd74a2fb60bf2e3e86026d66107cf11"},{url:"connect/confluence/includeDiagram-1-4-8.js",revision:"ea920e51a37c0b54d7187e0ee2791b5d"},{url:"connect/confluence/includeDiagram.html",revision:"538252ed4fed6d5e9f4e53b35954c116"},{url:"connect/confluence/macro-editor.js",revision:"e273a48b8e81faac4530bf1a68d75aa0"},{url:"math/MathJax.js",revision:"b2c103388b71bb3d11cbf9aa45fe9b68"},{url:"math/config/TeX-MML-AM_SVG-full.js",revision:"d5cb8ac04050983170ae4af145bc66ff"},{url:"math/jax/output/SVG/fonts/TeX/fontdata.js",revision:"495e5a410955d1b6178870e605890ede"},{url:"math/jax/element/mml/optable/BasicLatin.js",revision:"cac9b2e71382e62270baa55fab07cc13"},{url:"math/jax/output/SVG/fonts/TeX/Size2/Regular/Main.js",revision:"e3e5e4d5924beed29f0844550b5c8f46"},{url:"math/jax/output/SVG/fonts/TeX/Main/Regular/LetterlikeSymbols.js",revision:"0767cbad7275b53da128e7e5e1109f7c"},{url:"math/jax/output/SVG/fonts/TeX/Main/Regular/GreekAndCoptic.js",revision:"346302a5c5ee00e01c302148c56dbfe3"},{url:"resources/dia.txt",revision:"b27e8770b0fc71f51c97a80bed58ec4e"},{url:"resources/dia_am.txt",revision:"ff59ef2ea422e962065b978f74f1989e"},{url:"resources/dia_ar.txt",revision:"b53a2876e65d205d42c0217216db0a0b"},{url:"resources/dia_bg.txt",revision:"5ae6ea7a2b816b32ded88cb15651dbfc"},{url:"resources/dia_bn.txt",revision:"f8775fef4398d0863d1c95b92f778f14"},{url:"resources/dia_bs.txt",revision:"1a5bbe8e6e02b215c7457d9735ada682"},{url:"resources/dia_ca.txt",revision:"d8ac61cb5b3e5d47f9ce8160c8b2f057"},{url:"resources/dia_cs.txt",revision:"aeaa9d93c19d60a9ab385a21d57f025c"},{url:"resources/dia_da.txt",revision:"5e0221a99a3fdf557b5ccf72965d99b2"},{url:"resources/dia_de.txt",revision:"d3ad299dc8cfbd2a34479edfafce74ad"},{url:"resources/dia_el.txt",revision:"80761a88228f85296bfc029bf5340718"},{url:"resources/dia_eo.txt",revision:"4544b6600298fe72d2d516fd135c54fa"},{url:"resources/dia_es.txt",revision:"863e0e73d4cdf95093461ef0157e13e5"},{url:"resources/dia_et.txt",revision:"3a47c1b462102c60e47e0f7d6e07d379"},{url:"resources/dia_eu.txt",revision:"92c451283a83cae2d83460b1b0aaf1c4"},{url:"resources/dia_fa.txt",revision:"c56a53dac116441fac2a6e6a110b4fcf"},{url:"resources/dia_fi.txt",revision:"fcc968a8202ebe596bb4efa31d5c55b7"},{url:"resources/dia_fil.txt",revision:"0c98b10b2ce7660502fab8f8a09216c0"},{url:"resources/dia_fr.txt",revision:"550ba55018af500d82b2ade74f49d6a6"},{url:"resources/dia_gl.txt",revision:"d9dedee9a17ce0e98cac6a641dbd1b17"},{url:"resources/dia_gu.txt",revision:"6d6d7e768e1d255dcb9f9abf87676787"},{url:"resources/dia_he.txt",revision:"404b9e323e5bbbecb63ea4a58385431a"},{url:"resources/dia_hi.txt",revision:"8c4436fda7e9278685d9d5d6e0942ae9"},{url:"resources/dia_hr.txt",revision:"38cf52a7e23c4e8796d0cbb7ea217f7e"},{url:"resources/dia_hu.txt",revision:"e17887d5e7057c80ec1da14fe7749c52"},{url:"resources/dia_id.txt",revision:"32c8349f2744c3b6023fd17742eb1c2c"},{url:"resources/dia_it.txt",revision:"57eba100f012d139d00543c31060cf04"},{url:"resources/dia_ja.txt",revision:"cbb7bea7bd120272c6dfe0d6f0ca85f4"},{url:"resources/dia_kn.txt",revision:"ca9045d8ab0d3c8448228187c8ba77cd"},{url:"resources/dia_ko.txt",revision:"ea4948e5456ac276658b0071172dee82"},{url:"resources/dia_lt.txt",revision:"05955be58d94abc2707dea99394a60db"},{url:"resources/dia_lv.txt",revision:"47aa1bcdd23457cd5f3026db7a357fc9"},{url:"resources/dia_ml.txt",revision:"5735f8afcd3fb73882147629d044e368"},{url:"resources/dia_mr.txt",revision:"8e891bbae07ac6fbe9038e8d19fb66fd"},{url:"resources/dia_ms.txt",revision:"ea1992800627d8e54c54d54d1078cd50"},{url:"resources/dia_my.txt",revision:"b27e8770b0fc71f51c97a80bed58ec4e"},{url:"resources/dia_nl.txt",revision:"a158a142f848a44f4b9a86b2c71de770"},{url:"resources/dia_no.txt",revision:"a73fe6de8d13ff09b57022c6152de435"},{url:"resources/dia_pl.txt",revision:"a731cde706b7b10c2bb9b8b804ecf99e"},{url:"resources/dia_pt-br.txt",revision:"6d5aef2fa11b45c7e089a78d8f8077d9"},{url:"resources/dia_pt.txt",revision:"e39267e6c115d3dfff18734d9512396a"},{url:"resources/dia_ro.txt",revision:"e2485ba528fffc006ddc16a2bdbba588"},{url:"resources/dia_ru.txt",revision:"4e4dff4df4bb635eab4648a31718bb71"},{url:"resources/dia_si.txt",revision:"b27e8770b0fc71f51c97a80bed58ec4e"},{url:"resources/dia_sk.txt",revision:"aa39fa602751e960c408b51bc4d1e9a3"},{url:"resources/dia_sl.txt",revision:"a1e9ea18592a3520a564da53754435f1"},{url:"resources/dia_sr.txt",revision:"ee7f392d230f3acf9ee64e59912d2240"},{url:"resources/dia_sv.txt",revision:"d1af4adc3abc689e2b2877348fe3a80e"},{url:"resources/dia_sw.txt",revision:"ee11057cc33d2db3915810afa98e4fb8"},{url:"resources/dia_ta.txt",revision:"64633496007987935476811363899867"},{url:"resources/dia_te.txt",revision:"b67de98cc3819f31d6aedc4a8e332d3f"},{url:"resources/dia_th.txt",revision:"bf3564b735dddb73bafa110e1ba4f364"},{url:"resources/dia_tr.txt",revision:"e66e3a8530b0bda46ff6de26598a637b"},{url:"resources/dia_uk.txt",revision:"1ea94afcd9c9383c784ceae2896c8af4"},{url:"resources/dia_vi.txt",revision:"2ea8a953b560713a201dff1d8d3917dd"},{url:"resources/dia_zh-tw.txt",revision:"7a19eef01a4ee231cc05d3b3833bba4f"},{url:"resources/dia_zh.txt",revision:"f63faca2218966f9c6f7d2c52a3872c5"},{url:"favicon.ico",revision:"fab2d88b37c72d83607527573de45281"},{url:"images/manifest.json",revision:"c6236bde53ed79aaaec60a1aca8ee2ef"},{url:"images/logo.png",revision:"89630b64b911ebe0daa3dfe442087cfa"},{url:"images/drawlogo.svg",revision:"4bf4d14ebcf072d8bd4c5a1c89e88fc6"},{url:"images/drawlogo48.png",revision:"8b13428373aca67b895364d025f42417"},{url:"images/drawlogo-gray.svg",revision:"0aabacbc0873816e1e09e4736ae44c7d"},{url:"images/drawlogo-text-bottom.svg",revision:"f6c438823ab31f290940bd4feb8dd9c2"},{url:"images/default-user.jpg",revision:"2c399696a87c8921f12d2f9e1990cc6e"},{url:"images/logo-flat-small.png",revision:"4b178e59ff499d6dd1894fc498b59877"},{url:"images/apple-touch-icon.png",revision:"73da7989a23ce9a4be565ec65658a239"},{url:"images/favicon-16x16.png",revision:"1a79d5461a5d2bf21f6652e0ac20d6e5"},{url:"images/favicon-32x32.png",revision:"e3b92da2febe70bad5372f6f3474b034"},{url:"images/android-chrome-196x196.png",revision:"f8c045b2d7b1c719fda64edab04c415c"},{url:"images/android-chrome-512x512.png",revision:"959b5fac2453963ff6d60fb85e4b73fd"},{url:"images/delete.png",revision:"5f2350f2fd20f1a229637aed32ed8f29"},{url:"images/droptarget.png",revision:"bbf7f563fb6784de1ce96f329519b043"},{url:"images/help.png",revision:"9266c6c3915bd33c243d80037d37bf61"},{url:"images/download.png",revision:"35418dd7bd48d87502c71b578cc6c37f"},{url:"images/logo-flat.png",revision:"038070ab43aee6e54a791211859fc67b"},{url:"images/google-drive-logo.svg",revision:"5d9f2f5bbc7dcc252730a0072bb23059"},{url:"images/onedrive-logo.svg",revision:"3645b344ec0634c1290dd58d7dc87b97"},{url:"images/dropbox-logo.svg",revision:"e6be408c77cf9c82d41ac64fa854280a"},{url:"images/github-logo.svg",revision:"a1a999b69a275eac0cb918360ac05ae1"},{url:"images/gitlab-logo.svg",revision:"0faea8c818899e58533e153c44b10517"},{url:"images/trello-logo.svg",revision:"006fd0d7d70d7e95dc691674cb12e044"},{url:"images/osa_drive-harddisk.png",revision:"b954e1ae772087c5b4c6ae797e1f9649"},{url:"images/osa_database.png",revision:"c350d9d9b95f37b6cfe798b40ede5fb0"},{url:"images/google-drive-logo-white.svg",revision:"f329d8b1be7778515a85b93fc35d9f26"},{url:"images/dropbox-logo-white.svg",revision:"4ea8299ac3bc31a16f199ee3aec223bf"},{url:"images/onedrive-logo-white.svg",revision:"b3602fa0fc947009cff3f33a581cff4d"},{url:"images/github-logo-white.svg",revision:"537b1127b3ca0f95b45782d1304fb77a"},{url:"images/gitlab-logo-white.svg",revision:"5fede9ac2f394c716b8c23e3fddc3910"},{url:"images/trello-logo-white-orange.svg",revision:"e2a0a52ba3766682f138138d10a75eb5"},{url:"images/logo-confluence.png",revision:"ed1e55d44ae5eba8f999aba2c93e8331"},{url:"images/logo-jira.png",revision:"f8d460555a0d1f87cfd901e940666629"},{url:"images/clear.gif",revision:"db13c778e4382e0b55258d0f811d5d70"},{url:"images/spin.gif",revision:"487cbb40b9ced439aa1ad914e816d773"},{url:"images/checkmark.gif",revision:"ba764ce62f2bf952df5bbc2bb4d381c5"},{url:"images/hs.png",revision:"fefa1a03d92ebad25c88dca94a0b63db"},{url:"images/aui-wait.gif",revision:"5a474bcbd8d2f2826f03d10ea44bf60e"},{url:"mxgraph/css/common.css",revision:"b5b7280ec98671bb6c3847a36bc7ea12"},{url:"mxgraph/images/expanded.gif",revision:"2b67c2c035af1e9a5cc814f0d22074cf"},{url:"mxgraph/images/collapsed.gif",revision:"73cc826da002a3d740ca4ce6ec5c1f4a"},{url:"mxgraph/images/maximize.gif",revision:"5cd13d6925493ab51e876694cc1c2ec2"},{url:"mxgraph/images/minimize.gif",revision:"8957741b9b0f86af9438775f2aadbb54"},{url:"mxgraph/images/close.gif",revision:"8b84669812ac7382984fca35de8da48b"},{url:"mxgraph/images/resize.gif",revision:"a6477612b3567a34033f9cac6184eed3"},{url:"mxgraph/images/separator.gif",revision:"7819742ff106c97da7a801c2372bbbe5"},{url:"mxgraph/images/window.gif",revision:"fd9a21dd4181f98052a202a0a01f18ab"},{url:"mxgraph/images/window-title.gif",revision:"3fb1d6c43246cdf991a11dfe826dfe99"},{url:"mxgraph/images/button.gif",revision:"00759bdc3ad218fa739f584369541809"},{url:"mxgraph/images/point.gif",revision:"83a43717b284902442620f61bc4e9fa6"}],{ignoreURLParametersMatching:[/.*/]})}));
+if(!self.define){const e=e=>{"require"!==e&&(e+=".js");let i=Promise.resolve();return r[e]||(i=new Promise((async i=>{if("document"in self){const r=document.createElement("script");r.src=e,document.head.appendChild(r),r.onload=i}else importScripts(e),i()}))),i.then((()=>{if(!r[e])throw new Error(`Module ${e} didn’t register its module`);return r[e]}))},i=(i,r)=>{Promise.all(i.map(e)).then((e=>r(1===e.length?e[0]:e)))},r={require:Promise.resolve(i)};self.define=(i,a,c)=>{r[i]||(r[i]=Promise.resolve().then((()=>{let r={};const s={uri:location.origin+i.slice(1)};return Promise.all(a.map((i=>{switch(i){case"exports":return r;case"module":return s;default:return e(i)}}))).then((e=>{const i=c(...e);return r.default||(r.default=i),r}))})))}}define("./service-worker.js",["./workbox-f163abaa"],(function(e){"use strict";self.addEventListener("message",(e=>{e.data&&"SKIP_WAITING"===e.data.type&&self.skipWaiting()})),e.precacheAndRoute([{url:"js/app.min.js",revision:"2d85cda728cc146ff3dc11f1116fe203"},{url:"js/extensions.min.js",revision:"adae2bddf90d292f9e6297db50f39dd3"},{url:"js/stencils.min.js",revision:"c170a229d8726934c0d6b04c2214a36c"},{url:"js/shapes-14-6-5.min.js",revision:"2a45abd06dfe78e69135e9f87f9b78d3"},{url:"js/math-print.js",revision:"9d98c920695f6c3395da4b68f723e60a"},{url:"index.html",revision:"6d4fee0a8111a8faf43063d25ceea2dc"},{url:"open.html",revision:"d71816b3b00e769fc6019fcdd6921662"},{url:"styles/grapheditor.css",revision:"a02a5d8342a82adf17798f4eae85befc"},{url:"styles/atlas.css",revision:"e8152cda9233d3a3af017422993abfce"},{url:"styles/dark.css",revision:"87d5d01385c5d0f0c4c4f5d0f3532826"},{url:"js/croppie/croppie.min.css",revision:"fc297c9002c79c15a132f13ee3ec427e"},{url:"js/dropbox/Dropbox-sdk.min.js",revision:"4b9842892aa37b156db0a8364b7a83b0"},{url:"js/onedrive/OneDrive.js",revision:"505e8280346666f7ee801bc59521fa67"},{url:"js/viewer-static.min.js",revision:"b746aad225e22515f3c520fd889d2635"},{url:"connect/jira/editor-1-3-3.html",revision:"a2b0e7267a08a838f3cc404eba831ec0"},{url:"connect/jira/viewerPanel-1-3-12.html",revision:"2ce6e99d95113e9ca6b24343cea202e0"},{url:"connect/jira/fullScreenViewer-1-3-3.html",revision:"ba7ece2dfb2833b72f97280d7092f25e"},{url:"connect/jira/viewerPanel.js",revision:"f7a38ee065b927f3e9568213709e5b84"},{url:"connect/jira/spinner.gif",revision:"7d857ab9d86123e93d74d48e958fe743"},{url:"connect/jira/editor.js",revision:"375a89b2a867264a395f384d00eeba13"},{url:"connect/jira/fullscreen-viewer-init.js",revision:"197ed5837ed27992688fc424699a9a78"},{url:"connect/jira/fullscreen-viewer.js",revision:"4e0775a6c156a803e777870623ac7c3e"},{url:"plugins/connectJira.js",revision:"4cefa13414e0d406550f3c073923080c"},{url:"plugins/cConf-comments.js",revision:"c787357209cff2986dcca567b599e2ef"},{url:"plugins/cConf-1-4-8.js",revision:"ec6e55011746305549024292f46270bd"},{url:"connect/confluence/connectUtils-1-4-8.js",revision:"74878fb4834967aa4a68647cab7888c1"},{url:"connect/new_common/cac.js",revision:"3d8c436c566db645fb1e6e6ba9f69bbc"},{url:"connect/gdrive_common/gac.js",revision:"38f1df3ecc4d78290493f47e62202138"},{url:"connect/onedrive_common/ac.js",revision:"293aa21acaf0a3349686f420b2be874a"},{url:"connect/confluence/viewer-init.js",revision:"4a60c6c805cab7bc782f1e52f7818d9f"},{url:"connect/confluence/viewer.js",revision:"c5fb629e12fd3256c23cc8acfaa46f5b"},{url:"connect/confluence/viewer-1-4-42.html",revision:"c7b38b3af4eb7a58ab6dc4791216530e"},{url:"connect/confluence/macroEditor-1-4-8.html",revision:"8cd74a2fb60bf2e3e86026d66107cf11"},{url:"connect/confluence/includeDiagram-1-4-8.js",revision:"ea920e51a37c0b54d7187e0ee2791b5d"},{url:"connect/confluence/includeDiagram.html",revision:"538252ed4fed6d5e9f4e53b35954c116"},{url:"connect/confluence/macro-editor.js",revision:"e273a48b8e81faac4530bf1a68d75aa0"},{url:"math/MathJax.js",revision:"b2c103388b71bb3d11cbf9aa45fe9b68"},{url:"math/config/TeX-MML-AM_SVG-full.js",revision:"d5cb8ac04050983170ae4af145bc66ff"},{url:"math/jax/output/SVG/fonts/TeX/fontdata.js",revision:"495e5a410955d1b6178870e605890ede"},{url:"math/jax/element/mml/optable/BasicLatin.js",revision:"cac9b2e71382e62270baa55fab07cc13"},{url:"math/jax/output/SVG/fonts/TeX/Size2/Regular/Main.js",revision:"e3e5e4d5924beed29f0844550b5c8f46"},{url:"math/jax/output/SVG/fonts/TeX/Main/Regular/LetterlikeSymbols.js",revision:"0767cbad7275b53da128e7e5e1109f7c"},{url:"math/jax/output/SVG/fonts/TeX/Main/Regular/GreekAndCoptic.js",revision:"346302a5c5ee00e01c302148c56dbfe3"},{url:"resources/dia.txt",revision:"b27e8770b0fc71f51c97a80bed58ec4e"},{url:"resources/dia_am.txt",revision:"ff59ef2ea422e962065b978f74f1989e"},{url:"resources/dia_ar.txt",revision:"b53a2876e65d205d42c0217216db0a0b"},{url:"resources/dia_bg.txt",revision:"5ae6ea7a2b816b32ded88cb15651dbfc"},{url:"resources/dia_bn.txt",revision:"f8775fef4398d0863d1c95b92f778f14"},{url:"resources/dia_bs.txt",revision:"1a5bbe8e6e02b215c7457d9735ada682"},{url:"resources/dia_ca.txt",revision:"d8ac61cb5b3e5d47f9ce8160c8b2f057"},{url:"resources/dia_cs.txt",revision:"aeaa9d93c19d60a9ab385a21d57f025c"},{url:"resources/dia_da.txt",revision:"5e0221a99a3fdf557b5ccf72965d99b2"},{url:"resources/dia_de.txt",revision:"d3ad299dc8cfbd2a34479edfafce74ad"},{url:"resources/dia_el.txt",revision:"80761a88228f85296bfc029bf5340718"},{url:"resources/dia_eo.txt",revision:"4544b6600298fe72d2d516fd135c54fa"},{url:"resources/dia_es.txt",revision:"863e0e73d4cdf95093461ef0157e13e5"},{url:"resources/dia_et.txt",revision:"3a47c1b462102c60e47e0f7d6e07d379"},{url:"resources/dia_eu.txt",revision:"92c451283a83cae2d83460b1b0aaf1c4"},{url:"resources/dia_fa.txt",revision:"c56a53dac116441fac2a6e6a110b4fcf"},{url:"resources/dia_fi.txt",revision:"fcc968a8202ebe596bb4efa31d5c55b7"},{url:"resources/dia_fil.txt",revision:"0c98b10b2ce7660502fab8f8a09216c0"},{url:"resources/dia_fr.txt",revision:"550ba55018af500d82b2ade74f49d6a6"},{url:"resources/dia_gl.txt",revision:"d9dedee9a17ce0e98cac6a641dbd1b17"},{url:"resources/dia_gu.txt",revision:"6d6d7e768e1d255dcb9f9abf87676787"},{url:"resources/dia_he.txt",revision:"404b9e323e5bbbecb63ea4a58385431a"},{url:"resources/dia_hi.txt",revision:"8c4436fda7e9278685d9d5d6e0942ae9"},{url:"resources/dia_hr.txt",revision:"38cf52a7e23c4e8796d0cbb7ea217f7e"},{url:"resources/dia_hu.txt",revision:"e17887d5e7057c80ec1da14fe7749c52"},{url:"resources/dia_id.txt",revision:"32c8349f2744c3b6023fd17742eb1c2c"},{url:"resources/dia_it.txt",revision:"57eba100f012d139d00543c31060cf04"},{url:"resources/dia_ja.txt",revision:"cbb7bea7bd120272c6dfe0d6f0ca85f4"},{url:"resources/dia_kn.txt",revision:"ca9045d8ab0d3c8448228187c8ba77cd"},{url:"resources/dia_ko.txt",revision:"ea4948e5456ac276658b0071172dee82"},{url:"resources/dia_lt.txt",revision:"05955be58d94abc2707dea99394a60db"},{url:"resources/dia_lv.txt",revision:"47aa1bcdd23457cd5f3026db7a357fc9"},{url:"resources/dia_ml.txt",revision:"5735f8afcd3fb73882147629d044e368"},{url:"resources/dia_mr.txt",revision:"8e891bbae07ac6fbe9038e8d19fb66fd"},{url:"resources/dia_ms.txt",revision:"ea1992800627d8e54c54d54d1078cd50"},{url:"resources/dia_my.txt",revision:"b27e8770b0fc71f51c97a80bed58ec4e"},{url:"resources/dia_nl.txt",revision:"a158a142f848a44f4b9a86b2c71de770"},{url:"resources/dia_no.txt",revision:"a73fe6de8d13ff09b57022c6152de435"},{url:"resources/dia_pl.txt",revision:"a731cde706b7b10c2bb9b8b804ecf99e"},{url:"resources/dia_pt-br.txt",revision:"6d5aef2fa11b45c7e089a78d8f8077d9"},{url:"resources/dia_pt.txt",revision:"e39267e6c115d3dfff18734d9512396a"},{url:"resources/dia_ro.txt",revision:"e2485ba528fffc006ddc16a2bdbba588"},{url:"resources/dia_ru.txt",revision:"4e4dff4df4bb635eab4648a31718bb71"},{url:"resources/dia_si.txt",revision:"b27e8770b0fc71f51c97a80bed58ec4e"},{url:"resources/dia_sk.txt",revision:"aa39fa602751e960c408b51bc4d1e9a3"},{url:"resources/dia_sl.txt",revision:"a1e9ea18592a3520a564da53754435f1"},{url:"resources/dia_sr.txt",revision:"ee7f392d230f3acf9ee64e59912d2240"},{url:"resources/dia_sv.txt",revision:"d1af4adc3abc689e2b2877348fe3a80e"},{url:"resources/dia_sw.txt",revision:"ee11057cc33d2db3915810afa98e4fb8"},{url:"resources/dia_ta.txt",revision:"64633496007987935476811363899867"},{url:"resources/dia_te.txt",revision:"b67de98cc3819f31d6aedc4a8e332d3f"},{url:"resources/dia_th.txt",revision:"bf3564b735dddb73bafa110e1ba4f364"},{url:"resources/dia_tr.txt",revision:"e66e3a8530b0bda46ff6de26598a637b"},{url:"resources/dia_uk.txt",revision:"1ea94afcd9c9383c784ceae2896c8af4"},{url:"resources/dia_vi.txt",revision:"2ea8a953b560713a201dff1d8d3917dd"},{url:"resources/dia_zh-tw.txt",revision:"7a19eef01a4ee231cc05d3b3833bba4f"},{url:"resources/dia_zh.txt",revision:"f63faca2218966f9c6f7d2c52a3872c5"},{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 a65e1e43..458440a6 100644
--- a/src/main/webapp/service-worker.js.map
+++ b/src/main/webapp/service-worker.js.map
@@ -1 +1 @@
-{"version":3,"file":"service-worker.js","sources":["../../../../../../private/var/folders/cv/_wml09cx4cd5ryt_r7z2tjjm0000gn/T/ff6a7cb543c17b45ecb8c47b223c3b03/service-worker.js"],"sourcesContent":["import {precacheAndRoute as workbox_precaching_precacheAndRoute} from '/usr/local/lib/node_modules/workbox-cli/node_modules/workbox-precaching/precacheAndRoute.mjs';/**\n * Welcome to your Workbox-powered service worker!\n *\n * You'll need to register this file in your web app.\n * See https://goo.gl/nhQhGp\n *\n * The rest of the code is auto-generated. Please don't update this file\n * directly; instead, make changes to your Workbox build configuration\n * and re-run your build process.\n * See https://goo.gl/2aRDsh\n */\n\n\n\n\n\n\n\n\nself.addEventListener('message', (event) => {\n if (event.data && event.data.type === 'SKIP_WAITING') {\n self.skipWaiting();\n }\n});\n\n\n\n\n/**\n * The precacheAndRoute() method efficiently caches and responds to\n * requests for URLs in the manifest.\n * See https://goo.gl/S9QRab\n */\nworkbox_precaching_precacheAndRoute([\n {\n \"url\": \"js/app.min.js\",\n \"revision\": \"00c4b466892ccdb5d716c4dbd02348fb\"\n },\n {\n \"url\": \"js/extensions.min.js\",\n \"revision\": \"adae2bddf90d292f9e6297db50f39dd3\"\n },\n {\n \"url\": \"js/stencils.min.js\",\n \"revision\": \"c170a229d8726934c0d6b04c2214a36c\"\n },\n {\n \"url\": \"js/shapes-14-6-5.min.js\",\n \"revision\": \"2a45abd06dfe78e69135e9f87f9b78d3\"\n },\n {\n \"url\": \"js/math-print.js\",\n \"revision\": \"9d98c920695f6c3395da4b68f723e60a\"\n },\n {\n \"url\": \"index.html\",\n \"revision\": \"6d4fee0a8111a8faf43063d25ceea2dc\"\n },\n {\n \"url\": \"open.html\",\n \"revision\": \"d71816b3b00e769fc6019fcdd6921662\"\n },\n {\n \"url\": \"styles/grapheditor.css\",\n \"revision\": \"a02a5d8342a82adf17798f4eae85befc\"\n },\n {\n \"url\": \"styles/atlas.css\",\n \"revision\": \"e8152cda9233d3a3af017422993abfce\"\n },\n {\n \"url\": \"styles/dark.css\",\n \"revision\": \"87d5d01385c5d0f0c4c4f5d0f3532826\"\n },\n {\n \"url\": \"js/croppie/croppie.min.css\",\n \"revision\": \"fc297c9002c79c15a132f13ee3ec427e\"\n },\n {\n \"url\": \"js/dropbox/Dropbox-sdk.min.js\",\n \"revision\": \"4b9842892aa37b156db0a8364b7a83b0\"\n },\n {\n \"url\": \"js/onedrive/OneDrive.js\",\n \"revision\": \"505e8280346666f7ee801bc59521fa67\"\n },\n {\n \"url\": \"js/viewer-static.min.js\",\n \"revision\": \"b1a2e1b1a68bd1d096b0df37be0ee66a\"\n },\n {\n \"url\": \"connect/jira/editor-1-3-3.html\",\n \"revision\": \"a2b0e7267a08a838f3cc404eba831ec0\"\n },\n {\n \"url\": \"connect/jira/viewerPanel-1-3-12.html\",\n \"revision\": \"2ce6e99d95113e9ca6b24343cea202e0\"\n },\n {\n \"url\": \"connect/jira/fullScreenViewer-1-3-3.html\",\n \"revision\": \"ba7ece2dfb2833b72f97280d7092f25e\"\n },\n {\n \"url\": \"connect/jira/viewerPanel.js\",\n \"revision\": \"f7a38ee065b927f3e9568213709e5b84\"\n },\n {\n \"url\": \"connect/jira/spinner.gif\",\n \"revision\": \"7d857ab9d86123e93d74d48e958fe743\"\n },\n {\n \"url\": \"connect/jira/editor.js\",\n \"revision\": \"375a89b2a867264a395f384d00eeba13\"\n },\n {\n \"url\": \"connect/jira/fullscreen-viewer-init.js\",\n \"revision\": \"197ed5837ed27992688fc424699a9a78\"\n },\n {\n \"url\": \"connect/jira/fullscreen-viewer.js\",\n \"revision\": \"4e0775a6c156a803e777870623ac7c3e\"\n },\n {\n \"url\": \"plugins/connectJira.js\",\n \"revision\": \"4cefa13414e0d406550f3c073923080c\"\n },\n {\n \"url\": \"plugins/cConf-comments.js\",\n \"revision\": \"c787357209cff2986dcca567b599e2ef\"\n },\n {\n \"url\": \"plugins/cConf-1-4-8.js\",\n \"revision\": \"ec6e55011746305549024292f46270bd\"\n },\n {\n \"url\": \"connect/confluence/connectUtils-1-4-8.js\",\n \"revision\": \"74878fb4834967aa4a68647cab7888c1\"\n },\n {\n \"url\": \"connect/new_common/cac.js\",\n \"revision\": \"3d8c436c566db645fb1e6e6ba9f69bbc\"\n },\n {\n \"url\": \"connect/gdrive_common/gac.js\",\n \"revision\": \"38f1df3ecc4d78290493f47e62202138\"\n },\n {\n \"url\": \"connect/onedrive_common/ac.js\",\n \"revision\": \"293aa21acaf0a3349686f420b2be874a\"\n },\n {\n \"url\": \"connect/confluence/viewer-init.js\",\n \"revision\": \"4a60c6c805cab7bc782f1e52f7818d9f\"\n },\n {\n \"url\": \"connect/confluence/viewer.js\",\n \"revision\": \"c861a0b3beb7a99be4eaceb970e088b5\"\n },\n {\n \"url\": \"connect/confluence/viewer-1-4-42.html\",\n \"revision\": \"c7b38b3af4eb7a58ab6dc4791216530e\"\n },\n {\n \"url\": \"connect/confluence/macroEditor-1-4-8.html\",\n \"revision\": \"8cd74a2fb60bf2e3e86026d66107cf11\"\n },\n {\n \"url\": \"connect/confluence/includeDiagram-1-4-8.js\",\n \"revision\": \"ea920e51a37c0b54d7187e0ee2791b5d\"\n },\n {\n \"url\": \"connect/confluence/includeDiagram.html\",\n \"revision\": \"538252ed4fed6d5e9f4e53b35954c116\"\n },\n {\n \"url\": \"connect/confluence/macro-editor.js\",\n \"revision\": \"e273a48b8e81faac4530bf1a68d75aa0\"\n },\n {\n \"url\": \"math/MathJax.js\",\n \"revision\": \"b2c103388b71bb3d11cbf9aa45fe9b68\"\n },\n {\n \"url\": \"math/config/TeX-MML-AM_SVG-full.js\",\n \"revision\": \"d5cb8ac04050983170ae4af145bc66ff\"\n },\n {\n \"url\": \"math/jax/output/SVG/fonts/TeX/fontdata.js\",\n \"revision\": \"495e5a410955d1b6178870e605890ede\"\n },\n {\n \"url\": \"math/jax/element/mml/optable/BasicLatin.js\",\n \"revision\": \"cac9b2e71382e62270baa55fab07cc13\"\n },\n {\n \"url\": \"math/jax/output/SVG/fonts/TeX/Size2/Regular/Main.js\",\n \"revision\": \"e3e5e4d5924beed29f0844550b5c8f46\"\n },\n {\n \"url\": \"math/jax/output/SVG/fonts/TeX/Main/Regular/LetterlikeSymbols.js\",\n \"revision\": \"0767cbad7275b53da128e7e5e1109f7c\"\n },\n {\n \"url\": \"math/jax/output/SVG/fonts/TeX/Main/Regular/GreekAndCoptic.js\",\n \"revision\": \"346302a5c5ee00e01c302148c56dbfe3\"\n },\n {\n \"url\": \"resources/dia.txt\",\n \"revision\": \"b27e8770b0fc71f51c97a80bed58ec4e\"\n },\n {\n \"url\": \"resources/dia_am.txt\",\n \"revision\": \"ff59ef2ea422e962065b978f74f1989e\"\n },\n {\n \"url\": \"resources/dia_ar.txt\",\n \"revision\": \"b53a2876e65d205d42c0217216db0a0b\"\n },\n {\n \"url\": \"resources/dia_bg.txt\",\n \"revision\": \"5ae6ea7a2b816b32ded88cb15651dbfc\"\n },\n {\n \"url\": \"resources/dia_bn.txt\",\n \"revision\": \"f8775fef4398d0863d1c95b92f778f14\"\n },\n {\n \"url\": \"resources/dia_bs.txt\",\n \"revision\": \"1a5bbe8e6e02b215c7457d9735ada682\"\n },\n {\n \"url\": \"resources/dia_ca.txt\",\n \"revision\": \"d8ac61cb5b3e5d47f9ce8160c8b2f057\"\n },\n {\n \"url\": \"resources/dia_cs.txt\",\n \"revision\": \"aeaa9d93c19d60a9ab385a21d57f025c\"\n },\n {\n \"url\": \"resources/dia_da.txt\",\n \"revision\": \"5e0221a99a3fdf557b5ccf72965d99b2\"\n },\n {\n \"url\": \"resources/dia_de.txt\",\n \"revision\": \"d3ad299dc8cfbd2a34479edfafce74ad\"\n },\n {\n \"url\": \"resources/dia_el.txt\",\n \"revision\": \"80761a88228f85296bfc029bf5340718\"\n },\n {\n \"url\": \"resources/dia_eo.txt\",\n \"revision\": \"4544b6600298fe72d2d516fd135c54fa\"\n },\n {\n \"url\": \"resources/dia_es.txt\",\n \"revision\": \"863e0e73d4cdf95093461ef0157e13e5\"\n },\n {\n \"url\": \"resources/dia_et.txt\",\n \"revision\": \"3a47c1b462102c60e47e0f7d6e07d379\"\n },\n {\n \"url\": \"resources/dia_eu.txt\",\n \"revision\": \"92c451283a83cae2d83460b1b0aaf1c4\"\n },\n {\n \"url\": \"resources/dia_fa.txt\",\n \"revision\": \"c56a53dac116441fac2a6e6a110b4fcf\"\n },\n {\n \"url\": \"resources/dia_fi.txt\",\n \"revision\": \"fcc968a8202ebe596bb4efa31d5c55b7\"\n },\n {\n \"url\": \"resources/dia_fil.txt\",\n \"revision\": \"0c98b10b2ce7660502fab8f8a09216c0\"\n },\n {\n \"url\": \"resources/dia_fr.txt\",\n \"revision\": \"550ba55018af500d82b2ade74f49d6a6\"\n },\n {\n \"url\": \"resources/dia_gl.txt\",\n \"revision\": \"d9dedee9a17ce0e98cac6a641dbd1b17\"\n },\n {\n \"url\": \"resources/dia_gu.txt\",\n \"revision\": \"6d6d7e768e1d255dcb9f9abf87676787\"\n },\n {\n \"url\": \"resources/dia_he.txt\",\n \"revision\": \"404b9e323e5bbbecb63ea4a58385431a\"\n },\n {\n \"url\": \"resources/dia_hi.txt\",\n \"revision\": \"8c4436fda7e9278685d9d5d6e0942ae9\"\n },\n {\n \"url\": \"resources/dia_hr.txt\",\n \"revision\": \"38cf52a7e23c4e8796d0cbb7ea217f7e\"\n },\n {\n \"url\": \"resources/dia_hu.txt\",\n \"revision\": \"e17887d5e7057c80ec1da14fe7749c52\"\n },\n {\n \"url\": \"resources/dia_id.txt\",\n \"revision\": \"32c8349f2744c3b6023fd17742eb1c2c\"\n },\n {\n \"url\": \"resources/dia_it.txt\",\n \"revision\": \"57eba100f012d139d00543c31060cf04\"\n },\n {\n \"url\": \"resources/dia_ja.txt\",\n \"revision\": \"cbb7bea7bd120272c6dfe0d6f0ca85f4\"\n },\n {\n \"url\": \"resources/dia_kn.txt\",\n \"revision\": \"ca9045d8ab0d3c8448228187c8ba77cd\"\n },\n {\n \"url\": \"resources/dia_ko.txt\",\n \"revision\": \"ea4948e5456ac276658b0071172dee82\"\n },\n {\n \"url\": \"resources/dia_lt.txt\",\n \"revision\": \"05955be58d94abc2707dea99394a60db\"\n },\n {\n \"url\": \"resources/dia_lv.txt\",\n \"revision\": \"47aa1bcdd23457cd5f3026db7a357fc9\"\n },\n {\n \"url\": \"resources/dia_ml.txt\",\n \"revision\": \"5735f8afcd3fb73882147629d044e368\"\n },\n {\n \"url\": \"resources/dia_mr.txt\",\n \"revision\": \"8e891bbae07ac6fbe9038e8d19fb66fd\"\n },\n {\n \"url\": \"resources/dia_ms.txt\",\n \"revision\": \"ea1992800627d8e54c54d54d1078cd50\"\n },\n {\n \"url\": \"resources/dia_my.txt\",\n \"revision\": \"b27e8770b0fc71f51c97a80bed58ec4e\"\n },\n {\n \"url\": \"resources/dia_nl.txt\",\n \"revision\": \"a158a142f848a44f4b9a86b2c71de770\"\n },\n {\n \"url\": \"resources/dia_no.txt\",\n \"revision\": \"a73fe6de8d13ff09b57022c6152de435\"\n },\n {\n \"url\": \"resources/dia_pl.txt\",\n \"revision\": \"a731cde706b7b10c2bb9b8b804ecf99e\"\n },\n {\n \"url\": \"resources/dia_pt-br.txt\",\n \"revision\": \"6d5aef2fa11b45c7e089a78d8f8077d9\"\n },\n {\n \"url\": \"resources/dia_pt.txt\",\n \"revision\": \"e39267e6c115d3dfff18734d9512396a\"\n },\n {\n \"url\": \"resources/dia_ro.txt\",\n \"revision\": \"e2485ba528fffc006ddc16a2bdbba588\"\n },\n {\n \"url\": \"resources/dia_ru.txt\",\n \"revision\": \"4e4dff4df4bb635eab4648a31718bb71\"\n },\n {\n \"url\": \"resources/dia_si.txt\",\n \"revision\": \"b27e8770b0fc71f51c97a80bed58ec4e\"\n },\n {\n \"url\": \"resources/dia_sk.txt\",\n \"revision\": \"aa39fa602751e960c408b51bc4d1e9a3\"\n },\n {\n \"url\": \"resources/dia_sl.txt\",\n \"revision\": \"a1e9ea18592a3520a564da53754435f1\"\n },\n {\n \"url\": \"resources/dia_sr.txt\",\n \"revision\": \"ee7f392d230f3acf9ee64e59912d2240\"\n },\n {\n \"url\": \"resources/dia_sv.txt\",\n \"revision\": \"d1af4adc3abc689e2b2877348fe3a80e\"\n },\n {\n \"url\": \"resources/dia_sw.txt\",\n \"revision\": \"ee11057cc33d2db3915810afa98e4fb8\"\n },\n {\n \"url\": \"resources/dia_ta.txt\",\n \"revision\": \"64633496007987935476811363899867\"\n },\n {\n \"url\": \"resources/dia_te.txt\",\n \"revision\": \"b67de98cc3819f31d6aedc4a8e332d3f\"\n },\n {\n \"url\": \"resources/dia_th.txt\",\n \"revision\": \"bf3564b735dddb73bafa110e1ba4f364\"\n },\n {\n \"url\": \"resources/dia_tr.txt\",\n \"revision\": \"e66e3a8530b0bda46ff6de26598a637b\"\n },\n {\n \"url\": \"resources/dia_uk.txt\",\n \"revision\": \"1ea94afcd9c9383c784ceae2896c8af4\"\n },\n {\n \"url\": \"resources/dia_vi.txt\",\n \"revision\": \"2ea8a953b560713a201dff1d8d3917dd\"\n },\n {\n \"url\": \"resources/dia_zh-tw.txt\",\n \"revision\": \"7a19eef01a4ee231cc05d3b3833bba4f\"\n },\n {\n \"url\": \"resources/dia_zh.txt\",\n \"revision\": \"f63faca2218966f9c6f7d2c52a3872c5\"\n },\n {\n \"url\": \"favicon.ico\",\n \"revision\": \"fab2d88b37c72d83607527573de45281\"\n },\n {\n \"url\": \"images/manifest.json\",\n \"revision\": \"c6236bde53ed79aaaec60a1aca8ee2ef\"\n },\n {\n \"url\": \"images/logo.png\",\n \"revision\": \"89630b64b911ebe0daa3dfe442087cfa\"\n },\n {\n \"url\": \"images/drawlogo.svg\",\n \"revision\": \"4bf4d14ebcf072d8bd4c5a1c89e88fc6\"\n },\n {\n \"url\": \"images/drawlogo48.png\",\n \"revision\": \"8b13428373aca67b895364d025f42417\"\n },\n {\n \"url\": \"images/drawlogo-gray.svg\",\n \"revision\": \"0aabacbc0873816e1e09e4736ae44c7d\"\n },\n {\n \"url\": \"images/drawlogo-text-bottom.svg\",\n \"revision\": \"f6c438823ab31f290940bd4feb8dd9c2\"\n },\n {\n \"url\": \"images/default-user.jpg\",\n \"revision\": \"2c399696a87c8921f12d2f9e1990cc6e\"\n },\n {\n \"url\": \"images/logo-flat-small.png\",\n \"revision\": \"4b178e59ff499d6dd1894fc498b59877\"\n },\n {\n \"url\": \"images/apple-touch-icon.png\",\n \"revision\": \"73da7989a23ce9a4be565ec65658a239\"\n },\n {\n \"url\": \"images/favicon-16x16.png\",\n \"revision\": \"1a79d5461a5d2bf21f6652e0ac20d6e5\"\n },\n {\n \"url\": \"images/favicon-32x32.png\",\n \"revision\": \"e3b92da2febe70bad5372f6f3474b034\"\n },\n {\n \"url\": \"images/android-chrome-196x196.png\",\n \"revision\": \"f8c045b2d7b1c719fda64edab04c415c\"\n },\n {\n \"url\": \"images/android-chrome-512x512.png\",\n \"revision\": \"959b5fac2453963ff6d60fb85e4b73fd\"\n },\n {\n \"url\": \"images/delete.png\",\n \"revision\": \"5f2350f2fd20f1a229637aed32ed8f29\"\n },\n {\n \"url\": \"images/droptarget.png\",\n \"revision\": \"bbf7f563fb6784de1ce96f329519b043\"\n },\n {\n \"url\": \"images/help.png\",\n \"revision\": \"9266c6c3915bd33c243d80037d37bf61\"\n },\n {\n \"url\": \"images/download.png\",\n \"revision\": \"35418dd7bd48d87502c71b578cc6c37f\"\n },\n {\n \"url\": \"images/logo-flat.png\",\n \"revision\": \"038070ab43aee6e54a791211859fc67b\"\n },\n {\n \"url\": \"images/google-drive-logo.svg\",\n \"revision\": \"5d9f2f5bbc7dcc252730a0072bb23059\"\n },\n {\n \"url\": \"images/onedrive-logo.svg\",\n \"revision\": \"3645b344ec0634c1290dd58d7dc87b97\"\n },\n {\n \"url\": \"images/dropbox-logo.svg\",\n \"revision\": \"e6be408c77cf9c82d41ac64fa854280a\"\n },\n {\n \"url\": \"images/github-logo.svg\",\n \"revision\": \"a1a999b69a275eac0cb918360ac05ae1\"\n },\n {\n \"url\": \"images/gitlab-logo.svg\",\n \"revision\": \"0faea8c818899e58533e153c44b10517\"\n },\n {\n \"url\": \"images/trello-logo.svg\",\n \"revision\": \"006fd0d7d70d7e95dc691674cb12e044\"\n },\n {\n \"url\": \"images/osa_drive-harddisk.png\",\n \"revision\": \"b954e1ae772087c5b4c6ae797e1f9649\"\n },\n {\n \"url\": \"images/osa_database.png\",\n \"revision\": \"c350d9d9b95f37b6cfe798b40ede5fb0\"\n },\n {\n \"url\": \"images/google-drive-logo-white.svg\",\n \"revision\": \"f329d8b1be7778515a85b93fc35d9f26\"\n },\n {\n \"url\": \"images/dropbox-logo-white.svg\",\n \"revision\": \"4ea8299ac3bc31a16f199ee3aec223bf\"\n },\n {\n \"url\": \"images/onedrive-logo-white.svg\",\n \"revision\": \"b3602fa0fc947009cff3f33a581cff4d\"\n },\n {\n \"url\": \"images/github-logo-white.svg\",\n \"revision\": \"537b1127b3ca0f95b45782d1304fb77a\"\n },\n {\n \"url\": \"images/gitlab-logo-white.svg\",\n \"revision\": \"5fede9ac2f394c716b8c23e3fddc3910\"\n },\n {\n \"url\": \"images/trello-logo-white-orange.svg\",\n \"revision\": \"e2a0a52ba3766682f138138d10a75eb5\"\n },\n {\n \"url\": \"images/logo-confluence.png\",\n \"revision\": \"ed1e55d44ae5eba8f999aba2c93e8331\"\n },\n {\n \"url\": \"images/logo-jira.png\",\n \"revision\": \"f8d460555a0d1f87cfd901e940666629\"\n },\n {\n \"url\": \"images/clear.gif\",\n \"revision\": \"db13c778e4382e0b55258d0f811d5d70\"\n },\n {\n \"url\": \"images/spin.gif\",\n \"revision\": \"487cbb40b9ced439aa1ad914e816d773\"\n },\n {\n \"url\": \"images/checkmark.gif\",\n \"revision\": \"ba764ce62f2bf952df5bbc2bb4d381c5\"\n },\n {\n \"url\": \"images/hs.png\",\n \"revision\": \"fefa1a03d92ebad25c88dca94a0b63db\"\n },\n {\n \"url\": \"images/aui-wait.gif\",\n \"revision\": \"5a474bcbd8d2f2826f03d10ea44bf60e\"\n },\n {\n \"url\": \"mxgraph/css/common.css\",\n \"revision\": \"b5b7280ec98671bb6c3847a36bc7ea12\"\n },\n {\n \"url\": \"mxgraph/images/expanded.gif\",\n \"revision\": \"2b67c2c035af1e9a5cc814f0d22074cf\"\n },\n {\n \"url\": \"mxgraph/images/collapsed.gif\",\n \"revision\": \"73cc826da002a3d740ca4ce6ec5c1f4a\"\n },\n {\n \"url\": \"mxgraph/images/maximize.gif\",\n \"revision\": \"5cd13d6925493ab51e876694cc1c2ec2\"\n },\n {\n \"url\": \"mxgraph/images/minimize.gif\",\n \"revision\": \"8957741b9b0f86af9438775f2aadbb54\"\n },\n {\n \"url\": \"mxgraph/images/close.gif\",\n \"revision\": \"8b84669812ac7382984fca35de8da48b\"\n },\n {\n \"url\": \"mxgraph/images/resize.gif\",\n \"revision\": \"a6477612b3567a34033f9cac6184eed3\"\n },\n {\n \"url\": \"mxgraph/images/separator.gif\",\n \"revision\": \"7819742ff106c97da7a801c2372bbbe5\"\n },\n {\n \"url\": \"mxgraph/images/window.gif\",\n \"revision\": \"fd9a21dd4181f98052a202a0a01f18ab\"\n },\n {\n \"url\": \"mxgraph/images/window-title.gif\",\n \"revision\": \"3fb1d6c43246cdf991a11dfe826dfe99\"\n },\n {\n \"url\": \"mxgraph/images/button.gif\",\n \"revision\": \"00759bdc3ad218fa739f584369541809\"\n },\n {\n \"url\": \"mxgraph/images/point.gif\",\n \"revision\": \"83a43717b284902442620f61bc4e9fa6\"\n }\n], {\n \"ignoreURLParametersMatching\": [/.*/]\n});\n\n\n\n\n\n\n\n\n"],"names":["self","addEventListener","event","data","type","skipWaiting"],"mappings":"szBAmBAA,KAAKC,iBAAiB,WAAYC,IAC5BA,EAAMC,MAA4B,iBAApBD,EAAMC,KAAKC,MAC3BJ,KAAKK,oCAY2B,CAClC,KACS,yBACK,oCAEd,KACS,gCACK,oCAEd,KACS,8BACK,oCAEd,KACS,mCACK,oCAEd,KACS,4BACK,oCAEd,KACS,sBACK,oCAEd,KACS,qBACK,oCAEd,KACS,kCACK,oCAEd,KACS,4BACK,oCAEd,KACS,2BACK,oCAEd,KACS,sCACK,oCAEd,KACS,yCACK,oCAEd,KACS,mCACK,oCAEd,KACS,mCACK,oCAEd,KACS,0CACK,oCAEd,KACS,gDACK,oCAEd,KACS,oDACK,oCAEd,KACS,uCACK,oCAEd,KACS,oCACK,oCAEd,KACS,kCACK,oCAEd,KACS,kDACK,oCAEd,KACS,6CACK,oCAEd,KACS,kCACK,oCAEd,KACS,qCACK,oCAEd,KACS,kCACK,oCAEd,KACS,oDACK,oCAEd,KACS,qCACK,oCAEd,KACS,wCACK,oCAEd,KACS,yCACK,oCAEd,KACS,6CACK,oCAEd,KACS,wCACK,oCAEd,KACS,iDACK,oCAEd,KACS,qDACK,oCAEd,KACS,sDACK,oCAEd,KACS,kDACK,oCAEd,KACS,8CACK,oCAEd,KACS,2BACK,oCAEd,KACS,8CACK,oCAEd,KACS,qDACK,oCAEd,KACS,sDACK,oCAEd,KACS,+DACK,oCAEd,KACS,2EACK,oCAEd,KACS,wEACK,oCAEd,KACS,6BACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,iCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,mCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,mCACK,oCAEd,KACS,gCACK,oCAEd,KACS,uBACK,oCAEd,KACS,gCACK,oCAEd,KACS,2BACK,oCAEd,KACS,+BACK,oCAEd,KACS,iCACK,oCAEd,KACS,oCACK,oCAEd,KACS,2CACK,oCAEd,KACS,mCACK,oCAEd,KACS,sCACK,oCAEd,KACS,uCACK,oCAEd,KACS,oCACK,oCAEd,KACS,oCACK,oCAEd,KACS,6CACK,oCAEd,KACS,6CACK,oCAEd,KACS,6BACK,oCAEd,KACS,iCACK,oCAEd,KACS,2BACK,oCAEd,KACS,+BACK,oCAEd,KACS,gCACK,oCAEd,KACS,wCACK,oCAEd,KACS,oCACK,oCAEd,KACS,mCACK,oCAEd,KACS,kCACK,oCAEd,KACS,kCACK,oCAEd,KACS,kCACK,oCAEd,KACS,yCACK,oCAEd,KACS,mCACK,oCAEd,KACS,8CACK,oCAEd,KACS,yCACK,oCAEd,KACS,0CACK,oCAEd,KACS,wCACK,oCAEd,KACS,wCACK,oCAEd,KACS,+CACK,oCAEd,KACS,sCACK,oCAEd,KACS,gCACK,oCAEd,KACS,4BACK,oCAEd,KACS,2BACK,oCAEd,KACS,gCACK,oCAEd,KACS,yBACK,oCAEd,KACS,+BACK,oCAEd,KACS,kCACK,oCAEd,KACS,uCACK,oCAEd,KACS,wCACK,oCAEd,KACS,uCACK,oCAEd,KACS,uCACK,oCAEd,KACS,oCACK,oCAEd,KACS,qCACK,oCAEd,KACS,wCACK,oCAEd,KACS,qCACK,oCAEd,KACS,2CACK,oCAEd,KACS,qCACK,oCAEd,KACS,oCACK,qCAEb,6BAC8B,CAAC"} \ No newline at end of file
+{"version":3,"file":"service-worker.js","sources":["../../../../../../private/var/folders/cv/_wml09cx4cd5ryt_r7z2tjjm0000gn/T/704b1605388f56b077a691ca7ab7ea7c/service-worker.js"],"sourcesContent":["import {precacheAndRoute as workbox_precaching_precacheAndRoute} from '/usr/local/lib/node_modules/workbox-cli/node_modules/workbox-precaching/precacheAndRoute.mjs';/**\n * Welcome to your Workbox-powered service worker!\n *\n * You'll need to register this file in your web app.\n * See https://goo.gl/nhQhGp\n *\n * The rest of the code is auto-generated. Please don't update this file\n * directly; instead, make changes to your Workbox build configuration\n * and re-run your build process.\n * See https://goo.gl/2aRDsh\n */\n\n\n\n\n\n\n\n\nself.addEventListener('message', (event) => {\n if (event.data && event.data.type === 'SKIP_WAITING') {\n self.skipWaiting();\n }\n});\n\n\n\n\n/**\n * The precacheAndRoute() method efficiently caches and responds to\n * requests for URLs in the manifest.\n * See https://goo.gl/S9QRab\n */\nworkbox_precaching_precacheAndRoute([\n {\n \"url\": \"js/app.min.js\",\n \"revision\": \"2d85cda728cc146ff3dc11f1116fe203\"\n },\n {\n \"url\": \"js/extensions.min.js\",\n \"revision\": \"adae2bddf90d292f9e6297db50f39dd3\"\n },\n {\n \"url\": \"js/stencils.min.js\",\n \"revision\": \"c170a229d8726934c0d6b04c2214a36c\"\n },\n {\n \"url\": \"js/shapes-14-6-5.min.js\",\n \"revision\": \"2a45abd06dfe78e69135e9f87f9b78d3\"\n },\n {\n \"url\": \"js/math-print.js\",\n \"revision\": \"9d98c920695f6c3395da4b68f723e60a\"\n },\n {\n \"url\": \"index.html\",\n \"revision\": \"6d4fee0a8111a8faf43063d25ceea2dc\"\n },\n {\n \"url\": \"open.html\",\n \"revision\": \"d71816b3b00e769fc6019fcdd6921662\"\n },\n {\n \"url\": \"styles/grapheditor.css\",\n \"revision\": \"a02a5d8342a82adf17798f4eae85befc\"\n },\n {\n \"url\": \"styles/atlas.css\",\n \"revision\": \"e8152cda9233d3a3af017422993abfce\"\n },\n {\n \"url\": \"styles/dark.css\",\n \"revision\": \"87d5d01385c5d0f0c4c4f5d0f3532826\"\n },\n {\n \"url\": \"js/croppie/croppie.min.css\",\n \"revision\": \"fc297c9002c79c15a132f13ee3ec427e\"\n },\n {\n \"url\": \"js/dropbox/Dropbox-sdk.min.js\",\n \"revision\": \"4b9842892aa37b156db0a8364b7a83b0\"\n },\n {\n \"url\": \"js/onedrive/OneDrive.js\",\n \"revision\": \"505e8280346666f7ee801bc59521fa67\"\n },\n {\n \"url\": \"js/viewer-static.min.js\",\n \"revision\": \"b746aad225e22515f3c520fd889d2635\"\n },\n {\n \"url\": \"connect/jira/editor-1-3-3.html\",\n \"revision\": \"a2b0e7267a08a838f3cc404eba831ec0\"\n },\n {\n \"url\": \"connect/jira/viewerPanel-1-3-12.html\",\n \"revision\": \"2ce6e99d95113e9ca6b24343cea202e0\"\n },\n {\n \"url\": \"connect/jira/fullScreenViewer-1-3-3.html\",\n \"revision\": \"ba7ece2dfb2833b72f97280d7092f25e\"\n },\n {\n \"url\": \"connect/jira/viewerPanel.js\",\n \"revision\": \"f7a38ee065b927f3e9568213709e5b84\"\n },\n {\n \"url\": \"connect/jira/spinner.gif\",\n \"revision\": \"7d857ab9d86123e93d74d48e958fe743\"\n },\n {\n \"url\": \"connect/jira/editor.js\",\n \"revision\": \"375a89b2a867264a395f384d00eeba13\"\n },\n {\n \"url\": \"connect/jira/fullscreen-viewer-init.js\",\n \"revision\": \"197ed5837ed27992688fc424699a9a78\"\n },\n {\n \"url\": \"connect/jira/fullscreen-viewer.js\",\n \"revision\": \"4e0775a6c156a803e777870623ac7c3e\"\n },\n {\n \"url\": \"plugins/connectJira.js\",\n \"revision\": \"4cefa13414e0d406550f3c073923080c\"\n },\n {\n \"url\": \"plugins/cConf-comments.js\",\n \"revision\": \"c787357209cff2986dcca567b599e2ef\"\n },\n {\n \"url\": \"plugins/cConf-1-4-8.js\",\n \"revision\": \"ec6e55011746305549024292f46270bd\"\n },\n {\n \"url\": \"connect/confluence/connectUtils-1-4-8.js\",\n \"revision\": \"74878fb4834967aa4a68647cab7888c1\"\n },\n {\n \"url\": \"connect/new_common/cac.js\",\n \"revision\": \"3d8c436c566db645fb1e6e6ba9f69bbc\"\n },\n {\n \"url\": \"connect/gdrive_common/gac.js\",\n \"revision\": \"38f1df3ecc4d78290493f47e62202138\"\n },\n {\n \"url\": \"connect/onedrive_common/ac.js\",\n \"revision\": \"293aa21acaf0a3349686f420b2be874a\"\n },\n {\n \"url\": \"connect/confluence/viewer-init.js\",\n \"revision\": \"4a60c6c805cab7bc782f1e52f7818d9f\"\n },\n {\n \"url\": \"connect/confluence/viewer.js\",\n \"revision\": \"c5fb629e12fd3256c23cc8acfaa46f5b\"\n },\n {\n \"url\": \"connect/confluence/viewer-1-4-42.html\",\n \"revision\": \"c7b38b3af4eb7a58ab6dc4791216530e\"\n },\n {\n \"url\": \"connect/confluence/macroEditor-1-4-8.html\",\n \"revision\": \"8cd74a2fb60bf2e3e86026d66107cf11\"\n },\n {\n \"url\": \"connect/confluence/includeDiagram-1-4-8.js\",\n \"revision\": \"ea920e51a37c0b54d7187e0ee2791b5d\"\n },\n {\n \"url\": \"connect/confluence/includeDiagram.html\",\n \"revision\": \"538252ed4fed6d5e9f4e53b35954c116\"\n },\n {\n \"url\": \"connect/confluence/macro-editor.js\",\n \"revision\": \"e273a48b8e81faac4530bf1a68d75aa0\"\n },\n {\n \"url\": \"math/MathJax.js\",\n \"revision\": \"b2c103388b71bb3d11cbf9aa45fe9b68\"\n },\n {\n \"url\": \"math/config/TeX-MML-AM_SVG-full.js\",\n \"revision\": \"d5cb8ac04050983170ae4af145bc66ff\"\n },\n {\n \"url\": \"math/jax/output/SVG/fonts/TeX/fontdata.js\",\n \"revision\": \"495e5a410955d1b6178870e605890ede\"\n },\n {\n \"url\": \"math/jax/element/mml/optable/BasicLatin.js\",\n \"revision\": \"cac9b2e71382e62270baa55fab07cc13\"\n },\n {\n \"url\": \"math/jax/output/SVG/fonts/TeX/Size2/Regular/Main.js\",\n \"revision\": \"e3e5e4d5924beed29f0844550b5c8f46\"\n },\n {\n \"url\": \"math/jax/output/SVG/fonts/TeX/Main/Regular/LetterlikeSymbols.js\",\n \"revision\": \"0767cbad7275b53da128e7e5e1109f7c\"\n },\n {\n \"url\": \"math/jax/output/SVG/fonts/TeX/Main/Regular/GreekAndCoptic.js\",\n \"revision\": \"346302a5c5ee00e01c302148c56dbfe3\"\n },\n {\n \"url\": \"resources/dia.txt\",\n \"revision\": \"b27e8770b0fc71f51c97a80bed58ec4e\"\n },\n {\n \"url\": \"resources/dia_am.txt\",\n \"revision\": \"ff59ef2ea422e962065b978f74f1989e\"\n },\n {\n \"url\": \"resources/dia_ar.txt\",\n \"revision\": \"b53a2876e65d205d42c0217216db0a0b\"\n },\n {\n \"url\": \"resources/dia_bg.txt\",\n \"revision\": \"5ae6ea7a2b816b32ded88cb15651dbfc\"\n },\n {\n \"url\": \"resources/dia_bn.txt\",\n \"revision\": \"f8775fef4398d0863d1c95b92f778f14\"\n },\n {\n \"url\": \"resources/dia_bs.txt\",\n \"revision\": \"1a5bbe8e6e02b215c7457d9735ada682\"\n },\n {\n \"url\": \"resources/dia_ca.txt\",\n \"revision\": \"d8ac61cb5b3e5d47f9ce8160c8b2f057\"\n },\n {\n \"url\": \"resources/dia_cs.txt\",\n \"revision\": \"aeaa9d93c19d60a9ab385a21d57f025c\"\n },\n {\n \"url\": \"resources/dia_da.txt\",\n \"revision\": \"5e0221a99a3fdf557b5ccf72965d99b2\"\n },\n {\n \"url\": \"resources/dia_de.txt\",\n \"revision\": \"d3ad299dc8cfbd2a34479edfafce74ad\"\n },\n {\n \"url\": \"resources/dia_el.txt\",\n \"revision\": \"80761a88228f85296bfc029bf5340718\"\n },\n {\n \"url\": \"resources/dia_eo.txt\",\n \"revision\": \"4544b6600298fe72d2d516fd135c54fa\"\n },\n {\n \"url\": \"resources/dia_es.txt\",\n \"revision\": \"863e0e73d4cdf95093461ef0157e13e5\"\n },\n {\n \"url\": \"resources/dia_et.txt\",\n \"revision\": \"3a47c1b462102c60e47e0f7d6e07d379\"\n },\n {\n \"url\": \"resources/dia_eu.txt\",\n \"revision\": \"92c451283a83cae2d83460b1b0aaf1c4\"\n },\n {\n \"url\": \"resources/dia_fa.txt\",\n \"revision\": \"c56a53dac116441fac2a6e6a110b4fcf\"\n },\n {\n \"url\": \"resources/dia_fi.txt\",\n \"revision\": \"fcc968a8202ebe596bb4efa31d5c55b7\"\n },\n {\n \"url\": \"resources/dia_fil.txt\",\n \"revision\": \"0c98b10b2ce7660502fab8f8a09216c0\"\n },\n {\n \"url\": \"resources/dia_fr.txt\",\n \"revision\": \"550ba55018af500d82b2ade74f49d6a6\"\n },\n {\n \"url\": \"resources/dia_gl.txt\",\n \"revision\": \"d9dedee9a17ce0e98cac6a641dbd1b17\"\n },\n {\n \"url\": \"resources/dia_gu.txt\",\n \"revision\": \"6d6d7e768e1d255dcb9f9abf87676787\"\n },\n {\n \"url\": \"resources/dia_he.txt\",\n \"revision\": \"404b9e323e5bbbecb63ea4a58385431a\"\n },\n {\n \"url\": \"resources/dia_hi.txt\",\n \"revision\": \"8c4436fda7e9278685d9d5d6e0942ae9\"\n },\n {\n \"url\": \"resources/dia_hr.txt\",\n \"revision\": \"38cf52a7e23c4e8796d0cbb7ea217f7e\"\n },\n {\n \"url\": \"resources/dia_hu.txt\",\n \"revision\": \"e17887d5e7057c80ec1da14fe7749c52\"\n },\n {\n \"url\": \"resources/dia_id.txt\",\n \"revision\": \"32c8349f2744c3b6023fd17742eb1c2c\"\n },\n {\n \"url\": \"resources/dia_it.txt\",\n \"revision\": \"57eba100f012d139d00543c31060cf04\"\n },\n {\n \"url\": \"resources/dia_ja.txt\",\n \"revision\": \"cbb7bea7bd120272c6dfe0d6f0ca85f4\"\n },\n {\n \"url\": \"resources/dia_kn.txt\",\n \"revision\": \"ca9045d8ab0d3c8448228187c8ba77cd\"\n },\n {\n \"url\": \"resources/dia_ko.txt\",\n \"revision\": \"ea4948e5456ac276658b0071172dee82\"\n },\n {\n \"url\": \"resources/dia_lt.txt\",\n \"revision\": \"05955be58d94abc2707dea99394a60db\"\n },\n {\n \"url\": \"resources/dia_lv.txt\",\n \"revision\": \"47aa1bcdd23457cd5f3026db7a357fc9\"\n },\n {\n \"url\": \"resources/dia_ml.txt\",\n \"revision\": \"5735f8afcd3fb73882147629d044e368\"\n },\n {\n \"url\": \"resources/dia_mr.txt\",\n \"revision\": \"8e891bbae07ac6fbe9038e8d19fb66fd\"\n },\n {\n \"url\": \"resources/dia_ms.txt\",\n \"revision\": \"ea1992800627d8e54c54d54d1078cd50\"\n },\n {\n \"url\": \"resources/dia_my.txt\",\n \"revision\": \"b27e8770b0fc71f51c97a80bed58ec4e\"\n },\n {\n \"url\": \"resources/dia_nl.txt\",\n \"revision\": \"a158a142f848a44f4b9a86b2c71de770\"\n },\n {\n \"url\": \"resources/dia_no.txt\",\n \"revision\": \"a73fe6de8d13ff09b57022c6152de435\"\n },\n {\n \"url\": \"resources/dia_pl.txt\",\n \"revision\": \"a731cde706b7b10c2bb9b8b804ecf99e\"\n },\n {\n \"url\": \"resources/dia_pt-br.txt\",\n \"revision\": \"6d5aef2fa11b45c7e089a78d8f8077d9\"\n },\n {\n \"url\": \"resources/dia_pt.txt\",\n \"revision\": \"e39267e6c115d3dfff18734d9512396a\"\n },\n {\n \"url\": \"resources/dia_ro.txt\",\n \"revision\": \"e2485ba528fffc006ddc16a2bdbba588\"\n },\n {\n \"url\": \"resources/dia_ru.txt\",\n \"revision\": \"4e4dff4df4bb635eab4648a31718bb71\"\n },\n {\n \"url\": \"resources/dia_si.txt\",\n \"revision\": \"b27e8770b0fc71f51c97a80bed58ec4e\"\n },\n {\n \"url\": \"resources/dia_sk.txt\",\n \"revision\": \"aa39fa602751e960c408b51bc4d1e9a3\"\n },\n {\n \"url\": \"resources/dia_sl.txt\",\n \"revision\": \"a1e9ea18592a3520a564da53754435f1\"\n },\n {\n \"url\": \"resources/dia_sr.txt\",\n \"revision\": \"ee7f392d230f3acf9ee64e59912d2240\"\n },\n {\n \"url\": \"resources/dia_sv.txt\",\n \"revision\": \"d1af4adc3abc689e2b2877348fe3a80e\"\n },\n {\n \"url\": \"resources/dia_sw.txt\",\n \"revision\": \"ee11057cc33d2db3915810afa98e4fb8\"\n },\n {\n \"url\": \"resources/dia_ta.txt\",\n \"revision\": \"64633496007987935476811363899867\"\n },\n {\n \"url\": \"resources/dia_te.txt\",\n \"revision\": \"b67de98cc3819f31d6aedc4a8e332d3f\"\n },\n {\n \"url\": \"resources/dia_th.txt\",\n \"revision\": \"bf3564b735dddb73bafa110e1ba4f364\"\n },\n {\n \"url\": \"resources/dia_tr.txt\",\n \"revision\": \"e66e3a8530b0bda46ff6de26598a637b\"\n },\n {\n \"url\": \"resources/dia_uk.txt\",\n \"revision\": \"1ea94afcd9c9383c784ceae2896c8af4\"\n },\n {\n \"url\": \"resources/dia_vi.txt\",\n \"revision\": \"2ea8a953b560713a201dff1d8d3917dd\"\n },\n {\n \"url\": \"resources/dia_zh-tw.txt\",\n \"revision\": \"7a19eef01a4ee231cc05d3b3833bba4f\"\n },\n {\n \"url\": \"resources/dia_zh.txt\",\n \"revision\": \"f63faca2218966f9c6f7d2c52a3872c5\"\n },\n {\n \"url\": \"favicon.ico\",\n \"revision\": \"fab2d88b37c72d83607527573de45281\"\n },\n {\n \"url\": \"images/manifest.json\",\n \"revision\": \"c6236bde53ed79aaaec60a1aca8ee2ef\"\n },\n {\n \"url\": \"images/logo.png\",\n \"revision\": \"89630b64b911ebe0daa3dfe442087cfa\"\n },\n {\n \"url\": \"images/drawlogo.svg\",\n \"revision\": \"4bf4d14ebcf072d8bd4c5a1c89e88fc6\"\n },\n {\n \"url\": \"images/drawlogo48.png\",\n \"revision\": \"8b13428373aca67b895364d025f42417\"\n },\n {\n \"url\": \"images/drawlogo-gray.svg\",\n \"revision\": \"0aabacbc0873816e1e09e4736ae44c7d\"\n },\n {\n \"url\": \"images/drawlogo-text-bottom.svg\",\n \"revision\": \"f6c438823ab31f290940bd4feb8dd9c2\"\n },\n {\n \"url\": \"images/default-user.jpg\",\n \"revision\": \"2c399696a87c8921f12d2f9e1990cc6e\"\n },\n {\n \"url\": \"images/logo-flat-small.png\",\n \"revision\": \"4b178e59ff499d6dd1894fc498b59877\"\n },\n {\n \"url\": \"images/apple-touch-icon.png\",\n \"revision\": \"73da7989a23ce9a4be565ec65658a239\"\n },\n {\n \"url\": \"images/favicon-16x16.png\",\n \"revision\": \"1a79d5461a5d2bf21f6652e0ac20d6e5\"\n },\n {\n \"url\": \"images/favicon-32x32.png\",\n \"revision\": \"e3b92da2febe70bad5372f6f3474b034\"\n },\n {\n \"url\": \"images/android-chrome-196x196.png\",\n \"revision\": \"f8c045b2d7b1c719fda64edab04c415c\"\n },\n {\n \"url\": \"images/android-chrome-512x512.png\",\n \"revision\": \"959b5fac2453963ff6d60fb85e4b73fd\"\n },\n {\n \"url\": \"images/delete.png\",\n \"revision\": \"5f2350f2fd20f1a229637aed32ed8f29\"\n },\n {\n \"url\": \"images/droptarget.png\",\n \"revision\": \"bbf7f563fb6784de1ce96f329519b043\"\n },\n {\n \"url\": \"images/help.png\",\n \"revision\": \"9266c6c3915bd33c243d80037d37bf61\"\n },\n {\n \"url\": \"images/download.png\",\n \"revision\": \"35418dd7bd48d87502c71b578cc6c37f\"\n },\n {\n \"url\": \"images/logo-flat.png\",\n \"revision\": \"038070ab43aee6e54a791211859fc67b\"\n },\n {\n \"url\": \"images/google-drive-logo.svg\",\n \"revision\": \"5d9f2f5bbc7dcc252730a0072bb23059\"\n },\n {\n \"url\": \"images/onedrive-logo.svg\",\n \"revision\": \"3645b344ec0634c1290dd58d7dc87b97\"\n },\n {\n \"url\": \"images/dropbox-logo.svg\",\n \"revision\": \"e6be408c77cf9c82d41ac64fa854280a\"\n },\n {\n \"url\": \"images/github-logo.svg\",\n \"revision\": \"a1a999b69a275eac0cb918360ac05ae1\"\n },\n {\n \"url\": \"images/gitlab-logo.svg\",\n \"revision\": \"0faea8c818899e58533e153c44b10517\"\n },\n {\n \"url\": \"images/trello-logo.svg\",\n \"revision\": \"006fd0d7d70d7e95dc691674cb12e044\"\n },\n {\n \"url\": \"images/osa_drive-harddisk.png\",\n \"revision\": \"b954e1ae772087c5b4c6ae797e1f9649\"\n },\n {\n \"url\": \"images/osa_database.png\",\n \"revision\": \"c350d9d9b95f37b6cfe798b40ede5fb0\"\n },\n {\n \"url\": \"images/google-drive-logo-white.svg\",\n \"revision\": \"f329d8b1be7778515a85b93fc35d9f26\"\n },\n {\n \"url\": \"images/dropbox-logo-white.svg\",\n \"revision\": \"4ea8299ac3bc31a16f199ee3aec223bf\"\n },\n {\n \"url\": \"images/onedrive-logo-white.svg\",\n \"revision\": \"b3602fa0fc947009cff3f33a581cff4d\"\n },\n {\n \"url\": \"images/github-logo-white.svg\",\n \"revision\": \"537b1127b3ca0f95b45782d1304fb77a\"\n },\n {\n \"url\": \"images/gitlab-logo-white.svg\",\n \"revision\": \"5fede9ac2f394c716b8c23e3fddc3910\"\n },\n {\n \"url\": \"images/trello-logo-white-orange.svg\",\n \"revision\": \"e2a0a52ba3766682f138138d10a75eb5\"\n },\n {\n \"url\": \"images/logo-confluence.png\",\n \"revision\": \"ed1e55d44ae5eba8f999aba2c93e8331\"\n },\n {\n \"url\": \"images/logo-jira.png\",\n \"revision\": \"f8d460555a0d1f87cfd901e940666629\"\n },\n {\n \"url\": \"images/clear.gif\",\n \"revision\": \"db13c778e4382e0b55258d0f811d5d70\"\n },\n {\n \"url\": \"images/spin.gif\",\n \"revision\": \"487cbb40b9ced439aa1ad914e816d773\"\n },\n {\n \"url\": \"images/checkmark.gif\",\n \"revision\": \"ba764ce62f2bf952df5bbc2bb4d381c5\"\n },\n {\n \"url\": \"images/hs.png\",\n \"revision\": \"fefa1a03d92ebad25c88dca94a0b63db\"\n },\n {\n \"url\": \"images/aui-wait.gif\",\n \"revision\": \"5a474bcbd8d2f2826f03d10ea44bf60e\"\n },\n {\n \"url\": \"mxgraph/css/common.css\",\n \"revision\": \"b5b7280ec98671bb6c3847a36bc7ea12\"\n },\n {\n \"url\": \"mxgraph/images/expanded.gif\",\n \"revision\": \"2b67c2c035af1e9a5cc814f0d22074cf\"\n },\n {\n \"url\": \"mxgraph/images/collapsed.gif\",\n \"revision\": \"73cc826da002a3d740ca4ce6ec5c1f4a\"\n },\n {\n \"url\": \"mxgraph/images/maximize.gif\",\n \"revision\": \"5cd13d6925493ab51e876694cc1c2ec2\"\n },\n {\n \"url\": \"mxgraph/images/minimize.gif\",\n \"revision\": \"8957741b9b0f86af9438775f2aadbb54\"\n },\n {\n \"url\": \"mxgraph/images/close.gif\",\n \"revision\": \"8b84669812ac7382984fca35de8da48b\"\n },\n {\n \"url\": \"mxgraph/images/resize.gif\",\n \"revision\": \"a6477612b3567a34033f9cac6184eed3\"\n },\n {\n \"url\": \"mxgraph/images/separator.gif\",\n \"revision\": \"7819742ff106c97da7a801c2372bbbe5\"\n },\n {\n \"url\": \"mxgraph/images/window.gif\",\n \"revision\": \"fd9a21dd4181f98052a202a0a01f18ab\"\n },\n {\n \"url\": \"mxgraph/images/window-title.gif\",\n \"revision\": \"3fb1d6c43246cdf991a11dfe826dfe99\"\n },\n {\n \"url\": \"mxgraph/images/button.gif\",\n \"revision\": \"00759bdc3ad218fa739f584369541809\"\n },\n {\n \"url\": \"mxgraph/images/point.gif\",\n \"revision\": \"83a43717b284902442620f61bc4e9fa6\"\n }\n], {\n \"ignoreURLParametersMatching\": [/.*/]\n});\n\n\n\n\n\n\n\n\n"],"names":["self","addEventListener","event","data","type","skipWaiting"],"mappings":"szBAmBAA,KAAKC,iBAAiB,WAAYC,IAC5BA,EAAMC,MAA4B,iBAApBD,EAAMC,KAAKC,MAC3BJ,KAAKK,oCAY2B,CAClC,KACS,yBACK,oCAEd,KACS,gCACK,oCAEd,KACS,8BACK,oCAEd,KACS,mCACK,oCAEd,KACS,4BACK,oCAEd,KACS,sBACK,oCAEd,KACS,qBACK,oCAEd,KACS,kCACK,oCAEd,KACS,4BACK,oCAEd,KACS,2BACK,oCAEd,KACS,sCACK,oCAEd,KACS,yCACK,oCAEd,KACS,mCACK,oCAEd,KACS,mCACK,oCAEd,KACS,0CACK,oCAEd,KACS,gDACK,oCAEd,KACS,oDACK,oCAEd,KACS,uCACK,oCAEd,KACS,oCACK,oCAEd,KACS,kCACK,oCAEd,KACS,kDACK,oCAEd,KACS,6CACK,oCAEd,KACS,kCACK,oCAEd,KACS,qCACK,oCAEd,KACS,kCACK,oCAEd,KACS,oDACK,oCAEd,KACS,qCACK,oCAEd,KACS,wCACK,oCAEd,KACS,yCACK,oCAEd,KACS,6CACK,oCAEd,KACS,wCACK,oCAEd,KACS,iDACK,oCAEd,KACS,qDACK,oCAEd,KACS,sDACK,oCAEd,KACS,kDACK,oCAEd,KACS,8CACK,oCAEd,KACS,2BACK,oCAEd,KACS,8CACK,oCAEd,KACS,qDACK,oCAEd,KACS,sDACK,oCAEd,KACS,+DACK,oCAEd,KACS,2EACK,oCAEd,KACS,wEACK,oCAEd,KACS,6BACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,iCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,mCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,mCACK,oCAEd,KACS,gCACK,oCAEd,KACS,uBACK,oCAEd,KACS,gCACK,oCAEd,KACS,2BACK,oCAEd,KACS,+BACK,oCAEd,KACS,iCACK,oCAEd,KACS,oCACK,oCAEd,KACS,2CACK,oCAEd,KACS,mCACK,oCAEd,KACS,sCACK,oCAEd,KACS,uCACK,oCAEd,KACS,oCACK,oCAEd,KACS,oCACK,oCAEd,KACS,6CACK,oCAEd,KACS,6CACK,oCAEd,KACS,6BACK,oCAEd,KACS,iCACK,oCAEd,KACS,2BACK,oCAEd,KACS,+BACK,oCAEd,KACS,gCACK,oCAEd,KACS,wCACK,oCAEd,KACS,oCACK,oCAEd,KACS,mCACK,oCAEd,KACS,kCACK,oCAEd,KACS,kCACK,oCAEd,KACS,kCACK,oCAEd,KACS,yCACK,oCAEd,KACS,mCACK,oCAEd,KACS,8CACK,oCAEd,KACS,yCACK,oCAEd,KACS,0CACK,oCAEd,KACS,wCACK,oCAEd,KACS,wCACK,oCAEd,KACS,+CACK,oCAEd,KACS,sCACK,oCAEd,KACS,gCACK,oCAEd,KACS,4BACK,oCAEd,KACS,2BACK,oCAEd,KACS,gCACK,oCAEd,KACS,yBACK,oCAEd,KACS,+BACK,oCAEd,KACS,kCACK,oCAEd,KACS,uCACK,oCAEd,KACS,wCACK,oCAEd,KACS,uCACK,oCAEd,KACS,uCACK,oCAEd,KACS,oCACK,oCAEd,KACS,qCACK,oCAEd,KACS,wCACK,oCAEd,KACS,qCACK,oCAEd,KACS,2CACK,oCAEd,KACS,qCACK,oCAEd,KACS,oCACK,qCAEb,6BAC8B,CAAC"} \ No newline at end of file